melonjs 20.7.0 → 20.8.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 +6 -3
- package/build/application/defaultApplicationSettings.d.ts +5 -0
- package/build/application/defaultApplicationSettings.d.ts.map +1 -1
- package/build/application/header.d.ts.map +1 -1
- package/build/application/settings.d.ts +88 -0
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/backend/engine.d.ts +0 -1
- package/build/audio/backend/sound.d.ts +0 -1
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts +95 -8
- package/build/camera/camera3d.d.ts.map +1 -1
- package/build/geometries/box3d.d.ts +24 -6
- package/build/geometries/box3d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +14 -0
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +14 -0
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/sphere.d.ts +35 -6
- package/build/geometries/sphere.d.ts.map +1 -1
- package/build/index.d.ts +9 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2770 -538
- package/build/index.js.map +4 -4
- package/build/input/pointerevent.d.ts +8 -0
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +17 -31
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +40 -1
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/level.d.ts +35 -0
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +5 -2
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +0 -1
- package/build/level/tiled/TMXTile.d.ts +2 -1
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +7 -4
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts +5 -0
- package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +0 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +6 -5
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +5 -0
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +8 -7
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +5 -0
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +19 -4
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/autodetect.d.ts +0 -4
- package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
- package/build/loader/loader.d.ts +9 -0
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +1 -2
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/shader.d.ts +0 -2
- package/build/math/color.d.ts +27 -4
- package/build/math/color.d.ts.map +1 -1
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +22 -1
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +69 -0
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/adapter.d.ts +9 -1
- package/build/physics/adapter.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +3 -2
- package/build/physics/builtin/body.d.ts.map +1 -1
- package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
- package/build/physics/builtin/detector.d.ts +0 -1
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/physics/builtin/sat.d.ts +0 -7
- package/build/physics/builtin/sat3d.d.ts +46 -0
- package/build/physics/builtin/sat3d.d.ts.map +1 -1
- package/build/physics/response.d.ts +45 -62
- package/build/physics/response.d.ts.map +1 -1
- package/build/renderable/collectable.d.ts +6 -1
- package/build/renderable/collectable.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +4 -4
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts +23 -17
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +12 -16
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts +1 -1
- package/build/renderable/groundshadow.d.ts +1 -0
- package/build/renderable/groundshadow.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +12 -5
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts +2 -9
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +283 -4
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts +3 -13
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +90 -27
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +5 -19
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +27 -16
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +13 -3
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +0 -4
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +5 -3
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +2 -0
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/trail.d.ts +0 -1
- package/build/renderable/trail.d.ts.map +1 -1
- package/build/renderable/trigger.d.ts +27 -5
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/progressbar.d.ts +194 -0
- package/build/renderable/ui/progressbar.d.ts.map +1 -0
- package/build/renderable/ui/uibaseelement.d.ts +48 -3
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uispriteelement.d.ts +19 -3
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts +2 -2
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/pool.d.ts +10 -0
- package/build/system/pool.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +49 -2
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +34 -23
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/effects/blendEffect.d.ts +0 -1
- package/build/video/effects/bloom.d.ts +72 -0
- package/build/video/effects/bloom.d.ts.map +1 -0
- package/build/video/effects/blur.d.ts +3 -2
- package/build/video/effects/blur.d.ts.map +1 -1
- package/build/video/effects/chromaticAberration.d.ts +3 -2
- package/build/video/effects/chromaticAberration.d.ts.map +1 -1
- package/build/video/effects/colorMatrix.d.ts +3 -2
- package/build/video/effects/colorMatrix.d.ts.map +1 -1
- package/build/video/effects/desaturate.d.ts +10 -2
- package/build/video/effects/desaturate.d.ts.map +1 -1
- package/build/video/effects/dissolve.d.ts +3 -2
- package/build/video/effects/dissolve.d.ts.map +1 -1
- package/build/video/effects/dropShadow.d.ts +3 -2
- package/build/video/effects/dropShadow.d.ts.map +1 -1
- package/build/video/effects/flash.d.ts +3 -2
- package/build/video/effects/flash.d.ts.map +1 -1
- package/build/video/effects/glow.d.ts +3 -2
- package/build/video/effects/glow.d.ts.map +1 -1
- package/build/video/effects/hologram.d.ts +3 -2
- package/build/video/effects/hologram.d.ts.map +1 -1
- package/build/video/effects/invert.d.ts +10 -2
- package/build/video/effects/invert.d.ts.map +1 -1
- package/build/video/effects/outline.d.ts +3 -2
- package/build/video/effects/outline.d.ts.map +1 -1
- package/build/video/effects/pixelate.d.ts +3 -2
- package/build/video/effects/pixelate.d.ts.map +1 -1
- package/build/video/effects/radialGradient.d.ts +8 -3
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/scanline.d.ts +3 -2
- package/build/video/effects/scanline.d.ts.map +1 -1
- package/build/video/effects/sepia.d.ts +10 -2
- package/build/video/effects/sepia.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts +10 -4
- package/build/video/effects/shadereffect.d.ts.map +1 -1
- package/build/video/effects/shine.d.ts +3 -2
- package/build/video/effects/shine.d.ts.map +1 -1
- package/build/video/effects/tintPulse.d.ts +3 -2
- package/build/video/effects/tintPulse.d.ts.map +1 -1
- package/build/video/effects/tonemap.d.ts +121 -0
- package/build/video/effects/tonemap.d.ts.map +1 -0
- package/build/video/effects/vignette.d.ts +3 -2
- package/build/video/effects/vignette.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +3 -2
- package/build/video/effects/wave.d.ts.map +1 -1
- package/build/video/gpu/vertexformat.d.ts +26 -0
- package/build/video/gpu/vertexformat.d.ts.map +1 -1
- package/build/video/gradient.d.ts +0 -1
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/renderer.d.ts +111 -7
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +2 -0
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +3 -4
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/render_target_pool.d.ts +0 -1
- package/build/video/rendertarget/webglrendertarget.d.ts +0 -1
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +18 -2
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +1 -0
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +1 -3
- package/build/video/texture/frametexture.d.ts +0 -1
- package/build/video/texture/frametexture.d.ts.map +1 -1
- package/build/video/texture/noise_texture2d.d.ts +1 -0
- package/build/video/texture/noise_texture2d.d.ts.map +1 -1
- package/build/video/utils/autodetect.d.ts +0 -2
- package/build/video/webgl/batchers/batcher.d.ts +0 -9
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +11 -0
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +4 -2
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts +0 -3
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +4 -0
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +0 -1
- package/build/video/webgl/buffer/retained_geometry.d.ts +0 -1
- package/build/video/webgl/glshader.d.ts +5 -3
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +0 -4
- package/build/video/webgl/texture/store.d.ts +0 -1
- package/build/video/webgl/webgl_renderer.d.ts +63 -24
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +0 -3
- package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -2
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts +0 -2
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +0 -2
- package/build/video/webgpu/texture/frametexture.d.ts +0 -2
- package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
- package/build/video/webgpu/texture/store.d.ts +0 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +7 -75
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/melonjs-3d/SKILL.md +277 -19
- package/skills/melonjs-3d-assets/SKILL.md +76 -9
- package/skills/melonjs-camera-and-drawing/SKILL.md +57 -1
- package/skills/melonjs-effects-and-shaders/SKILL.md +341 -29
- package/skills/melonjs-input/SKILL.md +48 -4
- package/skills/melonjs-particles-and-trails/SKILL.md +106 -4
- package/skills/melonjs-performance/SKILL.md +79 -2
- package/skills/melonjs-physics/SKILL.md +101 -27
- package/skills/melonjs-renderables/SKILL.md +2 -1
- package/skills/melonjs-scenes-and-state/SKILL.md +121 -1
- package/skills/melonjs-ui-and-text/SKILL.md +165 -4
- package/build/level/gltf/srgb.d.ts +0 -20
- package/build/level/gltf/srgb.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noise_texture2d.d.ts","sourceRoot":"","sources":["../../../src/video/texture/noise_texture2d.js"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"noise_texture2d.d.ts","sourceRoot":"","sources":["../../../src/video/texture/noise_texture2d.js"],"names":[],"mappings":";;;;;;;;;YAsBc,MAAM;;;;aACN,MAAM;;;;;YACN,KAAK;;;;eAEL,OAAO;;;;;yBACP,MAAM;;;;aAEN,OAAO;;;;kBACP,OAAO;;;;mBACP,MAAM;;;;;gBACN,OAAO,gBAAgB,EAAE,QAAQ;;;;;eAEjC,OAAO;;;;;YAEP,MAAM;;;;;;;;;;;qCAYP,0BAA0B,GAAG,OAAO,qBAAqB,EAAE,aAAa;AA9BrF;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IACC;;;OAGG;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
|
81
81
|
get mode(): number;
|
|
82
|
-
vertexState: WebGLVertexState | null | undefined;
|
|
83
82
|
/**
|
|
84
83
|
* an array of vertex attribute properties
|
|
85
84
|
* @see WebGLBatcher.addAttribute
|
|
@@ -100,11 +99,6 @@ export class WebGLBatcher extends Batcher {
|
|
|
100
99
|
* @type {number}
|
|
101
100
|
*/
|
|
102
101
|
vertexSize: number | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* the vertex data buffer used by this batcher
|
|
105
|
-
* @type {VertexArrayBuffer}
|
|
106
|
-
*/
|
|
107
|
-
vertexData: VertexArrayBuffer | undefined;
|
|
108
102
|
/**
|
|
109
103
|
* the name of the projection matrix uniform in the shader
|
|
110
104
|
* @type {string}
|
|
@@ -199,8 +193,5 @@ import type WebGLRenderer from "./../webgl_renderer.js";
|
|
|
199
193
|
import type { Matrix3d } from "../../../math/matrix3d.ts";
|
|
200
194
|
import GLShader from "../glshader.js";
|
|
201
195
|
import type { Topology } from "../../gpu/topology.ts";
|
|
202
|
-
import WebGLVertexState from "../buffer/vertexstate.js";
|
|
203
|
-
import VertexArrayBuffer from "../../buffer/vertex.js";
|
|
204
|
-
import WebGLIndexBuffer from "../buffer/index.js";
|
|
205
196
|
import type { VertexFormat } from "../../gpu/vertexformat.ts";
|
|
206
197
|
//# sourceMappingURL=batcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/batcher.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH;IAkBC;;;OAGG;IACH,sBAHW,aAAa,YACb,MAAM,EAKhB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,eAfW,aAAa,YAErB;QAA2B,UAAU,EACrC;YAAoC,IAAI,EAAhC,MAAM;YACsB,IAAI,EAAhC,MAAM;YACsB,IAAI,EAAhC,MAAM;YACuB,UAAU,EAAvC,OAAO;YACqB,MAAM,EAAlC,MAAM;SACd;QAAyB,MAAM,EAC/B;YAAgC,MAAM,EAA9B,MAAM;YACkB,QAAQ,EAAhC,MAAM;SACd;QAA0B,WAAW;QACV,OAAO;QACR,iBAAiB;KAC7C,
|
|
1
|
+
{"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/batcher.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH;IAkBC;;;OAGG;IACH,sBAHW,aAAa,YACb,MAAM,EAKhB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,eAfW,aAAa,YAErB;QAA2B,UAAU,EACrC;YAAoC,IAAI,EAAhC,MAAM;YACsB,IAAI,EAAhC,MAAM;YACsB,IAAI,EAAhC,MAAM;YACuB,UAAU,EAAvC,OAAO;YACqB,MAAM,EAAlC,MAAM;SACd;QAAyB,MAAM,EAC/B;YAAgC,MAAM,EAA9B,MAAM;YACkB,QAAQ,EAAhC,MAAM;SACd;QAA0B,WAAW;QACV,OAAO;QACR,iBAAiB;KAC7C,QAuJA;IAjJA,QAAqB;IAGrB,iCAA2C;IAE3C;;;OAGG;IACH,oCAA8B;IAE9B;;;OAGG;IACH,oCAA8B;IAkZ/B;;OAEG;IACH,gBAFW,QAAQ,GAAC,MAAM,EASzB;IAxBD;;;;;;;;;OASG;IACH,YAHU,MAAM,CAKf;IAtYC;;;OAGG;IACH,iDAAuB;IAGxB;;;;OAIG;IACH,iCAAoB;IAEpB;;;;;OAKG;IACH,2BAAe;IAEf;;;;;OAKG;IACH,+BAAmB;IAEnB;;;;;OAKG;IACH,0CAAsB;IA4CtB;;;OAGG;IACH,sCAA0E;IAE1E;;;OAGG;IACH,oCAA+C;IAE/C;;;;;OAKG;IACH,+CAA0B;IAE1B;;;;;OAKG;IACH,iDAAuB;IAgBxB;;;;;;;OAOG;IACH,oBAJU,WAAW,CAMpB;IAED;;;;;;;;;;;OAWG;IACH,0BAiBC;IAoGD;;;;;;;;;OASG;IACH,2CA0BC;IAxBC,8CAAqC;IA0BvC;;;;;;;;;;;;OAYG;IACH,oBAaC;IAED;;;;OAIG;IACH,kBAFW,QAAQ,QAuBlB;IAHE,uCAA4B;IAmB/B;;OAEG;IACH,oBAFW,QAAQ,GAAC,MAAM,EAIzB;IAnBD;;;;;;;;;OASG;IACH,gBAHU,QAAQ,CAKjB;IAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,mBAPW,MAAM,GAAC,MAAM,SACb,MAAM,GAAC,YAAY,SACnB,MAAM,GAAC,MAAM,eACb,OAAO,WACP,MAAM,wBA4BhB;IAoJD;;;OAGG;IACH,sBAFW,QAAQ,QAIlB;IAED;;;;OAIG;IACH,oBAFW,MAAM,EAAE,QAOlB;IAED;;;OAGG;IACH,aAFW,MAAM,QAqEhB;IACD;;;;;;;;OAQG;IACH,WAJa,OAAO,CAAC,IAAI,CAAC,CAMzB;;CACD;;wBA/yB6C,sBAAsB;+BAUtC,wBAAwB;8BAC3B,2BAA2B;qBAPjC,gBAAgB;8BASV,uBAAuB;6BAVrB,0BAA0B;8BAJzB,wBAAwB;6BAGzB,oBAAoB;kCAUlB,2BAA2B"}
|
|
@@ -83,6 +83,17 @@ export default class LitQuadBatcher extends QuadBatcher {
|
|
|
83
83
|
* @param {HTMLImageElement|HTMLCanvasElement|null} [normalMap=null] - paired normal-map (SpriteIlluminator workflow)
|
|
84
84
|
*/
|
|
85
85
|
addQuad(texture: TextureAtlas, x: number, y: number, w: number, h: number, u0: number, v0: number, u1: number, v1: number, tint: number, reupload?: boolean, normalMap?: HTMLImageElement | HTMLCanvasElement | null): void;
|
|
86
|
+
/**
|
|
87
|
+
* Override `blitTexture` so the FBO blit pushes `-1` as the unlit
|
|
88
|
+
* sentinel (this batcher's vertex layout includes `aNormalTextureId`).
|
|
89
|
+
* @param {WebGLTexture} source - the raw GL texture to blit
|
|
90
|
+
* @param {number} x - destination x
|
|
91
|
+
* @param {number} y - destination y
|
|
92
|
+
* @param {number} width - destination width
|
|
93
|
+
* @param {number} height - destination height
|
|
94
|
+
* @param {GLShader|ShaderEffect} shader - the shader effect to apply
|
|
95
|
+
*/
|
|
96
|
+
blitTexture(source: WebGLTexture, x: number, y: number, width: number, height: number, shader: GLShader | ShaderEffect): void;
|
|
86
97
|
}
|
|
87
98
|
import QuadBatcher from "./quad_batcher.js";
|
|
88
99
|
import { WebGLTextureStore } from "../texture/store.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit_quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_quad_batcher.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;IA4EE;;;;;;;OAOG;IACH,6GAAiD;IAEjD;;;;;;;;OAQG;IACH,0CAAmD;IAoBnD,2CAAiD;IAEjD;;;;;;;;OAQG;IACH,2GAA4B;IAC5B;;;OAGG;IACH,iBAAoB;IAEpB;;;OAGG;IACH,gCAAoB;IACpB;;;OAGG;IACH,+BAA4B;IAuB5B,qCAIC;IACD;;;OAGG;IACH,wBAA8B;IAW7B,kEAEC;IAsCH;;;;;;;;;;;;;;OAcG;IACH,wBAQC;IAED;;;;;OAKG;IACH,sBAFW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAaxE;IAiFD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2BANG;QAA+B,SAAS,EAAhC,YAAY;QACW,MAAM,EAA7B,YAAY;QACY,OAAO;QACd,KAAK,EAAtB,MAAM;QACc,OAAO;KACrC,QAMA;IAED;;;;;;;;;OASG;IACH,qBAHW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAC9D,MAAM,QAqChB;IAED;;;;;;;;;;OAUG;IACH,yBAJW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAcxE;IAED;;;;;;;;;;;;;;OAcG;IACH,6BALW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAC5D,MAAM,CAuClB;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAbW,YAAY,KACZ,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,cACP,gBAAgB,GAAC,iBAAiB,GAAC,IAAI,QAiJjD;
|
|
1
|
+
{"version":3,"file":"lit_quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/lit_quad_batcher.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;IA4EE;;;;;;;OAOG;IACH,6GAAiD;IAEjD;;;;;;;;OAQG;IACH,0CAAmD;IAoBnD,2CAAiD;IAEjD;;;;;;;;OAQG;IACH,2GAA4B;IAC5B;;;OAGG;IACH,iBAAoB;IAEpB;;;OAGG;IACH,gCAAoB;IACpB;;;OAGG;IACH,+BAA4B;IAuB5B,qCAIC;IACD;;;OAGG;IACH,wBAA8B;IAW7B,kEAEC;IAsCH;;;;;;;;;;;;;;OAcG;IACH,wBAQC;IAED;;;;;OAKG;IACH,sBAFW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAaxE;IAiFD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2BANG;QAA+B,SAAS,EAAhC,YAAY;QACW,MAAM,EAA7B,YAAY;QACY,OAAO;QACd,KAAK,EAAtB,MAAM;QACc,OAAO;KACrC,QAMA;IAED;;;;;;;;;OASG;IACH,qBAHW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAC9D,MAAM,QAqChB;IAED;;;;;;;;;;OAUG;IACH,yBAJW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,QAcxE;IAED;;;;;;;;;;;;;;OAcG;IACH,6BALW,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAC5D,MAAM,CAuClB;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAbW,YAAY,KACZ,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,cACP,gBAAgB,GAAC,iBAAiB,GAAC,IAAI,QAiJjD;IAED;;;;;;;;;OASG;IACH,oBAPW,YAAY,KACZ,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,UACN,QAAQ,GAAC,YAAY,QAqD/B;CACD;wBAvuBuB,mBAAmB;kCADT,qBAAqB;yBAT9B,2BAA2B;kCAcrB,0BAA0B"}
|
|
@@ -3,16 +3,18 @@ export class MaterialBatcher extends WebGLBatcher {
|
|
|
3
3
|
/**
|
|
4
4
|
* Create a WebGL texture from an image
|
|
5
5
|
* @param {number} unit - Destination texture unit
|
|
6
|
-
* @param {Image|HTMLCanvasElement|ImageData|Uint8Array[]|Float32Array[]}
|
|
6
|
+
* @param {Image|HTMLCanvasElement|ImageData|Uint8Array[]|Float32Array[]|null} pixels - Source image, or `null` for an empty texture. Required positionally because `filter` follows it, and an optional parameter cannot precede a required one
|
|
7
7
|
* @param {number} filter - gl.LINEAR or gl.NEAREST
|
|
8
8
|
* @param {string} [repeat="no-repeat"] - Image repeat behavior
|
|
9
9
|
* @param {number} [w=pixels.width] - Source image width
|
|
10
10
|
* @param {number} [h=pixels.height] - Source image height
|
|
11
11
|
* @param {boolean} [premultipliedAlpha=true] - Multiplies the alpha channel into the other color channels
|
|
12
12
|
* @param {boolean} [mipmap=true] - Whether mipmap levels should be generated
|
|
13
|
+
* @param {WebGLTexture} [texture] - an existing texture to upload into, rather than creating one
|
|
14
|
+
* @param {boolean} [flush=true] - flush the current batch before binding
|
|
13
15
|
* @returns {WebGLTexture} a WebGL texture
|
|
14
16
|
*/
|
|
15
|
-
createTexture2D(unit: number, pixels
|
|
17
|
+
createTexture2D(unit: number, pixels: ((new (width?: number, height?: number) => HTMLImageElement) | HTMLCanvasElement | ImageData | Uint8Array[] | Float32Array[] | null) | undefined, filter: number, repeat?: string, w?: number, h?: number, premultipliedAlpha?: boolean, mipmap?: boolean, texture?: WebGLTexture, flush?: boolean): WebGLTexture;
|
|
16
18
|
/**
|
|
17
19
|
* delete the given WebGL texture
|
|
18
20
|
* @param {WebGLTexture|TextureAtlas} texture - a WebGL texture or TextureAtlas to delete
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;;;;;;OAaG;IACH,sBAZW,MAAM,WACN,8DAAM,iBAAiB,GAAC,SAAS,GAAC,UAAU,EAAE,GAAC,YAAY,EAAE,GAAC,IAAI,uBAClE,MAAM,WACN,MAAM,MACN,MAAM,MACN,MAAM,uBACN,OAAO,WACP,OAAO,YACP,YAAY,UACZ,OAAO,GACL,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;6BAvlB4B,cAAc;kCAIZ,0BAA0B"}
|
|
@@ -66,7 +66,4 @@ export default class MeshBatcher extends MaterialBatcher {
|
|
|
66
66
|
addMesh(mesh: any, tint: any): void;
|
|
67
67
|
}
|
|
68
68
|
import { MaterialBatcher } from "./material_batcher.js";
|
|
69
|
-
import RetainedGeometry from "../buffer/retained_geometry.js";
|
|
70
|
-
import { Matrix3d } from "../../../math/matrix3d.ts";
|
|
71
|
-
import GLShader from "../glshader.js";
|
|
72
69
|
//# 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":"AA0EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH;IACC;;;;OAIG;IACH,0BA2HC;IAjHA,wBAA4B;IAI5B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAI1B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAI1B,yBAA6B;IAC7B,wBAA4B;IAG5B,0BAA8B;IAC9B,yBAA6B;IAI7B,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,6BA6CC;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,
|
|
1
|
+
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/mesh_batcher.js"],"names":[],"mappings":"AA0EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH;IACC;;;;OAIG;IACH,0BA2HC;IAjHA,wBAA4B;IAI5B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAI1B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAC1B,sBAA0B;IAI1B,yBAA6B;IAC7B,wBAA4B;IAG5B,0BAA8B;IAC9B,yBAA6B;IAI7B,iBAA6B;IAC7B,iBAA6B;IAC7B,iBAA6B;IAI7B,oBAAgC;IAChC,oBAAgC;IAChC,wBAAoC;IACpC,uBAAmC;IACnC,iBAA6B;IA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IACH,mCAIC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,mBATW,MAAM,WACN,MAAM,iBACN,MAAM,mBACN,MAAM,GAEJ,QAAQ,CAepB;IAkFD;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAbW,MAAM,YACN,YAAY,cAGZ,YAAY,GAKV,MAAM,CA2MlB;IAED;;;;;;;;OAQG;IACH,sBAJW,MAAM,QAYhB;IAED,oCA0BC;IAED;;;;;;;;OAQG;IACH,sBANW,MAAM,QACN,MAAM,UACN,MAAM,QAsFhB;CACD;gCA/6D+B,uBAAuB;6BAR1B,gCAAgC;yBAhBpC,2BAA2B;qBAkB/B,gBAAgB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* additional import for TypeScript
|
|
3
3
|
* @import {TextureAtlas} from "./../../texture/atlas.js";
|
|
4
|
+
* @import GLShader from "../glshader.js";
|
|
5
|
+
* @import ShaderEffect from "../../effects/shadereffect.js";
|
|
4
6
|
*/
|
|
5
7
|
/**
|
|
6
8
|
* A WebGL Compositor object. This class handles all of the WebGL state<br>
|
|
@@ -46,5 +48,7 @@ export default class QuadBatcher extends MaterialBatcher {
|
|
|
46
48
|
addQuad(texture: TextureAtlas, x: number, y: number, w: number, h: number, u0: number, v0: number, u1: number, v1: number, tint: number, reupload?: boolean): void;
|
|
47
49
|
}
|
|
48
50
|
import { MaterialBatcher } from "./material_batcher.js";
|
|
51
|
+
import type GLShader from "../glshader.js";
|
|
52
|
+
import type ShaderEffect from "../../effects/shadereffect.js";
|
|
49
53
|
import type { TextureAtlas } from "./../../texture/atlas.js";
|
|
50
54
|
//# sourceMappingURL=quad_batcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/quad_batcher.js"],"names":[],"mappings":"AAOA
|
|
1
|
+
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/batchers/quad_batcher.js"],"names":[],"mappings":"AAOA;;;;;GAKG;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;gCA7V+B,uBAAuB;0BAK9B,gBAAgB;8BACZ,+BAA+B;kCAF7B,0BAA0B"}
|
|
@@ -28,9 +28,11 @@
|
|
|
28
28
|
*/
|
|
29
29
|
export default class GLShader {
|
|
30
30
|
/**
|
|
31
|
-
* @param {WebGLRenderingContext}
|
|
31
|
+
* @param {WebGLRenderingContext|undefined} gl - the current WebGL rendering
|
|
32
32
|
* context (`renderer.gl` — undefined on non-WebGL renderers, which
|
|
33
|
-
* simply skips the GLSL realization)
|
|
33
|
+
* simply skips the GLSL realization). Pass it either way: it is required
|
|
34
|
+
* positionally because `vertex` follows it, and an optional parameter
|
|
35
|
+
* cannot precede a required one
|
|
34
36
|
* @param {string|object} vertex - a string containing the GLSL vertex
|
|
35
37
|
* source, OR a sources object `{vertex, fragment, wgsl, precision,
|
|
36
38
|
* label}` carrying one realization per backend (any omittable)
|
|
@@ -66,7 +68,7 @@ export default class GLShader {
|
|
|
66
68
|
* wgsl: toonModuleWGSL,
|
|
67
69
|
* }));
|
|
68
70
|
*/
|
|
69
|
-
constructor(gl
|
|
71
|
+
constructor(gl: WebGLRenderingContext | undefined, vertex: string | object, fragment?: string, precision?: string);
|
|
70
72
|
/**
|
|
71
73
|
* the active gl rendering context
|
|
72
74
|
* @type {WebGLRenderingContext}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glshader.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/glshader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACC
|
|
1
|
+
{"version":3,"file":"glshader.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/glshader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,gBAxCW,qBAAqB,GAAC,SAAS,UAK/B,MAAM,GAAC,MAAM,aAGb,MAAM,cACN,MAAM,EAqL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|
2
|
-
import type { default as WebGLRenderer } from "../../webgl_renderer.js";
|
|
3
|
-
import GLShader from "../../glshader.js";
|
|
4
|
-
import { BufferTextureResource } from "../../../texture/resource.js";
|
|
5
|
-
import type { default as TMXLayer } from "../../../../level/tiled/TMXLayer.js";
|
|
6
2
|
//# sourceMappingURL=orthogonal.d.ts.map
|
|
@@ -69,7 +69,6 @@ export default class WebGLRenderer extends Renderer {
|
|
|
69
69
|
* @type {Map<WebGLBatcher>}
|
|
70
70
|
*/
|
|
71
71
|
batchers: Map<WebGLBatcher, any>;
|
|
72
|
-
cache: TextureCache;
|
|
73
72
|
onGameReset: () => void;
|
|
74
73
|
onContextRestoredInvalidate: (renderer: any) => void;
|
|
75
74
|
onCanvasResize: (width: any, height: any) => void;
|
|
@@ -154,6 +153,66 @@ export default class WebGLRenderer extends Renderer {
|
|
|
154
153
|
* @param {number} [translateY=0] - world-to-screen Y translate
|
|
155
154
|
*/
|
|
156
155
|
setLightUniforms(lights?: Iterable<object>, ambient?: object, translateX?: number, translateY?: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* Capture the current frame — everything drawn to the active framebuffer so
|
|
158
|
+
* far — into a {@link Texture2d}, entirely on the GPU (a `copyTexImage2D` on
|
|
159
|
+
* the first capture, then `copyTexSubImage2D` to refresh in place; no
|
|
160
|
+
* `readPixels` round-trip or pipeline stall). The fourth member of the
|
|
161
|
+
* {@link Renderer#toDataURL} / {@link Renderer#toBlob} /
|
|
162
|
+
* {@link Renderer#toImageBitmap} family — "the current frame as X" — and the
|
|
163
|
+
* only one whose result never leaves the GPU.
|
|
164
|
+
*
|
|
165
|
+
* The capture reflects the framebuffer **at the call site** (a `flush()`
|
|
166
|
+
* runs first), so call it right before drawing the surface that needs the
|
|
167
|
+
* backdrop — the classic back-buffer-copy placement model. It reads whichever
|
|
168
|
+
* framebuffer is currently bound: the backbuffer normally, or a camera's
|
|
169
|
+
* post-effect FBO during that pass — so it works under both `Camera2d` and
|
|
170
|
+
* `Camera3d`. Under a perspective camera, "drawn so far" is draw order, not
|
|
171
|
+
* depth order: capture after the opaque scene, just before the refracting
|
|
172
|
+
* surface (the usual opaque-scene-texture guidance).
|
|
173
|
+
*
|
|
174
|
+
* Feed the result straight into a custom post-effect:
|
|
175
|
+
* ```js
|
|
176
|
+
* effect.setTexture("uScene", renderer.toFrameTexture());
|
|
177
|
+
* ```
|
|
178
|
+
* {@link ShaderEffect#setTexture} binds the **live** handle, so re-capturing
|
|
179
|
+
* each frame into the shared slot refreshes what the shader samples without
|
|
180
|
+
* any re-bind.
|
|
181
|
+
*
|
|
182
|
+
* Color only, captured into an RGB texture (opaque — samples with alpha = 1);
|
|
183
|
+
* the framebuffer's depth is not captured. By default the result is a shared,
|
|
184
|
+
* renderer-owned texture valid until the next parameterless call — pass
|
|
185
|
+
* `options.target` for an independent, caller-owned capture (e.g. two
|
|
186
|
+
* captures alive in the same frame).
|
|
187
|
+
* @param {object} [options]
|
|
188
|
+
* @param {Texture2d|null} [options.target] - controls the destination: omit
|
|
189
|
+
* for the shared renderer slot (default); pass a capture previously
|
|
190
|
+
* returned by this method to refresh it in place; pass `null` to mint a
|
|
191
|
+
* fresh, caller-owned capture (for two independent captures in one frame —
|
|
192
|
+
* `destroy()` it yourself when done)
|
|
193
|
+
* @param {Bounds|{x: number, y: number, width: number, height: number}} [options.region] - capture
|
|
194
|
+
* only this sub-region (framebuffer pixels, bottom-left origin); a smaller
|
|
195
|
+
* region is a proportionally cheaper copy. Defaults to the whole framebuffer.
|
|
196
|
+
* A {@link Bounds} (or any `{x, y, width, height}`); from a {@link Rect}
|
|
197
|
+
* pass `rect.getBounds()`.
|
|
198
|
+
* @returns {Texture2d} a GPU-resident texture holding the captured frame
|
|
199
|
+
* @example
|
|
200
|
+
* // a water surface that refracts the scene rendered behind it
|
|
201
|
+
* draw(renderer) {
|
|
202
|
+
* const scene = renderer.toFrameTexture(); // grab the backdrop
|
|
203
|
+
* this.shader.setTexture("uScene", scene); // live-bound
|
|
204
|
+
* super.draw(renderer); // draw the rippling water
|
|
205
|
+
* }
|
|
206
|
+
*/
|
|
207
|
+
toFrameTexture(options?: {
|
|
208
|
+
target?: Texture2d | null | undefined;
|
|
209
|
+
region?: Bounds | {
|
|
210
|
+
x: number;
|
|
211
|
+
y: number;
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
} | undefined;
|
|
215
|
+
}): Texture2d;
|
|
157
216
|
/**
|
|
158
217
|
* Clears the gl context with the given color.
|
|
159
218
|
* @param {Color|string} [color="#000000"] - CSS color.
|
|
@@ -274,17 +333,6 @@ export default class WebGLRenderer extends Renderer {
|
|
|
274
333
|
* @param {number} radii - The corner radius.
|
|
275
334
|
*/
|
|
276
335
|
roundRect(x: number, y: number, width: number, height: number, radii: number): void;
|
|
277
|
-
/**
|
|
278
|
-
* stroke the given shape or the current defined path
|
|
279
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds} [shape] - a shape object to stroke
|
|
280
|
-
* @param {boolean} [fill=false] - fill the shape with the current color if true
|
|
281
|
-
*/
|
|
282
|
-
stroke(shape?: Rect | RoundRect | Polygon | Line | Ellipse | Bounds, fill?: boolean): void;
|
|
283
|
-
/**
|
|
284
|
-
* fill the given shape or the current defined path
|
|
285
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds} [shape] - a shape object to fill
|
|
286
|
-
*/
|
|
287
|
-
fill(shape?: Rect | RoundRect | Polygon | Line | Ellipse | Bounds): void;
|
|
288
336
|
/**
|
|
289
337
|
* add a straight line from the current point to the start of the current sub-path. If the shape has already been closed or has only one point, this function does nothing
|
|
290
338
|
*/
|
|
@@ -434,23 +482,14 @@ export default class WebGLRenderer extends Renderer {
|
|
|
434
482
|
#private;
|
|
435
483
|
}
|
|
436
484
|
import Renderer from "./../renderer.js";
|
|
437
|
-
import RenderTargetPool from "../rendertarget/render_target_pool.js";
|
|
438
|
-
import BlendEffect from "../effects/blendEffect.js";
|
|
439
|
-
import WebGLRenderTarget from "../rendertarget/webglrendertarget.js";
|
|
440
|
-
import { GLSamplerCache } from "./utils/samplercache.js";
|
|
441
485
|
import { Bounds } from "../../physics/bounds.ts";
|
|
442
486
|
import { Matrix3d } from "../../math/matrix3d.ts";
|
|
443
487
|
import { WebGLBatcher } from "./batchers/batcher.js";
|
|
444
|
-
import TextureCache from "./../texture/cache.js";
|
|
445
|
-
import RadialGradientEffect from "../effects/radialGradient.js";
|
|
446
488
|
import { TextureAtlas } from "./../texture/atlas.js";
|
|
447
|
-
import
|
|
448
|
-
import {
|
|
489
|
+
import type GLShader from "./glshader.js";
|
|
490
|
+
import type { default as Texture2d } from "../texture/texture2d.ts";
|
|
449
491
|
import { Color } from "./../../math/color.ts";
|
|
450
|
-
import type {
|
|
451
|
-
import type { RoundRect } from "./../../geometries/roundrect.ts";
|
|
492
|
+
import type { CompressedImage } from "../../loader/parsers/compressed_textures/compressed_image.js";
|
|
452
493
|
import type { Polygon } from "../../geometries/polygon.ts";
|
|
453
|
-
import type { Line } from "./../../geometries/line.ts";
|
|
454
|
-
import type { Ellipse } from "./../../geometries/ellipse.ts";
|
|
455
494
|
import type { Matrix2d } from "../../math/matrix2d.ts";
|
|
456
495
|
//# sourceMappingURL=webgl_renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"AAmHA;;;GAGG;AACH;IAQE;;;;;OAKG;IACH,oBAJU,MAAM,CAIU;IAU1B;;;OAGG;IACH,IAFU,qBAAqB,CAEI;IAEnC;;;;;OAKG;IAMH;;;;;;;OAOG;IACH,2BAA4B;IAQ5B;;;;;;;;;OASG;IACH,cAJU,MAAM,CAIiB;IAQjC;;;OAGG;IACH,oCAeE;IAEF;;;;;OAKG;IAIH;;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,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAKhB;IAED;;;;;;;;;OASG;IACH,aAPW,QAAQ,GAAC,QAAQ,GAAC,MAAM,MACxB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAmChB;IAsIE;;;OAGG;IACH,sCAA4B;;CAoD/B;qBAt7HoB,kBAAkB;6BACV,uCAAuC;wBAJ5C,2BAA2B;8BAKrB,sCAAsC;+BAoBrC,yBAAyB;uBA3CjC,yBAAyB;yBADvB,wBAAwB;6BAiCpB,uBAAuB;yBAP3B,uBAAuB;iCANf,8BAA8B;6BAKrB,uBAAuB;0CAevB,oCAAoC;0BAiBrD,eAAe;0CAFD,yBAAyB;6BA5BnC,8BAA8B;sBA5B1B,uBAAuB;qCAyDtB,8DAA8D;6BANtE,6BAA6B;8BAG5B,wBAAwB"}
|
|
@@ -71,7 +71,4 @@ export default class WebGPUMeshBatcher extends WebGPUBatcher {
|
|
|
71
71
|
override flush(): void;
|
|
72
72
|
}
|
|
73
73
|
import WebGPUBatcher from "./webgpu_batcher.js";
|
|
74
|
-
import WebGPUInstanceBuffer from "../buffer/instance_buffer.js";
|
|
75
|
-
import { Matrix3d } from "../../../math/matrix3d.ts";
|
|
76
|
-
import WebGPURetainedGeometry from "../buffer/retained_geometry.js";
|
|
77
74
|
//# sourceMappingURL=mesh_batcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/mesh_batcher.js"],"names":[],"mappings":"AA+BA;;;;;;;;;GASG;AACH,gCAAiC,GAAG,CAAC;AAWrC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAyFjD;IA/EA,2CAUE;IAuBF,oCAAsC;IAItC,kBAAwB;IACxB,kBAAwB;IAIxB,gDAA+D;IAC/D,gBAAmB;IAGnB,qBAA2B;IAE3B;
|
|
1
|
+
{"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/mesh_batcher.js"],"names":[],"mappings":"AA+BA;;;;;;;;;GASG;AACH,gCAAiC,GAAG,CAAC;AAWrC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAyFjD;IA/EA,2CAUE;IAuBF,oCAAsC;IAItC,kBAAwB;IACxB,kBAAwB;IAIxB,gDAA+D;IAC/D,gBAAmB;IAGnB,qBAA2B;IAE3B;mBA+dwB,YAAY;iBAAW,MAAM,EAAE;;;;yBA/d7B;IAE1B,6CAAkC;IAKlC,4CAAiC;IAGjC;;;kBAAuD;IAQvD,oCAAyB;IAQzB,qCAA0B;IAC1B,yCAA8B;IAG9B,4CAAiC;IAGlC;;;;;OAKG;IACH;;;;;MAEC;IAED;;;;;;;;;;;;;OAaG;IACH,2BALW,MAAM,GACJ,MAAM,CAoClB;IAED;;;;;;;OAOG;IACH,wBALW,aAAa,GACX,oBAAoB,CAwBhC;IAED;;;;;;;OAOG;IACH,wBANW,aAAa,eACb,QAAQ,QACR,MAAM,QAyFhB;IA5DC,2CAAiC;IA8DnC;;;;;;;;;;;OAWG;IACH,8BALW,MAAM,GACJ,MAAM,CA6ClB;IAED;;;;;;;;;OASG;IACH,0BAPW,aAAa,gBACb,QAAQ,QACR,MAAM,QACN,MAAM,QA8DhB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,QAUhB;IAED;;;;OAIG;IACH,4BAKC;IAED;;;;;OAKG;IACH;;;;;;;;MAMC;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;;;;OAOG;IACH;;;;QAkBC;IAED;;;;OAIG;IACH,2BAEC;IAED;;;;;;;;;;;;;OAaG;IACH,2BALW,MAAM,GACJ,kBAAkB,CAgC9B;IAED;;;;;;;;;;;OAWG;IACH,yBARW,SAAS,YACT,MAAM,UACN,MAAM,cACN,MAAM,GACJ;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAC,CA0DxD;IAED;;;;;;;;;;;;OAYG;IACH,mBAJa,MAAM,CA0ClB;IA/BE;;;kBAA0D;IAiC7D;;;;;OAKG;IACH,uCAOC;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAJa,kBAAkB,CAQ9B;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,wBAZW,MAAM,YACN,YAAY,cAGZ,YAAY,QAqCtB;IAED;;;;;;;;;;;OAWG;IACH,kCAPW,QAAQ,QAER,MAAM,QACN,MAAM,QAiIhB;IAED;;;;;;OAMG;IACH,4GAEC;IAED;;;;;;;;OAQG;IACH,cAHW,MAAM,QACN,MAAM,QAsBhB;IAED;;;;;;;;OAQG;IACH,sBANW,MAAM,QACN,MAAM,UACN,MAAM,QAuEhB;IAED;;;;;;OAMG;IACH,uBAyEC;IAED;;;;;OAKG;IACH,4BAEC;IAED;;;;;;;;;OASG;IACH,8BANW,MAAM,OACN,YAAY,GACV,MAAM,CAMlB;IAED;;;;;;;OAOG;IACH,0BALW,MAAM,GACJ,sBAAsB,CAiBlC;IAED;;;;;;;;;;;;;;OAcG;IACH,uBANW,MAAM,eACN,QAAQ,QACR,MAAM,QAkFhB;IAED;;;;;OAKG;IACH,sBAJW,MAAM,QAWhB;IAED;;;;OAIG;IACH,2BAMC;CAwBD;0BA7yCyB,qBAAqB;iCARd,8BAA8B;yBAVtC,2BAA2B;mCAWjB,gCAAgC"}
|
|
@@ -22,7 +22,6 @@ export default class WebGPUQuadBatcher extends WebGPUBatcher {
|
|
|
22
22
|
override init(renderer: import("../webgpu_renderer.js").default, settings: any): void;
|
|
23
23
|
currentMaterial: any;
|
|
24
24
|
currentEffect: any;
|
|
25
|
-
slotTable: TextureSlotTable | undefined;
|
|
26
25
|
/** @type {{view: GPUTextureView, sampler: GPUSampler}[]} indexed by slot */
|
|
27
26
|
segmentEntries: {
|
|
28
27
|
view: GPUTextureView;
|
|
@@ -64,5 +63,4 @@ export default class WebGPUQuadBatcher extends WebGPUBatcher {
|
|
|
64
63
|
override flush(topology: any): void;
|
|
65
64
|
}
|
|
66
65
|
import WebGPUBatcher from "./webgpu_batcher.js";
|
|
67
|
-
import { TextureSlotTable } from "../../gpu/textureslots.js";
|
|
68
66
|
//# sourceMappingURL=quad_batcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/quad_batcher.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/quad_batcher.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAyHjD;IAlFA,qBAA2B;IAM3B,mBAAyB;IASzB;;;OAGG;IACH,wCAcE;IAHC,eAAqB;IAIxB,4EAA4E;IAC5E;cADkB,cAAc;iBAAW,UAAU;oBAC7B;IAOxB;;;OAGG;IACH,iBAAuB;IACvB;;;OAGG;IACH,eAAqB;IACrB;;;OAGG;IACH,8BAAkB;IAElB,8CAAwB;IAIxB,wCAAwC;IACxC,sDAA+B;IAE/B,8CAAgC;IAChC,mCAAuB;IAQvB,0CAKE;IAKH;;;;;;;;;;;;;;;OAeG;IACH,iBAZW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,QAyEjB;IAED;;;;;;;;;;;OAWG;IACH,wBANW,MAAM,YACN,OAAO,GACL,MAAM,CAwDlB;IAED;;;;OAIG;IACH,+BAOC;IAED;;;;;;;;OAQG;IACH,uBAJa,YAAY,CAgCxB;IAED;;;;OAIG;IACH,qBAQC;IAED;;;;;OAKG;IACH,2BAGC;IAED;;;;;;;;;;OAUG;IACH,0HAgBC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,oBAVW,OAAO,0CAA0C,EAAE,OAAO,KAC1D,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,WACN,YAAY,cACZ,OAAO,QA0DjB;IAqBD;;OAEG;IACH,oCA6BC;IAED;;;;;;OAMG;IACH,8BAEC;IAED;;;;;;;OAOG;IACH,yBAJW,MAAM,QAwChB;CAwBD;0BApmByB,qBAAqB;iCAHd,2BAA2B"}
|
|
@@ -46,7 +46,6 @@ export default class WebGPUBatcher extends Batcher {
|
|
|
46
46
|
}[] | undefined;
|
|
47
47
|
stride: any;
|
|
48
48
|
vertexSize: number | undefined;
|
|
49
|
-
vertexData: VertexArrayBuffer | undefined;
|
|
50
49
|
/**
|
|
51
50
|
* per-draw refresh hook (pass-scoped state that `bind()` cannot own
|
|
52
51
|
* because `setBatcher` early-returns when already current)
|
|
@@ -66,5 +65,4 @@ export default class WebGPUBatcher extends Batcher {
|
|
|
66
65
|
recordDraw(pass: GPURenderPassEncoder, vertexCount: number): void;
|
|
67
66
|
}
|
|
68
67
|
import { Batcher } from "../../gpu/batcher.js";
|
|
69
|
-
import VertexArrayBuffer from "../../buffer/vertex.js";
|
|
70
68
|
//# sourceMappingURL=webgpu_batcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/webgpu_batcher.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,sBAHW,OAAO,uBAAuB,EAAE,OAAO,aACvC,MAAM,EAKhB;IAED;;;;;;;;OAQG;IACH,eAPW,OAAO,uBAAuB,EAAE,OAAO,aAE/C;QAA4B,UAAU;QACZ,SAAS;QACT,QAAQ;QACR,WAAW;KACvC,
|
|
1
|
+
{"version":3,"file":"webgpu_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/webgpu_batcher.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,sBAHW,OAAO,uBAAuB,EAAE,OAAO,aACvC,MAAM,EAKhB;IAED;;;;;;;;OAQG;IACH,eAPW,OAAO,uBAAuB,EAAE,OAAO,aAE/C;QAA4B,UAAU;QACZ,SAAS;QACT,QAAQ;QACR,WAAW;KACvC,QAyDA;IAtDA,8BAA6B;IAG5B,8BAAmC;IACnC,6BAAoD;IAKpD;;;;;oBAQE;IAEF,YAAsC;IACtC,+BAA8D;IAE9D;;;OAGG;IACH,0CAGC;IAuCH;;;OAGG;IACH,wBAAoB;IAEpB;;;OAGG;IACH,iBAFW,MAAM,QAuChB;IAED;;;;;OAKG;IACH,iBAHW,oBAAoB,eACpB,MAAM,QAIhB;CAeD;wBApL6C,sBAAsB;8BADtC,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/pipeline/cache.js"],"names":[],"mappings":"AA8BA;;;;;;;;GAQG;AACH,gCAAiC,CAAC,CAAC;AAEnC;;;;;;;;GAQG;AACH,mCAAoC,sBAAsB,CAAC;AA8E3D;;;;;;;;;;;;;GAaG;AACH;IA8KC;;;;OAIG;IACH,4BAAwB;IAlLxB;;;OAGG;IACH,oBAHW,SAAS,UACT,MAAM,EAyKhB;IAtKA,kBAAoB;IACpB,eAAoB;IACpB,oBAAoB;IACpB,6CAA6C;IAC7C,WADW,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CACf;IAC1B,kEAAkE;IAClE,eADW,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAChC;IAG9B,gCAaE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ACN,MAAM,sBACN,OAAO,gBACP,MAAM,cACN;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAC,GAM7F,iBAAiB,CAiE7B;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAXW,MAAM,aACN,MAAM,SACN,MAAM,OACN,OAAO,WACP,MAAM,aACN,MAAM,QACN,MAAM,GACJ,2BAA2B,CAgDvC;IAED;;;OAGG;IACH,cAEC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;OAIG;IACH,iCAA6B;IAE7B
|
|
1
|
+
{"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;OAIG;IACH,iCAA6B;IAE7B;;;;;;;;;OASG;IACH,sBATW,OAAO,uBAAuB,EAAE,OAAO,SACvC,MAAM,UACN,MAAM,WACN,MAAM,EAsBhB;IAdA,kDAAwB;IACxB;;;OAGG;IACH,eAFU,OAAO,CAEQ;IACzB,yBAAyB;IACzB,YADW,UAAU,CACC;IACtB;;;OAGG;IACH,QAFU,MAAM,CAEgC;IAIjD;;;;;;;;;;OAUG;IACH,eAJW,MAAM,UACN,MAAM,WACN,MAAM,QA0BhB;IAjBA,qBAAqB;IACrB,0BAAkB;IAClB,qBAAqB;IACrB,2BAAoB;IACpB;;;OAGG;IACH,+BAAwD;IAOxD,6BAA6B;IAC7B,iCAAwC;IAGzC;;;OAGG;IACH,cAFa,kBAAkB,CAI9B;CAaD;;sBA7GqB,4BAA4B"}
|
|
@@ -46,7 +46,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
46
46
|
* @readonly
|
|
47
47
|
*/
|
|
48
48
|
readonly preferredFormat: string | undefined;
|
|
49
|
-
cache: TextureCache;
|
|
50
49
|
currentTransform: Matrix3d;
|
|
51
50
|
onGameReset: () => void;
|
|
52
51
|
onCanvasResize: () => void;
|
|
@@ -67,39 +66,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
67
66
|
* @override
|
|
68
67
|
*/
|
|
69
68
|
override setViewport(x: number, y: number, width: number, height: number): void;
|
|
70
|
-
/**
|
|
71
|
-
* Capture the current frame — everything drawn to the active target so
|
|
72
|
-
* far — into a {@link Texture2d}, entirely on the GPU (an encoder-ordered
|
|
73
|
-
* `copyTextureToTexture`; no readback round-trip). Same contract as the
|
|
74
|
-
* WebGL backend's `toFrameTexture`: a shared, renderer-owned slot by
|
|
75
|
-
* default, `target: null` for a fresh caller-owned capture, or a prior
|
|
76
|
-
* capture as `target` to refresh it in place; `options.region` captures
|
|
77
|
-
* a sub-region (framebuffer pixels, bottom-left origin — converted to
|
|
78
|
-
* this backend's top-left copy origin internally).
|
|
79
|
-
*
|
|
80
|
-
* Two documented divergences from the GL capture:
|
|
81
|
-
* - alpha is preserved (the GL path captures into an opaque RGB texture)
|
|
82
|
-
* - row 0 of the capture is the TOP of the frame (matching `screen_uv`),
|
|
83
|
-
* where the GL capture is bottom-up — GLSL bodies sampling a capture
|
|
84
|
-
* flip with `1.0 - uv.y`; their WGSL twins must not.
|
|
85
|
-
* @param {object} [options]
|
|
86
|
-
* @param {Texture2d|null} [options.target] - omit for the shared renderer
|
|
87
|
-
* slot; a prior capture to refresh it in place; `null` to mint a fresh,
|
|
88
|
-
* caller-owned capture (`destroy()` it yourself when done)
|
|
89
|
-
* @param {Bounds|{x: number, y: number, width: number, height: number}} [options.region] - capture
|
|
90
|
-
* only this sub-region; defaults to the whole frame
|
|
91
|
-
* @returns {Texture2d|null} a GPU-resident texture holding the captured
|
|
92
|
-
* frame, or null when no device is available
|
|
93
|
-
*/
|
|
94
|
-
toFrameTexture(options?: {
|
|
95
|
-
target?: Texture2d | null;
|
|
96
|
-
region?: Bounds | {
|
|
97
|
-
x: number;
|
|
98
|
-
y: number;
|
|
99
|
-
width: number;
|
|
100
|
-
height: number;
|
|
101
|
-
} | undefined;
|
|
102
|
-
}): Texture2d | null;
|
|
103
69
|
/**
|
|
104
70
|
* Draw a pooled render target through an effect's pipeline as a
|
|
105
71
|
* screen-space quad — the compositing primitive of the post-effect
|
|
@@ -128,9 +94,8 @@ export default class WebGPURenderer extends Renderer {
|
|
|
128
94
|
* mask window only, which is the behavior masks actually promise.
|
|
129
95
|
* @param {Color|string} [color="#000000"] - css color
|
|
130
96
|
* @param {boolean} [opaque=false] - allow transparency or not
|
|
131
|
-
* @override
|
|
132
97
|
*/
|
|
133
|
-
|
|
98
|
+
clearColor(color?: Color | string, opaque?: boolean): void;
|
|
134
99
|
/**
|
|
135
100
|
* Erase the pixels in the given rectangular area by setting them to
|
|
136
101
|
* transparent black (rgba(0,0,0,0)).
|
|
@@ -138,9 +103,8 @@ export default class WebGPURenderer extends Renderer {
|
|
|
138
103
|
* @param {number} y - y axis of the coordinate for the rectangle starting point.
|
|
139
104
|
* @param {number} width - The rectangle's width.
|
|
140
105
|
* @param {number} height - The rectangle's height.
|
|
141
|
-
* @override
|
|
142
106
|
*/
|
|
143
|
-
|
|
107
|
+
clearRect(x: number, y: number, width: number, height: number): void;
|
|
144
108
|
/**
|
|
145
109
|
* Draw a TMX tile layer: WGSL-eligible layers (`renderMode ===
|
|
146
110
|
* "shader"`) draw through the GPU tile path — one quad per tileset,
|
|
@@ -357,23 +321,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
357
321
|
*/
|
|
358
322
|
createPattern(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame, repeat?: string): TextureAtlas;
|
|
359
323
|
savedBlendMode: string | undefined;
|
|
360
|
-
/**
|
|
361
|
-
* A mask limits rendering elements to the shape and position of the
|
|
362
|
-
* given mask object — realized on the stencil half of the pass's
|
|
363
|
-
* depth-stencil attachment, exactly like the GL backend: a write
|
|
364
|
-
* phase increments the stencil under the mask shape (color writes
|
|
365
|
-
* off), then the render phase only passes fragments where the stencil
|
|
366
|
-
* equals the current mask level (or 0 when inverted).
|
|
367
|
-
*
|
|
368
|
-
* Entering the first mask level clears the stencil, which WebGPU can
|
|
369
|
-
* only do at a pass boundary — the frame's pass is broken and
|
|
370
|
-
* restarted with `stencilLoadOp: "clear"` (color preserved).
|
|
371
|
-
* (Note: masks are not preserved through save/restore and need to be
|
|
372
|
-
* manually cleared, same as the other backends.)
|
|
373
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] - the shape defining the mask to be applied
|
|
374
|
-
* @param {boolean} [invert=false] - either the given shape should define what is visible (default) or the opposite
|
|
375
|
-
*/
|
|
376
|
-
setMask(mask?: Rect | RoundRect | Polygon | Line | Ellipse, invert?: boolean): void;
|
|
377
324
|
maskDepthWarned: boolean | undefined;
|
|
378
325
|
/**
|
|
379
326
|
* Stroke an arc at the specified coordinates with given radius, start and end points
|
|
@@ -510,17 +457,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
510
457
|
* add a straight line from the current point to the start of the current sub-path
|
|
511
458
|
*/
|
|
512
459
|
closePath(): void;
|
|
513
|
-
/**
|
|
514
|
-
* stroke the given shape or the current defined path
|
|
515
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds} [shape] - a shape object to stroke
|
|
516
|
-
* @param {boolean} [fill=false] - fill the shape with the current color if true
|
|
517
|
-
*/
|
|
518
|
-
stroke(shape?: Rect | RoundRect | Polygon | Line | Ellipse | Bounds, fill?: boolean): void;
|
|
519
|
-
/**
|
|
520
|
-
* fill the given shape or the current defined path
|
|
521
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds} [shape] - a shape object to fill
|
|
522
|
-
*/
|
|
523
|
-
fill(shape?: Rect | RoundRect | Polygon | Line | Ellipse | Bounds): void;
|
|
524
460
|
/**
|
|
525
461
|
* Returns the WebGPU canvas context
|
|
526
462
|
* @returns {GPUCanvasContext} the WebGPU canvas context
|
|
@@ -528,18 +464,14 @@ export default class WebGPURenderer extends Renderer {
|
|
|
528
464
|
getContext(): GPUCanvasContext;
|
|
529
465
|
}
|
|
530
466
|
import Renderer from "../renderer.js";
|
|
531
|
-
import OrthogonalTMXLayerGPURenderer from "./renderers/tmxlayer/orthogonal.js";
|
|
532
|
-
import TextureCache from "../texture/cache.js";
|
|
533
467
|
import { Matrix3d } from "../../math/matrix3d.ts";
|
|
534
|
-
import
|
|
535
|
-
import WebGPUPipelineCache from "./pipeline/cache.js";
|
|
536
|
-
import WebGPUBufferArena from "./buffer/arena.js";
|
|
537
|
-
import WebGPUUniformRing from "./buffer/uniformring.js";
|
|
538
|
-
import WebGPUTextureStore from "./texture/store.js";
|
|
539
|
-
import WebGPURenderTarget from "../rendertarget/webgpurendertarget.js";
|
|
540
|
-
import BlendEffect from "../effects/blendEffect.js";
|
|
468
|
+
import type ShaderEffect from "../effects/shadereffect.js";
|
|
541
469
|
import { Color } from "../../math/color.ts";
|
|
542
470
|
import WebGPUBatcher from "./batchers/webgpu_batcher.js";
|
|
471
|
+
import type { Matrix2d } from "../../math/matrix2d.ts";
|
|
472
|
+
import type Light2d from "../../lighting/light2d.ts";
|
|
543
473
|
import RadialGradientEffect from "../effects/radialGradient.js";
|
|
544
474
|
import { TextureAtlas } from "../texture/atlas.js";
|
|
475
|
+
import type { Polygon } from "../../geometries/polygon.ts";
|
|
476
|
+
import type { ApplicationSettings } from "../../application/settings.ts";
|
|
545
477
|
//# sourceMappingURL=webgpu_renderer.d.ts.map
|