Download Latest Version v19.9.0 source code.zip (41.0 MB)
Email in envelope

Get an email when there's a new version of melonJS

Home / 19.7.1
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-06-14 2.7 kB
v19.7.1 source code.tar.gz 2026-06-14 37.4 MB
v19.7.1 source code.zip 2026-06-14 38.1 MB
Totals: 3 Items   75.5 MB 0

What's New

19.7.1 is a focused bug-fix release for the 19.7 line. Three engine bugs and a noise reduction — no breaking changes, no API additions, drop-in upgrade from 19.7.0.

Alongside this release: @melonjs/spine-plugin 3.0.0 ships with Spine 4.3 runtime support, Skeleton.yDown adoption, native WebGL context-loss recovery, and a fully reworked Canvas renderer. The plugin requires melonjs >= 19.7.1 because the blend-cache restore fix below is load-bearing for its lose/restore path.

Bug Fixes

  • WebGL context-restore left blendFunc / blendEquation at driver defaults when the cached blend mode matched the requested one. setBlendMode()'s state cache survived the context loss and short-circuited the re-apply in the webglcontextrestored handler, so scenes using a single blend mode (e.g. all-PMA "normal") rendered transparent texels as opaque black until something else changed the blend mode. The restore handler now invalidates the cache before re-applying. (Surfaced by spine-plugin context-loss verification — 19.6's hardening scenes all happened to change blend modes post-restore, which masked the desync.)
  • UITextButton crashed with TypeError: viewport.isDefault on undefined every draw (#1499, regression introduced with multi-camera support in [#1310] — has been broken for ~3 months / 12 releases). UITextButton.draw()'s super.draw(renderer) chain dropped the viewport argument the post-#1310 Container.draw() requires. Two-sided fix: uitextbutton.ts forwards the viewport, and Container.draw() honors its documented-optional viewport parameter — so any legacy subclass override that chains up with super.draw(renderer) keeps working. Two new test files (tests/uitextbutton.spec.js, tests/ui-interaction.spec.js) pin the unit + integration paths.

Changed

  • Spurious "gpuTilemap is enabled but the active renderer is not WebGL 2" warning at every Application init even when no TMX layer was ever loaded. Relocated to TMXLayer and latched once per session — apps without any tilemap (Spine demos, UI-only scenes, etc.) stay quiet; multi-layer maps see the heads-up once instead of N times.

Docs

  • Fixed matrix3d.ts JSDoc referencing images/glOrtho.gif while the actual asset is lowercase images/glortho.gif — the orthogonal-projection diagram was 404'ing on melonjs.github.io.

Install

:::sh
npm install melonjs@19.7.1

CDN:

:::html
<script type="module" src="https://cdn.jsdelivr.net/npm/melonjs@19/+esm"></script>

🤖 Generated with Claude Code

Source: README.md, updated 2026-06-14