melonJS

a fresh, modern & lightweight HTML5 game engine

MIT License

Downloads
996
Stars
5.7K
Committers
82

Bot releases are hidden (Show)

melonJS - v15.5.0

Published by obiot over 1 year ago

Changed

  • Color: optimize conversion function such as toHex and toUint32
  • 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 extending Sprite and not Renderable
  • Doc: fix missing fillStyle and StrokeStyle properties for Text elements
  • Physic: fix a potential memory leak when recalculating a polygon edges and normals
  • TypeScript: fix missing typings for Vector[2d/3d] x, y and z properties
  • TypeScript: fix typings for Array parameter type
melonJS - v15.4.1

Published by obiot over 1 year ago

Fixed

  • Audio : fix a TypeScript definition issue introduced in the previous version (on the audio init method)
melonJS - v15.4.0

Published by obiot over 1 year ago

Added

  • Application: new pauseOnBlur, resumeOnFocus and stopOnBlur 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 and FOCUS events
  • Device: pauseOnBlur, resumeOnFocus and stopOnBlur 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 preRenderflag 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)
melonJS - v15.3.0

Published by obiot over 1 year ago

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 Color copy 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
melonJS - v15.2.1

Published by obiot over 1 year ago

Fixed

  • TMX: fix a regression with the inflate patch entry point
melonJS - v15.2.0

Published by obiot over 1 year ago

Changed

  • Plugin: the Base plugin class is now deprecated and replaced by BasePlugin (Base is just an alias now)

Fixed

  • Typescript: fix typing for the utils and plugin API
  • Utils: fix "namespace" es6 declaration and export
melonJS - v15.1.6

Published by obiot over 1 year ago

  • TypeScript: fix typings for methods taking a renderable as argument, by enumerating all different class types
melonJS - v15.1.5

Published by obiot over 1 year ago

  • 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
melonJS - v15.1.4

Published by obiot over 1 year ago

Fixed

  • Core: fix a regression with OffscreenCanvas support detection
  • Doc: fix broken hyperlinks in the audio documentation
  • TypeScript: fix documentation and typings for the loader API (thanks @edmundg)
melonJS - v15.1.3

Published by obiot over 1 year ago

  • WebGL: fix a crash when creating/uploading a texture on browser(s) not supporting OffscreenCanvas
melonJS - v15.1.2

Published by obiot over 1 year ago

  • Core: fix detection of OffscreenCanvas support by browser (fix a crash with Waterfront, thanks @fr0st for reporting it)
melonJS - v15.1.1

Published by obiot over 1 year ago

Fixed

  • Container: fix a regression when creating a container with physic bodies, before adding it to the main world container, would throw an exception
melonJS - v15.1.0

Published by obiot over 1 year ago

Added

  • Container: new getRootAncestor() method that returns the root container's parent (aka World Container)
  • Renderer: new toBlob(), toDataURL() and toImageBitmap() methods added to CanvasTexture
  • Renderer: new toBlob(), toDataURL() and toImageBitmap() methods added to all Renderers
  • TMX: add a "patcheable" entry point to allow for a tiled inflate (zlib/gzip/zstd) plugin
  • UI: new draggable feature for UIBaseElement (can be toggled on/off using isDraggable)

Changed

  • Application: the sortOn property is now a proper getter/setter for the App World instance sortOn property
  • Plugin: the 2nd parameter of the register method is now optional and will use the given plugin class name by default

Fixed

  • Renderer: add missing export for the CanvasTexture class
  • UI: fix internal holdTimeout type to integer and properly reset value to -1 when a timer is cleared
  • UI: UITextButton now properly use the given alpha value of the given background and hover color
  • UI: cleaned-up the UITextButton implementation, and added proper documentation for UITextButton specific properties
  • WebGL: fix a Type Error exception with the latest version of Safari when using OffscreenCanvas element as a texture source
melonJS - v15.0.0

Published by obiot over 1 year ago

Added

  • Renderer: enable batch drawing for rectangle and polygon based primitive shapes
  • Renderer: new base Compositor class that can be extended to create custom WebGL compositors
  • Renderable: custom shader can now be set per renderable through a new shader property (experimental feature)

Changed

  • Core: remove remaining polyfills related to pre-ECMAScript 2015 features (as melonJS 2 implementation base is now 100% ES6)
  • Renderer: refactoring of the WebGLCompositor into a QuadCompositor and PrimitiveCompitor for Quad and Primitive composition
  • Renderer: the vertex shader now takes a color attributes (as opposed to using an uniform in previous version)
  • Renderer: attributes and default shader "definitions" for WebGL Compositor(s) are now directly passed through the constructor
  • Text: Text object now use offscreen canvas by default to render text (this has been in beta for almost 2 years)
  • Text: setting lineWidth to a value greater than 0 will now automatically stroke the text
  • Text: drawStroke() is now deprecated in favour of the lineWidth property

Fixed

  • Geometry: fix arcTo() drawing a "looping" line between the start and end angle
  • Input: fix device.touch wrongly returning true on non-touch devices
  • Renderer: fix binding of active shader when switching compositor
  • Renderer: fix a TypeError exception on Safari Technology Preview
  • Text: restore the text Stroke feature (was broken since a couple of releases)
melonJS - v14.5.0

Published by obiot over 1 year ago

Added

  • Bounds: add a centerOn method similarly to other base geometry objects
  • ImageLayer: enable blend mode for ImageLayer renderable objects
  • Sprite: sprites now "flip" (see flip[X/Y] methods) properly around their default anchor point

Changed

  • Loader: partial refactoring of the preloader to be more es6 compliant and fix circular dependencies with other modules/classes
  • Pool: simplified and optimized the pool pull method
  • Sprite: optimized flip[X/Y] operations by using the sprite own transform matrix instead of manipulating the renderer at draw time
  • Renderer: optimized access to cached textures, especially when using multiple atlases
  • Renderer: Path2D now uses Point internally (instead of Vector2d) which is a much more simple object
  • Renderer: optimize Path2D triangulation

Fixed

  • Core: fix "global" exposed properties being read-only after refactoring to ES6
  • Geometry: fix corresponing bounds not being properly updated when setting center[X/Y] or calling centerOn().
  • Input: fix a regression with pointer detection on transformed Renderable object
  • Renderable: fix a regression with Bounds position being off after applying a transformation
  • Sprite: fix setRegion() being called at every update for non-animated sprites
  • Tiled: fix format deprecation warning if map was not created with Tiled and format version is not available
melonJS - v14.4.0

Published by obiot almost 2 years ago

Added

  • Tiled: add support for the .tmj and .tsj extension (JSON)
  • Tiled: add support for Infinite map (Tiled chunks based map format)

Changed

  • Tiled: warn about map version 1.4 and below being deprecated (terrain was replaced by wangset tiles since version 1.5)

Fixed

  • Physic: fix a regression with the collision.rayCast() function (thanks @cpravetz)
  • Tiled: fix a cannot recycle exception when rendering hexagonal maps
melonJS - v14.3.0

Published by obiot almost 2 years ago

Added

  • Core: its now possible to specify a custom renderer (that extends the default Renderer class)

Changed

  • General: further code revamping to make melonJS more modular and allow instantiation of different app/games
  • Physic: new Detector class instantiated by each physic world instance to detect and solve collisions

Fixed

  • Core: fix missing TS definitions when publishing on NPM (following changes in #1162)
  • Doc: fix fps type in the World class
melonJS - v14.2.0

Published by obiot almost 2 years ago

Added

  • Core: add a tsconfig file for types generation and properly enable type suggestions (thanks @lartkma)

Changed

  • Utils: move getPixels() as getImageData() under the CanvasTexture object

Fixed

  • Core: fix an uncaught exception (again) when using melonJS with parcel (thanks @infamoustrey)
  • Core: fix further global reference to document (i.e. refer to globalThis instead of implicitely using window)
  • Core: fix more circular dependencies
melonJS - v14.1.1

Published by obiot almost 2 years ago

Fixed

  • Core: disable tree-shaking for now, as it is causing exception with the boilerplate
  • ES6: use proper semantic when exporting default classes
  • Physic: fix a regression in the quadtree implementation that was causing issues with some collision detection edge case
melonJS - v14.1.0

Published by obiot almost 2 years ago

Added

  • Core: the build process has been upgraded to rollup 3 and Node 19
  • Core: the build process will now only output a tree-shakeable ES Module directory melonjs.mjs
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