melonjs 19.9.0 → 20.0.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 +25 -14
- package/build/application/application.d.ts +70 -16
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +2 -2
- package/build/application/resize.d.ts.map +1 -1
- package/build/application/settings.d.ts +150 -53
- package/build/application/settings.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +1 -1
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/camera3d.d.ts +13 -11
- package/build/camera/camera3d.d.ts.map +1 -1
- package/build/const.d.ts +55 -26
- package/build/const.d.ts.map +1 -1
- package/build/geometries/box3d.d.ts +156 -0
- package/build/geometries/box3d.d.ts.map +1 -0
- package/build/index.d.ts +33 -23
- package/build/index.d.ts.map +1 -1
- package/build/index.js +21696 -7831
- package/build/index.js.map +4 -4
- package/build/lang/deprecated.d.ts +4 -4
- package/build/lang/deprecated.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +4 -0
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +42 -6
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/gltf/srgb.d.ts +20 -0
- package/build/level/gltf/srgb.d.ts.map +1 -0
- package/build/level/level.d.ts +21 -2
- package/build/level/level.d.ts.map +1 -1
- package/build/lighting/light3d.d.ts +61 -13
- package/build/lighting/light3d.d.ts.map +1 -1
- package/build/loader/loader.d.ts +49 -21
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/parsers/gltf.d.ts.map +1 -1
- package/build/loader/parsers/mtl.d.ts +18 -0
- package/build/loader/parsers/mtl.d.ts.map +1 -1
- package/build/loader/parsers/obj.d.ts +49 -0
- package/build/loader/parsers/obj.d.ts.map +1 -1
- package/build/loader/parsers/pbr.d.ts +63 -0
- package/build/loader/parsers/pbr.d.ts.map +1 -0
- package/build/loader/parsers/shader.d.ts +32 -24
- package/build/loader/parsers/shader.d.ts.map +1 -1
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +3 -1
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/adapter.d.ts +12 -1
- package/build/physics/adapter.d.ts.map +1 -1
- package/build/physics/broadphase/octree.d.ts +35 -0
- package/build/physics/broadphase/octree.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +123 -6
- 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 +12 -0
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/physics/builtin/raycast.d.ts.map +1 -1
- package/build/physics/builtin/sat3d.d.ts +59 -0
- package/build/physics/builtin/sat3d.d.ts.map +1 -0
- package/build/physics/response.d.ts +32 -0
- package/build/physics/response.d.ts.map +1 -1
- package/build/physics/world.d.ts +1 -0
- package/build/physics/world.d.ts.map +1 -1
- package/build/renderable/container.d.ts +1 -0
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts.map +1 -1
- package/build/renderable/groundshadow.d.ts +92 -0
- package/build/renderable/groundshadow.d.ts.map +1 -0
- package/build/renderable/instanced_mesh.d.ts +286 -0
- package/build/renderable/instanced_mesh.d.ts.map +1 -0
- package/build/renderable/mesh.d.ts +242 -23
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +6 -4
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +3 -1
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +17 -6
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/state/stage.d.ts.map +1 -1
- package/build/system/device.d.ts +11 -40
- package/build/system/device.d.ts.map +1 -1
- package/build/system/platform.d.ts +0 -16
- package/build/system/platform.d.ts.map +1 -1
- package/build/utils/utils.d.ts +2 -0
- package/build/utils/utils.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +22 -16
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/{webgl/effects → effects}/blur.d.ts +2 -2
- package/build/video/effects/blur.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/chromaticAberration.d.ts +2 -2
- package/build/video/effects/chromaticAberration.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/colorMatrix.d.ts +3 -3
- package/build/video/effects/colorMatrix.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/desaturate.d.ts +1 -1
- package/build/video/effects/desaturate.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/dissolve.d.ts +2 -2
- package/build/video/effects/dissolve.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/dropShadow.d.ts +2 -2
- package/build/video/effects/dropShadow.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/flash.d.ts +2 -2
- package/build/video/effects/flash.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/glow.d.ts +2 -2
- package/build/video/effects/glow.d.ts.map +1 -0
- package/build/video/effects/glsl_realization.d.ts +18 -0
- package/build/video/effects/glsl_realization.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/hologram.d.ts +2 -2
- package/build/video/effects/hologram.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/invert.d.ts +1 -1
- package/build/video/effects/invert.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/outline.d.ts +2 -2
- package/build/video/effects/outline.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/pixelate.d.ts +2 -2
- package/build/video/effects/pixelate.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/radialGradient.d.ts +3 -4
- package/build/video/effects/radialGradient.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/scanline.d.ts +2 -2
- package/build/video/effects/scanline.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/sepia.d.ts +1 -1
- package/build/video/effects/sepia.d.ts.map +1 -0
- package/build/video/{webgl → effects}/shadereffect.d.ts +133 -25
- package/build/video/effects/shadereffect.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/shine.d.ts +2 -2
- package/build/video/effects/shine.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/tintPulse.d.ts +2 -2
- package/build/video/effects/tintPulse.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/vignette.d.ts +2 -2
- package/build/video/effects/vignette.d.ts.map +1 -0
- package/build/video/{webgl/effects → effects}/wave.d.ts +2 -2
- package/build/video/effects/wave.d.ts.map +1 -0
- package/build/video/effects/wgsl/layout.d.ts +28 -0
- package/build/video/effects/wgsl/layout.d.ts.map +1 -0
- package/build/video/effects/wgsl/parse.d.ts +9 -0
- package/build/video/effects/wgsl/parse.d.ts.map +1 -0
- package/build/video/effects/wgsl/scaffold.d.ts +43 -0
- package/build/video/effects/wgsl/scaffold.d.ts.map +1 -0
- package/build/video/effects/wgsl_realization.d.ts +83 -0
- package/build/video/effects/wgsl_realization.d.ts.map +1 -0
- package/build/video/gpu/batcher.d.ts +71 -0
- package/build/video/gpu/batcher.d.ts.map +1 -0
- package/build/video/gpu/instancerecord.d.ts +164 -0
- package/build/video/gpu/instancerecord.d.ts.map +1 -0
- package/build/video/gpu/meshchunk.d.ts +49 -0
- package/build/video/gpu/meshchunk.d.ts.map +1 -0
- package/build/video/gpu/meshvertex.d.ts +54 -0
- package/build/video/gpu/meshvertex.d.ts.map +1 -0
- package/build/video/gpu/primitives.d.ts +60 -0
- package/build/video/gpu/primitives.d.ts.map +1 -0
- package/build/video/gpu/quadcorners.d.ts +11 -0
- package/build/video/gpu/quadcorners.d.ts.map +1 -0
- package/build/video/gpu/textureslots.d.ts +122 -0
- package/build/video/gpu/textureslots.d.ts.map +1 -0
- package/build/video/gpu/texturestore.d.ts +139 -0
- package/build/video/gpu/texturestore.d.ts.map +1 -0
- package/build/video/gpu/topology.d.ts +43 -0
- package/build/video/gpu/topology.d.ts.map +1 -0
- package/build/video/gpu/vertexformat.d.ts +72 -0
- package/build/video/gpu/vertexformat.d.ts.map +1 -0
- package/build/video/gradient.d.ts +14 -5
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/renderer.d.ts +153 -8
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +7 -6
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/render_target_pool.d.ts +2 -2
- package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
- package/build/video/rendertarget/webglrendertarget.d.ts +38 -2
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +83 -0
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -0
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +20 -2
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/texture/noise_texture2d.d.ts +2 -2
- package/build/video/utils/autodetect.d.ts.map +1 -1
- package/build/video/video.d.ts +1 -55
- package/build/video/video.d.ts.map +1 -1
- package/build/video/webgl/batchers/batcher.d.ts +132 -35
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +14 -0
- package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +63 -36
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +29 -20
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts +308 -14
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/primitive_batcher.d.ts +2 -2
- package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +0 -2
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +1 -1
- package/build/video/webgl/buffer/instance_buffer.d.ts +54 -0
- package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -0
- package/build/video/webgl/buffer/retained_geometry.d.ts +83 -0
- package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -0
- package/build/video/webgl/buffer/uniformblock.d.ts +81 -0
- package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -0
- package/build/video/webgl/buffer/vertexstate.d.ts +101 -0
- package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -0
- package/build/video/webgl/glshader.d.ts +101 -8
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/lighting/constants.d.ts +20 -8
- package/build/video/webgl/lighting/constants.d.ts.map +1 -1
- package/build/video/webgl/lighting/pack.d.ts +1 -1
- package/build/video/webgl/lighting/pack3d.d.ts +27 -11
- package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
- package/build/video/webgl/lighting/std140.d.ts +110 -0
- package/build/video/webgl/lighting/std140.d.ts.map +1 -0
- package/build/video/webgl/shaders/multitexture-lit.d.ts +7 -3
- package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
- package/build/video/webgl/texture/store.d.ts +52 -0
- package/build/video/webgl/texture/store.d.ts.map +1 -0
- package/build/video/webgl/utils/maxtextures.d.ts +37 -0
- package/build/video/webgl/utils/maxtextures.d.ts.map +1 -0
- package/build/video/webgl/utils/samplercache.d.ts +69 -0
- package/build/video/webgl/utils/samplercache.d.ts.map +1 -0
- package/build/video/webgl/utils/string.d.ts +16 -0
- package/build/video/webgl/utils/string.d.ts.map +1 -1
- package/build/video/webgl/utils/topology.d.ts +24 -0
- package/build/video/webgl/utils/topology.d.ts.map +1 -0
- package/build/video/webgl/utils/vertexformat.d.ts +27 -0
- package/build/video/webgl/utils/vertexformat.d.ts.map +1 -0
- package/build/video/webgl/webgl_renderer.d.ts +148 -30
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +40 -0
- package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -0
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +82 -0
- package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -0
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +301 -0
- package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -0
- package/build/video/webgpu/batchers/primitive_batcher.d.ts +39 -0
- package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -0
- package/build/video/webgpu/batchers/quad_batcher.d.ts +143 -0
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -0
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts +70 -0
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts.map +1 -0
- package/build/video/webgpu/buffer/arena.d.ts +64 -0
- package/build/video/webgpu/buffer/arena.d.ts.map +1 -0
- package/build/video/webgpu/buffer/instance_buffer.d.ts +65 -0
- package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -0
- package/build/video/webgpu/buffer/retained_geometry.d.ts +55 -0
- package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -0
- package/build/video/webgpu/buffer/uniformring.d.ts +68 -0
- package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -0
- package/build/video/webgpu/effect_binding.d.ts +17 -0
- package/build/video/webgpu/effect_binding.d.ts.map +1 -0
- package/build/video/webgpu/pipeline/bindgroups.d.ts +36 -0
- package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -0
- package/build/video/webgpu/pipeline/cache.d.ts +173 -0
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -0
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +90 -0
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -0
- package/build/video/webgpu/shaders/mesh-instanced.d.ts +60 -0
- package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -0
- package/build/video/webgpu/texture/compressed.d.ts +33 -0
- package/build/video/webgpu/texture/compressed.d.ts.map +1 -0
- package/build/video/webgpu/texture/frametexture.d.ts +65 -0
- package/build/video/webgpu/texture/frametexture.d.ts.map +1 -0
- package/build/video/webgpu/texture/store.d.ts +149 -0
- package/build/video/webgpu/texture/store.d.ts.map +1 -0
- package/build/video/webgpu/webgpu_renderer.d.ts +536 -0
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -0
- package/package.json +5 -5
- package/build/video/webgl/effects/blur.d.ts.map +0 -1
- package/build/video/webgl/effects/chromaticAberration.d.ts.map +0 -1
- package/build/video/webgl/effects/colorMatrix.d.ts.map +0 -1
- package/build/video/webgl/effects/desaturate.d.ts.map +0 -1
- package/build/video/webgl/effects/dissolve.d.ts.map +0 -1
- package/build/video/webgl/effects/dropShadow.d.ts.map +0 -1
- package/build/video/webgl/effects/flash.d.ts.map +0 -1
- package/build/video/webgl/effects/glow.d.ts.map +0 -1
- package/build/video/webgl/effects/hologram.d.ts.map +0 -1
- package/build/video/webgl/effects/invert.d.ts.map +0 -1
- package/build/video/webgl/effects/outline.d.ts.map +0 -1
- package/build/video/webgl/effects/pixelate.d.ts.map +0 -1
- package/build/video/webgl/effects/radialGradient.d.ts.map +0 -1
- package/build/video/webgl/effects/scanline.d.ts.map +0 -1
- package/build/video/webgl/effects/sepia.d.ts.map +0 -1
- package/build/video/webgl/effects/shine.d.ts.map +0 -1
- package/build/video/webgl/effects/tintPulse.d.ts.map +0 -1
- package/build/video/webgl/effects/vignette.d.ts.map +0 -1
- package/build/video/webgl/effects/wave.d.ts.map +0 -1
- package/build/video/webgl/shadereffect.d.ts.map +0 -1
|
@@ -4,7 +4,21 @@
|
|
|
4
4
|
* or from raw geometry data (vertices, uvs, indices).
|
|
5
5
|
* Includes a built-in perspective projection and supports 3D transforms
|
|
6
6
|
* through the standard Renderable API (`rotate`, `scale`, `translate`).
|
|
7
|
-
* Works on both
|
|
7
|
+
* Works on both GPU backends — WebGL 2 and WebGPU, with hardware depth
|
|
8
|
+
* testing — and on the Canvas renderer via the CPU-projected 2D-camera
|
|
9
|
+
* path (painter's algorithm, no depth buffer).
|
|
10
|
+
*
|
|
11
|
+
* **Retained rendering** — under a {@link Camera3d} on a GPU backend
|
|
12
|
+
* (`renderer.supportsRetainedMesh`), the mesh's model-space geometry is
|
|
13
|
+
* uploaded to GPU buffers **once** and every frame just draws it by
|
|
14
|
+
* reference: placement, camera, tint, alpha and emissive all ride
|
|
15
|
+
* per-draw uniforms, so moving, rotating, scaling or re-tinting a mesh
|
|
16
|
+
* never re-uploads geometry (near-zero per-frame allocation). Editing
|
|
17
|
+
* the geometry itself in place is still possible — signal it with
|
|
18
|
+
* {@link Mesh#needsUpdate} and the GPU copy refreshes on the next draw.
|
|
19
|
+
* Under a 2D camera (or on Canvas) the mesh instead re-projects its
|
|
20
|
+
* vertices on the CPU each frame — same API, the camera and backend
|
|
21
|
+
* decide the path.
|
|
8
22
|
*
|
|
9
23
|
* **Pivot — transforms are applied about the mesh's local origin `(0, 0, 0)`,
|
|
10
24
|
* NOT a normalized anchor point.** Unlike a {@link Sprite} (whose
|
|
@@ -26,12 +40,12 @@ export default class Mesh extends Renderable {
|
|
|
26
40
|
* @param {number} x - the x screen position of the mesh object
|
|
27
41
|
* @param {number} y - the y screen position of the mesh object
|
|
28
42
|
* @param {object} settings - Configuration parameters for the Mesh object
|
|
29
|
-
* @param {string} [settings.model] - name of a preloaded OBJ model (via loader.preload with type "obj")
|
|
43
|
+
* @param {string} [settings.model] - name of a preloaded OBJ model (via loader.preload with type "obj"). Vertex normals come with it — authored `vn` when the file has them, generated from face geometry when it does not — so an OBJ model can be `lit`.
|
|
30
44
|
* @param {Float32Array|number[]} [settings.vertices] - vertex positions as x,y,z triplets (alternative to settings.model)
|
|
31
45
|
* @param {Float32Array|number[]} [settings.uvs] - texture coordinates as u,v pairs (alternative to settings.model)
|
|
32
46
|
* @param {Uint16Array|number[]} [settings.indices] - triangle vertex indices (alternative to settings.model)
|
|
33
|
-
* @param {HTMLImageElement|TextureAtlas|string} [settings.texture] - the texture to apply (image name, HTMLImageElement, or TextureAtlas). If omitted and settings.material is provided, the texture is resolved from the MTL material's map_Kd.
|
|
34
|
-
* @param {string} [settings.material] - name of a preloaded MTL material (via loader.preload with type "mtl"). When provided, the diffuse texture (map_Kd), tint color (Kd), and opacity (d) are automatically applied.
|
|
47
|
+
* @param {HTMLImageElement|TextureAtlas|string} [settings.texture] - the texture to apply (image name, HTMLImageElement, or TextureAtlas). If omitted and settings.material is provided, the texture is resolved from the MTL material's map_Kd. Passing this pins ONE binding over the whole model, which on a multi-material model suppresses the per-material texture split — see {@link Mesh#textureGroups}.
|
|
48
|
+
* @param {string} [settings.material] - name of a preloaded MTL material (via loader.preload with type "mtl"). When provided, the diffuse texture (map_Kd), tint color (Kd), and opacity (d) are automatically applied. On a multi-material model each material's own `map_Kd` is bound for its own slice of the geometry (#1573) and each `Kd` is baked per-vertex, so one `Mesh` renders the whole model.
|
|
35
49
|
* @param {number} settings.width - display width in pixels. With normalization on (the default) the model is scaled to fit this size; with `normalize: false` this is the uniform pixels-per-unit scale applied to the raw geometry.
|
|
36
50
|
* @param {number} [settings.height] - display height in pixels (normalized models only; ignored when `normalize: false`)
|
|
37
51
|
* @param {boolean} [settings.cullBackFaces=true] - enable backface culling
|
|
@@ -39,9 +53,9 @@ export default class Mesh extends Renderable {
|
|
|
39
53
|
* @param {number} [settings.scale] - world-space scale (pixels per source unit) for the Camera3d path; defaults to `width`. Set this when `width`/`height` describe the renderable's world bounds (frustum culling) rather than the geometry scale — see {@link Mesh#meshScale}.
|
|
40
54
|
* @param {boolean} [settings.rightHanded=false] - treat the source as right-handed (Y-up, e.g. glTF) under the `Camera3d` world path. The default Y-up→Y-down bridge negates Y only (a reflection, which mirrors the scene left/right); `true` negates Y **and** Z (a rotation) so chirality is preserved and the result matches the authoring tool. See {@link Mesh#rightHanded}.
|
|
41
55
|
* @param {string} [settings.textureRepeat] - texture wrap mode (`"repeat"` / `"repeat-x"` / `"repeat-y"` / `"no-repeat"`) this mesh samples its texture with (per-mesh — it does not modify the shared texture, so other meshes/sprites using the same image are unaffected). Use `"repeat"` when the geometry's UVs fall outside the `[0, 1]` range and rely on the texture tiling (e.g. glTF assets, whose default sampler wrap is REPEAT) — otherwise the texture clamps to its edge texels and looks flat. Ignored for the white-pixel fallback. Note: REPEAT on a non-power-of-two texture requires WebGL 2.
|
|
42
|
-
* @param {string} [settings.textureFilter] - texture magnification filter (`"nearest"` for crisp pixel-art upscaling, `"linear"` for smooth) applied to the resolved texture. Omit to keep the renderer's global `antiAlias` default.
|
|
43
|
-
* @param {number} [settings.alphaCutoff=0] - alpha cutout threshold. Fragments whose final alpha is below this value are discarded (hard-edged cutout — foliage, fences, decals — with no blending or sorting). `0` disables the cutout. Set automatically by the glTF loader from a material's `alphaMode: "MASK"`.
|
|
44
|
-
* @param {number[]|Float32Array} [settings.emissive] - emissive (self-illumination) color `[r, g, b]` (0..1, may exceed 1 for HDR glow) added on top of the lit/unlit color so the surface glows regardless of scene lights (neon, lava, screens). Omit / all-zero for no emission. Set automatically by the glTF loader (`emissiveFactor`) and OBJ loader (MTL `Ke`).
|
|
56
|
+
* @param {string} [settings.textureFilter] - texture magnification filter (`"nearest"` for crisp pixel-art upscaling, `"linear"` for smooth) applied to the resolved texture. Omit to keep the renderer's global `antiAlias` default. On the mesh path, linear filtering also samples a generated mip chain with trilinear minification and 4× anisotropy (distant geometry stops shimmering) — `"nearest"` opts out, keeping crisp pixel-art models on hard level-0 sampling. GPU backends only (ignored by the Canvas renderer).
|
|
57
|
+
* @param {number} [settings.alphaCutoff=0] - alpha cutout threshold. Fragments whose final alpha is below this value are discarded (hard-edged cutout — foliage, fences, decals — with no blending or sorting). `0` disables the cutout. Set automatically by the glTF loader from a material's `alphaMode: "MASK"`. GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
|
|
58
|
+
* @param {number[]|Float32Array} [settings.emissive] - emissive (self-illumination) color `[r, g, b]` (0..1, may exceed 1 for HDR glow) added on top of the lit/unlit color so the surface glows regardless of scene lights (neon, lava, screens). Omit / all-zero for no emission. Set automatically by the glTF loader (`emissiveFactor`) and OBJ loader (MTL `Ke`). GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
|
|
45
59
|
* @example
|
|
46
60
|
* // create from OBJ + MTL (texture auto-resolved from material)
|
|
47
61
|
* let mesh = new me.Mesh(0, 0, {
|
|
@@ -122,7 +136,18 @@ export default class Mesh extends Renderable {
|
|
|
122
136
|
vertexCount: number;
|
|
123
137
|
_indicesOriginal: number[];
|
|
124
138
|
/**
|
|
125
|
-
* the projected vertex positions
|
|
139
|
+
* the projected vertex positions.
|
|
140
|
+
*
|
|
141
|
+
* **Not refreshed on the retained `Camera3d` path.** There, geometry is
|
|
142
|
+
* uploaded once in model space and placed by the GPU, so nothing
|
|
143
|
+
* projects vertices per frame and this array holds whatever it last
|
|
144
|
+
* did. It is still maintained by the Canvas renderer and by the 2D
|
|
145
|
+
* camera path. Engine consumers that need current world positions —
|
|
146
|
+
* {@link Mesh#getBounds3d}, {@link Mesh#toPolygon} — derive them on
|
|
147
|
+
* demand instead of reading this; user code should do the same.
|
|
148
|
+
*
|
|
149
|
+
* To edit geometry, write to {@link Mesh#originalVertices} and set
|
|
150
|
+
* {@link Mesh#needsUpdate}.
|
|
126
151
|
* @type {Float32Array}
|
|
127
152
|
*/
|
|
128
153
|
vertices: Float32Array;
|
|
@@ -139,7 +164,7 @@ export default class Mesh extends Renderable {
|
|
|
139
164
|
* from the scene's lights, using {@link Mesh#originalNormals}); when
|
|
140
165
|
* `false` (the default) it uses the lean unlit path and pays no lighting
|
|
141
166
|
* cost. The glTF loader sets this on scene meshes when the scene has
|
|
142
|
-
* lights. Only meaningful under a `Camera3d`
|
|
167
|
+
* lights. Only meaningful under a `Camera3d` on a GPU backend.
|
|
143
168
|
* @type {boolean}
|
|
144
169
|
* @default false
|
|
145
170
|
*/
|
|
@@ -150,7 +175,7 @@ export default class Mesh extends Renderable {
|
|
|
150
175
|
* decals) that needs no blending or back-to-front sorting. `0` (the
|
|
151
176
|
* default) disables the cutout and the mesh renders fully opaque. Set by
|
|
152
177
|
* the glTF loader from a material's `alphaMode: "MASK"` / `alphaCutoff`.
|
|
153
|
-
*
|
|
178
|
+
* GPU mesh path only (the Canvas renderer ignores it).
|
|
154
179
|
* @type {number}
|
|
155
180
|
* @default 0
|
|
156
181
|
*/
|
|
@@ -162,10 +187,107 @@ export default class Mesh extends Renderable {
|
|
|
162
187
|
* screens, glowing eyes). `undefined` (the default) means no emission and
|
|
163
188
|
* keeps the mesh on the lean path. Set by the glTF loader from a material's
|
|
164
189
|
* `emissiveFactor` (× `KHR_materials_emissive_strength`) and by the OBJ
|
|
165
|
-
* loader from an MTL's `Ke`.
|
|
190
|
+
* loader from an MTL's `Ke`. GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
|
|
166
191
|
* @type {Float32Array|undefined}
|
|
167
192
|
*/
|
|
168
193
|
emissive: Float32Array | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Specular (highlight) color as an `[r, g, b]` `Float32Array`, or
|
|
196
|
+
* `undefined` for a purely diffuse surface — which is the default, and
|
|
197
|
+
* what every mesh rendered as before this existed.
|
|
198
|
+
*
|
|
199
|
+
* Drives a Blinn-Phong highlight on the **lit** mesh path, so it needs
|
|
200
|
+
* `lit: true`, a `Light3d`, and normals. Set by the OBJ loader from an
|
|
201
|
+
* MTL's `Ks`; paired with {@link Mesh#shininess}, which decides how
|
|
202
|
+
* tight the highlight is. A `Ks` with no `Ns` produces nothing — the
|
|
203
|
+
* exponent is what turns the term on.
|
|
204
|
+
* @type {Float32Array|undefined}
|
|
205
|
+
* @see Mesh#shininess
|
|
206
|
+
*/
|
|
207
|
+
specular: Float32Array | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Specular exponent — how tight the highlight is. The MTL `Ns` range
|
|
210
|
+
* is 0..1000; higher is a smaller, harder highlight (polished metal),
|
|
211
|
+
* lower is a broad sheen (satin). `0` (the default) disables the
|
|
212
|
+
* specular term outright however bright {@link Mesh#specular} is, which
|
|
213
|
+
* is what keeps a material declaring neither on the diffuse-only path.
|
|
214
|
+
* @type {number}
|
|
215
|
+
* @default 0
|
|
216
|
+
*/
|
|
217
|
+
shininess: number;
|
|
218
|
+
/**
|
|
219
|
+
* Per-texel opacity map (MTL `map_d`), or `undefined`. Its red channel
|
|
220
|
+
* multiplies the fragment's alpha before {@link Mesh#alphaCutoff} is
|
|
221
|
+
* applied, so a single material can cut out per pixel — the shape of
|
|
222
|
+
* a leaf, the holes in a chain-link fence — where `alphaCutoff` alone
|
|
223
|
+
* can only threshold uniformly across the whole material.
|
|
224
|
+
*
|
|
225
|
+
* Only meaningful alongside a non-zero `alphaCutoff`: without one there
|
|
226
|
+
* is nothing to discard against. GPU mesh path only.
|
|
227
|
+
* @type {TextureAtlas|undefined}
|
|
228
|
+
*/
|
|
229
|
+
alphaMap: TextureAtlas | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* Cast a soft dark ellipse — a "blob" shadow — on the ground beneath
|
|
232
|
+
* this mesh (#1515).
|
|
233
|
+
*
|
|
234
|
+
* Not a simulated shadow, deliberately: what a 2.5D scene needs from
|
|
235
|
+
* one is *contact* — where the object is standing, and how far off the
|
|
236
|
+
* ground it is mid-jump. It costs one extra draw per shadowed object,
|
|
237
|
+
* shares one geometry and one texture with every other shadow in the
|
|
238
|
+
* scene, and is inert while `false`.
|
|
239
|
+
*
|
|
240
|
+
* Requires a GPU backend and a {@link Camera3d}: the shadow rides the
|
|
241
|
+
* retained world-space path, so the Canvas renderer and the 2D-camera
|
|
242
|
+
* path draw none.
|
|
243
|
+
*
|
|
244
|
+
* Left **unset** (`undefined`, the default) this follows the
|
|
245
|
+
* application's `castGroundShadow` setting — with one safeguard: a
|
|
246
|
+
* scene-wide opt-in skips meshes with no vertical extent, because a
|
|
247
|
+
* flat plane lying on the floor is the floor, and shadowing it with
|
|
248
|
+
* itself smears the whole ground. Setting the property here is an
|
|
249
|
+
* explicit instruction and always obeyed, safeguard included.
|
|
250
|
+
* @type {boolean|undefined}
|
|
251
|
+
* @default undefined
|
|
252
|
+
* @see Mesh#shadowGroundY
|
|
253
|
+
*/
|
|
254
|
+
castGroundShadow: boolean | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* World Y of the floor the shadow lands on, or `undefined` (the
|
|
257
|
+
* default) to mean "this object is standing on the ground" — the
|
|
258
|
+
* shadow sits at the object's own base, at full strength, and does not
|
|
259
|
+
* shrink or fade.
|
|
260
|
+
*
|
|
261
|
+
* Set it, and the shadow shrinks and fades as the object rises above
|
|
262
|
+
* it: the readable part of a jump. The game already knows this value
|
|
263
|
+
* from collision, which is why it is not derived — deriving it from the
|
|
264
|
+
* object's live bounds would make the "ground" jump with the jumper,
|
|
265
|
+
* so the height could never be anything but zero.
|
|
266
|
+
*
|
|
267
|
+
* Render space is Y-DOWN, so the floor is a **greater** Y than the
|
|
268
|
+
* object above it.
|
|
269
|
+
* @type {number|undefined}
|
|
270
|
+
* @default undefined
|
|
271
|
+
*/
|
|
272
|
+
shadowGroundY: number | undefined;
|
|
273
|
+
/**
|
|
274
|
+
* Opacity of the shadow directly beneath the object, before any
|
|
275
|
+
* height fade.
|
|
276
|
+
* @type {number}
|
|
277
|
+
* @default 0.45
|
|
278
|
+
*/
|
|
279
|
+
shadowOpacity: number;
|
|
280
|
+
/**
|
|
281
|
+
* Cached horizontal half-extent used to size the shadow, resolved on
|
|
282
|
+
* first shadowed draw. Cached because the alternative is a
|
|
283
|
+
* `getBounds3d()` per frame per shadow, which re-bounds every source
|
|
284
|
+
* vertex through the model matrix.
|
|
285
|
+
* @ignore
|
|
286
|
+
*/
|
|
287
|
+
_shadowHalfX: number;
|
|
288
|
+
_shadowHalfZ: number;
|
|
289
|
+
_shadowGeomVersion: number;
|
|
290
|
+
_shadowHasHeight: boolean;
|
|
169
291
|
/**
|
|
170
292
|
* whether to cull back-facing triangles
|
|
171
293
|
* @type {boolean}
|
|
@@ -211,7 +333,8 @@ export default class Mesh extends Renderable {
|
|
|
211
333
|
* runtime color multiplication, or rebuild the Mesh with
|
|
212
334
|
* new material settings.
|
|
213
335
|
* @type {Array<{materialName: string|null, start: number,
|
|
214
|
-
* count: number, tint: Color, opacity: number
|
|
336
|
+
* count: number, tint: Color, opacity: number,
|
|
337
|
+
* texture: TextureAtlas|undefined}>}
|
|
215
338
|
*/
|
|
216
339
|
groups: Array<{
|
|
217
340
|
materialName: string | null;
|
|
@@ -219,6 +342,7 @@ export default class Mesh extends Renderable {
|
|
|
219
342
|
count: number;
|
|
220
343
|
tint: Color;
|
|
221
344
|
opacity: number;
|
|
345
|
+
texture: TextureAtlas | undefined;
|
|
222
346
|
}>;
|
|
223
347
|
/**
|
|
224
348
|
* Per-vertex color buffer (one packed Uint32 per vertex)
|
|
@@ -241,6 +365,28 @@ export default class Mesh extends Renderable {
|
|
|
241
365
|
*/
|
|
242
366
|
vertexColors: Uint32Array;
|
|
243
367
|
texture: any;
|
|
368
|
+
/**
|
|
369
|
+
* Index ranges that each need their own diffuse texture bound, for a
|
|
370
|
+
* multi-material model whose materials carry different `map_Kd` maps
|
|
371
|
+
* (#1573) — `undefined` whenever one binding covers the whole mesh,
|
|
372
|
+
* which is every single-material model and every `Kd`-only one.
|
|
373
|
+
*
|
|
374
|
+
* The GPU backends draw one indexed range per entry instead of one
|
|
375
|
+
* range for the whole mesh; adjacent materials sharing a texture are
|
|
376
|
+
* already merged here, so the list is the minimum number of draws the
|
|
377
|
+
* model needs. An explicit `settings.texture` suppresses the split
|
|
378
|
+
* entirely — asking for one texture is asking for one texture.
|
|
379
|
+
*
|
|
380
|
+
* The Canvas renderer ignores this: a multi-material mesh takes its
|
|
381
|
+
* per-triangle solid-fill path there and never samples a texture at
|
|
382
|
+
* all.
|
|
383
|
+
* @type {Array<{texture: TextureAtlas, start: number, count: number}>|undefined}
|
|
384
|
+
*/
|
|
385
|
+
textureGroups: Array<{
|
|
386
|
+
texture: TextureAtlas;
|
|
387
|
+
start: number;
|
|
388
|
+
count: number;
|
|
389
|
+
}> | undefined;
|
|
244
390
|
/**
|
|
245
391
|
* Per-mesh texture wrap mode (`"repeat"` / `"repeat-x"` / `"repeat-y"`
|
|
246
392
|
* / `"no-repeat"`), or `undefined` to sample with the texture's own
|
|
@@ -274,6 +420,8 @@ export default class Mesh extends Renderable {
|
|
|
274
420
|
_hullPoints: Vector2d[];
|
|
275
421
|
/** @ignore */
|
|
276
422
|
_hullPolygon: Polygon | null;
|
|
423
|
+
/** @ignore */
|
|
424
|
+
_geometryVersion: number;
|
|
277
425
|
/**
|
|
278
426
|
* Project all vertices through projectionMatrix × currentTransform
|
|
279
427
|
* and store the results in `this.vertices`.
|
|
@@ -283,6 +431,40 @@ export default class Mesh extends Renderable {
|
|
|
283
431
|
* @ignore
|
|
284
432
|
*/
|
|
285
433
|
_projectVertices(offsetX?: number, offsetY?: number, zScale?: number): void;
|
|
434
|
+
/**
|
|
435
|
+
* Signal that this mesh's geometry itself has changed — its vertices, UVs,
|
|
436
|
+
* indices, normals or per-vertex colours were edited in place.
|
|
437
|
+
*
|
|
438
|
+
* Placement is *not* geometry: moving, rotating, scaling or re-tinting a
|
|
439
|
+
* mesh needs no signal, because those are applied when drawing rather than
|
|
440
|
+
* stored in the geometry. Only reach for this after writing into
|
|
441
|
+
* {@link Mesh#originalVertices} and friends directly.
|
|
442
|
+
* @type {boolean}
|
|
443
|
+
* @example
|
|
444
|
+
* // deform the mesh, then tell it the shape moved
|
|
445
|
+
* mesh.originalVertices[1] += 10;
|
|
446
|
+
* mesh.needsUpdate = true;
|
|
447
|
+
*/
|
|
448
|
+
set needsUpdate(value: any);
|
|
449
|
+
/**
|
|
450
|
+
* Compose this mesh's placement into a single matrix: where its model-space
|
|
451
|
+
* geometry sits in the world.
|
|
452
|
+
*
|
|
453
|
+
* This is the matrix form of {@link Mesh#_projectVerticesWorld} — the same
|
|
454
|
+
* transform, scale and axis bridge, expressed once instead of applied to
|
|
455
|
+
* every vertex:
|
|
456
|
+
*
|
|
457
|
+
* `translate(pos, depth) · scale(s, -s, ±s) · currentTransform`
|
|
458
|
+
*
|
|
459
|
+
* The Y negation bridges Y-up geometry to the engine's Y-down world; Z is
|
|
460
|
+
* negated too for right-handed (glTF) sources, which makes the bridge a
|
|
461
|
+
* rotation rather than a reflection and so preserves triangle winding.
|
|
462
|
+
* @returns {Matrix3d} the mesh's model matrix (reused instance)
|
|
463
|
+
* @ignore
|
|
464
|
+
*/
|
|
465
|
+
_composeModelMatrix(): Matrix3d;
|
|
466
|
+
/** @ignore */
|
|
467
|
+
_modelMatrix: Matrix3d | undefined;
|
|
286
468
|
/**
|
|
287
469
|
* Project vertices into **world space** for the Camera3d render path.
|
|
288
470
|
* Bypasses {@link Mesh#projectionMatrix} (the self-contained
|
|
@@ -332,23 +514,22 @@ export default class Mesh extends Renderable {
|
|
|
332
514
|
* (e.g. a level transition into a 2D minigame) gets its original
|
|
333
515
|
* winding back and stays correctly oriented under
|
|
334
516
|
* `cullBackFaces: true`.
|
|
517
|
+
* @param {boolean} [needsReversedIndices=true] - build the winding-reversed index copy. `false` on the retained path, which corrects winding with `frontFace` and would otherwise duplicate the index array for nothing.
|
|
335
518
|
* @ignore
|
|
336
519
|
*/
|
|
337
|
-
_setupWorldSpace(): void;
|
|
520
|
+
_setupWorldSpace(needsReversedIndices?: boolean): void;
|
|
338
521
|
_indicesReversed: any;
|
|
339
522
|
_worldSpace: boolean | undefined;
|
|
340
523
|
_useWorldSpace: boolean | undefined;
|
|
341
524
|
/**
|
|
342
|
-
* The mesh's world-space 3D axis-aligned bounding box
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* a mesh's real extent).
|
|
525
|
+
* The mesh's world-space 3D axis-aligned bounding box. This is the 3D analog
|
|
526
|
+
* of {@link Renderable#getBounds} (which returns a flat 2D box from
|
|
527
|
+
* `width`/`height` and so cannot describe a mesh's real extent).
|
|
346
528
|
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
* the
|
|
350
|
-
*
|
|
351
|
-
* use {@link Renderable#getBounds} for the 2D case.
|
|
529
|
+
* Computed on demand by bounding the model-space geometry through the
|
|
530
|
+
* mesh's current placement, so it reflects the live transform and is valid
|
|
531
|
+
* before the mesh has ever been drawn. Meaningful for the `Camera3d` path;
|
|
532
|
+
* for the 2D path use {@link Renderable#getBounds}.
|
|
352
533
|
*
|
|
353
534
|
* The same {@link AABB3d} instance is returned each call (recomputed in
|
|
354
535
|
* place), so copy it (`.clone()`) if you need to keep it.
|
|
@@ -357,6 +538,37 @@ export default class Mesh extends Renderable {
|
|
|
357
538
|
getBounds3d(): AABB3d;
|
|
358
539
|
/** @ignore */
|
|
359
540
|
_bounds3d: AABB3d | undefined;
|
|
541
|
+
/**
|
|
542
|
+
* Whether this mesh casts a ground shadow on this draw (#1515).
|
|
543
|
+
*
|
|
544
|
+
* Precedence, most specific first: the mesh's own `castGroundShadow`, then
|
|
545
|
+
* the application's `castGroundShadow` setting. A per-mesh value is an
|
|
546
|
+
* explicit instruction and is obeyed as given; the application default is a
|
|
547
|
+
* blanket one, so it skips meshes with no vertical extent — which is what a
|
|
548
|
+
* ground plane is, and a flat plane lying on the floor has nothing to cast.
|
|
549
|
+
* Read off the renderer rather than the global application instance, the
|
|
550
|
+
* same way the `textureFilter` default is.
|
|
551
|
+
* @param {WebGLRenderer|WebGPURenderer} renderer - the active renderer
|
|
552
|
+
* @returns {boolean} true if a shadow should be drawn
|
|
553
|
+
* @ignore
|
|
554
|
+
*/
|
|
555
|
+
_castsGroundShadow(renderer: WebGLRenderer | WebGPURenderer): boolean;
|
|
556
|
+
/**
|
|
557
|
+
* Measure the model-space footprint the blob is built from, and whether the
|
|
558
|
+
* geometry has any height at all — once per geometry version.
|
|
559
|
+
* @ignore
|
|
560
|
+
*/
|
|
561
|
+
_measureShadowFootprint(): void;
|
|
562
|
+
/**
|
|
563
|
+
* Draw this mesh's ground shadow: the shared blob quad, flattened onto the
|
|
564
|
+
* ground plane beneath the object (#1515).
|
|
565
|
+
*
|
|
566
|
+
* The quad is shared by every shadow in the scene and its geometry is
|
|
567
|
+
* uploaded once, so this is one draw and no allocation.
|
|
568
|
+
* @param {WebGLRenderer} renderer - the active renderer
|
|
569
|
+
* @ignore
|
|
570
|
+
*/
|
|
571
|
+
_drawGroundShadow(renderer: WebGLRenderer): void;
|
|
360
572
|
/**
|
|
361
573
|
* Render the mesh at its current state (transforms, projection, tint) to an offscreen canvas.
|
|
362
574
|
* The returned canvas can be used with `renderer.drawImage()`, as a `Sprite` image source,
|
|
@@ -380,12 +592,19 @@ export default class Mesh extends Renderable {
|
|
|
380
592
|
* const sprite = new me.Sprite(100, 100, { image: bitmap });
|
|
381
593
|
*/
|
|
382
594
|
toImageBitmap(): Promise<ImageBitmap>;
|
|
595
|
+
/**
|
|
596
|
+
* Release this mesh's GPU-resident geometry, if a renderer is holding any,
|
|
597
|
+
* then destroy the renderable.
|
|
598
|
+
* @ignore
|
|
599
|
+
*/
|
|
600
|
+
destroy(): void;
|
|
383
601
|
}
|
|
384
602
|
import Renderable from "./renderable.js";
|
|
603
|
+
import { TextureAtlas } from "./../video/texture/atlas.js";
|
|
385
604
|
import { Color } from "../math/color.ts";
|
|
386
605
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
387
606
|
import { Vector2d } from "../math/vector2d.ts";
|
|
388
607
|
import { Polygon } from "../geometries/polygon.ts";
|
|
389
608
|
import { AABB3d } from "../physics/broadphase/aabb3d.ts";
|
|
390
|
-
import
|
|
609
|
+
import type WebGLRenderer from "./../video/webgl/webgl_renderer.js";
|
|
391
610
|
//# sourceMappingURL=mesh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/mesh.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/mesh.js"],"names":[],"mappings":"AA0OA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,eAhEW,MAAM,KACN,MAAM,YAEd;QAA0B,KAAK;QACU,QAAQ;QACR,GAAG;QACJ,OAAO;QACS,OAAO;QACrC,QAAQ;QACT,KAAK,EAAtB,MAAM;QACY,MAAM;QACL,aAAa;QACb,SAAS;QACV,KAAK;QACJ,WAAW;QACZ,aAAa;QACb,aAAa;QACb,WAAW;QACI,QAAQ;KACjD,EAqrBF;IA3nBC;;;OAGG;IACH,kBAFU,YAAY,CAEkB;IAExC;;;OAGG;IACH,KAFU,YAAY,CAEA;IAqBtB;;;OAGG;IACH,aAFU,MAAM,CAEsB;IAmCvC,2BAAoC;IAIpC;;;;;;;;;;;;;;OAcG;IACH,UAFU,YAAY,CAEgC;IAEtD;;;;;OAKG;IACH,iBAFU,YAAY,GAAC,SAAS,CAOnB;IAcb;;;;;;;;;OASG;IACH,KAHU,OAAO,CAGe;IAEhC;;;;;;;;;OASG;IACH,aAHU,MAAM,CAIoD;IAEpE;;;;;;;;;OASG;IACH,UAFU,YAAY,GAAC,SAAS,CAEa;IAE7C;;;;;;;;;;;;OAYG;IACH,UAHU,YAAY,GAAC,SAAS,CAGa;IAE7C;;;;;;;;OAQG;IACH,WAHU,MAAM,CAIgD;IAEhE;;;;;;;;;;OAUG;IACH,UAFU,YAAY,GAAC,SAAS,CAEP;IAEzB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,kBAJU,OAAO,GAAC,SAAS,CAOd;IA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tBC,cAAc;IACd,mCAAkC;IAuBpC;;;;;;;;;;;;;;;;OAgBG;IACH,+BALW,MAAM,WACN,MAAM,WACN,MAAM,QAqChB;IAED;;;;;;;;;;;;OAYG;IACH,6BA8BC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wCAHW,OAAO,QA6BjB;IAHC,sBAA2B;IAE5B,iCAAuB;IAoBvB,oCAAuD;IAqBxD;;;;;;;;;;;;;OAaG;IACH,eAFa,MAAM,CAgBlB;IAZC,cAAc;IACd,8BAA6B;IAkC/B;;;;;;;;;;;;;OAaG;IACH,6BAJW,aAAa,GAAC,cAAc,GAC1B,OAAO,CAiBnB;IAED;;;;OAIG;IACH,gCA0BC;IAED;;;;;;;;OAQG;IACH,4BAHW,aAAa,QAmJvB;IA0ID;;;;;;;;;;;;OAYG;IACH,YATa,iBAAiB,CAoH7B;IAED;;;;;;;OAOG;IACH,iBALa,OAAO,CAAC,WAAW,CAAC,CAOhC;IAED;;;;OAIG;IACH,gBAMC;CACD;uBA/xDsB,iBAAiB;6BAHX,6BAA6B;sBAVpC,kBAAkB;yBACf,qBAAqB;yBACrB,qBAAqB;wBALtB,0BAA0B;uBAW3B,iCAAiC;+BAU1B,oCAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nineslicesprite.d.ts","sourceRoot":"","sources":["../../src/renderable/nineslicesprite.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,eAxBW,MAAM,KACN,MAAM,YAEd;QAAyB,KAAK,EAAtB,MAAM;QACW,MAAM,EAAvB,MAAM;QACY,MAAM;QACN,MAAM;QACyD,KAAK,EAAtF,gBAAgB,GAAC,iBAAiB,GAAC,YAAY,GAAC,eAAe,GAAC,MAAM;QACpD,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;QACL,IAAI;QACV,KAAK;QACL,KAAK;QACwB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;KAC3C,EA8BF;IASD,iBALU,MAAM,EAOf;IATD;;;OAGG;IACH,aAFU,MAAM,CAIf;IAYD,kBALU,MAAM,EAOf;IATD;;;OAGG;IACH,cAFU,MAAM,CAIf;IAxBA,kBAA2B;IAC3B,mBAA6B;IAE7B,2BAA6B;IAC7B,2BAA6B;IAkD9B;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"nineslicesprite.d.ts","sourceRoot":"","sources":["../../src/renderable/nineslicesprite.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,eAxBW,MAAM,KACN,MAAM,YAEd;QAAyB,KAAK,EAAtB,MAAM;QACW,MAAM,EAAvB,MAAM;QACY,MAAM;QACN,MAAM;QACyD,KAAK,EAAtF,gBAAgB,GAAC,iBAAiB,GAAC,YAAY,GAAC,eAAe,GAAC,MAAM;QACpD,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;QACL,IAAI;QACV,KAAK;QACL,KAAK;QACwB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;KAC3C,EA8BF;IASD,iBALU,MAAM,EAOf;IATD;;;OAGG;IACH,aAFU,MAAM,CAIf;IAYD,kBALU,MAAM,EAOf;IATD;;;OAGG;IACH,cAFU,MAAM,CAIf;IAxBA,kBAA2B;IAC3B,mBAA6B;IAE7B,2BAA6B;IAC7B,2BAA6B;IAkD9B;;OAEG;IACH,0BA6EC;CACD;mBA3MkB,aAAa;kCAKC,6BAA6B;2BADtC,oBAAoB"}
|
|
@@ -238,10 +238,12 @@ export default class Renderable extends Rect {
|
|
|
238
238
|
*/
|
|
239
239
|
mask: Rect | RoundRect | Polygon | Line | Ellipse;
|
|
240
240
|
/**
|
|
241
|
-
* the list of post-processing shader effects applied to this renderable
|
|
242
|
-
* Effects are applied in order. Use
|
|
243
|
-
*
|
|
244
|
-
*
|
|
241
|
+
* the list of post-processing shader effects applied to this renderable
|
|
242
|
+
* (GPU backends — WebGL and WebGPU). Effects are applied in order. Use
|
|
243
|
+
* {@link addPostEffect}, {@link getPostEffect}, and
|
|
244
|
+
* {@link removePostEffect} to manage effects, or assign directly.
|
|
245
|
+
* On the Canvas renderer effects stay inert (the scene keeps rendering
|
|
246
|
+
* un-effected).
|
|
245
247
|
* @type {Array<GLShader|ShaderEffect>}
|
|
246
248
|
* @default []
|
|
247
249
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderable.d.ts","sourceRoot":"","sources":["../../src/renderable/renderable.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;IAaI;AAEJ;;;GAGG;AACH;IAkBG,iBAAmB;IAGpB;;;;;;;;;;;;;;;OAeG;IACH,aAHU,eAAe,CAMvB;IAGD;;;;;;;OAOG;IACH,kBAFU,QAAQ,CAEoB;IAIvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,MAlCU,WAAW,CAkCA;IAErB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAHU,MAAM,GAAC,SAAS,CAGF;IAExB;;;;;OAKG;IACH,MAFU,MAAM,CAEK;IAErB;;;;;;;;;;OAUG;IACH,6BAAmC;IAEnC;;;;OAIG;IACH,cAHU,OAAO,CAGQ;IAEzB;;;;OAIG;IACH,kBAHU,OAAO,CAGY;IAE7B;;;;OAIG;IACH,cAHU,OAAO,CAGQ;IAEzB;;;;;OAKG;IACH,UAHU,OAAO,CAGI;IAErB;;;;;;;OAOG;IACH,qBAHU,OAAO,CAGe;IAEhC;;;;;;;;;;;;;;;;OAgBG;IACH,eAdU,OAAO,CAcQ;IAEzB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,sBAJU,OAAO,CAIe;IAEhC;;;;;;;OA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;gCADnB,kCAAkC;yBAKzC,qBAAqB;2BAWpB,gBAAgB;wBADnB,oBAAoB;+BAKf,8BAA8B;6BADhC,0BAA0B;0BAF7B,yBAAyB;6BACtB,4BAA4B;6BAG1B,iCAAiC;gCAC9B,sCAAsC;+BACvC,oCAAoC"}
|
|
@@ -121,6 +121,8 @@ export default class Sprite extends Renderable {
|
|
|
121
121
|
* @ignore
|
|
122
122
|
*/
|
|
123
123
|
removeStatePauseListener: (() => void) | undefined;
|
|
124
|
+
_lastVideoFrameVersion: number | undefined;
|
|
125
|
+
_videoFrameHandle: any;
|
|
124
126
|
set normalMap(value: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | ImageBitmap | null);
|
|
125
127
|
/**
|
|
126
128
|
* The optional normal-map image paired with this sprite's color
|
|
@@ -247,7 +249,7 @@ export default class Sprite extends Renderable {
|
|
|
247
249
|
* this.setCurrentAnimation("walk");
|
|
248
250
|
*
|
|
249
251
|
* // set "walk" animation if it is not the current animation
|
|
250
|
-
* if (this.isCurrentAnimation("walk")) {
|
|
252
|
+
* if (!this.isCurrentAnimation("walk")) {
|
|
251
253
|
* this.setCurrentAnimation("walk");
|
|
252
254
|
* }
|
|
253
255
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprite.d.ts","sourceRoot":"","sources":["../../src/renderable/sprite.js"],"names":[],"mappings":"AAcA;;;;GAIG;AAEH;;;GAGG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,eA1CW,MAAM,KACN,MAAM,YAEd;QAAoH,KAAK,EAAjH,gBAAgB,GAAC,iBAAiB,GAAC,gBAAgB,GAAC,SAAS,GAAC,YAAY,GAAC,eAAe,GAAC,MAAM;QAC/E,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;QACL,IAAI;QACV,KAAK;QACL,KAAK;QACwB,WAAW;eAAvC,MAAM;eAAG,MAAM;;QACyD,SAAS;KAC5G,
|
|
1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
|
@@ -319,12 +319,6 @@ export default class Sprite3d extends Mesh {
|
|
|
319
319
|
* @ignore
|
|
320
320
|
*/
|
|
321
321
|
_applyFrame(region: object): void;
|
|
322
|
-
/**
|
|
323
|
-
* Release resources (returns the engine's pooled `current.offset` to the
|
|
324
|
-
* pool), then defer to the standard mesh/renderable teardown.
|
|
325
|
-
* @ignore
|
|
326
|
-
*/
|
|
327
|
-
destroy(): void;
|
|
328
322
|
/**
|
|
329
323
|
* Capture the rendering camera so {@link Sprite3d#_projectVerticesWorld} can
|
|
330
324
|
* orient the billboard toward it. Read from the per-draw `viewport` (passed
|
|
@@ -342,6 +336,23 @@ export default class Sprite3d extends Mesh {
|
|
|
342
336
|
* @ignore
|
|
343
337
|
*/
|
|
344
338
|
_projectVerticesWorld(offsetX: any, offsetY: any, offsetZ: any): void;
|
|
339
|
+
/**
|
|
340
|
+
* Resolve the camera-facing basis this billboard should use, leaving it in
|
|
341
|
+
* the shared `_right` / `_up` scratch vectors.
|
|
342
|
+
*
|
|
343
|
+
* Shared by the CPU projection and the model-matrix composition so the two
|
|
344
|
+
* can never disagree about which way the card faces.
|
|
345
|
+
* @returns {boolean} `false` when this sprite is not billboarding
|
|
346
|
+
* @ignore
|
|
347
|
+
*/
|
|
348
|
+
_billboardBasis(): boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Emit the 4 corners as center ± right·localX ± up·localY (the local
|
|
351
|
+
* offsets are the baked ±hw / ±hh quad coordinates, already shifted by the
|
|
352
|
+
* anchor offset). Only used on renderers without retained geometry.
|
|
353
|
+
* @ignore
|
|
354
|
+
*/
|
|
355
|
+
_projectBillboardCorners(offsetX: any, offsetY: any, offsetZ: any): void;
|
|
345
356
|
}
|
|
346
357
|
import Mesh from "./mesh.js";
|
|
347
358
|
import FrameAnimation from "./frameAnimation.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprite3d.d.ts","sourceRoot":"","sources":["../../src/renderable/sprite3d.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sprite3d.d.ts","sourceRoot":"","sources":["../../src/renderable/sprite3d.js"],"names":[],"mappings":"AAoEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH;IACC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAnBW,MAAM,KACN,MAAM,YAEd;QAAqD,KAAK;QAChC,KAAK;QACL,MAAM;QACN,UAAU;QACV,WAAW;QACX,MAAM;QACJ,KAAK;QACP,CAAC;QACO,SAAS;QACY,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QAChB,KAAK;QACL,KAAK;QACL,GAAG;QACW,QAAQ;QACvB,WAAW;KACvC,EA6OA;IAtIA;;;;OAIG;IACH,QAHU,MAAM,CAGA;IAChB,cAAc;IACd,eAAgB;IAIhB,cAAc;IACd,uBAAmC;IACnC,cAAc;IACd,uBAAmC;IAgBnC,cAAc;IACd,eAAe;IACf,cAAc;IACd,eAAe;IAKf,cAAc;IACd,gBAAmB;IACnB,cAAc;IACd,gBAAmB;IAEnB,cAAc;IACd,uBAAmB;IAKnB;;;OAGG;IACH,kBAAwB;IACxB,sDAAsD;IACtD,YAA0B;IAM1B,0CAA0C;IAC1C,kBAA6D;IAC7D,sDAAsD;IACtD,kBAAyC;IACzC,gDAAgD;IAChD,2BAEE;IAKF;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAHU,OAAO,GAAC,MAAM,CAGoB;IAE5C,4EAA4E;IAC5E,+BAAyB;IAyC1B;;;;;;;OAOG;IACH,yBAsCC;IAED;;;OAGG;IACH,YAFU,MAAM,CAIf;IAED;;;OAGG;IACH,eAFU,MAAM,CAIf;IASD,cALU,MAAM,EAOf;IATD;;;OAGG;IACH,UAFU,MAAM,CAIf;IAaD,0BANU,MAAM,EAQf;IAVD;;;;O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B;qBAN3B,uBAAuB;sBAItB,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitmaptext.d.ts","sourceRoot":"","sources":["../../../src/renderable/text/bitmaptext.js"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eA/BW,MAAM,KACN,MAAM,YAEd;QAA+B,IAAI,EAA3B,MAAM,8DAAM;QACM,QAAQ;QACR,IAAI;QACE,SAAS;QACf,SAAS;QACT,SAAS;QACT,YAAY;QACZ,UAAU;QACmB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QACjB,aAAa;QACF,IAAI;KACzC,EAkIF;IA7GA;;;;;;OAMG;IACH,kBAHU,MAAM,CAG6B;IAE7C;;;;;;OAMG;IACH,qBAHU,MAAM,CAGkC;IAElD;;;;;;OAMG;IACH,mBAHU,MAAM,CAG4B;IAE5C;;;;;;OAMG;IACH,sBAHU,MAAM,CAGiC;IAEjD;;;OAGG;IACH,cAAe;IAEf;;;OAGG;IACH,kBAA2C;IAE3C;;;OAGG;IACH,kBAG2B;IAG1B;;;OAGG;IAEH,iBAAgE;
|
|
1
|
+
{"version":3,"file":"bitmaptext.d.ts","sourceRoot":"","sources":["../../../src/renderable/text/bitmaptext.js"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eA/BW,MAAM,KACN,MAAM,YAEd;QAA+B,IAAI,EAA3B,MAAM,8DAAM;QACM,QAAQ;QACR,IAAI;QACE,SAAS;QACf,SAAS;QACT,SAAS;QACT,YAAY;QACZ,UAAU;QACmB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QACjB,aAAa;QACF,IAAI;KACzC,EAkIF;IA7GA;;;;;;OAMG;IACH,kBAHU,MAAM,CAG6B;IAE7C;;;;;;OAMG;IACH,qBAHU,MAAM,CAGkC;IAElD;;;;;;OAMG;IACH,mBAHU,MAAM,CAG4B;IAE5C;;;;;;OAMG;IACH,sBAHU,MAAM,CAGiC;IAEjD;;;OAGG;IACH,cAAe;IAEf;;;OAGG;IACH,kBAA2C;IAE3C;;;OAGG;IACH,kBAG2B;IAG1B;;;OAGG;IAEH,iBAAgE;IAiNlE,4BANU,KAAK,EAad;IAhBD;;;;;OAKG;IACH,wBAHU,KAAK,CAKd;IAjLA;;OAEG;IACH,2BAA4B;IAG5B,qBAAoC;IAWrC;;;;;OAKG;IACH,eAJW,MAAM,UACN,MAAM,GACJ,UAAU,CAWtB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,MAAM,GAAC,MAAM,EAAE,GACpB,UAAU,CAwBtB;IAoBD,oCAdU,MAAM,EAmBf;IAvBD;;;;;;;;;;;;;OAaG;IACH,gCAVU,MAAM,CAYf;IAyBD,+BAZU,MAAM,EAsBf;IA1BD;;;;;OAKG;IACH,2BAFU,MAAM,CAUf;IAqFD;;;;OAIG;IACH,cAHW,MAAM,GACJ,UAAU,CAYtB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,WAAW,CAIvB;IAED;;;OAGG;IACH,eAFW,cAAc,GAAC,aAAa,QAmGtC;IAED;;;OAGG;IACH,gBAQC;CACD;uBA1dsB,kBAAkB;sBAHnB,qBAAqB;wBAKnB,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitmaptextdata.d.ts","sourceRoot":"","sources":["../../../src/renderable/text/bitmaptextdata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AA8E/B;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAClC,MAAM,EAAE,MAAM,CAAK;IACnB,QAAQ,EAAE,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IAJC,UAA+B;IAMjC;;;OAGG;IACH,UAFa,IAAI,CAWhB;IAED;;;;;;;;OAQG;IACH,cAPW,MAAM,SACN,MAAM,GAAC,MAAM,GACX,IAAI,CAwChB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,MAAM,GAAC,MAAM,EAAE,GACpB,IAAI,
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/renderable/text/text.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,eAzCW,MAAM,KACN,MAAM,YAEd;QAAyB,IAAI,EAArB,MAAM;QACkB,IAAI,EAA5B,MAAM,GAAC,MAAM;QACW,SAAS;QACT,WAAW;QACjB,SAAS;QACT,SAAS;QACT,YAAY;QACZ,UAAU;QACmB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QACjB,aAAa;QACF,IAAI;KACzC,EAmGF;IApEA;;;;OAIG;IACH,WAHU,KAAK,CAGwB;IAEvC;;;;OAIG;IACH,aAHU,KAAK,CAG0B;IAEzC;;;;OAIG;IACH,WAHU,MAAM,CAGE;IAElB;;;;;OAKG;IACH,WAHU,MAAM,CAGO;IAEvB;;;;;OAKG;IACH,cAHU,MAAM,CAGS;IAEzB;;;;;OAKG;IACH,YAHU,MAAM,CAGK;IAErB;;;;;OAKG;IACH,eAHU,MAAM,CAGO;IAEvB;;;;OAIG;IACH,UAHU,MAAM,CAGE;IAElB;;;OAGG;IACH,cAAe;IAMhB,cAAc;IACd,kDA8EC;IAdA,8CAEE;IAEF;;OAEG;IACH,wBAA4B;IAG5B,iCAAoC;IAMrC;;;OAGG;IACH,QAFa,IAAI,CAWhB;IAJC,UAA+B;IAMjC;;;OAGG;IACH,UAFa,IAAI,CAWhB;IAED;;;;;;;;OAQG;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.ts
CHANGED
|
@@ -153,43 +153,9 @@ export declare function setAutoFocus(enable: boolean): void;
|
|
|
153
153
|
* specify a function to execute when the Device is fully loaded and ready
|
|
154
154
|
* @param fn - the function to be executed
|
|
155
155
|
* @example
|
|
156
|
-
* //
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* onload = function () {
|
|
160
|
-
* // init video
|
|
161
|
-
* if (!me.video.init('screen', 640, 480, true)) {
|
|
162
|
-
* alert("Sorry but your browser does not support html 5 canvas.");
|
|
163
|
-
* return;
|
|
164
|
-
* }
|
|
165
|
-
*
|
|
166
|
-
* // initialize the "audio"
|
|
167
|
-
* me.audio.init("mp3,ogg");
|
|
168
|
-
*
|
|
169
|
-
* // set callback for resources loaded event
|
|
170
|
-
* me.loader.onload = this.loaded.bind(this);
|
|
171
|
-
*
|
|
172
|
-
* // set all resources to be loaded
|
|
173
|
-
* me.loader.preload(game.assets);
|
|
174
|
-
*
|
|
175
|
-
* // load everything & display a loading screen
|
|
176
|
-
* me.state.change(me.state.LOADING);
|
|
177
|
-
* };
|
|
178
|
-
*
|
|
179
|
-
* // callback when everything is loaded
|
|
180
|
-
* loaded = function () {
|
|
181
|
-
* // define stuff
|
|
182
|
-
* // ....
|
|
183
|
-
*
|
|
184
|
-
* // change to the menu screen
|
|
185
|
-
* me.state.change(me.state.PLAY);
|
|
186
|
-
* }
|
|
187
|
-
* }; // game
|
|
188
|
-
*
|
|
189
|
-
* // "bootstrap"
|
|
190
|
-
* me.device.onReady(function () {
|
|
191
|
-
* game.onload();
|
|
192
|
-
* });
|
|
156
|
+
* // the modern equivalent is simply to await the Application
|
|
157
|
+
* const app = new Application(640, 480, { parent: "screen" });
|
|
158
|
+
* await app.init();
|
|
193
159
|
* @deprecated since 18.3.0 — no longer needed when using {@link Application} as entry point.
|
|
194
160
|
* @category Application
|
|
195
161
|
*/
|
|
@@ -284,10 +250,15 @@ export declare function getElementBounds(element: string | HTMLElement): DOMRect
|
|
|
284
250
|
*/
|
|
285
251
|
export declare function getParentBounds(element: string | HTMLElement): DOMRect;
|
|
286
252
|
/**
|
|
287
|
-
*
|
|
253
|
+
* Returns true if the device supports WebGL 2 — the version the WebGL
|
|
254
|
+
* renderer requires since 20.0. This probes the same context type that
|
|
255
|
+
* renderer construction requests, so the two can never disagree.
|
|
256
|
+
*
|
|
257
|
+
* When it returns false, `renderer: video.AUTO` falls back to the Canvas
|
|
258
|
+
* renderer and `renderer: video.WEBGL` throws at construction time.
|
|
288
259
|
* @param [options] - context creation options
|
|
289
|
-
* @param [options.failIfMajorPerformanceCaveat=true] -
|
|
290
|
-
* @returns true if WebGL is supported
|
|
260
|
+
* @param [options.failIfMajorPerformanceCaveat=true] - if true, report WebGL as unsupported when the browser warns that a context would perform dramatically worse than a native application (e.g. a software rasterizer). Set false to accept WebGL on blocklisted drivers or software renderers.
|
|
261
|
+
* @returns true if WebGL 2 is supported
|
|
291
262
|
* @category Application
|
|
292
263
|
*/
|
|
293
264
|
export declare function isWebGLSupported(options?: {
|