melonjs 20.3.0 → 20.5.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 +19 -19
- package/build/application/application.d.ts +0 -17
- package/build/application/application.d.ts.map +1 -1
- package/build/application/settings.d.ts +3 -0
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/audio.d.ts.map +1 -1
- package/build/audio/backend/engine.d.ts +0 -19
- package/build/audio/backend/engine.d.ts.map +1 -1
- package/build/audio/backend/sound.d.ts +1 -51
- package/build/audio/backend/sound.d.ts.map +1 -1
- package/build/audio/backend/spatial.d.ts.map +1 -1
- package/build/audio/backend/types.d.ts +11 -1
- package/build/audio/backend/types.d.ts.map +1 -1
- package/build/audio/backend/voice.d.ts +0 -25
- package/build/audio/backend/voice.d.ts.map +1 -1
- package/build/audio/playback.d.ts.map +1 -1
- package/build/audio/procedural.d.ts +7 -2
- package/build/audio/procedural.d.ts.map +1 -1
- package/build/audio/state.d.ts +6 -79
- package/build/audio/state.d.ts.map +1 -1
- package/build/audio/types.d.ts +22 -0
- package/build/audio/types.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +28 -68
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts +110 -82
- 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/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 +7 -13
- 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 +5 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3697 -563
- package/build/index.js.map +4 -4
- package/build/input/gamepad.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.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +44 -82
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +1 -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 +20 -63
- package/build/lighting/light3d.d.ts.map +1 -1
- package/build/loader/loader.d.ts +146 -37
- 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 +1 -30
- package/build/loader/parsers/audio.d.ts.map +1 -1
- 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/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 +2 -65
- 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/renderable/anchorPoint.d.ts +1 -73
- package/build/renderable/anchorPoint.d.ts.map +1 -1
- package/build/renderable/animation.d.ts +21 -13
- 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 +27 -60
- 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 +55 -108
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +257 -231
- 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 +18 -44
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +0 -45
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +12 -97
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +32 -21
- 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 +75 -20
- 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/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 +5 -50
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts.map +1 -1
- package/build/system/device.d.ts +1 -13
- 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/legacy_pool.d.ts +1 -6
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/platform.d.ts +0 -1
- 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 +44 -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 +1 -31
- package/build/utils/fetchdata.d.ts.map +1 -1
- 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 +2 -23
- 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/colorMatrix.d.ts +0 -10
- package/build/video/effects/colorMatrix.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/mesh_splice.d.ts +2 -0
- package/build/video/effects/mesh_splice.d.ts.map +1 -0
- package/build/video/effects/radialGradient.d.ts +0 -1
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts +12 -241
- package/build/video/effects/shadereffect.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 +15 -77
- 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 +1 -75
- 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 +101 -77
- 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 +7 -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 +22 -285
- 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 +7 -231
- 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 +1 -88
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +5 -4
- package/skills/melonjs/SKILL.md +1 -1
- package/skills/melonjs-3d/SKILL.md +453 -5
- package/skills/melonjs-3d-assets/SKILL.md +164 -6
- package/skills/melonjs-audio/SKILL.md +38 -0
- package/skills/melonjs-camera-and-drawing/SKILL.md +49 -0
- package/skills/melonjs-effects-and-shaders/SKILL.md +95 -2
- package/skills/melonjs-loading-assets/SKILL.md +127 -2
- package/skills/melonjs-performance/SKILL.md +60 -1
- package/skills/melonjs-physics/SKILL.md +78 -0
- package/skills/melonjs-renderables/SKILL.md +63 -1
- package/skills/melonjs-renderer-backends/SKILL.md +19 -0
- package/skills/melonjs-scenes-and-state/SKILL.md +56 -0
- package/skills/melonjs-tilemaps/SKILL.md +31 -11
- package/skills/melonjs-ui-and-text/SKILL.md +131 -117
|
@@ -24,25 +24,6 @@ export default class Body {
|
|
|
24
24
|
* @type {Bounds}
|
|
25
25
|
*/
|
|
26
26
|
public bounds: Bounds;
|
|
27
|
-
/**
|
|
28
|
-
* The collision shapes of the body. Always an array — every
|
|
29
|
-
* mutation path goes through `push` / `includes`. The
|
|
30
|
-
* non-array `Point` that used to be in this union was a
|
|
31
|
-
* mis-doc and broke downstream `shapes.length` reads in
|
|
32
|
-
* TypeScript.
|
|
33
|
-
* @ignore
|
|
34
|
-
* @type {(Polygon|Line|Ellipse|Point)[]}
|
|
35
|
-
*/
|
|
36
|
-
shapes: (Polygon | Line | Ellipse | Point)[];
|
|
37
|
-
/**
|
|
38
|
-
* The body collision mask, that defines what should collide with what.<br>
|
|
39
|
-
* (by default will collide with all entities)
|
|
40
|
-
* @ignore
|
|
41
|
-
* @type {number}
|
|
42
|
-
* @default collision.types.ALL_OBJECT
|
|
43
|
-
* @see collision.types
|
|
44
|
-
*/
|
|
45
|
-
collisionMask: number;
|
|
46
27
|
/**
|
|
47
28
|
* define the collision type of the body for collision filtering
|
|
48
29
|
* @public
|
|
@@ -405,14 +386,6 @@ export default class Body {
|
|
|
405
386
|
* @returns {number}
|
|
406
387
|
*/
|
|
407
388
|
getAngle(): number;
|
|
408
|
-
/**
|
|
409
|
-
* Sync `this.angle` to the renderable's `currentTransform`. Pivot is
|
|
410
|
-
* the body's bounds center (matches the matter adapter's rotation
|
|
411
|
-
* pivot — see `MatterAdapter.syncFromPhysics`). Internal helper used
|
|
412
|
-
* by both the per-step integrator and {@link Body#setAngle}.
|
|
413
|
-
* @ignore
|
|
414
|
-
*/
|
|
415
|
-
_syncAngleTransform(): void;
|
|
416
389
|
/**
|
|
417
390
|
* apply an instantaneous impulse to this body — a single-step velocity
|
|
418
391
|
* change scaled by inverse mass (`dv = J / m`). Useful for one-shot
|
|
@@ -464,26 +437,6 @@ export default class Body {
|
|
|
464
437
|
* @param {boolean} [isSensor=true]
|
|
465
438
|
*/
|
|
466
439
|
setSensor(isSensor?: boolean): void;
|
|
467
|
-
/**
|
|
468
|
-
* Give a stored shape its per-shape collision settings, carrying them over
|
|
469
|
-
* from the source object when `addShape` converted it (a `Rect` and a
|
|
470
|
-
* `Bounds` both become a `Polygon`, so anything set on the original would
|
|
471
|
-
* otherwise be dropped on the floor).
|
|
472
|
-
*
|
|
473
|
-
* Every field is written explicitly, including the defaults. That is not
|
|
474
|
-
* tidiness: converted shapes come from `polygonPool`, whose reset restores
|
|
475
|
-
* only position and vertices — a recycled instance would otherwise arrive
|
|
476
|
-
* still carrying the previous owner's `isTrigger` or mask and quietly
|
|
477
|
-
* change how an unrelated body collides.
|
|
478
|
-
*
|
|
479
|
-
* Idempotent, because `removeShape` re-adds every surviving shape through
|
|
480
|
-
* `addShape` and must not disturb their settings.
|
|
481
|
-
* @param {object} stored - the shape as held in `this.shapes`
|
|
482
|
-
* @param {object} [source] - the object passed to `addShape`; omitted when
|
|
483
|
-
* the shape was built here from a pool and has no user-supplied original
|
|
484
|
-
* @private
|
|
485
|
-
*/
|
|
486
|
-
private _initShapeCollision;
|
|
487
440
|
/**
|
|
488
441
|
* add a collision shape to this body <br>
|
|
489
442
|
* (note: me.Rect objects will be converted to me.Polygon before being added)
|
|
@@ -536,16 +489,6 @@ export default class Body {
|
|
|
536
489
|
* this.body.addShape(me.loader.getJSON("shapesdef").banana);
|
|
537
490
|
*/
|
|
538
491
|
addShape(shape: Rect | Polygon | Line | Ellipse | Point | Point[] | Bounds | object): number;
|
|
539
|
-
/**
|
|
540
|
-
* Recompute the default `pseudoInertia` from the current bounds.
|
|
541
|
-
* Uses the moment-of-inertia formula for a unit-mass rectangle —
|
|
542
|
-
* `(width² + height²) / 12` — which gives a value that scales
|
|
543
|
-
* sensibly with body size: a small body resists rotation less, a
|
|
544
|
-
* large body more. Clamped to a minimum of 1 to keep divisions
|
|
545
|
-
* well-defined even on degenerate 0-size bodies.
|
|
546
|
-
* @ignore
|
|
547
|
-
*/
|
|
548
|
-
_recomputePseudoInertia(): void;
|
|
549
492
|
/**
|
|
550
493
|
* set the body vertices to the given one
|
|
551
494
|
* @param {Vector2d[]} vertices - an array of me.Vector2d points defining a convex hull
|
|
@@ -645,8 +588,7 @@ export default class Body {
|
|
|
645
588
|
forEach(callback: Function, thisArg?: object): void;
|
|
646
589
|
/**
|
|
647
590
|
* Returns true if the any of the shape composing the body contains the given point.
|
|
648
|
-
* @param {number|Vector2d}
|
|
649
|
-
* @param {number} [y] - y coordinate
|
|
591
|
+
* @param {...(number|Vector2d)} args - either `x, y` coordinates, or a single {@link Vector2d}
|
|
650
592
|
* @returns {boolean} true if contains
|
|
651
593
|
* @example
|
|
652
594
|
* if (mySprite.body.contains(10, 10)) {
|
|
@@ -657,7 +599,7 @@ export default class Body {
|
|
|
657
599
|
* // do something
|
|
658
600
|
* }
|
|
659
601
|
*/
|
|
660
|
-
contains(...args:
|
|
602
|
+
contains(...args: (number | Vector2d)[]): boolean;
|
|
661
603
|
/**
|
|
662
604
|
* Rotate this body (counter-clockwise) by the specified angle (in radians).
|
|
663
605
|
* Unless specified the body will be rotated around its center point
|
|
@@ -693,11 +635,6 @@ export default class Body {
|
|
|
693
635
|
* @returns {boolean} true if resulting velocity is different than 0
|
|
694
636
|
*/
|
|
695
637
|
protected update(): boolean;
|
|
696
|
-
/**
|
|
697
|
-
* Destroy function<br>
|
|
698
|
-
* @ignore
|
|
699
|
-
*/
|
|
700
|
-
destroy(): void;
|
|
701
638
|
}
|
|
702
639
|
import type Renderable from "../../renderable/renderable.js";
|
|
703
640
|
import type Container from "../../renderable/container.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/body.js"],"names":[],"mappings":"AA+BA;;;;GAIG;AACH;IACC;;;;OAIG;IACH,sBAJW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,WAClD,IAAI,GAAC,IAAI,EAAE,GAAC,OAAO,GAAC,OAAO,EAAE,GAAC,IAAI,GAAC,IAAI,EAAE,GAAC,OAAO,GAAC,OAAO,EAAE,GAAC,KAAK,GAAC,KAAK,EAAE,GAAC,MAAM,GAAC,MAAM,EAAE,GAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/body.js"],"names":[],"mappings":"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"}
|
|
@@ -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: Renderable | Container | 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"}
|