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
|
@@ -28,6 +28,32 @@
|
|
|
28
28
|
* Requires a GPU backend (`renderer.supportsInstancing`). Under the Canvas
|
|
29
29
|
* renderer the instances are drawn one at a time through the ordinary CPU
|
|
30
30
|
* mesh path — correct, but without any of the benefit.
|
|
31
|
+
*
|
|
32
|
+
* ### When a plain {@link Mesh} each is the better answer
|
|
33
|
+
*
|
|
34
|
+
* One `InstancedMesh` is **one geometry and one material**, and four things
|
|
35
|
+
* move from per-object to per-group:
|
|
36
|
+
*
|
|
37
|
+
* - **Depth sorting.** The set has a single sort key — its own `pos` — so it
|
|
38
|
+
* orders against the rest of the scene as one object. Opaque instances still
|
|
39
|
+
* resolve against each other per pixel through the depth buffer; blended
|
|
40
|
+
* ones cannot be sorted among themselves at all.
|
|
41
|
+
* - **Ground shadows.** {@link Mesh#castGroundShadow} becomes one instanced
|
|
42
|
+
* shadow draw covering the whole set, not a blob computed per object.
|
|
43
|
+
* - **Removal.** {@link InstancedMesh#removeInstance} swaps the last instance
|
|
44
|
+
* into the hole, so any index a caller was holding now refers to a different
|
|
45
|
+
* object.
|
|
46
|
+
* - **Colour.** {@link Mesh#tint} applies to the set; per-instance colour has
|
|
47
|
+
* to be declared up front with `instanceColors` and set through
|
|
48
|
+
* {@link InstancedMesh#setInstanceColor}.
|
|
49
|
+
*
|
|
50
|
+
* So the question is not how many there are, but whether the game addresses
|
|
51
|
+
* them **individually**. Scenery — trees, rocks, grass, debris — instances
|
|
52
|
+
* cleanly, because nothing ever asks about one of them. Collision-tested props
|
|
53
|
+
* are fine too: the positions are yours either way and instancing only changes
|
|
54
|
+
* how they are drawn. Collectibles and enemies usually are not, because
|
|
55
|
+
* removing them one at a time makes the index swap the caller's problem, and
|
|
56
|
+
* at small counts a pooled `Mesh` each is less code and no slower.
|
|
31
57
|
* @augments Mesh
|
|
32
58
|
* @category Rendering
|
|
33
59
|
* @example
|
|
@@ -53,28 +79,25 @@
|
|
|
53
79
|
* forest.visibleInstanceCount = 1200;
|
|
54
80
|
* app.world.addChild(forest, 10);
|
|
55
81
|
*/
|
|
82
|
+
/**
|
|
83
|
+
* Everything {@link InstancedMesh} takes: the instancing settings, plus every
|
|
84
|
+
* {@link MeshSettings} — they are handed to {@link Mesh} whole, so the type
|
|
85
|
+
* says so by intersection rather than by copying the list.
|
|
86
|
+
* @typedef {object} InstancedMeshOwnSettings
|
|
87
|
+
* @property {number} [instanceCount=0] - number of instances to pre-allocate. Instances start at the group origin (identity transform) until placed; `addInstance` grows past this.
|
|
88
|
+
* @property {boolean} [instanceColors=false] - give each instance its own colour (16 bytes per instance), multiplied into the mesh tint
|
|
89
|
+
* @property {boolean} [instanceData=false] - give each instance an opaque `vec4` (16 bytes per instance). Read as emissive by the built-in lit shading, or as anything at all by a custom mesh shader.
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* @typedef {InstancedMeshOwnSettings & import("./mesh.js").MeshSettings} InstancedMeshSettings
|
|
93
|
+
*/
|
|
56
94
|
export default class InstancedMesh extends Mesh {
|
|
57
95
|
/**
|
|
58
96
|
* @param {number} x - the x coordinate of the group origin
|
|
59
97
|
* @param {number} y - the y coordinate of the group origin
|
|
60
|
-
* @param {
|
|
61
|
-
* @param {number} [settings.instanceCount=0] - number of instances to pre-allocate. Instances start at the group origin (identity transform) until placed; `addInstance` grows past this.
|
|
62
|
-
* @param {boolean} [settings.instanceColors=false] - give each instance its own colour (16 bytes per instance), multiplied into the mesh tint
|
|
63
|
-
* @param {boolean} [settings.instanceData=false] - give each instance an opaque `vec4` (16 bytes per instance). Read as emissive by the built-in lit shading, or as anything at all by a custom mesh shader.
|
|
98
|
+
* @param {InstancedMeshSettings} settings - every {@link Mesh} setting, plus the instancing ones
|
|
64
99
|
*/
|
|
65
|
-
constructor(x: number, y: number, settings:
|
|
66
|
-
instanceCount?: number | undefined;
|
|
67
|
-
instanceColors?: boolean | undefined;
|
|
68
|
-
instanceData?: boolean | undefined;
|
|
69
|
-
});
|
|
70
|
-
/**
|
|
71
|
-
* How this mesh's per-instance records are laid out — record width and
|
|
72
|
-
* the offset of each opt-in slot. Consumed by the batchers to describe
|
|
73
|
-
* the instance vertex buffer.
|
|
74
|
-
* @type {object}
|
|
75
|
-
* @ignore
|
|
76
|
-
*/
|
|
77
|
-
instanceLayout: object;
|
|
100
|
+
constructor(x: number, y: number, settings: InstancedMeshSettings);
|
|
78
101
|
/**
|
|
79
102
|
* The packed instance records, `instanceLayout.floats` per instance.
|
|
80
103
|
* Editable in place for bulk updates — announce those with
|
|
@@ -84,27 +107,6 @@ export default class InstancedMesh extends Mesh {
|
|
|
84
107
|
* @type {Float32Array}
|
|
85
108
|
*/
|
|
86
109
|
instanceBuffer: Float32Array;
|
|
87
|
-
/**
|
|
88
|
-
* bumped whenever the buffer is reallocated, so a renderer holding a
|
|
89
|
-
* GPU copy knows its capacity assumption is stale
|
|
90
|
-
* @type {number}
|
|
91
|
-
* @ignore
|
|
92
|
-
*/
|
|
93
|
-
_instanceVersion: number;
|
|
94
|
-
/** @ignore */
|
|
95
|
-
_instanceRevision: number;
|
|
96
|
-
/** @ignore */
|
|
97
|
-
_spanFromRevision: number;
|
|
98
|
-
/** @ignore */
|
|
99
|
-
_dirtyFirst: number;
|
|
100
|
-
/** @ignore */
|
|
101
|
-
_dirtyLast: number;
|
|
102
|
-
/** @ignore */
|
|
103
|
-
_instanceCount: number;
|
|
104
|
-
/** @ignore */
|
|
105
|
-
_visibleInstanceCount: number;
|
|
106
|
-
/** @ignore */
|
|
107
|
-
_cullRevision: number;
|
|
108
110
|
set instanceCount(count: number);
|
|
109
111
|
/**
|
|
110
112
|
* How many instances this mesh holds.
|
|
@@ -197,50 +199,6 @@ export default class InstancedMesh extends Mesh {
|
|
|
197
199
|
* forest.needsInstanceUpdate = true;
|
|
198
200
|
*/
|
|
199
201
|
set needsInstanceUpdate(value: any);
|
|
200
|
-
/**
|
|
201
|
-
* The dirty span, in floats, as `[first, lastExclusive)`. Empty when
|
|
202
|
-
* nothing changed since the last upload.
|
|
203
|
-
* @returns {number[]} the span
|
|
204
|
-
* @ignore
|
|
205
|
-
*/
|
|
206
|
-
dirtyRange(): number[];
|
|
207
|
-
/**
|
|
208
|
-
* What one GPU buffer must upload to catch up, given the revision it last
|
|
209
|
-
* reached. Replaces a shared "clear the dirty flag" step, which the first
|
|
210
|
-
* consumer would drain out from under the second.
|
|
211
|
-
* @param {number} uploadedRevision - the revision that buffer holds
|
|
212
|
-
* @returns {object} `{first, count, full, revision}` — float span, or `full`
|
|
213
|
-
* @ignore
|
|
214
|
-
*/
|
|
215
|
-
instanceUpload(uploadedRevision: number): object;
|
|
216
|
-
/**
|
|
217
|
-
* Called by the batcher once the dirty span has been uploaded.
|
|
218
|
-
* @ignore
|
|
219
|
-
*/
|
|
220
|
-
clearInstanceDirty(): void;
|
|
221
|
-
/**
|
|
222
|
-
* The world-space bounding box of every instance, so the whole group
|
|
223
|
-
* frustum-culls as one object.
|
|
224
|
-
*
|
|
225
|
-
* Bounds the prototype geometry through each instance transform and then
|
|
226
|
-
* through the group placement — correct before the first draw, like the
|
|
227
|
-
* base implementation, and independent of what any draw left behind.
|
|
228
|
-
* @returns {AABB3d} the union of all instance bounds (reused instance)
|
|
229
|
-
*/
|
|
230
|
-
/**
|
|
231
|
-
* Resize the renderable's own 2D bounds box so it encloses every
|
|
232
|
-
* instance.
|
|
233
|
-
*
|
|
234
|
-
* This is what makes the group frustum-cull correctly. `Camera3d.isVisible`
|
|
235
|
-
* tests a sphere derived from `getBounds()` — the flat width/height box —
|
|
236
|
-
* **not** {@link InstancedMesh#getBounds3d}. Left at the prototype's size,
|
|
237
|
-
* a forest scattered over thousands of units presents a box a few tens of
|
|
238
|
-
* pixels across at the group origin: pan the camera just past that origin
|
|
239
|
-
* and every instance disappears at once, while still on screen.
|
|
240
|
-
* @ignore
|
|
241
|
-
*/
|
|
242
|
-
_refreshCullVolume(): any;
|
|
243
|
-
_cullRadius: number | undefined;
|
|
244
202
|
/**
|
|
245
203
|
* Draw the instanced mesh. Under a GPU backend this is one instanced
|
|
246
204
|
* draw call; the Canvas renderer has no instancing, so each instance is
|
|
@@ -249,38 +207,27 @@ export default class InstancedMesh extends Mesh {
|
|
|
249
207
|
* @param {Camera2d} [viewport] - the camera rendering this frame
|
|
250
208
|
*/
|
|
251
209
|
draw(renderer: CanvasRenderer | WebGLRenderer, viewport?: Camera2d): void;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Everything {@link InstancedMesh} takes: the instancing settings, plus every
|
|
213
|
+
* {@link MeshSettings} — they are handed to {@link Mesh} whole, so the type
|
|
214
|
+
* says so by intersection rather than by copying the list.
|
|
215
|
+
*/
|
|
216
|
+
export type InstancedMeshOwnSettings = {
|
|
252
217
|
/**
|
|
253
|
-
*
|
|
254
|
-
* and draw the prototype once per instance, composing the group and
|
|
255
|
-
* instance transforms by hand. Correct, and as slow as the uninstanced
|
|
256
|
-
* scene it replaces — the point is that a scene authored for instancing
|
|
257
|
-
* still renders everywhere.
|
|
258
|
-
* @param {CanvasRenderer} renderer - a renderer instance
|
|
259
|
-
* @param {Camera2d} [viewport] - the camera rendering this frame
|
|
260
|
-
* @ignore
|
|
218
|
+
* - number of instances to pre-allocate. Instances start at the group origin (identity transform) until placed; `addInstance` grows past this.
|
|
261
219
|
*/
|
|
262
|
-
|
|
220
|
+
instanceCount?: number;
|
|
263
221
|
/**
|
|
264
|
-
*
|
|
265
|
-
* @ignore
|
|
222
|
+
* - give each instance its own colour (16 bytes per instance), multiplied into the mesh tint
|
|
266
223
|
*/
|
|
224
|
+
instanceColors?: boolean;
|
|
267
225
|
/**
|
|
268
|
-
*
|
|
269
|
-
* set, over the instance buffer the mesh itself just drew from (#1515).
|
|
270
|
-
*
|
|
271
|
-
* The group matrix is passed with its Y basis column zeroed and its
|
|
272
|
-
* translation Y set to the ground, so whatever Y the shadow vertex stage
|
|
273
|
-
* produces is flattened onto the floor. That is what lets the ground
|
|
274
|
-
* height reach the shader without a new uniform.
|
|
275
|
-
*
|
|
276
|
-
* One ground height serves the whole set — flat terrain. Per-instance
|
|
277
|
-
* ground height would have to ride the `instanceData` slot, which the
|
|
278
|
-
* built-in shading already reads as emissive.
|
|
279
|
-
* @param {WebGLRenderer} renderer - the active renderer
|
|
280
|
-
* @ignore
|
|
226
|
+
* - give each instance an opaque `vec4` (16 bytes per instance). Read as emissive by the built-in lit shading, or as anything at all by a custom mesh shader.
|
|
281
227
|
*/
|
|
282
|
-
|
|
283
|
-
}
|
|
228
|
+
instanceData?: boolean;
|
|
229
|
+
};
|
|
230
|
+
export type InstancedMeshSettings = InstancedMeshOwnSettings & import("./mesh.js").MeshSettings;
|
|
284
231
|
import Mesh from "./mesh.js";
|
|
285
232
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
286
233
|
//# sourceMappingURL=instanced_mesh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instanced_mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/instanced_mesh.js"],"names":[],"mappings":"AAsBA
|
|
1
|
+
{"version":3,"file":"instanced_mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/instanced_mesh.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH;;;;;;;;GAQG;AAEH;;GAEG;AAEH;IACC;;;;OAIG;IACH,eAJW,MAAM,KACN,MAAM,YACN,qBAAqB,EAyF/B;IApFA;;;;;;;OAOG;IACH,gBAJU,MAAM,CAOf;IAED;;;;;;;OAOG;IACH,gBAFU,YAAY,CAEmB;IAEzC;;;;;;OAMG;IACH,kBAJU,MAAM,CAIS;IAUzB;;;OAGG;IACH,0BAA0B;IAG1B;;;OAGG;IACH,0BAA0B;IAE1B;;;OAGG;IACH,oBAA2B;IAC3B;;;OAGG;IACH,mBAAmB;IAEnB;;;OAGG;IACH,uBAAuB;IACvB;;;OAGG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,sBAAuB;IAoBxB,yBANU,MAAM,EAgDf;IAvDD;;;;;;;;OAQG;IACH,qBAFU,MAAM,CAIf;IA8DD,gCAVU,MAAM,EAiBf;IAvBD;;;;;;;;;OASG;IACH,4BAJU,MAAM,CAQf;IAWD;;;;;;;OAOG;IACH,wBANW,QAAQ,YAEhB;QAAwB,KAAK;QACF,IAAI;KAC/B,GAAU,MAAM,CAqBlB;IAED;;;;;;;;;OASG;IACH,sBAFW,MAAM,QAiBhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,aACN,QAAQ,QAYlB;IAED;;;;;OAKG;IACH,mBAJW,MAAM,QACN,QAAQ,GACN,QAAQ,GAAC,SAAS,CAW9B;IAED;;;;OAIG;IACH,wBAHW,MAAM,SACN,KAAK,QAaf;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,QAahB;IAED;;;;;;OAMG;IACH,0BAHW,MAAM,SACN,MAAM,QAyBhB;IAED;;;;;;;;OAQG;IAEH,oCAIC;IAED;;;;;;OAMG;IACH,cAJa,MAAM,EAAE,CAapB;IAED;;;;;;;;OAQG;IACH,iCALW,MAAM,GACJ,MAAM,CAelB;IAED;;;;OAIG;IACH,2BAIC;IAED;;;;;;;;OAQG;IACH;;;;;;;;;;;;OAYG;IACH,0BAkCC;IAdC;;;OAGG;IACH,gCAAsC;IAqDxC;;;;;;OAMG;IACH,eAHW,cAAc,GAAC,aAAa,aAC5B,QAAQ,QA6BlB;IAED;;;;;;;;;;OAUG;IACH,qCALW,cAAc,aACd,QAAQ,QA8BlB;IAED;;;;OAIG;IACH;;;;;;;;;;;;;;;OAeG;IACH,qCAJW,aAAa,QAsEvB;CAOD;;;;;;;;;;oBA1qBa,MAAM;;;;qBACN,OAAO;;;;mBACP,OAAO;;oCAIR,wBAAwB,GAAG,OAAO,WAAW,EAAE,YAAY;iBAxGvD,WAAW;yBATH,qBAAqB"}
|