Skip to content

v18.0.0

Choose a tag to compare

@github-actions github-actions released this 10 Mar 07:46
· 434 commits to master since this release

What's New in melonJS 18.0.0

New Features

  • Color constructor — now also accepts another Color object as parameter
  • Renderer — new backgroundColor property for clearing background between frames
  • Pool system — new type-safe createPool() API with improved performance; destroy renamed to release

Changed

  • Build system — replaced rollup with esbuild (@hornta)
  • Documentation — replaced webdoc with typedoc (@hornta)
  • Test framework — replaced mocha and puppeteer with vitest in browser mode (@hornta)
  • TypeScript — extensive conversion across the codebase: color, math, geometry, platform, DOM, keyboard, timer, application settings, pool, and more (@hornta)
  • Monorepo — migrated to pnpm workspaces with turbo (@hornta)
  • RenderableanchorPoint now uses the lighter ObservablePoint class instead of ObservableVector2d
  • Math — namespace Math is now deprecated and renamed to math for consistency
  • Deprecated API removal — all classes and methods deprecated since version 15 and lower have been removed (see Upgrade Guide)

Bug Fixes

  • Body — fix setCollisionType() not accepting numeric values; fix setVertices() fallback creating Point instead of Polygon
  • Camera — fix moveTo() upper bound clamping; fix focusOn() double-counting position
  • Container — fix addChildAt() rejecting valid index; fix getNextChild() returning wrong child; fix removeChildNow() crash when not attached to root
  • Physics — fix collision response velocity projection; fix shapes tunneling through polyline junctions; fix persistence for child bodies during reset (@Vareniel); fix step() crash with undefined ancestor
  • Renderable — fix Light2D color blending in Canvas mode (@Vareniel)
  • CanvasRenderTarget — fix arguments passed to convertToBlob() (@hornta)
  • TypeScript — fix missing OffscreenCanvas type for TextureAtlas constructor
  • Video — fix implicit global reference to HTMLVideoElement
  • Docs — fix floating default shown for UI elements (@SergioChan)

Performance

  • Collision — pre-built SAT function dispatch lookup table; reduced hot path overhead
  • Container — cache camera references outside per-child update loop
  • Physics — reduced iteration overhead in world.step()
  • QuadTree — reduced array allocations in retrieve() and insert()
  • Observable vectors — rewritten for better performance
  • Color — faster clone() method
  • Pool — optimized implementation

New Contributors

Full Changelog: 17.4.0...18.0.0