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
|
@@ -1,139 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Backend-neutral texture residency.
|
|
3
|
-
*
|
|
4
|
-
* There are two separate questions about a texture, and conflating them is
|
|
5
|
-
* what makes a GPU renderer re-upload work it already has:
|
|
6
|
-
*
|
|
7
|
-
* - **which slot is it in, for this draw?** — transient, per-batch, bounded by
|
|
8
|
-
* the shader's sampler count. That is {@link TextureSlotTable}.
|
|
9
|
-
* - **does it exist on the GPU, and is its content current?** — persistent,
|
|
10
|
-
* per-source, bounded by disposal. That is this class.
|
|
11
|
-
*
|
|
12
|
-
* The WebGL backend used to answer both with one field (`boundTextures[unit]`),
|
|
13
|
-
* so dropping a slot assignment destroyed the texture handle and the next draw
|
|
14
|
-
* rebuilt it from scratch — a full re-upload and mip regeneration per quad,
|
|
15
|
-
* once past the batching limit.
|
|
16
|
-
*
|
|
17
|
-
* This class owns the source → record index, the reuse-or-upload decision, and
|
|
18
|
-
* the lifetime bookkeeping. It touches no GL or WebGPU API: each backend
|
|
19
|
-
* supplies `onCreate` / `onUpload` / `onDestroy`, exactly as the slot table
|
|
20
|
-
* takes its binding through callbacks. That keeps the decision logic identical
|
|
21
|
-
* on both backends and testable without a device.
|
|
22
|
-
* @ignore
|
|
23
|
-
*/
|
|
24
|
-
export class TextureStore {
|
|
25
|
-
/**
|
|
26
|
-
* @param {object} [options] - store configuration
|
|
27
|
-
* @param {Function} [options.onCreate] - `(source, options) => handle`, allocate
|
|
28
|
-
* the backing GPU texture for a source seen for the first time
|
|
29
|
-
* @param {Function} [options.onUpload] - `(handle, source, record, options) => handle`,
|
|
30
|
-
* push the source's current content. May return a *replacement* handle when
|
|
31
|
-
* the shape changed and the old one cannot be respecified (immutable
|
|
32
|
-
* storage); returning nothing keeps the existing handle.
|
|
33
|
-
* @param {Function} [options.onDestroy] - `(handle, source)`, release the
|
|
34
|
-
* GPU texture. Called exactly once per handle.
|
|
35
|
-
* @ignore
|
|
36
|
-
*/
|
|
37
|
-
constructor({ onCreate, onUpload, onDestroy }?: {
|
|
38
|
-
onCreate?: Function | undefined;
|
|
39
|
-
onUpload?: Function | undefined;
|
|
40
|
-
onDestroy?: Function | undefined;
|
|
41
|
-
});
|
|
42
|
-
/** @type {Map<object, {handle: *, version: number, generation: number}>} */
|
|
43
|
-
records: Map<object, {
|
|
44
|
-
handle: any;
|
|
45
|
-
version: number;
|
|
46
|
-
generation: number;
|
|
47
|
-
}>;
|
|
48
|
-
/**
|
|
49
|
-
* Allocate the backing GPU texture for a source seen for the first time.
|
|
50
|
-
* @param {object} source - the image/canvas/resource
|
|
51
|
-
* @param {object} options - the resolve options
|
|
52
|
-
* @returns {*} the new handle
|
|
53
|
-
* @ignore
|
|
54
|
-
*/
|
|
55
|
-
onCreate(source: object, options: object): any;
|
|
56
|
-
/**
|
|
57
|
-
* Push the source's current content. May return a REPLACEMENT handle when
|
|
58
|
-
* the shape changed and the old one cannot be respecified.
|
|
59
|
-
* @param {*} handle - the existing handle
|
|
60
|
-
* @param {object} source - the image/canvas/resource
|
|
61
|
-
* @param {object} record - the resident record
|
|
62
|
-
* @param {object} options - the resolve options
|
|
63
|
-
* @returns {*} a replacement handle, or nothing to keep the existing one
|
|
64
|
-
* @ignore
|
|
65
|
-
*/
|
|
66
|
-
onUpload(handle: any, source: object, record: object, options: object): any;
|
|
67
|
-
/**
|
|
68
|
-
* Release a GPU texture. Called exactly once per handle.
|
|
69
|
-
* @param {*} handle - the handle to release
|
|
70
|
-
* @param {object} source - the source it belonged to
|
|
71
|
-
* @ignore
|
|
72
|
-
*/
|
|
73
|
-
onDestroy(handle: any, source: object): void;
|
|
74
|
-
generation: number;
|
|
75
|
-
/**
|
|
76
|
-
* how many sources are currently resident
|
|
77
|
-
* @returns {number} the record count
|
|
78
|
-
* @ignore
|
|
79
|
-
*/
|
|
80
|
-
get size(): number;
|
|
81
|
-
/**
|
|
82
|
-
* The live record for a source, uploading only when it is genuinely needed:
|
|
83
|
-
* the source has never been seen, its content changed, its handle predates
|
|
84
|
-
* the current context, or the caller forced it.
|
|
85
|
-
*
|
|
86
|
-
* A texture that merely moved to a different slot is NOT a reason to upload
|
|
87
|
-
* — that is the whole point of separating residency from slot assignment.
|
|
88
|
-
* @param {object} source - the image/canvas/resource backing the texture
|
|
89
|
-
* @param {object} [options] - resolution options
|
|
90
|
-
* @param {number} [options.version=0] - the source's content revision; a
|
|
91
|
-
* change from the recorded value forces a re-upload
|
|
92
|
-
* @param {boolean} [options.force=false] - re-upload regardless
|
|
93
|
-
* @returns {{handle: *, version: number, generation: number, uploaded: boolean}}
|
|
94
|
-
* the record, with `uploaded` reporting whether this call did GPU work
|
|
95
|
-
* @ignore
|
|
96
|
-
*/
|
|
97
|
-
getResidentRecord(source: object, options?: {
|
|
98
|
-
version?: number | undefined;
|
|
99
|
-
force?: boolean | undefined;
|
|
100
|
-
}): {
|
|
101
|
-
handle: any;
|
|
102
|
-
version: number;
|
|
103
|
-
generation: number;
|
|
104
|
-
uploaded: boolean;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* The record for a source without resolving one, for callers that must not
|
|
108
|
-
* trigger GPU work (bookkeeping, debug, invalidation checks).
|
|
109
|
-
* @param {object} source - the source to look up
|
|
110
|
-
* @returns {object|undefined} the record, or `undefined`
|
|
111
|
-
* @ignore
|
|
112
|
-
*/
|
|
113
|
-
peek(source: object): object | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* Release the GPU texture for one source. Driven by the source going away
|
|
116
|
-
* — never by a slot being reassigned, which is exactly the coupling this
|
|
117
|
-
* class exists to break.
|
|
118
|
-
* @param {object} source - the disposed source
|
|
119
|
-
* @returns {boolean} whether a record was held
|
|
120
|
-
* @ignore
|
|
121
|
-
*/
|
|
122
|
-
destroyTexture(source: object): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Drop every record and bump the generation. Called on context or device
|
|
125
|
-
* loss.
|
|
126
|
-
*
|
|
127
|
-
* This CLEARS the store in place — callers must never respond to a restore
|
|
128
|
-
* by constructing a replacement store. Doing so orphans every handle the
|
|
129
|
-
* old one was tracking, so the *second* loss leaks everything it had
|
|
130
|
-
* accumulated since the first. Both WebGL batchers re-run `init()` on
|
|
131
|
-
* restore, which is precisely how that mistake gets made here.
|
|
132
|
-
* @param {boolean} [destroy=false] - whether to release the handles first.
|
|
133
|
-
* Leave `false` for a lost context (the GPU objects are already gone);
|
|
134
|
-
* pass `true` for an orderly teardown.
|
|
135
|
-
* @ignore
|
|
136
|
-
*/
|
|
137
|
-
releaseAll(destroy?: boolean): void;
|
|
138
|
-
}
|
|
1
|
+
|
|
139
2
|
//# sourceMappingURL=texturestore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texturestore.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/texturestore.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"texturestore.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/texturestore.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACC;;;;;;;;;;;;OAYG;IACH,gDAXG;QAA2B,QAAQ;QAER,QAAQ;QAIR,SAAS;KAEpC,EAwBF;IApBA,4EAA4E;IAC5E,SADW,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,GAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,CAAC,CAChD;IAqBzB;;;;;;;OAOG;IACH,iBANW,MAAM,WACN,MAAM,GACJ,GAAC,CAQb;IAED;;;;;;;;;;OAUG;IACH,iBARW,GAAC,UACD,MAAM,UACN,MAAM,WACN,MAAM,GACJ,GAAC,CAUb;IAED;;;;;;OAMG;IACH,kBALW,GAAC,UACD,MAAM,QAOhB;IA9CA,mBAAmB;IAgDpB;;;;;OAKG;IACH,YAJa,MAAM,CAMlB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,0BAVW,MAAM,YAEd;QAAyB,OAAO;QAEN,KAAK;KAC/B,GAAU;QAAC,MAAM,EAAE,GAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAC,CAsC/E;IAED;;;;;;;OAOG;IACH,aALW,MAAM,GACJ,MAAM,GAAC,SAAS,CAM5B;IAED;;;;;;;;OAQG;IACH,uBALW,MAAM,GACJ,OAAO,CAcnB;IAED;;;;;;;;;;;;;;OAcG;IACH,qBANW,OAAO,QAgBjB;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/topology.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GACjB,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,cAAc,CAAC;AAElB;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,uFAMQ,CAAC;
|
|
1
|
+
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/topology.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GACjB,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,cAAc,CAAC;AAElB;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,uFAMQ,CAAC;AAiBzC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D"}
|
|
@@ -18,11 +18,6 @@
|
|
|
18
18
|
* import it without pulling in the WebGL layer.
|
|
19
19
|
* @see {@link Batcher#addAttribute}
|
|
20
20
|
*/
|
|
21
|
-
/**
|
|
22
|
-
* The scalar component type underlying a {@link VertexFormat}.
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
export type VertexScalar = "float32" | "uint8" | "sint8" | "unorm8" | "snorm8" | "uint16" | "sint16" | "unorm16" | "snorm16" | "uint32" | "sint32";
|
|
26
21
|
/**
|
|
27
22
|
* A vertex attribute format: component type and count.
|
|
28
23
|
*
|
|
@@ -33,29 +28,6 @@ export type VertexScalar = "float32" | "uint8" | "sint8" | "unorm8" | "snorm8" |
|
|
|
33
28
|
* indefinitely.
|
|
34
29
|
*/
|
|
35
30
|
export type VertexFormat = "float32" | "float32x2" | "float32x3" | "float32x4" | "uint8" | "uint8x2" | "uint8x4" | "sint8" | "sint8x2" | "sint8x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "sint16" | "sint16x2" | "sint16x4" | "unorm16" | "unorm16x2" | "unorm16x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4";
|
|
36
|
-
/**
|
|
37
|
-
* What a {@link VertexFormat} resolves to.
|
|
38
|
-
* @ignore
|
|
39
|
-
*/
|
|
40
|
-
export interface VertexFormatInfo {
|
|
41
|
-
/** number of components (1, 2, 3 or 4) */
|
|
42
|
-
components: 1 | 2 | 3 | 4;
|
|
43
|
-
/** total size of the attribute in bytes */
|
|
44
|
-
bytes: number;
|
|
45
|
-
/** whether integer values are scaled into `[0, 1]` / `[-1, 1]` when read by a shader */
|
|
46
|
-
normalized: boolean;
|
|
47
|
-
/** the underlying scalar type */
|
|
48
|
-
scalar: VertexScalar;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Every supported format, resolved.
|
|
52
|
-
*
|
|
53
|
-
* `bytes` is computed as `components × scalar size`, which is the same
|
|
54
|
-
* arithmetic the GL-enum path has always used — so a layout expressed either
|
|
55
|
-
* way produces an identical stride.
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
export declare const VERTEX_FORMATS: Record<VertexFormat, VertexFormatInfo>;
|
|
59
31
|
/**
|
|
60
32
|
* Whether a value is a supported vertex format name.
|
|
61
33
|
* @param value - the value to test
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertexformat.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/vertexformat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"vertexformat.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/vertexformat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAoBH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAErB,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GAEX,OAAO,GACP,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GAET,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GAEV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GAEV,SAAS,GACT,WAAW,GACX,WAAW,GACX,SAAS,GACT,WAAW,GACX,WAAW,GAEX,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAkId;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,gBAAgB,CAS1E"}
|
|
@@ -9,55 +9,7 @@ export class Gradient {
|
|
|
9
9
|
* @param {number[]} coords - gradient coordinates [x0, y0, x1, y1] for linear, [x0, y0, r0, x1, y1, r1] for radial
|
|
10
10
|
*/
|
|
11
11
|
constructor(type: "linear" | "radial", coords: number[]);
|
|
12
|
-
/**
|
|
13
|
-
* gradient type
|
|
14
|
-
* @type {"linear"|"radial"}
|
|
15
|
-
*/
|
|
16
|
-
/** @ignore */
|
|
17
|
-
_id: number;
|
|
18
12
|
type: "linear" | "radial";
|
|
19
|
-
/**
|
|
20
|
-
* gradient coordinates
|
|
21
|
-
* @type {number[]}
|
|
22
|
-
* @ignore
|
|
23
|
-
*/
|
|
24
|
-
coords: number[];
|
|
25
|
-
/**
|
|
26
|
-
* color stops
|
|
27
|
-
* @type {Array<{offset: number, color: string}>}
|
|
28
|
-
* @ignore
|
|
29
|
-
*/
|
|
30
|
-
colorStops: Array<{
|
|
31
|
-
offset: number;
|
|
32
|
-
color: string;
|
|
33
|
-
}>;
|
|
34
|
-
/**
|
|
35
|
-
* cached canvas gradient (for Canvas renderer)
|
|
36
|
-
* @type {CanvasGradient|undefined}
|
|
37
|
-
* @ignore
|
|
38
|
-
*/
|
|
39
|
-
_canvasGradient: CanvasGradient | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* cached gradient render target (for WebGL renderer)
|
|
42
|
-
* @type {CanvasRenderTarget|undefined}
|
|
43
|
-
* @ignore
|
|
44
|
-
*/
|
|
45
|
-
_renderTarget: CanvasRenderTarget | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* whether the gradient needs to be regenerated
|
|
48
|
-
* @type {boolean}
|
|
49
|
-
* @ignore
|
|
50
|
-
*/
|
|
51
|
-
_dirty: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* cached parsed Color objects for sampling (lazily built)
|
|
54
|
-
* @type {{offset: number, color: Color}[]|null}
|
|
55
|
-
* @ignore
|
|
56
|
-
*/
|
|
57
|
-
_parsedStops: {
|
|
58
|
-
offset: number;
|
|
59
|
-
color: Color;
|
|
60
|
-
}[] | null;
|
|
61
13
|
/**
|
|
62
14
|
* Add a color stop to the gradient.
|
|
63
15
|
* @param {number} offset - value between 0.0 and 1.0
|
|
@@ -70,33 +22,24 @@ export class Gradient {
|
|
|
70
22
|
*/
|
|
71
23
|
addColorStop(offset: number, color: Color | string): Gradient;
|
|
72
24
|
/**
|
|
73
|
-
* Get or create a native CanvasGradient for use with a 2D context.
|
|
25
|
+
* Get or create a native `CanvasGradient` for use with a 2D context.
|
|
26
|
+
*
|
|
27
|
+
* This is the one to reach for when baking a gradient into your own
|
|
28
|
+
* canvas — it hands back a value for `ctx.fillStyle` and touches no
|
|
29
|
+
* shared state, so two callers cannot clobber each other.
|
|
30
|
+
*
|
|
31
|
+
* The result is cached and reused until a stop changes.
|
|
74
32
|
* @param {CanvasRenderingContext2D} context - the 2D context to create the gradient on
|
|
75
|
-
* @returns {CanvasGradient}
|
|
76
|
-
* @
|
|
33
|
+
* @returns {CanvasGradient} a native gradient bound to that context
|
|
34
|
+
* @example
|
|
35
|
+
* // bake a gradient into a standalone canvas
|
|
36
|
+
* const c = document.createElement("canvas");
|
|
37
|
+
* c.width = 64; c.height = 64;
|
|
38
|
+
* const ctx = c.getContext("2d");
|
|
39
|
+
* ctx.fillStyle = myGradient.toCanvasGradient(ctx);
|
|
40
|
+
* ctx.fillRect(0, 0, 64, 64);
|
|
77
41
|
*/
|
|
78
42
|
toCanvasGradient(context: CanvasRenderingContext2D): CanvasGradient;
|
|
79
|
-
/**
|
|
80
|
-
* Render the gradient into the fixed-resolution shared bake target for
|
|
81
|
-
* the given draw rect. Uses the original gradient coordinates so the
|
|
82
|
-
* result matches Canvas 2D behavior. Rects larger than the bake target
|
|
83
|
-
* are rasterized scaled-down; the destination quad stretches them back,
|
|
84
|
-
* which is visually equivalent (linear stop interpolation × linear
|
|
85
|
-
* texture filtering). The returned `width`/`height` describe the region
|
|
86
|
-
* of the canvas the caller must use as the drawImage SOURCE rect.
|
|
87
|
-
* @param {CanvasRenderer|WebGLRenderer} renderer - the active renderer (used to invalidate the GPU texture)
|
|
88
|
-
* @param {number} x - draw rect x
|
|
89
|
-
* @param {number} y - draw rect y
|
|
90
|
-
* @param {number} width - draw rect width
|
|
91
|
-
* @param {number} height - draw rect height
|
|
92
|
-
* @returns {{canvas: HTMLCanvasElement|OffscreenCanvas, width: number, height: number}} the shared gradient canvas + the used source-rect size
|
|
93
|
-
* @ignore
|
|
94
|
-
*/
|
|
95
|
-
toCanvas(renderer: CanvasRenderer | WebGLRenderer, x: number, y: number, width: number, height: number): {
|
|
96
|
-
canvas: HTMLCanvasElement | OffscreenCanvas;
|
|
97
|
-
width: number;
|
|
98
|
-
height: number;
|
|
99
|
-
};
|
|
100
43
|
/**
|
|
101
44
|
* Get the interpolated color at a given position along the gradient.
|
|
102
45
|
* Useful for procedural effects like trails that need per-segment colors.
|
|
@@ -110,11 +53,6 @@ export class Gradient {
|
|
|
110
53
|
* gradient.getColorAt(0.5, myColor); // myColor is now purple
|
|
111
54
|
*/
|
|
112
55
|
getColorAt(position: number, out: Color): Color;
|
|
113
|
-
/**
|
|
114
|
-
* Build the parsed Color cache from colorStops strings.
|
|
115
|
-
* @ignore
|
|
116
|
-
*/
|
|
117
|
-
_buildParsedStops(): void;
|
|
118
56
|
/**
|
|
119
57
|
* Release pooled resources held by this gradient.
|
|
120
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/video/gradient.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gradient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|
|
2
|
-
* @import RenderTargetPool from "./rendertarget/render_target_pool.js";
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @import {Rect} from "./../geometries/rectangle.ts";
|
|
6
|
-
* @import {RoundRect} from "./../geometries/roundrect.ts";
|
|
7
|
-
* @import {Polygon} from "../geometries/polygon.ts";
|
|
8
|
-
* @import {Line} from "./../geometries/line.ts";
|
|
9
|
-
* @import {Ellipse} from "./../geometries/ellipse.ts";
|
|
10
|
-
* @import {Bounds} from "./../physics/bounds.ts";
|
|
11
|
-
* @import {default as Texture2d} from "./texture/texture2d.ts";
|
|
12
|
-
*/
|
|
13
1
|
/**
|
|
14
2
|
* a base renderer object
|
|
15
3
|
* @category Rendering
|
|
@@ -49,7 +37,6 @@ declare class Renderer {
|
|
|
49
37
|
constructor(options?: ApplicationSettings);
|
|
50
38
|
/**
|
|
51
39
|
* The renderer renderTarget
|
|
52
|
-
* @name renderTarget
|
|
53
40
|
* @type {CanvasRenderTarget}
|
|
54
41
|
*/
|
|
55
42
|
renderTarget: CanvasRenderTarget;
|
|
@@ -83,21 +70,6 @@ declare class Renderer {
|
|
|
83
70
|
* @type {string|undefined}
|
|
84
71
|
*/
|
|
85
72
|
GPURenderer: string | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* an optional custom shader to use instead of the default one.
|
|
88
|
-
* Set by a renderable's preDraw when a shader is assigned.
|
|
89
|
-
* (GPU renderers only; ignored by Canvas renderer)
|
|
90
|
-
* @type {GLShader|ShaderEffect|undefined}
|
|
91
|
-
* @ignore
|
|
92
|
-
*/
|
|
93
|
-
customShader: GLShader | ShaderEffect | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* The render target pool for post-effect processing (ping-pong FBOs).
|
|
96
|
-
* Initialized by GPU renderers (WebGL, WebGPU). Null on Canvas renderer.
|
|
97
|
-
* @type {RenderTargetPool|null}
|
|
98
|
-
* @ignore
|
|
99
|
-
*/
|
|
100
|
-
_renderTargetPool: RenderTargetPool | null;
|
|
101
73
|
/**
|
|
102
74
|
* The Path2D instance used by the renderer to draw primitives
|
|
103
75
|
* @type {Path2D}
|
|
@@ -200,10 +172,6 @@ declare class Renderer {
|
|
|
200
172
|
* @default 1
|
|
201
173
|
*/
|
|
202
174
|
lineWidth: number;
|
|
203
|
-
/**
|
|
204
|
-
* @ignore
|
|
205
|
-
*/
|
|
206
|
-
maskLevel: number;
|
|
207
175
|
projectionMatrix: Matrix3d;
|
|
208
176
|
uvOffset: number;
|
|
209
177
|
/**
|
|
@@ -273,41 +241,31 @@ declare class Renderer {
|
|
|
273
241
|
*/
|
|
274
242
|
flush(): void;
|
|
275
243
|
/**
|
|
276
|
-
*
|
|
277
|
-
*
|
|
244
|
+
* Run the transparent pass: draw everything the CURRENT render target has
|
|
245
|
+
* queued since its last drain, back-to-front, then empty that queue.
|
|
278
246
|
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* about where it sits relative to what stands on it.
|
|
247
|
+
* Called at the three points where the world draw is genuinely finished —
|
|
248
|
+
* `Container.draw` just before a floating child, `Camera2d.draw` once the
|
|
249
|
+
* container is down, and `Application.draw` at end of frame. Deliberately
|
|
250
|
+
* NOT on a batcher transition: anything non-mesh sorting mid-scene raises
|
|
251
|
+
* one, and every mesh still to come would then paint over what was just
|
|
252
|
+
* replayed.
|
|
286
253
|
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* @param {Matrix3d} modelMatrix - where the blob sits (copied, not retained)
|
|
293
|
-
* @param {number} tint - packed ARGB tint for the draw
|
|
294
|
-
* @param {object} [instanced] - the `InstancedMesh` whose instance buffer
|
|
295
|
-
* supplies one blob per instance, for the instanced tier
|
|
296
|
-
* @ignore
|
|
297
|
-
*/
|
|
298
|
-
queueGroundShadow(quad: object, modelMatrix: Matrix3d, tint: number, instanced?: object): void;
|
|
299
|
-
_shadowCount: any;
|
|
300
|
-
/**
|
|
301
|
-
* Draw every ground shadow queued since the last drain, then empty the
|
|
302
|
-
* queue (#1515). Called when the renderer leaves mesh mode, and once more
|
|
303
|
-
* at end of frame for a scene made only of meshes, which never switches
|
|
304
|
-
* away from mesh mode on its own.
|
|
254
|
+
* Only the current target's queue is touched — see
|
|
255
|
+
* {@link Renderer#transparentQueue}. A post effect binds an offscreen
|
|
256
|
+
* target part-way through a scene, and a drain fired in there must not
|
|
257
|
+
* reach the world's queued geometry; each pass drains its own on the way
|
|
258
|
+
* out.
|
|
305
259
|
*
|
|
306
260
|
* Inert on a backend that never queues — the Canvas renderer has no depth
|
|
307
|
-
* buffer and
|
|
261
|
+
* buffer, and composites through the 2D context instead.
|
|
262
|
+
*/
|
|
263
|
+
flushTransparent(): void;
|
|
264
|
+
/**
|
|
265
|
+
* Run the transparent pass.
|
|
266
|
+
* @deprecated since 20.4.0, use {@link Renderer#flushTransparent}
|
|
308
267
|
*/
|
|
309
268
|
flushGroundShadows(): void;
|
|
310
|
-
_shadowFlushing: boolean | undefined;
|
|
311
269
|
/**
|
|
312
270
|
* Draw a textured triangle mesh.
|
|
313
271
|
* The mesh object must provide: `vertices` (Float32Array, x/y/z triplets),
|
|
@@ -374,23 +332,6 @@ declare class Renderer {
|
|
|
374
332
|
* @returns {boolean}
|
|
375
333
|
*/
|
|
376
334
|
hasSupportedCompressedFormats(format: number): boolean;
|
|
377
|
-
/**
|
|
378
|
-
* Begin capturing rendering to an offscreen buffer for post-effect processing.
|
|
379
|
-
* Call endPostEffect() after rendering to blit the result to the screen.
|
|
380
|
-
* No-op on Canvas renderer.
|
|
381
|
-
* @param {Renderable} renderable - the renderable with postEffects to apply
|
|
382
|
-
* @returns {boolean} false (Canvas renderer does not support post-effect processing)
|
|
383
|
-
* @ignore
|
|
384
|
-
*/
|
|
385
|
-
beginPostEffect(renderable: Renderable): boolean;
|
|
386
|
-
/**
|
|
387
|
-
* End post-effect capture and blit the offscreen buffer to the screen
|
|
388
|
-
* through the renderable's post-effects.
|
|
389
|
-
* No-op on Canvas renderer.
|
|
390
|
-
* @param {Renderable} renderable - the renderable with postEffects to apply
|
|
391
|
-
* @ignore
|
|
392
|
-
*/
|
|
393
|
-
endPostEffect(renderable: Renderable): void;
|
|
394
335
|
/**
|
|
395
336
|
* Blit a texture to the screen through a shader effect.
|
|
396
337
|
* Draws a screen-aligned quad using the given texture as source
|
|
@@ -450,31 +391,9 @@ declare class Renderer {
|
|
|
450
391
|
* set the current blend mode. Every renderer supports the same set —
|
|
451
392
|
* see {@link CanvasRenderer#setBlendMode} for the list and what each does.
|
|
452
393
|
* @param {string} [mode="normal"] - blend mode
|
|
453
|
-
* @param {boolean} [premultipliedAlpha=true] - whether textures use premultiplied alpha
|
|
454
394
|
*/
|
|
455
395
|
setBlendMode(mode?: string): void;
|
|
456
|
-
|
|
457
|
-
* Upload the active scene lights to the lit sprite pipeline.
|
|
458
|
-
*
|
|
459
|
-
* Called once per camera per frame by `Camera2d.draw()` (after the
|
|
460
|
-
* FBO is bound, before the world tree walk fires `Sprite.draw` for
|
|
461
|
-
* any normal-mapped sprite). GPU renderers (WebGL today, WebGPU once
|
|
462
|
-
* it lands) override this to pack the lights into the lit shader's
|
|
463
|
-
* uniform buffers; the Canvas renderer cannot do per-pixel normal-map
|
|
464
|
-
* lighting and silently ignores the call. The first time a non-empty
|
|
465
|
-
* light list is passed in Canvas mode, a one-shot console warning is
|
|
466
|
-
* emitted.
|
|
467
|
-
*
|
|
468
|
-
* Stage stays renderer-agnostic by passing the raw scene data —
|
|
469
|
-
* lights iterable and ambient color — and letting the renderer
|
|
470
|
-
* decide how to encode them.
|
|
471
|
-
* @param {Iterable<object>} [lights] - active `Light2d` instances; falsy/empty no-ops
|
|
472
|
-
* @param {object} [ambient] - ambient lighting color (0..255 RGB)
|
|
473
|
-
* @param {number} [translateX=0] - world-to-screen X translate (matches `Camera2d.draw()`)
|
|
474
|
-
* @param {number} [translateY=0] - world-to-screen Y translate
|
|
475
|
-
*/
|
|
476
|
-
setLightUniforms(lights?: Iterable<object>, ambient?: object, translateX?: number, translateY?: number): void;
|
|
477
|
-
_litPipelineWarned: boolean | undefined;
|
|
396
|
+
setLightUniforms(lights: any, ambient: any, translateX: any, translateY: any): void;
|
|
478
397
|
/**
|
|
479
398
|
* Render a `Light2d` instance.
|
|
480
399
|
*
|
|
@@ -748,7 +667,7 @@ declare class Renderer {
|
|
|
748
667
|
* @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] - the shape defining the mask to be applied
|
|
749
668
|
* @param {boolean} [invert=false] - either the given shape should define what is visible (default) or the opposite
|
|
750
669
|
*/
|
|
751
|
-
setMask(): void;
|
|
670
|
+
setMask(mask?: Rect | RoundRect | Polygon | Line | Ellipse, invert?: boolean): void;
|
|
752
671
|
/**
|
|
753
672
|
* disable (remove) the rendering mask set through setMask.
|
|
754
673
|
* @see Renderer#setMask
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"AAiCA;;;GAGG;AACH;IA41BC;;;;;;;;;;;;OAYG;IACH,2BANW,MAAM,UACN,MAAM,0BACN,OAAO,GAEL,iBAAiB,GAAC,eAAe,CAI7C;IAED;;;;;;;;;;;;OAYG;IACH,wBAFa,iBAAiB,GAAC,eAAe,CAgB7C;IAv4BD;;OAEG;IACH,sBAFW,mBAAmB,EAwO7B;IArOA;;;OAGG;IACH,cAFU,kBAAkB,CAS3B;IAED;;;;OAIG;IACH,iBAFU,MAAM,CAEO;IAEvB;;;;OAIG;IACH,oBAFU,MAAM,CAE6C;IAE7D;;;;OAIG;IACH,YAHU,QAAQ,CAGsD;IAExE;;;;OAIG;IACH,gBAFU,OAAO,CAES;IAE1B;;;;OAIG;IACH,aAFU,MAAM,GAAC,SAA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C,qBAAqB;kCAQb,sCAAsC;mBAXpD,2BAA2B;sBACxB,oBAAoB;wBAMlB,kBAAkB;yBALjB,qBAAqB;0BAavB,8BAA8B;yBAT5B,eAAe;4BAcf,wBAAwB;+BAJrB,8BAA8B;6BAChC,0BAA0B;0BAC7B,yBAAyB;6BACtB,4BAA4B;0CAEf,wBAAwB"}
|
|
@@ -60,60 +60,11 @@ export default class RenderState {
|
|
|
60
60
|
* @type {number}
|
|
61
61
|
*/
|
|
62
62
|
currentDepth: number;
|
|
63
|
-
/**
|
|
64
|
-
* @ignore
|
|
65
|
-
*/
|
|
66
|
-
_stackCapacity: number;
|
|
67
|
-
/**
|
|
68
|
-
* current stack depth
|
|
69
|
-
* @ignore
|
|
70
|
-
*/
|
|
71
|
-
_stackDepth: number;
|
|
72
|
-
/** @ignore */
|
|
73
|
-
_colorStack: Color[];
|
|
74
|
-
/** @ignore */
|
|
75
|
-
_tintStack: Color[];
|
|
76
|
-
/** @ignore */
|
|
77
|
-
_matrixStack: Matrix3d[];
|
|
78
|
-
/** @ignore */
|
|
79
|
-
_scissorStack: Int32Array<ArrayBuffer>[];
|
|
80
|
-
/** @ignore */
|
|
81
|
-
_lineDashStack: any[];
|
|
82
|
-
/** @ignore */
|
|
83
|
-
_scissorActive: Uint8Array<ArrayBuffer>;
|
|
84
|
-
/** @ignore */
|
|
85
|
-
_gradientStack: any[];
|
|
86
|
-
/** @ignore */
|
|
87
|
-
_blendStack: any[];
|
|
88
|
-
/** @ignore */
|
|
89
|
-
_shaderStack: any[];
|
|
90
|
-
/** @ignore */
|
|
91
|
-
_depthStack: Float32Array<ArrayBuffer>;
|
|
92
63
|
/**
|
|
93
64
|
* Save the current state onto the stack (zero allocations).
|
|
94
65
|
* @param {boolean} [scissorTestActive=false] - whether scissor/clip is currently enabled
|
|
95
66
|
*/
|
|
96
67
|
save(scissorTestActive?: boolean): void;
|
|
97
|
-
/**
|
|
98
|
-
* Inspect the scissor box that the next `restore()` would install,
|
|
99
|
-
* without mutating any state. Lets renderers detect whether a
|
|
100
|
-
* pending `restore()` will actually change the scissor (and
|
|
101
|
-
* decide, e.g., whether to flush GPU work first).
|
|
102
|
-
*
|
|
103
|
-
* Returns:
|
|
104
|
-
* - `Int32Array` (length 4) — `[x, y, width, height]` of the
|
|
105
|
-
* saved scissor when scissor was active at the matching `save()`
|
|
106
|
-
* call.
|
|
107
|
-
* - `null` — when the saved state had scissor disabled, or the
|
|
108
|
-
* stack is empty. Treat this as "next scissor will be inactive".
|
|
109
|
-
*
|
|
110
|
-
* The returned array is a **live reference into the internal
|
|
111
|
-
* stack** — zero allocation on a hot path. Callers MUST treat it
|
|
112
|
-
* as read-only; mutating it corrupts subsequent `restore()` calls.
|
|
113
|
-
* @ignore
|
|
114
|
-
* @returns {Int32Array | null}
|
|
115
|
-
*/
|
|
116
|
-
peekScissor(): Int32Array | null;
|
|
117
68
|
/**
|
|
118
69
|
* Restore state from the stack.
|
|
119
70
|
* Color, tint, transform, and scissor are restored in place.
|
|
@@ -133,8 +84,6 @@ export default class RenderState {
|
|
|
133
84
|
* @param {number} height - canvas height
|
|
134
85
|
*/
|
|
135
86
|
reset(width: number, height: number): void;
|
|
136
|
-
/** @private — doubles stack capacity when exceeded */
|
|
137
|
-
private _growStacks;
|
|
138
87
|
}
|
|
139
88
|
import { Color } from "./../math/color.ts";
|
|
140
89
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH;;;;;;;GAOG;AACH;IAEE;;;OAGG;IACH,cAFU,KAAK,CAE4B;IAE3C;;;OAGG;IACH,aAFU,KAAK,CAEiC;IAEhD;;;OAGG;IACH,kBAFU,QAAQ,CAEoB;IAEtC;;;OAGG;IACH,gBAFU,UAAU,CAEmB;IAEvC;;;OAGG;IACH,iBAFU,QAAQ,GAAC,IAAI,CAEI;IAE3B;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Aa,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CA0BhE;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAWhB;IAED;;;;OAIG;IACH,oBAoBC;CACD;sBAvSqB,oBAAoB;yBACjB,qBAAqB;8BAGnB,eAAe"}
|
|
@@ -50,10 +50,6 @@ declare class CanvasRenderTarget extends RenderTarget {
|
|
|
50
50
|
* @deprecated since 20.0.0 — the WebGL renderer is WebGL 2 only, this is always `2`
|
|
51
51
|
*/
|
|
52
52
|
WebGLVersion: number;
|
|
53
|
-
/**
|
|
54
|
-
* @ignore
|
|
55
|
-
*/
|
|
56
|
-
onResetEvent(width: any, height: any): void;
|
|
57
53
|
/**
|
|
58
54
|
* enable/disable image smoothing (scaling interpolation)
|
|
59
55
|
* @param {boolean} [enable=false] - whether to enable or not image smoothing (scaling interpolation)
|
|
@@ -76,12 +72,6 @@ declare class CanvasRenderTarget extends RenderTarget {
|
|
|
76
72
|
*/
|
|
77
73
|
invalidate(renderer: CanvasRenderer | WebGLRenderer): void;
|
|
78
74
|
glTextureUnit: any;
|
|
79
|
-
/**
|
|
80
|
-
* Destroy this canvas render target and release associated GPU resources.
|
|
81
|
-
* @param {CanvasRenderer|WebGLRenderer} [renderer] - the renderer to clean up WebGL resources from
|
|
82
|
-
* @ignore
|
|
83
|
-
*/
|
|
84
|
-
destroy(renderer?: CanvasRenderer | WebGLRenderer): void;
|
|
85
75
|
#private;
|
|
86
76
|
}
|
|
87
77
|
import RenderTarget from "./rendertarget.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvasrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/canvasrendertarget.js"],"names":[],"mappings":";AA6EA;;;;;;GAMG;AACH;IACC;;;;;;;;;OASG;IACH,mBATW,MAAM,UACN,MAAM,eAEd;QAA4B,OAAO;QACN,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAoCA;IAhCA;;;;;;;;;;;;;;;;;MAAkE;IASjE,YAA+B;IAUhC,aAA0D;IAGzD;;;;OAIG;IACH,cAHU,MAAM,CAGK;IAOvB
|
|
1
|
+
{"version":3,"file":"canvasrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/canvasrendertarget.js"],"names":[],"mappings":";AA6EA;;;;;;GAMG;AACH;IACC;;;;;;;;;OASG;IACH,mBATW,MAAM,UACN,MAAM,eAEd;QAA4B,OAAO;QACN,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAoCA;IAhCA;;;;;;;;;;;;;;;;;MAAkE;IASjE,YAA+B;IAUhC,aAA0D;IAGzD;;;;OAIG;IACH,cAHU,MAAM,CAGK;IAOvB;;;OAGG;IACH,4CAGC;IAUD;;;OAGG;IACH,sBAFW,OAAO,QAwBjB;IAYD;;;;;;;;OAQG;IACH,gBANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,GACJ,SAAS,CAUrB;IAoDD;;;;OAIG;IACH,qBAFW,cAAc,GAAC,aAAa,QAsBtC;IAcC,mBAEC;IAeH;;;;;OAKG;IACH,mBAJW,cAAc,GAAC,aAAa,QA0CtC;;CA2BD;yBA5XwB,mBAAmB;gCAIb,gCAAgC;+BACjC,8BAA8B"}
|