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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retained_geometry.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/retained_geometry.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"retained_geometry.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/retained_geometry.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACC;;;;;OAKG;IACH,gBALW,sBAAsB,cACtB,MAAM,EAAE,UACR,MAAM,6BA+DhB;IA3DA,2BAAY;IACZ,qBAA4B;IAC5B,eAAoB;IACpB,0BAAsC;IAEtC;;;OAGG;IACH,cAFU,WAAW,CAEgB;IAErC;;;OAGG;IACH,eAFU,WAAW,CAEiB;IAEtC;;;;;OAKG;IACH,WAFU,MAAM,CAEkB;IAElC;;;OAGG;IACH,YAFU,MAAM,CAEG;IAEnB;;;;OAIG;IACH,iBAFU,MAAM,CAES;IAYzB;;;OAGG;IACH,aAFU,gBAAgB,CAQxB;IAGH;;;;;;;OAOG;IACH,mBALW,YAAY,cACZ,MAAM,WACN,WAAW,GAAC,WAAW,GAAC,MAAM,EAAE,WAChC,MAAM,QAsChB;IAED;;OAEG;IACH,aAEC;IAED;;;OAGG;IACH,gBAwBC;CACD;6BA3K4B,kBAAkB"}
|
|
@@ -1,81 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* A uniform buffer bound to a named block in one or more shader programs.
|
|
3
|
-
*
|
|
4
|
-
* Uniform arrays are charged against `MAX_FRAGMENT_UNIFORM_VECTORS`, a
|
|
5
|
-
* driver-reported budget that is small on weak devices. A uniform buffer is
|
|
6
|
-
* charged against `MAX_UNIFORM_BLOCK_SIZE` instead — guaranteed at least
|
|
7
|
-
* 16 KB, typically 64 KB — so bulk per-frame data stops competing with
|
|
8
|
-
* everything else the shader declares.
|
|
9
|
-
*
|
|
10
|
-
* Data is staged in a `Float32Array` and uploaded with `bufferSubData`, so
|
|
11
|
-
* only the live prefix crosses the bus. Uploads are skipped entirely when the
|
|
12
|
-
* staged bytes have not changed, which preserves the property the uniform
|
|
13
|
-
* cache gives today: a scene whose lights are static costs nothing per frame.
|
|
14
|
-
*
|
|
15
|
-
* ## Context loss
|
|
16
|
-
*
|
|
17
|
-
* A block binding is program state, not buffer state, and every program is
|
|
18
|
-
* recompiled on restore — so the binding has to be re-established afterwards
|
|
19
|
-
* or the shader reads an unbound block and renders black. Callers re-bind
|
|
20
|
-
* lazily, whenever the program they last bound is no longer the current one;
|
|
21
|
-
* that covers a context restore without anyone subscribing to an event. The
|
|
22
|
-
* buffer itself needs no recovery hook — the renderer re-runs each batcher's
|
|
23
|
-
* `init()` on restore, which releases this block and builds a new one.
|
|
24
|
-
* @ignore
|
|
25
|
-
*/
|
|
26
|
-
export default class UniformBlock {
|
|
27
|
-
/**
|
|
28
|
-
* @param {WebGL2RenderingContext} gl - the rendering context
|
|
29
|
-
* @param {number} floats - capacity in floats
|
|
30
|
-
* @param {number} bindingPoint - the indexed binding point to occupy
|
|
31
|
-
*/
|
|
32
|
-
constructor(gl: WebGL2RenderingContext, floats: number, bindingPoint: number);
|
|
33
|
-
gl: WebGL2RenderingContext;
|
|
34
|
-
/**
|
|
35
|
-
* staging buffer; callers write into this then call `upload`
|
|
36
|
-
* @type {Float32Array}
|
|
37
|
-
*/
|
|
38
|
-
data: Float32Array;
|
|
39
|
-
/**
|
|
40
|
-
* mirror of what was last uploaded, so an unchanged frame can skip the
|
|
41
|
-
* `bufferSubData` entirely
|
|
42
|
-
* @type {Float32Array}
|
|
43
|
-
*/
|
|
44
|
-
_uploaded: Float32Array;
|
|
45
|
-
/** nothing has been uploaded yet, so the mirror is not yet valid */
|
|
46
|
-
_everUploaded: boolean;
|
|
47
|
-
/** live length of the last upload; -1 until there has been one */
|
|
48
|
-
_uploadedLength: number;
|
|
49
|
-
/** @type {number} */
|
|
50
|
-
bindingPoint: number;
|
|
51
|
-
/** @type {WebGLBuffer|null} */
|
|
52
|
-
buffer: WebGLBuffer | null;
|
|
53
|
-
/**
|
|
54
|
-
* Point a program's named block at this buffer's binding point.
|
|
55
|
-
*
|
|
56
|
-
* Safe to call repeatedly — after a context restore the program is a new
|
|
57
|
-
* object and must be re-bound, and there is no way to ask whether it
|
|
58
|
-
* already was.
|
|
59
|
-
* @param {WebGLProgram} program - the linked program
|
|
60
|
-
* @param {string} blockName - the block's name in GLSL
|
|
61
|
-
* @returns {boolean} `false` when the program does not declare the block
|
|
62
|
-
*/
|
|
63
|
-
bindTo(program: WebGLProgram, blockName: string): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Upload the first `floats` entries of {@link UniformBlock#data}.
|
|
66
|
-
*
|
|
67
|
-
* Compares against the previous upload first and does nothing when the
|
|
68
|
-
* bytes are identical. Uniform writes are already skipped when unchanged
|
|
69
|
-
* (`utils/uniforms.js`), so uploading unconditionally here would make a
|
|
70
|
-
* static scene more expensive than it was before the buffer existed.
|
|
71
|
-
* @param {number} floats - how many floats of the staging buffer are live
|
|
72
|
-
* @returns {boolean} whether anything was actually sent to the GPU
|
|
73
|
-
*/
|
|
74
|
-
upload(floats: number): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Release the GL buffer. Safe to call twice, and on a lost context.
|
|
77
|
-
*/
|
|
78
|
-
destroy(): void;
|
|
79
|
-
#private;
|
|
80
|
-
}
|
|
1
|
+
|
|
81
2
|
//# sourceMappingURL=uniformblock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniformblock.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/uniformblock.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"uniformblock.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/uniformblock.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IACC;;;;OAIG;IACH,gBAJW,sBAAsB,UACtB,MAAM,gBACN,MAAM,EA+DhB;IA5DA,2BAAY;IAEZ;;;OAGG;IACH,MAFU,YAAY,CAEc;IAEpC;;;;;;OAMG;IACH,WAJU,YAAY,CAImB;IAEzC;;;;OAIG;IACH,uBAA0B;IAE1B;;;;OAIG;IACH,wBAAyB;IAEzB,qBAAqB;IACrB,cADW,MAAM,CACe;IAEhC;;;;;;;;;;;;;;;;OAgBG;IACH,eAJU,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAIlB;IAElC,+BAA+B;IAC/B,QADW,WAAW,GAAC,IAAI,CACI;IAQhC;;;;;;;;;;;OAWG;IACH,gBAJW,YAAY,aACZ,MAAM,GACJ,OAAO,CAyBnB;IAED;;;;;;;;;OASG;IACH,eAHW,MAAM,GACJ,OAAO,CAmBnB;IAqBD;;OAEG;IACH,gBAYC;;CACD"}
|
|
@@ -1,101 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* A WebGL Vertex State — a Vertex Array Object owning a frozen vertex
|
|
3
|
-
* buffer layout: one `vertexAttribPointer` / `enableVertexAttribArray` per
|
|
4
|
-
* attribute against a given vertex buffer, plus the ELEMENT_ARRAY_BUFFER
|
|
5
|
-
* binding when the geometry is indexed.
|
|
6
|
-
*
|
|
7
|
-
* This is the engine's `GPUVertexState` analogue, and the layout it is built
|
|
8
|
-
* from is a `GPUVertexBufferLayout[]`: a list of buffer groups, each with its
|
|
9
|
-
* own buffer, `arrayStride` and `stepMode`. Attributes in a `"vertex"` group
|
|
10
|
-
* advance once per vertex (the ordinary case); attributes in an
|
|
11
|
-
* `"instance"` group advance once per *instance*, which is what
|
|
12
|
-
* `drawElementsInstanced` reads to stamp out N copies of one geometry.
|
|
13
|
-
* The layout is immutable once built, exactly like a vertex layout baked
|
|
14
|
-
* into a render pipeline.
|
|
15
|
-
*
|
|
16
|
-
* Attribute divisors are vertex-array state, so a fresh VAO starts with every
|
|
17
|
-
* divisor at 0 and `build()` creates one each time — an instanced layout can
|
|
18
|
-
* therefore never leak its divisors into an unrelated vertex state, and the
|
|
19
|
-
* single-buffer path issues no `vertexAttribDivisor` calls at all.
|
|
20
|
-
*
|
|
21
|
-
* Every method that mutates GL binding state saves and restores the live
|
|
22
|
-
* bindings itself, so building or rebuilding one vertex state can never
|
|
23
|
-
* disturb whichever one is mid-frame. Callers never touch
|
|
24
|
-
* `bindVertexArray` directly.
|
|
25
|
-
* @ignore
|
|
26
|
-
*/
|
|
27
|
-
export default class WebGLVertexState {
|
|
28
|
-
/**
|
|
29
|
-
* Accepts either shape — the single-buffer one (`attributes` + `stride` +
|
|
30
|
-
* `buffer`) or a list of buffer groups (`buffers`). They are equivalent;
|
|
31
|
-
* the former is the latter with one `"vertex"` group.
|
|
32
|
-
* @param {WebGL2RenderingContext} gl - the WebGL context
|
|
33
|
-
* @param {object} descriptor - the vertex layout to realize
|
|
34
|
-
* @param {object[]} [descriptor.attributes] - attribute definitions (`name`, `size`, `type`, `normalized`, `offset`)
|
|
35
|
-
* @param {number} [descriptor.stride] - size of a single vertex in bytes (`arrayStride`)
|
|
36
|
-
* @param {WebGLBuffer} [descriptor.buffer] - the vertex buffer the attribute pointers read from
|
|
37
|
-
* @param {object[]} [descriptor.buffers] - buffer groups, each `{buffer, stride, attributes, stepMode}` where `stepMode` is `"vertex"` (default) or `"instance"`
|
|
38
|
-
* @param {Function} descriptor.resolveLocation - maps an attribute name to its shader location (`-1` when absent)
|
|
39
|
-
* @param {WebGLIndexBuffer} [descriptor.indexBuffer] - index buffer to capture, for indexed geometry
|
|
40
|
-
*/
|
|
41
|
-
constructor(gl: WebGL2RenderingContext, descriptor: {
|
|
42
|
-
attributes?: object[] | undefined;
|
|
43
|
-
stride?: number | undefined;
|
|
44
|
-
buffer?: WebGLBuffer | undefined;
|
|
45
|
-
buffers?: object[] | undefined;
|
|
46
|
-
resolveLocation: Function;
|
|
47
|
-
indexBuffer?: any;
|
|
48
|
-
});
|
|
49
|
-
gl: WebGL2RenderingContext;
|
|
50
|
-
descriptor: {
|
|
51
|
-
attributes?: object[] | undefined;
|
|
52
|
-
stride?: number | undefined;
|
|
53
|
-
buffer?: WebGLBuffer | undefined;
|
|
54
|
-
buffers?: object[] | undefined;
|
|
55
|
-
resolveLocation: Function;
|
|
56
|
-
indexBuffer?: WebGLIndexBuffer;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* the underlying GL vertex array object
|
|
60
|
-
* @type {WebGLVertexArrayObject}
|
|
61
|
-
*/
|
|
62
|
-
handle: WebGLVertexArrayObject;
|
|
63
|
-
/**
|
|
64
|
-
* (Re)build the vertex array object from this state's descriptor,
|
|
65
|
-
* replacing any previous one. Called on construction and from every
|
|
66
|
-
* buffer-recreation path — a vertex state referencing a deleted buffer
|
|
67
|
-
* keeps it alive per the GL spec and draws stale data.
|
|
68
|
-
* @param {object} [changes] - descriptor fields to replace first (e.g. recreated `buffer` / `buffers` / `indexBuffer`)
|
|
69
|
-
*/
|
|
70
|
-
build(changes?: object): void;
|
|
71
|
-
/**
|
|
72
|
-
* Capture an ELEMENT_ARRAY_BUFFER binding into this vertex state.
|
|
73
|
-
* Used when an index buffer is (re)created after the state was built —
|
|
74
|
-
* the quad batchers' static pattern buffer — since that binding is
|
|
75
|
-
* vertex-array state and would otherwise land in whichever state
|
|
76
|
-
* happens to be bound.
|
|
77
|
-
* @param {WebGLIndexBuffer} indexBuffer - the index buffer to capture
|
|
78
|
-
* @param {Function} [fill] - optional work to run with this state bound (buffer creation/upload)
|
|
79
|
-
*/
|
|
80
|
-
captureIndexBuffer(indexBuffer: WebGLIndexBuffer, fill?: Function): void;
|
|
81
|
-
/**
|
|
82
|
-
* Make this vertex state current. One call restores the entire frozen
|
|
83
|
-
* layout — the WebGL analogue of `setPipeline` + `setVertexBuffer` +
|
|
84
|
-
* `setIndexBuffer`.
|
|
85
|
-
*/
|
|
86
|
-
bind(): void;
|
|
87
|
-
/**
|
|
88
|
-
* Delete the underlying vertex array object, if any. Idempotent, and
|
|
89
|
-
* safe on a lost context: deleting an object belonging to a lost
|
|
90
|
-
* context would queue `INVALID_OPERATION` (deletion counts as *using*
|
|
91
|
-
* it — only the `is*` queries are exempt), so probe first.
|
|
92
|
-
*/
|
|
93
|
-
release(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Release the vertex array object. The vertex state must not be used
|
|
96
|
-
* after calling destroy.
|
|
97
|
-
*/
|
|
98
|
-
destroy(): void;
|
|
99
|
-
#private;
|
|
100
|
-
}
|
|
1
|
+
|
|
101
2
|
//# sourceMappingURL=vertexstate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertexstate.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/vertexstate.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vertexstate.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/vertexstate.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IACC;;;;;;;;;;;;OAYG;IACH,gBATW,sBAAsB,cAE9B;QAA8B,UAAU;QACZ,MAAM;QACD,MAAM;QACT,OAAO;QACR,eAAe;QACN,WAAW;KACnD,EAUA;IARA,2BAAY;IACZ;;;;;;sBAJU,gBAAgB;MAIE;IAC5B;;;OAGG;IACH,QAFU,sBAAsB,CAEd;IA6BnB;;;;;;OAMG;IACH,gBAFW,MAAM,QA4EhB;IAED;;;;;;;;OAQG;IACH,gCAHW,gBAAgB,yBAa1B;IAED;;;;OAIG;IACH,aAEC;IAED;;;;;OAKG;IACH,gBAOC;IAED;;;OAGG;IACH,gBAGC;;CACD"}
|
|
@@ -98,10 +98,6 @@ export default class GLShader {
|
|
|
98
98
|
*/
|
|
99
99
|
label: string | undefined;
|
|
100
100
|
wgslValid: boolean;
|
|
101
|
-
_wgslRegistrations: {
|
|
102
|
-
epoch: number;
|
|
103
|
-
keys: Map<any, any>;
|
|
104
|
-
};
|
|
105
101
|
/**
|
|
106
102
|
* `true` once {@link destroy} has been called. After this flag is
|
|
107
103
|
* `true`, every method on the shader is a silent no-op — callers
|
|
@@ -134,37 +130,11 @@ export default class GLShader {
|
|
|
134
130
|
* @readonly
|
|
135
131
|
*/
|
|
136
132
|
readonly suspended: boolean;
|
|
137
|
-
_sourceVertex: string | object;
|
|
138
|
-
_sourceFragment: string | undefined;
|
|
139
|
-
_precision: string | undefined;
|
|
140
|
-
_uniformCache: any;
|
|
141
133
|
program: WebGLProgram;
|
|
142
134
|
uniforms: object;
|
|
143
135
|
attributes: number[];
|
|
144
|
-
/**
|
|
145
|
-
* (Re)compile the shader program against `this.gl` from the
|
|
146
|
-
* preserved source. Called from the constructor and from
|
|
147
|
-
* {@link _onContextRestored}. Replays any cached uniform values
|
|
148
|
-
* against the freshly-extracted uniforms proxy.
|
|
149
|
-
* @private
|
|
150
|
-
*/
|
|
151
|
-
private _compile;
|
|
152
136
|
vertex: any;
|
|
153
137
|
fragment: any;
|
|
154
|
-
/**
|
|
155
|
-
* Handler for {@link ONCONTEXT_LOST}. Tears down the GL program
|
|
156
|
-
* but preserves the shader source + cached uniform values so the
|
|
157
|
-
* shader can be transparently rebuilt on context restore.
|
|
158
|
-
* @private
|
|
159
|
-
*/
|
|
160
|
-
private _onContextLost;
|
|
161
|
-
/**
|
|
162
|
-
* Handler for {@link ONCONTEXT_RESTORED}. Re-compiles and
|
|
163
|
-
* re-links the shader against the new GL context, then replays
|
|
164
|
-
* any cached uniform values via {@link _compile}.
|
|
165
|
-
* @private
|
|
166
|
-
*/
|
|
167
|
-
private _onContextRestored;
|
|
168
138
|
/**
|
|
169
139
|
* Installs this shader program as part of current rendering state
|
|
170
140
|
*/
|
|
@@ -178,11 +148,16 @@ export default class GLShader {
|
|
|
178
148
|
/**
|
|
179
149
|
* Set the uniform to the given value
|
|
180
150
|
* @param {string} name - the uniform name
|
|
181
|
-
* @param {
|
|
151
|
+
* @param {number|boolean|number[]|Float32Array|object} value - the value to assign to that
|
|
152
|
+
* uniform. Scalars (`float`, `int`, `bool`) take a number or a boolean;
|
|
153
|
+
* vectors and matrices take an array, a `Float32Array`, or any object
|
|
154
|
+
* exposing `toArray()` — which is every {@link Vector2d},
|
|
155
|
+
* {@link Vector3d}, {@link Color} and {@link Matrix3d}.
|
|
182
156
|
* @example
|
|
183
157
|
* myShader.setUniform("uProjectionMatrix", this.projectionMatrix);
|
|
158
|
+
* myShader.setUniform("uStrength", 0.5); // a scalar is a plain number
|
|
184
159
|
*/
|
|
185
|
-
setUniform(name: string, value:
|
|
160
|
+
setUniform(name: string, value: number | boolean | number[] | Float32Array | object): void;
|
|
186
161
|
/**
|
|
187
162
|
* activate the given vertex attribute for this shader.
|
|
188
163
|
*
|
|
@@ -216,25 +191,6 @@ export default class GLShader {
|
|
|
216
191
|
* @returns {GLShader} a new, caller-owned shader (`shared === false`)
|
|
217
192
|
*/
|
|
218
193
|
clone(): GLShader;
|
|
219
|
-
/**
|
|
220
|
-
* Register this shader's WGSL module as a pipeline family for one
|
|
221
|
-
* hosting mesh batcher, against that host's positional group-layout
|
|
222
|
-
* list and frozen vertex layout. Registered once per host per device
|
|
223
|
-
* generation; the module text is namespaced by the host key so the
|
|
224
|
-
* same shader yields distinct families (distinct pipeline layouts) on
|
|
225
|
-
* the unlit and lit hosts. Asynchronous WGSL validation errors flip
|
|
226
|
-
* {@link GLShader#wgslValid} and the host falls back to its built-in
|
|
227
|
-
* shading (warn-and-degrade, never fatal).
|
|
228
|
-
* @param {object} cache - the WebGPU renderer's pipeline cache
|
|
229
|
-
* @param {string} host - the hosting family's vertex-layout key
|
|
230
|
-
* @param {GPUBindGroupLayout[]} bindGroupLayouts - the host's group list
|
|
231
|
-
* @param {string} vertexLayoutKey - the host's registered vertex layout
|
|
232
|
-
* @returns {string|null} the family key to pass to the pipeline cache's
|
|
233
|
-
* `get`, or null when the module failed validation on this device
|
|
234
|
-
* generation (the host then uses its built-in family)
|
|
235
|
-
* @ignore
|
|
236
|
-
*/
|
|
237
|
-
registerWGSL(cache: object, host: string, bindGroupLayouts: GPUBindGroupLayout[], vertexLayoutKey: string): string | null;
|
|
238
194
|
/**
|
|
239
195
|
* destroy this shader objects resources (program, attributes, uniforms).
|
|
240
196
|
* Idempotent — calling destroy twice (or after a context-lost suspend)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glshader.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/glshader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,iBAtCW,qBAAqB,UAGrB,MAAM,GAAC,MAAM,aAGb,MAAM,cACN,MAAM,
|
|
1
|
+
{"version":3,"file":"glshader.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/glshader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,iBAtCW,qBAAqB,UAGrB,MAAM,GAAC,MAAM,aAGb,MAAM,cACN,MAAM,EAqLhB;IAzIA;;;OAGG;IACH,IAFU,qBAAqB,CAEnB;IAEZ;;;;;OAKG;IACH,kBAHU,OAAO,CAIwD;IAEzE;;;;;OAKG;IACH,mBAHU,OAAO,CAGuB;IAExC;;;OAGG;IACH,MAFU,MAAM,GAAC,SAAS,CAEV;IAEhB;;;;OAIG;IACH,OAFU,MAAM,GAAC,SAAS,CAER;IAIlB,mBAAqB;IAKrB;;;OAGG;IACH;;;MAAwD;IAWxD;;;;;;;OAOG;IACH,oBAHU,OAAO,CAGK;IAEtB;;;;;;;;;OASG;IACH,QAHU,OAAO,CAGE;IAEnB;;;;;;;;;;OAUG;IACH,oBAHU,OAAO,CAGK;IAGtB;;;OAGG;IACH,+BAA2B;IAC3B;;;OAGG;IACH,oCAA+B;IAC/B;;;OAGG;IACH,+BAA2B;IAG3B;;;OAGG;IACH,mBAAwC;IAMtC,sBAAmB;IACnB,iBAAoB;IACpB,qBAAsB;IAgBzB;;;;;;;;OAQG;IACH,iBA0CC;IAzCA,YAGC;IACD,cAGC;IAoCF;;;;;;;OAOG;IACH,uBAgBC;IAED;;;;;;;OAOG;IACH,2BAMC;IAED;;OAEG;IACH,aAcC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,KAAK,CAcjB;IAED;;;;;;;;;;;OAWG;IACH,iBAVW,MAAM,SACN,MAAM,GAAC,OAAO,GAAC,MAAM,EAAE,GAAC,YAAY,GAAC,MAAM,QAiDrD;IAED;;;;;;;;;;;;;OAaG;IACH,wBAJW,qBAAqB,cACrB,MAAM,EAAE,UACR,MAAM,QAmBhB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,SAFa,QAAQ,CA8BpB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAVW,MAAM,QACN,MAAM,oBACN,kBAAkB,EAAE,mBACpB,MAAM,GACJ,MAAM,GAAC,IAAI,CAiFvB;IAED;;;;;OAKG;IACH,gBAkCC;CACD"}
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Uniform-ready packing of the active 3D lights for the mesh-lit shader.
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
export interface PackedMeshLighting {
|
|
7
|
-
/** number of active shaded lights, clamped to `MAX_LIGHTS`. */
|
|
8
|
-
count: number;
|
|
9
|
-
/**
|
|
10
|
-
* `MAX_LIGHTS × 4` — `[x, y, z, range]` per light; `range` is `-1` for
|
|
11
|
-
* directional lights (the shader's type sentinel).
|
|
12
|
-
*/
|
|
13
|
-
posRange: Float32Array;
|
|
14
|
-
/**
|
|
15
|
-
* `MAX_LIGHTS × 4` — `[dx, dy, dz, cos(outerConeAngle)]` per light;
|
|
16
|
-
* `cosOuter` is `-1` when no cone applies (directional carries the
|
|
17
|
-
* pre-negated surface→light vector, point carries no direction).
|
|
18
|
-
*/
|
|
19
|
-
dirCone: Float32Array;
|
|
20
|
-
/**
|
|
21
|
-
* `MAX_LIGHTS × 4` — `[r, g, b, cos(innerConeAngle)]` per light,
|
|
22
|
-
* color premultiplied by intensity.
|
|
23
|
-
*/
|
|
24
|
-
colorInner: Float32Array;
|
|
25
|
-
/** the summed ambient color (RGB, 0..1+). */
|
|
26
|
-
ambient: Float32Array;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Pack an iterable of {@link Light3d} (e.g. the active `Stage`'s 3D-light set)
|
|
30
|
-
* into the std140-ready arrays the mesh-lit shader reads:
|
|
31
|
-
* - **directional** lights contribute a surface→light direction (negated
|
|
32
|
-
* travel direction, normalized) + a color premultiplied by intensity.
|
|
33
|
-
* Re-normalized here so a direction mutated at runtime without
|
|
34
|
-
* re-normalizing still shades correctly.
|
|
35
|
-
* - **point** lights contribute their world position, `range` (quadratic
|
|
36
|
-
* falloff over the range — the Light2d model) and premultiplied color.
|
|
37
|
-
* - **spot** lights add their travel direction and the cone cosines
|
|
38
|
-
* (`innerConeAngle` clamped just inside `outerConeAngle`, so the
|
|
39
|
-
* smoothstep denominator never collapses).
|
|
40
|
-
* - **ambient** lights are summed into a single flat ambient color.
|
|
41
|
-
*
|
|
42
|
-
* The same buffers are returned each call (overwritten in place).
|
|
43
|
-
* @param lights - iterable of lights, or `null`/`undefined` (treated as empty)
|
|
44
|
-
* @returns the packed lighting (reused instance)
|
|
45
|
-
* @ignore
|
|
46
|
-
*/
|
|
47
|
-
export declare function packMeshLights(lights: Iterable<Light3d> | null | undefined): PackedMeshLighting;
|
|
1
|
+
export {};
|
|
48
2
|
//# sourceMappingURL=pack3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack3d.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/lighting/pack3d.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pack3d.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/lighting/pack3d.ts"],"names":[],"mappings":""}
|
|
@@ -1,110 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Header, occupying two `vec4`s before the light array begins.
|
|
3
|
-
*
|
|
4
|
-
* ```glsl
|
|
5
|
-
* int count; // offset 0
|
|
6
|
-
* vec3 ambient; // offset 16 — a vec3 aligns to 16, so it cannot share
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* `count` is written as a float and read back with `int(...)` in the
|
|
10
|
-
* shader. Declaring it `int` in the block would be tidier, but mixing int
|
|
11
|
-
* and float members means the staging buffer can no longer be a single
|
|
12
|
-
* `Float32Array` view, and the cast is free on every GPU that matters.
|
|
13
|
-
* @ignore
|
|
14
|
-
*/
|
|
15
|
-
export declare const HEADER_FLOATS: number;
|
|
16
|
-
/**
|
|
17
|
-
* floats occupied by one light: two `vec4`s
|
|
18
|
-
* @ignore
|
|
19
|
-
*/
|
|
20
|
-
export declare const LIGHT_FLOATS: number;
|
|
21
|
-
/**
|
|
22
|
-
* total floats in a light block, header included
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
export declare const BLOCK_FLOATS: number;
|
|
26
|
-
/**
|
|
27
|
-
* total bytes in a light block
|
|
28
|
-
* @ignore
|
|
29
|
-
*/
|
|
30
|
-
export declare const BLOCK_BYTES: number;
|
|
31
|
-
/**
|
|
32
|
-
* Lay out 2D (`Light2d`) data.
|
|
33
|
-
*
|
|
34
|
-
* ```glsl
|
|
35
|
-
* struct Light2dData {
|
|
36
|
-
* vec4 posRadiusIntensity; // x, y, radius, intensity
|
|
37
|
-
* vec4 colorHeight; // r, g, b, lightHeight
|
|
38
|
-
* };
|
|
39
|
-
* ```
|
|
40
|
-
* @param out - staging buffer, at least `BLOCK_FLOATS` long
|
|
41
|
-
* @param packed - what {@link packLights} produced
|
|
42
|
-
* @param packed.count - number of live lights, clamped to `MAX_LIGHTS`
|
|
43
|
-
* @param packed.positions - `[x, y, radius, intensity]` per light
|
|
44
|
-
* @param packed.colors - `[r, g, b]` per light, 0..1 per channel
|
|
45
|
-
* @param packed.heights - per-light height; absent means 0
|
|
46
|
-
* @param packed.ambient - `[r, g, b]` ambient floor; absent means black
|
|
47
|
-
* @returns how many floats of `out` are live, for a partial upload
|
|
48
|
-
* @ignore
|
|
49
|
-
*/
|
|
50
|
-
export declare function writeLight2dBlock(out: Float32Array, packed: {
|
|
51
|
-
count: number;
|
|
52
|
-
positions: Float32Array;
|
|
53
|
-
colors: Float32Array;
|
|
54
|
-
heights?: Float32Array;
|
|
55
|
-
ambient?: ArrayLike<number>;
|
|
56
|
-
}): number;
|
|
57
|
-
/**
|
|
58
|
-
* floats occupied by one 3D light: three `vec4`s. The 3D block grew from
|
|
59
|
-
* two when point/spot shading landed (#1536) — a spot light needs position
|
|
60
|
-
* + range + direction + both cone cosines + color, which cannot fold into
|
|
61
|
-
* two vec4s' padding. The 2D block keeps its two-vec4 stride.
|
|
62
|
-
* @ignore
|
|
63
|
-
*/
|
|
64
|
-
export declare const LIGHT3D_FLOATS: number;
|
|
65
|
-
/**
|
|
66
|
-
* total floats in a 3D light block, header included
|
|
67
|
-
* @ignore
|
|
68
|
-
*/
|
|
69
|
-
export declare const BLOCK3D_FLOATS: number;
|
|
70
|
-
/**
|
|
71
|
-
* total bytes in a 3D light block
|
|
72
|
-
* @ignore
|
|
73
|
-
*/
|
|
74
|
-
export declare const BLOCK3D_BYTES: number;
|
|
75
|
-
/**
|
|
76
|
-
* Lay out 3D (`Light3d`) data.
|
|
77
|
-
*
|
|
78
|
-
* ```glsl
|
|
79
|
-
* struct Light3dData {
|
|
80
|
-
* vec4 posRange; // x, y, z = world position · w = range;
|
|
81
|
-
* // w < 0 marks a DIRECTIONAL light (xyz unused)
|
|
82
|
-
* vec4 dirCone; // x, y, z = direction · w = cos(outerConeAngle);
|
|
83
|
-
* // w = -1 marks "no cone" (directional dir is the
|
|
84
|
-
* // pre-negated surface→light vector; a point light
|
|
85
|
-
* // carries no direction)
|
|
86
|
-
* vec4 colorInner; // r, g, b = color × intensity · w = cos(innerConeAngle)
|
|
87
|
-
* };
|
|
88
|
-
* ```
|
|
89
|
-
*
|
|
90
|
-
* The type is inferred from the sentinels rather than a tag slot:
|
|
91
|
-
* `posRange.w < 0` → directional; otherwise positional, with a cone
|
|
92
|
-
* applied when `dirCone.w > -1`.
|
|
93
|
-
* @param out - staging buffer, at least `BLOCK3D_FLOATS` long
|
|
94
|
-
* @param packed - what {@link packMeshLights} produced
|
|
95
|
-
* @param packed.count - number of live lights, clamped to `MAX_LIGHTS`
|
|
96
|
-
* @param packed.posRange - `[x, y, z, range]` per light (range -1 for directional)
|
|
97
|
-
* @param packed.dirCone - `[dx, dy, dz, cosOuter]` per light (cosOuter -1 for none)
|
|
98
|
-
* @param packed.colorInner - `[r, g, b, cosInner]` per light
|
|
99
|
-
* @param packed.ambient - `[r, g, b]` ambient floor; absent means black
|
|
100
|
-
* @returns how many floats of `out` are live, for a partial upload
|
|
101
|
-
* @ignore
|
|
102
|
-
*/
|
|
103
|
-
export declare function writeLight3dBlock(out: Float32Array, packed: {
|
|
104
|
-
count: number;
|
|
105
|
-
posRange: Float32Array;
|
|
106
|
-
dirCone: Float32Array;
|
|
107
|
-
colorInner: Float32Array;
|
|
108
|
-
ambient?: ArrayLike<number>;
|
|
109
|
-
}): number;
|
|
1
|
+
export {};
|
|
110
2
|
//# sourceMappingURL=std140.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"std140.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/lighting/std140.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"std140.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/lighting/std140.ts"],"names":[],"mappings":""}
|
|
@@ -1,106 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* GPU-accelerated renderer for orthogonal TMX tile layers (WebGL2). Draws
|
|
3
|
-
* the visible region of a layer as one screen-aligned quad per tileset
|
|
4
|
-
* referenced by the layer — the fragment shader samples a per-layer GID
|
|
5
|
-
* index texture and the tileset atlas, eliminating the per-tile draw
|
|
6
|
-
* loop. The visible rect, GID range, tile size, opacity, and tint are
|
|
7
|
-
* pushed as uniforms; the index texture is uploaded once at activation
|
|
8
|
-
* and re-uploaded only when `layer.dataVersion` changes (mutations from
|
|
9
|
-
* `setTile`/`clearTile`).
|
|
10
|
-
*
|
|
11
|
-
* The per-layer index texture is a `BufferTextureResource` flowing
|
|
12
|
-
* through the standard `TextureCache` / batcher path — same lane as
|
|
13
|
-
* every other texture in the engine. Dynamic unit allocation, correct
|
|
14
|
-
* `boundTextures` bookkeeping, and per-resource premultiplied-alpha /
|
|
15
|
-
* filter all come for free; nothing here pokes `gl.bindTexture` or
|
|
16
|
-
* `gl.activeTexture` directly.
|
|
17
|
-
*
|
|
18
|
-
* Cache lifecycle: one `BufferTextureResource` per `TMXLayer`. Tile
|
|
19
|
-
* layers don't come and go individually — they only churn on game reset
|
|
20
|
-
* — so the cache is freed in bulk via `reset()`, called from
|
|
21
|
-
* `WebGLRenderer.reset()` (which the `GAME_RESET` event already
|
|
22
|
-
* triggers).
|
|
23
|
-
*
|
|
24
|
-
* @ignore
|
|
25
|
-
*/
|
|
26
|
-
export default class OrthogonalTMXLayerGPURenderer {
|
|
27
|
-
/**
|
|
28
|
-
* @param {WebGLRenderer} renderer - the WebGL renderer instance
|
|
29
|
-
*/
|
|
30
|
-
constructor(renderer: WebGLRenderer);
|
|
31
|
-
renderer: WebGLRenderer;
|
|
32
|
-
gl: WebGLRenderingContext;
|
|
33
|
-
shader: GLShader;
|
|
34
|
-
resources: Map<any, any>;
|
|
35
|
-
animLookups: Map<any, any>;
|
|
36
|
-
_v2: Float32Array<ArrayBuffer>;
|
|
37
|
-
_v4: Float32Array<ArrayBuffer>;
|
|
38
|
-
/**
|
|
39
|
-
* Free every cached per-layer index texture and empty the local
|
|
40
|
-
* resource map. Called from `WebGLRenderer.reset()` (which
|
|
41
|
-
* `GAME_RESET` triggers) so each level transition starts clean.
|
|
42
|
-
* @ignore
|
|
43
|
-
*/
|
|
44
|
-
reset(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Write a `vec2` uniform without allocating a fresh Float32Array per
|
|
47
|
-
* call. Both components flow into the shared `_v2` scratch buffer,
|
|
48
|
-
* which `setUniform` reads synchronously and forwards to
|
|
49
|
-
* `gl.uniform2fv` — so reusing the buffer across calls is safe.
|
|
50
|
-
* @param {string} name
|
|
51
|
-
* @param {number} x
|
|
52
|
-
* @param {number} y
|
|
53
|
-
* @private
|
|
54
|
-
*/
|
|
55
|
-
private _setV2;
|
|
56
|
-
/**
|
|
57
|
-
* `vec4` counterpart to {@link _setV2}.
|
|
58
|
-
* @param {string} name
|
|
59
|
-
* @param {number} x
|
|
60
|
-
* @param {number} y
|
|
61
|
-
* @param {number} z
|
|
62
|
-
* @param {number} w
|
|
63
|
-
* @private
|
|
64
|
-
*/
|
|
65
|
-
private _setV4;
|
|
66
|
-
/**
|
|
67
|
-
* Get-or-create the per-tileset animation-lookup entry. Returns
|
|
68
|
-
* `undefined` for tilesets that have no animated tiles (the shader's
|
|
69
|
-
* `uAnimEnabled` uniform is then set to 0 and the lookup texture is
|
|
70
|
-
* not bound).
|
|
71
|
-
*
|
|
72
|
-
* The entry holds a `tileCount × 1` RGBA8 `BufferTextureResource`
|
|
73
|
-
* where texel `localId` encodes the CURRENT frame's local id as
|
|
74
|
-
* `R = lo byte, G = hi byte` (same encoding as the GID index
|
|
75
|
-
* texture). Each call walks `tileset.animations` and rewrites
|
|
76
|
-
* dirty texels — `tileset.update(dt)` (driven by the layer) advances
|
|
77
|
-
* `anim.cur.tileid` independently of this renderer.
|
|
78
|
-
*
|
|
79
|
-
* @param {object} tileset
|
|
80
|
-
* @param {number} tileCount - tiles in the tileset's atlas grid
|
|
81
|
-
* (`atlasCols * atlasRows`)
|
|
82
|
-
* @returns {{resource: BufferTextureResource, data: Uint8Array,
|
|
83
|
-
* tileCount: number, dirty: boolean}|undefined}
|
|
84
|
-
*/
|
|
85
|
-
_getOrUpdateAnimLookup(tileset: object, tileCount: number): {
|
|
86
|
-
resource: BufferTextureResource;
|
|
87
|
-
data: Uint8Array;
|
|
88
|
-
tileCount: number;
|
|
89
|
-
dirty: boolean;
|
|
90
|
-
} | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Get-or-create the per-layer index `BufferTextureResource`.
|
|
93
|
-
* @param {TMXLayer} layer
|
|
94
|
-
* @returns {BufferTextureResource}
|
|
95
|
-
*/
|
|
96
|
-
_getResource(layer: TMXLayer): BufferTextureResource;
|
|
97
|
-
/**
|
|
98
|
-
* Draw an orthogonal TMX layer through the shader path.
|
|
99
|
-
* @param {TMXLayer} layer
|
|
100
|
-
* @param {object} rect - the visible viewport rect (world coords)
|
|
101
|
-
*/
|
|
102
|
-
draw(layer: TMXLayer, rect: object): void;
|
|
103
|
-
}
|
|
1
|
+
|
|
104
2
|
import type { default as WebGLRenderer } from "../../webgl_renderer.js";
|
|
105
3
|
import GLShader from "../../glshader.js";
|
|
106
4
|
import { BufferTextureResource } from "../../../texture/resource.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgl/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgl/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IACC;;OAEG;IACH,sBAFW,aAAa,EA0CvB;IAvCA,wBAAwB;IACxB,0BAAqB;IAUrB,iBAKC;IAMD,yBAA0B;IAI1B,2BAA4B;IAG5B;;;OAGG;IACH,+BAA8B;IAC9B;;;OAGG;IACH,+BAA8B;IAG/B;;;;;;OAMG;IACH,cAiCC;IAED;;;;;;;;;;;OAWG;IACH,eAIC;IAED;;;;;;;;;;OAUG;IACH,eAMC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gCARW,MAAM,aACN,MAAM,GAEJ;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,UAAU,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,GAAC,SAAS,CAiDhD;IAED;;;;;;OAMG;IACH,oBALW,QAAQ,GACN,qBAAqB,CA+BjC;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA0JhB;CACD;8CApa4C,yBAAyB;qBAPjD,mBAAmB;sCADF,8BAA8B;yCAO5B,qCAAqC"}
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Generate the fragment shader for `LitQuadBatcher` — the SpriteIlluminator
|
|
3
|
-
* path that supports per-pixel normal-map lighting from up to `MAX_LIGHTS`
|
|
4
|
-
* point lights.
|
|
5
|
-
*
|
|
6
|
-
* Sprites without a `normalMap` push `aNormalTextureId = -1` and take the
|
|
7
|
-
* unlit fast path inside this same shader (sample color, multiply by
|
|
8
|
-
* vertex color, return) so lit and unlit sprites can share the lit batch
|
|
9
|
-
* when they coexist with active lights. The cost vs the truly-unlit
|
|
10
|
-
* `QuadBatcher` shader is one interpolated read + one comparison per
|
|
11
|
-
* fragment.
|
|
12
|
-
*
|
|
13
|
-
* The light's "height above the sprite plane" is encoded as a small
|
|
14
|
-
* fraction of the light's radius (default `0.075`) so that lights
|
|
15
|
-
* exactly at a fragment's screen position don't produce degenerate
|
|
16
|
-
* flat shading.
|
|
17
|
-
*
|
|
18
|
-
* GLSL ES 3.00, because the light data arrives in a uniform block and
|
|
19
|
-
* blocks do not exist in ES 1.00 (see #1552). The paired vertex shader
|
|
20
|
-
* `quad-multi-lit.vert` is on the same version — both stages of a program
|
|
21
|
-
* must agree.
|
|
22
|
-
* @param {number} maxTextures - the number of color/normal texture units to support
|
|
23
|
-
* @returns {string} GLSL fragment shader source
|
|
24
|
-
* @ignore
|
|
25
|
-
*/
|
|
26
|
-
export function buildLitMultiTextureFragment(maxTextures: number): string;
|
|
1
|
+
|
|
27
2
|
//# sourceMappingURL=multitexture-lit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multitexture-lit.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture-lit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multitexture-lit.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture-lit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,0DALW,MAAM,GACJ,MAAM,CAuGlB"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Generates a multi-texture fragment shader source string.
|
|
3
|
-
* Declares individual sampler uniforms (uSampler0..uSamplerN) and uses
|
|
4
|
-
* an if/else chain with 0.5-offset thresholds to select the correct texture unit.
|
|
5
|
-
* @param {number} maxTextures - the number of texture units to support
|
|
6
|
-
* @returns {string} GLSL fragment shader source
|
|
7
|
-
* @ignore
|
|
8
|
-
*/
|
|
9
|
-
export function buildMultiTextureFragment(maxTextures: number): string;
|
|
1
|
+
|
|
10
2
|
//# sourceMappingURL=multitexture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multitexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"multitexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,uDALW,MAAM,GACJ,MAAM,CAsClB"}
|