melonjs 20.6.0 → 20.8.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 +6 -3
- package/build/application/defaultApplicationSettings.d.ts +5 -0
- package/build/application/defaultApplicationSettings.d.ts.map +1 -1
- package/build/application/header.d.ts.map +1 -1
- package/build/application/settings.d.ts +88 -0
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/backend/engine.d.ts +0 -1
- package/build/audio/backend/sound.d.ts +0 -1
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts +95 -8
- package/build/camera/camera3d.d.ts.map +1 -1
- package/build/geometries/box3d.d.ts +24 -6
- package/build/geometries/box3d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +14 -0
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +14 -0
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/sphere.d.ts +35 -6
- package/build/geometries/sphere.d.ts.map +1 -1
- package/build/index.d.ts +10 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +23361 -20195
- package/build/index.js.map +4 -4
- package/build/input/pointerevent.d.ts +8 -0
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/lang/deprecated.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +17 -31
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +40 -1
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/level.d.ts +36 -0
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +5 -2
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +0 -1
- package/build/level/tiled/TMXTile.d.ts +2 -1
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +7 -4
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts +5 -0
- package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +0 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +6 -5
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +5 -0
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +8 -7
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +5 -0
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +19 -4
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/autodetect.d.ts +0 -4
- package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
- package/build/lighting/light2d.d.ts +68 -2
- package/build/lighting/light2d.d.ts.map +1 -1
- package/build/lighting/light3d.d.ts.map +1 -1
- package/build/loader/loader.d.ts +63 -0
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +1 -2
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts +2 -0
- package/build/loader/parsers/fontface.d.ts.map +1 -1
- package/build/loader/parsers/mtl.d.ts.map +1 -1
- package/build/loader/parsers/shader.d.ts +0 -2
- package/build/math/color.d.ts +27 -4
- package/build/math/color.d.ts.map +1 -1
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +22 -1
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +69 -0
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/adapter.d.ts +152 -3
- package/build/physics/adapter.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +9 -18
- 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 +0 -1
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/physics/builtin/sat.d.ts +0 -7
- package/build/physics/builtin/sat.d.ts.map +1 -1
- package/build/physics/builtin/sat3d.d.ts +46 -0
- package/build/physics/builtin/sat3d.d.ts.map +1 -1
- package/build/physics/physicseditor.d.ts +2 -0
- package/build/physics/physicseditor.d.ts.map +1 -0
- package/build/physics/response.d.ts +45 -62
- package/build/physics/response.d.ts.map +1 -1
- package/build/renderable/collectable.d.ts +6 -1
- package/build/renderable/collectable.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +4 -4
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts +23 -17
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +14 -16
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts +1 -1
- package/build/renderable/groundshadow.d.ts +1 -0
- package/build/renderable/groundshadow.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +12 -5
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts +2 -9
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +306 -5
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts +3 -13
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +129 -28
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +77 -19
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +27 -16
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +13 -3
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +0 -4
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +5 -3
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +2 -0
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/trail.d.ts +0 -1
- package/build/renderable/trail.d.ts.map +1 -1
- package/build/renderable/trigger.d.ts +39 -14
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/progressbar.d.ts +194 -0
- package/build/renderable/ui/progressbar.d.ts.map +1 -0
- package/build/renderable/ui/uibaseelement.d.ts +48 -3
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uispriteelement.d.ts +19 -3
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/state/stage.d.ts +22 -0
- package/build/state/stage.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts +2 -2
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/pool.d.ts +10 -0
- package/build/system/pool.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +49 -2
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/video/buffer/vertex.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +34 -23
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/effects/blendEffect.d.ts +0 -1
- package/build/video/effects/bloom.d.ts +72 -0
- package/build/video/effects/bloom.d.ts.map +1 -0
- package/build/video/effects/blur.d.ts +3 -2
- package/build/video/effects/blur.d.ts.map +1 -1
- package/build/video/effects/chromaticAberration.d.ts +3 -2
- package/build/video/effects/chromaticAberration.d.ts.map +1 -1
- package/build/video/effects/colorMatrix.d.ts +3 -2
- package/build/video/effects/colorMatrix.d.ts.map +1 -1
- package/build/video/effects/desaturate.d.ts +10 -2
- package/build/video/effects/desaturate.d.ts.map +1 -1
- package/build/video/effects/dissolve.d.ts +3 -2
- package/build/video/effects/dissolve.d.ts.map +1 -1
- package/build/video/effects/dropShadow.d.ts +3 -2
- package/build/video/effects/dropShadow.d.ts.map +1 -1
- package/build/video/effects/flash.d.ts +3 -2
- package/build/video/effects/flash.d.ts.map +1 -1
- package/build/video/effects/glow.d.ts +3 -2
- package/build/video/effects/glow.d.ts.map +1 -1
- package/build/video/effects/hologram.d.ts +3 -2
- package/build/video/effects/hologram.d.ts.map +1 -1
- package/build/video/effects/invert.d.ts +10 -2
- package/build/video/effects/invert.d.ts.map +1 -1
- package/build/video/effects/outline.d.ts +3 -2
- package/build/video/effects/outline.d.ts.map +1 -1
- package/build/video/effects/pixelate.d.ts +3 -2
- package/build/video/effects/pixelate.d.ts.map +1 -1
- package/build/video/effects/radialGradient.d.ts +8 -3
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/scanline.d.ts +3 -2
- package/build/video/effects/scanline.d.ts.map +1 -1
- package/build/video/effects/sepia.d.ts +10 -2
- package/build/video/effects/sepia.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts +10 -4
- package/build/video/effects/shadereffect.d.ts.map +1 -1
- package/build/video/effects/shine.d.ts +3 -2
- package/build/video/effects/shine.d.ts.map +1 -1
- package/build/video/effects/tintPulse.d.ts +3 -2
- package/build/video/effects/tintPulse.d.ts.map +1 -1
- package/build/video/effects/tonemap.d.ts +121 -0
- package/build/video/effects/tonemap.d.ts.map +1 -0
- package/build/video/effects/vignette.d.ts +3 -2
- package/build/video/effects/vignette.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +3 -2
- package/build/video/effects/wave.d.ts.map +1 -1
- package/build/video/gpu/meshmaterial.d.ts +2 -0
- package/build/video/gpu/meshmaterial.d.ts.map +1 -0
- package/build/video/gpu/vertexformat.d.ts +26 -0
- package/build/video/gpu/vertexformat.d.ts.map +1 -1
- package/build/video/gradient.d.ts +0 -1
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/renderer.d.ts +111 -7
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +2 -0
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +3 -4
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/render_target_pool.d.ts +0 -1
- package/build/video/rendertarget/webglrendertarget.d.ts +0 -1
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +18 -2
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +1 -0
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +1 -3
- package/build/video/texture/frametexture.d.ts +0 -1
- package/build/video/texture/frametexture.d.ts.map +1 -1
- package/build/video/texture/noise_texture2d.d.ts +1 -0
- package/build/video/texture/noise_texture2d.d.ts.map +1 -1
- package/build/video/utils/autodetect.d.ts +0 -2
- package/build/video/webgl/batchers/batcher.d.ts +0 -9
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +13 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +4 -2
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts +2 -3
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +4 -0
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +0 -1
- package/build/video/webgl/buffer/retained_geometry.d.ts +0 -1
- package/build/video/webgl/glshader.d.ts +5 -3
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +0 -4
- package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
- package/build/video/webgl/texture/store.d.ts +0 -1
- package/build/video/webgl/webgl_renderer.d.ts +63 -24
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +17 -0
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +0 -3
- package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -2
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts +0 -2
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +0 -2
- package/build/video/webgpu/texture/frametexture.d.ts +0 -2
- package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
- package/build/video/webgpu/texture/store.d.ts +0 -1
- package/build/video/webgpu/texture/store.d.ts.map +1 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +8 -75
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/melonjs-3d/SKILL.md +293 -19
- package/skills/melonjs-3d-assets/SKILL.md +123 -13
- package/skills/melonjs-camera-and-drawing/SKILL.md +57 -1
- package/skills/melonjs-effects-and-shaders/SKILL.md +341 -29
- package/skills/melonjs-input/SKILL.md +48 -4
- package/skills/melonjs-lighting/SKILL.md +45 -1
- package/skills/melonjs-loading-assets/SKILL.md +1 -1
- package/skills/melonjs-particles-and-trails/SKILL.md +106 -4
- package/skills/melonjs-performance/SKILL.md +79 -2
- package/skills/melonjs-physics/SKILL.md +420 -29
- package/skills/melonjs-renderables/SKILL.md +15 -1
- package/skills/melonjs-scenes-and-state/SKILL.md +121 -1
- package/skills/melonjs-tilemaps/SKILL.md +9 -0
- package/skills/melonjs-ui-and-text/SKILL.md +165 -4
- package/build/level/gltf/srgb.d.ts +0 -20
- package/build/level/gltf/srgb.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorlayer.d.ts","sourceRoot":"","sources":["../../src/renderable/colorlayer.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"colorlayer.d.ts","sourceRoot":"","sources":["../../src/renderable/colorlayer.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH;;;GAGG;AACH;IACC;;;;OAIG;IACH,kBAJW,MAAM,SACN,KAAK,GAAC,MAAM,MACZ,MAAM,EAahB;IAPA;;;OAGG;IACH,OAFU,KAAK,CAE6B;IAK7C,sDAOC;IAED;;;;OAIG;IACH,eAHW,QAAQ,aACR,QAAQ,QAOlB;IAED;;;;OAIG;IACH,gBAIC;CACD;uBAjEsB,iBAAiB;2BAIhB,oBAAoB;0BAInB,sBAAsB;0BADtB,yBAAyB"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @import NineSliceSprite from "./nineslicesprite.js";
|
|
11
11
|
* @import ImageLayer from "./imagelayer.js";
|
|
12
12
|
* @import ColorLayer from "./colorlayer.js";
|
|
13
|
-
* @import Light2d from "
|
|
13
|
+
* @import Light2d from "../lighting/light2d.ts";
|
|
14
14
|
* @import UIBaseElement from "./ui/uibaseelement.ts";
|
|
15
15
|
* @import UISpriteElement from "./ui/uispriteelement.ts";
|
|
16
16
|
* @import UITextButton from "./ui/uitextbutton.ts";
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
* @import {Bounds} from "./../physics/bounds.ts";
|
|
20
20
|
* @import CanvasRenderer from "./../video/canvas/canvas_renderer.js";
|
|
21
21
|
* @import WebGLRenderer from "./../video/webgl/webgl_renderer.js";
|
|
22
|
+
* @import {Matrix3d} from "../math/matrix3d.ts";
|
|
23
|
+
* @import Camera2d from "../camera/camera2d.ts";
|
|
24
|
+
* @import Renderer from "../video/renderer.js";
|
|
22
25
|
*/
|
|
23
26
|
/**
|
|
24
27
|
* Container represents a collection of child objects.
|
|
@@ -144,7 +147,13 @@ export default class Container extends Renderable {
|
|
|
144
147
|
* if the given child implements an onActivateEvent method, that method will be called
|
|
145
148
|
* once the child is added to this container.
|
|
146
149
|
* @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be added
|
|
147
|
-
* @param {number} [z] - forces the z index of the child to the specified
|
|
150
|
+
* @param {number} [z] - forces the z index of the child to the specified
|
|
151
|
+
* value. This depth is scoped to THIS container: it orders the child among
|
|
152
|
+
* its siblings only, and says nothing about children of another container.
|
|
153
|
+
* Both drawing and pointer hit-testing resolve a cross-container pair at
|
|
154
|
+
* the common ancestor instead, so to put a whole subtree in front use
|
|
155
|
+
* {@link Container#moveToTop} on the container rather than a large `z` on
|
|
156
|
+
* something inside it. Left out, `autoDepth` numbers children from 1.
|
|
148
157
|
* @returns {Renderable} the added child
|
|
149
158
|
*/
|
|
150
159
|
addChild(child: Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText, z?: number): Renderable;
|
|
@@ -256,12 +265,6 @@ export default class Container extends Renderable {
|
|
|
256
265
|
* @returns {Renderable[]} an array of renderable object
|
|
257
266
|
*/
|
|
258
267
|
getChildren(): Renderable[];
|
|
259
|
-
/**
|
|
260
|
-
* update the bounding box for this container.
|
|
261
|
-
* @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates
|
|
262
|
-
* @returns {Bounds} this container bounding box Rectangle object
|
|
263
|
-
*/
|
|
264
|
-
updateBounds(absolute?: boolean): Bounds;
|
|
265
268
|
/**
|
|
266
269
|
* Checks if this container is root or if it's attached to the root container.
|
|
267
270
|
* @returns {boolean} true if this container is root or if it's attached to the root container
|
|
@@ -313,6 +316,11 @@ export default class Container extends Renderable {
|
|
|
313
316
|
moveDown(child: Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText): void;
|
|
314
317
|
/**
|
|
315
318
|
* Move the specified child to the top(z depth).
|
|
319
|
+
*
|
|
320
|
+
* Moves the whole subtree: the child's own children keep their depths among
|
|
321
|
+
* themselves and come with it, because depth is resolved per container. This
|
|
322
|
+
* is how one overlapping panel is brought in front of another, for drawing
|
|
323
|
+
* and for pointer hit-testing alike.
|
|
316
324
|
* @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be moved
|
|
317
325
|
*/
|
|
318
326
|
moveToTop(child: Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText): void;
|
|
@@ -337,15 +345,11 @@ export default class Container extends Renderable {
|
|
|
337
345
|
*/
|
|
338
346
|
sortNow(recursive?: boolean): void;
|
|
339
347
|
/**
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* place in the world. A leaf renderable has no such term.
|
|
344
|
-
* @protected
|
|
345
|
-
* @param {Matrix3d} out - matrix to write into
|
|
346
|
-
* @returns {Matrix3d} `out`, for chaining
|
|
348
|
+
* draw this renderable (automatically called by melonJS)
|
|
349
|
+
* @param {Renderer} renderer - a renderer instance
|
|
350
|
+
* @param {Camera2d} [viewport] - the viewport to (re)draw
|
|
347
351
|
*/
|
|
348
|
-
|
|
352
|
+
draw(renderer: Renderer, viewport?: Camera2d): void;
|
|
349
353
|
}
|
|
350
354
|
import Renderable from "./renderable.js";
|
|
351
355
|
import type { Color } from "./../math/color.ts";
|
|
@@ -358,10 +362,12 @@ import type { DropTarget } from "./dragndrop.js";
|
|
|
358
362
|
import type NineSliceSprite from "./nineslicesprite.js";
|
|
359
363
|
import type ImageLayer from "./imagelayer.js";
|
|
360
364
|
import type ColorLayer from "./colorlayer.js";
|
|
365
|
+
import type Light2d from "../lighting/light2d.ts";
|
|
361
366
|
import type UIBaseElement from "./ui/uibaseelement.ts";
|
|
362
367
|
import type UISpriteElement from "./ui/uispriteelement.ts";
|
|
363
368
|
import type UITextButton from "./ui/uitextbutton.ts";
|
|
364
369
|
import type Text from "./text/text.js";
|
|
365
370
|
import type BitmapText from "./text/bitmaptext.js";
|
|
366
|
-
import type
|
|
371
|
+
import type Renderer from "../video/renderer.js";
|
|
372
|
+
import type Camera2d from "../camera/camera2d.ts";
|
|
367
373
|
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/renderable/container.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/renderable/container.js"],"names":[],"mappings":"AA6LA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;;;GASG;AACH;IACC;;;;;;;OAOG;IACH,gBAPW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,SACN,OAAO,EAsIjB;IA/HA;;;;OAIG;IACH,iBAAuB;IAEvB;;;;OAIG;IACH,MAHU,OAAO,CAGD;IAEhB;;;;OAIG;IACH,4BAAyB;IAEzB;;;;;;;OAOG;IACH,SALU,MAAM,CAKE;IAClB;;;OAGG;IACH,wCAA8B;IAE9B;;;;OAIG;IACH,UAHU,OAAO,CAGG;IAEpB;;;;OAIG;IACH,WAHU,OAAO,CAGI;IAErB;;;;OAIG;IACH,UAHU,OAAO,CAGI;IAErB;;;OAGG;IACH,0BAEC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAJU,OAAO,CAImB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AAI,GAAC,UAAU,QAapL;IAED;;;OAGG;IACH,oBAFW,UAAU,GAAC,MAAM,GAAC,MAAM,GAAC,WAAW,GAAC,OAAO,GAAC,SAAS,GAAC,UAAU,GAAC,eAAe,GAAC,UAAU,GAAC,UAAU,GAAC,OAAO,GAAC,aAAa,GAAC,eAAe,GAAC,YAAY,GAAC,IAAI,GAAC,UAAU,QAiBpL;IAED;;;OAGG;IACH,iBAFW,OAAO,QA8BjB;IAED;;;;;;;;OAQG;IACH,oBAFW,OAAO,QAoBjB;IAiBD;;;;OAIG;IACH,+BAEC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,sCAuCC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,mCAWC;IAED;;;;OAIG;IACH,+BAEC;IAED;;;;OAIG;IACH,+BAEC;IAmHD;;;;OAIG;IACH,eAHW,QAAQ,aACR,QAAQ,QA4GlB;CACD;uBAv+CsB,iBAAiB;2BAoLhB,oBAAoB;wBACrB,oBAAoB;wBACpB,aAAa;6BACR,kBAAkB;yBACtB,cAAc;+BACR,gBAAgB;gCACf,gBAAgB;iCACf,sBAAsB;4BAC3B,iBAAiB;4BACjB,iBAAiB;yBACpB,wBAAwB;+BAClB,uBAAuB;iCACrB,yBAAyB;8BAC5B,sBAAsB;sBAC9B,gBAAgB;4BACV,sBAAsB;0BAMxB,sBAAsB;0BADtB,uBAAuB"}
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* @import {Bounds} from "./../../physics/bounds.ts";
|
|
7
7
|
* @import CanvasRenderer from "./../../video/canvas/canvas_renderer.js";
|
|
8
8
|
* @import WebGLRenderer from "./../../video/webgl/webgl_renderer.js";
|
|
9
|
+
* @import {Matrix3d} from "../../math/matrix3d.ts";
|
|
10
|
+
* @import {Vector2d} from "../../math/vector2d.ts";
|
|
11
|
+
* @import Camera2d from "../../camera/camera2d.ts";
|
|
12
|
+
* @import Renderer from "../../video/renderer.js";
|
|
9
13
|
**/
|
|
10
14
|
/**
|
|
11
15
|
* a Generic Object Entity
|
|
@@ -166,6 +170,7 @@ export default class Entity extends Renderable {
|
|
|
166
170
|
* @param {string} [settings.type] - object type
|
|
167
171
|
* @param {number} [settings.collisionMask] - Mask collision detection for this object
|
|
168
172
|
* @param {Rect[]|Polygon[]|Line[]|Ellipse[]} [settings.shapes] - the initial list of collision shapes (usually populated through Tiled)
|
|
173
|
+
* @param {object} [settings.bodyDef] - adapter-portable body definition, see {@link Renderable#bodyDef}. Its shapes resolve when the entity joins the world, so they cannot size it: pass `settings.width` / `settings.height`
|
|
169
174
|
* @deprecated since 18.1.0 — see the class-level documentation for migration examples
|
|
170
175
|
*/
|
|
171
176
|
constructor(x: number, y: number, settings: {
|
|
@@ -177,12 +182,13 @@ export default class Entity extends Renderable {
|
|
|
177
182
|
anchorPoint?: string | Vector2d | {
|
|
178
183
|
x: number;
|
|
179
184
|
y: number;
|
|
180
|
-
};
|
|
185
|
+
} | undefined;
|
|
181
186
|
framewidth?: number | undefined;
|
|
182
187
|
frameheight?: number | undefined;
|
|
183
188
|
type?: string | undefined;
|
|
184
189
|
collisionMask?: number | undefined;
|
|
185
190
|
shapes?: Rect[] | Polygon[] | Line[] | Ellipse[] | undefined;
|
|
191
|
+
bodyDef?: object | undefined;
|
|
186
192
|
});
|
|
187
193
|
set renderable(value: Renderable);
|
|
188
194
|
/**
|
|
@@ -201,34 +207,26 @@ export default class Entity extends Renderable {
|
|
|
201
207
|
* @type {boolean}
|
|
202
208
|
*/
|
|
203
209
|
alive: boolean;
|
|
204
|
-
/**
|
|
205
|
-
* update the bounding box for this entity.
|
|
206
|
-
* @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates
|
|
207
|
-
* @returns {Bounds} this entity bounding box Rectangle object
|
|
208
|
-
*/
|
|
209
|
-
updateBounds(absolute?: boolean): Bounds;
|
|
210
210
|
/**
|
|
211
211
|
* update the bounds when the body is modified
|
|
212
212
|
*/
|
|
213
213
|
onBodyUpdate(): void;
|
|
214
214
|
preDraw(renderer: any): void;
|
|
215
215
|
/**
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* class never applies. Mirrors the `preDraw` above instead.
|
|
220
|
-
* @protected
|
|
221
|
-
* @param {Matrix3d} out - matrix to write into
|
|
222
|
-
* @returns {Matrix3d} `out`, for chaining
|
|
216
|
+
* draw this entity (automatically called by melonJS)
|
|
217
|
+
* @param {Renderer} renderer - a renderer instance
|
|
218
|
+
* @param {Camera2d} [viewport] - the viewport to (re)draw
|
|
223
219
|
*/
|
|
224
|
-
|
|
220
|
+
draw(renderer: Renderer, viewport?: Camera2d): void;
|
|
225
221
|
/**
|
|
226
222
|
* onDeactivateEvent Notification function
|
|
227
223
|
*/
|
|
228
224
|
onDeactivateEvent(): void;
|
|
229
225
|
}
|
|
230
226
|
import Renderable from "../renderable.js";
|
|
231
|
-
import type
|
|
227
|
+
import type Renderer from "../../video/renderer.js";
|
|
228
|
+
import type Camera2d from "../../camera/camera2d.ts";
|
|
229
|
+
import type { Vector2d } from "../../math/vector2d.ts";
|
|
232
230
|
import type { Rect } from "./../../geometries/rectangle.ts";
|
|
233
231
|
import type { Polygon } from "../../geometries/polygon.ts";
|
|
234
232
|
import type { Line } from "./../../geometries/line.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/renderable/entity/entity.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/renderable/entity/entity.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;IAYI;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6IG;AACH;IACC;;;OAGG;IACH,mCAAkC;IAElC;;;;;;;;;;;;;;;;;;OAkBG;IACH,eAlBW,MAAM,KACN,MAAM,YAGd;QAAyB,KAAK,EAAtB,MAAM;QACW,MAAM,EAAvB,MAAM;QACY,IAAI;QACJ,EAAE;QACI,KAAK;QACkB,WAAW;eAAvC,MAAM;eAAG,MAAM;;QAChB,UAAU;QACV,WAAW;QACX,IAAI;QACJ,aAAa;QACc,MAAM;QACjC,OAAO;KACjC,EAgGF;IApFA;;;;OAIG;IACH,gBAAkB;IA0FnB,sBAPU,UAAU,EAmBnB;IArBD;;;OAGG;IAEH,kBAHU,UAAU,CAKnB;IAxDA;;;OAGG;IACH,IAFU,MAAM,CAEW;IAE3B;;;;OAIG;IACH,OAFU,OAAO,CAEA;IA6DlB;;;OAGG;IACH,yBAKC;IAiCD;;OAEG;IACH,qBAEC;IAED,6BAkBC;IA2BD;;;;OAIG;IACH,eAHW,QAAQ,aACR,QAAQ,QAclB;IAoBD;;OAEG;IACH,0BAIC;CACD;uBA3bsB,kBAAkB;0BAchB,yBAAyB;0BADzB,0BAA0B;8BADxB,wBAAwB;0BAP5B,iCAAiC;6BAE9B,6BAA6B;0BAHhC,4BAA4B;6BAEzB,+BAA+B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* additional import for TypeScript
|
|
3
3
|
* @import { TextureAtlas } from "../video/texture/atlas.js";
|
|
4
|
-
* @import { Vector2d } from "../math/vector2d.
|
|
4
|
+
* @import { Vector2d } from "../math/vector2d.ts";
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* The shared **frame-animation engine** behind {@link Sprite} (2D) and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groundshadow.d.ts","sourceRoot":"","sources":["../../src/renderable/groundshadow.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;GAUG;AACH,oCAJa,iBAAiB,GAAC,eAAe,CAuC7C;AAED;;;;;GAKG;AACH,2CAEC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,4CANW,YAAY,eACZ,MAAM,GACJ,OAAO,CA+BnB;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wCARW,MAAM,OACN,OAAO,wBAGL,MAAM,CAkClB;AAED
|
|
1
|
+
{"version":3,"file":"groundshadow.d.ts","sourceRoot":"","sources":["../../src/renderable/groundshadow.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;GAUG;AACH,oCAJa,iBAAiB,GAAC,eAAe,CAuC7C;AAED;;;;;GAKG;AACH,2CAEC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,4CANW,YAAY,eACZ,MAAM,GACJ,OAAO,CA+BnB;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wCARW,MAAM,OACN,OAAO,wBAGL,MAAM,CAkClB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,kCATW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,OACN,YAAY,QAoBtB;AAgBD;;;;;;;;;;;;;;GAcG;AACH,oCAPW,MAAM,MACN,MAAM,MACN,MAAM,OACN,YAAY,QAgBtB;AAcD;;;;;;;;;;GAUG;AACH,4CALW,MAAM,GACJ,MAAM,CASlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iCAVW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,OACN,YAAY,GAAC,MAAM,EAAE,GACnB,YAAY,GAAC,MAAM,EAAE,CASjC;AAuDD,oKAgFC;AAED;;;;;;GAMG;AACH,6CAJW,MAAM,QAWhB;AAzPD;;;;;;;;;;;GAWG;AACH,yCAAkE;AA+BlE,oDAAoD;AACpD;;;;;;;;GAQG;AACH,iCAAkC,CAAC,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* additional import for TypeScript
|
|
3
|
-
* @import {Vector2d} from "../math/vector2d.
|
|
3
|
+
* @import {Vector2d} from "../math/vector2d.ts";
|
|
4
|
+
* @import Camera2d from "../camera/camera2d.ts";
|
|
5
|
+
* @import CanvasRenderer from "../video/canvas/canvas_renderer.js";
|
|
6
|
+
* @import {CompressedImage} from "../loader/parsers/compressed_textures/compressed_image.js";
|
|
7
|
+
* @import WebGLRenderer from "../video/webgl/webgl_renderer.js";
|
|
8
|
+
* @import Renderer from "../video/renderer.js";
|
|
4
9
|
*/
|
|
5
10
|
/**
|
|
6
11
|
* a generic Image Layer Object
|
|
@@ -70,13 +75,15 @@ export default class ImageLayer extends Sprite {
|
|
|
70
75
|
resize(w: number, h: number): this;
|
|
71
76
|
/**
|
|
72
77
|
* draw this ImageLayer (automatically called by melonJS)
|
|
73
|
-
* @
|
|
74
|
-
* @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
|
|
78
|
+
* @param {Renderer} renderer - a renderer instance
|
|
75
79
|
* @param {Camera2d} [viewport] - the viewport to (re)draw
|
|
76
80
|
*/
|
|
77
|
-
|
|
81
|
+
draw(renderer: Renderer, viewport?: Camera2d): void;
|
|
78
82
|
onDeactivateEvent(): void;
|
|
79
83
|
}
|
|
80
84
|
import Sprite from "./sprite.js";
|
|
81
|
-
import type { Vector2d } from "../math/vector2d.
|
|
85
|
+
import type { Vector2d } from "../math/vector2d.ts";
|
|
86
|
+
import type Renderer from "../video/renderer.js";
|
|
87
|
+
import type Camera2d from "../camera/camera2d.ts";
|
|
88
|
+
import type { CompressedImage } from "../loader/parsers/compressed_textures/compressed_image.js";
|
|
82
89
|
//# sourceMappingURL=imagelayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imagelayer.d.ts","sourceRoot":"","sources":["../../src/renderable/imagelayer.js"],"names":[],"mappings":"AAaA
|
|
1
|
+
{"version":3,"file":"imagelayer.d.ts","sourceRoot":"","sources":["../../src/renderable/imagelayer.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AAEH;;;GAGG;AACH;IACC;;;;;;;;;;;;;;;;OAgBG;IACH,eAhBW,MAAM,KACN,MAAM,YAEd;QAA4E,KAAK,EAAzE,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,MAAM;QACvC,IAAI;QACJ,CAAC;QACQ,KAAK;QACsB,MAAM;QACN,WAAW;eAAvC,MAAM;eAAG,MAAM;;KACjD,EAgEF;IAlCA;;;;;;;;;OASG;IACH,OAHU,QAAQ,CAGqB;IAyCxC,kBAPU,MAAM,EA+Bf;IAvCD;;;;;;;;;;OAUG;IACH,cAHU,MAAM,CAKf;IAGA;;;OAGG;IACH,4BAAoB;IAGlB,6BAAoB;IACpB,6BAAoB;IAkBvB,wBAsBC;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,sBASC;IARA;;;OAGG;IACH,cAGC;IAGF;;;;OAIG;IACH,oBA+CC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,6BAmBC;IAED;;;;OAIG;IACH,eAHW,QAAQ,aACR,QAAQ,QAyElB;IAGD,0BAMC;CAYD;mBAxXkB,aAAa;8BAIL,qBAAqB;0BAKvB,sBAAsB;0BAJtB,uBAAuB;qCAEd,2DAA2D"}
|
|
@@ -139,7 +139,7 @@ export default class InstancedMesh extends Mesh {
|
|
|
139
139
|
* @returns {number} the new instance's index
|
|
140
140
|
*/
|
|
141
141
|
addInstance(transform?: Matrix3d, options?: {
|
|
142
|
-
color?:
|
|
142
|
+
color?: Color | undefined;
|
|
143
143
|
data?: number[] | undefined;
|
|
144
144
|
}): number;
|
|
145
145
|
/**
|
|
@@ -199,14 +199,6 @@ export default class InstancedMesh extends Mesh {
|
|
|
199
199
|
* forest.needsInstanceUpdate = true;
|
|
200
200
|
*/
|
|
201
201
|
set needsInstanceUpdate(value: any);
|
|
202
|
-
/**
|
|
203
|
-
* Draw the instanced mesh. Under a GPU backend this is one instanced
|
|
204
|
-
* draw call; the Canvas renderer has no instancing, so each instance is
|
|
205
|
-
* drawn through the ordinary mesh path instead.
|
|
206
|
-
* @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
|
|
207
|
-
* @param {Camera2d} [viewport] - the camera rendering this frame
|
|
208
|
-
*/
|
|
209
|
-
draw(renderer: CanvasRenderer | WebGLRenderer, viewport?: Camera2d): void;
|
|
210
202
|
}
|
|
211
203
|
/**
|
|
212
204
|
* Everything {@link InstancedMesh} takes: the instancing settings, plus every
|
|
@@ -230,4 +222,5 @@ export type InstancedMeshOwnSettings = {
|
|
|
230
222
|
export type InstancedMeshSettings = InstancedMeshOwnSettings & import("./mesh.js").MeshSettings;
|
|
231
223
|
import Mesh from "./mesh.js";
|
|
232
224
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
225
|
+
import type { Color } from "../math/color.ts";
|
|
233
226
|
//# sourceMappingURL=instanced_mesh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instanced_mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/instanced_mesh.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instanced_mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/instanced_mesh.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH;;;;;;;;GAQG;AAEH;;GAEG;AAEH;IACC;;;;OAIG;IACH,eAJW,MAAM,KACN,MAAM,YACN,qBAAqB,EAyF/B;IApFA;;;;;;;OAOG;IACH,gBAJU,MAAM,CAOf;IAED;;;;;;;OAOG;IACH,gBAFU,YAAY,CAEmB;IAEzC;;;;;;OAMG;IACH,kBAJU,MAAM,CAIS;IAUzB;;;OAGG;IACH,0BAA0B;IAG1B;;;OAGG;IACH,0BAA0B;IAE1B;;;OAGG;IACH,oBAA2B;IAC3B;;;OAGG;IACH,mBAAmB;IAEnB;;;OAGG;IACH,uBAAuB;IACvB;;;OAGG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,sBAAuB;IAoBxB,yBANU,MAA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