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
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export default class TintPulseEffect extends ShaderEffect {
|
|
19
19
|
/**
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {Renderer} 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: Renderer, options?: {
|
|
27
27
|
color?: number[] | undefined;
|
|
28
28
|
speed?: number | undefined;
|
|
29
29
|
intensity?: number | undefined;
|
|
@@ -40,4 +40,5 @@ export default class TintPulseEffect extends ShaderEffect {
|
|
|
40
40
|
setColor(color: number[]): void;
|
|
41
41
|
}
|
|
42
42
|
import ShaderEffect from "./shadereffect.js";
|
|
43
|
+
import type Renderer from "../renderer.js";
|
|
43
44
|
//# sourceMappingURL=tintPulse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tintPulse.d.ts","sourceRoot":"","sources":["../../../src/video/effects/tintPulse.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tintPulse.d.ts","sourceRoot":"","sources":["../../../src/video/effects/tintPulse.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;;;;OAMG;IACH,sBANW,QAAQ,YAEhB;QAA2B,KAAK;QACP,KAAK;QACL,SAAS;KACpC,EAqBA;IAED;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;CACD;yBAxFwB,mBAAmB;0BAOnB,gBAAgB"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export namespace CURVES {
|
|
2
|
+
namespace reinhard {
|
|
3
|
+
let glsl: string;
|
|
4
|
+
let wgsl: string;
|
|
5
|
+
function fn(c: number): number;
|
|
6
|
+
}
|
|
7
|
+
namespace aces {
|
|
8
|
+
let glsl_1: string;
|
|
9
|
+
export { glsl_1 as glsl };
|
|
10
|
+
let wgsl_1: string;
|
|
11
|
+
export { wgsl_1 as wgsl };
|
|
12
|
+
export function fn_1(c: number): number;
|
|
13
|
+
export { fn_1 as fn };
|
|
14
|
+
}
|
|
15
|
+
namespace exponential {
|
|
16
|
+
let glsl_2: string;
|
|
17
|
+
export { glsl_2 as glsl };
|
|
18
|
+
let wgsl_2: string;
|
|
19
|
+
export { wgsl_2 as wgsl };
|
|
20
|
+
export function fn_2(c: number): number;
|
|
21
|
+
export { fn_2 as fn };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A shader effect that tone maps what it is applied to: values are lifted by
|
|
26
|
+
* `exposure` and brought back into display range by a curve, instead of
|
|
27
|
+
* clipping flat at white.
|
|
28
|
+
*
|
|
29
|
+
* Put it on the CAMERA, and put it LAST — after {@link BloomEffect}, so the
|
|
30
|
+
* light bloom spreads is mapped along with everything else rather than
|
|
31
|
+
* clipping where the two overlap.
|
|
32
|
+
*
|
|
33
|
+
* Three curves, chosen once at construction:
|
|
34
|
+
*
|
|
35
|
+
* | `mode` | character |
|
|
36
|
+
* |---|---|
|
|
37
|
+
* | `"aces"` | filmic: more midtone contrast, long shoulder. The default. Clamps internally, so it cannot feed `hdrOutput` |
|
|
38
|
+
* | `"reinhard"` | gentle and neutral, desaturates highlights as they climb |
|
|
39
|
+
* | `"exponential"` | channels saturate separately, so a hot core shifts toward white through its own hue |
|
|
40
|
+
*
|
|
41
|
+
* **Without `hdr: true` it is a grade, not a colour-managed pipeline.** The
|
|
42
|
+
* default render targets are `RGBA8`, so the frame reaching this is already
|
|
43
|
+
* clamped to `[0, 1]` and `exposure` is what gives the curve something to
|
|
44
|
+
* work on. With the `hdr` application setting on, the targets are half-float
|
|
45
|
+
* and the values arriving are genuinely above 1, which is what the curve is
|
|
46
|
+
* for. Either way it does not convert linear to sRGB, because nothing
|
|
47
|
+
* linearized it.
|
|
48
|
+
* @category Effects
|
|
49
|
+
* @see {@link Renderable#addPostEffect} for usage
|
|
50
|
+
* @example
|
|
51
|
+
* // the usual pairing: spread the bright parts, then map the result
|
|
52
|
+
* game.viewport.addPostEffect(new BloomEffect(renderer));
|
|
53
|
+
* game.viewport.addPostEffect(new ToneMappingEffect(renderer, { exposure: 1.6 }));
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* // a hot core that shifts through its own colour on the way to white
|
|
57
|
+
* const grade = new ToneMappingEffect(renderer, {
|
|
58
|
+
* mode: "exponential",
|
|
59
|
+
* exposure: 2.2,
|
|
60
|
+
* });
|
|
61
|
+
* game.viewport.addPostEffect(grade);
|
|
62
|
+
* // and dip it for a moment when the player is hit
|
|
63
|
+
* grade.setExposure(0.7);
|
|
64
|
+
*/
|
|
65
|
+
export default class ToneMappingEffect extends ShaderEffect {
|
|
66
|
+
/**
|
|
67
|
+
* @param {Renderer} renderer - the current renderer instance
|
|
68
|
+
* @param {object} [options] - effect options
|
|
69
|
+
* @param {string} [options.mode="aces"] - curve: `"aces"`, `"reinhard"` or `"exponential"`
|
|
70
|
+
* @param {number} [options.exposure=1.0] - multiplier applied before the curve; above `1` lifts the image into the curve's shoulder
|
|
71
|
+
* @param {number} [options.white] - the post-exposure value that should come out as display white. Omitted, the curve keeps its own shoulder and nothing reaches 1 exactly
|
|
72
|
+
* @throws {Error} on an unknown `mode`, or a non-finite `exposure` or `white`
|
|
73
|
+
*/
|
|
74
|
+
constructor(renderer: Renderer, options?: {
|
|
75
|
+
mode?: string | undefined;
|
|
76
|
+
exposure?: number | undefined;
|
|
77
|
+
white?: number | undefined;
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* which curve this instance baked, for reading back
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
readonly mode: string;
|
|
85
|
+
/**
|
|
86
|
+
* The post-exposure value that comes out as display white, or `0`
|
|
87
|
+
* when the curve is left with its own shoulder.
|
|
88
|
+
* @type {number}
|
|
89
|
+
* @readonly
|
|
90
|
+
*/
|
|
91
|
+
readonly white: number;
|
|
92
|
+
/**
|
|
93
|
+
* Set the white point: the value that should come out as display white.
|
|
94
|
+
*
|
|
95
|
+
* This is the knob a "brightness" or "peak" slider in a settings screen
|
|
96
|
+
* drives. Without it a tone curve only approaches 1 asymptotically, so
|
|
97
|
+
* nothing in the frame is ever quite white and a player who wants a
|
|
98
|
+
* brighter picture can only raise `exposure`, which lifts the midtones
|
|
99
|
+
* with it. A white point moves where the shoulder lands instead.
|
|
100
|
+
*
|
|
101
|
+
* Implemented as a scale rather than a reshaped curve: the value is run
|
|
102
|
+
* through the same curve on the CPU and the shader multiplies by its
|
|
103
|
+
* reciprocal, so `white` maps to exactly 1 and everything under it keeps
|
|
104
|
+
* the curve's shape. Values above it clip, which is what "white point"
|
|
105
|
+
* means.
|
|
106
|
+
* @param {number} white - the value to map to white; `0` or less restores the curve's own shoulder
|
|
107
|
+
* @throws {Error} if `white` is not a finite number
|
|
108
|
+
*/
|
|
109
|
+
setWhite(white: number): void;
|
|
110
|
+
/**
|
|
111
|
+
* set the exposure. Cheap, and safe to drive per frame: it is a uniform,
|
|
112
|
+
* so changing it does not rebuild the program the way `mode` would.
|
|
113
|
+
* @param {number} exposure - multiplier applied before the curve; `0` maps everything to black
|
|
114
|
+
* @throws {Error} if `exposure` is not a finite number
|
|
115
|
+
*/
|
|
116
|
+
setExposure(exposure: number): void;
|
|
117
|
+
exposure: number | undefined;
|
|
118
|
+
}
|
|
119
|
+
import ShaderEffect from "./shadereffect.js";
|
|
120
|
+
import type Renderer from "../renderer.js";
|
|
121
|
+
//# sourceMappingURL=tonemap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tonemap.d.ts","sourceRoot":"","sources":["../../../src/video/effects/tonemap.js"],"names":[],"mappings":";;;;QAwEM,eAHO,MAAM,GACJ,MAAM,CAIlB;;;;;;;QAkBG,wBADQ,MAAM,GAA0B,MAAM,CAMjD;;;;;;;;QAWG,wBADQ,MAAM,GAA0B,MAAM,CAGjD;;;;AA6FH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH;IACC;;;;;;;OAOG;IACH,sBAPW,QAAQ,YAEhB;QAAyB,IAAI;QACJ,QAAQ;QACR,KAAK;KAC9B,EAuCF;IAhBA;;;;OAIG;IACH,eAHU,MAAM,CAGA;IAGhB;;;;;OAKG;IACH,gBAHU,MAAM,CAGF;IAIf;;;;;;;;;;;;;;;;OAgBG;IACH,gBAHW,MAAM,QAUhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,QAOhB;IAFA,6BAAqC;CAGtC;yBAzUwB,mBAAmB;0BAOnB,gBAAgB"}
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export default class VignetteEffect extends ShaderEffect {
|
|
18
18
|
/**
|
|
19
|
-
* @param {
|
|
19
|
+
* @param {Renderer} 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: Renderer, options?: {
|
|
25
25
|
strength?: number | undefined;
|
|
26
26
|
size?: number | undefined;
|
|
27
27
|
});
|
|
@@ -39,4 +39,5 @@ export default class VignetteEffect extends ShaderEffect {
|
|
|
39
39
|
setSize(size: number): void;
|
|
40
40
|
}
|
|
41
41
|
import ShaderEffect from "./shadereffect.js";
|
|
42
|
+
import type Renderer from "../renderer.js";
|
|
42
43
|
//# sourceMappingURL=vignette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vignette.d.ts","sourceRoot":"","sources":["../../../src/video/effects/vignette.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vignette.d.ts","sourceRoot":"","sources":["../../../src/video/effects/vignette.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAAyB,QAAQ;QACR,IAAI;KAC/B,EASA;IALA,iBAAwC;IACxC,aAAgC;IAMjC;;;OAGG;IACH,sBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,cAFW,MAAM,QAKhB;CACD;yBAtFwB,mBAAmB;0BAOnB,gBAAgB"}
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export default class WaveEffect extends ShaderEffect {
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {Renderer} 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: Renderer, options?: {
|
|
22
22
|
amplitude?: number | undefined;
|
|
23
23
|
frequency?: number | undefined;
|
|
24
24
|
speed?: number | undefined;
|
|
@@ -40,4 +40,5 @@ export default class WaveEffect extends ShaderEffect {
|
|
|
40
40
|
setFrequency(frequency: number): void;
|
|
41
41
|
}
|
|
42
42
|
import ShaderEffect from "./shadereffect.js";
|
|
43
|
+
import type Renderer from "../renderer.js";
|
|
43
44
|
//# sourceMappingURL=wave.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../../src/video/effects/wave.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../../src/video/effects/wave.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH;IACC;;;;;;OAMG;IACH,sBANW,QAAQ,YAEhB;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;yBA5FwB,mBAAmB;0BAOnB,gBAAgB"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* additional import for TypeScript
|
|
3
|
+
* @import {VertexScalar} from "./vertexformat.ts";
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* Backend-neutral vertex attribute formats.
|
|
3
7
|
*
|
|
@@ -18,6 +22,10 @@
|
|
|
18
22
|
* import it without pulling in the WebGL layer.
|
|
19
23
|
* @see {@link Batcher#addAttribute}
|
|
20
24
|
*/
|
|
25
|
+
/**
|
|
26
|
+
* The scalar component type underlying a {@link VertexFormat}.
|
|
27
|
+
*/
|
|
28
|
+
export type VertexScalar = "float32" | "uint8" | "sint8" | "unorm8" | "snorm8" | "uint16" | "sint16" | "unorm16" | "snorm16" | "uint32" | "sint32";
|
|
21
29
|
/**
|
|
22
30
|
* A vertex attribute format: component type and count.
|
|
23
31
|
*
|
|
@@ -28,6 +36,24 @@
|
|
|
28
36
|
* indefinitely.
|
|
29
37
|
*/
|
|
30
38
|
export type VertexFormat = "float32" | "float32x2" | "float32x3" | "float32x4" | "uint8" | "uint8x2" | "uint8x4" | "sint8" | "sint8x2" | "sint8x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "sint16" | "sint16x2" | "sint16x4" | "unorm16" | "unorm16x2" | "unorm16x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4";
|
|
39
|
+
/**
|
|
40
|
+
* What a {@link VertexFormat} resolves to.
|
|
41
|
+
*
|
|
42
|
+
* Public, because the exported `resolveVertexFormat()` returns it. Marked
|
|
43
|
+
* internal it was stripped from the declarations while that public signature
|
|
44
|
+
* kept naming it, which left the name unresolved and quietly turned the
|
|
45
|
+
* function's return type into `any` for every consumer.
|
|
46
|
+
*/
|
|
47
|
+
export interface VertexFormatInfo {
|
|
48
|
+
/** number of components (1, 2, 3 or 4) */
|
|
49
|
+
components: 1 | 2 | 3 | 4;
|
|
50
|
+
/** total size of the attribute in bytes */
|
|
51
|
+
bytes: number;
|
|
52
|
+
/** whether integer values are scaled into `[0, 1]` / `[-1, 1]` when read by a shader */
|
|
53
|
+
normalized: boolean;
|
|
54
|
+
/** the underlying scalar type */
|
|
55
|
+
scalar: VertexScalar;
|
|
56
|
+
}
|
|
31
57
|
/**
|
|
32
58
|
* Whether a value is a supported vertex format name.
|
|
33
59
|
* @param value - the value to test
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertexformat.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/vertexformat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"vertexformat.d.ts","sourceRoot":"","sources":["../../../src/video/gpu/vertexformat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GACrB,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AAEZ;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAErB,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GAEX,OAAO,GACP,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GAET,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GAEV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GAEV,SAAS,GACT,WAAW,GACX,WAAW,GACX,SAAS,GACT,WAAW,GACX,WAAW,GAEX,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAChC,0CAA0C;IAC1C,UAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,UAAU,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,MAAM,EAAE,YAAY,CAAC;CACrB;AAkHD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,gBAAgB,CAS1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/video/gradient.js"],"names":[],"mappings":"AAmCA;;;;GAIG;AACH;IACC;;;OAGG;IACH,kBAHW,QAAQ,GAAC,QAAQ,UACjB,MAAM,EAAE,EA8DlB;IA3DA;;;OAGG;IACH;;;OAGG;IACH,YAA2B;IAE3B,0BAAgB;IAEhB;;;;;OAKG;IACH,QAJU,MAAM,EAAE,CAIE;IAEpB;;;;;OAKG;IACH,YAJU,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAI5B;IAEpB;;;;;OAKG;IACH,iBAJU,cAAc,GAAC,SAAS,CAIF;IAEhC;;;;;OAKG;IACH,eAJU,kBAAkB,GAAC,SAAS,CAIR;IAE9B;;;;;OAKG;IACH,QAJU,OAAO,CAIC;IAElB;;;;;OAKG;IACH,cAJU;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAC,EAAE,GAAC,IAAI,CAIvB;IAGzB;;;;;;;;;OASG;IACH,qBARW,MAAM,SACN,KAAK,GAAC,MAAM,GACV,QAAQ,CA0BpB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,0BAVW,wBAAwB,GACtB,cAAc,CAuC1B;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mBATW,
|
|
1
|
+
{"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/video/gradient.js"],"names":[],"mappings":"AAmCA;;;;GAIG;AACH;IACC;;;OAGG;IACH,kBAHW,QAAQ,GAAC,QAAQ,UACjB,MAAM,EAAE,EA8DlB;IA3DA;;;OAGG;IACH;;;OAGG;IACH,YAA2B;IAE3B,0BAAgB;IAEhB;;;;;OAKG;IACH,QAJU,MAAM,EAAE,CAIE;IAEpB;;;;;OAKG;IACH,YAJU,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAI5B;IAEpB;;;;;OAKG;IACH,iBAJU,cAAc,GAAC,SAAS,CAIF;IAEhC;;;;;OAKG;IACH,eAJU,kBAAkB,GAAC,SAAS,CAIR;IAE9B;;;;;OAKG;IACH,QAJU,OAAO,CAIC;IAElB;;;;;OAKG;IACH,cAJU;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAC,EAAE,GAAC,IAAI,CAIvB;IAGzB;;;;;;;;;OASG;IACH,qBARW,MAAM,SACN,KAAK,GAAC,MAAM,GACV,QAAQ,CA0BpB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,0BAVW,wBAAwB,GACtB,cAAc,CAuC1B;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mBATW,QAAQ,KACR,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,GACJ;QAAC,MAAM,EAAE,iBAAiB,GAAC,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAyFtF;IAED;;;;;;;;;;;OAWG;IACH,qBATW,MAAM,OACN,KAAK,GACH,KAAK,CA+CjB;IAED;;;;OAIG;IACH,0BAWC;IAED;;OAEG;IACH,gBAOC;CACD;+BAvX8B,sCAAsC;2BAF7C,kBAAkB"}
|
|
@@ -104,6 +104,42 @@ declare class Renderer {
|
|
|
104
104
|
* @default false
|
|
105
105
|
*/
|
|
106
106
|
supportsShaderTileLayers: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the effect chain is carrying color values above 1 instead
|
|
109
|
+
* of clamping at every write. This is what the `hdr` application
|
|
110
|
+
* setting asked for and what it actually GOT: a GPU backend sets it
|
|
111
|
+
* when the setting is on and the driver can honour it, and leaves it
|
|
112
|
+
* `false` when either is missing. `false` always on the base/Canvas
|
|
113
|
+
* renderer, which has no render targets.
|
|
114
|
+
*
|
|
115
|
+
* Branch on this rather than on `settings.hdr` when a grade depends
|
|
116
|
+
* on it, because a look tuned for headroom applied to a chain that
|
|
117
|
+
* clamps is not a lesser version of that look, it is a dark picture.
|
|
118
|
+
*
|
|
119
|
+
* **Headroom through the chain, not HDR output.** The frame is
|
|
120
|
+
* presented in SDR by default, so anything still above 1 clamps on
|
|
121
|
+
* the final blit; what this buys is that nothing clamped BEFORE
|
|
122
|
+
* then, which is what makes a bloom threshold and a tone curve
|
|
123
|
+
* meaningful. To remove that last clamp as well, see
|
|
124
|
+
* {@link Renderer#supportsHDROutput} and the `hdrOutput` setting.
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
supportsHDR: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the frame is PRESENTED in the display's full dynamic range
|
|
131
|
+
* rather than clamped to SDR on the way to the screen.
|
|
132
|
+
*
|
|
133
|
+
* The difference from {@link Renderer#supportsHDR}: that one is
|
|
134
|
+
* headroom through the effect chain, which still ends in a clamp;
|
|
135
|
+
* this one removes that clamp. Granted, not supported, and expect it
|
|
136
|
+
* to differ per backend on the same machine — only the WebGPU
|
|
137
|
+
* backend can do it, because the WebGL2 equivalent is an unapproved
|
|
138
|
+
* specification change no browser implements.
|
|
139
|
+
* @type {boolean}
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
supportsHDROutput: boolean;
|
|
107
143
|
/**
|
|
108
144
|
* Whether this renderer backend can keep mesh geometry resident on the
|
|
109
145
|
* GPU, letting a mesh supply a model matrix instead of vertices it has
|
|
@@ -543,6 +579,65 @@ declare class Renderer {
|
|
|
543
579
|
* @param {boolean} [enable=false]
|
|
544
580
|
*/
|
|
545
581
|
setAntiAlias(enable?: boolean): void;
|
|
582
|
+
/**
|
|
583
|
+
* Set the tone curve applied at the end of the camera's chain.
|
|
584
|
+
*
|
|
585
|
+
* The settings-screen entry point: a game can drive this straight from an
|
|
586
|
+
* options menu, and the cheap half is genuinely cheap. Changing `mode`
|
|
587
|
+
* rebuilds one shader, because the curve is baked into it; changing
|
|
588
|
+
* `exposure` or `white` is a uniform write, so either can be driven per
|
|
589
|
+
* frame (dipping exposure when the player is hit, say).
|
|
590
|
+
*
|
|
591
|
+
* **A curve is a look decision, not a companion to `hdr`.** Every curve
|
|
592
|
+
* maps 1 to less than 1, so switching one on will change a game whose art
|
|
593
|
+
* is authored against a clamp. Turn it on for art authored in linear
|
|
594
|
+
* light, or when you want a deliberate grade.
|
|
595
|
+
* @param {"none"|"aces"|"reinhard"|"exponential"} [mode="none"] - the curve, or `"none"` to remove it
|
|
596
|
+
* @param {object} [options] - curve parameters, each left as-is when omitted
|
|
597
|
+
* @param {number} [options.exposure] - multiplier applied before the curve
|
|
598
|
+
* @param {number} [options.white] - the post-exposure value to map to display white; `0` leaves the curve its own shoulder
|
|
599
|
+
* @throws {Error} on an unknown `mode`, or a non-finite `exposure` or `white`
|
|
600
|
+
* @example
|
|
601
|
+
* // straight from a settings screen
|
|
602
|
+
* renderer.setToneMapping(settings.curve, {
|
|
603
|
+
* exposure: settings.brightness,
|
|
604
|
+
* white: settings.peak,
|
|
605
|
+
* });
|
|
606
|
+
*
|
|
607
|
+
* // and off again
|
|
608
|
+
* renderer.setToneMapping("none");
|
|
609
|
+
*/
|
|
610
|
+
setToneMapping(mode?: "none" | "aces" | "reinhard" | "exponential", options?: {
|
|
611
|
+
exposure?: number | undefined;
|
|
612
|
+
white?: number | undefined;
|
|
613
|
+
}): void;
|
|
614
|
+
/**
|
|
615
|
+
* Turn the `hdrOutput` application setting on or off at runtime.
|
|
616
|
+
*
|
|
617
|
+
* Records the request. A backend that can honour it overrides this to
|
|
618
|
+
* reconfigure the surface it presents into; read
|
|
619
|
+
* {@link Renderer#supportsHDROutput} afterwards for what was granted,
|
|
620
|
+
* which on every backend but WebGPU is `false`.
|
|
621
|
+
* @param {boolean} [enable=false] - whether to present in the display's full range
|
|
622
|
+
*/
|
|
623
|
+
setHDROutput(enable?: boolean): void;
|
|
624
|
+
/**
|
|
625
|
+
* Turn the `hdr` application setting on or off at runtime.
|
|
626
|
+
*
|
|
627
|
+
* Records the request. A backend that can honour it overrides this to
|
|
628
|
+
* also move its render targets, so read {@link Renderer#supportsHDR}
|
|
629
|
+
* afterwards for what was actually granted — asking is not getting, and
|
|
630
|
+
* on this base renderer (and the Canvas one, which has no render targets)
|
|
631
|
+
* the answer is always `false`.
|
|
632
|
+
* @param {boolean} [enable=false] - whether the effect chain should carry
|
|
633
|
+
* values above 1
|
|
634
|
+
* @example
|
|
635
|
+
* renderer.setHDR(true);
|
|
636
|
+
* if (renderer.supportsHDR === false) {
|
|
637
|
+
* // this driver refused: grade for a chain that clamps instead
|
|
638
|
+
* }
|
|
639
|
+
*/
|
|
640
|
+
setHDR(enable?: boolean): void;
|
|
546
641
|
/**
|
|
547
642
|
* Resolve the default texture filter **mode** for this renderer, decoupled
|
|
548
643
|
* from {@link Renderer#setAntiAlias} (which controls polygon-edge MSAA on GPU
|
|
@@ -572,15 +667,15 @@ declare class Renderer {
|
|
|
572
667
|
setProjection(matrix: Matrix3d): void;
|
|
573
668
|
/**
|
|
574
669
|
* stroke the given shape
|
|
575
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds} shape - a shape object to stroke
|
|
670
|
+
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds|Box3d|Sphere} [shape] - a shape object to stroke
|
|
576
671
|
* @param {boolean} [fill=false] - fill the shape with the current color if true
|
|
577
672
|
*/
|
|
578
|
-
stroke(shape
|
|
673
|
+
stroke(shape?: Rect | RoundRect | Polygon | Line | Ellipse | Bounds | Box3d | Sphere, fill?: boolean): void;
|
|
579
674
|
/**
|
|
580
675
|
* fill the given shape
|
|
581
|
-
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds} shape - a shape object to fill
|
|
676
|
+
* @param {Rect|RoundRect|Polygon|Line|Ellipse|Bounds|Box3d|Sphere} [shape] - a shape object to fill
|
|
582
677
|
*/
|
|
583
|
-
fill(shape
|
|
678
|
+
fill(shape?: Rect | RoundRect | Polygon | Line | Ellipse | Bounds | Box3d | Sphere): void;
|
|
584
679
|
/**
|
|
585
680
|
* tint the given image or canvas using the given color
|
|
586
681
|
* @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas} src - the source image to be tinted
|
|
@@ -798,7 +893,11 @@ declare class Renderer {
|
|
|
798
893
|
* NOTE the origin differs by backend: WebGL uses framebuffer coords
|
|
799
894
|
* (**bottom-left** origin), Canvas uses **top-left** — relevant under
|
|
800
895
|
* `video.AUTO`.
|
|
801
|
-
* @returns {Texture2d} a texture holding the captured frame
|
|
896
|
+
* @returns {Texture2d|null} a texture holding the captured frame, or `null`
|
|
897
|
+
* when the backend has no device to capture with. The WebGPU renderer
|
|
898
|
+
* returns null in that case and there is a spec pinning it, so this is the
|
|
899
|
+
* honest contract: declaring a bare `Texture2d` here had every caller
|
|
900
|
+
* skipping a check the implementation can require
|
|
802
901
|
* @example
|
|
803
902
|
* effect.setTexture("uScene", renderer.toFrameTexture());
|
|
804
903
|
*/
|
|
@@ -810,7 +909,7 @@ declare class Renderer {
|
|
|
810
909
|
width: number;
|
|
811
910
|
height: number;
|
|
812
911
|
} | undefined;
|
|
813
|
-
}): Texture2d;
|
|
912
|
+
}): Texture2d | null;
|
|
814
913
|
}
|
|
815
914
|
declare namespace Renderer {
|
|
816
915
|
let _whitePixel: any;
|
|
@@ -818,11 +917,13 @@ declare namespace Renderer {
|
|
|
818
917
|
export default Renderer;
|
|
819
918
|
import CanvasRenderTarget from "./rendertarget/canvasrendertarget.js";
|
|
820
919
|
import { Vector2d } from "../math/vector2d.ts";
|
|
821
|
-
import type
|
|
920
|
+
import type ShaderEffect from "./effects/shadereffect.js";
|
|
822
921
|
import Path2D from "./../geometries/path2d.ts";
|
|
922
|
+
import type Application from "../application/application.ts";
|
|
823
923
|
import { Color } from "./../math/color.ts";
|
|
824
924
|
import RenderState from "./renderstate.js";
|
|
825
925
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
926
|
+
import type Mesh from "../renderable/mesh.js";
|
|
826
927
|
import type { Rect } from "./../geometries/rectangle.ts";
|
|
827
928
|
import { Gradient } from "./gradient.js";
|
|
828
929
|
import type { Bounds } from "./../physics/bounds.ts";
|
|
@@ -830,5 +931,8 @@ import type { RoundRect } from "./../geometries/roundrect.ts";
|
|
|
830
931
|
import type { Polygon } from "../geometries/polygon.ts";
|
|
831
932
|
import type { Line } from "./../geometries/line.ts";
|
|
832
933
|
import type { Ellipse } from "./../geometries/ellipse.ts";
|
|
934
|
+
import type { Box3d } from "../geometries/box3d.ts";
|
|
935
|
+
import type { Sphere } from "../geometries/sphere.ts";
|
|
833
936
|
import type { default as Texture2d } from "./texture/texture2d.ts";
|
|
937
|
+
import type { ApplicationSettings } from "../application/settings.ts";
|
|
834
938
|
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"AAwCA;;;GAGG;AACH;IAs8BC;;;;;;;;;;;;OAYG;IACH,2BANW,MAAM,UACN,MAAM,0BACN,OAAO,GAEL,iBAAiB,GAAC,eAAe,CAI7C;IAED;;;;;;;;;;;;OAYG;IACH,wBAFa,iBAAiB,GAAC,eAAe,CAgB7C;IAj/BD;;OAEG;IACH,sBAFW,mBAAmB,EAmS7B;IAhSA;;;OAGG;IACH,cAFU,kBAAkB,CAS3B;IAED;;;;OAIG;IACH,iBAFU,MAAM,CAEO;IAEvB;;;;OAI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C7B,yBAAyB;6BACtB,4BAA4B;2BAX9B,wBAAwB;4BAGvB,yBAAyB;0CAUX,wBAAwB;yCAdzB,4BAA4B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Gradient} from "./gradient.js";
|
|
3
|
+
* @import ShaderEffect from "./effects/shadereffect.js";
|
|
3
4
|
*/
|
|
4
5
|
/**
|
|
5
6
|
* Renderer-agnostic state container with a pre-allocated save/restore stack.
|
|
@@ -88,4 +89,5 @@ export default class RenderState {
|
|
|
88
89
|
import { Color } from "./../math/color.ts";
|
|
89
90
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
90
91
|
import type { Gradient } from "./gradient.js";
|
|
92
|
+
import type ShaderEffect from "./effects/shadereffect.js";
|
|
91
93
|
//# sourceMappingURL=renderstate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH;;;;;;;GAOG;AACH;IAEE;;;OAGG;IACH,cAFU,KAAK,CAE4B;IAE3C;;;OAGG;IACH,aAFU,KAAK,CAEiC;IAEhD;;;OAGG;IACH,kBAFU,QAAQ,CAEoB;IAEtC;;;OAGG;IACH,gBAFU,UAAU,CAEmB;IAEvC;;;OAGG;IACH,iBAFU,QAAQ,GAAC,IAAI,CAEI;IAE3B;;;OAGG;IACH,UAFU,MAAM,EAAE,CAEA;IAElB;;;OAGG;IACH,kBAFU,MAAM,CAEc;IAE9B;;;OAGG;IACH,eAFU,YAAY,GAAC,SAAS,CAEF;IAE9B;;;;;;;;OAQG;IACH,cAFU,MAAM,CAEK;IAIrB;;;OAGG;IACH,uBAAwB;IAExB;;;;OAIG;IACH,oBAAoB;IAEpB;;;OAGG;IACH,qBAEE;IAEF;;;OAGG;IACH,oBAEE;IAEF;;;OAGG;IACH,yBAEE;IAEF;;;OAGG;IACH,yCAEE;IAEF;;;OAGG;IACH,sBAAoD;IAEpD;;;OAGG;IACH,wCAAyD;IAEzD;;;OAGG;IACH,sBAAoD;IAEpD;;;OAGG;IACH,mBAAiD;IAEjD;;;OAGG;IACH,oBAAkD;IAElD;;;OAGG;IACH,uCAAwD;IAGzD;;;OAGG;IACH,yBAFW,OAAO,QA0BjB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAFa,UAAU,GAAG,IAAI,CAQ7B;IAED;;;;;;;;OAQG;IACH,qBAJW,MAAM,gBACN,MAAM,GACJ;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CA0BhE;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAWhB;IAED;;;;OAIG;IACH,oBAoBC;CACD;sBAxSqB,oBAAoB;yBACjB,qBAAqB;8BAGnB,eAAe;8BACb,2BAA2B"}
|
|
@@ -68,13 +68,12 @@ declare class CanvasRenderTarget extends RenderTarget {
|
|
|
68
68
|
/**
|
|
69
69
|
* invalidate the current CanvasRenderTarget, and force a reupload of the corresponding texture
|
|
70
70
|
* (call this if you modify the canvas content between two draw calls)
|
|
71
|
-
* @param {
|
|
71
|
+
* @param {Renderer} renderer - the renderer to which this canvas texture is attached
|
|
72
72
|
*/
|
|
73
|
-
invalidate(renderer:
|
|
73
|
+
invalidate(renderer: Renderer): void;
|
|
74
74
|
glTextureUnit: any;
|
|
75
75
|
#private;
|
|
76
76
|
}
|
|
77
77
|
import RenderTarget from "./rendertarget.ts";
|
|
78
|
-
import type
|
|
79
|
-
import type WebGLRenderer from "./../webgl/webgl_renderer.js";
|
|
78
|
+
import type Renderer from "../renderer.js";
|
|
80
79
|
//# sourceMappingURL=canvasrendertarget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvasrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/canvasrendertarget.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"canvasrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/canvasrendertarget.js"],"names":[],"mappings":";AA8EA;;;;;;GAMG;AACH;IACC;;;;;;;;;OASG;IACH,mBATW,MAAM,UACN,MAAM,eAEd;QAA4B,OAAO;QACN,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAoCA;IAhCA;;;;;;;;;;;;;;;;;MAAkE;IASjE,YAA+B;IAUhC,aAA0D;IAGzD;;;;OAIG;IACH,cAHU,MAAM,CAGK;IAOvB;;;OAGG;IACH,4CAGC;IAUD;;;OAGG;IACH,sBAFW,OAAO,QAwBjB;IAYD;;;;;;;;OAQG;IACH,gBANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,GACJ,SAAS,CAUrB;IAoDD;;;;OAIG;IACH,qBAFW,QAAQ,QAsBlB;IAcC,mBAEC;IAeH;;;;;OAKG;IACH,mBAJW,QAAQ,QA0ClB;;CA2BD;yBA7XwB,mBAAmB;0BAMnB,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webglrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webglrendertarget.js"],"names":[],"mappings":"AA4EA;;;;;;;GAOG;AACH;IACC;;;;OAIG;IACH
|
|
1
|
+
{"version":3,"file":"webglrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webglrendertarget.js"],"names":[],"mappings":"AA4EA;;;;;;;GAOG;AACH;IACC;;;;OAIG;IACH;;;;;;;;;;;;;;;;;OAiBG;IACH,gBAjBW,qBAAqB,GAAC,sBAAsB,SAC5C,MAAM,UACN,MAAM,YAEd;QAAyB,OAAO;QAKP,MAAM;KAOjC,EA2EA;IAxEA,mDAAY;IAIZ;;;;OAIG;IACH,QAHU,MAAM,CAGwB;IAExC;;;OAGG;IACH,SAFU,MAAM,CAEmB;IAGnC;;;OAGG;IACH,uBAA0B;IAI1B,8BAAyC;IAWzC,sCAAiD;IAKhD,2CAA+C;IAC/C,4CAAgD;IA+BlD;;;;;;;;OAQG;IACH,qDAqBC;IAhBA,yCAAiC;IAkBlC;;;;;;;OAOG;IACH,kDAuBC;IAdA;;;OAGG;IACH,iCAAoC;IA0BrC;;;;OAIG;IACH,gBAqBC;CA4JD;yBA7bwB,mBAAmB"}
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
* through the shared {@link RenderTargetPool}.
|
|
5
5
|
*
|
|
6
6
|
* Owns one color `GPUTexture` (renderable AND sampleable — the whole point
|
|
7
|
-
* of a post-effect target)
|
|
8
|
-
* pipelines keyed on that format serve canvas and
|
|
7
|
+
* of a post-effect target). Its format is the renderer's preferred canvas
|
|
8
|
+
* format by default, so pipelines keyed on that format serve canvas and
|
|
9
|
+
* offscreen passes alike, and `"rgba16float"` for the camera chain under the
|
|
10
|
+
* `hdr` setting. The pipeline cache already keys on format, so both kinds
|
|
11
|
+
* coexist compiled.
|
|
9
12
|
* The depth-stencil attachment is NOT per-target: every pass shares the
|
|
10
13
|
* renderer's canvas-sized depth-stencil texture (targets in this flow are
|
|
11
14
|
* canvas-sized, only one pass is open at a time — and sharing the stencil
|
|
@@ -37,6 +40,19 @@ export default class WebGPURenderTarget extends RenderTarget {
|
|
|
37
40
|
* @type {number}
|
|
38
41
|
*/
|
|
39
42
|
sampleCount: number;
|
|
43
|
+
/**
|
|
44
|
+
* Texture format of the color attachment, defaulting to the surface's
|
|
45
|
+
* preferred format. The renderer passes `"rgba16float"` for the
|
|
46
|
+
* camera chain when the `hdr` setting is on, which is what lets the
|
|
47
|
+
* chain carry values above 1 instead of clamping at every write.
|
|
48
|
+
*
|
|
49
|
+
* Both halves take it, or the MSAA resolve has nothing to resolve
|
|
50
|
+
* between, and every pipeline recorded into a pass targeting this
|
|
51
|
+
* must declare the same one — `setRenderTarget` drives that through
|
|
52
|
+
* the pipeline cache, which already keys on format.
|
|
53
|
+
* @type {string}
|
|
54
|
+
*/
|
|
55
|
+
format: string;
|
|
40
56
|
/** @type {GPUTexture|null} */
|
|
41
57
|
texture: GPUTexture | null;
|
|
42
58
|
/** @type {GPUTextureView|null} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpurendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webgpurendertarget.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgpurendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webgpurendertarget.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACC;;;;OAIG;IACH,sBAJW,OAAO,8BAA8B,EAAE,OAAO,SAC9C,MAAM,UACN,MAAM,gBAmDhB;IA/CA,yDAAwB;IAGxB;;;;;;;OAOG;IACH,aAFU,MAAM,CAE2B;IAC3C;;;;;;;;;;;OAWG;IACH,QAFU,MAAM,CAEwC;IACxD,8BAA8B;IAC9B,SADW,UAAU,GAAC,IAAI,CACP;IACnB,kCAAkC;IAClC,WADW,cAAc,GAAC,IAAI,CACT;IACrB,iFAAiF;IACjF,aAD8D,UAAU,GAAC,IAAI,CACtD;IACvB,kCAAkC;IAClC,UADW,cAAc,GAAC,IAAI,CACV;IACpB;;;;OAIG;IACH,YAFU,MAAM,CAEG;IAGnB,uCAA6B;IAC7B,oCAAqC;IAErC,sBAAyB;IA+E1B;;;;;;;OAOG;IACH,wBAJa,YAAY,CAwBxB;IAED;;;;;OAKG;IACH,8BAIC;IAED;;;;;;;OAOG;IACH,eANW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,SAAS,CAAC,CA+F9B;CAqBD;yBA1VwB,mBAAmB"}
|
|
@@ -195,4 +195,5 @@ export class TextureAtlas extends Texture2d {
|
|
|
195
195
|
import Texture2d from "./texture2d.ts";
|
|
196
196
|
import Sprite from "./../../renderable/sprite.js";
|
|
197
197
|
import type NineSliceSprite from "./../../renderable/nineslicesprite.js";
|
|
198
|
+
import type { CompressedImage } from "../../loader/parsers/compressed_textures/compressed_image.js";
|
|
198
199
|
//# sourceMappingURL=atlas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AAuBA
|
|
1
|
+
{"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AAEH;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;EAoBC;AAED;;;;GAIG;AACH,+FAYC;AAED;;;;;;;;;;GAUG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,qBAjCW,MAAM,GAAC,MAAM,EAAE,QACf,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,eAAe,GAAC,MAAM,GAAC,eAAe,EAAE,GAAC,gBAAgB,EAAE,GAAC,iBAAiB,EAAE,GAAC,MAAM,EAAE,YAC3I,OAAO,GAAC,MAAM,EA6OxB;IAvMA;;;;OAIG;IACH,sBAAkB;IAElB;;;;;OAKG;IACH,uBAAwB;IAExB;;;;;;;OAOG;IACH,6BAA8B;IAE9B;;;;;OAKG;IACH,uBAAwB;IAExB;;;;;OAKG;IACH,2BAA4B;IAE5B;;;;OAIG;IACH;;;;;;MAA6D;IAW1D,YAA8C;IAgJlD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,CAQ9C;IAED;;;;;;OAMG;IACH,0BAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAAC,IAAI,CAU/E;IAED;;;;;;;;OAQG;IACH,gBAPW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;;OAKG;IACH,gBAJW,MAAM,UACN,MAAM,GACJ,MAAM,CAiBlB;IAED;;;;;;;OAOG;IACH,aANW,MAAM,GAAC,MAAM,OACb,MAAM,OACN,MAAM,OACN,MAAM,GACJ,YAAY,CAsCxB;IAED;;;;;;;OAOG;IACH,cANW,MAAM,QACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,YAAY,CA2BxB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,2BA1BW,MAAM,aACN,MAAM,cACN,OAAO,GACL,MAAM,GAAC,eAAe,CAqClC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,6BAnBW,MAAM,EAAE,GAAC,MAAM,EAAE,GAGf,MAAM,CAkFlB;IAED,2DAiDC;CACD;sBAltBqB,gBAAgB;mBANnB,8BAA8B;iCAuBjB,uCAAuC;qCACrC,8DAA8D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../src/video/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;OAIG;IACH,sBAJW,aAAa,SACb,MAAM,UACN,MAAM,
|
|
1
|
+
{"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../src/video/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;OAIG;IACH,sBAJW,aAAa,SACb,MAAM,UACN,MAAM,EAoChB;IAhCA;;;OAGG;IACH,yBAAyB;IACzB,qBAAqB;IACrB,OADW,MAAM,CACC;IAClB,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB;;;;OAIG;IACH,WAFU,YAAY,GAAC,IAAI,CAEN;IACrB;;;;;;;;;;OAUG;IACH,QAJU,MAAM,CAID;IACf;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAG1B;;;OAGG;IACH,cAFa,YAAY,CAIxB;CAiBD;AAED;;;;;;;;;;GAUG;AACH;IACC;;OAEG;IACH,oBAFW,iBAAiB,GAAC,eAAe,EAU3C;IANA,gDAAgD;IAChD,QADW,iBAAiB,GAAC,eAAe,CACxB;IACpB,qBAAqB;IACrB,OADW,MAAM,CACQ;IACzB,qBAAqB;IACrB,QADW,MAAM,CACU;IAG5B;;;OAGG;IACH,cAFa,iBAAiB,GAAC,eAAe,CAI7C;CACD;sBArHqB,gBAAgB"}
|