Repository navigation
v20.15.0
Added
- Physics:
world.addJoint()andworld.removeJoint()join two bodies with a hinge, rope, weld or slider joint, the same way on every adapter that has joints (planck and Rapier); joints are rebuilt byworld.setAdapter()and removed with their bodies. On an adapter without joints (the built-in and matter)addJoint()throws - Save:
save.setStorage()keeps the saved keys somewhere other thanlocalStorage, which stays the default, in anything withgetItem,setItemandremoveItem;save.createCloudStorage()makes one out of a platform's cloud save (YouTube Playables, Facebook Instant Games), held in memory and saved back one write at a time - Device:
device.setFocusEvents(false)stops the browser window reporting the game's focus, for a game whose host says when it runs (a web game portal's SDK, a native wrapper): the host's callbacks emitevent.BLURandevent.FOCUSinstead, andpauseOnBlur,stopOnBlurandresumeOnFocusstill decide what the game does
Fixed
- Physics:
world.setAdapter()builds each body again at the angle it had; a turned body came back upright - Physics: a renderable moved to another container of the same world keeps its body as it was; on matter, planck and Rapier the body was built again, at rest and upright
- Save: a page whose
localStorageisnull, as in some sandboxed frames (YouTube Playables' SDK Test Suite runs games in one), no longer stops melonJS at boot;savekeeps its keys in memory there, as where cookies are blocked - Platforms: fixed a regression where melonJS no longer ran on WeChat Mini Games: images load through the runtime's
ImagewherecreateImageBitmapis missing, WebGL is found without a globalWebGL2RenderingContext, and pausing or muting no longer throws whereHTMLAudioElementis not defined - Rendering: the canvas given in the application's
canvassetting is the one drawn to, even on a page with a<canvas id="canvas">, which was used instead
Full Changelog: 20.14.0...20.15.0