Releases: melonjs/melonJS
Releases · melonjs/melonJS
v15.7.0
Added
- Color: new
setFloat
method allowing to specify RGBA components in a normalized float format
Fixed
- Renderer: fix how alpha and globalAlpha values are applied in the Canvas Renderer to match with WebGL
- TypeScript : fix loader.Asset definition typings (causing an error with the Vite-Typescript boilerplate)
v15.6.0
Added
- Audio: expose the audio
load
method in the documentation and typings - Loader: melonJS now dynamically assign parser/preload functions to known asset types
- Loader: add the possibility to specify a user defined parser/preload function for a given asset type
- Renderable: new
depth
getter/setter that will returns the depth of a renderable on the z axis - Renderer: the default renderer instance is now passed as parameter when emitting the global
VIDEO_INIT
event - Renderer: add path like methods (
beginPath
,lineTo
,moveTo
,rect
,roundRect
,closePath
,fill
andstroke
)
Changed
- Geometry: optimize Path2d triangulation by only recalculating all triangles when the path is modified
Fixed
- Core: fix some leftover direct global references to
document
(now usingglobalThis.document
) - Geometry: fix consecutive Path2d line stroke in WebGL mode
v15.5.0
Changed
- Color: optimize conversion function such as
toHex
andtoUint32
- Geometry: optimize circle/ellispe creation and recycling
- Renderable: revert previous changes on the flip[X/Y] optimization since it's causing backward compatibility issue
Fixed
- Doc: fix multiple incorrect
@type
tags across the API - Doc: fix
ImageLayer
extendingSprite
and notRenderable
- Doc: fix missing
fillStyle
andStrokeStyle
properties forText
elements - Physic: fix a potential memory leak when recalculating a polygon edges and normals
- TypeScript: fix missing typings for
Vector[2d/3d]
x
,y
andz
properties - TypeScript: fix typings for Array parameter type
v15.4.1
v15.4.0
Added
- Application: new
pauseOnBlur
,resumeOnFocus
andstopOnBlur
properties to configure a game behavior on blur and focus events
Changed
- Core: visibility and focus/blur events are now managed internally through new global
BLUR
andFOCUS
events - Device:
pauseOnBlur
,resumeOnFocus
andstopOnBlur
properties are now deprecated and replaced by their Application counterpart - Geometry: optimize Rect
contains
method by using typeof instead of instanceof to identify given parameter type
Fixed
- Renderable : fix a potential issue with a Tile Layer not being properly redrawn when adding or clearing individual tiles
- TMX : properly set the
preRender
flag for Tiled layer at runtime (when added to the root container) - TMX : fix pre-rendering for non-orthogonal maps
- UI: fix dirty flag for base UI elements not being set due to wrong property name (thanks @yuta0315)
v15.3.0
Added
- Renderer: new
scaleTarget
that allows to specify which HTML element to be used as reference when scaling the canvas (thanks @johnhyde)
Changed
- Application: world steps and rendering update are now done through a new global
TICK
event - Application: further "decoupling" of Application, Stage and State (see #1091)
- Renderable : faster implementation of the
tint
getter/setter, and Colorcopy
method
Fixed
- doc: fix the @name value of
state.DEFAULT
(thanks @johnhyde) - doc: fix documentation for the
TMXUtils
namespace - Renderer: fix potential memory leak in WebGL, where the renderer was not clearing the save/restore stack upon reset
- TypeScript : fix optional arguments typings for all renderers and Application constructor
v15.2.1
v15.2.0
v15.1.6
v15.1.5
- Container: fix child bounds not being recalculated when a child is added through the
addChildAt()
method - Container: fix container not recursively updating child bounds when
enableChildBoundsUpdate
is enabled - Renderable: fix floating coordinates mismatch by forcing a child
floating
property to false when added to a floating container - Renderable: fix the
isFloating
getter to also return true when a renderable is added to nested floating containers - UI: fix initial UIBaseElement bound calculation when using nested UI containers
- UI: fix UIBaseElement container not propagating events to child objects by default