melonjs 20.2.0 → 20.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -8
- package/build/application/application.d.ts +0 -17
- package/build/application/application.d.ts.map +1 -1
- package/build/application/settings.d.ts +6 -2
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/audio.d.ts +2 -2
- package/build/audio/audio.d.ts.map +1 -1
- package/build/audio/backend/buffer.d.ts +26 -0
- package/build/audio/backend/buffer.d.ts.map +1 -0
- package/build/audio/backend/cache.d.ts +2 -0
- package/build/audio/backend/cache.d.ts.map +1 -0
- package/build/audio/backend/core.d.ts +24 -0
- package/build/audio/backend/core.d.ts.map +1 -0
- package/build/audio/backend/engine.d.ts +35 -0
- package/build/audio/backend/engine.d.ts.map +1 -0
- package/build/audio/backend/sound.d.ts +29 -0
- package/build/audio/backend/sound.d.ts.map +1 -0
- package/build/audio/backend/spatial.d.ts +191 -0
- package/build/audio/backend/spatial.d.ts.map +1 -0
- package/build/audio/backend/types.d.ts +107 -0
- package/build/audio/backend/types.d.ts.map +1 -0
- package/build/audio/backend/voice.d.ts +8 -0
- package/build/audio/backend/voice.d.ts.map +1 -0
- package/build/audio/playback.d.ts +49 -4
- package/build/audio/playback.d.ts.map +1 -1
- package/build/audio/procedural.d.ts.map +1 -1
- package/build/audio/state.d.ts +69 -0
- package/build/audio/state.d.ts.map +1 -0
- package/build/audio/types.d.ts +93 -1
- package/build/audio/types.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +0 -68
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts +91 -84
- package/build/camera/camera3d.d.ts.map +1 -1
- package/build/camera/effects/fade_effect.d.ts +0 -5
- package/build/camera/effects/fade_effect.d.ts.map +1 -1
- package/build/camera/effects/mask_effect.d.ts +0 -5
- package/build/camera/effects/mask_effect.d.ts.map +1 -1
- package/build/camera/fog.d.ts +118 -0
- package/build/camera/fog.d.ts.map +1 -0
- package/build/const.d.ts +2 -2
- package/build/geometries/box3d.d.ts +0 -28
- package/build/geometries/box3d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +0 -20
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/observablePoint.d.ts +0 -3
- package/build/geometries/observablePoint.d.ts.map +1 -1
- package/build/geometries/path2d.d.ts +0 -19
- package/build/geometries/path2d.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +0 -12
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/roundrect.d.ts +0 -18
- package/build/geometries/roundrect.d.ts.map +1 -1
- package/build/geometries/sphere.d.ts +0 -9
- package/build/geometries/sphere.d.ts.map +1 -1
- package/build/geometries/toarccanvas.d.ts.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +12150 -11289
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/input.d.ts +19 -0
- package/build/input/input.d.ts.map +1 -1
- package/build/input/pointer.d.ts +0 -4
- package/build/input/pointer.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts +0 -6
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/lang/deprecated.d.ts +4 -2
- package/build/lang/deprecated.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +0 -81
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +13 -44
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/gltf/gltf_sampler.d.ts +1 -48
- package/build/level/gltf/gltf_sampler.d.ts.map +1 -1
- package/build/level/level.d.ts +195 -113
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXGroup.d.ts +1 -65
- package/build/level/tiled/TMXGroup.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +0 -44
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +1 -136
- package/build/level/tiled/TMXObject.d.ts.map +1 -1
- package/build/level/tiled/TMXObjectFactory.d.ts +1 -40
- package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
- package/build/level/tiled/TMXTile.d.ts +1 -30
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +0 -10
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +0 -113
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts +0 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts +1 -43
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +1 -7
- package/build/level/tiled/factories/shape.d.ts.map +1 -1
- package/build/level/tiled/factories/text.d.ts +1 -7
- package/build/level/tiled/factories/text.d.ts.map +1 -1
- package/build/level/tiled/factories/tile.d.ts +1 -7
- package/build/level/tiled/factories/tile.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +0 -60
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +0 -42
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +0 -5
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +0 -31
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +2 -2
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/autodetect.d.ts +1 -6
- package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
- package/build/lighting/light2d.d.ts +0 -25
- package/build/lighting/light2d.d.ts.map +1 -1
- package/build/lighting/light3d.d.ts +0 -16
- package/build/lighting/light3d.d.ts.map +1 -1
- package/build/loader/loader.d.ts +46 -73
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +0 -33
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/aseprite.d.ts +0 -13
- package/build/loader/parsers/aseprite.d.ts.map +1 -1
- package/build/loader/parsers/audio.d.ts +2 -0
- package/build/loader/parsers/audio.d.ts.map +1 -0
- package/build/loader/parsers/binary.d.ts +1 -10
- package/build/loader/parsers/binary.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseDDS.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseKTX.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parsePKM.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parsePVR.d.ts +1 -7
- package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts +1 -13
- package/build/loader/parsers/fontface.d.ts.map +1 -1
- package/build/loader/parsers/gltf.d.ts +1 -70
- package/build/loader/parsers/gltf.d.ts.map +1 -1
- package/build/loader/parsers/image.d.ts +1 -22
- package/build/loader/parsers/image.d.ts.map +1 -1
- package/build/loader/parsers/json.d.ts +1 -10
- package/build/loader/parsers/json.d.ts.map +1 -1
- package/build/loader/parsers/mtl.d.ts +1 -28
- package/build/loader/parsers/mtl.d.ts.map +1 -1
- package/build/loader/parsers/obj.d.ts +1 -59
- package/build/loader/parsers/obj.d.ts.map +1 -1
- package/build/loader/parsers/pbr.d.ts +1 -62
- package/build/loader/parsers/pbr.d.ts.map +1 -1
- package/build/loader/parsers/script.d.ts +1 -10
- package/build/loader/parsers/script.d.ts.map +1 -1
- package/build/loader/parsers/shader.d.ts +1 -52
- package/build/loader/parsers/shader.d.ts.map +1 -1
- package/build/loader/parsers/tmx.d.ts +1 -10
- package/build/loader/parsers/tmx.d.ts.map +1 -1
- package/build/loader/parsers/video.d.ts +1 -10
- package/build/loader/parsers/video.d.ts.map +1 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/noise.d.ts +0 -40
- package/build/math/noise.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +0 -3
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +0 -3
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/math/vector2d.d.ts +0 -6
- package/build/math/vector2d.d.ts.map +1 -1
- package/build/math/vertex.d.ts +25 -0
- package/build/math/vertex.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +0 -65
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +0 -81
- package/build/particles/particle.d.ts.map +1 -1
- package/build/physics/adapter.d.ts +3 -3
- package/build/physics/bounds.d.ts +0 -1
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/broadphase/broadphase.d.ts +0 -7
- package/build/physics/broadphase/broadphase.d.ts.map +1 -1
- package/build/physics/broadphase/octree.d.ts +0 -91
- package/build/physics/broadphase/octree.d.ts.map +1 -1
- package/build/physics/broadphase/quadtree.d.ts +0 -47
- package/build/physics/broadphase/quadtree.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +5 -69
- package/build/physics/builtin/body.d.ts.map +1 -1
- package/build/physics/builtin/detector.d.ts +0 -312
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/physics/builtin/sat.d.ts +1 -48
- package/build/physics/builtin/sat.d.ts.map +1 -1
- package/build/physics/builtin/sat3d.d.ts +1 -56
- package/build/physics/builtin/sat3d.d.ts.map +1 -1
- package/build/physics/collision.d.ts +0 -2
- package/build/physics/collision.d.ts.map +1 -1
- package/build/physics/response.d.ts +0 -1
- package/build/physics/response.d.ts.map +1 -1
- package/build/physics/world.d.ts.map +1 -1
- package/build/plugin/plugin.d.ts +9 -1
- package/build/plugin/plugin.d.ts.map +1 -1
- package/build/polyfill/index.d.ts +1 -4
- package/build/polyfill/index.d.ts.map +1 -1
- package/build/renderable/anchorPoint.d.ts +1 -73
- package/build/renderable/anchorPoint.d.ts.map +1 -1
- package/build/renderable/animation.d.ts +0 -7
- package/build/renderable/animation.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +0 -5
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts +0 -55
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/draggable.d.ts +0 -5
- package/build/renderable/draggable.d.ts.map +1 -1
- package/build/renderable/dragndrop.d.ts +1 -12
- package/build/renderable/dragndrop.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +0 -8
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts +0 -41
- package/build/renderable/frameAnimation.d.ts.map +1 -1
- package/build/renderable/groundshadow.d.ts +1 -91
- package/build/renderable/groundshadow.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +0 -29
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts +26 -104
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +145 -140
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts +0 -4
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +17 -54
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +7 -52
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +0 -95
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +0 -14
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +0 -22
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/glyph.d.ts +1 -39
- package/build/renderable/text/glyph.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +0 -20
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textstyle.d.ts +1 -5
- package/build/renderable/text/textstyle.d.ts.map +1 -1
- package/build/renderable/trail.d.ts +0 -29
- package/build/renderable/trail.d.ts.map +1 -1
- package/build/renderable/trigger.d.ts +0 -6
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/uibaseelement.d.ts +0 -40
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uispriteelement.d.ts +0 -35
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/state/stage.d.ts +4 -68
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts.map +1 -1
- package/build/system/device.d.ts +0 -12
- package/build/system/device.d.ts.map +1 -1
- package/build/system/dom.d.ts +1 -8
- package/build/system/dom.d.ts.map +1 -1
- package/build/system/event.d.ts +1 -1
- package/build/system/legacy_pool.d.ts +1 -6
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/platform.d.ts +21 -2
- package/build/system/platform.d.ts.map +1 -1
- package/build/system/pool.d.ts +0 -9
- package/build/system/pool.d.ts.map +1 -1
- package/build/system/save.d.ts.map +1 -1
- package/build/system/timer.d.ts +0 -20
- package/build/system/timer.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +0 -62
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/array-multimap.d.ts +1 -13
- package/build/utils/array-multimap.d.ts.map +1 -1
- package/build/utils/decode.d.ts.map +1 -1
- package/build/utils/fetchdata.d.ts +2 -0
- package/build/utils/fetchdata.d.ts.map +1 -0
- package/build/utils/utils.d.ts +0 -13
- package/build/utils/utils.d.ts.map +1 -1
- package/build/video/blendmodes.d.ts +1 -106
- package/build/video/blendmodes.d.ts.map +1 -1
- package/build/video/buffer/index.d.ts +1 -39
- package/build/video/buffer/index.d.ts.map +1 -1
- package/build/video/buffer/vertex.d.ts +1 -82
- package/build/video/buffer/vertex.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +7 -25
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/canvas_factory.d.ts +1 -24
- package/build/video/canvas_factory.d.ts.map +1 -1
- package/build/video/effects/blendEffect.d.ts +0 -54
- package/build/video/effects/blendEffect.d.ts.map +1 -1
- package/build/video/effects/blur.d.ts +4 -4
- package/build/video/effects/blur.d.ts.map +1 -1
- package/build/video/effects/chromaticAberration.d.ts +5 -5
- package/build/video/effects/chromaticAberration.d.ts.map +1 -1
- package/build/video/effects/colorMatrix.d.ts +5 -15
- package/build/video/effects/colorMatrix.d.ts.map +1 -1
- package/build/video/effects/desaturate.d.ts +5 -5
- package/build/video/effects/desaturate.d.ts.map +1 -1
- package/build/video/effects/dissolve.d.ts +4 -4
- package/build/video/effects/dissolve.d.ts.map +1 -1
- package/build/video/effects/dropShadow.d.ts +5 -5
- package/build/video/effects/dropShadow.d.ts.map +1 -1
- package/build/video/effects/flash.d.ts +4 -4
- package/build/video/effects/flash.d.ts.map +1 -1
- package/build/video/effects/glow.d.ts +5 -5
- package/build/video/effects/glow.d.ts.map +1 -1
- package/build/video/effects/glsl_realization.d.ts +1 -17
- package/build/video/effects/glsl_realization.d.ts.map +1 -1
- package/build/video/effects/hologram.d.ts +4 -4
- package/build/video/effects/hologram.d.ts.map +1 -1
- package/build/video/effects/invert.d.ts +5 -5
- package/build/video/effects/invert.d.ts.map +1 -1
- package/build/video/effects/outline.d.ts +6 -6
- package/build/video/effects/outline.d.ts.map +1 -1
- package/build/video/effects/pixelate.d.ts +4 -4
- package/build/video/effects/pixelate.d.ts.map +1 -1
- package/build/video/effects/radialGradient.d.ts +2 -3
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/scanline.d.ts +6 -6
- package/build/video/effects/scanline.d.ts.map +1 -1
- package/build/video/effects/sepia.d.ts +5 -5
- package/build/video/effects/sepia.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts +12 -123
- package/build/video/effects/shadereffect.d.ts.map +1 -1
- package/build/video/effects/shine.d.ts +3 -3
- package/build/video/effects/shine.d.ts.map +1 -1
- package/build/video/effects/tintPulse.d.ts +4 -4
- package/build/video/effects/tintPulse.d.ts.map +1 -1
- package/build/video/effects/vignette.d.ts +6 -6
- package/build/video/effects/vignette.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +4 -4
- package/build/video/effects/wave.d.ts.map +1 -1
- package/build/video/effects/wgsl/layout.d.ts +1 -27
- package/build/video/effects/wgsl/layout.d.ts.map +1 -1
- package/build/video/effects/wgsl/parse.d.ts +1 -8
- package/build/video/effects/wgsl/parse.d.ts.map +1 -1
- package/build/video/effects/wgsl/scaffold.d.ts +1 -42
- package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
- package/build/video/effects/wgsl_realization.d.ts +1 -82
- package/build/video/effects/wgsl_realization.d.ts.map +1 -1
- package/build/video/gpu/batcher.d.ts +1 -13
- package/build/video/gpu/batcher.d.ts.map +1 -1
- package/build/video/gpu/instancerecord.d.ts +1 -163
- package/build/video/gpu/instancerecord.d.ts.map +1 -1
- package/build/video/gpu/meshchunk.d.ts +1 -48
- package/build/video/gpu/meshchunk.d.ts.map +1 -1
- package/build/video/gpu/meshvertex.d.ts +1 -53
- package/build/video/gpu/meshvertex.d.ts.map +1 -1
- package/build/video/gpu/primitives.d.ts +1 -59
- package/build/video/gpu/primitives.d.ts.map +1 -1
- package/build/video/gpu/quadcorners.d.ts +1 -10
- package/build/video/gpu/quadcorners.d.ts.map +1 -1
- package/build/video/gpu/textureslots.d.ts +1 -121
- package/build/video/gpu/textureslots.d.ts.map +1 -1
- package/build/video/gpu/texturestore.d.ts +1 -138
- package/build/video/gpu/texturestore.d.ts.map +1 -1
- package/build/video/gpu/topology.d.ts.map +1 -1
- package/build/video/gpu/vertexformat.d.ts +0 -28
- package/build/video/gpu/vertexformat.d.ts.map +1 -1
- package/build/video/gradient.d.ts +0 -81
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/renderer.d.ts +21 -102
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +0 -51
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +0 -10
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/render_target_pool.d.ts +1 -82
- package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
- package/build/video/rendertarget/webglrendertarget.d.ts +1 -64
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +0 -8
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +2 -76
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +0 -136
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/texture/frametexture.d.ts +1 -71
- package/build/video/texture/frametexture.d.ts.map +1 -1
- package/build/video/texture/noise_texture2d.d.ts +0 -43
- package/build/video/texture/noise_texture2d.d.ts.map +1 -1
- package/build/video/texture/parser/aseprite.d.ts +1 -8
- package/build/video/texture/parser/aseprite.d.ts.map +1 -1
- package/build/video/texture/parser/spritesheet.d.ts +1 -8
- package/build/video/texture/parser/spritesheet.d.ts.map +1 -1
- package/build/video/texture/parser/texturepacker.d.ts +1 -8
- package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
- package/build/video/texture/resource.d.ts +0 -9
- package/build/video/texture/resource.d.ts.map +1 -1
- package/build/video/texture/texture2d.d.ts +0 -11
- package/build/video/texture/texture2d.d.ts.map +1 -1
- package/build/video/utils/autodetect.d.ts +1 -5
- package/build/video/utils/autodetect.d.ts.map +1 -1
- package/build/video/webgl/batchers/batcher.d.ts +0 -55
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +0 -14
- package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +0 -72
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +0 -89
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts +14 -343
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/primitive_batcher.d.ts +0 -10
- package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +0 -30
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +1 -36
- package/build/video/webgl/buffer/index.d.ts.map +1 -1
- package/build/video/webgl/buffer/instance_buffer.d.ts +1 -53
- package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -1
- package/build/video/webgl/buffer/retained_geometry.d.ts +1 -81
- package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -1
- package/build/video/webgl/buffer/uniformblock.d.ts +1 -80
- package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -1
- package/build/video/webgl/buffer/vertexstate.d.ts +1 -100
- package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -1
- package/build/video/webgl/glshader.d.ts +2 -51
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/lighting/pack3d.d.ts +1 -47
- package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
- package/build/video/webgl/lighting/std140.d.ts +1 -109
- package/build/video/webgl/lighting/std140.d.ts.map +1 -1
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +1 -103
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
- package/build/video/webgl/shaders/multitexture-lit.d.ts +1 -26
- package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
- package/build/video/webgl/shaders/multitexture.d.ts +1 -9
- package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
- package/build/video/webgl/texture/store.d.ts +1 -50
- package/build/video/webgl/texture/store.d.ts.map +1 -1
- package/build/video/webgl/utils/attributes.d.ts +1 -11
- package/build/video/webgl/utils/attributes.d.ts.map +1 -1
- package/build/video/webgl/utils/maxtextures.d.ts +1 -36
- package/build/video/webgl/utils/maxtextures.d.ts.map +1 -1
- package/build/video/webgl/utils/precision.d.ts +1 -14
- package/build/video/webgl/utils/precision.d.ts.map +1 -1
- package/build/video/webgl/utils/program.d.ts +1 -5
- package/build/video/webgl/utils/program.d.ts.map +1 -1
- package/build/video/webgl/utils/samplercache.d.ts +1 -68
- package/build/video/webgl/utils/samplercache.d.ts.map +1 -1
- package/build/video/webgl/utils/string.d.ts +1 -21
- package/build/video/webgl/utils/string.d.ts.map +1 -1
- package/build/video/webgl/utils/topology.d.ts +1 -23
- package/build/video/webgl/utils/topology.d.ts.map +1 -1
- package/build/video/webgl/utils/uniforms.d.ts +1 -25
- package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
- package/build/video/webgl/utils/vertexformat.d.ts +1 -26
- package/build/video/webgl/utils/vertexformat.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +24 -286
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +0 -6
- package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +0 -8
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +1 -230
- package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -82
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/buffer/arena.d.ts +1 -63
- package/build/video/webgpu/buffer/arena.d.ts.map +1 -1
- package/build/video/webgpu/buffer/instance_buffer.d.ts +1 -64
- package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -1
- package/build/video/webgpu/buffer/retained_geometry.d.ts +1 -54
- package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -1
- package/build/video/webgpu/buffer/uniformring.d.ts +1 -67
- package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
- package/build/video/webgpu/effect_binding.d.ts +1 -16
- package/build/video/webgpu/effect_binding.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/bindgroups.d.ts +1 -32
- package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/cache.d.ts +1 -163
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +1 -87
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
- package/build/video/webgpu/shaders/mesh-instanced.d.ts +1 -43
- package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -1
- package/build/video/webgpu/texture/compressed.d.ts +1 -32
- package/build/video/webgpu/texture/compressed.d.ts.map +1 -1
- package/build/video/webgpu/texture/frametexture.d.ts +1 -62
- package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
- package/build/video/webgpu/texture/store.d.ts +1 -147
- package/build/video/webgpu/texture/store.d.ts.map +1 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +2 -89
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +8 -11
- package/skills/AGENTS.md +67 -0
- package/skills/melonjs/SKILL.md +156 -0
- package/skills/melonjs-20-migration/SKILL.md +160 -0
- package/skills/melonjs-3d/SKILL.md +525 -0
- package/skills/melonjs-3d-assets/SKILL.md +258 -0
- package/skills/melonjs-audio/SKILL.md +236 -0
- package/skills/melonjs-camera-and-drawing/SKILL.md +175 -0
- package/skills/melonjs-deployment/SKILL.md +113 -0
- package/skills/melonjs-effects-and-shaders/SKILL.md +178 -0
- package/skills/melonjs-events/SKILL.md +159 -0
- package/skills/melonjs-getting-started/SKILL.md +183 -0
- package/skills/melonjs-input/SKILL.md +166 -0
- package/skills/melonjs-lighting/SKILL.md +139 -0
- package/skills/melonjs-loading-assets/SKILL.md +186 -0
- package/skills/melonjs-particles-and-trails/SKILL.md +136 -0
- package/skills/melonjs-performance/SKILL.md +183 -0
- package/skills/melonjs-physics/SKILL.md +321 -0
- package/skills/melonjs-plugins/SKILL.md +191 -0
- package/skills/melonjs-renderables/SKILL.md +214 -0
- package/skills/melonjs-renderer-backends/SKILL.md +173 -0
- package/skills/melonjs-scenes-and-state/SKILL.md +180 -0
- package/skills/melonjs-sprites-and-animation/SKILL.md +173 -0
- package/skills/melonjs-tilemaps/SKILL.md +213 -0
- package/skills/melonjs-ui-and-text/SKILL.md +65 -0
- package/build/audio/backend.d.ts +0 -140
- package/build/audio/backend.d.ts.map +0 -1
- package/build/loader/parsers/fetchdata.d.ts +0 -32
- package/build/loader/parsers/fetchdata.d.ts.map +0 -1
|
@@ -1,140 +1,4 @@
|
|
|
1
1
|
export default TextureCache;
|
|
2
|
-
/**
|
|
3
|
-
* a basic texture cache object
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
declare class TextureCache {
|
|
7
|
-
/**
|
|
8
|
-
* @ignore
|
|
9
|
-
*/
|
|
10
|
-
constructor(renderer: any, max_size?: number);
|
|
11
|
-
renderer: any;
|
|
12
|
-
cache: ArrayMultimap;
|
|
13
|
-
tinted: Map<any, any>;
|
|
14
|
-
units: Map<any, any>;
|
|
15
|
-
slotTable: TextureSlotTable;
|
|
16
|
-
reservedUnits: Map<any, any>;
|
|
17
|
-
/**
|
|
18
|
-
* Which texture units are currently taken. This is the slot table's own
|
|
19
|
-
* occupancy set, exposed under the name it has always had — seeding or
|
|
20
|
-
* clearing it drives the allocator directly.
|
|
21
|
-
* @returns {Set<number>} the occupied units
|
|
22
|
-
* @ignore
|
|
23
|
-
*/
|
|
24
|
-
get usedUnits(): Set<number>;
|
|
25
|
-
set max_size(size: number);
|
|
26
|
-
/**
|
|
27
|
-
* How many texture units this cache may hand out. Backed by the slot
|
|
28
|
-
* table's capacity, so assigning it (tests narrow it to force exhaustion,
|
|
29
|
-
* and a context restore can resolve a different device limit) re-sizes the
|
|
30
|
-
* allocator rather than leaving the two disagreeing.
|
|
31
|
-
* @returns {number} the unit count
|
|
32
|
-
* @ignore
|
|
33
|
-
*/
|
|
34
|
-
get max_size(): number;
|
|
35
|
-
/**
|
|
36
|
-
* @ignore
|
|
37
|
-
*/
|
|
38
|
-
clear(): void;
|
|
39
|
-
/**
|
|
40
|
-
* @ignore
|
|
41
|
-
*/
|
|
42
|
-
allocateTextureUnit(): number;
|
|
43
|
-
/**
|
|
44
|
-
* Reserve a texture unit so {@link allocateTextureUnit} never hands it to a
|
|
45
|
-
* color texture — used by `ShaderEffect.setTexture` to hold high units for
|
|
46
|
-
* its extra samplers. Reference-counted, so a unit shared by several effects
|
|
47
|
-
* stays reserved until the last one releases it.
|
|
48
|
-
* @param {number} unit - the texture unit to reserve
|
|
49
|
-
* @ignore
|
|
50
|
-
*/
|
|
51
|
-
reserveUnit(unit: number): void;
|
|
52
|
-
/**
|
|
53
|
-
* Release a unit previously held by {@link reserveUnit}. The unit becomes
|
|
54
|
-
* allocatable again once its last holder releases it.
|
|
55
|
-
* @param {number} unit - the texture unit to release
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
releaseUnit(unit: number): void;
|
|
59
|
-
/**
|
|
60
|
-
* Reset all texture unit assignments without clearing the texture cache.
|
|
61
|
-
* Used by multi-texture batching when the shader's sampler range is exceeded.
|
|
62
|
-
* @ignore
|
|
63
|
-
*/
|
|
64
|
-
resetUnitAssignments(): void;
|
|
65
|
-
/**
|
|
66
|
-
* @ignore
|
|
67
|
-
*
|
|
68
|
-
* Frees the single `(source, repeat)` unit matching the texture's
|
|
69
|
-
* current `repeat` field — deliberately granular, so freeing one live
|
|
70
|
-
* consumer (e.g. one of two patterns with different repeats over the
|
|
71
|
-
* same image) never evicts the other's unit. When a SOURCE goes away
|
|
72
|
-
* entirely, use {@link freeAllUnits} instead — a source can hold units
|
|
73
|
-
* under several repeat modes (per-mesh `textureRepeat` overrides,
|
|
74
|
-
* #1503) that this granular free would leave pinned.
|
|
75
|
-
*/
|
|
76
|
-
freeTextureUnit(texture: any): void;
|
|
77
|
-
/**
|
|
78
|
-
* @ignore
|
|
79
|
-
*
|
|
80
|
-
* Free every texture unit allocated for the texture's source, across
|
|
81
|
-
* ALL repeat modes. A single source can hold several `(source, repeat)`
|
|
82
|
-
* units — patterns with different repeats over one image, or meshes
|
|
83
|
-
* sampling one image with per-mesh `textureRepeat` overrides (#1503) —
|
|
84
|
-
* and the source going away invalidates all of them at once.
|
|
85
|
-
*/
|
|
86
|
-
freeAllUnits(texture: any): void;
|
|
87
|
-
/**
|
|
88
|
-
* @ignore
|
|
89
|
-
* @param {string} [repeat] - overrides the texture's own `repeat` for the
|
|
90
|
-
* unit lookup — sampler state per use (a mesh's `textureRepeat`), so one
|
|
91
|
-
* source can be sampled with several wrap modes without mutating the
|
|
92
|
-
* shared atlas (#1503). Omit to use `texture.repeat`.
|
|
93
|
-
*
|
|
94
|
-
* Hot-path note: `getUnit` / `peekUnit` are called per-texture per-draw,
|
|
95
|
-
* so the `(source, repeat)` lookup is inlined here rather than going
|
|
96
|
-
* through a helper that allocates a `{source, repeat}` object per call.
|
|
97
|
-
*/
|
|
98
|
-
getUnit(texture: any, repeat?: string): any;
|
|
99
|
-
/**
|
|
100
|
-
* @ignore
|
|
101
|
-
* return every texture unit allocated for the given texture's source,
|
|
102
|
-
* across ALL repeat modes — the unload-time counterpart of the per-use
|
|
103
|
-
* `getUnit(texture, repeat)` override (#1503): a single source can hold
|
|
104
|
-
* one unit per wrap mode it was sampled with, and per-repeat `peekUnit`
|
|
105
|
-
* lookups would only ever find the one matching the texture's current
|
|
106
|
-
* `repeat` field. Not a hot path (allocates the result array).
|
|
107
|
-
*/
|
|
108
|
-
peekAllUnits(texture: any): any[];
|
|
109
|
-
/**
|
|
110
|
-
* @ignore
|
|
111
|
-
* return the texture unit for the given texture, or -1 if not allocated
|
|
112
|
-
* @param {string} [repeat] - same per-use wrap override as {@link getUnit}
|
|
113
|
-
*/
|
|
114
|
-
peekUnit(texture: any, repeat?: string): any;
|
|
115
|
-
/**
|
|
116
|
-
* @ignore
|
|
117
|
-
* cache the textureAltas for the given image
|
|
118
|
-
*/
|
|
119
|
-
set(image: any, textureAtlas: any): void;
|
|
120
|
-
/**
|
|
121
|
-
* @ignore
|
|
122
|
-
*/
|
|
123
|
-
has(image: any): boolean;
|
|
124
|
-
/**
|
|
125
|
-
* @ignore
|
|
126
|
-
* return the textureAltas for the given image
|
|
127
|
-
*/
|
|
128
|
-
get(image: any, atlas: any): any;
|
|
129
|
-
/**
|
|
130
|
-
* @ignore
|
|
131
|
-
*/
|
|
132
|
-
delete(image: any): void;
|
|
133
|
-
/**
|
|
134
|
-
* @ignore
|
|
135
|
-
*/
|
|
136
|
-
tint(src: any, color: any): any;
|
|
137
|
-
}
|
|
138
2
|
import { ArrayMultimap } from "../../utils/array-multimap.js";
|
|
139
3
|
import { TextureSlotTable } from "../gpu/textureslots.js";
|
|
140
4
|
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/video/texture/cache.js"],"names":[],"mappings":";AAgBA
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/video/texture/cache.js"],"names":[],"mappings":";AAgBA;;;;GAIG;AACH;IACC;;;OAGG;IACH,8CAgDC;IA9CA,cAAwB;IAExB,qBAAgC;IAChC,sBAAuB;IAavB,qBAAsB;IAOtB,4BAeE;IAMF,6BAA8B;IAI/B;;;;;;;OAOG;IACH,iBAJa,GAAG,CAAC,MAAM,CAAC,CAMvB;IAeD,mBARa,MAAM,EAUlB;IAfD;;;;;;;;OAQG;IACH,gBAJa,MAAM,CAMlB;IAMD;;;OAGG;IACH,cAKC;IAED;;;OAGG;IACH,8BAIC;IAED;;;;;;;;OAQG;IACH,kBAJW,MAAM,QAMhB;IAED;;;;;;OAMG;IACH,kBAJW,MAAM,QAWhB;IAED;;;;;OAKG;IACH,6BAIC;IAED;;;;;;;;;;;OAWG;IACH,oCAaC;IAED;;;;;;;;;OASG;IACH,iCASC;IAED;;;;;;;;;;;OAWG;IACH,+BATW,MAAM,OAuBhB;IAED;;;;;;;;;OASG;IACH,kCAIC;IAED;;;;;OAKG;IACH,gCAFW,MAAM,OAShB;IAED;;;;OAIG;IACH,yCAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,iCAmCC;IAED;;;OAGG;IACH,yBAkBC;IAED;;;OAGG;IACH,gCAcC;CACD;8BAvX6B,+BAA+B;iCAE5B,wBAAwB"}
|
|
@@ -1,73 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* A GPU-resident texture holding a captured frame — the value returned by
|
|
3
|
-
* {@link WebGLRenderer#toFrameTexture}. Its backing is a live `WebGLTexture`
|
|
4
|
-
* that the renderer refreshes **in place** on each capture, so a shader that
|
|
5
|
-
* has bound it once (via {@link ShaderEffect#setTexture}) keeps sampling the
|
|
6
|
-
* latest frame with no re-bind.
|
|
7
|
-
*
|
|
8
|
-
* Not part of the public class surface: obtain instances from
|
|
9
|
-
* `renderer.toFrameTexture()` and treat them as opaque {@link Texture2d}
|
|
10
|
-
* values. The `isGPUResident` flag is the discriminant `setTexture` uses to
|
|
11
|
-
* take its live-bind path (bind the existing handle) instead of uploading a
|
|
12
|
-
* static copy.
|
|
13
|
-
* @augments Texture2d
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
export class FrameTexture extends Texture2d {
|
|
17
|
-
/**
|
|
18
|
-
* @param {WebGLRenderer} renderer - the owning renderer (for the GL context)
|
|
19
|
-
* @param {number} width - capture width in pixels
|
|
20
|
-
* @param {number} height - capture height in pixels
|
|
21
|
-
*/
|
|
22
|
-
constructor(renderer: WebGLRenderer, width: number, height: number);
|
|
23
|
-
_renderer: WebGLRenderer;
|
|
24
|
-
/** @type {number} */
|
|
25
|
-
width: number;
|
|
26
|
-
/** @type {number} */
|
|
27
|
-
height: number;
|
|
28
|
-
/**
|
|
29
|
-
* the live backing texture, (re)filled by `renderer.toFrameTexture` and
|
|
30
|
-
* bound (never re-uploaded) by consumers
|
|
31
|
-
* @type {WebGLTexture|null}
|
|
32
|
-
*/
|
|
33
|
-
glTexture: WebGLTexture | null;
|
|
34
|
-
/**
|
|
35
|
-
* marks this as a live GPU-resident source — see {@link ShaderEffect#setTexture}
|
|
36
|
-
* @type {boolean}
|
|
37
|
-
*/
|
|
38
|
-
isGPUResident: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The opaque GPU-resident backing — itself.
|
|
41
|
-
* @returns {FrameTexture}
|
|
42
|
-
*/
|
|
43
|
-
getTexture(): FrameTexture;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* The Canvas-renderer counterpart of {@link FrameTexture}: a captured frame
|
|
47
|
-
* backed by an offscreen `<canvas>` copy of the drawing buffer, keeping the
|
|
48
|
-
* `toFrameTexture` family renderer-complete. A drawable source (not
|
|
49
|
-
* GPU-resident), so it flows through the normal image path; custom shaders
|
|
50
|
-
* don't run under the Canvas renderer, so this exists for API parity and
|
|
51
|
-
* CPU-side reuse (e.g. drawing the captured frame back onto the scene).
|
|
52
|
-
* @augments Texture2d
|
|
53
|
-
* @ignore
|
|
54
|
-
*/
|
|
55
|
-
export class CanvasFrameTexture extends Texture2d {
|
|
56
|
-
/**
|
|
57
|
-
* @param {HTMLCanvasElement|OffscreenCanvas} canvas - the backing copy
|
|
58
|
-
*/
|
|
59
|
-
constructor(canvas: HTMLCanvasElement | OffscreenCanvas);
|
|
60
|
-
/** @type {HTMLCanvasElement|OffscreenCanvas} */
|
|
61
|
-
canvas: HTMLCanvasElement | OffscreenCanvas;
|
|
62
|
-
/** @type {number} */
|
|
63
|
-
width: number;
|
|
64
|
-
/** @type {number} */
|
|
65
|
-
height: number;
|
|
66
|
-
/**
|
|
67
|
-
* The backing canvas copy.
|
|
68
|
-
* @returns {HTMLCanvasElement|OffscreenCanvas}
|
|
69
|
-
*/
|
|
70
|
-
getTexture(): HTMLCanvasElement | OffscreenCanvas;
|
|
71
|
-
}
|
|
1
|
+
|
|
72
2
|
import Texture2d from "./texture2d.ts";
|
|
73
3
|
//# sourceMappingURL=frametexture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../src/video/texture/frametexture.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../src/video/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;OAIG;IACH,sBAJW,aAAa,SACb,MAAM,UACN,MAAM,EAwBhB;IApBA;;;OAGG;IACH,yBAAyB;IACzB,qBAAqB;IACrB,OADW,MAAM,CACC;IAClB,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB;;;;OAIG;IACH,WAFU,YAAY,GAAC,IAAI,CAEN;IACrB;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAG1B;;;OAGG;IACH,cAFa,YAAY,CAIxB;CAaD;AAED;;;;;;;;;;GAUG;AACH;IACC;;OAEG;IACH,oBAFW,iBAAiB,GAAC,eAAe,EAU3C;IANA,gDAAgD;IAChD,QADW,iBAAiB,GAAC,eAAe,CACxB;IACpB,qBAAqB;IACrB,OADW,MAAM,CACQ;IACzB,qBAAqB;IACrB,QADW,MAAM,CACU;IAG5B;;;OAGG;IACH,cAFa,iBAAiB,GAAC,eAAe,CAI7C;CACD;sBArGqB,gBAAgB"}
|
|
@@ -98,15 +98,6 @@ declare class NoiseTexture2d extends Texture2d {
|
|
|
98
98
|
speed: number;
|
|
99
99
|
/** the current animation time (third sampling axis) @type {number} */
|
|
100
100
|
time: number;
|
|
101
|
-
/** the baked output canvas (reused across re-bakes) @type {HTMLCanvasElement|null} @ignore */
|
|
102
|
-
_canvas: HTMLCanvasElement | null;
|
|
103
|
-
/** reused ImageData scratch (avoids a per-bake allocation) @type {ImageData|null} @ignore */
|
|
104
|
-
_imageData: ImageData | null;
|
|
105
|
-
/** reused height-field scratch (avoids a per-bake allocation) @type {Float32Array|null} @ignore */
|
|
106
|
-
_heights: Float32Array | null;
|
|
107
|
-
/** content revision, bumped on every bake and stamped on the canvas so
|
|
108
|
-
* the renderer re-uploads the GPU texture when it changes @type {number} @ignore */
|
|
109
|
-
_version: number;
|
|
110
101
|
/**
|
|
111
102
|
* The current content revision, bumped on every {@link NoiseTexture2d#bake}.
|
|
112
103
|
* Also stamped on the baked canvas (`getTexture().version`) so the renderer
|
|
@@ -132,40 +123,6 @@ declare class NoiseTexture2d extends Texture2d {
|
|
|
132
123
|
* @returns {NoiseTexture2d} this texture for chaining
|
|
133
124
|
*/
|
|
134
125
|
update(dt: number): NoiseTexture2d;
|
|
135
|
-
/**
|
|
136
|
-
* Raw noise sample at a texture pixel (2D, or 3D when animated). The time
|
|
137
|
-
* axis is divided by the noise frequency so that, after `getNoise3d` scales
|
|
138
|
-
* all coords by frequency, the field evolves at `speed` noise-units/second —
|
|
139
|
-
* decoupled from the spatial frequency (otherwise low-frequency textures
|
|
140
|
-
* would animate imperceptibly slowly).
|
|
141
|
-
* @ignore
|
|
142
|
-
*/
|
|
143
|
-
_rawNoise(x: any, y: any): number;
|
|
144
|
-
/**
|
|
145
|
-
* x-axis seamless blend: in the right skirt band, cross-fade toward the
|
|
146
|
-
* wrapped (period-shifted) sample so the left and right edges meet.
|
|
147
|
-
* @ignore
|
|
148
|
-
*/
|
|
149
|
-
_blendX(x: any, y: any, w: any, sk: any): any;
|
|
150
|
-
/**
|
|
151
|
-
* Sample the noise into a `[0, 1]` height field. When `seamless`, a skirt
|
|
152
|
-
* cross-fade near the far edges blends opposite edges so the texture tiles
|
|
153
|
-
* with a much-reduced seam.
|
|
154
|
-
* @returns {Float32Array} the per-pixel height field (length `width*height`)
|
|
155
|
-
* @ignore
|
|
156
|
-
*/
|
|
157
|
-
_buildHeightField(): Float32Array;
|
|
158
|
-
/** @ignore */
|
|
159
|
-
_writeGrayscale(data: any, heights: any): void;
|
|
160
|
-
/** @ignore */
|
|
161
|
-
_writeColorRamp(data: any, heights: any): void;
|
|
162
|
-
/**
|
|
163
|
-
* Encode the height field as a tangent-space normal map (RGB), with screen-Y
|
|
164
|
-
* flipped to normal-map Y-up so it round-trips through the lit shader's
|
|
165
|
-
* `rgb * 2 - 1` decode. Neighbor samples wrap when `seamless`.
|
|
166
|
-
* @ignore
|
|
167
|
-
*/
|
|
168
|
-
_writeNormalMap(data: any, heights: any): void;
|
|
169
126
|
/**
|
|
170
127
|
* @returns {HTMLCanvasElement} the baked texture canvas
|
|
171
128
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noise_texture2d.d.ts","sourceRoot":"","sources":["../../../src/video/texture/noise_texture2d.js"],"names":[],"mappings":";AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IACC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,uBAhBG;QAA0B,KAAK;QACL,MAAM;QACP,KAAK;QAEH,QAAQ;QACT,kBAAkB;QAEjB,MAAM;QACN,WAAW;QACZ,YAAY;QACV,SAAS;QACV,QAAQ;QAET,KAAK;KAEjC,
|
|
1
|
+
{"version":3,"file":"noise_texture2d.d.ts","sourceRoot":"","sources":["../../../src/video/texture/noise_texture2d.js"],"names":[],"mappings":";AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IACC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,uBAhBG;QAA0B,KAAK;QACL,MAAM;QACP,KAAK;QAEH,QAAQ;QACT,kBAAkB;QAEjB,MAAM;QACN,WAAW;QACZ,YAAY;QACV,SAAS;QACV,QAAQ;QAET,KAAK;KAEjC,EAwDA;IApDA,mDAAmD;IACnD,OADyC,MAAM,CACb;IAClC,oDAAoD;IACpD,QAD0C,MAAM,CACZ;IACpC,0DAA0D;IAC1D,OADiD,KAAK,CAEiB;IACvE,gDAAgD;IAChD,UADqC,OAAO,CACF;IAC1C,2EAA2E;IAC3E,oBADiE,MAAM,CAItE;IACD,6CAA6C;IAC7C,QADkC,OAAO,CACH;IACtC,qEAAqE;IACrE,aAD0D,OAAO,CACjB;IAChD,yDAAyD;IACzD,cAD+C,MAAM,CACL;IAChD,2EAA2E;IAC3E,WAD0D,QAAQ,GAAC,IAAI,CAC5B;IAC3C,4EAA4E;IAC5E,UADiE,OAAO,CAC9B;IAC1C,iEAAiE;IACjE,OADuD,MAAM,CAC7B;IAChC,sEAAsE;IACtE,MAD4D,MAAM,CACrD;IAEb;;;;OAIG;IACH,SAJ2D,iBAAiB,GAAC,IAAI,CAI9D;IACnB;;;;OAIG;IACH,YAJkE,SAAS,GAAC,IAAI,CAI1D;IACtB;;;;OAIG;IACH,UAJqE,YAAY,GAAC,IAAI,CAIlE;IACpB;wFACoF;IACpF,UADkE,MAAM,CACvD;IAKlB;;;;;OAKG;IACH,eAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,QAFa,cAAc,CAiC1B;IAED;;;;;;;;;OASG;IACH,WAHW,MAAM,GACJ,cAAc,CAQ1B;IAED;;;;;;;;OAQG;IACH,kCAMC;IAED;;;;;OAKG;IACH,8CAOC;IAED;;;;;;;OAOG;IACH,qBAJa,YAAY,CA4CxB;IAED;;;OAGG;IACH,+CASC;IAED;;;OAGG;IACH,+CAWC;IAED;;;;;;OAMG;IACH,+CA+BC;IAED;;OAEG;IACH,cAFa,iBAAiB,CAI7B;CAcD;sBAlXqB,gBAAgB;sBAFhB,qBAAqB"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* parse the given data and return a corresponding atlas
|
|
3
|
-
* @param {Object} data - atlas data information. See {@link loader.getJSON}
|
|
4
|
-
* @param {TextureAtlas} textureAtlas - the texture atlas class calling the parser
|
|
5
|
-
* @returns {Object} the corresponding Atlas
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export function parseAseprite(data: Object, textureAtlas: TextureAtlas): Object;
|
|
1
|
+
|
|
9
2
|
//# sourceMappingURL=aseprite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aseprite.d.ts","sourceRoot":"","sources":["../../../../src/video/texture/parser/aseprite.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"aseprite.d.ts","sourceRoot":"","sources":["../../../../src/video/texture/parser/aseprite.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,oCANW,MAAM,gBACN,YAAY,GACV,MAAM,CAuFlB"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* parse the given data and return a corresponding atlas
|
|
3
|
-
* @param {Object} data - atlas data information. See {@link loader.getJSON}
|
|
4
|
-
* @param {TextureAtlas} textureAtlas - the texture atlas class calling the parser
|
|
5
|
-
* @returns {Object} the corresponding Atlas
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export function parseSpriteSheet(data: Object, textureAtlas: TextureAtlas): Object;
|
|
1
|
+
|
|
9
2
|
//# sourceMappingURL=spritesheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spritesheet.d.ts","sourceRoot":"","sources":["../../../../src/video/texture/parser/spritesheet.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"spritesheet.d.ts","sourceRoot":"","sources":["../../../../src/video/texture/parser/spritesheet.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,uCANW,MAAM,gBACN,YAAY,GACV,MAAM,CA4ElB"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* parse the given data and return a corresponding atlas
|
|
3
|
-
* @param {Object} data - atlas data information. See {@link loader.getJSON}
|
|
4
|
-
* @param {TextureAtlas} textureAtlas - the texture atlas class calling the parser
|
|
5
|
-
* @returns {Object} the corresponding Atlas
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export function parseTexturePacker(data: Object, textureAtlas: TextureAtlas): Object;
|
|
1
|
+
|
|
9
2
|
//# sourceMappingURL=texturepacker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texturepacker.d.ts","sourceRoot":"","sources":["../../../../src/video/texture/parser/texturepacker.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"texturepacker.d.ts","sourceRoot":"","sources":["../../../../src/video/texture/parser/texturepacker.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,yCANW,MAAM,gBACN,YAAY,GACV,MAAM,CAyDlB"}
|
|
@@ -52,13 +52,6 @@ export class TextureResource {
|
|
|
52
52
|
filter: number | undefined;
|
|
53
53
|
sources: Map<string, this>;
|
|
54
54
|
activeAtlas: string;
|
|
55
|
-
/**
|
|
56
|
-
* Returns the upload "source" the batcher hands to `createTexture2D`.
|
|
57
|
-
* For a resource this is the resource itself — `createTexture2D`
|
|
58
|
-
* dispatches to `resource.upload(context, target)`.
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
getTexture(): this;
|
|
62
55
|
/**
|
|
63
56
|
* Issue the backend-specific upload call (`gl.texImage2D` on WebGL,
|
|
64
57
|
* the WebGPU equivalent once that renderer lands) that places this
|
|
@@ -115,7 +108,5 @@ export class BufferTextureResource extends TextureResource {
|
|
|
115
108
|
data: ArrayBufferView;
|
|
116
109
|
/** @type {string} */
|
|
117
110
|
format: string;
|
|
118
|
-
/** @ignore */
|
|
119
|
-
upload(context: any, target: any): void;
|
|
120
111
|
}
|
|
121
112
|
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/video/texture/resource.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACC;;;;;;;;OAQG;IACH,qEAPG;QAAwB,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACY,kBAAkB;QAClB,MAAM;QACN,MAAM;KAElC,EAsBA;IAdA,qBAAqB;IACrB,OADW,MAAM,CACC;IAClB,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB,sBAAsB;IACtB,oBADW,OAAO,CAC0B;IAC5C,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB,+BAA+B;IAC/B,QADW,MAAM,GAAC,SAAS,CACP;IAGpB,2BAA2C;IAC3C,oBAA4B;IAG7B
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/video/texture/resource.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACC;;;;;;;;OAQG;IACH,qEAPG;QAAwB,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACY,kBAAkB;QAClB,MAAM;QACN,MAAM;KAElC,EAsBA;IAdA,qBAAqB;IACrB,OADW,MAAM,CACC;IAClB,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB,sBAAsB;IACtB,oBADW,OAAO,CAC0B;IAC5C,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB,+BAA+B;IAC/B,QADW,MAAM,GAAC,SAAS,CACP;IAGpB,2BAA2C;IAC3C,oBAA4B;IAG7B;;;;;;OAMG;IACH,mBAEC;IAED;;;;;;;;;;OAUG;IAEH,gBANW,qBAAqB,GAAC,sBAAsB,UAE5C,MAAM,QAMhB;CACD;AAED;;;;;;;;;;;;GAYG;AACH;IACC;;;;;;;;;;;;;;;;OAgBG;IACH,kBAhBW,eAAe,WAIvB;QAAyB,KAAK,EAAtB,MAAM;QACW,MAAM,EAAvB,MAAM;QACY,kBAAkB;QAClB,MAAM;QACN,MAAM;QACI,MAAM;KAM5C,EAOA;IAJA,8BAA8B;IAC9B,MADW,eAAe,CACV;IAChB,qBAAqB;IACrB,QADW,MAAM,CACsB;IAGxC;;;OAGG;IACH,wCAoCC;CACD"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compile-time-only brand key; no runtime value can hold it.
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
declare const gpuResidentBrand: unique symbol;
|
|
6
1
|
/**
|
|
7
2
|
* An opaque, GPU-resident texture backing — the source a GPU-resident
|
|
8
3
|
* {@link Texture2d} resolves to (for example the framebuffer copy
|
|
@@ -17,11 +12,6 @@ declare const gpuResidentBrand: unique symbol;
|
|
|
17
12
|
* {@link Texture2dSource} (and {@link Texture2d#getTexture}) honestly typed.
|
|
18
13
|
*/
|
|
19
14
|
export interface GPUResidentTexture {
|
|
20
|
-
/**
|
|
21
|
-
* Phantom nominal brand — never present at runtime.
|
|
22
|
-
* @ignore
|
|
23
|
-
*/
|
|
24
|
-
readonly [gpuResidentBrand]: true;
|
|
25
15
|
}
|
|
26
16
|
/**
|
|
27
17
|
* The backing source a {@link Texture2d} resolves to through
|
|
@@ -79,5 +69,4 @@ export default abstract class Texture2d {
|
|
|
79
69
|
*/
|
|
80
70
|
destroy(): void;
|
|
81
71
|
}
|
|
82
|
-
export {};
|
|
83
72
|
//# sourceMappingURL=texture2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texture2d.d.ts","sourceRoot":"","sources":["../../../src/video/texture/texture2d.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"texture2d.d.ts","sourceRoot":"","sources":["../../../src/video/texture/texture2d.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;CAOlC;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACxB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,WAAW,GACX,kBAAkB,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAS;IACtC;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,IAAI,eAAe;IAEtC;;;;;;;;;OASG;IACH,OAAO,IAAI,IAAI;CAGf"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Auto-detect the best renderer to use
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
export function autoDetectRenderer(options: any): CanvasRenderer | WebGLRenderer;
|
|
1
|
+
|
|
6
2
|
import CanvasRenderer from "../canvas/canvas_renderer";
|
|
7
3
|
import WebGLRenderer from "../webgl/webgl_renderer";
|
|
8
4
|
//# sourceMappingURL=autodetect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autodetect.d.ts","sourceRoot":"","sources":["../../../src/video/utils/autodetect.js"],"names":[],"mappings":"AAkCA
|
|
1
|
+
{"version":3,"file":"autodetect.d.ts","sourceRoot":"","sources":["../../../src/video/utils/autodetect.js"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,iFAeC;2BArD0B,2BAA2B;0BAC5B,yBAAyB"}
|
|
@@ -115,62 +115,7 @@ export class WebGLBatcher extends Batcher {
|
|
|
115
115
|
* @type {boolean}
|
|
116
116
|
*/
|
|
117
117
|
useIndexBuffer: boolean | undefined;
|
|
118
|
-
/**
|
|
119
|
-
* the GL vertex buffer object (own buffer for indexed batchers, null for shared)
|
|
120
|
-
* @type {WebGLBuffer|null}
|
|
121
|
-
* @ignore
|
|
122
|
-
*/
|
|
123
|
-
glVertexBuffer: WebGLBuffer | null | undefined;
|
|
124
|
-
/**
|
|
125
|
-
* the dynamic index buffer (only for indexed batchers)
|
|
126
|
-
* @type {WebGLIndexBuffer|null}
|
|
127
|
-
* @ignore
|
|
128
|
-
*/
|
|
129
|
-
indexBuffer: WebGLIndexBuffer | null | undefined;
|
|
130
|
-
/**
|
|
131
|
-
* The GL buffer this batcher uploads its vertex data into: its own
|
|
132
|
-
* buffer for indexed (mesh-family) batchers, otherwise the renderer's
|
|
133
|
-
* shared one.
|
|
134
|
-
* @type {WebGLBuffer}
|
|
135
|
-
* @ignore
|
|
136
|
-
*/
|
|
137
|
-
get uploadBuffer(): WebGLBuffer;
|
|
138
|
-
/**
|
|
139
|
-
* (Re)build this batcher's {@link WebGLVertexState} — the frozen vertex
|
|
140
|
-
* buffer layout (`attributes` + `stride`) realized as a GL vertex array
|
|
141
|
-
* object bound to this batcher's upload buffer and, for indexed
|
|
142
|
-
* batchers, its index buffer.
|
|
143
|
-
*
|
|
144
|
-
* Every shader hosted by this batcher must declare a prefix of that
|
|
145
|
-
* layout, in layout order (see {@link validateShaderLocations}) — the
|
|
146
|
-
* locations are frozen here at the default shader's mapping.
|
|
147
|
-
* @ignore
|
|
148
|
-
*/
|
|
149
|
-
createVertexState(): void;
|
|
150
|
-
/**
|
|
151
|
-
* Validate (once per shader) that a hosted shader's attribute locations
|
|
152
|
-
* match this batcher's frozen vertex state. The engine's analogue of
|
|
153
|
-
* WebGPU's pipeline-creation validation: locations are bound in vertex
|
|
154
|
-
* source declaration order, so every shader hosted by this batcher must
|
|
155
|
-
* declare a prefix of the batcher's attribute layout, in layout order.
|
|
156
|
-
* A mismatched shader silently reads wrong vertex data — warn loudly.
|
|
157
|
-
* @ignore
|
|
158
|
-
*/
|
|
159
|
-
validateShaderLocations(shader: any): void;
|
|
160
118
|
validatedShaders: WeakSet<object> | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* Ensure the draw about to be recorded runs on THIS batcher's program.
|
|
163
|
-
* Normally `bind()` guaranteed that, but an `ONCONTEXT_RESTORED`
|
|
164
|
-
* emission recompiles every live GLShader — each replaying its uniform
|
|
165
|
-
* snapshot on its OWN program — leaving whichever recompiled last
|
|
166
|
-
* really bound while the renderer's cache still named another. The
|
|
167
|
-
* renderer invalidates its program cache on that event, so this
|
|
168
|
-
* pointer compare re-issues `useProgram` exactly when the drift
|
|
169
|
-
* happened and costs two loads otherwise. Called by every flush path
|
|
170
|
-
* (the base and the quad override).
|
|
171
|
-
* @ignore
|
|
172
|
-
*/
|
|
173
|
-
syncProgram(): void;
|
|
174
119
|
/**
|
|
175
120
|
* Select the shader to use for compositing
|
|
176
121
|
* @see GLShader
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/batcher.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH;
|
|
1
|
+
{"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/batcher.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH;IAkBC;;;OAGG;IACH,sBAHW,aAAa,YACb,MAAM,EAKhB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,eAfW,aAAa,YAErB;QAA2B,UAAU,EACrC;YAAoC,IAAI,EAAhC,MAAM;YACsB,IAAI,EAAhC,MAAM;YACsB,IAAI,EAAhC,MAAM;YACuB,UAAU,EAAvC,OAAO;YACqB,MAAM,EAAlC,MAAM;SACd;QAAyB,MAAM,EAC/B;YAAgC,MAAM,EAA9B,MAAM;YACkB,QAAQ,EAAhC,MAAM;SACd;QAA0B,WAAW;QACV,OAAO;QACR,iBAAiB;KAC7C,QAiJA;IA3IA,QAAqB;IAGrB,iCAA2C;IAE3C;;;OAGG;IACH,oCAA8B;IAE9B;;;OAGG;IACH,oCAA8B;IA4Y/B;;OAEG;IACH,gBAFW,QAAQ,GAAC,MAAM,EASzB;IAxBD;;;;;;;;;OASG;IACH,YAHU,MAAM,CAKf;IAhYC,iDAAuB;IAGxB;;;;OAIG;IACH,iCAAoB;IAEpB;;;;;OAKG;IACH,2BAAe;IAEf;;;;;OAKG;IACH,+BAAmB;IAEnB;;;OAGG;IACH,0CAAsB;IA4CtB;;;OAGG;IACH,sCAA0E;IAE1E;;;OAGG;IACH,oCAA+C;IAE/C;;;;;OAKG;IACH,+CAA0B;IAE1B;;;;;OAKG;IACH,iDAAuB;IAgBxB;;;;;;;OAOG;IACH,oBAJU,WAAW,CAMpB;IAED;;;;;;;;;;;OAWG;IACH,0BAiBC;IAoGD;;;;;;;;;OASG;IACH,2CA0BC;IAxBC,8CAAqC;IA0BvC;;;;;;;;;;;;OAYG;IACH,oBAaC;IAED;;;;OAIG;IACH,kBAFW,QAAQ,QAuBlB;IAHE,uCAA4B;IAmB/B;;OAEG;IACH,oBAFW,QAAQ,GAAC,MAAM,EAIzB;IAnBD;;;;;;;;;OASG;IACH,gBAHU,QAAQ,CAKjB;IAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,mBAPW,MAAM,GAAC,MAAM,SACb,MAAM,GAAC,YAAY,SACnB,MAAM,GAAC,MAAM,eACb,OAAO,WACP,MAAM,wBA4BhB;IAoJD;;;OAGG;IACH,sBAFW,QAAQ,QAIlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,EAAE,QAOlB;IAED;;;OAGG;IACH,aAFW,MAAM,QAqEhB;;CACD;;wBA7xB6C,sBAAsB;+BAUtC,wBAAwB;8BAC3B,2BAA2B;qBAPjC,gBAAgB;8BASV,uBAAuB;6BAVrB,0BAA0B;8BAJzB,wBAAwB;6BAGzB,oBAAoB;kCAUlB,2BAA2B"}
|
|
@@ -12,20 +12,6 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export default class LitMeshBatcher extends MeshBatcher {
|
|
14
14
|
lightBlock: UniformBlock | undefined;
|
|
15
|
-
_lightBlockProgram: any;
|
|
16
|
-
/**
|
|
17
|
-
* Point the active program's `Light3dBlock` at our uniform buffer.
|
|
18
|
-
*
|
|
19
|
-
* A block binding is program state, so it has to be re-established
|
|
20
|
-
* whenever the program changes: a context restore recompiles it, `init`
|
|
21
|
-
* re-runs on reset, and `useShader` can swap one in without a batcher
|
|
22
|
-
* transition. Comparing against the program we last bound covers all
|
|
23
|
-
* three — a pointer compare in the steady state.
|
|
24
|
-
* @ignore
|
|
25
|
-
*/
|
|
26
|
-
_bindLightBlock(): void;
|
|
27
|
-
/** push the 12-float lit vertex, appending the mesh's world-space normal. @ignore */
|
|
28
|
-
_pushVertex(vertexData: any, x: any, y: any, z: any, u: any, v: any, color: any, mesh: any, i3: any): void;
|
|
29
15
|
}
|
|
30
16
|
import MeshBatcher from "./mesh_batcher.js";
|
|
31
17
|
import UniformBlock from "../buffer/uniformblock.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit_mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_mesh_batcher.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;GAWG;AACH;
|
|
1
|
+
{"version":3,"file":"lit_mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_mesh_batcher.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;GAWG;AACH;IA6BE,qCAIC;IACD;;;OAGG;IACH,wBAA8B;IAO/B;;;;;;;;;;OAUG;IACH,wBAQC;IAsDD;;;;OAIG;IACH,2GAaC;CA8DD;wBAlOuB,mBAAmB;yBAPlB,2BAA2B"}
|
|
@@ -18,54 +18,8 @@
|
|
|
18
18
|
* @category Rendering
|
|
19
19
|
*/
|
|
20
20
|
export default class LitQuadBatcher extends QuadBatcher {
|
|
21
|
-
/**
|
|
22
|
-
* normal-map texture per color slot — keyed by the same unit index as
|
|
23
|
-
* `boundTextures`. Used by `addQuad` to detect when a normal-map slot
|
|
24
|
-
* needs (re-)uploading, mirroring the color-texture cache.
|
|
25
|
-
* @type {Array<HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null>}
|
|
26
|
-
* @ignore
|
|
27
|
-
*/
|
|
28
|
-
boundNormalMaps: (ImageBitmap | HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | null)[] | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Per-slot content `version` of the normal map currently bound there. An
|
|
31
|
-
* animated source keeps a stable canvas reference across re-bakes but
|
|
32
|
-
* bumps its `version`, so `addQuad` compares this (not just the reference)
|
|
33
|
-
* to know when to re-bind/re-upload. `-1` = nothing bound.
|
|
34
|
-
* @type {number[]}
|
|
35
|
-
* @ignore
|
|
36
|
-
*/
|
|
37
|
-
boundNormalVersions: number[] | undefined;
|
|
38
21
|
normalStore: WebGLTextureStore | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Which slot in the shared pool each normal-map source currently holds.
|
|
41
|
-
* Normal maps are not in the color `TextureCache` (they are raw sources
|
|
42
|
-
* with their own GL textures), so their unit assignment is tracked here
|
|
43
|
-
* while the unit itself comes from the same allocator the colors use.
|
|
44
|
-
* @type {Map<HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap, number>}
|
|
45
|
-
* @ignore
|
|
46
|
-
*/
|
|
47
|
-
normalUnits: Map<ImageBitmap | HTMLImageElement | HTMLCanvasElement | OffscreenCanvas, number> | undefined;
|
|
48
|
-
_cacheEpoch: any;
|
|
49
|
-
_lightCount: number | undefined;
|
|
50
|
-
_maxLights: number | undefined;
|
|
51
22
|
lightBlock: UniformBlock | undefined;
|
|
52
|
-
_lightBlockProgram: any;
|
|
53
|
-
_onTexture2dDestroyed: ((source: any) => void) | null | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* Point the active program's `Light2dBlock` at our uniform buffer.
|
|
56
|
-
*
|
|
57
|
-
* A block binding is *program* state, and the program can change under us
|
|
58
|
-
* in three ways: a context restore recompiles it, `setBatcher` can host a
|
|
59
|
-
* {@link ShaderEffect} on this batcher, and `init` re-runs on reset. Rather
|
|
60
|
-
* than hook each of those, re-bind whenever the program is not the one we
|
|
61
|
-
* last bound — a pointer compare per `bind`, and self-healing.
|
|
62
|
-
*
|
|
63
|
-
* A hosted `ShaderEffect` is a plain unlit ES 1.00 program with no light
|
|
64
|
-
* block, so `bindTo` reports failure and we simply record it, leaving the
|
|
65
|
-
* next real lit program to bind normally.
|
|
66
|
-
* @ignore
|
|
67
|
-
*/
|
|
68
|
-
_bindLightBlock(): void;
|
|
69
23
|
/**
|
|
70
24
|
* Release the cached GL texture uploaded for the given normal-map source
|
|
71
25
|
* and clear any slot bookkeeping referencing it. Safe to call for images
|
|
@@ -112,32 +66,6 @@ export default class LitQuadBatcher extends QuadBatcher {
|
|
|
112
66
|
* @param {number} unit - GL texture unit the normal map is resolved to
|
|
113
67
|
*/
|
|
114
68
|
bindNormalMap(image: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | ImageBitmap, unit: number): void;
|
|
115
|
-
/**
|
|
116
|
-
* Drop a normal map's slot claim and hand the unit back to the allocator.
|
|
117
|
-
*
|
|
118
|
-
* A normal map claims its unit through `allocateTextureUnit()`, which has no
|
|
119
|
-
* key to release against — so without this the unit stayed marked used for
|
|
120
|
-
* the rest of the session and the pool drained monotonically as normal maps
|
|
121
|
-
* came and went, until something forced a full reset.
|
|
122
|
-
* @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} image - normal-map source
|
|
123
|
-
* @ignore
|
|
124
|
-
*/
|
|
125
|
-
releaseNormalUnit(image: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | ImageBitmap): void;
|
|
126
|
-
/**
|
|
127
|
-
* Resolve a normal-map source to its slot in the shared pool, uploading and
|
|
128
|
-
* binding it if it is not already resident.
|
|
129
|
-
*
|
|
130
|
-
* A version-only bump (an animated source re-baking into the same canvas
|
|
131
|
-
* reference) re-uploads into the same GL handle and needs no flush —
|
|
132
|
-
* `version` only changes between frames, and the batch is flushed at every
|
|
133
|
-
* frame/camera boundary, so no in-flight vertex references stale content.
|
|
134
|
-
* A DIFFERENT source landing on a live slot does need the pending vertices
|
|
135
|
-
* drawn first.
|
|
136
|
-
* @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} normalMap - the source
|
|
137
|
-
* @returns {number} the slot to write into `aNormalTextureId`
|
|
138
|
-
* @ignore
|
|
139
|
-
*/
|
|
140
|
-
resolveNormalUnit(normalMap: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | ImageBitmap): number;
|
|
141
69
|
/**
|
|
142
70
|
* Add a textured quad with optional paired normal map.
|
|
143
71
|
* @param {TextureAtlas} texture - Source texture atlas
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit_quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_quad_batcher.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AACH;
|
|
1
|
+
{"version":3,"file":"lit_quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_quad_batcher.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IA+DE;;;;;;;OAOG;IACH,6GAAiD;IAEjD;;;;;;;;OAQG;IACH,0CAAmD;IAoBnD,2CAAiD;IAEjD;;;;;;;;OAQG;IACH,2GAA4B;IAC5B;;;OAGG;IACH,iBAAoB;IAEpB;;;OAGG;IACH,gCAAoB;IACpB;;;OAGG;IACH,+BAA4B;IAuB5B,qCAIC;IACD;;;OAGG;IACH,wBAA8B;IAW7B,kEAEC;IAsCH;;;;;;;;;;;;;;OAcG;IACH,wBAQC;IAED;;;;;OAKG;IACH,sBAFW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAaxE;IAiFD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2BANG;QAA+B,SAAS,EAAhC,YAAY;QACW,MAAM,EAA7B,YAAY;QACY,OAAO;QACd,KAAK,EAAtB,MAAM;QACc,OAAO;KACrC,QAMA;IAED;;;;;;;;;OASG;IACH,qBAHW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAC9D,MAAM,QAqChB;IAED;;;;;;;;;;OAUG;IACH,yBAJW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAcxE;IAED;;;;;;;;;;;;;;OAcG;IACH,6BALW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAC5D,MAAM,CAuClB;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAbW,YAAY,KACZ,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,cACP,gBAAgB,GAAC,iBAAiB,GAAC,IAAI,QAsIjD;CA+DD;wBA7sBuB,mBAAmB;kCADT,qBAAqB;yBAT9B,2BAA2B;kCAcrB,0BAA0B"}
|