obiot Posted February 18, 2019 Share Posted February 18, 2019 Hello, shortly after the Chinese new year, here is a new release of melonJS, High-Level Changes : New documentation format, including a better, more modern, layout and search feature. http://melonjs.github.io/melonJS/docs/index.html Support for Multiple Texture Packer Textures Added Colour Tint support for Renderable (WebGL mode only for now) Bunch of small fix and improvements on Renderable, Animations, Isometric rendering, and System renderers See here for a more detailed changelog, there is no API change this time (just some internal re-factoring), so you can safely upgrade without breaking your game Have fun guys, and let us know what you think about the new documentation ! (it certainly can be further tweaked/improved) --- the melonJS team AndreasLoew, PLAYERKILLERS and sistemlogikadigital 1 2 Quote Link to comment Share on other sites More sharing options...
sistemlogikadigital Posted February 19, 2019 Share Posted February 19, 2019 please add method like setWidth() and setHeight(), for me is easier than using method scale(). Quote Link to comment Share on other sites More sharing options...
obiot Posted February 19, 2019 Author Share Posted February 19, 2019 9 hours ago, sistemlogikadigital said: please add method like setWidth() and setHeight(), for me is easier than using method scale(). Add to what ? Can you be more specific? Thanks. Quote Link to comment Share on other sites More sharing options...
PLAYERKILLERS Posted February 21, 2019 Share Posted February 21, 2019 Thank you! obiot 1 Quote Link to comment Share on other sites More sharing options...
sistemlogikadigital Posted February 21, 2019 Share Posted February 21, 2019 On 2/19/2019 at 10:37 PM, obiot said: Add to what ? Can you be more specific? Thanks. something like this, sprite.setWidth(200) so i dont need to use sprite.scale() anymore Quote Link to comment Share on other sites More sharing options...
Dan K Posted March 9, 2019 Share Posted March 9, 2019 Yes I agree, I found scaling the individual sprites difficult when I wanted manual control over the scaling. I created my own Image Renderable class to solve the problem. For me It may have been an issue with not fully understanding the scaling implementation. here's an example of my scaling function that probably describes what sistem wants... However, I have the me.video autoscale to false when I use it. (this object is a me.Renderable not a me.Sprite FYI) scale: function(scaleFactor /* <1 width is scaled, otherwise > 0 width is set*/) { if (scaleFactor > 0 && scaleFactor < 1) { this.width = this.image.naturalWidth * scaleFactor; this.height = this.image.naturalHeight * this.width / this.image.naturalWidth; // preserves aspect ratio } else if (scaleFactor > 1) { this.width = scaleFactor; this.height = this.image.naturalHeight * this.width / this.image.naturalWidth; // preserves aspect ratio } else if (scaleFactor === 1) { // unscale this.width = this.image.naturalWidth; this.height = this.image.naturalHeight; } this.updated = true; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.