melonjs 20.1.0 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/application/settings.d.ts +3 -2
- package/build/application/settings.d.ts.map +1 -1
- package/build/index.js +1399 -229
- package/build/index.js.map +4 -4
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +17 -1
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +81 -3
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +62 -1
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +50 -7
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/renderable/container.d.ts +10 -0
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +10 -0
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts +20 -2
- package/build/renderable/frameAnimation.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +106 -22
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/system/timer.d.ts.map +1 -1
- package/build/video/blendmodes.d.ts +107 -0
- package/build/video/blendmodes.d.ts.map +1 -0
- package/build/video/canvas/canvas_renderer.d.ts +28 -24
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/effects/blendEffect.d.ts +57 -0
- package/build/video/effects/blendEffect.d.ts.map +1 -0
- package/build/video/renderer.d.ts +3 -4
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +1 -0
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/utils/program.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +116 -29
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/quad_batcher.d.ts +7 -0
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/cache.d.ts +0 -9
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +100 -6
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Graphics
|
|
|
51
51
|
- Extensible batcher system for custom rendering pipelines, with backend-neutral vertex formats and draw topologies (declare a layout once, describe it to either GPU backend)
|
|
52
52
|
- High DPI resolution & Canvas advanced auto scaling
|
|
53
53
|
- Sprite with 9-slice scaling option and frame animation
|
|
54
|
-
- Built-in effects such as tinting, masking, and CSS-style blend modes (normal, none, additive, multiply, screen, darken, lighten)
|
|
54
|
+
- Built-in effects such as tinting, masking, and the full set of CSS-style blend modes (normal, none, additive, multiply, screen, exclusion, darken, lighten, overlay, hard-light, color-dodge, color-burn, soft-light, difference) — all of them supported identically on WebGPU, WebGL 2 and Canvas since 20.2
|
|
55
55
|
- Standard spritesheet, single and multiple Packed Textures support
|
|
56
56
|
- Compressed texture support (DDS, KTX, KTX2, PVR, PKM) with automatic format detection and fallback
|
|
57
57
|
- Hardware antialiasing (`antiAlias: true`) on both GPU backends — and it survives post-processing, since the offscreen targets a post-effect chain renders into are multisampled to match
|
|
@@ -138,7 +138,7 @@ Core
|
|
|
138
138
|
- Tween effects with multiple easing functions (Quadratic, Cubic, Elastic, Bounce, etc.) and Bezier/Catmull-Rom interpolation
|
|
139
139
|
- Transition effects
|
|
140
140
|
- Pooling support for object recycling
|
|
141
|
-
- Particle system with `ParticleEmitter` (emission rate, lifetime, velocity, gravity, blend modes)
|
|
141
|
+
- Particle system with `ParticleEmitter` (emission rate, lifetime, velocity, gravity, blend modes), and a reference space so particles can be measured from the emitter, from the world, or from any container — a moving emitter leaves a trail instead of dragging its cloud along
|
|
142
142
|
- EventEmitter based event system
|
|
143
143
|
- Persistent data storage (save/load via localStorage)
|
|
144
144
|
- Plugin system for extending engine capabilities
|
|
@@ -8,7 +8,7 @@ import { PhysicsAdapter } from "../physics/adapter";
|
|
|
8
8
|
import Renderer from "../video/renderer";
|
|
9
9
|
import { WebGLBatcher } from "../video/webgl/batchers/batcher.js";
|
|
10
10
|
import { ScaleMethod } from "./scaleMethods";
|
|
11
|
-
type BlendMode = "normal" | "multiply" | "lighter" | "additive" | "screen" | "darken" | "lighten" | "exclusion" | "none";
|
|
11
|
+
type BlendMode = "normal" | "multiply" | "lighter" | "additive" | "screen" | "darken" | "lighten" | "exclusion" | "none" | "overlay" | "hard-light" | "color-dodge" | "color-burn" | "soft-light" | "difference";
|
|
12
12
|
/**
|
|
13
13
|
* How the application's physics is configured.
|
|
14
14
|
*
|
|
@@ -207,7 +207,8 @@ export type ApplicationSettings = {
|
|
|
207
207
|
*/
|
|
208
208
|
consoleHeader: boolean;
|
|
209
209
|
/**
|
|
210
|
-
* the default blend mode to use
|
|
210
|
+
* the default blend mode to use. Every renderer supports the full set —
|
|
211
|
+
* see {@link CanvasRenderer#setBlendMode} for the list.
|
|
211
212
|
* @default "normal"
|
|
212
213
|
*/
|
|
213
214
|
blendMode: BlendMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/application/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAA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