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,49 +1,5 @@
|
|
|
1
1
|
export class MaterialBatcher extends WebGLBatcher {
|
|
2
|
-
/**
|
|
3
|
-
* Initialize the textured batcher
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
init(renderer: any, settings: any): void;
|
|
7
2
|
set currentTextureUnit(unit: number);
|
|
8
|
-
/**
|
|
9
|
-
* The GL texture unit currently active (`gl.activeTexture`). Tracked on
|
|
10
|
-
* the RENDERER, not per batcher: the active unit is global GL state
|
|
11
|
-
* shared by every batcher instance, and a per-batcher copy desyncs as
|
|
12
|
-
* soon as another batcher (or a blit, or an FBO pass) moves the active
|
|
13
|
-
* unit — the stale copy then lets `bindTexture2D` skip `gl.activeTexture`
|
|
14
|
-
* and bind (or upload) a texture onto whatever unit is REALLY active.
|
|
15
|
-
* Symptom was video force-re-uploads overwriting a mesh texture with
|
|
16
|
-
* video frames after a mesh pass.
|
|
17
|
-
* @type {number}
|
|
18
|
-
* @ignore
|
|
19
|
-
*/
|
|
20
|
-
get currentTextureUnit(): number;
|
|
21
|
-
/**
|
|
22
|
-
* bound textures by unit
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
boundTextures: any[] | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Units whose texture CONTENT changed since the last upload (a
|
|
28
|
-
* canvas re-bake announced via `CanvasRenderTarget.invalidate`).
|
|
29
|
-
* Consumed by {@link MaterialBatcher#uploadTexture}, which then
|
|
30
|
-
* re-uploads INTO the existing texture — with immutable storage a
|
|
31
|
-
* same-shape re-upload is a pure `texSubImage2D`, so a ticking
|
|
32
|
-
* Text / gradient re-bake never re-allocates.
|
|
33
|
-
* @type {Set<number>}
|
|
34
|
-
* @ignore
|
|
35
|
-
*/
|
|
36
|
-
dirtyUnits: Set<number> | undefined;
|
|
37
|
-
_onCacheReset: (() => void) | null | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Drop every cached texture binding after a {@link GPU_TEXTURE_CACHE_RESET}
|
|
40
|
-
* (the shared texture cache reassigned units — our per-unit view is stale).
|
|
41
|
-
* Subclasses that pair extra samplers to units (lit normal maps) override to
|
|
42
|
-
* forget those too; without that they'd assume the extra texture is still
|
|
43
|
-
* resident and skip re-binding it after the reset.
|
|
44
|
-
* @ignore
|
|
45
|
-
*/
|
|
46
|
-
_onTextureCacheReset(): void;
|
|
47
3
|
/**
|
|
48
4
|
* Create a WebGL texture from an image
|
|
49
5
|
* @param {number} unit - Destination texture unit
|
|
@@ -74,52 +30,7 @@ export class MaterialBatcher extends WebGLBatcher {
|
|
|
74
30
|
* @param {number} unit - Texture unit to which the given texture is bound
|
|
75
31
|
*/
|
|
76
32
|
bindTexture2D(texture: WebGLTexture, unit: number, flush?: boolean): void;
|
|
77
|
-
/**
|
|
78
|
-
* unbind the given WebGL texture, forcing it to be reuploaded
|
|
79
|
-
* @param {WebGLTexture} [texture] - a WebGL texture
|
|
80
|
-
* @param {number} [unit] - Texture unit to unbind from
|
|
81
|
-
* @returns {number} unit the unit number that was associated with the given texture
|
|
82
|
-
*/
|
|
83
|
-
/**
|
|
84
|
-
* Announce that the SOURCE content behind `unit` changed (same object,
|
|
85
|
-
* new pixels — a canvas re-bake): the next {@link MaterialBatcher#uploadTexture}
|
|
86
|
-
* for it re-uploads into the existing texture in place instead of
|
|
87
|
-
* discarding it. The allocation-preserving counterpart of
|
|
88
|
-
* {@link MaterialBatcher#unbindTexture2D}.
|
|
89
|
-
* @param {number} unit - the texture unit whose content is stale
|
|
90
|
-
* @ignore
|
|
91
|
-
*/
|
|
92
|
-
markTextureDirty(unit: number): void;
|
|
93
33
|
unbindTexture2D(texture: any, unit: any): any;
|
|
94
|
-
/**
|
|
95
|
-
* Forget whatever texture this batcher believes is bound to `unit`, so the
|
|
96
|
-
* next bind to it re-issues the GL bind. Used when a GL texture unit is
|
|
97
|
-
* clobbered OUTSIDE this batcher's own accounting — e.g.
|
|
98
|
-
* {@link WebGLRenderer#toFrameTexture}, which binds its capture to a scratch
|
|
99
|
-
* unit directly (not via the shared texture cache), so a different batcher's
|
|
100
|
-
* unit cache would otherwise skip a needed re-bind. Subclasses that pair
|
|
101
|
-
* extra samplers to the same unit (lit normal maps) override to drop those
|
|
102
|
-
* too.
|
|
103
|
-
* @param {number} unit - the GL texture unit to invalidate
|
|
104
|
-
* @ignore
|
|
105
|
-
*/
|
|
106
|
-
invalidateUnit(unit: number): void;
|
|
107
|
-
/**
|
|
108
|
-
* @ignore
|
|
109
|
-
* @param {TextureAtlas|TextureResource} texture
|
|
110
|
-
* @param {number} [w] - ignored when the source has its own `width` (the
|
|
111
|
-
* common case); kept for the legacy signature where callers passed a
|
|
112
|
-
* destination size. Forwarded only as a last-resort default.
|
|
113
|
-
* @param {number} [h] - same as `w`.
|
|
114
|
-
* @param {boolean} [force=false]
|
|
115
|
-
* @param {boolean} [flush=true]
|
|
116
|
-
* @param {string} [repeat] - per-use wrap-mode override (a mesh's
|
|
117
|
-
* `textureRepeat`, #1503) — sampled with this wrap without mutating
|
|
118
|
-
* the shared atlas's `repeat`. The texture-unit cache keys by
|
|
119
|
-
* `(source, repeat)`, so each wrap gets its own unit + GL texture.
|
|
120
|
-
* Omit to use `texture.repeat`.
|
|
121
|
-
*/
|
|
122
|
-
uploadTexture(texture: TextureAtlas | TextureResource, w?: number, h?: number, force?: boolean, flush?: boolean, repeat?: string): any;
|
|
123
34
|
}
|
|
124
35
|
import { WebGLBatcher } from "./batcher.js";
|
|
125
36
|
import type { TextureAtlas } from "./../../texture/atlas.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/material_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"material_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/material_batcher.js"],"names":[],"mappings":"AAkCA;IACC;;;;OAIG;IACH,yCA2DC;IAmCD,6BARU,MAAM,EAUf;IAnBD;;;;;;;;;;;;OAYG;IACH,0BAJU,MAAM,CAMf;IArFA;;;;OAIG;IACH,iCAAuB;IAEvB;;;;;;;;;;OAUG;IACH,oCAA2B;IAyB1B;;;OAGG;IACH,+CAEC;IAKH;;;;;;;;OAQG;IACH,6BAKC;IAyDD;;;;;;;;;;;OAWG;IACH,sBAVW,MAAM,WACN,8DAAM,iBAAiB,GAAC,SAAS,GAAC,UAAU,EAAE,GAAC,YAAY,EAAE,UAC7D,MAAM,WACN,MAAM,MACN,MAAM,MACN,MAAM,uBACN,OAAO,WACP,OAAO,kCACL,YAAY,CAoKxB;IAED;;;OAGG;IACH,yBAFW,YAAY,GAAC,YAAY,QAuCnC;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,YAAY,CAIxB;IAED;;;;OAIG;IACH,uBAHW,YAAY,QACZ,MAAM,yBAsBhB;IAED;;;;;OAKG;IACH;;;;;;;;;OASG;IACH,uBAJW,MAAM,QAMhB;IAED,8CAWC;IAED;;;;;;;;;;;;OAYG;IACH,qBAJW,MAAM,QAShB;IAED;;;;;;;;;;;;;;;OAeG;IACH,uBAbW,YAAY,GAAC,eAAe,MAC5B,MAAM,MAGN,MAAM,UACN,OAAO,UACP,OAAO,WACP,MAAM,OA2GhB;CACD;6BArlB4B,cAAc;kCAIZ,0BAA0B"}
|
|
@@ -29,11 +29,6 @@
|
|
|
29
29
|
* @category Rendering
|
|
30
30
|
*/
|
|
31
31
|
export default class MeshBatcher extends MaterialBatcher {
|
|
32
|
-
/**
|
|
33
|
-
* Initialize the mesh batcher
|
|
34
|
-
* @ignore
|
|
35
|
-
*/
|
|
36
|
-
init(renderer: any): void;
|
|
37
32
|
currentAlphaCutoff: any;
|
|
38
33
|
currentEmissiveR: any;
|
|
39
34
|
currentEmissiveG: any;
|
|
@@ -47,353 +42,29 @@ export default class MeshBatcher extends MaterialBatcher {
|
|
|
47
42
|
currentEyeX: any;
|
|
48
43
|
currentEyeY: any;
|
|
49
44
|
currentEyeZ: any;
|
|
45
|
+
currentFogMode: any;
|
|
46
|
+
currentFogNear: any;
|
|
47
|
+
currentFogInvRange: any;
|
|
48
|
+
currentFogDensity: any;
|
|
49
|
+
currentFogR: any;
|
|
50
|
+
currentFogG: any;
|
|
51
|
+
currentFogB: any;
|
|
52
|
+
currentFogAxisX: any;
|
|
53
|
+
currentFogAxisY: any;
|
|
54
|
+
currentFogAxisZ: any;
|
|
55
|
+
currentFogBase: any;
|
|
50
56
|
retained: Map<any, any> | undefined;
|
|
51
57
|
instanced: Map<any, any> | undefined;
|
|
52
|
-
|
|
53
|
-
shadowShader: GLShader | undefined;
|
|
58
|
+
shaderVariants: Map<any, any> | undefined;
|
|
54
59
|
currentTintValue: any;
|
|
55
60
|
trilinearTextures: WeakSet<object> | undefined;
|
|
56
61
|
anisotropicExt: any;
|
|
57
62
|
maxAnisotropy: number | undefined;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* The vertex attribute layout. The base (unlit) mesh batcher is
|
|
61
|
-
* `aVertex` (3) + `aRegion` (2) + `aColor` (4) = 9 floats. Subclasses
|
|
62
|
-
* (e.g. {@link LitMeshBatcher}) append their own attributes.
|
|
63
|
-
* @ignore
|
|
64
|
-
*/
|
|
65
|
-
_attributeLayout(_renderer: any): {
|
|
66
|
-
name: string;
|
|
67
|
-
format: string;
|
|
68
|
-
offset: number;
|
|
69
|
-
}[];
|
|
70
|
-
/**
|
|
71
|
-
* The shader sources for this batcher (unlit by default). Subclasses
|
|
72
|
-
* override to supply a lit shader.
|
|
73
|
-
* @ignore
|
|
74
|
-
*/
|
|
75
|
-
_shaderSources(): {
|
|
76
|
-
vertex: any;
|
|
77
|
-
fragment: any;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Invalidate the per-mesh `uAlphaCutoff` / `uEmissive` caches when the bound
|
|
81
|
-
* shader (GL program) changes — the new program's uniforms are at their own
|
|
82
|
-
* defaults, so the next mesh must re-issue them rather than trust the cache.
|
|
83
|
-
* Mirrors the base batcher's `currentSamplerUnit` reset (same condition), and
|
|
84
|
-
* matters when a custom mesh shader declaring those uniforms is interleaved
|
|
85
|
-
* with the built-in one on this batcher (e.g. `drawMesh` swapping a custom
|
|
86
|
-
* shader in and back out).
|
|
87
|
-
* @ignore
|
|
88
|
-
*/
|
|
89
|
-
useShader(shader: any): void;
|
|
90
|
-
/**
|
|
91
|
-
* Refresh pass-scoped state, immediately before a draw.
|
|
92
|
-
*
|
|
93
|
-
* This exists because `bind()` is *not* a per-frame hook. `setBatcher`
|
|
94
|
-
* returns early when the requested batcher is already current, so a scene
|
|
95
|
-
* that draws nothing but meshes — no sprites, no UI, no unlit geometry to
|
|
96
|
-
* force a switch — binds once and never again. Anything set up in `bind()`
|
|
97
|
-
* then freezes at its first-frame value.
|
|
98
|
-
*
|
|
99
|
-
* The depth clear is one such thing. `renderer._meshDepthDirty` is re-armed
|
|
100
|
-
* every time the render target changes (frame-start `clear()`, FBO
|
|
101
|
-
* bind/unbind), but a flag nobody reads is a flag that does nothing: left in
|
|
102
|
-
* `bind()` it would stay armed forever and the depth attachment would carry
|
|
103
|
-
* the first frame's values for the life of the scene, occluding geometry as
|
|
104
|
-
* the camera moved. Consuming it here runs the clear once per target, which
|
|
105
|
-
* is what the flag always meant. {@link LitMeshBatcher} extends this with
|
|
106
|
-
* its light data, which had the same problem.
|
|
107
|
-
*
|
|
108
|
-
* Cheap by construction: one boolean test per draw in the common case.
|
|
109
|
-
* `depthMask` is guaranteed true here — `bind()` sets it and only `unbind()`
|
|
110
|
-
* clears it, so this batcher being current implies a writable depth buffer,
|
|
111
|
-
* without which `gl.clear(DEPTH_BUFFER_BIT)` would silently do nothing.
|
|
112
|
-
* @ignore
|
|
113
|
-
*/
|
|
114
|
-
updatePassState(): void;
|
|
115
|
-
/**
|
|
116
|
-
* Write one vertex into the buffer. The base (unlit) layout is
|
|
117
|
-
* `x, y, z, u, v, color`. Subclasses override to append per-vertex data
|
|
118
|
-
* matching their {@link MeshBatcher#_attributeLayout} (e.g.
|
|
119
|
-
* {@link LitMeshBatcher} pushes the world-space normal too).
|
|
120
|
-
* @param {object} vertexData - the batcher's vertex buffer
|
|
121
|
-
* @param {number} x
|
|
122
|
-
* @param {number} y
|
|
123
|
-
* @param {number} z
|
|
124
|
-
* @param {number} u
|
|
125
|
-
* @param {number} v
|
|
126
|
-
* @param {number} color - packed ARGB Uint32
|
|
127
|
-
* @param {object} _mesh - the source mesh (unused here; for subclasses)
|
|
128
|
-
* @param {number} _i3 - the source vertex's `index * 3` (for subclasses)
|
|
129
|
-
* @ignore
|
|
130
|
-
*/
|
|
131
|
-
_pushVertex(vertexData: object, x: number, y: number, z: number, u: number, v: number, color: number, _mesh: object, _i3: number): void;
|
|
132
|
-
/**
|
|
133
|
-
* Add a textured mesh to the batch. When the mesh has a
|
|
134
|
-
* `vertexColors` array (multi-material OBJ + bound MTL), each
|
|
135
|
-
* vertex's `aColor` attribute comes from that buffer instead of
|
|
136
|
-
* the shared `tint` argument — so multi-material rendering needs
|
|
137
|
-
* no extra draw calls per material vs single-material (large
|
|
138
|
-
* meshes still get chunked across multiple flushes to fit the
|
|
139
|
-
* vertex/index buffer limits — same behavior as single-material).
|
|
140
|
-
* The runtime `tint` is applied by the shader through the `uTint`
|
|
141
|
-
* uniform rather than being multiplied into each vertex color, so
|
|
142
|
-
* flash / fade / team-color effects never touch vertex data.
|
|
143
|
-
* @param {object} mesh - a Mesh object with vertices, uvs, indices, and texture properties
|
|
144
|
-
* @param {number} tint - tint color in UINT32 (argb) format
|
|
145
|
-
*/
|
|
146
|
-
/**
|
|
147
|
-
* Issue the per-draw placement uniforms: where the geometry sits
|
|
148
|
-
* (`uModelMatrix`), where the camera is (`uViewMatrix`), and the colour
|
|
149
|
-
* it is tinted with (`uTint`).
|
|
150
|
-
*
|
|
151
|
-
* Keeping these as uniforms rather than baking them into vertex data is
|
|
152
|
-
* what lets geometry be uploaded once and reused: moving, rotating,
|
|
153
|
-
* scaling or re-tinting a mesh changes only these values.
|
|
154
|
-
*
|
|
155
|
-
* Each set is guarded on the uniform actually being declared, because
|
|
156
|
-
* `GLShader.setUniform` throws on an unknown name and a custom mesh
|
|
157
|
-
* shader need not declare all of them.
|
|
158
|
-
* @param {Matrix3d} modelMatrix - the mesh's own placement, or identity when its vertices are already positioned
|
|
159
|
-
* @param {number} tint - tint colour in UINT32 (argb) format
|
|
160
|
-
* @ignore
|
|
161
|
-
*/
|
|
162
|
-
/**
|
|
163
|
-
* Write one mesh's model-space geometry into `out` in this batcher's
|
|
164
|
-
* vertex layout, returning how many floats were written.
|
|
165
|
-
*
|
|
166
|
-
* The data deliberately carries no placement, camera or tint information
|
|
167
|
-
* — those are uniforms — so it stays valid for the lifetime of the
|
|
168
|
-
* geometry. Subclasses override to append their own per-vertex data.
|
|
169
|
-
* @param {object} mesh - the mesh to read geometry from
|
|
170
|
-
* @param {Float32Array} out - destination scratch, at least `vertexCount × vertexSize` long
|
|
171
|
-
* @returns {number} number of floats written
|
|
172
|
-
* @ignore
|
|
173
|
-
*/
|
|
174
|
-
buildRetainedVertexData(mesh: object, out: Float32Array): number;
|
|
175
|
-
/**
|
|
176
|
-
* Get this mesh's retained geometry, building or refreshing it when the
|
|
177
|
-
* mesh's geometry version has moved on.
|
|
178
|
-
* @param {object} mesh - the mesh whose geometry is wanted
|
|
179
|
-
* @returns {RetainedGeometry} up-to-date geometry for the mesh
|
|
180
|
-
* @ignore
|
|
181
|
-
*/
|
|
182
|
-
retainedGeometryFor(mesh: object): RetainedGeometry;
|
|
183
|
-
/**
|
|
184
|
-
* Draw a mesh from its retained geometry: bind the persistent buffers and
|
|
185
|
-
* issue one indexed draw, with placement supplied entirely by uniforms.
|
|
186
|
-
*
|
|
187
|
-
* Unlike {@link addMesh} this accumulates nothing and never chunks — the
|
|
188
|
-
* whole mesh is one draw call regardless of size, except for a
|
|
189
|
-
* multi-material model whose materials carry different diffuse textures:
|
|
190
|
-
* that draws one indexed range per entry in {@link Mesh#textureGroups}
|
|
191
|
-
* (#1573), over the same buffers, with only the sampler moving between
|
|
192
|
-
* them.
|
|
193
|
-
* @param {object} mesh - the mesh to draw
|
|
194
|
-
* @param {Matrix3d} modelMatrix - where the mesh sits in the world
|
|
195
|
-
* @param {number} tint - tint colour in UINT32 (argb) format
|
|
196
|
-
* @ignore
|
|
197
|
-
*/
|
|
198
|
-
drawRetainedMesh(mesh: object, modelMatrix: Matrix3d, tint: number): void;
|
|
199
|
-
/**
|
|
200
|
-
* Enter the blended mesh draw state: alpha blending on, depth test still
|
|
201
|
-
* on, depth WRITES off (#1515).
|
|
202
|
-
*
|
|
203
|
-
* The blend function is set explicitly rather than through
|
|
204
|
-
* `renderer.setBlendMode`. That method short-circuits when the mode is
|
|
205
|
-
* unchanged, and `MeshBatcher.bind()` has already disabled `GL_BLEND`
|
|
206
|
-
* behind that cache's back — so asking for the mode the cache already
|
|
207
|
-
* claims would leave blending off and the draw opaque. Merely calling
|
|
208
|
-
* `setBlendEnabled(true)` is no better: it inherits whatever function the
|
|
209
|
-
* last 2D draw left, and under `"additive"` a dark shadow would *brighten*
|
|
210
|
-
* the ground.
|
|
211
|
-
* @ignore
|
|
212
|
-
*/
|
|
213
|
-
beginBlendedDraw(): void;
|
|
214
|
-
/**
|
|
215
|
-
* Leave the blended draw state, restoring mesh mode exactly as
|
|
216
|
-
* {@link MeshBatcher#bind} left it.
|
|
217
|
-
*
|
|
218
|
-
* The blend FUNCTION is put back too, not just the enable bit. This draw
|
|
219
|
-
* overwrote it without touching `renderer.currentBlendMode`, so a later 2D
|
|
220
|
-
* draw asking for the mode the cache already claims would short-circuit
|
|
221
|
-
* and silently inherit this one's function. Re-issuing through
|
|
222
|
-
* `setBlendMode` with the cache invalidated restores both, and leaves the
|
|
223
|
-
* cache reading exactly what it read before.
|
|
224
|
-
* @ignore
|
|
225
|
-
*/
|
|
226
|
-
endBlendedDraw(): void;
|
|
227
|
-
/**
|
|
228
|
-
* Get (building or refreshing as needed) the GPU state one instanced mesh
|
|
229
|
-
* draws from: its retained prototype geometry, its instance buffer, and
|
|
230
|
-
* the vertex state binding the two together.
|
|
231
|
-
*
|
|
232
|
-
* The vertex state is rebuilt only when a buffer object it references is
|
|
233
|
-
* replaced — a growing instance set reallocates, a merely-edited one does
|
|
234
|
-
* not — because a vertex array holding a deleted buffer keeps it alive per
|
|
235
|
-
* the GL spec and silently draws stale data.
|
|
236
|
-
* @param {InstancedMesh} mesh - the mesh to draw
|
|
237
|
-
* @returns {object} `{geometry, instances, vertexState}`
|
|
238
|
-
* @ignore
|
|
239
|
-
*/
|
|
240
|
-
instancedStateFor(mesh: InstancedMesh): object;
|
|
241
|
-
/**
|
|
242
|
-
* The instanced shader for a given record layout, compiled on first use.
|
|
243
|
-
*
|
|
244
|
-
* Variants are source permutations rather than runtime branches: the
|
|
245
|
-
* optional slots are `#ifdef`-guarded, so a mesh that declares neither
|
|
246
|
-
* costs no unused attributes and no dead code. `minify` deliberately
|
|
247
|
-
* preserves newlines so the directives survive it.
|
|
248
|
-
* @param {object} layout - the instance record layout
|
|
249
|
-
* @returns {GLShader} the shader for that combination
|
|
250
|
-
* @ignore
|
|
251
|
-
*/
|
|
252
|
-
instancedShaderFor(layout: object): GLShader;
|
|
253
|
-
/**
|
|
254
|
-
* The instanced shader sources for this batcher (unlit by default).
|
|
255
|
-
* Subclasses override to supply the lit pair.
|
|
256
|
-
* @ignore
|
|
257
|
-
*/
|
|
258
|
-
_instancedShaderSources(): {
|
|
259
|
-
vertex: any;
|
|
260
|
-
fragment: any;
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* Resolve an instance record layout into GL attribute records, in the
|
|
264
|
-
* `{name, size, type, normalized, offset}` shape the vertex state wants.
|
|
265
|
-
* Every slot is a `float32x4`.
|
|
266
|
-
* @param {object} layout - the instance record layout
|
|
267
|
-
* @returns {object[]} attribute records
|
|
268
|
-
* @ignore
|
|
269
|
-
*/
|
|
270
|
-
_instanceAttributeRecords(layout: object): object[];
|
|
271
|
-
/**
|
|
272
|
-
* Draw every visible instance of a mesh in one call.
|
|
273
|
-
*
|
|
274
|
-
* The geometry is bound once and the GPU walks the instance buffer,
|
|
275
|
-
* advancing the per-instance attributes one record per copy. Placement of
|
|
276
|
-
* the *group* still rides the ordinary uniforms, so moving the whole set
|
|
277
|
-
* costs one matrix and re-uploads nothing.
|
|
278
|
-
* @param {InstancedMesh} mesh - the mesh to draw
|
|
279
|
-
* @param {Matrix3d} modelMatrix - where the group sits in the world
|
|
280
|
-
* @param {number} tint - tint colour in UINT32 (argb) format
|
|
281
|
-
* @ignore
|
|
282
|
-
*/
|
|
283
|
-
drawInstancedMesh(mesh: InstancedMesh, modelMatrix: Matrix3d, tint: number): void;
|
|
284
|
-
_instancedShaderWarned: boolean | undefined;
|
|
285
|
-
/**
|
|
286
|
-
* The instanced ground-shadow program (#1515), compiled on first use.
|
|
287
|
-
*
|
|
288
|
-
* ONE shader, not a variant per record layout: it reads only the three
|
|
289
|
-
* transform rows, so `hasColor` / `hasData` make no difference to it —
|
|
290
|
-
* which is also what stops a forest with per-instance colour and emissive
|
|
291
|
-
* from getting coloured, glowing shadows.
|
|
292
|
-
* @returns {GLShader} the shadow program
|
|
293
|
-
* @ignore
|
|
294
|
-
*/
|
|
295
|
-
instancedShadowShader(): GLShader;
|
|
296
|
-
/**
|
|
297
|
-
* The vertex state pairing the SHARED shadow quad's geometry with this
|
|
298
|
-
* mesh's own instance records.
|
|
299
|
-
*
|
|
300
|
-
* Kept in its own slot with its own staleness fields rather than reusing
|
|
301
|
-
* the main pass's: that one keys on `builtGeometry` and `builtShader`, and
|
|
302
|
-
* the shadow pass differs in both, so sharing a slot would make the two
|
|
303
|
-
* passes rebuild each other's vertex array on every single draw.
|
|
304
|
-
*
|
|
305
|
-
* The instance buffer itself IS shared — the main pass already uploaded
|
|
306
|
-
* it this frame, so this adds no upload.
|
|
307
|
-
* @param {InstancedMesh} mesh - the mesh casting the shadows
|
|
308
|
-
* @param {object} quadGeometry - the shared shadow quad's retained geometry
|
|
309
|
-
* @returns {object} the per-mesh instanced state, with `shadowVertexState` built
|
|
310
|
-
* @ignore
|
|
311
|
-
*/
|
|
312
|
-
instancedShadowStateFor(mesh: InstancedMesh, quadGeometry: object): object;
|
|
313
|
-
/**
|
|
314
|
-
* Draw one flat blob per instance, in a single call, from the same
|
|
315
|
-
* instance buffer the mesh itself drew from (#1515).
|
|
316
|
-
* @param {InstancedMesh} mesh - the mesh casting the shadows
|
|
317
|
-
* @param {Matrix3d} shadowMatrix - the group matrix, flattened onto the ground
|
|
318
|
-
* @param {number} tint - tint colour in UINT32 (argb) format
|
|
319
|
-
* @param {object} quad - the shared shadow quad mesh
|
|
320
|
-
* @ignore
|
|
321
|
-
*/
|
|
322
|
-
drawInstancedShadow(mesh: InstancedMesh, shadowMatrix: Matrix3d, tint: number, quad: object): void;
|
|
323
|
-
/**
|
|
324
|
-
* Release the instance buffer and vertex state held for one mesh, if any.
|
|
325
|
-
* @param {object} mesh - the mesh whose instance state should be freed
|
|
326
|
-
* @ignore
|
|
327
|
-
*/
|
|
328
|
-
releaseInstanced(mesh: object): void;
|
|
329
|
-
/**
|
|
330
|
-
* Release every instance buffer this batcher holds.
|
|
331
|
-
* @ignore
|
|
332
|
-
*/
|
|
333
|
-
releaseAllInstanced(): void;
|
|
334
|
-
/**
|
|
335
|
-
* Release the retained geometry held for one mesh, if any.
|
|
336
|
-
* @param {object} mesh - the mesh whose geometry should be freed
|
|
337
|
-
* @ignore
|
|
338
|
-
*/
|
|
339
|
-
releaseRetained(mesh: object): void;
|
|
340
|
-
/**
|
|
341
|
-
* Release every retained geometry this batcher holds.
|
|
342
|
-
* @ignore
|
|
343
|
-
*/
|
|
344
|
-
releaseAllRetained(): void;
|
|
345
|
-
/**
|
|
346
|
-
* In addition to the attribute-layout check, warn once when a shader
|
|
347
|
-
* hosted on this batcher declares none of the placement uniforms.
|
|
348
|
-
*
|
|
349
|
-
* Mesh geometry is now uploaded in model space, so a shader that only
|
|
350
|
-
* declares `uProjectionMatrix` — which is what every mesh shader needed
|
|
351
|
-
* before, and what {@link ShaderEffect} still generates — will draw the
|
|
352
|
-
* mesh at its untransformed origin with no camera applied. That renders
|
|
353
|
-
* as "the model vanished" rather than as an error, so say so explicitly.
|
|
354
|
-
* @param {GLShader} shader - the shader about to be hosted
|
|
355
|
-
* @ignore
|
|
356
|
-
*/
|
|
357
|
-
validateShaderLocations(shader: GLShader): void;
|
|
358
|
-
setPlacementUniforms(modelMatrix: any, tint: any): void;
|
|
359
|
-
/**
|
|
360
|
-
* Bind a mesh's material state: its texture (honouring the mesh's own
|
|
361
|
-
* `textureRepeat` wrap override) and the guarded `uAlphaCutoff` /
|
|
362
|
-
* `uEmissive` uniforms.
|
|
363
|
-
*
|
|
364
|
-
* Shared by the accumulated and retained draw paths so material changes
|
|
365
|
-
* take effect immediately either way, without touching geometry.
|
|
366
|
-
* @param {object} mesh - the mesh whose material should be applied
|
|
367
|
-
* @param {TextureAtlas} [texture] - bind this texture instead of the mesh's
|
|
368
|
-
* own — how a multi-material model's per-material `map_Kd` reaches the
|
|
369
|
-
* sampler, one draw range at a time (#1573). Everything else here is a
|
|
370
|
-
* property of the mesh, not of the material group.
|
|
371
|
-
* @returns {number} the texture unit the material landed on
|
|
372
|
-
* @ignore
|
|
373
|
-
*/
|
|
374
|
-
applyMeshMaterial(mesh: object, texture?: TextureAtlas): number;
|
|
375
|
-
/**
|
|
376
|
-
* Point `uSampler` at a texture unit, if it moved and if the current
|
|
377
|
-
* shader has a sampler at all — a custom mesh shader that never samples
|
|
378
|
-
* (vertex colours only) declares none, and `setUniform` throws on an
|
|
379
|
-
* unknown name.
|
|
380
|
-
* @param {number} unit - the texture unit to sample from
|
|
381
|
-
* @ignore
|
|
382
|
-
*/
|
|
383
|
-
bindSamplerUnit(unit: number): void;
|
|
63
|
+
setPlacementUniforms(modelMatrix: any, tint: any, mesh: any): void;
|
|
384
64
|
addMesh(mesh: any, tint: any): void;
|
|
385
|
-
/**
|
|
386
|
-
* Accumulate one index range of a mesh into the batch, chunking triangles
|
|
387
|
-
* across flushes as the vertex / index buffers fill.
|
|
388
|
-
* @param {object} mesh - a Mesh with vertices, uvs, indices, texture
|
|
389
|
-
* @param {number} from - first index to accumulate
|
|
390
|
-
* @param {number} length - how many indices to accumulate
|
|
391
|
-
* @ignore
|
|
392
|
-
*/
|
|
393
|
-
accumulateRange(mesh: object, from: number, length: number): void;
|
|
394
65
|
}
|
|
395
66
|
import { MaterialBatcher } from "./material_batcher.js";
|
|
396
|
-
import GLShader from "../glshader.js";
|
|
397
67
|
import RetainedGeometry from "../buffer/retained_geometry.js";
|
|
398
68
|
import { Matrix3d } from "../../../math/matrix3d.ts";
|
|
69
|
+
import GLShader from "../glshader.js";
|
|
399
70
|
//# sourceMappingURL=mesh_batcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/mesh_batcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/mesh_batcher.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH;IACC;;;;OAIG;IACH,0BAuHC;IA7GA,wBAA4B;IAI5B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAI1B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAI1B,yBAA6B;IAC7B,wBAA4B;IAI5B,iBAA6B;IAC7B,iBAA6B;IAC7B,iBAA6B;IAI7B,oBAAgC;IAChC,oBAAgC;IAChC,wBAAoC;IACpC,uBAAmC;IACnC,iBAA6B;IAC7B,iBAA6B;IAC7B,iBAA6B;IAC7B,qBAAiC;IACjC,qBAAiC;IACjC,qBAAiC;IACjC,oBAAgC;IAQhC,oCAAyB;IAQzB,qCAA0B;IAS1B,0CAA+B;IAO/B,sBAAiC;IAKjC,+CAAsC;IAMtC,oBAAuE;IACvE,kCAKI;IAYH,8DAOC;IAKH;;;;;;OAMG;IACH;;;;QA0BC;IAED;;;;;OAKG;IACH;;;MAEC;IAED;;;;;;;;;;OAUG;IACH,6BA2CC;IAgED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,wBAOC;IAcD;;;;;;;;;;;;;;;;OAgBG;IACH,wBAZW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,SACN,MAAM,SACN,MAAM,OACN,MAAM,QAMhB;IAED;;;;;;;;;;;;;OAaG;IACH;;;;;;;;;;;;;;;;OAgBG;IACH;;;;;;;;;;;;OAYG;IACH,8BANW,MAAM,OACN,YAAY,GACV,MAAM,CAOlB;IAED;;;;;;;OAOG;IACH,0BALW,MAAM,GACJ,gBAAgB,CAwB5B;IAED;;;;;;;;;;;;;;;OAeG;IACH,uBANW,MAAM,eACN,QAAQ,QACR,MAAM,QA8EhB;IAED;;;;;;;;;;;;;;OAcG;IACH,sCASC;IAED;;;;;;;;;;;;OAYG;IACH,uBAWC;IAED;;;;;;;;;;;;;OAaG;IACH,wBALW,aAAa,GACX,MAAM,CAsFlB;IAED;;;;;;;;;;;OAWG;IACH,2BALW,MAAM,GACJ,QAAQ,CA2BpB;IAED;;;;;;;;;;;OAWG;IACH,mCAIC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,mBATW,MAAM,WACN,MAAM,iBACN,MAAM,mBACN,MAAM,GAEJ,QAAQ,CAepB;IAED;;;;;;;;;;;OAWG;IACH,sBAJa,OAAO,CASnB;IAED;;;;;OAKG;IACH,mCAWC;IAED;;;;;OAKG;IACH;;;MAEC;IAED;;;;;;;;OAQG;IACH,kCALW,MAAM,GACJ,MAAM,EAAE,CAepB;IAED;;;;;;;;;;;;OAYG;IACH,wBANW,aAAa,eACb,QAAQ,QACR,MAAM,QA2FhB;IAjEC,4CAAkC;IAmEpC;;;;;;;;;;OAUG;IACH,yBAJa,QAAQ,CAoBpB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,8BANW,aAAa,gBACb,MAAM,GACJ,MAAM,CAoElB;IAED;;;;;;;;;OASG;IACH,0BAPW,aAAa,gBACb,QAAQ,QACR,MAAM,QACN,MAAM,QAgChB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,QAYhB;IAED;;;;OAIG;IACH,4BAOC;IAED;;;;;OAKG;IACH,sBAJW,MAAM,QAWhB;IAED;;;;OAIG;IACH,2BAMC;IAED;;;;;;;;;;;;OAYG;IACH,gCAJW,QAAQ,QAsBlB;IAED,mEAmIC;IAED;;;;;;;;;;;;;;;OAeG;IACH,wBATW,MAAM,YACN,YAAY,GAIV,MAAM,CA0KlB;IAED;;;;;;;;OAQG;IACH,sBAJW,MAAM,QAYhB;IAED,oCA0BC;IAED;;;;;;;;OAQG;IACH,sBANW,MAAM,QACN,MAAM,UACN,MAAM,QAsFhB;CACD;gCAnrD+B,uBAAuB;6BAR1B,gCAAgC;yBAXpC,2BAA2B;qBAa/B,gBAAgB"}
|
|
@@ -8,16 +8,6 @@
|
|
|
8
8
|
* @category Rendering
|
|
9
9
|
*/
|
|
10
10
|
export default class PrimitiveBatcher extends WebGLBatcher {
|
|
11
|
-
/**
|
|
12
|
-
* Initialize the compositor
|
|
13
|
-
* @ignore
|
|
14
|
-
*/
|
|
15
|
-
init(renderer: any): void;
|
|
16
|
-
/**
|
|
17
|
-
* the current line width applied to the shader uniform
|
|
18
|
-
* @ignore
|
|
19
|
-
*/
|
|
20
|
-
currentLineWidth: any;
|
|
21
11
|
/**
|
|
22
12
|
* Draw an array of vertices
|
|
23
13
|
* @param {GLenum} mode - primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGLES)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitive_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/primitive_batcher.js"],"names":[],"mappings":"AASA;;;GAGG;AAEH;;;;GAIG;AACH;IACC
|
|
1
|
+
{"version":3,"file":"primitive_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/primitive_batcher.js"],"names":[],"mappings":"AASA;;;GAGG;AAEH;;;;GAIG;AACH;IACC;;;;OAIG;IACH,0BAiCC;IANA;;;;OAIG;IACH,sBAAyB;IA2B1B;;;;;OAKG;IACH,mBAJW,MAAM,SACN,KAAK,EAAE,gBACP,MAAM,QA2DhB;;CAiID;6BA7Q4B,cAAc;2BAInB,gCAAgC"}
|
|
@@ -8,36 +8,6 @@
|
|
|
8
8
|
* @category Rendering
|
|
9
9
|
*/
|
|
10
10
|
export default class QuadBatcher extends MaterialBatcher {
|
|
11
|
-
/**
|
|
12
|
-
* Initialize the compositor
|
|
13
|
-
* @ignore
|
|
14
|
-
*/
|
|
15
|
-
init(renderer: any): void;
|
|
16
|
-
/**
|
|
17
|
-
* the maximum number of texture units used for multi-texture batching
|
|
18
|
-
* @type {number}
|
|
19
|
-
* @ignore
|
|
20
|
-
*/
|
|
21
|
-
maxBatchTextures: number | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* whether multi-texture batching is currently active
|
|
24
|
-
* (disabled when a custom ShaderEffect is applied)
|
|
25
|
-
* @type {boolean}
|
|
26
|
-
* @ignore
|
|
27
|
-
*/
|
|
28
|
-
useMultiTexture: boolean | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* (Re-)create the index buffer for quad batching (4 verts + 6 indices per quad).
|
|
31
|
-
* Called from `init` and `reset` (after context loss).
|
|
32
|
-
* @ignore
|
|
33
|
-
*/
|
|
34
|
-
createIndexBuffer(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Bind the color sampler uniforms (`uSampler0..uSamplerN-1`) to their
|
|
37
|
-
* respective texture units. Called from `init` and `reset`.
|
|
38
|
-
* @ignore
|
|
39
|
-
*/
|
|
40
|
-
bindColorSamplers(): void;
|
|
41
11
|
/**
|
|
42
12
|
* Select the shader to use for compositing.
|
|
43
13
|
* Multi-texture batching is automatically enabled when the default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/quad_batcher.js"],"names":[],"mappings":"AAOA;;;GAGG;AAEH;;;;GAIG;AACH;IACC
|
|
1
|
+
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/quad_batcher.js"],"names":[],"mappings":"AAOA;;;GAGG;AAEH;;;;GAIG;AACH;IACC;;;;OAIG;IACH,0BAyDC;IAxDA;;;;;OAKG;IAMH,qCAA4C;IAmC5C;;;;;;OAMG;IACH,qCAA2B;IAK5B;;;;;OAKG;IACH,0BAmBC;IAED;;;;;OAKG;IACH,0BAIC;IAED;;;;;;;OAOG;IACH,kBAFW,QAAQ,GAAC,YAAY,QAK/B;IAyDD;;;;;;;;;;OAUG;IACH,oBAPW,YAAY,KACZ,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,UACN,QAAQ,GAAC,YAAY,QAoE/B;IAED;;;;;;;;;;;;;OAaG;IACH,iBAZW,YAAY,KACZ,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,QAuEjB;CACD;gCA3V+B,uBAAuB;kCAIxB,0BAA0B"}
|
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* A WebGL Index Buffer — extends {@link IndexBuffer} with GL buffer binding and upload.
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
export default class WebGLIndexBuffer extends IndexBuffer {
|
|
6
|
-
/**
|
|
7
|
-
* @param {WebGLRenderingContext|WebGL2RenderingContext} gl - the WebGL context
|
|
8
|
-
* @param {number} maxIndices - maximum number of indices this buffer can hold
|
|
9
|
-
* @param {boolean} [useUint32=false] - use Uint32 indices instead of Uint16 (a capacity knob — Uint16 keeps index uploads half the size)
|
|
10
|
-
*/
|
|
11
|
-
constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, maxIndices: number, useUint32?: boolean);
|
|
12
|
-
gl: WebGLRenderingContext | WebGL2RenderingContext;
|
|
13
|
-
type: 5123 | 5125;
|
|
14
|
-
buffer: WebGLBuffer;
|
|
15
|
-
/**
|
|
16
|
-
* Upload the current index data to the GPU (for dynamic buffers)
|
|
17
|
-
*/
|
|
18
|
-
upload(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Bind this index buffer
|
|
21
|
-
*/
|
|
22
|
-
bind(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Replace the underlying GL buffer with a fresh one, deleting the old.
|
|
25
|
-
* Needed on context restore — the old buffer object belongs to the lost
|
|
26
|
-
* context and every upload through it would silently fail. Also keeps
|
|
27
|
-
* plain resets leak-free (`deleteBuffer` on a lost-context object is a
|
|
28
|
-
* harmless no-op).
|
|
29
|
-
*/
|
|
30
|
-
recreate(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Delete the underlying GL buffer. The index buffer must not be used
|
|
33
|
-
* after calling destroy.
|
|
34
|
-
*/
|
|
35
|
-
destroy(): void;
|
|
36
|
-
}
|
|
1
|
+
|
|
37
2
|
import IndexBuffer from "../../buffer/index.js";
|
|
38
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/index.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/buffer/index.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;IACC;;;;OAIG;IACH,gBAJW,qBAAqB,GAAC,sBAAsB,cAC5C,MAAM,cACN,OAAO,EAOjB;IAHA,mDAAY;IACZ,kBAA2D;IAC3D,oBAA+B;IAiBhC;;OAEG;IACH,eAOC;IAED;;OAEG;IACH,aAEC;IAED;;;;;;OAMG;IACH,iBAIC;IAED;;;OAGG;IACH,gBAGC;CACD;wBA3EuB,uBAAuB"}
|