melonjs 20.11.0 → 20.13.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 +3 -1
- package/build/application/application.d.ts.map +1 -1
- package/build/application/settings.d.ts +6 -2
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/backend/sound.d.ts.map +1 -1
- package/build/audio/playback.d.ts.map +1 -1
- package/build/audio/spatial.d.ts +13 -2
- package/build/audio/spatial.d.ts.map +1 -1
- package/build/audio/types.d.ts +25 -3
- package/build/audio/types.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +2 -0
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts.map +1 -1
- package/build/camera/effects/fade_effect.d.ts.map +1 -1
- package/build/camera/effects/pixelate_transition_effect.d.ts +67 -0
- package/build/camera/effects/pixelate_transition_effect.d.ts.map +1 -0
- package/build/geometries/ellipse.d.ts +11 -4
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/line.d.ts +2 -2
- package/build/geometries/line.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +5 -4
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/rectangle.d.ts +2 -2
- package/build/geometries/rectangle.d.ts.map +1 -1
- package/build/geometries/roundrect.d.ts +2 -2
- package/build/geometries/roundrect.d.ts.map +1 -1
- package/build/index.d.ts +14 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +12716 -7233
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/lang/console.d.ts +16 -1
- package/build/lang/console.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +48 -14
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +1 -1
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
- package/build/loader/loader.d.ts +55 -11
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/math.d.ts +6 -1
- package/build/math/math.d.ts.map +1 -1
- package/build/math/matrix2d.d.ts +3 -2
- package/build/math/matrix2d.d.ts.map +1 -1
- package/build/math/matrix3d.d.ts +4 -1
- package/build/math/matrix3d.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +6 -6
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +8 -8
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +15 -3
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +6 -0
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +22 -5
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/bounds.d.ts +5 -5
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +15 -4
- package/build/physics/builtin/body.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/physics/builtin/raycast.d.ts.map +1 -1
- package/build/physics/world.d.ts.map +1 -1
- package/build/renderable/animation.d.ts +6 -1
- package/build/renderable/animation.d.ts.map +1 -1
- package/build/renderable/container.d.ts +40 -6
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +8 -2
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +12 -3
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +147 -4
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +10 -2
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/text/textstyle.d.ts.map +1 -1
- package/build/renderable/trail3d.d.ts.map +1 -1
- package/build/renderable/ui/panelpaint.d.ts +5 -1
- package/build/renderable/ui/panelpaint.d.ts.map +1 -1
- package/build/renderable/ui/progressbar.d.ts +267 -95
- package/build/renderable/ui/progressbar.d.ts.map +1 -1
- package/build/renderable/ui/uibaseelement.d.ts +436 -50
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uicheckbox.d.ts +383 -0
- package/build/renderable/ui/uicheckbox.d.ts.map +1 -0
- package/build/renderable/ui/uifocus.d.ts +6 -0
- package/build/renderable/ui/uifocus.d.ts.map +1 -0
- package/build/renderable/ui/uilabel.d.ts +31 -0
- package/build/renderable/ui/uilabel.d.ts.map +1 -0
- package/build/renderable/ui/uipanel.d.ts +589 -116
- package/build/renderable/ui/uipanel.d.ts.map +1 -1
- package/build/renderable/ui/uiskin.d.ts +25 -0
- package/build/renderable/ui/uiskin.d.ts.map +1 -0
- package/build/renderable/ui/uislider.d.ts +518 -0
- package/build/renderable/ui/uislider.d.ts.map +1 -0
- package/build/renderable/ui/uispriteelement.d.ts +161 -85
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/renderable/ui/uitextbutton.d.ts +369 -63
- package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
- package/build/state/stage.d.ts +3 -2
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts +31 -6
- package/build/state/state.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/pool.d.ts.map +1 -1
- package/build/system/save.d.ts +2 -1
- package/build/system/save.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +5 -2
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/fetchdata.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +1 -5
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/effects/bloom.d.ts +3 -2
- package/build/video/effects/bloom.d.ts.map +1 -1
- package/build/video/effects/blur.d.ts +1 -1
- package/build/video/effects/chromaticAberration.d.ts +1 -1
- package/build/video/effects/dissolve.d.ts.map +1 -1
- package/build/video/effects/dropShadow.d.ts +1 -1
- package/build/video/effects/glow.d.ts +1 -1
- package/build/video/effects/glsl_realization.d.ts.map +1 -1
- package/build/video/effects/hologram.d.ts.map +1 -1
- package/build/video/effects/local_space.d.ts +19 -0
- package/build/video/effects/local_space.d.ts.map +1 -0
- package/build/video/effects/mesh_splice.d.ts.map +1 -1
- package/build/video/effects/outline.d.ts +1 -1
- package/build/video/effects/pixelate.d.ts +1 -1
- package/build/video/effects/radialGradient.d.ts +4 -12
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/scanline.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts.map +1 -1
- package/build/video/effects/shine.d.ts +5 -0
- package/build/video/effects/shine.d.ts.map +1 -1
- package/build/video/effects/sway.d.ts +9 -4
- package/build/video/effects/sway.d.ts.map +1 -1
- package/build/video/effects/vignette.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +9 -7
- package/build/video/effects/wave.d.ts.map +1 -1
- package/build/video/effects/wgsl/parse.d.ts.map +1 -1
- package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
- package/build/video/effects/wgsl_realization.d.ts.map +1 -1
- package/build/video/renderer.d.ts +22 -5
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +26 -3
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +1 -0
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +31 -31
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/utils/pixel_snap.d.ts +44 -0
- package/build/video/utils/pixel_snap.d.ts.map +1 -0
- package/build/video/utils/tessellation.d.ts +11 -0
- package/build/video/utils/tessellation.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +2 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +3 -6
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +0 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/effect_binding.d.ts.map +1 -1
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +6 -10
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/AGENTS.md +2 -1
- package/skills/melonjs/SKILL.md +3 -2
- package/skills/melonjs-audio/SKILL.md +31 -8
- package/skills/melonjs-camera-and-drawing/SKILL.md +41 -1
- package/skills/melonjs-display-and-scaling/SKILL.md +19 -5
- package/skills/melonjs-effects-and-shaders/SKILL.md +53 -17
- package/skills/melonjs-events/SKILL.md +3 -1
- package/skills/melonjs-getting-started/SKILL.md +1 -2
- package/skills/melonjs-input/SKILL.md +61 -3
- package/skills/melonjs-lighting/SKILL.md +4 -3
- package/skills/melonjs-loading-assets/SKILL.md +57 -15
- package/skills/melonjs-math/SKILL.md +14 -3
- package/skills/melonjs-particles-and-trails/SKILL.md +72 -8
- package/skills/melonjs-performance/SKILL.md +3 -0
- package/skills/melonjs-physics/SKILL.md +53 -4
- package/skills/melonjs-plugins/SKILL.md +25 -1
- package/skills/melonjs-renderables/SKILL.md +11 -3
- package/skills/melonjs-renderer-backends/SKILL.md +2 -2
- package/skills/melonjs-scenes-and-state/SKILL.md +32 -2
- package/skills/melonjs-sprites-and-animation/SKILL.md +14 -0
- package/skills/melonjs-tilemaps/SKILL.md +96 -2
- package/skills/melonjs-ui-and-text/SKILL.md +560 -23
|
@@ -143,36 +143,6 @@ export class TextureAtlas extends Texture2d {
|
|
|
143
143
|
* );
|
|
144
144
|
*/
|
|
145
145
|
createSpriteFromName(name: string, settings?: object, nineSlice?: boolean): Sprite | NineSliceSprite;
|
|
146
|
-
/**
|
|
147
|
-
* Create an animation object using the first region found using all specified names
|
|
148
|
-
* @param {string[]|number[]} [names] - list of names for each sprite (if not specified all defined names/entries in the atlas will be added)
|
|
149
|
-
* (when manually creating a Texture out of a spritesheet, only numeric values are authorized)
|
|
150
|
-
* @param {object} [settings] - Additional settings passed to the {@link Sprite} contructor
|
|
151
|
-
* @returns {Sprite}
|
|
152
|
-
* @example
|
|
153
|
-
* // create a new texture object under the `game` namespace
|
|
154
|
-
* game.texture = new me.TextureAtlas(
|
|
155
|
-
* me.loader.getJSON("texture"),
|
|
156
|
-
* me.loader.getImage("texture")
|
|
157
|
-
* );
|
|
158
|
-
*
|
|
159
|
-
* // create a new Animated Sprite
|
|
160
|
-
* let sprite = game.texture.createAnimationFromName([
|
|
161
|
-
* "walk0001.png", "walk0002.png", "walk0003.png",
|
|
162
|
-
* "walk0004.png", "walk0005.png", "walk0006.png",
|
|
163
|
-
* "walk0007.png", "walk0008.png", "walk0009.png",
|
|
164
|
-
* "walk0010.png", "walk0011.png"
|
|
165
|
-
* ]);
|
|
166
|
-
*
|
|
167
|
-
* // define an additional basic walking animation
|
|
168
|
-
* sprite.addAnimation ("simple_walk", [0,2,1]);
|
|
169
|
-
* // you can also use frame name to define your animation
|
|
170
|
-
* sprite.addAnimation ("speed_walk", ["walk0007.png", "walk0008.png", "walk0009.png", "walk0010.png"]);
|
|
171
|
-
* // set the default animation
|
|
172
|
-
* sprite.setCurrentAnimation("simple_walk");
|
|
173
|
-
* // set the renderable position to bottom center
|
|
174
|
-
* sprite.anchorPoint.set(0.5, 1.0);
|
|
175
|
-
*/
|
|
176
146
|
/**
|
|
177
147
|
* Return the Sprite settings object (framewidth, frameheight, atlas, atlasIndices, etc.)
|
|
178
148
|
* for the given set of atlas frame names. This is useful when extending {@link Sprite}
|
|
@@ -209,7 +179,37 @@ export class TextureAtlas extends Texture2d {
|
|
|
209
179
|
} | undefined;
|
|
210
180
|
atlasIndices: Record<string, number>;
|
|
211
181
|
};
|
|
212
|
-
|
|
182
|
+
/**
|
|
183
|
+
* Create an animation object using the first region found using all specified names
|
|
184
|
+
* @param {string[]|number[]} [names] - list of names for each sprite (if not specified all defined names/entries in the atlas will be added)
|
|
185
|
+
* (when manually creating a Texture out of a spritesheet, only numeric values are authorized)
|
|
186
|
+
* @param {object} [settings] - Additional settings passed to the {@link Sprite} constructor
|
|
187
|
+
* @returns {Sprite}
|
|
188
|
+
* @example
|
|
189
|
+
* // create a new texture object under the `game` namespace
|
|
190
|
+
* game.texture = new me.TextureAtlas(
|
|
191
|
+
* me.loader.getJSON("texture"),
|
|
192
|
+
* me.loader.getImage("texture")
|
|
193
|
+
* );
|
|
194
|
+
*
|
|
195
|
+
* // create a new Animated Sprite
|
|
196
|
+
* let sprite = game.texture.createAnimationFromName([
|
|
197
|
+
* "walk0001.png", "walk0002.png", "walk0003.png",
|
|
198
|
+
* "walk0004.png", "walk0005.png", "walk0006.png",
|
|
199
|
+
* "walk0007.png", "walk0008.png", "walk0009.png",
|
|
200
|
+
* "walk0010.png", "walk0011.png"
|
|
201
|
+
* ]);
|
|
202
|
+
*
|
|
203
|
+
* // define an additional basic walking animation
|
|
204
|
+
* sprite.addAnimation ("simple_walk", [0,2,1]);
|
|
205
|
+
* // you can also use frame name to define your animation
|
|
206
|
+
* sprite.addAnimation ("speed_walk", ["walk0007.png", "walk0008.png", "walk0009.png", "walk0010.png"]);
|
|
207
|
+
* // set the default animation
|
|
208
|
+
* sprite.setCurrentAnimation("simple_walk");
|
|
209
|
+
* // set the renderable position to bottom center
|
|
210
|
+
* sprite.anchorPoint.set(0.5, 1.0);
|
|
211
|
+
*/
|
|
212
|
+
createAnimationFromName(names?: string[] | number[], settings?: object): Sprite;
|
|
213
213
|
}
|
|
214
214
|
import Texture2d from "./texture2d.ts";
|
|
215
215
|
import type { CompressedImage } from "../../loader/parsers/compressed_textures/compressed_image.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AAkDA;;;GAGG;AAEH;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;EAoBC;AAED;;;;GAIG;AACH,+FAYC;AAED;;;;;;;;;;GAUG;AACH;IAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,qBAjCW,MAAM,GAAC,MAAM,EAAE,QACf,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,eAAe,GAAC,MAAM,GAAC,eAAe,EAAE,GAAC,gBAAgB,EAAE,GAAC,iBAAiB,EAAE,GAAC,MAAM,EAAE,YAC3I,OAAO,GAAC,MAAM,EAwQxB;IAlOA;;;;OAIG;IACH,sBAAkB;IAElB;;;;;OAKG;IACH,uBAAwB;IAExB;;;;;;;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AA8B;4BADrB,uCAAuC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The correction that puts a draw on whole pixels: each output coordinate
|
|
3
|
+
* `x` becomes `kx * x + ox`, and `y` becomes `ky * y + oy`.
|
|
4
|
+
*
|
|
5
|
+
* The transform maps the draw's local space to the renderer's:
|
|
6
|
+
* `x' = a * x + c * y + e`, `y' = b * x + d * y + f`.
|
|
7
|
+
* @ignore
|
|
8
|
+
* @param {number} a - transform, x scale
|
|
9
|
+
* @param {number} b - transform, y skew
|
|
10
|
+
* @param {number} c - transform, x skew
|
|
11
|
+
* @param {number} d - transform, y scale
|
|
12
|
+
* @param {number} e - transform, x translation
|
|
13
|
+
* @param {number} f - transform, y translation
|
|
14
|
+
* @param {number} x - the local box the draw covers
|
|
15
|
+
* @param {number} y - the local box the draw covers
|
|
16
|
+
* @param {number} w - the local box the draw covers
|
|
17
|
+
* @param {number} h - the local box the draw covers
|
|
18
|
+
* @param {number} [pad=0] - added around the box on every side, in local
|
|
19
|
+
* units: half the line width of a stroke, whose ink reaches past its path
|
|
20
|
+
* @returns {Float64Array|null} `[kx, ox, ky, oy]`, valid until the next call,
|
|
21
|
+
* or null when the draw is already on whole pixels or cannot be snapped
|
|
22
|
+
*/
|
|
23
|
+
export function pixelSnap(a: number, b: number, c: number, d: number, e: number, f: number, x: number, y: number, w: number, h: number, pad?: number): Float64Array | null;
|
|
24
|
+
/**
|
|
25
|
+
* Whether a `Matrix3d` is a 2D transform: x and y out depend on x and y in
|
|
26
|
+
* only, with no perspective. A `Camera3d` view is not.
|
|
27
|
+
* @ignore
|
|
28
|
+
* @param {Float32Array|number[]} v - the matrix values, column-major
|
|
29
|
+
* @returns {boolean}
|
|
30
|
+
*/
|
|
31
|
+
export function is2dTransform(v: Float32Array | number[]): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The box around a list of points: the one a polygon covers, taken from the
|
|
34
|
+
* points it draws rather than from bounds that could be stale (a point moved
|
|
35
|
+
* without `recalc()`), since a draw is stretched to fit its box.
|
|
36
|
+
* @ignore
|
|
37
|
+
* @param {Array<{x: number, y: number}>} points - the points
|
|
38
|
+
* @returns {Float64Array} `[x, y, w, h]`, valid until the next call
|
|
39
|
+
*/
|
|
40
|
+
export function pointsBox(points: Array<{
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
}>): Float64Array;
|
|
44
|
+
//# sourceMappingURL=pixel_snap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixel_snap.d.ts","sourceRoot":"","sources":["../../../src/video/utils/pixel_snap.js"],"names":[],"mappings":"AAqDA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,6BAfW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QACN,MAAM,GAEJ,YAAY,GAAC,IAAI,CA0C7B;AAED;;;;;;GAMG;AACH,iCAHW,YAAY,GAAC,MAAM,EAAE,GACnB,OAAO,CAanB;AAKD;;;;;;;GAOG;AACH,kCAHW,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,GAC3B,YAAY,CA2BxB"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The angle an arc from `start` to `end` turns through, read the way
|
|
3
|
+
* `CanvasRenderingContext2D.arc` reads its angles: an end before the start
|
|
4
|
+
* wraps round (`end + 2π`), and a span of 2π or more in the arc's own direction
|
|
5
|
+
* is the whole circle, never more.
|
|
6
|
+
* @param {number} start - start angle in radians
|
|
7
|
+
* @param {number} end - end angle in radians
|
|
8
|
+
* @param {boolean} [antiClockwise=false] - the arc runs anticlockwise
|
|
9
|
+
* @returns {number} the angle covered, in `[0, 2π]` (0 when nothing is drawn)
|
|
10
|
+
*/
|
|
11
|
+
export function arcSweep(start: number, end: number, antiClockwise?: boolean): number;
|
|
1
12
|
/**
|
|
2
13
|
* Generate triangle fan vertices for arcs, ellipses, and rounded rect corners.
|
|
3
14
|
* @param {number} cx - center x
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tessellation.d.ts","sourceRoot":"","sources":["../../../src/video/utils/tessellation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tessellation.d.ts","sourceRoot":"","sources":["../../../src/video/utils/tessellation.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,gCALW,MAAM,OACN,MAAM,kBACN,OAAO,GACL,MAAM,CAalB;AAED;;;;;;;;;;GAUG;AACH,wCATW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,cACN,MAAM,YACN,MAAM,YACN,MAAM,GACJ,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CA0BzC;AAED;;;;;GAKG;AACH,6CAJW,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,UAC7B,MAAM,GACJ,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAsBzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit_quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_quad_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lit_quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_quad_batcher.js"],"names":[],"mappings":"AAsBA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;IAsFE;;;;;;;OAOG;IACH,6GAAiD;IAEjD;;;;;;;;OAQG;IACH,0CAAmD;IAoBnD,2CAAiD;IAEjD;;;;;;;;OAQG;IACH,2GAA4B;IAC5B;;;OAGG;IACH,iBAAoB;IAEpB;;;OAGG;IACH,gCAAoB;IACpB;;;OAGG;IACH,+BAA4B;IAuB5B,qCAIC;IACD;;;OAGG;IACH,wBAA8B;IAW7B,kEAEC;IAsCH;;;;;;;;;;;;;;OAcG;IACH,wBAQC;IAED;;;;;OAKG;IACH,sBAFW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAaxE;IAiFD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2BANG;QAA+B,SAAS,EAAhC,YAAY;QACW,MAAM,EAA7B,YAAY;QACY,OAAO;QACd,KAAK,EAAtB,MAAM;QACc,OAAO;KACrC,QAMA;IAED;;;;;;;;;OASG;IACH,qBAHW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAC9D,MAAM,QAqChB;IAED;;;;;;;;;;OAUG;IACH,yBAJW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAcxE;IAED;;;;;;;;;;;;;;OAcG;IACH,6BALW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAC5D,MAAM,CAuClB;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAbW,YAAY,KACZ,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,cACP,gBAAgB,GAAC,iBAAiB,GAAC,IAAI,QAiIjD;CAiFD;wBA1vBuB,mBAAmB;kCADT,qBAAqB;yBAT9B,2BAA2B;kCAoBrB,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/mesh_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/mesh_batcher.js"],"names":[],"mappings":"AAiGA;;;;;;;;;;;;;;;;;;;;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;;OAIG;IACH,4BAOC;IAED;;;;;OAKG;IACH,sBAJW,MAAM,QAWhB;IAED;;;;OAIG;IACH,2BAMC;IAED;;;;;;;;;;;;OAYG;IACH,gCAJW,QAAQ,QAsBlB;IAED,mEAmIC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAbW,MAAM,YACN,YAAY,cAGZ,YAAY,GAKV,MAAM,CA2MlB;IAED;;;;;;;;OAQG;IACH,sBAJW,MAAM,QAYhB;IAED,oCA0BC;IAED;;;;;;;;OAQG;IACH,sBANW,MAAM,QACN,MAAM,UACN,MAAM,QAsFhB;CACD;gCAh/D+B,uBAAuB;6BAR1B,gCAAgC;yBAhBpC,2BAA2B;qBAkB/B,gBAAgB"}
|
|
@@ -29,8 +29,9 @@ export default class QuadBatcher extends MaterialBatcher {
|
|
|
29
29
|
* @param {number} width - destination width
|
|
30
30
|
* @param {number} height - destination height
|
|
31
31
|
* @param {GLShader|ShaderEffect} shader - the shader effect to apply
|
|
32
|
+
* @param {number} [alpha=1] - the opacity to composite at (0.0 to 1.0)
|
|
32
33
|
*/
|
|
33
|
-
blitTexture(source: WebGLTexture, x: number, y: number, width: number, height: number, shader: GLShader | ShaderEffect): void;
|
|
34
|
+
blitTexture(source: WebGLTexture, x: number, y: number, width: number, height: number, shader: GLShader | ShaderEffect, alpha?: number): void;
|
|
34
35
|
/**
|
|
35
36
|
* Add a textured quad
|
|
36
37
|
* @param {TextureAtlas} texture - Source texture atlas
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/quad_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/quad_batcher.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AAEH;;;;GAIG;AACH;IACC;;;;OAIG;IACH,0BAoEC;IAnEA;;;;;OAKG;IAMH,qCAA4C;IA8C5C;;;;;;OAMG;IACH,qCAA2B;IAK5B;;;;;OAKG;IACH,0BAmBC;IAED;;;;;OAKG;IACH,0BAIC;IAED;;;;;;;;;OASG;IACH,uBAuBC;IAXA;;;;OAIG;IACH,iBAAuB;IACvB;;;OAGG;IACH,uBAA+B;IAGhC;;;;;;;OAOG;IACH,kBAFW,QAAQ,GAAC,YAAY,QAK/B;IAyDD;;;;;;;;;;;OAWG;IACH,oBARW,YAAY,KACZ,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,UACN,QAAQ,GAAC,YAAY,UACrB,MAAM,QAmFhB;IAED;;;;;;;;;;;;;OAaG;IACH,iBAZW,YAAY,KACZ,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,QAiGjB;CACD;gCA3b+B,uBAAuB;0BAW9B,gBAAgB;8BACZ,+BAA+B;kCAF7B,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgl/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IACC;;OAEG;IACH,sBAFW,aAAa,EA0CvB;IAvCA,wBAAwB;IACxB,0BAAqB;IAUrB,iBAKC;IAMD,yBAA0B;IAI1B,2BAA4B;IAG5B;;;OAGG;IACH,+BAA8B;IAC9B;;;OAGG;IACH,+BAA8B;IAG/B;;;;;;OAMG;IACH,cAiCC;IAED;;;;;;;;;;;OAWG;IACH,eAIC;IAED;;;;;;;;;;OAUG;IACH,eAMC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gCARW,MAAM,aACN,MAAM,GAEJ;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,UAAU,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,GAAC,SAAS,CAiDhD;IAED;;;;;;OAMG;IACH,oBALW,QAAQ,GACN,qBAAqB,CA+BjC;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,
|
|
1
|
+
{"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgl/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IACC;;OAEG;IACH,sBAFW,aAAa,EA0CvB;IAvCA,wBAAwB;IACxB,0BAAqB;IAUrB,iBAKC;IAMD,yBAA0B;IAI1B,2BAA4B;IAG5B;;;OAGG;IACH,+BAA8B;IAC9B;;;OAGG;IACH,+BAA8B;IAG/B;;;;;;OAMG;IACH,cAiCC;IAED;;;;;;;;;;;OAWG;IACH,eAIC;IAED;;;;;;;;;;OAUG;IACH,eAMC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gCARW,MAAM,aACN,MAAM,GAEJ;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,UAAU,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,GAAC,SAAS,CAiDhD;IAED;;;;;;OAMG;IACH,oBALW,QAAQ,GACN,qBAAqB,CA+BjC;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QAkLhB;CACD;8CA5b4C,yBAAyB;qBAPjD,mBAAmB;sCADF,8BAA8B;yCAO5B,qCAAqC"}
|
|
@@ -360,11 +360,6 @@ export default class WebGLRenderer extends Renderer {
|
|
|
360
360
|
*/
|
|
361
361
|
setBlendMode(mode?: string, premultipliedAlpha?: boolean): string;
|
|
362
362
|
currentPremultipliedAlpha: any;
|
|
363
|
-
/**
|
|
364
|
-
* Return the global alpha
|
|
365
|
-
* @returns {number} global alpha value
|
|
366
|
-
*/
|
|
367
|
-
getGlobalAlpha(): number;
|
|
368
363
|
/**
|
|
369
364
|
* Stroke an arc at the specified coordinates with given radius, start and end points
|
|
370
365
|
* @param {number} x - arc center point x-axis
|
|
@@ -377,7 +372,9 @@ export default class WebGLRenderer extends Renderer {
|
|
|
377
372
|
*/
|
|
378
373
|
strokeArc(x: number, y: number, radius: number, start: number, end: number, antiClockwise?: boolean, fill?: boolean): void;
|
|
379
374
|
/**
|
|
380
|
-
* Fill an arc at the specified coordinates with given radius, start and end points
|
|
375
|
+
* Fill an arc at the specified coordinates with given radius, start and end points.
|
|
376
|
+
* The angles are read like `CanvasRenderingContext2D.arc`: an end before
|
|
377
|
+
* the start wraps round, and a span of 2π or more is the whole circle.
|
|
381
378
|
* @param {number} x - arc center point x-axis
|
|
382
379
|
* @param {number} y - arc center point y-axis
|
|
383
380
|
* @param {number} radius - arc radius
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"AAmIA;;;GAGG;AACH;IAQE;;;;;OAKG;IACH,oBAJU,MAAM,CAIU;IAU1B;;;OAGG;IACH,IAFU,qBAAqB,CAEI;IAEnC;;;;;OAKG;IAMH;;;;;;;OAOG;IACH,2BAA4B;IAQ5B;;;;;;;;;OASG;IACH,cAJU,MAAM,CAIiB;IAQjC;;;OAGG;IACH,oCAeE;IAEF;;;;;OAKG;IAIH;;;OAGG;IACH,8BAAgC;IAEhC;;;;;;;OAOG;IACH,mBAJU,MAAM,EAAE,CAIS;IAC3B;;;OAGG;IACH,yBAAyB;IAEzB;;;;;;;;;;;;;OAaG;IACH,8CAAqC;IACrC;;;OAGG;IACH,2BAAsC;IACtC;;;OAGG;IACH,oDAAqC;IACrC;;;OAGG;IACH,4BAA+B;IAC/B;;;OAGG;IACH,2BAA2B;IAC3B;;;OAGG;IACH,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AAM,MACN,MAAM,MACN,MAAM,QA6BhB;;CAiMD;qBAp+IoB,kBAAkB;6BACV,uCAAuC;wBAJ5C,2BAA2B;8BAKrB,sCAAsC;+BAuBrC,yBAAyB;uBA/CjC,yBAAyB;yBADvB,wBAAwB;6BAoCpB,uBAAuB;yBAT3B,uBAAuB;oBA9B5B,2BAA2B;iCAwBd,8BAA8B;+BAFhC,4BAA4B;6BAOjB,uBAAuB;0CAkBvB,oCAAoC;0BAiBrD,eAAe;0CAFD,yBAAyB;6BA/BnC,8BAA8B;sBA7B1B,uBAAuB;qCA6DtB,8DAA8D;6BANtE,6BAA6B;8BAG5B,wBAAwB"}
|
|
@@ -50,7 +50,6 @@ export default class WebGPUMeshBatcher extends WebGPUBatcher {
|
|
|
50
50
|
instanced: Map<any, any> | undefined;
|
|
51
51
|
instancedKeys: Map<any, any> | undefined;
|
|
52
52
|
shadowFamilyKeys: Map<any, any> | undefined;
|
|
53
|
-
instancedShaderWarned: boolean | undefined;
|
|
54
53
|
/**
|
|
55
54
|
* Add a textured mesh to the batch (the accumulated path: vertices
|
|
56
55
|
* already CPU-projected, identity model matrix). Chunks triangles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/mesh_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/mesh_batcher.js"],"names":[],"mappings":"AAgCA;;;;;;;;;GASG;AACH,gCAAiC,GAAG,CAAC;AAWrC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAyFjD;IA/EA,2CAUE;IAuBF,oCAAsC;IAItC,kBAAwB;IACxB,kBAAwB;IAIxB,gDAA+D;IAC/D,gBAAmB;IAGnB,qBAA2B;IAE3B;mBA8dwB,YAAY;iBAAW,MAAM,EAA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AEC;IAED;;;;;;;;OAQG;IACH,cAHW,MAAM,QACN,MAAM,QAsBhB;IAED;;;;;;;;OAQG;IACH,sBANW,MAAM,QACN,MAAM,UACN,MAAM,QAuEhB;IAED;;;;;;OAMG;IACH,uBAyEC;IAED;;;;;OAKG;IACH,4BAEC;IAED;;;;;;;;;OASG;IACH,8BANW,MAAM,OACN,YAAY,GACV,MAAM,CAMlB;IAED;;;;;;;OAOG;IACH,0BALW,MAAM,GACJ,sBAAsB,CAiBlC;IAED;;;;;;;;;;;;;;OAcG;IACH,uBANW,MAAM,eACN,QAAQ,QACR,MAAM,QAkFhB;IAED;;;;;OAKG;IACH,sBAJW,MAAM,QAWhB;IAED;;;;OAIG;IACH,2BAMC;CAwBD;0BA5yCyB,qBAAqB;iCARd,8BAA8B;yBAVtC,2BAA2B;mCAWjB,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitive_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/primitive_batcher.js"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBA8BjD;IAED;;;;;OAKG;IACH,uBAJW,MAAM,SACN,KAAK,EAAE,gBACP,MAAM,QAyEhB;;
|
|
1
|
+
{"version":3,"file":"primitive_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/primitive_batcher.js"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBA8BjD;IAED;;;;;OAKG;IACH,uBAJW,MAAM,SACN,KAAK,EAAE,gBACP,MAAM,QAyEhB;;CAwID;0BA/QyB,qBAAqB;2BAIvB,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/quad_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/quad_batcher.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAmJjD;IAnGA,qBAA2B;IAM3B,yCAAyB;IAEzB;;;;;OAKG;IACH,gDAIC;IASD;;;OAGG;IACH,wCAcE;IAHC,eAAqB;IAIxB,4EAA4E;IAC5E;cADkB,cAAc;iBAAW,UAAU;oBAC7B;IAOxB;;;OAGG;IACH,iBAAuB;IACvB;;;OAGG;IACH,eAAqB;IACrB;;;OAGG;IACH,kBAAyB;IACzB;;;OAGG;IACH,8BAAkB;IAElB,8CAAwB;IAIxB,wCAAwC;IACxC,sDAA+B;IAE/B,8CAAgC;IAChC,mCAAuB;IAQvB,0CAKE;IAKH;;;;;;;;;;;;;;;OAeG;IACH,iBAZW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,QAyGjB;IAED;;;;;;;;OAQG;IACH,oBAJW,MAAM,GAAC,IAAI,QAcrB;IAED;;;;;;;OAOG;IACH,sBALW,MAAM,GACJ,OAAO,CAcnB;IAED;;;;;;;;;;;OAWG;IACH,wBANW,MAAM,YACN,OAAO,GACL,MAAM,CAkElB;IAED;;;;OAIG;IACH,+BAOC;IAED;;;;;;;;OAQG;IACH,uBAJa,YAAY,CAgCxB;IAED;;;;OAIG;IACH,qBAQC;IAED;;;;;OAKG;IACH,2BAGC;IAED;;;;;;;;;;;OAWG;IACH,4IAoCC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAXW,OAAO,0CAA0C,EAAE,OAAO,KAC1D,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,WACN,YAAY,cACZ,OAAO,UACP,MAAM,QA0EhB;IAqBD;;OAEG;IACH,oCA6BC;IAED;;;;;;OAMG;IACH,8BAEC;IAED;;;;;;;OAOG;IACH,yBAJW,MAAM,QAwChB;CAwBD;0BA7vByB,qBAAqB;iCAHd,2BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect_binding.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/effect_binding.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect_binding.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/effect_binding.js"],"names":[],"mappings":"AAoCA;;;;;;;;GAQG;AACH;;;;;;;;;;;;;;GAcG;AACH,yCANW,MAAM,UACN,MAAM,eACN,MAAM,QA0KhB;AAqCD;;;;;;;;;;GAUG;AACH,+CAPW,OAAO,sBAAsB,EAAE,OAAO,UACtC,OAAO,4BAA4B,EAAE,OAAO,GAC1C;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,YAAY,GAAC,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,IAAI,CAgJ/G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgpu/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACC;;OAEG;IACH,sBAFW,cAAc,EA0DxB;IAvDA,yBAAwB;IAIxB,8BAYE;IACF,YASE;IAGF,cAAwB;IAExB;;;OAGG;IACH,WAFU,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAEL;IAC1B;;;OAGG;IACH,aAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAED;IAC5B;;;;OAIG;IACH,YAFU,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC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cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA6BxE;IAED;;;;;;;;;OASG;IACH,+BANW,MAAM,aACN,MAAM,GACJ,MAAM,GAAC,SAAS,CA4D5B;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA0OhB;CACD;+CAtc6C,0BAA0B;yCADhC,qCAAqC;8BAN/C,2BAA2B"}
|
|
@@ -79,9 +79,10 @@ export default class WebGPURenderer extends Renderer {
|
|
|
79
79
|
* @param {number} height - destination height
|
|
80
80
|
* @param {ShaderEffect} effect - the effect to composite with
|
|
81
81
|
* @param {boolean} [keepBlend=false] - keep the current blend mode
|
|
82
|
+
* @param {number} [alpha=1] - the opacity to composite the blit at (0.0 to 1.0)
|
|
82
83
|
* @override
|
|
83
84
|
*/
|
|
84
|
-
override blitEffect(source: import("../rendertarget/webgpurendertarget.js").default, x: number, y: number, width: number, height: number, effect: ShaderEffect, keepBlend?: boolean): void;
|
|
85
|
+
override blitEffect(source: import("../rendertarget/webgpurendertarget.js").default, x: number, y: number, width: number, height: number, effect: ShaderEffect, keepBlend?: boolean, alpha?: number): void;
|
|
85
86
|
/**
|
|
86
87
|
* Clear the current clip region with the given color — a full-viewport
|
|
87
88
|
* triangle clipped by the active scissor, drawn with blending replaced
|
|
@@ -132,7 +133,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
132
133
|
*/
|
|
133
134
|
setBatcher(name?: string): WebGPUBatcher;
|
|
134
135
|
drawMesh(mesh: any, modelMatrix: any): void;
|
|
135
|
-
instancedEffectWarned: boolean | undefined;
|
|
136
136
|
/**
|
|
137
137
|
* Release any retained geometry held for the given mesh (called from
|
|
138
138
|
* `Mesh.onDeactivateEvent` / `Mesh.destroy`).
|
|
@@ -160,11 +160,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
160
160
|
* @param {number} [f] - the f component
|
|
161
161
|
*/
|
|
162
162
|
setTransform(a: Matrix2d | Matrix3d | number, b?: number, c?: number, d?: number, e?: number, f?: number): void;
|
|
163
|
-
/**
|
|
164
|
-
* Return the global alpha
|
|
165
|
-
* @returns {number} global alpha value
|
|
166
|
-
*/
|
|
167
|
-
getGlobalAlpha(): number;
|
|
168
163
|
/**
|
|
169
164
|
* set the current blend mode for this renderer. <br>
|
|
170
165
|
* Both GPU renderers support the full set — the Canvas fallback supports
|
|
@@ -321,7 +316,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
321
316
|
*/
|
|
322
317
|
createPattern(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame, repeat?: string): TextureAtlas;
|
|
323
318
|
savedBlendMode: string | undefined;
|
|
324
|
-
maskDepthWarned: boolean | undefined;
|
|
325
319
|
/**
|
|
326
320
|
* Stroke an arc at the specified coordinates with given radius, start and end points
|
|
327
321
|
* @param {number} x - arc center point x-axis
|
|
@@ -334,7 +328,9 @@ export default class WebGPURenderer extends Renderer {
|
|
|
334
328
|
*/
|
|
335
329
|
strokeArc(x: number, y: number, radius: number, start: number, end: number, antiClockwise?: boolean, fill?: boolean): void;
|
|
336
330
|
/**
|
|
337
|
-
* Fill an arc at the specified coordinates with given radius, start and end points
|
|
331
|
+
* Fill an arc at the specified coordinates with given radius, start and end points.
|
|
332
|
+
* The angles are read like `CanvasRenderingContext2D.arc`: an end before
|
|
333
|
+
* the start wraps round, and a span of 2π or more is the whole circle.
|
|
338
334
|
* @param {number} x - arc center point x-axis
|
|
339
335
|
* @param {number} y - arc center point y-axis
|
|
340
336
|
* @param {number} radius - arc radius
|
|
@@ -466,10 +462,10 @@ export default class WebGPURenderer extends Renderer {
|
|
|
466
462
|
import Renderer from "../renderer.js";
|
|
467
463
|
import { Matrix3d } from "../../math/matrix3d.ts";
|
|
468
464
|
import type ShaderEffect from "../effects/shadereffect.js";
|
|
465
|
+
import Light2d from "../../lighting/light2d.ts";
|
|
469
466
|
import { Color } from "../../math/color.ts";
|
|
470
467
|
import WebGPUBatcher from "./batchers/webgpu_batcher.js";
|
|
471
468
|
import type { Matrix2d } from "../../math/matrix2d.ts";
|
|
472
|
-
import type Light2d from "../../lighting/light2d.ts";
|
|
473
469
|
import RadialGradientEffect from "../effects/radialGradient.js";
|
|
474
470
|
import { TextureAtlas } from "../texture/atlas.js";
|
|
475
471
|
import type { Polygon } from "../../geometries/polygon.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/webgpu_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/webgpu_renderer.js"],"names":[],"mappings":"AAgFA;;;;;;;;;;;;;;;GAeG;AACH,iDANW,OAAO,qBACP,OAAO,GACL;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAYvD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH;IACC;;OAEG;IACH,qBAFW,mBAAmB,EA8W7B;IAtWA;;;;OAIG;IACH,kBAHU,UAAU,GAAC,SAAS,CAGN;IAExB;;;;OAIG;IACH,iBAHU,SAAS,GAAC,SAAS,CAGN;IAEvB;;;OAGG;IACH,SAFU,gBAAgB,CAEc;IAExC;;;;;OAKG;IACH,0BAHU,MAAM,GAAC,SAAS,CAGM;IAEhC;;;;;;;;;;;;;OAaG;IACH,cAJU,MAAM,GAAC,SAAS,CAIG;IAyC7B;mBACe;IACf,iEAAsC;IAGtC;;;OAGG;IACH,oBAAmC;IAInC,2BAAyD;IAKzD;mBACe;IACf,qBAA2B;IAG3B;mBACe;IACf;;;QAEE;IACF;mBACe;IACf,iBAAmB;IAEnB;mBACe;IACf,iBAA4B;IAE5B;mBACe;IACf,uBAAuB;IAEvB;;;;;OAKG;IACH,UAJU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAIJ;IAEzB;;;;OAIG;IACH,oBAA0B;IAG1B;mBACe;I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,UANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,QAIhB;IAED;;;;;;OAMG;IACH,QALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAIhB;IAED;;;;;;;OAOG;IACH,aANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,SACN,MAAM,QAIhB;IAED;;OAEG;IACH,kBAEC;IA6FD;;;;;;;;;;;;;;;;OAgBG;IACH,yBA8BC;IAED;;;;;;;;;;OAUG;IACH,4BAuCC;IApBA;;;;;OAKG;IACH,iCAAkE;IA4CnE;;;;;OAKG;IACH,+BA6CC;IAED;;;OAGG;IACH,cAFa,gBAAgB,CAI5B;CAoGD;qBAnvJoB,gBAAgB;0CA4BK,oCAAoC;yBAxBrD,qBAAqB;yBA5BrB,wBAAwB;uBAC1B,yBAAyB;gCAkDU,qBAAqB;8BAHjD,mBAAmB;8BACnB,yBAAyB;+BAMxB,oBAAoB;+BA7BpB,uCAAuC;wBAP9C,2BAA2B;6BAMtB,uCAAuC;8BAyCvC,4BAA4B;oBArErC,2BAA2B;sBAEd,qBAAqB;0BAgD5B,8BAA8B;8BAe7B,wBAAwB;iCAzClB,8BAA8B;+BAHhC,4BAA4B;6BASjB,qBAAqB;6BAoCrC,6BAA6B;yCAJjB,+BAA+B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "melonjs",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.13.0",
|
|
4
4
|
"description": "A modern & fully featured HTML5 game engine (2D & 3D) for JavaScript/TypeScript, with WebGL/WebGPU rendering, built-in physics, Tiled map & glTF support and WebAudio.",
|
|
5
5
|
"homepage": "https://www.melonjs.org/",
|
|
6
6
|
"type": "module",
|
package/skills/AGENTS.md
CHANGED
|
@@ -64,4 +64,5 @@ Before hand-rolling: `ParticleEmitter`, `Trail`, `Tween`, the built-in
|
|
|
64
64
|
Companion packages cover the rest: `@melonjs/planck-adapter` and
|
|
65
65
|
`@melonjs/matter-adapter` (physics), `@melonjs/spine-plugin` (skeletal
|
|
66
66
|
animation), `@melonjs/tiled-inflate-plugin` (**required** for compressed Tiled
|
|
67
|
-
maps), `@melonjs/debug-plugin`, `@melonjs/
|
|
67
|
+
maps), `@melonjs/debug-plugin`, `@melonjs/gamepad-plugin` (touch controls
|
|
68
|
+
reported as a gamepad), `@melonjs/capacitor-plugin`.
|
package/skills/melonjs/SKILL.md
CHANGED
|
@@ -34,10 +34,10 @@ dependencies.
|
|
|
34
34
|
| [melonjs-scenes-and-state](../melonjs-scenes-and-state/SKILL.md) | `Stage` subclasses, the state manager, transitions, pausing, the update loop, timers, tweens, saved data. |
|
|
35
35
|
| [melonjs-renderables](../melonjs-renderables/SKILL.md) | Subclassing `Renderable`, custom `draw()`, draw order, anchors, `floating`, post effects on an object. |
|
|
36
36
|
| [melonjs-sprites-and-animation](../melonjs-sprites-and-animation/SKILL.md) | `Sprite`, frame animation, texture atlases (TexturePacker / Aseprite / ShoeBox), tint, flip, pooling. |
|
|
37
|
-
| [melonjs-input](../melonjs-input/SKILL.md) | Keyboard actions, pointer and touch handling, drag, gamepad, virtual controls. |
|
|
37
|
+
| [melonjs-input](../melonjs-input/SKILL.md) | Keyboard actions, pointer and touch handling, drag, gamepad, virtual controls (fixed or floating sticks and buttons, tap to act). |
|
|
38
38
|
| [melonjs-physics](../melonjs-physics/SKILL.md) | Collision, bodies, movement, spatial queries, and the planck / matter adapters. |
|
|
39
39
|
| [melonjs-math](../melonjs-math/SKILL.md) | Vectors and matrices: what mutates, what allocates, and interpolating with lerp, slerp, damp or moveTowards. |
|
|
40
|
-
| [melonjs-tilemaps](../melonjs-tilemaps/SKILL.md) | Tiled maps — TMX/TSX loading, spawning entities from objects, collision layers, isometric maps. |
|
|
40
|
+
| [melonjs-tilemaps](../melonjs-tilemaps/SKILL.md) | Tiled maps — TMX/TSX loading, spawning entities from objects, collision layers, isometric maps, reading and changing tiles at run time (a tile layer as the game board). |
|
|
41
41
|
| [melonjs-audio](../melonjs-audio/SKILL.md) | Sound effects, music, audio sprites, spatial audio, procedural tone and noise. |
|
|
42
42
|
| [melonjs-effects-and-shaders](../melonjs-effects-and-shaders/SKILL.md) | Post effects, custom GLSL/WGSL shaders, blend modes, colour grading, screen capture. |
|
|
43
43
|
| [melonjs-3d](../melonjs-3d/SKILL.md) | Anything 3D or 2.5D — `Camera3d`, meshes, instancing, `Sprite3d` billboards, `Light3d`, distance fog, glTF scenes. |
|
|
@@ -112,6 +112,7 @@ Tiled inflate plugin are *required* for their use cases, not merely convenient.
|
|
|
112
112
|
| [`@melonjs/tiled-inflate-plugin`](https://www.npmjs.com/package/@melonjs/tiled-inflate-plugin) | **Required** to load gzip-, zlib- or zstd-compressed Tiled maps. Without it, parsing such a map throws `No inflate function set`. |
|
|
113
113
|
| [`@melonjs/spine-plugin`](https://www.npmjs.com/package/@melonjs/spine-plugin) | Skeletal animation authored in Spine, as a melonJS renderable. |
|
|
114
114
|
| [`@melonjs/debug-plugin`](https://www.npmjs.com/package/@melonjs/debug-plugin) | An in-game debug panel — FPS, draw counts, collision-shape and bounds overlays. Register it after `app.init()`. |
|
|
115
|
+
| [`@melonjs/gamepad-plugin`](https://www.npmjs.com/package/@melonjs/gamepad-plugin) | On-screen touch controls for phones and tablets: sticks and buttons reported as a gamepad, so the game's `bindGamepad` bindings drive it; fixed or floating under the thumb, hidden until touched, tap to act. Use it rather than writing virtual controls. |
|
|
115
116
|
| [`@melonjs/capacitor-plugin`](https://www.npmjs.com/package/@melonjs/capacitor-plugin) | Wrapping a game as a native iOS/Android app: it bridges Capacitor's lifecycle — pause/resume, the hardware back button, orientation lock, splash screen. |
|
|
116
117
|
| [`create-melonjs`](https://www.npmjs.com/package/create-melonjs) | Scaffolding a new project — start here rather than assembling a build by hand. |
|
|
117
118
|
|
|
@@ -285,7 +285,7 @@ alone; reach for `position()` (or `follow` / `at`) when distance falloff
|
|
|
285
285
|
matters.
|
|
286
286
|
|
|
287
287
|
**Spatial audio is WebAudio-only.** On a clip loaded with `stream: true` (or
|
|
288
|
-
`html5: true`) `stereo` / `position` / `orientation` return early and do
|
|
288
|
+
`html5: true`, or `preload: false`) `stereo` / `position` / `orientation` return early and do
|
|
289
289
|
nothing — which is exactly the case for the long music tracks people reach for
|
|
290
290
|
first. `follow` and `at` are equally inert on a streamed clip.
|
|
291
291
|
|
|
@@ -419,7 +419,7 @@ very next line.
|
|
|
419
419
|
mute: false,
|
|
420
420
|
loop: false,
|
|
421
421
|
autoplay: false,
|
|
422
|
-
preload: true, // or "metadata"
|
|
422
|
+
preload: true, // false: fetched on first play, then streamed; or "metadata"
|
|
423
423
|
format: "mp3", // explicit hint when the URL has no usable extension
|
|
424
424
|
stream: true, // long music: stream rather than decode into memory
|
|
425
425
|
on: { play() {}, end() {}, stop() {}, unlock() {} },
|
|
@@ -437,6 +437,25 @@ same switch under its backend name.) `on` accepts the full lifecycle set:
|
|
|
437
437
|
`play`, `pause`, `stop`, `end`, `fade`, `seek`, `rate`, `volume`, `mute`,
|
|
438
438
|
`unlock`.
|
|
439
439
|
|
|
440
|
+
**`preload: false` keeps a clip out of the preload.** Nothing is downloaded for
|
|
441
|
+
it until it is first played (`audio.play`, `audio.playTrack`, or `autoplay`).
|
|
442
|
+
That play fetches it and streams it, as `stream: true` does, so the sound starts
|
|
443
|
+
as soon as enough of the file has arrived, not once all of it has; a clip never
|
|
444
|
+
played is never downloaded. Use it for music a player may never reach (a boss
|
|
445
|
+
theme, the ending) to shorten the wait before the game starts.
|
|
446
|
+
|
|
447
|
+
- The loader reports such a clip done at once: `audio.state(name)` is
|
|
448
|
+
`"unloaded"` until its first play, then `"loading"`, then `"loaded"`.
|
|
449
|
+
- It starts with the short delay of a stream on its first play. Keep a sound
|
|
450
|
+
effect that must sound the instant it is triggered preloaded.
|
|
451
|
+
- Being streamed, it has the limits of `stream: true`: positional sound does
|
|
452
|
+
not apply to it, and it ignores `withCredentials` (see below).
|
|
453
|
+
- Before 20.12.0 such a clip was never fetched at all, and stayed silent.
|
|
454
|
+
|
|
455
|
+
`stream: true` alone still fetches the clip during the preload; combine it with
|
|
456
|
+
`preload: false` to defer that too. `preload: "metadata"` only matters for a
|
|
457
|
+
streamed clip: the preload fetches just enough to know its duration.
|
|
458
|
+
|
|
440
459
|
Outside a preload, `audio.load(asset, onload?, onerror?)` takes the same
|
|
441
460
|
descriptor and loads one clip at runtime — for a level's sounds fetched when
|
|
442
461
|
the level starts. The loader calls the same function, so the same rules apply.
|
|
@@ -444,10 +463,13 @@ the level starts. The loader calls the same function, so the same rules apply.
|
|
|
444
463
|
Re-preloading a manifest that already contains a loaded clip is a no-op —
|
|
445
464
|
`audio.unload(name)` first if you genuinely want to reload it.
|
|
446
465
|
|
|
447
|
-
**Credentials
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
466
|
+
**Credentials work as for every other asset type.** Buffered audio on the
|
|
467
|
+
game's own origin carries its cookies and HTTP auth with no option; a clip on
|
|
468
|
+
another origin behind a login needs `loader.setOptions({ withCredentials: true })`,
|
|
469
|
+
not an audio-specific option, and that server must allow credentials. Buffered
|
|
470
|
+
audio fetches through the shared loader path, so it behaves exactly as an image
|
|
471
|
+
or a JSON file does. A streamed clip (`stream: true`, or
|
|
472
|
+
`preload: false`) does not: it plays
|
|
451
473
|
through an `<audio>` element, which needs a `crossorigin` attribute rather than
|
|
452
474
|
fetch credentials. Preload a clip buffered if it sits behind a login.
|
|
453
475
|
|
|
@@ -475,9 +497,10 @@ either way — blank screen, empty console.
|
|
|
475
497
|
| music keeps playing after leaving a scene | used `play` instead of `playTrack`, or no `stopTrack` in teardown |
|
|
476
498
|
| two music tracks playing at once, and `stopTrack()` only silences one | melonJS before 20.9.0: `playTrack` did not stop the previous track, so the scene that started it had to `stopTrack()` on the way out |
|
|
477
499
|
| the music restarts when returning to a screen | `playTrack` with the track already playing restarts it; don't call it again if the bed should carry on |
|
|
478
|
-
| `stereo` / `position` do nothing | the clip was loaded with `stream: true` — spatial is WebAudio-only |
|
|
500
|
+
| `stereo` / `position` do nothing | the clip was loaded with `stream: true` or `preload: false` — spatial is WebAudio-only |
|
|
501
|
+
| a `preload: false` clip never plays, and `audio.state()` stays `"unloaded"` | melonJS before 20.12.0 never fetched such a clip; preload it, or update |
|
|
479
502
|
| one format works, another does not | that codec is not in the `audio.init()` list |
|
|
480
|
-
| audio behind a login fails, or the preload hangs | `loader.setOptions({ withCredentials: true })` — the same switch every asset type uses |
|
|
503
|
+
| audio on another origin behind a login fails, or the preload hangs | `loader.setOptions({ withCredentials: true })` — the same switch every asset type uses. Audio on the game's own origin needs nothing (before 20.13 it needed it too) |
|
|
481
504
|
| a streamed clip ignores `withCredentials` | `stream: true` plays through an `<audio>` element; preload it buffered instead |
|
|
482
505
|
| `audio.tone(440, {...})` does nothing / errors | `tone` takes a single options object with a required `duration` |
|
|
483
506
|
| `tone` / `noise` are silent with no error | no WebAudio context — `getAudioContext()` returned `null` |
|