melonjs 20.2.0 → 20.4.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 +86 -8
- package/build/application/application.d.ts +0 -17
- 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/audio.d.ts +2 -2
- package/build/audio/audio.d.ts.map +1 -1
- package/build/audio/backend/buffer.d.ts +26 -0
- package/build/audio/backend/buffer.d.ts.map +1 -0
- package/build/audio/backend/cache.d.ts +2 -0
- package/build/audio/backend/cache.d.ts.map +1 -0
- package/build/audio/backend/core.d.ts +24 -0
- package/build/audio/backend/core.d.ts.map +1 -0
- package/build/audio/backend/engine.d.ts +35 -0
- package/build/audio/backend/engine.d.ts.map +1 -0
- package/build/audio/backend/sound.d.ts +29 -0
- package/build/audio/backend/sound.d.ts.map +1 -0
- package/build/audio/backend/spatial.d.ts +191 -0
- package/build/audio/backend/spatial.d.ts.map +1 -0
- package/build/audio/backend/types.d.ts +107 -0
- package/build/audio/backend/types.d.ts.map +1 -0
- package/build/audio/backend/voice.d.ts +8 -0
- package/build/audio/backend/voice.d.ts.map +1 -0
- package/build/audio/playback.d.ts +49 -4
- package/build/audio/playback.d.ts.map +1 -1
- package/build/audio/procedural.d.ts.map +1 -1
- package/build/audio/state.d.ts +69 -0
- package/build/audio/state.d.ts.map +1 -0
- package/build/audio/types.d.ts +93 -1
- package/build/audio/types.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +0 -68
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts +91 -84
- package/build/camera/camera3d.d.ts.map +1 -1
- package/build/camera/effects/fade_effect.d.ts +0 -5
- package/build/camera/effects/fade_effect.d.ts.map +1 -1
- package/build/camera/effects/mask_effect.d.ts +0 -5
- package/build/camera/effects/mask_effect.d.ts.map +1 -1
- package/build/camera/fog.d.ts +118 -0
- package/build/camera/fog.d.ts.map +1 -0
- package/build/const.d.ts +2 -2
- package/build/geometries/box3d.d.ts +0 -28
- package/build/geometries/box3d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +0 -20
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/observablePoint.d.ts +0 -3
- package/build/geometries/observablePoint.d.ts.map +1 -1
- package/build/geometries/path2d.d.ts +0 -19
- package/build/geometries/path2d.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +0 -12
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/roundrect.d.ts +0 -18
- package/build/geometries/roundrect.d.ts.map +1 -1
- package/build/geometries/sphere.d.ts +0 -9
- package/build/geometries/sphere.d.ts.map +1 -1
- package/build/geometries/toarccanvas.d.ts.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +12150 -11289
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/input.d.ts +19 -0
- package/build/input/input.d.ts.map +1 -1
- package/build/input/pointer.d.ts +0 -4
- package/build/input/pointer.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts +0 -6
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/lang/deprecated.d.ts +4 -2
- package/build/lang/deprecated.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +0 -81
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +13 -44
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/gltf/gltf_sampler.d.ts +1 -48
- package/build/level/gltf/gltf_sampler.d.ts.map +1 -1
- package/build/level/level.d.ts +195 -113
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXGroup.d.ts +1 -65
- package/build/level/tiled/TMXGroup.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +0 -44
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +1 -136
- package/build/level/tiled/TMXObject.d.ts.map +1 -1
- package/build/level/tiled/TMXObjectFactory.d.ts +1 -40
- package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
- package/build/level/tiled/TMXTile.d.ts +1 -30
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +0 -10
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +0 -113
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts +0 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts +1 -43
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +1 -7
- package/build/level/tiled/factories/shape.d.ts.map +1 -1
- package/build/level/tiled/factories/text.d.ts +1 -7
- package/build/level/tiled/factories/text.d.ts.map +1 -1
- package/build/level/tiled/factories/tile.d.ts +1 -7
- package/build/level/tiled/factories/tile.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +0 -60
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +0 -42
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +0 -5
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +0 -31
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +2 -2
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/autodetect.d.ts +1 -6
- package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
- package/build/lighting/light2d.d.ts +0 -25
- package/build/lighting/light2d.d.ts.map +1 -1
- package/build/lighting/light3d.d.ts +0 -16
- package/build/lighting/light3d.d.ts.map +1 -1
- package/build/loader/loader.d.ts +46 -73
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +0 -33
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/aseprite.d.ts +0 -13
- package/build/loader/parsers/aseprite.d.ts.map +1 -1
- package/build/loader/parsers/audio.d.ts +2 -0
- package/build/loader/parsers/audio.d.ts.map +1 -0
- package/build/loader/parsers/binary.d.ts +1 -10
- package/build/loader/parsers/binary.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseDDS.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseKTX.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parsePKM.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parsePVR.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts +1 -13
- package/build/loader/parsers/fontface.d.ts.map +1 -1
- package/build/loader/parsers/gltf.d.ts +1 -70
- package/build/loader/parsers/gltf.d.ts.map +1 -1
- package/build/loader/parsers/image.d.ts +1 -22
- package/build/loader/parsers/image.d.ts.map +1 -1
- package/build/loader/parsers/json.d.ts +1 -10
- package/build/loader/parsers/json.d.ts.map +1 -1
- package/build/loader/parsers/mtl.d.ts +1 -28
- package/build/loader/parsers/mtl.d.ts.map +1 -1
- package/build/loader/parsers/obj.d.ts +1 -59
- package/build/loader/parsers/obj.d.ts.map +1 -1
- package/build/loader/parsers/pbr.d.ts +1 -62
- package/build/loader/parsers/pbr.d.ts.map +1 -1
- package/build/loader/parsers/script.d.ts +1 -10
- package/build/loader/parsers/script.d.ts.map +1 -1
- package/build/loader/parsers/shader.d.ts +1 -52
- package/build/loader/parsers/shader.d.ts.map +1 -1
- package/build/loader/parsers/tmx.d.ts +1 -10
- package/build/loader/parsers/tmx.d.ts.map +1 -1
- package/build/loader/parsers/video.d.ts +1 -10
- package/build/loader/parsers/video.d.ts.map +1 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/noise.d.ts +0 -40
- package/build/math/noise.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +0 -3
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +0 -3
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/math/vector2d.d.ts +0 -6
- package/build/math/vector2d.d.ts.map +1 -1
- package/build/math/vertex.d.ts +25 -0
- package/build/math/vertex.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +0 -65
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +0 -81
- package/build/particles/particle.d.ts.map +1 -1
- package/build/physics/adapter.d.ts +3 -3
- package/build/physics/bounds.d.ts +0 -1
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/broadphase/broadphase.d.ts +0 -7
- package/build/physics/broadphase/broadphase.d.ts.map +1 -1
- package/build/physics/broadphase/octree.d.ts +0 -91
- package/build/physics/broadphase/octree.d.ts.map +1 -1
- package/build/physics/broadphase/quadtree.d.ts +0 -47
- package/build/physics/broadphase/quadtree.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +5 -69
- package/build/physics/builtin/body.d.ts.map +1 -1
- package/build/physics/builtin/detector.d.ts +0 -312
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/physics/builtin/sat.d.ts +1 -48
- package/build/physics/builtin/sat.d.ts.map +1 -1
- package/build/physics/builtin/sat3d.d.ts +1 -56
- package/build/physics/builtin/sat3d.d.ts.map +1 -1
- package/build/physics/collision.d.ts +0 -2
- package/build/physics/collision.d.ts.map +1 -1
- package/build/physics/response.d.ts +0 -1
- package/build/physics/response.d.ts.map +1 -1
- package/build/physics/world.d.ts.map +1 -1
- package/build/plugin/plugin.d.ts +9 -1
- package/build/plugin/plugin.d.ts.map +1 -1
- package/build/polyfill/index.d.ts +1 -4
- package/build/polyfill/index.d.ts.map +1 -1
- package/build/renderable/anchorPoint.d.ts +1 -73
- package/build/renderable/anchorPoint.d.ts.map +1 -1
- package/build/renderable/animation.d.ts +0 -7
- package/build/renderable/animation.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +0 -5
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts +0 -55
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/draggable.d.ts +0 -5
- package/build/renderable/draggable.d.ts.map +1 -1
- package/build/renderable/dragndrop.d.ts +1 -12
- package/build/renderable/dragndrop.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +0 -8
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts +0 -41
- package/build/renderable/frameAnimation.d.ts.map +1 -1
- package/build/renderable/groundshadow.d.ts +1 -91
- package/build/renderable/groundshadow.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +0 -29
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts +26 -104
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +145 -140
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts +0 -4
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +17 -54
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +7 -52
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +0 -95
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +0 -14
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +0 -22
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/glyph.d.ts +1 -39
- package/build/renderable/text/glyph.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +0 -20
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textstyle.d.ts +1 -5
- package/build/renderable/text/textstyle.d.ts.map +1 -1
- package/build/renderable/trail.d.ts +0 -29
- package/build/renderable/trail.d.ts.map +1 -1
- package/build/renderable/trigger.d.ts +0 -6
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/uibaseelement.d.ts +0 -40
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uispriteelement.d.ts +0 -35
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/state/stage.d.ts +4 -68
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts.map +1 -1
- package/build/system/device.d.ts +0 -12
- package/build/system/device.d.ts.map +1 -1
- package/build/system/dom.d.ts +1 -8
- package/build/system/dom.d.ts.map +1 -1
- package/build/system/event.d.ts +1 -1
- package/build/system/legacy_pool.d.ts +1 -6
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/platform.d.ts +21 -2
- package/build/system/platform.d.ts.map +1 -1
- package/build/system/pool.d.ts +0 -9
- package/build/system/pool.d.ts.map +1 -1
- package/build/system/save.d.ts.map +1 -1
- package/build/system/timer.d.ts +0 -20
- package/build/system/timer.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +0 -62
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/array-multimap.d.ts +1 -13
- package/build/utils/array-multimap.d.ts.map +1 -1
- package/build/utils/decode.d.ts.map +1 -1
- package/build/utils/fetchdata.d.ts +2 -0
- package/build/utils/fetchdata.d.ts.map +1 -0
- package/build/utils/utils.d.ts +0 -13
- package/build/utils/utils.d.ts.map +1 -1
- package/build/video/blendmodes.d.ts +1 -106
- package/build/video/blendmodes.d.ts.map +1 -1
- package/build/video/buffer/index.d.ts +1 -39
- package/build/video/buffer/index.d.ts.map +1 -1
- package/build/video/buffer/vertex.d.ts +1 -82
- package/build/video/buffer/vertex.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +7 -25
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/canvas_factory.d.ts +1 -24
- package/build/video/canvas_factory.d.ts.map +1 -1
- package/build/video/effects/blendEffect.d.ts +0 -54
- package/build/video/effects/blendEffect.d.ts.map +1 -1
- package/build/video/effects/blur.d.ts +4 -4
- package/build/video/effects/blur.d.ts.map +1 -1
- package/build/video/effects/chromaticAberration.d.ts +5 -5
- package/build/video/effects/chromaticAberration.d.ts.map +1 -1
- package/build/video/effects/colorMatrix.d.ts +5 -15
- package/build/video/effects/colorMatrix.d.ts.map +1 -1
- package/build/video/effects/desaturate.d.ts +5 -5
- package/build/video/effects/desaturate.d.ts.map +1 -1
- package/build/video/effects/dissolve.d.ts +4 -4
- package/build/video/effects/dissolve.d.ts.map +1 -1
- package/build/video/effects/dropShadow.d.ts +5 -5
- package/build/video/effects/dropShadow.d.ts.map +1 -1
- package/build/video/effects/flash.d.ts +4 -4
- package/build/video/effects/flash.d.ts.map +1 -1
- package/build/video/effects/glow.d.ts +5 -5
- package/build/video/effects/glow.d.ts.map +1 -1
- package/build/video/effects/glsl_realization.d.ts +1 -17
- package/build/video/effects/glsl_realization.d.ts.map +1 -1
- package/build/video/effects/hologram.d.ts +4 -4
- package/build/video/effects/hologram.d.ts.map +1 -1
- package/build/video/effects/invert.d.ts +5 -5
- package/build/video/effects/invert.d.ts.map +1 -1
- package/build/video/effects/outline.d.ts +6 -6
- package/build/video/effects/outline.d.ts.map +1 -1
- package/build/video/effects/pixelate.d.ts +4 -4
- package/build/video/effects/pixelate.d.ts.map +1 -1
- package/build/video/effects/radialGradient.d.ts +2 -3
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/scanline.d.ts +6 -6
- package/build/video/effects/scanline.d.ts.map +1 -1
- package/build/video/effects/sepia.d.ts +5 -5
- package/build/video/effects/sepia.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts +12 -123
- package/build/video/effects/shadereffect.d.ts.map +1 -1
- package/build/video/effects/shine.d.ts +3 -3
- package/build/video/effects/shine.d.ts.map +1 -1
- package/build/video/effects/tintPulse.d.ts +4 -4
- package/build/video/effects/tintPulse.d.ts.map +1 -1
- package/build/video/effects/vignette.d.ts +6 -6
- package/build/video/effects/vignette.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +4 -4
- package/build/video/effects/wave.d.ts.map +1 -1
- package/build/video/effects/wgsl/layout.d.ts +1 -27
- package/build/video/effects/wgsl/layout.d.ts.map +1 -1
- package/build/video/effects/wgsl/parse.d.ts +1 -8
- package/build/video/effects/wgsl/parse.d.ts.map +1 -1
- package/build/video/effects/wgsl/scaffold.d.ts +1 -42
- package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
- package/build/video/effects/wgsl_realization.d.ts +1 -82
- package/build/video/effects/wgsl_realization.d.ts.map +1 -1
- package/build/video/gpu/batcher.d.ts +1 -13
- package/build/video/gpu/batcher.d.ts.map +1 -1
- package/build/video/gpu/instancerecord.d.ts +1 -163
- package/build/video/gpu/instancerecord.d.ts.map +1 -1
- package/build/video/gpu/meshchunk.d.ts +1 -48
- package/build/video/gpu/meshchunk.d.ts.map +1 -1
- package/build/video/gpu/meshvertex.d.ts +1 -53
- package/build/video/gpu/meshvertex.d.ts.map +1 -1
- package/build/video/gpu/primitives.d.ts +1 -59
- package/build/video/gpu/primitives.d.ts.map +1 -1
- package/build/video/gpu/quadcorners.d.ts +1 -10
- package/build/video/gpu/quadcorners.d.ts.map +1 -1
- package/build/video/gpu/textureslots.d.ts +1 -121
- package/build/video/gpu/textureslots.d.ts.map +1 -1
- package/build/video/gpu/texturestore.d.ts +1 -138
- package/build/video/gpu/texturestore.d.ts.map +1 -1
- package/build/video/gpu/topology.d.ts.map +1 -1
- package/build/video/gpu/vertexformat.d.ts +0 -28
- package/build/video/gpu/vertexformat.d.ts.map +1 -1
- package/build/video/gradient.d.ts +0 -81
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/renderer.d.ts +21 -102
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +0 -51
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +0 -10
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/render_target_pool.d.ts +1 -82
- package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
- package/build/video/rendertarget/webglrendertarget.d.ts +1 -64
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +0 -8
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +2 -76
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +0 -136
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/texture/frametexture.d.ts +1 -71
- package/build/video/texture/frametexture.d.ts.map +1 -1
- package/build/video/texture/noise_texture2d.d.ts +0 -43
- package/build/video/texture/noise_texture2d.d.ts.map +1 -1
- package/build/video/texture/parser/aseprite.d.ts +1 -8
- package/build/video/texture/parser/aseprite.d.ts.map +1 -1
- package/build/video/texture/parser/spritesheet.d.ts +1 -8
- package/build/video/texture/parser/spritesheet.d.ts.map +1 -1
- package/build/video/texture/parser/texturepacker.d.ts +1 -8
- package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
- package/build/video/texture/resource.d.ts +0 -9
- package/build/video/texture/resource.d.ts.map +1 -1
- package/build/video/texture/texture2d.d.ts +0 -11
- package/build/video/texture/texture2d.d.ts.map +1 -1
- package/build/video/utils/autodetect.d.ts +1 -5
- package/build/video/utils/autodetect.d.ts.map +1 -1
- package/build/video/webgl/batchers/batcher.d.ts +0 -55
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +0 -14
- package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +0 -72
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +0 -89
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts +14 -343
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/primitive_batcher.d.ts +0 -10
- package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +0 -30
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +1 -36
- package/build/video/webgl/buffer/index.d.ts.map +1 -1
- package/build/video/webgl/buffer/instance_buffer.d.ts +1 -53
- package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -1
- package/build/video/webgl/buffer/retained_geometry.d.ts +1 -81
- package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -1
- package/build/video/webgl/buffer/uniformblock.d.ts +1 -80
- package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -1
- package/build/video/webgl/buffer/vertexstate.d.ts +1 -100
- package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -1
- package/build/video/webgl/glshader.d.ts +2 -51
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/lighting/pack3d.d.ts +1 -47
- package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
- package/build/video/webgl/lighting/std140.d.ts +1 -109
- package/build/video/webgl/lighting/std140.d.ts.map +1 -1
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +1 -103
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
- package/build/video/webgl/shaders/multitexture-lit.d.ts +1 -26
- package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
- package/build/video/webgl/shaders/multitexture.d.ts +1 -9
- package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
- package/build/video/webgl/texture/store.d.ts +1 -50
- package/build/video/webgl/texture/store.d.ts.map +1 -1
- package/build/video/webgl/utils/attributes.d.ts +1 -11
- package/build/video/webgl/utils/attributes.d.ts.map +1 -1
- package/build/video/webgl/utils/maxtextures.d.ts +1 -36
- package/build/video/webgl/utils/maxtextures.d.ts.map +1 -1
- package/build/video/webgl/utils/precision.d.ts +1 -14
- package/build/video/webgl/utils/precision.d.ts.map +1 -1
- package/build/video/webgl/utils/program.d.ts +1 -5
- package/build/video/webgl/utils/program.d.ts.map +1 -1
- package/build/video/webgl/utils/samplercache.d.ts +1 -68
- package/build/video/webgl/utils/samplercache.d.ts.map +1 -1
- package/build/video/webgl/utils/string.d.ts +1 -21
- package/build/video/webgl/utils/string.d.ts.map +1 -1
- package/build/video/webgl/utils/topology.d.ts +1 -23
- package/build/video/webgl/utils/topology.d.ts.map +1 -1
- package/build/video/webgl/utils/uniforms.d.ts +1 -25
- package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
- package/build/video/webgl/utils/vertexformat.d.ts +1 -26
- package/build/video/webgl/utils/vertexformat.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +24 -286
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +0 -6
- package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +0 -8
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +1 -230
- 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 +0 -82
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/buffer/arena.d.ts +1 -63
- package/build/video/webgpu/buffer/arena.d.ts.map +1 -1
- package/build/video/webgpu/buffer/instance_buffer.d.ts +1 -64
- package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -1
- package/build/video/webgpu/buffer/retained_geometry.d.ts +1 -54
- package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -1
- package/build/video/webgpu/buffer/uniformring.d.ts +1 -67
- package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
- package/build/video/webgpu/effect_binding.d.ts +1 -16
- package/build/video/webgpu/effect_binding.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/bindgroups.d.ts +1 -32
- package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/cache.d.ts +1 -163
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +1 -87
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
- package/build/video/webgpu/shaders/mesh-instanced.d.ts +1 -43
- package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -1
- package/build/video/webgpu/texture/compressed.d.ts +1 -32
- package/build/video/webgpu/texture/compressed.d.ts.map +1 -1
- package/build/video/webgpu/texture/frametexture.d.ts +1 -62
- package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
- package/build/video/webgpu/texture/store.d.ts +1 -147
- package/build/video/webgpu/texture/store.d.ts.map +1 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +2 -89
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +8 -11
- package/skills/AGENTS.md +67 -0
- package/skills/melonjs/SKILL.md +156 -0
- package/skills/melonjs-20-migration/SKILL.md +160 -0
- package/skills/melonjs-3d/SKILL.md +525 -0
- package/skills/melonjs-3d-assets/SKILL.md +258 -0
- package/skills/melonjs-audio/SKILL.md +236 -0
- package/skills/melonjs-camera-and-drawing/SKILL.md +175 -0
- package/skills/melonjs-deployment/SKILL.md +113 -0
- package/skills/melonjs-effects-and-shaders/SKILL.md +178 -0
- package/skills/melonjs-events/SKILL.md +159 -0
- package/skills/melonjs-getting-started/SKILL.md +183 -0
- package/skills/melonjs-input/SKILL.md +166 -0
- package/skills/melonjs-lighting/SKILL.md +139 -0
- package/skills/melonjs-loading-assets/SKILL.md +186 -0
- package/skills/melonjs-particles-and-trails/SKILL.md +136 -0
- package/skills/melonjs-performance/SKILL.md +183 -0
- package/skills/melonjs-physics/SKILL.md +321 -0
- package/skills/melonjs-plugins/SKILL.md +191 -0
- package/skills/melonjs-renderables/SKILL.md +214 -0
- package/skills/melonjs-renderer-backends/SKILL.md +173 -0
- package/skills/melonjs-scenes-and-state/SKILL.md +180 -0
- package/skills/melonjs-sprites-and-animation/SKILL.md +173 -0
- package/skills/melonjs-tilemaps/SKILL.md +213 -0
- package/skills/melonjs-ui-and-text/SKILL.md +65 -0
- package/build/audio/backend.d.ts +0 -140
- package/build/audio/backend.d.ts.map +0 -1
- package/build/loader/parsers/fetchdata.d.ts +0 -32
- package/build/loader/parsers/fetchdata.d.ts.map +0 -1
|
@@ -14,286 +14,6 @@ declare class Detector {
|
|
|
14
14
|
* @type {ResponseObject}
|
|
15
15
|
*/
|
|
16
16
|
response: ResponseObject;
|
|
17
|
-
/**
|
|
18
|
-
* Pairs (key → [renderableA, renderableB]) that were colliding in
|
|
19
|
-
* the previous step. Diffed against `_frameSeen` at end of step
|
|
20
|
-
* to fire `onCollisionEnd` for pairs that just separated.
|
|
21
|
-
* @ignore
|
|
22
|
-
*/
|
|
23
|
-
_activePairs: Map<any, any>;
|
|
24
|
-
/**
|
|
25
|
-
* Pairs seen during the current step. Built up as the per-object
|
|
26
|
-
* `collisions()` calls run; consumed by `endFrame()`.
|
|
27
|
-
* @ignore
|
|
28
|
-
*/
|
|
29
|
-
_frameSeen: Map<any, any>;
|
|
30
|
-
/**
|
|
31
|
-
* Two-slot pool of "symmetric view" objects passed to the new
|
|
32
|
-
* collision lifecycle handlers (`onCollisionStart` /
|
|
33
|
-
* `onCollisionActive` / `onCollisionEnd`). Each view carries the
|
|
34
|
-
* receiver-symmetric form: `a` = receiver, `b` = partner,
|
|
35
|
-
* `normal` = MTV of receiver, `depth` = penetration scalar,
|
|
36
|
-
* plus the SAT-legacy `overlapN` / `overlapV` / `overlap` fields
|
|
37
|
-
* flipped to match the same convention.
|
|
38
|
-
*
|
|
39
|
-
* Two slots are needed because both views may be live at the
|
|
40
|
-
* same time (one handler can dispatch into the other through
|
|
41
|
-
* world mutation). Slot 0 is used for the original-a-side
|
|
42
|
-
* dispatch, slot 1 for the original-b-side.
|
|
43
|
-
* @ignore
|
|
44
|
-
*/
|
|
45
|
-
_symViews: {
|
|
46
|
-
a: null;
|
|
47
|
-
b: null;
|
|
48
|
-
overlap: number;
|
|
49
|
-
overlapN: {
|
|
50
|
-
x: number;
|
|
51
|
-
y: number;
|
|
52
|
-
};
|
|
53
|
-
overlapV: {
|
|
54
|
-
x: number;
|
|
55
|
-
y: number;
|
|
56
|
-
};
|
|
57
|
-
normal: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
};
|
|
61
|
-
depth: number;
|
|
62
|
-
overlapNZ: number;
|
|
63
|
-
overlapZ: number;
|
|
64
|
-
normalZ: number;
|
|
65
|
-
indexShapeA: number;
|
|
66
|
-
indexShapeB: number;
|
|
67
|
-
isTriggerContact: boolean;
|
|
68
|
-
}[];
|
|
69
|
-
/**
|
|
70
|
-
* Shape-pair contacts that were overlapping in the previous step (#1596).
|
|
71
|
-
* Keyed by `_shapePairKey`, diffed against `_frameShapeSeen` in
|
|
72
|
-
* `endFrame()` to fire `onShapeCollisionEnd`. Populated only when someone
|
|
73
|
-
* subscribes, so a game that does not use the feature keeps these empty.
|
|
74
|
-
* @ignore
|
|
75
|
-
*/
|
|
76
|
-
_activeShapePairs: Map<any, any>;
|
|
77
|
-
/** @ignore */
|
|
78
|
-
_frameShapeSeen: Map<any, any>;
|
|
79
|
-
/**
|
|
80
|
-
* Two-slot pool of receiver-symmetric shape-contact views, mirroring
|
|
81
|
-
* `_symViews`: `a` is the receiver, `b` the partner, and `shapeA` /
|
|
82
|
-
* `indexShapeA` are always the RECEIVER's shape. Two slots because both
|
|
83
|
-
* sides may be live at once when a handler mutates the world.
|
|
84
|
-
* @ignore
|
|
85
|
-
*/
|
|
86
|
-
_shapeViews: {
|
|
87
|
-
a: null;
|
|
88
|
-
b: null;
|
|
89
|
-
shapeA: null;
|
|
90
|
-
shapeB: null;
|
|
91
|
-
overlap: number;
|
|
92
|
-
overlapN: {
|
|
93
|
-
x: number;
|
|
94
|
-
y: number;
|
|
95
|
-
};
|
|
96
|
-
overlapV: {
|
|
97
|
-
x: number;
|
|
98
|
-
y: number;
|
|
99
|
-
};
|
|
100
|
-
normal: {
|
|
101
|
-
x: number;
|
|
102
|
-
y: number;
|
|
103
|
-
};
|
|
104
|
-
depth: number;
|
|
105
|
-
overlapNZ: number;
|
|
106
|
-
overlapZ: number;
|
|
107
|
-
normalZ: number;
|
|
108
|
-
indexShapeA: number;
|
|
109
|
-
indexShapeB: number;
|
|
110
|
-
isTrigger: boolean;
|
|
111
|
-
}[];
|
|
112
|
-
/**
|
|
113
|
-
* The pair currently being enumerated, so the contact callback can be a
|
|
114
|
-
* single pre-bound function rather than a closure allocated per body pair
|
|
115
|
-
* per frame.
|
|
116
|
-
* @ignore
|
|
117
|
-
*/
|
|
118
|
-
_contactObjA: Container | Renderable | Entity | Sprite | NineSliceSprite | null;
|
|
119
|
-
_contactObjB: any;
|
|
120
|
-
/** @ignore */
|
|
121
|
-
_onShapeContact: (shapeA: any, indexA: any, shapeB: any, indexB: any, isTrigger: any, res: any) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Populate one of the pooled symmetric views from a SAT response.
|
|
124
|
-
* `flip=false` builds the view for `response.a`'s side (legacy
|
|
125
|
-
* fields kept as-is, `normal = -overlapN` = MTV of original a).
|
|
126
|
-
* `flip=true` builds it for `response.b`'s side: `a` / `b` swap,
|
|
127
|
-
* `overlapN` / `overlapV` negated, `normal = +overlapN` (the MTV
|
|
128
|
-
* of original b).
|
|
129
|
-
* @ignore
|
|
130
|
-
*/
|
|
131
|
-
_fillSymView(slot: any, satResponse: any, flip: any): {
|
|
132
|
-
a: null;
|
|
133
|
-
b: null;
|
|
134
|
-
overlap: number;
|
|
135
|
-
overlapN: {
|
|
136
|
-
x: number;
|
|
137
|
-
y: number;
|
|
138
|
-
};
|
|
139
|
-
overlapV: {
|
|
140
|
-
x: number;
|
|
141
|
-
y: number;
|
|
142
|
-
};
|
|
143
|
-
normal: {
|
|
144
|
-
x: number;
|
|
145
|
-
y: number;
|
|
146
|
-
};
|
|
147
|
-
depth: number;
|
|
148
|
-
overlapNZ: number;
|
|
149
|
-
overlapZ: number;
|
|
150
|
-
normalZ: number;
|
|
151
|
-
indexShapeA: number;
|
|
152
|
-
indexShapeB: number;
|
|
153
|
-
isTriggerContact: boolean;
|
|
154
|
-
};
|
|
155
|
-
/**
|
|
156
|
-
* Called by the adapter at the start of a physics step. Resets the
|
|
157
|
-
* "seen this frame" set so the end-of-step diff can fire
|
|
158
|
-
* `onCollisionEnd` for pairs that no longer overlap.
|
|
159
|
-
* @ignore
|
|
160
|
-
*/
|
|
161
|
-
beginFrame(): void;
|
|
162
|
-
/**
|
|
163
|
-
* Called by the adapter at the end of a physics step. Diffs the
|
|
164
|
-
* "seen this frame" set against the previous-frame active pairs:
|
|
165
|
-
* - pairs in active but not seen → fire onCollisionEnd
|
|
166
|
-
* - swap active ← seen for the next step's diff
|
|
167
|
-
* @ignore
|
|
168
|
-
*/
|
|
169
|
-
endFrame(): void;
|
|
170
|
-
/**
|
|
171
|
-
* Identity-only shape-contact view for `onShapeCollisionEnd`: the shapes
|
|
172
|
-
* have separated, so every geometric field is zeroed rather than left
|
|
173
|
-
* holding the last overlap, which would read as a live contact.
|
|
174
|
-
* @ignore
|
|
175
|
-
*/
|
|
176
|
-
_fillEndedView(slot: any, receiver: any, partner: any, ownShape: any, otherShape: any): {
|
|
177
|
-
a: null;
|
|
178
|
-
b: null;
|
|
179
|
-
shapeA: null;
|
|
180
|
-
shapeB: null;
|
|
181
|
-
overlap: number;
|
|
182
|
-
overlapN: {
|
|
183
|
-
x: number;
|
|
184
|
-
y: number;
|
|
185
|
-
};
|
|
186
|
-
overlapV: {
|
|
187
|
-
x: number;
|
|
188
|
-
y: number;
|
|
189
|
-
};
|
|
190
|
-
normal: {
|
|
191
|
-
x: number;
|
|
192
|
-
y: number;
|
|
193
|
-
};
|
|
194
|
-
depth: number;
|
|
195
|
-
overlapNZ: number;
|
|
196
|
-
overlapZ: number;
|
|
197
|
-
normalZ: number;
|
|
198
|
-
indexShapeA: number;
|
|
199
|
-
indexShapeB: number;
|
|
200
|
-
isTrigger: boolean;
|
|
201
|
-
};
|
|
202
|
-
/**
|
|
203
|
-
* Build a stable order-independent key for a pair of renderables,
|
|
204
|
-
* using their GUID. Returns undefined if either lacks a GUID (defensive
|
|
205
|
-
* — detached or pool-recycled objects mid-step).
|
|
206
|
-
* @ignore
|
|
207
|
-
*/
|
|
208
|
-
_pairKey(a: any, b: any): string | undefined;
|
|
209
|
-
/**
|
|
210
|
-
* Re-run the narrowphase for a remembered shape pair and repopulate
|
|
211
|
-
* `response` from it.
|
|
212
|
-
*
|
|
213
|
-
* The scan clears `response` on every test, so whichever pair won has to be
|
|
214
|
-
* measured again before handlers and the solver read it. Indices are looked
|
|
215
|
-
* up here rather than carried from the scan because an enumeration handler
|
|
216
|
-
* may have mutated either body in between: `removeShape()` re-indexes, and
|
|
217
|
-
* `destroy()` empties the array outright. A shape that is no longer on its
|
|
218
|
-
* body has no contact left to resolve, so this reports failure and the
|
|
219
|
-
* caller falls through instead of throwing.
|
|
220
|
-
* @ignore
|
|
221
|
-
* @returns {boolean} true when the pair was re-measured
|
|
222
|
-
*/
|
|
223
|
-
_retest(bodyA: any, bodyB: any, shapeA: any, shapeB: any, response: any): boolean;
|
|
224
|
-
/**
|
|
225
|
-
* Stable, order-independent key for one SHAPE pair (#1596).
|
|
226
|
-
*
|
|
227
|
-
* The renderable GUIDs order the pair, exactly as `_pairKey` does, and the
|
|
228
|
-
* two shape ids MUST swap alongside them: keying `guidA|guidB|idA|idB`
|
|
229
|
-
* without that swap gives the same physical contact two different keys
|
|
230
|
-
* depending on which object the outer loop visited first, and the contact
|
|
231
|
-
* would then End and Start every step.
|
|
232
|
-
*
|
|
233
|
-
* Shape identity is `_contactId`, stamped once in `Body#addShape` and never
|
|
234
|
-
* derived from array position, because `removeShape()` re-indexes every
|
|
235
|
-
* surviving shape.
|
|
236
|
-
* @ignore
|
|
237
|
-
*/
|
|
238
|
-
_shapePairKey(a: any, b: any, shapeA: any, shapeB: any): string | undefined;
|
|
239
|
-
/**
|
|
240
|
-
* True when an object subscribes to any shape-contact event.
|
|
241
|
-
*
|
|
242
|
-
* This is the opt-in gate: `collides()` only runs the full M x N scan when
|
|
243
|
-
* this returns true for one of the two objects, so an application that
|
|
244
|
-
* never declares these handlers performs exactly the narrowphase work it
|
|
245
|
-
* did before the feature existed.
|
|
246
|
-
* @ignore
|
|
247
|
-
*/
|
|
248
|
-
_wantsShapeContacts(obj: any): boolean;
|
|
249
|
-
/**
|
|
250
|
-
* Populate a pooled shape-contact view, same flip convention as
|
|
251
|
-
* `_fillSymView`: `flip=false` builds the view for `response.a`'s side,
|
|
252
|
-
* `flip=true` for `response.b`'s, so `shapeA` is always the receiver's.
|
|
253
|
-
* @ignore
|
|
254
|
-
*/
|
|
255
|
-
_fillShapeView(slot: any, satResponse: any, flip: any, shapeA: any, shapeB: any, isTrigger: any): {
|
|
256
|
-
a: null;
|
|
257
|
-
b: null;
|
|
258
|
-
shapeA: null;
|
|
259
|
-
shapeB: null;
|
|
260
|
-
overlap: number;
|
|
261
|
-
overlapN: {
|
|
262
|
-
x: number;
|
|
263
|
-
y: number;
|
|
264
|
-
};
|
|
265
|
-
overlapV: {
|
|
266
|
-
x: number;
|
|
267
|
-
y: number;
|
|
268
|
-
};
|
|
269
|
-
normal: {
|
|
270
|
-
x: number;
|
|
271
|
-
y: number;
|
|
272
|
-
};
|
|
273
|
-
depth: number;
|
|
274
|
-
overlapNZ: number;
|
|
275
|
-
overlapZ: number;
|
|
276
|
-
normalZ: number;
|
|
277
|
-
indexShapeA: number;
|
|
278
|
-
indexShapeB: number;
|
|
279
|
-
isTrigger: boolean;
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* Fire Start / Active for one overlapping shape pair. Called back from
|
|
283
|
-
* `collides()` once per pair, in scan order.
|
|
284
|
-
* @ignore
|
|
285
|
-
*/
|
|
286
|
-
_dispatchShapeContact(shapeA: any, shapeB: any, isTrigger: any, response: any): void;
|
|
287
|
-
/**
|
|
288
|
-
* Drop the references the enumeration callback reads.
|
|
289
|
-
*
|
|
290
|
-
* They are plain fields rather than a per-pair closure so the hot path
|
|
291
|
-
* allocates nothing, which means they outlive the pair unless cleared, and
|
|
292
|
-
* would hold two renderables (and everything they reach) against garbage
|
|
293
|
-
* collection until the next subscribed pair happened to overwrite them.
|
|
294
|
-
* @ignore
|
|
295
|
-
*/
|
|
296
|
-
_clearContactPair(): void;
|
|
297
17
|
/**
|
|
298
18
|
* determine if two objects should collide (based on both respective objects body collision mask and type).<br>
|
|
299
19
|
* you can redefine this function if you need any specific rules over what should collide with what.
|
|
@@ -309,38 +29,6 @@ declare class Detector {
|
|
|
309
29
|
* @returns {boolean} true if colliding
|
|
310
30
|
*/
|
|
311
31
|
collides(bodyA: Body, bodyB: Body, response?: ResponseObject, onContact?: undefined): boolean;
|
|
312
|
-
/**
|
|
313
|
-
* find all the collisions for the specified object using a broadphase algorithm
|
|
314
|
-
* @ignore
|
|
315
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} objA - object to be tested for collision
|
|
316
|
-
* @returns {boolean} in case of collision, false otherwise
|
|
317
|
-
*/
|
|
318
|
-
collisions(objA: Renderable | Container | Entity | Sprite | NineSliceSprite): boolean;
|
|
319
|
-
/**
|
|
320
|
-
* Checks for object colliding with the given line
|
|
321
|
-
* @ignore
|
|
322
|
-
* @param {Line} line - line to be tested for collision
|
|
323
|
-
* @param {Array.<Renderable>} [result] - a user defined array that will be populated with intersecting physic objects.
|
|
324
|
-
* @returns {Array.<Renderable>} an array of intersecting physic objects
|
|
325
|
-
* @example
|
|
326
|
-
* // define a line accross the viewport
|
|
327
|
-
* let ray = new Line(
|
|
328
|
-
* // absolute position of the line
|
|
329
|
-
* 0, 0, [
|
|
330
|
-
* // starting point relative to the initial position
|
|
331
|
-
* new Vector2d(0, 0),
|
|
332
|
-
* // ending point
|
|
333
|
-
* new Vector2d(app.viewport.width, app.viewport.height)
|
|
334
|
-
* ]);
|
|
335
|
-
*
|
|
336
|
-
* // check for collition
|
|
337
|
-
* result = me.collision.rayCast(ray);
|
|
338
|
-
*
|
|
339
|
-
* if (result.length > 0) {
|
|
340
|
-
* // ...
|
|
341
|
-
* }
|
|
342
|
-
*/
|
|
343
|
-
rayCast(line: Line, result?: Array<Renderable>): Array<Renderable>;
|
|
344
32
|
}
|
|
345
33
|
import type Container from "../../renderable/container.js";
|
|
346
34
|
import ResponseObject from "../response.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/detector.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/detector.js"],"names":[],"mappings":";AA0EA;;GAEG;AACH;IACC;;OAEG;IACH,mBAFW,SAAS,EA2KnB;IAvKA,iBAAkB;IAElB;;;;OAIG;IACH,UAFU,cAAc,CAEY;IAEpC;;;;;;OAMG;IACH,4BAA6B;IAC7B;;;;;OAKG;IACH,0BAA2B;IAC3B;;;;;;;;;;;;;;;OAeG;IACH;;;;;;;;;;;;;;;;;;;;;;;QAsCC;IAED;;;;;;;OAOG;IACH,iCAAkC;IAClC;;;OAGG;IACH,+BAAgC;IAEhC;;;;;;;OAOG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;QAmCC;IAED;;;;;;OAMG;IACH,gFAAwB;IACxB;;;OAGG;IACH,kBAAwB;IACxB;;;OAGG;IACH,wGASC;IAGF;;;;;;;;;OASG;IACH;;;;;;;;;;;;;;;;;;;;;;;MA0CC;IAED;;;;;;OAMG;IACH,mBAGC;IAED;;;;;;;OAOG;IACH,iBA0DC;IAED;;;;;;OAMG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;MAsBC;IAED;;;;;;OAMG;IACH,6CAOC;IAED;;;;;;;;;;;;;;OAcG;IACH,0EAFa,OAAO,CAuBnB;IAED;;;;;;;;;;;;;;OAcG;IACH,4EAqBC;IAED;;;;;;;;;OASG;IACH,uCAMC;IAED;;;;;;OAMG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;MA2CC;IAED;;;;;OAKG;IACH,qFAyCC;IAED;;;;;;;;;OASG;IACH,0BAGC;IAED;;;;;;OAMG;IACH,iBAJW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,KAClD,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,GAChD,OAAO,CAiBnB;IAED;;;;;OAKG;IACH,gBAJW,IAAI,SACJ,IAAI,qDACF,OAAO,CAyJnB;IAED;;;;;;OAMG;IACH,iBAHW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,GAChD,OAAO,CA6QnB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,cArBW,IAAI,WACJ,KAAK,CAAE,UAAU,CAAC,GAChB,KAAK,CAAE,UAAU,CAAC,CAqC9B;CACD;2BA3jCyB,+BAA+B;2BA9D9B,gBAAgB;4BA+DhB,gCAAgC;wBAFpC,mCAAmC;wBAGnC,4BAA4B;iCACnB,qCAAqC;0BAC9C,0BAA0B"}
|
|
@@ -1,51 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Checks whether polygons collide.
|
|
3
|
-
* @ignore
|
|
4
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A.
|
|
5
|
-
* @param {Polygon} polyA - a reference to the object A Polygon to be tested
|
|
6
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B.
|
|
7
|
-
* @param {Polygon} polyB - a reference to the object B Polygon to be tested
|
|
8
|
-
* @param {Response=} response - Response object (optional) that will be populated if they intersect.
|
|
9
|
-
* @returns {boolean} true if they intersect, false if they don't.
|
|
10
|
-
*/
|
|
11
|
-
export function testPolygonPolygon(a: Renderable | Container | Entity | Sprite | NineSliceSprite, polyA: Polygon, b: Renderable | Container | Entity | Sprite | NineSliceSprite, polyB: Polygon, response?: Response | undefined): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Check if two Ellipse collide.
|
|
14
|
-
* @ignore
|
|
15
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A.
|
|
16
|
-
* @param {Ellipse} ellipseA - a reference to the object A Ellipse to be tested
|
|
17
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B.
|
|
18
|
-
* @param {Ellipse} ellipseB - a reference to the object B Ellipse to be tested
|
|
19
|
-
* @param {Response=} response - Response object (optional) that will be populated if
|
|
20
|
-
* the circles intersect.
|
|
21
|
-
* @returns {boolean} true if the circles intersect, false if they don't.
|
|
22
|
-
*/
|
|
23
|
-
export function testEllipseEllipse(a: Renderable | Container | Entity | Sprite | NineSliceSprite, ellipseA: Ellipse, b: Renderable | Container | Entity | Sprite | NineSliceSprite, ellipseB: Ellipse, response?: Response | undefined): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Check if a polygon and an ellipse collide.
|
|
26
|
-
* @ignore
|
|
27
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A.
|
|
28
|
-
* @param {Polygon} polyA - a reference to the object A Polygon to be tested
|
|
29
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B.
|
|
30
|
-
* @param {Ellipse} ellipseB - a reference to the object B Ellipse to be tested
|
|
31
|
-
* @param {Response=} response - Response object (optional) that will be populated if they intersect.
|
|
32
|
-
* @returns {boolean} true if they intersect, false if they don't.
|
|
33
|
-
*/
|
|
34
|
-
export function testPolygonEllipse(a: Renderable | Container | Entity | Sprite | NineSliceSprite, polyA: Polygon, b: Renderable | Container | Entity | Sprite | NineSliceSprite, ellipseB: Ellipse, response?: Response | undefined): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Check if an ellipse and a polygon collide. <br>
|
|
37
|
-
* **NOTE:** This is slightly less efficient than testPolygonEllipse as it just
|
|
38
|
-
* runs testPolygonEllipse and reverses the response at the end.
|
|
39
|
-
* @ignore
|
|
40
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A.
|
|
41
|
-
* @param {Ellipse} ellipseA - a reference to the object A Ellipse to be tested
|
|
42
|
-
* @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B.
|
|
43
|
-
* @param {Polygon} polyB - a reference to the object B Polygon to be tested
|
|
44
|
-
* @param {Response=} response - Response object (optional) that will be populated if
|
|
45
|
-
* they intersect.
|
|
46
|
-
* @returns {boolean} true if they intersect, false if they don't.
|
|
47
|
-
*/
|
|
48
|
-
export function testEllipsePolygon(a: Renderable | Container | Entity | Sprite | NineSliceSprite, ellipseA: Ellipse, b: Renderable | Container | Entity | Sprite | NineSliceSprite, polyB: Polygon, response?: Response | undefined): boolean;
|
|
1
|
+
|
|
49
2
|
import type Renderable from "../../renderable/renderable.js";
|
|
50
3
|
import type Container from "../../renderable/container.js";
|
|
51
4
|
import type Entity from "../../renderable/entity/entity.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sat.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/sat.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sat.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/sat.js"],"names":[],"mappings":"AA2NA;;;;;;;;;;GAUG;AACH,sCAPW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,aACP,QAAQ,YAAC,GACP,OAAO,CA8CnB;AAED;;;;;;;;;;;GAWG;AACH,sCARW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,aACP,QAAQ,YAAC,GAEP,OAAO,CAiEnB;AAED;;;;;;;;;;GAUG;AACH,sCAPW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,aACP,QAAQ,YAAC,GACP,OAAO,CAsKnB;AAED;;;;;;;;;;;;;GAaG;AACH,sCARW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,aACP,QAAQ,YAAC,GAEP,OAAO,CAiBnB;4BAriB0B,gCAAgC;2BADjC,+BAA+B;wBADlC,mCAAmC;wBAGnC,4BAA4B;iCACnB,qCAAqC;6BAC3C,6BAA6B;6BAC7B,6BAA6B"}
|
|
@@ -1,59 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Check whether two axis-aligned 3D boxes collide.
|
|
3
|
-
*
|
|
4
|
-
* This is the only narrowphase in the engine that can produce a **Z**
|
|
5
|
-
* pushback. The separating-axis set of two AABBs is just the three world axes,
|
|
6
|
-
* so there is no projection loop: penetration on each axis is
|
|
7
|
-
* `(halfA + halfB) - |centerDelta|`, a non-positive value on any axis means
|
|
8
|
-
* separated, and the minimum translation vector is the axis with the smallest
|
|
9
|
-
* positive penetration.
|
|
10
|
-
*
|
|
11
|
-
* The MTV is a single axis, so exactly one of `overlapN.x`, `overlapN.y` and
|
|
12
|
-
* `overlapNZ` comes back non-zero — see {@link ResponseObject#overlapNZ}. When
|
|
13
|
-
* that axis is Z the 2D fields stay at zero, which is what makes a legacy 2D
|
|
14
|
-
* `onCollision` handler safely inert on a depth-only contact rather than
|
|
15
|
-
* wrong.
|
|
16
|
-
* @ignore
|
|
17
|
-
* @param {Renderable} a - a reference to the object A.
|
|
18
|
-
* @param {Box3d} boxA - a reference to the object A Box3d to be tested
|
|
19
|
-
* @param {Renderable} b - a reference to the object B.
|
|
20
|
-
* @param {Box3d} boxB - a reference to the object B Box3d to be tested
|
|
21
|
-
* @param {object} [response] - Response object that will be populated if they intersect.
|
|
22
|
-
* @returns {boolean} true if they intersect, false if they don't.
|
|
23
|
-
*/
|
|
24
|
-
export function testBox3dBox3d(a: Renderable, boxA: Box3d, b: Renderable, boxB: Box3d, response?: object): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Check whether a {@link Box3d} collides with a planar shape.
|
|
27
|
-
*
|
|
28
|
-
* The planar shape is treated as **unbounded along Z** — an infinitely
|
|
29
|
-
* extruded prism of its own outline — so the pair reduces to the ordinary 2D
|
|
30
|
-
* test between the box's XY footprint and that outline, and the box's z can
|
|
31
|
-
* never make it miss. See {@link Box3d} for why that is the compatible
|
|
32
|
-
* reading: it is what keeps an existing 2D game's world shapes colliding
|
|
33
|
-
* unchanged the moment one `Box3d` body is introduced.
|
|
34
|
-
*
|
|
35
|
-
* `overlapZ` is left at `0` by construction, since neither participant has a
|
|
36
|
-
* finite depth to resolve against.
|
|
37
|
-
* @ignore
|
|
38
|
-
*/
|
|
39
|
-
export function testBox3dPolygon(a: any, boxA: any, b: any, polyB: any, response: any): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Planar-shape-first form of {@link testBox3dPolygon}.
|
|
42
|
-
* @ignore
|
|
43
|
-
*/
|
|
44
|
-
export function testPolygonBox3d(a: any, polyA: any, b: any, boxB: any, response: any): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* {@link Box3d} against an {@link Ellipse}, with the ellipse unbounded along
|
|
47
|
-
* Z. See {@link testBox3dPolygon}.
|
|
48
|
-
* @ignore
|
|
49
|
-
*/
|
|
50
|
-
export function testBox3dEllipse(a: any, boxA: any, b: any, ellipseB: any, response: any): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* {@link Ellipse} against a {@link Box3d}, with the ellipse unbounded along
|
|
53
|
-
* Z. See {@link testBox3dPolygon}.
|
|
54
|
-
* @ignore
|
|
55
|
-
*/
|
|
56
|
-
export function testEllipseBox3d(a: any, ellipseA: any, b: any, boxB: any, response: any): boolean;
|
|
1
|
+
|
|
57
2
|
import type Renderable from "../../renderable/renderable.js";
|
|
58
3
|
import type { Box3d } from "../../geometries/box3d.ts";
|
|
59
4
|
//# sourceMappingURL=sat3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sat3d.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/sat3d.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sat3d.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/sat3d.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,kCAPW,UAAU,QACV,KAAK,KACL,UAAU,QACV,KAAK,aACL,MAAM,GACJ,OAAO,CA6EnB;AAED;;;;;;;;;;;;;;GAcG;AACH,gGAEC;AAED;;;;GAIG;AACH,gGAEC;AAED;;;;;GAKG;AACH,mGAEC;AAED;;;;;GAKG;AACH,mGAEC;4BA5K0B,gCAAgC;2BAHnC,2BAA2B"}
|
|
@@ -15,8 +15,6 @@ export namespace collision {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Checks for object colliding with the given line
|
|
18
|
-
* @name rayCast
|
|
19
|
-
* @memberof collision
|
|
20
18
|
* @public
|
|
21
19
|
* @param {Line} line - line to be tested for collision
|
|
22
20
|
* @param {Array.<Renderable>} [result] - a user defined array that will be populated with intersecting physic objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collision.d.ts","sourceRoot":"","sources":["../../src/physics/collision.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"collision.d.ts","sourceRoot":"","sources":["../../src/physics/collision.js"],"names":[],"mappings":";qBAiBW,MAAM;kBASN,MAAM;;;;;;;;;;;;;IAiEhB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,uBArBW,IAAI,WACJ,KAAK,CAAE,UAAU,CAAC,GAChB,KAAK,CAAE,UAAU,CAAC,CAqB9B;;0BAlHqB,yBAAyB;4BACrB,+BAA+B"}
|
|
@@ -100,7 +100,6 @@ declare class ResponseObject {
|
|
|
100
100
|
* Call this between tests if you are going to reuse a single <br>
|
|
101
101
|
* Response object for multiple intersection tests <br>
|
|
102
102
|
* (recommended as it will avoid allocating extra memory) <br>
|
|
103
|
-
* @name clear
|
|
104
103
|
* @public
|
|
105
104
|
* @returns {object} this object for chaining
|
|
106
105
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/physics/response.js"],"names":[],"mappings":";;;;;;;;OAKc,UAAU;;;;OACV,UAAU;;;;aACV,MAAM;;;;cACN,QAAQ;;;;cACR,QAAQ;;;;eACR,MAAM;;;;cACN,MAAM;;;;UACN,OAAO;;;;UACP,OAAO;;;;iBACP,MAAM;;;;iBACN,MAAM;;AAbpB;;;;;;;;;;;;;;GAcG;AACH;IAEE,OAAa;IACb,OAAa;IACb,mBAA8B;IAC9B,mBAA8B;IAC9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,kBAAkB;IAClB,iBAAiB;IACjB,cAAgB;IAChB,cAAgB;IAChB,oBAAqB;IACrB,oBAAqB;IACrB,0BAA6B;IAC7B,gBAA+B;IAGhC
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/physics/response.js"],"names":[],"mappings":";;;;;;;;OAKc,UAAU;;;;OACV,UAAU;;;;aACV,MAAM;;;;cACN,QAAQ;;;;cACR,QAAQ;;;;eACR,MAAM;;;;cACN,MAAM;;;;UACN,OAAO;;;;UACP,OAAO;;;;iBACP,MAAM;;;;iBACN,MAAM;;AAbpB;;;;;;;;;;;;;;GAcG;AACH;IAEE,OAAa;IACb,OAAa;IACb,mBAA8B;IAC9B,mBAA8B;IAC9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,kBAAkB;IAClB,iBAAiB;IACjB,cAAgB;IAChB,cAAgB;IAChB,oBAAqB;IACrB,oBAAqB;IACrB,0BAA6B;IAC7B,gBAA+B;IAGhC;;;;;;;OAOG;IACH,gBAFa,MAAM,CAelB;CACD;yBA1EwB,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/physics/world.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/physics/world.js"],"names":[],"mappings":"AA+BA;;;GAGG;AACH;IACC;;;;;;OAMG;IACH,gBANW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,YACN,cAAc,EAuIxB;IArHA;;;OAGG;IACH,KAFU,WAAW,CAED;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QANU,MAAM,CAMO;IAEvB;;;;;OAKG;IACH,YAAa;IAEb;;;;;;;OAOG;IACH,WAHU,OAAO,CAGK;IAEtB;;;;;;;;;;;;;;OAcG;IACH,YAHU,OAAO,CAGK;IAEtB;;;;;;OAMG;IACH,SAFU,cAAc,CAEsB;IAG9C;;;;;;;;;;;;;;;OAeG;IACH,YAFU,OAAO,4BAA4B,EAAE,UAAU,CAEjB;IAcxC,0BAMC;IA4CF;;;;;;;;;;;OAWG;IACH,cAFa,GAAG,CAAC,IAAI,CAAC,CAOrB;IASD,eALa,QAAQ,EAOpB;IATD;;;OAGG;IACH,eAFa,QAAQ,CAIpB;IAKD;;;;OAIG;IACH,gBAFa,QAAQ,GAAG,SAAS,CAIhC;IAsCD;;;;;;;OAOG;IACH,cAHW,IAAI,GACF,KAAK,CASjB;IAED;;;;;OAKG;IACH,iBAHW,IAAI,GACF,KAAK,CASjB;IAED;;;;;OAKG;IACH,yBAIC;IAuBD;;;OAGG;IACH,SAFW,MAAM,QAWhB;CACD;sBAnXqB,4BAA4B;6BAatB,iCAAiC;oCAI1B,cAAc;sBAH5B,mBAAmB;8BAEX,qBAAqB;0BADzB,uBAAuB"}
|
package/build/plugin/plugin.d.ts
CHANGED
|
@@ -39,8 +39,16 @@ export declare class BasePlugin {
|
|
|
39
39
|
export declare function patch(proto: Record<string, any>, name: string, fn: (...args: any[]) => any): void;
|
|
40
40
|
/**
|
|
41
41
|
* Register a plugin.
|
|
42
|
+
*
|
|
43
|
+
* The registry is module-global, not per-application: a name can only be
|
|
44
|
+
* registered once for the lifetime of the page.
|
|
45
|
+
*
|
|
46
|
+
* Note the ordering — the instance is constructed *before* the base-class and
|
|
47
|
+
* version checks can run, because both read the instance. A plugin whose
|
|
48
|
+
* constructor has side effects (event subscriptions, engine patches) will have
|
|
49
|
+
* applied them by the time `Plugin version mismatch` throws.
|
|
42
50
|
* @param pluginClass - Plugin class to instantiate and register
|
|
43
|
-
* @param name - a unique name for this plugin
|
|
51
|
+
* @param name - a unique name for this plugin; defaults to the class name
|
|
44
52
|
* @param args - all extra parameters will be passed to the plugin constructor
|
|
45
53
|
* @example
|
|
46
54
|
* // register a new plugin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,iCAAiC,CAAC;AAK/D;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAM,CAAC;AAEpD;;GAEG;AAEH;;;GAGG;AACH,qBAAa,UAAU;IACtB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,EAAE,WAAW,CAAC;gBAEL,GAAG,GAAE,WAAkB;CAInC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GACzB,IAAI,CAwBN;AAED
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,iCAAiC,CAAC;AAK/D;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAM,CAAC;AAEpD;;GAEG;AAEH;;;GAGG;AACH,qBAAa,UAAU;IACtB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,EAAE,WAAW,CAAC;gBAEL,GAAG,GAAE,WAAkB;CAInC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GACzB,IAAI,CAwBN;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CACvB,WAAW,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,EAC/C,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,IAAI,EAAE,GAAG,EAAE,GACZ,IAAI,CA2BN;AAED;;;;GAIG;AACH,wBAAgB,GAAG,CAClB,SAAS,EAAE,MAAM,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GACtD,UAAU,GAAG,SAAS,CAUxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/polyfill/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/polyfill/index.ts"],"names":[],"mappings":"AASA,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC"}
|
|
@@ -4,77 +4,5 @@
|
|
|
4
4
|
* Same normalized convention as {@link Renderable#anchorPoint}: x 0=left →
|
|
5
5
|
* 1=right, y 0=top → 1=bottom.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
* Named anchor-point presets accepted anywhere `settings.anchorPoint` is —
|
|
9
|
-
* self-documenting shorthands for the common `{x, y}` pairs.
|
|
10
|
-
* @ignore
|
|
11
|
-
*/
|
|
12
|
-
export declare const ANCHOR_POINT_PRESETS: Readonly<{
|
|
13
|
-
center: Readonly<{
|
|
14
|
-
x: 0.5;
|
|
15
|
-
y: 0.5;
|
|
16
|
-
}>;
|
|
17
|
-
top: Readonly<{
|
|
18
|
-
x: 0.5;
|
|
19
|
-
y: 0;
|
|
20
|
-
}>;
|
|
21
|
-
bottom: Readonly<{
|
|
22
|
-
x: 0.5;
|
|
23
|
-
y: 1;
|
|
24
|
-
}>;
|
|
25
|
-
left: Readonly<{
|
|
26
|
-
x: 0;
|
|
27
|
-
y: 0.5;
|
|
28
|
-
}>;
|
|
29
|
-
right: Readonly<{
|
|
30
|
-
x: 1;
|
|
31
|
-
y: 0.5;
|
|
32
|
-
}>;
|
|
33
|
-
"top-left": Readonly<{
|
|
34
|
-
x: 0;
|
|
35
|
-
y: 0;
|
|
36
|
-
}>;
|
|
37
|
-
"top-right": Readonly<{
|
|
38
|
-
x: 1;
|
|
39
|
-
y: 0;
|
|
40
|
-
}>;
|
|
41
|
-
"bottom-left": Readonly<{
|
|
42
|
-
x: 0;
|
|
43
|
-
y: 1;
|
|
44
|
-
}>;
|
|
45
|
-
"bottom-right": Readonly<{
|
|
46
|
-
x: 1;
|
|
47
|
-
y: 1;
|
|
48
|
-
}>;
|
|
49
|
-
}>;
|
|
50
|
-
/**
|
|
51
|
-
* An anchor value as accepted by `settings.anchorPoint`: a preset name or
|
|
52
|
-
* any object with numeric `x`/`y` (plain object, Vector2d, ObservablePoint).
|
|
53
|
-
* @ignore
|
|
54
|
-
*/
|
|
55
|
-
export type AnchorPointValue = keyof typeof ANCHOR_POINT_PRESETS | {
|
|
56
|
-
x: number;
|
|
57
|
-
y: number;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Resolve a `settings.anchorPoint` value — a preset name or an `{x, y}`
|
|
61
|
-
* object — into a fresh `{x, y}` pair (never a shared/frozen object).
|
|
62
|
-
* Values are passed through unclamped: anchors outside 0..1 are legal.
|
|
63
|
-
*
|
|
64
|
-
* Invalid values (unknown preset, malformed object, non-finite numbers) are
|
|
65
|
-
* handled per surface:
|
|
66
|
-
* - with a `fallback` (the legacy 2D classes): logs a console warning and
|
|
67
|
-
* returns the fallback — full backward compatibility with the historical
|
|
68
|
-
* silent `set(undefined, undefined)` → `(0, 0)` outcome, nothing that
|
|
69
|
-
* constructed before can start throwing;
|
|
70
|
-
* - without (new surfaces, e.g. Sprite3d): throws.
|
|
71
|
-
* @ignore
|
|
72
|
-
*/
|
|
73
|
-
export declare function resolveAnchorPoint(value: unknown, owner?: string, fallback?: {
|
|
74
|
-
x: number;
|
|
75
|
-
y: number;
|
|
76
|
-
}): {
|
|
77
|
-
x: number;
|
|
78
|
-
y: number;
|
|
79
|
-
};
|
|
7
|
+
export {};
|
|
80
8
|
//# sourceMappingURL=anchorPoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchorPoint.d.ts","sourceRoot":"","sources":["../../src/renderable/anchorPoint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"anchorPoint.d.ts","sourceRoot":"","sources":["../../src/renderable/anchorPoint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -13,13 +13,6 @@ export interface AnimationOptions {
|
|
|
13
13
|
loop: boolean;
|
|
14
14
|
/** playback rate multiplier (1 = authored speed). */
|
|
15
15
|
speed: number;
|
|
16
|
-
/**
|
|
17
|
-
* the argument was a bare function — the legacy `Sprite` callback whose
|
|
18
|
-
* `false` return holds the last frame. Carried so callers can preserve that
|
|
19
|
-
* exact contract; not part of the public options shape.
|
|
20
|
-
* @ignore
|
|
21
|
-
*/
|
|
22
|
-
legacyFn?: boolean;
|
|
23
16
|
}
|
|
24
17
|
/**
|
|
25
18
|
* Normalize the polymorphic second argument of `setCurrentAnimation` into a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/renderable/animation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC,yFAAyF;IACzF,UAAU,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;IACzC,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAC;IACd,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/renderable/animation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC,yFAAyF;IACzF,UAAU,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;IACzC,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAC;IACd,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;CASd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,GAAG,CAAC,EACD,MAAM,GACN,CAAC,MAAM,OAAO,CAAC,GACf;IACA,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,GAGD,IAAI,GACL,gBAAgB,CAiBlB"}
|
|
@@ -28,11 +28,6 @@ export default class ColorLayer extends Renderable {
|
|
|
28
28
|
* @param {Camera2d} [viewport] - the viewport to (re)draw
|
|
29
29
|
*/
|
|
30
30
|
draw(renderer: CanvasRenderer | WebGLRenderer, viewport?: Camera2d): void;
|
|
31
|
-
/**
|
|
32
|
-
* Destroy function
|
|
33
|
-
* @ignore
|
|
34
|
-
*/
|
|
35
|
-
destroy(): void;
|
|
36
31
|
}
|
|
37
32
|
import Renderable from "./renderable.js";
|
|
38
33
|
import type { Color } from "./../math/color.ts";
|