| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-03-23 | 3.4 kB | |
| v18.1.0 source code.tar.gz | 2026-03-23 | 20.7 MB | |
| v18.1.0 source code.zip | 2026-03-23 | 21.1 MB | |
| Totals: 3 Items | 41.7 MB | 0 | |
What's New in melonJS 18.1.0
New Features
ShaderEffectclass — simplified custom shader API that only requires a fragmentapply(color, uv)function. Vertex shader, uniforms, and texture sampling boilerplate are handled automatically. Silently disabled in Canvas mode.create-melonjsCLI — scaffold a new game project in seconds withnpm create melonjs my-game- Inline source code viewer — examples now have a "Show Code" button to view syntax-highlighted source alongside the running game
- API docs landing page — new home page with quick start, feature overview, and common tasks
- API docs categories — sidebar organized into 14 categories (Rendering, Physics, Input, etc.)
Changed
- Physics — collision response is now mass-proportional; overlap and velocity correction are split based on relative mass
- Entity — deprecated in favor of Sprite/Renderable + Body (#1008)
- Loader — modernized with Promise-based asset loading for improved parallel performance;
onload/onProgress/onErrordeprecated in favor of events - TMX — refactored TMXUtils into reusable
decode.tsandxml.tsmodules - Compositor → Batcher —
Compositor,QuadCompositor,PrimitiveCompositorrenamed toBatcher,QuadBatcher,PrimitiveBatcher(old names still work with deprecation warnings)
Bug Fixes
- Texture cache overflow — flush and rebatch when GPU texture units are exhausted instead of throwing (#1280)
setAntiAlias— now controls GL texture filtering (GL_NEARESTvsGL_LINEAR) on all bound textures (#1279)createPatternleak — clean up previous GPU texture when repeat mode changes (#1278)- Custom shader support — properly flush and restore default shader per draw call, fix
setUniformusing wrong GL program, reset sampler uniform on shader switch - TMX — fix hexagonal
pixelToTileCoordsmutation, canvas memory leak, collision shape dimensions, XML parsing crash, GC pressure from vector allocations - Sprite — fix body-renderable misalignment with trimmed atlas frames, visual vibration on flip, jumping on rotated frames (#1201, [#1214])
- Path2D — fix SVG arc parsing and ellipse rotation (#1198)
- WebGLRenderer — fix polygon corruption from vertex mutation, scissor restore,
drawVerticesvertex count, resizesetAntiAliascorruption - Z-ordering — fix reset during collision response
Performance
- TMX loading — ~20-40% faster via tileset caching, pre-allocated decode buffers, and fast path for base64 data
- WebGL rendering —
fillRect,fillEllipse,fillArc,fillRoundRect,fillPolygonnow generate geometry directly, bypassing path2D and earcut - WebGL batching — quad rendering uses
gl.drawElementswith index buffer (33% less vertex data), redundant sampler calls eliminated, zero-allocation save/restore stacks - Collision — index-based pool access instead of array push/pop in SAT detection
- Container — O(n) accumulator pattern in
getChildByProp/getChildByTypeinstead of O(n²)
Developer Experience
- 74 JSDoc typo and grammar fixes across 32 files
- Coin glow shader example in the platformer demo
- Updated typescript-boilerplate and plugin-template for melonJS 18
- Archived es6-boilerplate with redirect notice
Full Changelog: https://github.com/melonjs/melonJS/compare/18.0.0...18.1.0