Skip to content

Releases: melonjs/melonJS

melonJS 8.0.0

12 Aug 02:31
Compare
Choose a tag to compare
  • Audio : audio core update (2.2.0)
  • Audio : me.audio.stop() will now stop all sounds if none is specified
  • Color : new lerp() method to provide linear interpolation between two different colors
  • Color : allow specifying minimum and maximum value range when generating random colors
  • Core : new me.event.VIDEO_INIT system event that will be triggered once the display canvas is initialized
  • Core : a default stage is now instantiated at boot time, allowing to more easily write basic examples to test features
  • Input : improved input detection when the canvas is embedded into a complex css layout and the page is being scrolled up/down
  • Input : Changed the device accelerometer and orientation detection to comply with the latest API changes where a user permission is now required
  • Input : fix an issue with uncorrect horizontal delta value for wheel event
  • Input : all registered events for a specific renderable are now automatically released upon the object destruction
  • Physic : me.game.world is now a specific container (based on me.Container) that will hold and manage all related physic updates
  • Physic : gravity for physic bodies is now defined globally under me.game.world.gravity, and can be scaled individually using me.Body.gravityScale
  • Physic : added a rotate method to me.Body to allow rotating all the body shapes properly (by default around the body bounding box center)
  • Physic : melonJS will now automatically enable body physic when when a me.Body object is added to any renderable
  • Renderable : add support for free-texture-packer (http://free-tex-packer.com), the free Texture Packer alternative (thanks @playerkillers)
  • Renderable : optimized and tidied up me.Text and me.BitmapText implementation
  • Renderable : new isFlippedX & isFlippedY getter to check the current renderable "flip" state
  • Renderable : fix implementation and usage of the isDirty flag across Renderables
  • Renderable : fix a regression with transformation when a renderable is directly added to a me.Container object
  • Renderable : apply a tint color to BitmapText if a fillStyle is specified in the constructor
  • Renderer : new optional parameter for createCanvas() to request an OffScreenCanvas if supported by the browser
  • Renderer : use OffscreenCanvas by default for all secondary canvas (e.g. debugPanel, double buffering, font texture in WebGL)
  • Renderer : properly fallback to the Canvas Renderer including when the WebGL renderer is not able to compile the built-in shaders
  • Renderer : dynamically activate WebGL texture sampler instead of pre-indexing them (accordingly to GLSL 1.30 specifications and later)
  • Renderer : added support for WebGL2 (disabled by default, use preferWebGL1 = false to enable it when calling me.video.init)
  • Renderer : enable use of NPOT textures when in WebGL2 mode for texture mapping and pattern drawing
  • Renderer : allow specifying the default powerPreference value for the WebGL Renderer (on Safari and Chrome 80+ default is now low-power)
  • Renderer : display GPU information in the console when available (WebGL)
  • Renderer : implemented sprite tint support for the Canvas Renderer
  • Shapes : vectors and shapes can now be rotated around a given (optional) point instead of the default origin point
  • Shapes : added a center vector property for me.Rect, giving the center point of the rectangle
  • TMX : fix parsing of tileset image when the "last" tile spacing was truncated
  • TMX : fix staggered map rendering, where computed tiles coordinates were non integer values (thanks @siauderman)
  • TMX : fix parsing of animated tile with the latest version of Tiled (thanks @alcor)
  • TMX : fix anti-diagonal tile flipping (thanks @alcor)
  • TMX : fix world bounds not being updated if a level is added manually using addTo (thanks @siauderman)
  • Video : fix an issue when using the "flex" scaling mode, and where the reported parent container size could be floating values
  • Video : the scale parameter is now optional if scaleMethod is specified (auto-scaling will then automatically be enabled)

melonJS 7.1.1

20 Aug 05:28
Compare
Choose a tag to compare
  • Core : fix a crash when a game reset is triggered manually before any default stage has been defined
  • Core : new option to automatically change to a newly define stage
  • Input : fixed a regression with gamepad polling
  • Renderer : fixed an issue where a failed attempt at creating a WebGL context would then prevent from creating a canvas context as fallback

melonJS 7.1.0

16 Jul 04:36
Compare
Choose a tag to compare
  • Audio : audio core update (2.1.2) to fix audio unlock on Firefox 66 and onwards
  • Core : new me.event.GAME_UPDATE system event that will be triggered at the beginning of the update loop
  • Core : me.game.HASH is deprecated and replaced by the me.utils.getUriFragment() function
  • Debug : fixed DebugPanel minimum version requirements (should have been 7.0 since last release)
  • Font : fix an issue with setText wronly converting a given array of string to a string representing the array
  • Input : use passive event listeners when preventDefault is used (default behaviour)
  • Input : simplified pointer / keyboard / gamepad implementation and removed support for legacy API (e.g. mousewheel event)
  • Input : added a new getBindingKey() method that returns the associated action to a given key
  • Input : exposed default targets for Keyboard and Pointer events under me.input
  • Physic : fix an issue where gravity was not properly applied on the x axis
  • Renderer : fix fill and stroke operations for arc and ellipse in the Canvas Renderer
  • Renderer : added missing fill and stroke operations for arc in WebGL mode
  • Renderer : align the canvas renderer with the WebGL renderer to properly use CSS scaling
  • Sprite : new rotate method as a shortcut to apply a rotation transform to the sprite
  • TMX : fixed parsing of string custom properties containing newline(s)
  • TMX : use the offsetx/offsety properties when parsing ImageLayer data over the deprecated x/y ones
  • TMX : add support for Staggered Isometric maps
  • TMX : fix rendering of Staggered Hexagonal maps
  • TMX : fix pointer position detection on Hexagonal maps (was slightly off previously)

melonJS 7.0.0

26 Mar 04:40
Compare
Choose a tag to compare
  • General : new "grunt-free" build process based on npm, rollup & friends
  • Core : removed support for CocoonJS (following service shutdown)
  • Core : simplified error/exception handling by removing the custom me.Error class
  • Input : removed obsolete support for proprietary windows 8 accelerometer API (not a thing anymore)
  • Input : fixed potential issue with hardware not reporting proper event geometry
  • Inpit : improved pointer detection when using complex css layouts
  • Math : prevent recalculating edges and normals when resizing a rectangle shape with the same width and height values
  • Renderer : renderer selection now set to AUTO by default (Attempt WebGL first, with fallback to Canvas)
  • Timer : added arguments passing to setTimeout and setInterval
  • TMX : fixed temporary vectors recycling in the hexagonal map renderer
  • WebGL : shader implementation has been rewritten to allow for a more generic approach, and ease definition of custom shader (see me.GLShader)
  • WebGL : properly handle WebGL context lost and restore
  • WebGL : updated earcut to version 2.1.5

melonJS 6.4.0

18 Feb 02:27
e1e0e46
Compare
Choose a tag to compare
  • Documentation : new documentation format, including better layout and search feature
  • Math : new PI related constants under me.Math (TAU, ETA, etc..)
  • Renderable : added a basic color tint feature (WebGL mode only)
  • Renderable : added support for Texture Packer multipack textures
  • Renderable : moved the name property definition at the me.Renderable level (prevent mostly all deriving objects from re-defining one)
  • Renderable : fixed an issue where a non Boolean value was passed to the onVisibilityChange callback
  • Sprite : cleaned up/simplified animation data handling
  • TMX : small memory optimization in the isometric renderer, where one temporary vector object was not properly recycled
  • Renderer : fixed stroke and fill default color to match standard W3C canvas stroke and fill style (black)

melonJS 6.3.0

24 Dec 00:54
Compare
Choose a tag to compare
  • Audio : audio core update (2.1.1), mostly improving auto audio unlock on latest (non-mobile) browser versions
  • Color : fixed alpha value not being properly clamped (leading to issue in WebGL mode when passing the glArray buffer)
  • Debug : fixed wrong bounding box drawing position for nested containers and entity childs
  • Entity : fixed ancestor value for renderable component
  • Renderable : added support for rendering mask (in both Canvas and WebGL mode), allowing to use any me.Shape object as a mask
  • Renderer : drawShape() is deprecated and has been replaced by a fill() and stroke() methods
  • Renderer : cleaned and aligned drawing APIs between the Canvas and WebGL Renderer
  • WebGLRenderer : added stroke and fill operations for all me.Shape objects
  • WebGLRenderer : fillRect() now use newly added fill method, instead of creating/using a fill texture
  • WebGLRenderer : optimized memory usage for shape drawing operations
  • WebGLRenderer : enable batching of triangle vertices to speed up shape drawing (when applicable)
  • WebGLRenderer : fixed a clipping issue with nested containers
  • WebGLRenderer : fixed the clearRect method

melonJS 6.2.0

29 Nov 07:33
Compare
Choose a tag to compare
  • Audio : fixed a regression when passing an initial volume value to the play function (thanks @playerkillers)
  • Container : new getNextChild function that returns the next child within the container
  • Core : renamed me.ScreenObject to me.Stage (with an alias to me.ScreenObject for Backward compatibility)
  • Core : cleaned and improved the window auto focus feature
  • Core : improve automatic object instance collection & recycling of base components like vectors and shapes.
  • Core : ensure the internal coordinates system is updated when the DOM tree structure is modified
  • Camera : me.Camera2d objects can now be defined per Stage, rather than having one static global camera under me.game
  • Camera : fix infinite generation of the VIEWPORT_ONCHANGE event when using camera damping
  • Device : added a me.device.focus() function
  • Entity : fix "DRAGEND" event triggering for Draggable Entity, when pointer is moved outside of the screen area
  • Entity : fix a regression introduced in 6.0 on optional me.Entity constructor parameters
  • Font : fix bounds calculation for BitmapFont objects
  • Font : enable Font & BitmapFont bounding box drawing through the Debug Panel
  • Font : fix missing documentation on properties for BitmapFont Object.
  • Font : Font & BitmapFont objects can now be directly added to a container like any other me.Renderable
  • Font : Improved performances when drawing regular me.Font objects
  • Font : new me.Text and me.BitmapText generic object replacing me.Font and me.BitmapFont (now deprecated)
  • Input : fix a potential issue with "undefined" pointer location upon loading
  • Loader : added support for Font Face preloading
  • Math : new toBeCloseTo function to determine if two values are closed "enough" to eachother
  • Renderable : new onVisibilityChange event handler that is called when leaving or entering a camera viewport
  • Renderable : fix documentation for the container clipping flag (was accidentally left private)
  • Renderable : update visibility flag for floating objects using actual screen coordinates
  • Sprite : fix an issue when flipping trimmed sprite textures (@YosuaHamonangan)
  • TMX : add support for orthogonal tile rendering order
  • TMX : add support for Text object, allowing to add me.Text or me.BitmapText directly from Tiled
  • TMX : optimized the getTile function to avoid duplicate calls to the pixel to tile coordinates functions
  • WebGLRenderer : fix a bug when clipping is disabled due to the clipping area being equal to the canvas size

melonJS 6.1.0

11 Sep 01:42
Compare
Choose a tag to compare
  • Audio : latest audio core update (2.0.15)
  • Core : new linux detection flag under me.device
  • Renderer : now systematically warn when using non POT texture in both Canvas and WebGL mode
  • Sprite : new function to allow reversing a given or current animation
  • TMX : support for the Tiled 1.2 beta JSON property format (backward compatible with previous 1.1 version)
  • CanvasRenderer : fix drawImage sub-pixel rendering in Canvas mode when using the short notation (2 or 4 parameters)
  • WebGLRenderer : only throw an exception (e.g. stop execution) when using repeat/wrap mode with a non POT texture
  • WebGLRenderer : properly fallback to Canvas mode in AUTO and WEBGL mode when failing at creating a valid WebGL Context

melonJS 6.0.0

13 Aug 07:24
Compare
Choose a tag to compare
  • Audio : latest audio core update to fix HTML5 Audio issue with FB Instant Games, and Chrome API deprecation
  • Container : new clipping feature to automatically clip childrens to their parent container bounds (disable by default)
  • Core : Removed unnecessary ES6 polyfill (based on melonJS 5.x minimum browser version)
  • Core : API update to sandbox all previous language extension under the me namespace
  • Core : added console debug information (melonJS version & basic device capabilities)
  • Core : properly support (requires the official weapp-adapter) WeChat Mini Games (@qinchunren)
  • Color : fix the me.Color.toHex8() function
  • Debug : fix "undefined width error" when instantiating the debug panel
  • Font : fix a regression where drawing a web font was not restoring the renderer context properly
  • Input : fix an issue where the focus was sometimes lost when using an integrated WebView (e.g. Instant Games)
  • Loader : new loader feature to allow preloading of javascript files
  • Math : new vector linear interpolation functions
  • Math : new equals function for me.Rect shape
  • Physic : avoid duplicating the given collision shape through addShape, and directly use the object references
  • Physic : gravity property for solid bodies is now a vector object, allowing to defined gravity for both axis
  • Physic : new mass property for solid bodies
  • Physic : new me.Body.force property allowing to automatically apply a force or acceleration to a solid body
  • Physic : me.Body.accel and me.Body.setVelocity are now deprecated and to be replaced by me.Body.force
  • Physic : automatically apply any defined physic properties when importing a physic editor JSON file
  • Renderable : fix onComplete not being called for me.Sprite single animation frame (@adrian)
  • Renderable : fix animation not cycling when using GUI_Object(s)
  • Renderable : fix a regression in Sprite when using Texture Packer
  • Renderable : fix floating renderable's bounds following its parent container position (@YosuaHamonangan)
  • Renderable : fix a potential parameter mismatch in me.Sprite for an animation onComplete callback
  • Renderer : use prefixed "image-rendering" CSS properties for non standard browsers
  • Renderer : new clipRect function to clip the specified rectangle area
  • TMX : allows different tile size per layer (not supported by Tiled, only works with "manually" generated maps) (@YosuaHamonangan)
  • TMX : optimised object allocation to lower memory usage (and later GC) when loading a level
  • Viewport : new damping feature to enable smooth camera movement
  • WebGLRenderer : enable failIfMajorPerformanceCaveat by default when attempting to create a GL Context
  • WebGLRenderer : feature to change the blending mode (experimental and limited to "normal" and "multiply" for now)
  • WebGLRenderer : fix a deprecation warning in Firefox

melonJS 5.1.0

21 Jan 07:13
Compare
Choose a tag to compare
  • Audio : Howler core update (2.0.8)
  • Core : window.onReady is now marked as deprecated, and replaced by me.device.onReady
  • Container : new onChildChange callback for when a child is added or removed
  • Input : further improvements to multitouch support (compatibility on latest device/browser)
  • Input : new me.input.setTouchAction function to enable/disable gesture by default (default to "none")
  • Input : fix a pointer offset issue when using the browser zoom
  • Loader : new "withCredentials" setting to specify if cross-site Access-Control requests should be made using credentials
  • Physic : new me.collision.rayCast function for basic Line of Sight implementation
  • Physic : slight me.Body refactoring to allow adding a physic body to any base me.Renderable
  • Physic : new bounce property for solid bodies
  • Renderable : isKinematic is now true by default except for me.Entity, me.Container and me.GUI object
  • Renderable : anchor point and transform are now properly applied to me.Sprite Bounding Rect
  • TMX : add support for "Collection of Image" tilesets
  • Viewport : apply current transformation when converting given coordinates from localToWorld and WorldToLocal
  • Viewport : fix a regression where transforms were not applied anymore to the camera/viewport