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
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
* Commonly used for status effects — poison green, freeze blue, fire red.
|
|
4
4
|
* The `time` uniform should be updated each frame for the pulse animation.
|
|
5
5
|
* @category Effects
|
|
6
|
-
* @see {@link Renderable
|
|
6
|
+
* @see {@link Renderable#addPostEffect} for usage
|
|
7
7
|
* @example
|
|
8
8
|
* // poison pulse
|
|
9
9
|
* const poison = new TintPulseEffect(renderer, {
|
|
10
10
|
* color: [0.0, 1.0, 0.0],
|
|
11
11
|
* speed: 3.0,
|
|
12
12
|
* });
|
|
13
|
-
* mySprite.
|
|
13
|
+
* mySprite.addPostEffect(poison);
|
|
14
14
|
*
|
|
15
15
|
* // update each frame
|
|
16
16
|
* poison.setTime(timer.getTime() / 1000);
|
|
17
17
|
*/
|
|
18
18
|
export default class TintPulseEffect extends ShaderEffect {
|
|
19
19
|
/**
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {WebGLRenderer|WebGPURenderer|CanvasRenderer} renderer - the current renderer instance
|
|
21
21
|
* @param {object} [options] - effect options
|
|
22
22
|
* @param {number[]} [options.color=[1.0, 0.0, 0.0]] - pulse color as [r, g, b] (0.0–1.0)
|
|
23
23
|
* @param {number} [options.speed=2.0] - pulse speed (oscillations per second)
|
|
24
24
|
* @param {number} [options.intensity=0.3] - maximum tint strength (0.0–1.0)
|
|
25
25
|
*/
|
|
26
|
-
constructor(renderer:
|
|
26
|
+
constructor(renderer: WebGLRenderer | WebGPURenderer | CanvasRenderer, options?: {
|
|
27
27
|
color?: number[] | undefined;
|
|
28
28
|
speed?: number | undefined;
|
|
29
29
|
intensity?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tintPulse.d.ts","sourceRoot":"","sources":["../../../src/video/effects/tintPulse.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;;;;OAMG;IACH,
|
|
1
|
+
{"version":3,"file":"tintPulse.d.ts","sourceRoot":"","sources":["../../../src/video/effects/tintPulse.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;;;;OAMG;IACH,sBANW,aAAa,GAAC,cAAc,GAAC,cAAc,YAEnD;QAA2B,KAAK;QACP,KAAK;QACL,SAAS;KACpC,EAqBA;IAED;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;CACD;yBAjFwB,mBAAmB"}
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
* to the center. Commonly used for atmosphere, cinematic feel, or to
|
|
4
4
|
* naturally frame a camera viewport (e.g. minimap).
|
|
5
5
|
* @category Effects
|
|
6
|
-
* @see {@link Renderable
|
|
6
|
+
* @see {@link Renderable#addPostEffect} for usage
|
|
7
7
|
* @example
|
|
8
8
|
* // subtle vignette on the main camera
|
|
9
|
-
* app.viewport.
|
|
9
|
+
* app.viewport.addPostEffect(new VignetteEffect(renderer));
|
|
10
10
|
* @example
|
|
11
11
|
* // stronger cinematic vignette
|
|
12
|
-
* app.viewport.
|
|
12
|
+
* app.viewport.addPostEffect(new VignetteEffect(renderer, {
|
|
13
13
|
* strength: 0.3,
|
|
14
14
|
* size: 20.0,
|
|
15
|
-
* });
|
|
15
|
+
* }));
|
|
16
16
|
*/
|
|
17
17
|
export default class VignetteEffect extends ShaderEffect {
|
|
18
18
|
/**
|
|
19
|
-
* @param {
|
|
19
|
+
* @param {WebGLRenderer|WebGPURenderer|CanvasRenderer} renderer - the current renderer instance
|
|
20
20
|
* @param {object} [options] - effect options
|
|
21
21
|
* @param {number} [options.strength=0.15] - edge darkening power (lower = stronger darkening, higher = softer falloff)
|
|
22
22
|
* @param {number} [options.size=25.0] - vignette spread multiplier (higher = smaller dark area)
|
|
23
23
|
*/
|
|
24
|
-
constructor(renderer:
|
|
24
|
+
constructor(renderer: WebGLRenderer | WebGPURenderer | CanvasRenderer, options?: {
|
|
25
25
|
strength?: number | undefined;
|
|
26
26
|
size?: number | undefined;
|
|
27
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vignette.d.ts","sourceRoot":"","sources":["../../../src/video/effects/vignette.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"vignette.d.ts","sourceRoot":"","sources":["../../../src/video/effects/vignette.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;;OAKG;IACH,sBALW,aAAa,GAAC,cAAc,GAAC,cAAc,YAEnD;QAAyB,QAAQ;QACR,IAAI;KAC/B,EASA;IALA,iBAAwC;IACxC,aAAgC;IAMjC;;;OAGG;IACH,sBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,cAFW,MAAM,QAKhB;CACD;yBA/EwB,mBAAmB"}
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
* Commonly used for underwater, heat haze, or dream sequence effects.
|
|
4
4
|
* The `time` uniform should be updated each frame for animation.
|
|
5
5
|
* @category Effects
|
|
6
|
-
* @see {@link Renderable
|
|
6
|
+
* @see {@link Renderable#addPostEffect} for usage
|
|
7
7
|
* @example
|
|
8
8
|
* const wave = new WaveEffect(renderer, { amplitude: 0.01, frequency: 10.0 });
|
|
9
|
-
* mySprite.
|
|
9
|
+
* mySprite.addPostEffect(wave);
|
|
10
10
|
* // update each frame
|
|
11
11
|
* wave.setTime(performance.now() / 1000);
|
|
12
12
|
*/
|
|
13
13
|
export default class WaveEffect extends ShaderEffect {
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {WebGLRenderer|WebGPURenderer|CanvasRenderer} renderer - the current renderer instance
|
|
16
16
|
* @param {object} [options] - effect options
|
|
17
17
|
* @param {number} [options.amplitude=0.01] - wave displacement strength (in UV space, 0.01 = subtle)
|
|
18
18
|
* @param {number} [options.frequency=10.0] - number of waves across the sprite
|
|
19
19
|
* @param {number} [options.speed=2.0] - wave animation speed
|
|
20
20
|
*/
|
|
21
|
-
constructor(renderer:
|
|
21
|
+
constructor(renderer: WebGLRenderer | WebGPURenderer | CanvasRenderer, options?: {
|
|
22
22
|
amplitude?: number | undefined;
|
|
23
23
|
frequency?: number | undefined;
|
|
24
24
|
speed?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../../src/video/effects/wave.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;GAWG;AACH;IACC;;;;;;OAMG;IACH,
|
|
1
|
+
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../../src/video/effects/wave.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;GAWG;AACH;IACC;;;;;;OAMG;IACH,sBANW,aAAa,GAAC,cAAc,GAAC,cAAc,YAEnD;QAAyB,SAAS;QACT,SAAS;QACT,KAAK;KAChC,EAqBA;IAED;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,wBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,wBAFW,MAAM,QAIhB;CACD;yBArFwB,mBAAmB"}
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* normalize the `vecN<f32>` / `matCxR<f32>` spellings onto the short forms
|
|
3
|
-
* used as TYPE_LAYOUT keys
|
|
4
|
-
* @param {string} type - a WGSL type token
|
|
5
|
-
* @returns {string} the canonical spelling
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export function normalizeWGSLType(type: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* Compute the uniform-buffer layout for a parsed struct member list.
|
|
11
|
-
* @param {Array<{name: string, type: string}>} members - struct members in declaration order
|
|
12
|
-
* @returns {{map: Map<string, {offset: number, size: number, type: string}>, size: number}|null}
|
|
13
|
-
* the name → placement map and the total (16-byte-rounded) struct size,
|
|
14
|
-
* or `null` when a member type is unsupported
|
|
15
|
-
* @ignore
|
|
16
|
-
*/
|
|
17
|
-
export function computeUniformLayout(members: Array<{
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}>): {
|
|
21
|
-
map: Map<string, {
|
|
22
|
-
offset: number;
|
|
23
|
-
size: number;
|
|
24
|
-
type: string;
|
|
25
|
-
}>;
|
|
26
|
-
size: number;
|
|
27
|
-
} | null;
|
|
1
|
+
|
|
28
2
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/video/effects/wgsl/layout.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/video/effects/wgsl/layout.js"],"names":[],"mappings":"AAuCA;;;;;;;GAOG;AACH,wCALW,MAAM,GACJ,MAAM,CASlB;AAWD;;;;;;;;GAQG;AACH,8CAPW,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC,GACjC;IAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAwB/F"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Parse a WGSL effect body's declarations.
|
|
3
|
-
* @param {string} body - the user WGSL body
|
|
4
|
-
* @returns {object} `{ok: true, layout, structSize, uniformVar, textures, builtins, maxUserBinding}`
|
|
5
|
-
* or `{ok: false, error}`
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export function parseWGSLBody(body: string): object;
|
|
1
|
+
|
|
9
2
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/video/effects/wgsl/parse.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/video/effects/wgsl/parse.js"],"names":[],"mappings":"AAwHA;;;;;;;GAOG;AACH,oCANW,MAAM,GACJ,MAAM,CAsKlB"}
|
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* WGSL module assembly for a ShaderEffect body — the WGSL counterpart of
|
|
3
|
-
* `glsl_realization.js`'s source templating. The user body is embedded
|
|
4
|
-
* VERBATIM (WGSL module-scope declarations are order-independent); the
|
|
5
|
-
* scaffold contributes the vertex/fragment entry points over the frozen
|
|
6
|
-
* 28-byte quad layout, the frame-globals and material groups, and the
|
|
7
|
-
* builtin declarations the parser detected.
|
|
8
|
-
*
|
|
9
|
-
* Frozen conventions carried over from the core quad shader:
|
|
10
|
-
* - clip-z remap `(z + w) * 0.5` (GL-convention [-w, w] → WebGPU [0, w])
|
|
11
|
-
* - packed-ARGB attribute read as (B,G,R,A) → `.bgr * .a` premultiply
|
|
12
|
-
* - `screen_uv` is y-down (`0.5 - ndc.y * 0.5`): WebGPU texture row 0 is
|
|
13
|
-
* the top, so the capture is sampled without any flip
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* builtin group-3 bindings are assigned ABOVE the highest user binding so
|
|
18
|
-
* they can never collide: ME uniform first, then the capture texture and
|
|
19
|
-
* its sampler variants
|
|
20
|
-
* @param {object} parsed - the parseWGSLBody result
|
|
21
|
-
* @returns {{me: number, screenTexture: number, screenSamplerClamp: number, screenSamplerRepeat: number}}
|
|
22
|
-
* assigned binding indices (-1 when the builtin is unused)
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
export function assignBuiltinBindings(parsed: object): {
|
|
26
|
-
me: number;
|
|
27
|
-
screenTexture: number;
|
|
28
|
-
screenSamplerClamp: number;
|
|
29
|
-
screenSamplerRepeat: number;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Assemble the complete WGSL module for an effect body.
|
|
33
|
-
* @param {string} body - the user WGSL body (embedded verbatim)
|
|
34
|
-
* @param {object} parsed - the parseWGSLBody result
|
|
35
|
-
* @returns {{code: string, bindings: object}} the module text and the
|
|
36
|
-
* builtin binding assignment (consumed when building the bind group)
|
|
37
|
-
* @ignore
|
|
38
|
-
*/
|
|
39
|
-
export function buildWGSLModule(body: string, parsed: object): {
|
|
40
|
-
code: string;
|
|
41
|
-
bindings: object;
|
|
42
|
-
};
|
|
1
|
+
|
|
43
2
|
//# sourceMappingURL=scaffold.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/video/effects/wgsl/scaffold.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/video/effects/wgsl/scaffold.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;GASG;AACH,8CANW,MAAM,GACJ;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAA;CAAC,CA2BxG;AAED;;;;;;;;GAQG;AACH,sCAPW,MAAM,UACN,MAAM,GACJ;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CA0G5C"}
|
|
@@ -1,83 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* The WGSL realization of a ShaderEffect — the WebGPU counterpart of the
|
|
3
|
-
* GLShader the GLSL branch compiles.
|
|
4
|
-
*
|
|
5
|
-
* WebGPU has no uniform reflection, so this object carries everything the
|
|
6
|
-
* backend needs to drive the effect: the parsed uniform layout (name →
|
|
7
|
-
* byte placement), a CPU-side mirror of the uniform block that
|
|
8
|
-
* `setUniform` writes into, the texture binding table, and the assembled
|
|
9
|
-
* module text. GPU objects (shader module, bind group layout, bind group)
|
|
10
|
-
* are built lazily by the renderer's effect path — uniform VALUES are
|
|
11
|
-
* snapshotted from the mirror into a per-frame arena at every bind, so a
|
|
12
|
-
* shared effect bound twice in a frame with different values stays
|
|
13
|
-
* correct under WebGPU's queue-write-before-draws ordering.
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
export default class WGSLEffectRealization {
|
|
17
|
-
/**
|
|
18
|
-
* Parse + assemble; on any parse failure `valid` is false and `error`
|
|
19
|
-
* carries the reason (the effect then warns and stays disabled).
|
|
20
|
-
* @param {string} body - the user WGSL body
|
|
21
|
-
*/
|
|
22
|
-
constructor(body: string);
|
|
23
|
-
/**
|
|
24
|
-
* whether the body parsed into a realizable shape
|
|
25
|
-
* @type {boolean}
|
|
26
|
-
*/
|
|
27
|
-
valid: boolean;
|
|
28
|
-
/** @type {string|null} */
|
|
29
|
-
error: string | null;
|
|
30
|
-
/** name → {offset, size, type} placement in the uniform block */
|
|
31
|
-
layout: any;
|
|
32
|
-
/** total uniform block byte size (0 = no uniform struct) */
|
|
33
|
-
structSize: any;
|
|
34
|
-
/** user texture/sampler pairs (binding table) */
|
|
35
|
-
textures: any;
|
|
36
|
-
/** builtin usage flags */
|
|
37
|
-
builtins: any;
|
|
38
|
-
/** the complete assembled WGSL module text */
|
|
39
|
-
code: string | undefined;
|
|
40
|
-
/** builtin binding assignment (ME / capture texture / samplers) */
|
|
41
|
-
builtinBindings: object | undefined;
|
|
42
|
-
cpu: ArrayBuffer | undefined;
|
|
43
|
-
f32: Float32Array<ArrayBuffer> | undefined;
|
|
44
|
-
i32: Int32Array<ArrayBuffer> | undefined;
|
|
45
|
-
u32: Uint32Array<ArrayBuffer> | undefined;
|
|
46
|
-
meMirror: Float32Array<ArrayBuffer> | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* last user-set value per uniform name — the clone-replay source
|
|
49
|
-
* (exact values, not mirror read-back)
|
|
50
|
-
* @type {Map<string, number|number[]>}
|
|
51
|
-
*/
|
|
52
|
-
values: Map<string, number | number[]>;
|
|
53
|
-
warned: Set<any> | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* device-scoped GPU state, built lazily by the renderer's effect
|
|
56
|
-
* path and invalidated via the pipeline-cache epoch (device loss)
|
|
57
|
-
* @type {object|null}
|
|
58
|
-
*/
|
|
59
|
-
gpu: object | null;
|
|
60
|
-
/**
|
|
61
|
-
* Write a uniform value into the CPU mirror.
|
|
62
|
-
* @param {string} name - a struct member name of the body's uniform block
|
|
63
|
-
* @param {number|number[]|Float32Array|{val: Float32Array}} value - the value
|
|
64
|
-
* (objects exposing `.val` — Matrix2d/3d, ColorMatrix — are unwrapped)
|
|
65
|
-
* @returns {boolean} true when the name exists and the value was written
|
|
66
|
-
*/
|
|
67
|
-
setUniform(name: string, value: number | number[] | Float32Array | {
|
|
68
|
-
val: Float32Array;
|
|
69
|
-
}): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* whether the uniform block declares the given member (the WGSL
|
|
72
|
-
* counterpart of the GLSL active-uniform check `setTime` relies on)
|
|
73
|
-
* @param {string} name - member name
|
|
74
|
-
* @returns {boolean} true when present
|
|
75
|
-
*/
|
|
76
|
-
hasUniform(name: string): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* drop device-scoped state (device loss / destroy) — the CPU mirror
|
|
79
|
-
* and values survive, so nothing needs replaying on restore
|
|
80
|
-
*/
|
|
81
|
-
releaseGPU(): void;
|
|
82
|
-
}
|
|
1
|
+
|
|
83
2
|
//# sourceMappingURL=wgsl_realization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wgsl_realization.d.ts","sourceRoot":"","sources":["../../../src/video/effects/wgsl_realization.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"wgsl_realization.d.ts","sourceRoot":"","sources":["../../../src/video/effects/wgsl_realization.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;OAIG;IACH,kBAFW,MAAM,EA2DhB;IAtDA;;;OAGG;IACH,OAFU,OAAO,CAEc;IAC/B,0BAA0B;IAC1B,OADW,MAAM,GAAC,IAAI,CAC+B;IAMrD,iEAAiE;IACjE,YAA2B;IAC3B,4DAA4D;IAC5D,gBAAmC;IACnC,iDAAiD;IACjD,cAA+B;IAC/B,0BAA0B;IAC1B,cAA+B;IAG/B,8CAA8C;IAC9C,yBAAuB;IACvB,mEAAmE;IACnE,oCAAsC;IAGtC,6BAAwD;IACxD,2CAAqC;IACrC,yCAAmC;IACnC,0CAAoC;IAIpC,gDAAmC;IAEnC;;;;OAIG;IACH,QAFU,GAAG,CAAC,MAAM,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,CAEf;IAIvB,6BAAuB;IAEvB;;;;OAIG;IACH,KAFU,MAAM,GAAC,IAAI,CAEN;IAGhB;;;;;;OAMG;IACH,iBALW,MAAM,SACN,MAAM,GAAC,MAAM,EAAE,GAAC,YAAY,GAAC;QAAC,GAAG,EAAE,YAAY,CAAA;KAAC,GAE9C,OAAO,CAwDnB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,mBAEC;CACD"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* additional import for TypeScript
|
|
3
|
-
* @import Renderer from "../renderer.js";
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Default maximum number of vertices per batch.
|
|
7
|
-
* At 4096 vertices (1024 quads), the vertex buffer is ~80 KB (5 floats × 4 bytes × 4096),
|
|
8
|
-
* which balances draw call reduction with safe buffer upload sizes on mobile tile-based GPUs.
|
|
9
|
-
* Within the Uint16 index limit (65,535) — a deliberate capacity choice
|
|
10
|
-
* (smaller index uploads), not an API constraint.
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
export const DEFAULT_MAX_VERTICES: 4096;
|
|
1
|
+
|
|
14
2
|
/**
|
|
15
3
|
* Backend-neutral base class for renderer batchers.
|
|
16
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/batcher.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/batcher.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,mCAAoC,IAAI,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAMC;;;;;;OAMG;IACH,eAFW,QAAQ,QAQlB;IALA;;;OAGG;IACH,+BAAwB;IAGzB;;OAEG;IACH,aAAS;IAET;;OAEG;IACH,eAAW;IAEX;;OAEG;IACH,cAAU;IAEV;;OAEG;IACH,cAAU;IAEV;;OAEG;IACH,gBAAY;CACZ;;0BA/EwB,gBAAgB"}
|
|
@@ -1,164 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* The per-instance record shared by both GPU backends (#1508).
|
|
4
|
-
*
|
|
5
|
-
* An instance carries a **row-major 3×4 affine transform** — three `vec4`
|
|
6
|
-
* rows — rather than a full 4×4: the bottom row of an affine matrix is
|
|
7
|
-
* always `(0, 0, 0, 1)`, so storing it would waste 16 bytes and a fourth
|
|
8
|
-
* attribute slot per instance. Two further slots are opt-in, declared once
|
|
9
|
-
* per instanced mesh:
|
|
10
|
-
*
|
|
11
|
-
* The transform occupies 12 floats (48 bytes); a colour slot adds 4 more
|
|
12
|
-
* (16 bytes) when `instanceColors` is declared, and a custom-data slot
|
|
13
|
-
* another 4 when `instanceData` is.
|
|
14
|
-
*
|
|
15
|
-
* Colour is four floats rather than four packed bytes for the same reason
|
|
16
|
-
* `aColor` is on the mesh vertex layout: a packed 4-byte slot can form a
|
|
17
|
-
* NaN bit pattern that Apple's Metal-backed driver canonicalizes on upload,
|
|
18
|
-
* zeroing the bytes the shader reads.
|
|
19
|
-
*
|
|
20
|
-
* The custom slot is deliberately **opaque** — the stock lit shader reads
|
|
21
|
-
* its `rgb` as emissive, while a custom mesh shader is free to read it as a
|
|
22
|
-
* wind phase, an atlas offset or a random seed.
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* floats occupied by the 3×4 transform
|
|
27
|
-
* @ignore
|
|
28
|
-
*/
|
|
29
|
-
export declare const TRANSFORM_FLOATS = 12;
|
|
30
|
-
/**
|
|
31
|
-
* floats occupied by an optional `vec4` slot
|
|
32
|
-
* @ignore
|
|
33
|
-
*/
|
|
34
|
-
export declare const SLOT_FLOATS = 4;
|
|
35
|
-
/**
|
|
36
|
-
* Describes one instanced mesh's record: how wide it is and where each
|
|
37
|
-
* optional slot begins. Offsets are in floats; multiply by 4 for bytes.
|
|
38
|
-
* @ignore
|
|
39
|
-
*/
|
|
40
|
-
export interface InstanceRecordLayout {
|
|
41
|
-
/** floats per instance */
|
|
42
|
-
floats: number;
|
|
43
|
-
/** bytes per instance (the vertex-buffer `arrayStride`) */
|
|
44
|
-
stride: number;
|
|
45
|
-
/** float offset of the colour slot, or -1 when absent */
|
|
46
|
-
colorOffset: number;
|
|
47
|
-
/** float offset of the custom-data slot, or -1 when absent */
|
|
48
|
-
dataOffset: number;
|
|
49
|
-
/** whether the colour slot is present */
|
|
50
|
-
hasColor: boolean;
|
|
51
|
-
/** whether the custom-data slot is present */
|
|
52
|
-
hasData: boolean;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Build the record layout for the given opt-in slots.
|
|
56
|
-
* @param hasColor - whether a per-instance colour slot is present
|
|
57
|
-
* @param hasData - whether a per-instance custom `vec4` slot is present
|
|
58
|
-
* @returns the resolved layout
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
export declare function instanceRecordLayout(hasColor: boolean, hasData: boolean): InstanceRecordLayout;
|
|
62
|
-
/**
|
|
63
|
-
* Write a matrix into an instance record as three row-major `vec4` rows.
|
|
64
|
-
*
|
|
65
|
-
* `Matrix3d` stores its values **column-major** (the GL convention —
|
|
66
|
-
* translation lives at `val[12..14]`), so this transposes the upper 3×4 on
|
|
67
|
-
* the way in. The shader transposes back when it rebuilds a `mat4`.
|
|
68
|
-
* @param target - the CPU-side instance buffer
|
|
69
|
-
* @param offset - float offset of this instance's record
|
|
70
|
-
* @param matrix - the transform to write
|
|
71
|
-
* @ignore
|
|
72
|
-
*/
|
|
73
|
-
export declare function writeInstanceTransform(target: Float32Array, offset: number, matrix: Matrix3d): void;
|
|
74
|
-
/**
|
|
75
|
-
* Write a translation / rotation / scale triple into an instance record.
|
|
76
|
-
*
|
|
77
|
-
* This is the shape authored instancing arrives in: glTF's
|
|
78
|
-
* `EXT_mesh_gpu_instancing` stores per-instance `TRANSLATION`, `ROTATION`
|
|
79
|
-
* (a quaternion) and `SCALE` accessors rather than matrices. Composing them
|
|
80
|
-
* straight into the record avoids building a `Matrix3d` per instance —
|
|
81
|
-
* a forest of five thousand trees would otherwise allocate five thousand
|
|
82
|
-
* throwaway matrices at load.
|
|
83
|
-
*
|
|
84
|
-
* The rotation is applied first, then scale, then translation (glTF's
|
|
85
|
-
* `T * R * S` convention), and the result is transposed into the record's
|
|
86
|
-
* row-major rows.
|
|
87
|
-
* @param target - the CPU-side instance buffer
|
|
88
|
-
* @param offset - float offset of this instance's record
|
|
89
|
-
* @param tx - translation x
|
|
90
|
-
* @param ty - translation y
|
|
91
|
-
* @param tz - translation z
|
|
92
|
-
* @param qx - rotation quaternion x
|
|
93
|
-
* @param qy - rotation quaternion y
|
|
94
|
-
* @param qz - rotation quaternion z
|
|
95
|
-
* @param qw - rotation quaternion w
|
|
96
|
-
* @param sx - scale x
|
|
97
|
-
* @param sy - scale y
|
|
98
|
-
* @param sz - scale z
|
|
99
|
-
* @ignore
|
|
100
|
-
*/
|
|
101
|
-
export declare function writeInstanceTRS(target: Float32Array, offset: number, tx: number, ty: number, tz: number, qx: number, qy: number, qz: number, qw: number, sx: number, sy: number, sz: number): void;
|
|
102
|
-
/**
|
|
103
|
-
* Write an identity transform into an instance record — what a freshly
|
|
104
|
-
* grown slot holds until the caller places it, so an unplaced instance
|
|
105
|
-
* renders at the group origin rather than collapsing onto a zero matrix.
|
|
106
|
-
* @param target - the CPU-side instance buffer
|
|
107
|
-
* @param offset - float offset of this instance's record
|
|
108
|
-
* @ignore
|
|
109
|
-
*/
|
|
110
|
-
export declare function writeIdentityTransform(target: Float32Array, offset: number): void;
|
|
111
|
-
/**
|
|
112
|
-
* Read an instance's transform back into a `Matrix3d`, undoing the
|
|
113
|
-
* row-major packing.
|
|
114
|
-
* @param source - the CPU-side instance buffer
|
|
115
|
-
* @param offset - float offset of this instance's record
|
|
116
|
-
* @param out - the matrix to write into
|
|
117
|
-
* @returns `out`
|
|
118
|
-
* @ignore
|
|
119
|
-
*/
|
|
120
|
-
export declare function readInstanceTransform(source: Float32Array, offset: number, out: Matrix3d): Matrix3d;
|
|
121
|
-
/**
|
|
122
|
-
* The attribute names an instanced shader declares, in record order. Shared
|
|
123
|
-
* by both backends so the GL attribute records and the WGSL vertex layout
|
|
124
|
-
* describe the same thing.
|
|
125
|
-
* @ignore
|
|
126
|
-
*/
|
|
127
|
-
export declare const INSTANCE_ATTRIBUTE_NAMES: {
|
|
128
|
-
readonly rows: readonly ["aInstanceRow0", "aInstanceRow1", "aInstanceRow2"];
|
|
129
|
-
readonly color: "aInstanceColor";
|
|
130
|
-
readonly data: "aInstanceData";
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Shader locations for the instance slots, counted from the first location
|
|
134
|
-
* after a tier's geometry attributes.
|
|
135
|
-
*
|
|
136
|
-
* These are **fixed per slot rather than sequential**, so a variant that
|
|
137
|
-
* omits the colour slot does not shift the data slot down. On WebGPU that is
|
|
138
|
-
* what lets one WGSL module text serve every variant — WGSL has no
|
|
139
|
-
* preprocessor to renumber `@location` with — and on WebGL it keeps the two
|
|
140
|
-
* backends describing the same thing.
|
|
141
|
-
* @ignore
|
|
142
|
-
*/
|
|
143
|
-
export declare const INSTANCE_SLOT_OFFSETS: {
|
|
144
|
-
readonly rows: readonly [0, 1, 2];
|
|
145
|
-
readonly color: 3;
|
|
146
|
-
readonly data: 4;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Backend-neutral attribute descriptors for an instance record, in the
|
|
150
|
-
* `{name, format, offset}` vocabulary both backends consume.
|
|
151
|
-
* @param layout - the record layout
|
|
152
|
-
* @param baseLocation - first shader location for this record (the location
|
|
153
|
-
* after the tier's geometry attributes). Omit on WebGL, whose attribute
|
|
154
|
-
* locations come from the shader's own declaration order.
|
|
155
|
-
* @returns attribute descriptors covering the whole record
|
|
156
|
-
* @ignore
|
|
157
|
-
*/
|
|
158
|
-
export declare function instanceAttributes(layout: InstanceRecordLayout, baseLocation?: number): {
|
|
159
|
-
name: string;
|
|
160
|
-
format: string;
|
|
161
|
-
offset: number;
|
|
162
|
-
shaderLocation?: number;
|
|
163
|
-
}[];
|
|
1
|
+
export {};
|
|
164
2
|
//# sourceMappingURL=instancerecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instancerecord.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/instancerecord.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instancerecord.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/instancerecord.ts"],"names":[],"mappings":""}
|
|
@@ -1,49 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* The versioned-remap vertex dedup shared by the mesh batchers of both
|
|
3
|
-
* backends — pure CPU code, no GPU references (the `lighting/` modules set
|
|
4
|
-
* the precedent for cross-backend sharing).
|
|
5
|
-
*
|
|
6
|
-
* The accumulated mesh path re-indexes each chunk's triangles against a
|
|
7
|
-
* chunk-local vertex range. Dedup uses a "versioned" typed-array remap
|
|
8
|
-
* rather than a `Map`: a `Map` here churned the GC badly, because V8's
|
|
9
|
-
* `Map.clear()` drops the backing table, so re-filling it each chunk
|
|
10
|
-
* reallocated as it grew — and the cost scaled with vertex count (a dense
|
|
11
|
-
* mesh = MBs/sec of garbage). Instead, `remapSlot[orig]` holds the local
|
|
12
|
-
* index assigned to original-vertex `orig` THIS chunk, valid only when
|
|
13
|
-
* `remapStamp[orig] === stamp`. Bumping `stamp` per chunk invalidates every
|
|
14
|
-
* entry in O(1) — no clearing, no allocation. The arrays grow lazily (to a
|
|
15
|
-
* power of two ≥ the largest mesh's vertex count) and are reused.
|
|
16
|
-
*
|
|
17
|
-
* Module-level sharing is safe because a chunk is built synchronously and
|
|
18
|
-
* never re-enters — only one `addMesh` runs at a time, whichever backend
|
|
19
|
-
* (or coexisting renderer) drives it, and no remap state persists across
|
|
20
|
-
* chunks.
|
|
21
|
-
* @ignore
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Ensure the versioned-remap scratch arrays can index every vertex of a
|
|
25
|
-
* mesh with `vertexCount` vertices. Grows to the next power of two and
|
|
26
|
-
* reuses thereafter (one-time cost when a larger mesh first appears).
|
|
27
|
-
* @ignore
|
|
28
|
-
*/
|
|
29
|
-
export declare function ensureRemapCapacity(vertexCount: number): void;
|
|
30
|
-
/**
|
|
31
|
-
* Start a new chunk: invalidate the whole remap in O(1) and hand back the
|
|
32
|
-
* shared (emptied) chunk-index list. The stamp resets before int32 overflow
|
|
33
|
-
* (~weeks of continuous rendering away), keeping stored stamps valid.
|
|
34
|
-
* @returns the shared chunk-index array, emptied
|
|
35
|
-
* @ignore
|
|
36
|
-
*/
|
|
37
|
-
export declare function beginChunk(): number[];
|
|
38
|
-
/**
|
|
39
|
-
* The local index assigned to `origIdx` this chunk, or -1 when the vertex
|
|
40
|
-
* has not been emitted yet.
|
|
41
|
-
* @ignore
|
|
42
|
-
*/
|
|
43
|
-
export declare function remapIndex(origIdx: number): number;
|
|
44
|
-
/**
|
|
45
|
-
* Record the local index assigned to `origIdx` for the rest of this chunk.
|
|
46
|
-
* @ignore
|
|
47
|
-
*/
|
|
48
|
-
export declare function assignIndex(origIdx: number, localIdx: number): void;
|
|
1
|
+
|
|
49
2
|
//# sourceMappingURL=meshchunk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meshchunk.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/meshchunk.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"meshchunk.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/meshchunk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
|
|
@@ -1,54 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Retained mesh vertex-data assembly shared by the mesh batchers of both
|
|
3
|
-
* backends — pure CPU code, no GPU references (the `meshchunk.ts` /
|
|
4
|
-
* `lighting/` precedent). Kept in ONE place because the two layouts exist
|
|
5
|
-
* in an unlit and a lit variant on each backend, and the subtle parts —
|
|
6
|
-
* the ARGB unpack order and the lit path's zero-length-normal guard —
|
|
7
|
-
* must never drift between the four call sites.
|
|
8
|
-
*
|
|
9
|
-
* The data deliberately carries no placement, camera or tint information —
|
|
10
|
-
* those are uniforms — so it stays valid for the lifetime of the geometry.
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
/** the minimal mesh surface this module reads — `@ignore` */
|
|
14
|
-
interface RetainedMeshSource {
|
|
15
|
-
originalVertices: Float32Array;
|
|
16
|
-
originalNormals?: Float32Array | null;
|
|
17
|
-
uvs: Float32Array;
|
|
18
|
-
vertexColors?: Uint32Array | null;
|
|
19
|
-
vertexCount: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* a reusable Float32Array of at least `floatCount` floats
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
export declare function retainedScratch(floatCount: number): Float32Array;
|
|
26
|
-
/**
|
|
27
|
-
* Write one mesh's model-space geometry into `out` in the unlit mesh
|
|
28
|
-
* layout — `x, y, z, u, v, r, g, b, a` — striding by `vertexSize`.
|
|
29
|
-
* @param mesh - the mesh to read geometry from
|
|
30
|
-
* @param out - destination scratch, at least `vertexCount × vertexSize` long
|
|
31
|
-
* @param vertexSize - floats per vertex in the hosting batcher's layout
|
|
32
|
-
* @returns number of floats written
|
|
33
|
-
* @ignore
|
|
34
|
-
*/
|
|
35
|
-
export declare function buildMeshVertexData(mesh: RetainedMeshSource, out: Float32Array, vertexSize: number): number;
|
|
36
|
-
/**
|
|
37
|
-
* The lit variant: the unlit layout plus the model-space normal —
|
|
38
|
-
* `…, nx, ny, nz` — so lighting can be evaluated after the shader rotates
|
|
39
|
-
* it into world space.
|
|
40
|
-
*
|
|
41
|
-
* A zero-length normal must not reach the shader: it does
|
|
42
|
-
* `normalize(vNormal)`, and normalizing a zero vector is NaN — every
|
|
43
|
-
* fragment touching that vertex goes black or garbage. Degenerate
|
|
44
|
-
* triangles in OBJ/glTF assets produce these, so substitute a unit
|
|
45
|
-
* vector, matching what the CPU projection path does.
|
|
46
|
-
* @param mesh - the mesh to read geometry from
|
|
47
|
-
* @param out - destination scratch, at least `vertexCount × vertexSize` long
|
|
48
|
-
* @param vertexSize - floats per vertex in the hosting batcher's layout
|
|
49
|
-
* @returns number of floats written
|
|
50
|
-
* @ignore
|
|
51
|
-
*/
|
|
52
|
-
export declare function buildLitMeshVertexData(mesh: RetainedMeshSource, out: Float32Array, vertexSize: number): number;
|
|
53
|
-
export {};
|
|
1
|
+
|
|
54
2
|
//# sourceMappingURL=meshvertex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meshvertex.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/meshvertex.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"meshvertex.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/meshvertex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|