Releases: melonjs/melonJS
Releases Β· melonjs/melonJS
v13.0.0
added
- Event: also provide a reference to the camera viewport being resized when emitting
VIEWPORT_ONRESIZE
- Unit Test: added base64 encoded data preload testing for image and audio assets
- Utils: new
isDataUrl()
helper returning true if the given url is in thedata:[<mediatype>][;base64],<data>
format.
Changed
- Core: full ES6 refactoring of
me.device
, and API clean-up (@see https://github.com/melonjs/melonJS/wiki/Upgrade-Guide#120x-to-130x-stable) - Game: refactoring of the global
game
into an instantiableApplication
object, withgame
now being the default instance of it (@see #1091) - Loader:
onload
andonerror
callbacks are now optionals when directly loading assets (easier with base64 encoded assets) - Physic: World physic implementation is now properly tight to its corresponding parent application/game (@see #1091)
- Physic: Gravity is now properly applied as a force, instead of directly modifying a body velocity
- Physic: Gravity now properly takes in account the body mass
- Physic: resulting force is now properly cancelled at the end of an update cycle (not required anymore to manually set it to 0 in user code)
Fixed
- Doc: fix missing
Timer
documentation following previous refactoring - Loader: fix loading/preloading of base64 audio assets, and base64 encoded FontFace
- Renderer: fix a regression with the masking features in the Canvas Rendering mode
- Text: fix an uncaught exception when removing Text object from the game world that use offScreenCanvas texture caching (thanks @wpernath)
v12.0.0
v11.0.0
Added
- Event: new
DOM_READY
event triggered when the DOM is loaded and ready (now used internally to trigger theonReady()
function)
Changed
- Renderable: update the Light2d constructor to allow creating elliptical shaped lights
Fixed
- Core: fix an uncaught exception when using parcel (thanks @8Observer8)
v10.12.0
Added
- State: new
get(state)
function that return the instance to the Stage associated with the given state
Changed
- Physic: simplify the collision api and implementation (removed
collision.response
that serves no purpose anymore) - Pooling: silently fail if internally failing at recycling body physic shapes
Fixed
- Physic: fix a regression with Ellipse vs Polygon SAT collision detection
- Text: make sure the optional
x
andy
arguments of the draw method are set to a default value - TypeScript: fix and uniform draw method signature across all renderables
- TypeScript: fix typings for the
onCollision
method - TypeScript: fix
setMaxVelocity
andsetFriction
method scope - Webdoc: fix wrong or missing argument names (
Path2D.arcTo
,Rect.centerOn
,Texture.AdduVs
)
v10.11.0
Changed
- Core: fix all rollup "$1" related duplicated declaration and/or export
- Core: refactored Timer into an instantiable class with
timer
(namespace) now being the default instance of the Timer class - Doc: replaced JSDoc by Webdoc for documentation generation (huge thanks to @ShukantPal)
Fixed
- Bounds: fix the
addFrame()
method - Core: fix a regression when accessing
localStorage
- Core: fix a regression when when running melonJS in node.js (undefined global reference in the roundRect polyfill)
- Geometry: fix the RoundRect
clone()
method - Input: fix PointerEvent detection on Firefox for Android mobile (thanks @kutyamutya)
- Renderer: fix a regression with
strokeLine()
in the CanvasRenderer
v10.10.0
Added
- Core: new
CanvasTexture
object to allow recycling canvas through the engine (text caching, default particles, effect, etc..) - Core : new experimental light effect that simply simulate a spot/point light for now (work in progress)
- Color : allow overriding the alpha component with a specific value when calling
toRGBA
ortoHex8
- Renderer: support reverse clipping when applying geometry masks (alpha component of the masked area is ignored in legacy Canvas rendering mode)
- Renderer: added multiple clipping region for masks (only works with overlapping region in legacy Canvas rendering mode)
Changed
- TMX: replace use of
eval()
byFunction()
when parsing map including executable code - Core: replace internal calls to deprecated
substr
function withslice
Fixed
- Renderable: mark renderable(s) as dirty when their pos or bounds are updated
- Geometry: fix a regression with roundRect shape drawing
v10.9.0
v10.8.0
Added
- Geometry : new RoundRect geometry object
- Geometry : new Path2D API to provide better abstraction when drawing primitives in WebGL
changed
- Renderer: refactored the WebGL renderer to use the new Path2D API for primitive drawing
Fixed
- Core: improve internal object recycling, to fix instance leaking or hoarding by the pool system
- Input: fix a warning on using passive target disabling swipe on a WebView (thanks @Zngb)
v10.7.1
v10.7.0
Added
- Core : new
device.nodeJS
to detect if running under node.js - Particle Emitter: added the possibility to define a specific tint and blend mode for particles
- Renderable: new
centerOn
method to center a renderable around given coordinates - Renderer: added "additive" as an alias for the "lighter" blend mode
- Renderer: listen to
contextlost
&contextrestored
events in Canvas rendering mode (@see https://developer.chrome.com/blog/canvas2d/#context-loss)
Changed
- Core : replace internal use of global window object by
globalThis
- Core : refactor the boot process, and device/feature detection/initialisation to better work within node.js (will still require jsdom and node-canvas)
- Particle Emitter: refactoring of the Emitter class to directly extend
Container
instead ofRenderable
Fixed
- Particle Emitter: fix a regression in
ParticleEmitter
causing a crash, after es6 class reformatting - Particle Emitter: fix particle additive blend mode in WebGL