melonJS

a fresh, modern & lightweight HTML5 game engine

MIT License

Downloads
996
Stars
5.7K
Committers
82

Bot releases are visible (Hide)

melonJS - v17.2.0 Latest Release

Published by obiot 6 months ago

Added

  • Audio: add missing optional id parameter to 3D / Spatial audio methods
  • Core: add platform detection if running as a standalone web app
  • Loader: add missing unload implementation for font assets

Fixed

  • Loader: properly return an error when attempting to load FontFace assets on non-browser platforms
  • Renderer: fix a regression when a global canvas is available (e.g. webapp adapter for wechat)
  • Renderer: fix a regression when forcing WebGL1 rendering mode (leading to an exception)
  • Renderer: fix a regression when using the canvas rendering mode where antialias setting was not being applied on cached tinted elements
melonJS - v17.1.0

Published by obiot 7 months ago

Added

  • Audio: added/exposed 3D Spatial Audio method (stereo(), position(), orientation() and panner())
  • Loader: image resources can now take an array of src urls with different format (preparing for later usage)
  • Math: added a isPowerOfFour() method
  • Renderer: new renderTarget property specifying the default CanvasRenderTarget to use when rendering

Changed

  • Renderer: CanvasTexture is now deprecated and replaced by a new CanvasRenderTarget class

Fixed

  • Core: prevent multiple temporary canvas creation when calling isWebGLSupported multiple times
melonJS - v17.0.0

Published by obiot 8 months ago

Added

  • Sprite: add support for aseprite texture atlas (including animation)
  • Atlas: createSpritefromAnim parameter is now optional, and if not defined will use all defined index in the corresponding atlas
  • Loader: new setOptions method that allows specifying custom settings to be applied to fetch requests (crossOrigin, withCredentials, etc..)

Changed

  • Loader: loader settings such as crossOrigin and withCredentials are now deprecated and have to be set through the setOptions method

Fixed

  • Doc: fix hyperlinks to source code within documentation (thanks @Waltibaba)
  • Loader: fix settings for the fetch request not being applied in ES6 builds (thanks @B0sh)
melonJS - v16.1.3

Published by obiot 8 months ago

Fixed

  • Loader: fix a regression with TMX map loading related to semver version comparison (compare() requires a "x.y.z" version format)
melonJS - v16.1.2

Published by obiot 8 months ago

Fixed

  • Renderable: fix Light2d renderables not always triggering a screen refresh
  • Plugin: fix version comparaison once and for all using the official semver package
melonJS - v16.1.1

Published by obiot 9 months ago

Fixed

  • Loader: fix an issue where some mobile browser (e.g. safari) would not emit the canplay event for video assets if autoplay is disabled
melonJS - v16.1.0

Published by obiot 9 months ago

Added

  • Loader: add support for loading/preloading of HTMLVideoElement
  • Loader: add optional autoplay and loop parameters when [pre]loading audio and video assets (false by default)
  • Sprite: HTMLVideoElement can now be passed as a source when creating Sprite object
melonJS - 16.0.0

Published by obiot 9 months ago

Added

  • Path2d: preliminary SVG path parsing for the Path2D class (WIP)

Changed

  • Chore: update to npm 10, Node.js 20 and friends
  • loader: replaced XHR by Fetch for assets preloading (thanks @Edwardscb)
  • Renderer: fix toBlob, toDataURL and toImageBitmap method signature to better match with the W3C API
melonJS - v15.15.0

Published by obiot 11 months ago

Added

  • Renderable : new parentApp getter that returns the parent application/game instance to which a renderable belongs to.

Fixed

  • ImageLayer: fix a regression when loading a level within a sub container (thanks @rcl)
melonJS - v15.14.0

Published by obiot about 1 year ago

Added

  • loader: prevent loading of previously loaded resources. e.g. duplicated resources across mutliple manifest (thanks @z0mb1)
  • loader: add handling of asset load error, enabling to retry loading failed assets (thanks @z0mb1)

Changed

  • UI: small optimization when rendering BitmapText
melonJS - v15.13.0

Published by obiot about 1 year ago

Changed

  • UI: UITextButton backgroundColor and hoverColor properties are now deprecated in favor of hoverOffColor and hoverOnColor

Fixed

  • UI: fix duplicated text rendering in UITextButton
  • UI: fix an exception when destroying a UITextButton
melonJS - v15.12.0

Published by obiot about 1 year ago

Added

  • Renderer: add proper width and height (getter/setter) properties and deprecate getHeight() and getWidth()

Changed

  • Audio: update howler.js to version 2.2.4
melonJS - v15.11.0

Published by obiot about 1 year ago

  • plugin: the BasePlugin class now holds a reference to the app or game instance that registered the plugin
  • plugin: new plugin.get() method to retrieve a plugin instance by its Class Type or registered name
melonJS - v15.10.0

Published by obiot about 1 year ago

Added

  • utils: new file getPath() method that return the path element of a full file path

Changed

  • Chore: new "docs" directory where production documentation is generated, and properly published using Github Workflows
  • Chore: update NPM dependencies

Fixed

  • Loader: fix the setParser() method not being exported (and therefore preventing from using and setting custom parser)
melonJS - v15.9.2

Published by obiot about 1 year ago

Fixed

  • Renderer: fix the Canvas Renderer setMask() method ignoring the default path when no argument is passed
  • Geometries: fix missing type property for all geometry and use internally for type checking instead of relying on instanceof
melonJS - v15.9.1

Published by obiot about 1 year ago

Fixed

  • Geometry: add default parameters to the Polygon constructor, allowing to instantiate "empty" polygons
  • TMX: fix CanvasRenderer option typo when using TMXLayer pre-rendering option (thanks @0o001)
  • TypeScript: fix missing parameter for setMask() in the parent Renderer class
melonJS - v15.9.0

Published by obiot about 1 year ago

Added

  • Input: new hasActiveEvents returning true if there are any pending events in the queue
  • Input: new hasRegisteredEvents returning true if there are registered pointer event listeners
  • Physic: new WORLD_STEP event emmitted after the builtin physic world has been updated (if enabled)
  • Renderer: fix/enable batching for all ellipse & arc(To) WebGL stroke operations
  • Renderer: the setTransform and transform() methods now also accept individual components to match the CanvasRenderingContext2D API

Fixed

  • Plugin: add missing deprecation warning for plugin.Base (deprecated since [15.1.6] and replaced by BasePlugin)

Changed

  • Physic: split the world update method into a separate step for clearer code when using custom update logic.
melonJS - v15.8.0

Published by obiot about 1 year ago

Added

  • Doc: add proper documentation and example for Renderer drawing-related APIs
  • Physic: new physic flag allowing to disable the builtin physic implementation
  • Renderer: new TextureCanvas invalidate() method to force reuploading the corresponding WebGL Texture

Fixed

  • Doc: fix missing default game application instance
  • Renderer: properly deallocate and reallocate texture unit after a texture deletion in WebGL rendering mode
melonJS - v15.7.0

Published by obiot over 1 year ago

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)
melonJS - v15.6.0

Published by obiot over 1 year ago

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 and stroke)

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 using globalThis.document)
  • Geometry: fix consecutive Path2d line stroke in WebGL mode
Package Rankings
Top 11.32% on Bower.io
Top 2.63% on Npmjs.org
Badges
Extracted from project README
Build Size Tree-shaking NPM Package jsDeliver Boss Bounty Badge Contributor Covenant Free Texture Packer TexturePacker PhysicsEditor ShoeBox Tiled Cordova Spine aseprite Melon Gaming Altbyte Pte Ltd
Related Projects