@null3d/engine 0.1.0 → 0.1.2
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/dist/wasm/single/null3d.js +10 -8
- package/dist/wasm/single/null3d_bg.wasm +0 -0
- package/dist/wasm/threaded/null3d.js +10 -8
- package/dist/wasm/threaded/null3d_bg.wasm +0 -0
- package/docs/api/animation.md +96 -24
- package/docs/api/assets.md +99 -29
- package/docs/api/cameras.md +38 -7
- package/docs/api/controls.md +47 -23
- package/docs/api/debug.md +105 -35
- package/docs/api/engine.md +108 -32
- package/docs/api/feature-draws.md +21 -15
- package/docs/api/feature-effects.md +8 -8
- package/docs/api/feature-instances.md +68 -17
- package/docs/api/features.md +68 -37
- package/docs/api/geometry.md +83 -14
- package/docs/api/grass.md +55 -13
- package/docs/api/impostors.md +92 -50
- package/docs/api/input.md +22 -9
- package/docs/api/lights.md +67 -16
- package/docs/api/lines.md +38 -13
- package/docs/api/materials.md +187 -59
- package/docs/api/math.md +6 -6
- package/docs/api/objects.md +40 -15
- package/docs/api/page.md +58 -7
- package/docs/api/particles.md +36 -11
- package/docs/api/points.md +18 -8
- package/docs/api/post.md +57 -23
- package/docs/api/quality.md +36 -16
- package/docs/api/raycast.md +57 -24
- package/docs/api/reference/animation.md +1 -2
- package/docs/api/reference/assets.md +7 -4
- package/docs/api/reference/cameras.md +3 -2
- package/docs/api/reference/controls.md +59 -2
- package/docs/api/reference/debug.md +58 -6
- package/docs/api/reference/engine.md +40 -10
- package/docs/api/reference/feature-draws.md +3 -4
- package/docs/api/reference/feature-effects.md +2 -3
- package/docs/api/reference/feature-instances.md +5 -4
- package/docs/api/reference/features.md +7 -4
- package/docs/api/reference/geometry.md +132 -21
- package/docs/api/reference/grass.md +62 -2
- package/docs/api/reference/impostors.md +120 -16
- package/docs/api/reference/input.md +1 -2
- package/docs/api/reference/lights.md +4 -3
- package/docs/api/reference/lines.md +3 -4
- package/docs/api/reference/materials.md +7 -6
- package/docs/api/reference/math.md +13 -2
- package/docs/api/reference/objects.md +2 -3
- package/docs/api/reference/particles.md +31 -6
- package/docs/api/reference/points.md +2 -3
- package/docs/api/reference/post.md +4 -3
- package/docs/api/reference/quality.md +1 -2
- package/docs/api/reference/raycast.md +1 -2
- package/docs/api/reference/render.md +4 -3
- package/docs/api/reference/scene.md +24 -5
- package/docs/api/reference/sketch.md +11 -11
- package/docs/api/reference/sound.md +33 -2
- package/docs/api/reference/splats.md +42 -3
- package/docs/api/reference/sprites.md +2 -3
- package/docs/api/reference/tasks.md +16 -3
- package/docs/api/reference/terrain.md +26 -5
- package/docs/api/reference/textures.md +1 -2
- package/docs/api/reference/three-compat.md +18 -7
- package/docs/api/reference/time.md +1 -2
- package/docs/api/reference/ui.md +10 -7
- package/docs/api/reference/vertex-draws.md +2 -3
- package/docs/api/reference/water.md +78 -5
- package/docs/api/reference/wind.md +15 -2
- package/docs/api/render.md +67 -25
- package/docs/api/scene.md +129 -36
- package/docs/api/sketch.md +45 -19
- package/docs/api/sound.md +48 -12
- package/docs/api/splats.md +42 -15
- package/docs/api/sprites.md +8 -6
- package/docs/api/tasks.md +31 -22
- package/docs/api/terrain.md +44 -12
- package/docs/api/textures.md +61 -12
- package/docs/api/three-compat.md +15 -7
- package/docs/api/time.md +3 -5
- package/docs/api/ui.md +18 -10
- package/docs/api/vertex-draws.md +13 -12
- package/docs/api/water.md +111 -67
- package/docs/api/wind.md +61 -15
- package/docs/cli/null3d.md +90 -15
- package/docs/concepts/architecture.md +69 -23
- package/docs/concepts/assets.md +57 -16
- package/docs/concepts/backends.md +68 -24
- package/docs/concepts/color-management.md +42 -13
- package/docs/concepts/culling.md +68 -47
- package/docs/concepts/handles.md +14 -5
- package/docs/concepts/instances.md +72 -23
- package/docs/concepts/large-worlds.md +17 -7
- package/docs/concepts/lighting.md +117 -44
- package/docs/concepts/lod.md +128 -33
- package/docs/concepts/materials.md +43 -12
- package/docs/concepts/particle-buffer.md +48 -35
- package/docs/concepts/post-processing.md +77 -14
- package/docs/concepts/quality-preset-tables.md +3 -2
- package/docs/concepts/quality-presets.md +122 -39
- package/docs/concepts/render-graph.md +56 -21
- package/docs/concepts/render-layers.md +9 -5
- package/docs/concepts/shadows.md +96 -25
- package/docs/concepts/static-dynamic.md +22 -7
- package/docs/cookbook/index.md +163 -119
- package/docs/data/threejs-mapping.json +301 -340
- package/docs/errors/E1101.md +23 -5
- package/docs/errors/E1102.md +11 -3
- package/docs/errors/E1103.md +11 -3
- package/docs/errors/E1104.md +11 -3
- package/docs/errors/E1105.md +13 -5
- package/docs/errors/E1106.md +11 -3
- package/docs/errors/E1107.md +15 -5
- package/docs/errors/E1108.md +11 -3
- package/docs/errors/E1109.md +32 -6
- package/docs/errors/E1110.md +23 -5
- package/docs/errors/E1111.md +11 -3
- package/docs/errors/E1112.md +11 -3
- package/docs/errors/E1203.md +12 -4
- package/docs/errors/E1204.md +11 -3
- package/docs/errors/E1205.md +11 -3
- package/docs/errors/E1206.md +28 -6
- package/docs/errors/E1207.md +11 -3
- package/docs/errors/E1208.md +12 -3
- package/docs/errors/E1209.md +11 -3
- package/docs/errors/E1213.md +27 -5
- package/docs/errors/E1214.md +11 -3
- package/docs/errors/E1215.md +31 -6
- package/docs/errors/E1216.md +31 -6
- package/docs/errors/E1217.md +29 -6
- package/docs/errors/E1218.md +22 -6
- package/docs/errors/E1219.md +11 -3
- package/docs/errors/E1220.md +24 -5
- package/docs/errors/E1221.md +24 -5
- package/docs/errors/E1222.md +11 -3
- package/docs/errors/E1223.md +39 -6
- package/docs/errors/E1224.md +11 -3
- package/docs/errors/E1225.md +11 -3
- package/docs/errors/E1301.md +11 -3
- package/docs/errors/E1302.md +11 -3
- package/docs/errors/E1303.md +11 -3
- package/docs/errors/E1304.md +11 -3
- package/docs/errors/E1305.md +13 -3
- package/docs/errors/E1306.md +11 -3
- package/docs/errors/E1307.md +23 -6
- package/docs/errors/E1308.md +31 -0
- package/docs/errors/E1401.md +11 -3
- package/docs/errors/E1402.md +13 -5
- package/docs/errors/E1403.md +11 -3
- package/docs/errors/E1404.md +13 -3
- package/docs/errors/E1405.md +15 -4
- package/docs/errors/E1406.md +31 -5
- package/docs/errors/E1407.md +11 -3
- package/docs/errors/E1408.md +11 -3
- package/docs/errors/E1409.md +11 -3
- package/docs/errors/E1410.md +13 -5
- package/docs/errors/E1411.md +11 -3
- package/docs/errors/E1412.md +29 -6
- package/docs/errors/E1413.md +11 -3
- package/docs/errors/E1414.md +11 -3
- package/docs/errors/E1415.md +11 -3
- package/docs/errors/E1416.md +27 -6
- package/docs/errors/E1417.md +11 -3
- package/docs/errors/E1418.md +12 -3
- package/docs/errors/E1419.md +13 -5
- package/docs/errors/E1420.md +11 -3
- package/docs/errors/E1421.md +11 -3
- package/docs/errors/E1422.md +12 -3
- package/docs/errors/E1423.md +12 -3
- package/docs/errors/E1424.md +24 -5
- package/docs/errors/E1425.md +11 -3
- package/docs/errors/E1426.md +11 -3
- package/docs/errors/E1430.md +11 -3
- package/docs/errors/E1431.md +11 -3
- package/docs/errors/E1432.md +11 -3
- package/docs/errors/E1433.md +11 -3
- package/docs/errors/E1434.md +15 -6
- package/docs/errors/E1435.md +11 -3
- package/docs/errors/E1436.md +11 -3
- package/docs/errors/E1437.md +14 -6
- package/docs/errors/E1501.md +41 -6
- package/docs/errors/E1502.md +13 -3
- package/docs/errors/E1503.md +11 -3
- package/docs/errors/E1504.md +11 -3
- package/docs/errors/E1505.md +23 -5
- package/docs/errors/E1506.md +11 -3
- package/docs/errors/index.md +53 -29
- package/docs/getting-started/cdn.md +15 -9
- package/docs/getting-started/first-scene.md +20 -12
- package/docs/getting-started/hosting.md +113 -63
- package/docs/getting-started/install.md +39 -24
- package/docs/getting-started/network-use.md +31 -21
- package/docs/getting-started/project-structure.md +20 -8
- package/docs/getting-started/third-party-notices.md +6 -10
- package/docs/guides/accessibility.md +4 -4
- package/docs/guides/add-ons.md +83 -13
- package/docs/guides/agents.md +13 -14
- package/docs/guides/assets-pipeline.md +294 -72
- package/docs/guides/audio.md +17 -15
- package/docs/guides/baked-light-data.md +44 -23
- package/docs/guides/car-paint.md +37 -31
- package/docs/guides/content-pages.md +86 -29
- package/docs/guides/custom-passes.md +59 -17
- package/docs/guides/custom-shaders.md +54 -37
- package/docs/guides/debugging.md +31 -41
- package/docs/guides/deploying.md +10 -27
- package/docs/guides/deterministic-simulation.md +23 -16
- package/docs/guides/first-use-shaders.md +83 -45
- package/docs/guides/lens-kit.md +29 -26
- package/docs/guides/loading-screens.md +74 -30
- package/docs/guides/multiple-views.md +22 -11
- package/docs/guides/performance.md +188 -37
- package/docs/guides/phones.md +71 -19
- package/docs/guides/physics.md +6 -10
- package/docs/guides/screens.md +41 -29
- package/docs/guides/start-time.md +126 -85
- package/docs/guides/testing.md +137 -98
- package/docs/guides/ui-overlays.md +17 -12
- package/docs/guides/video-textures.md +14 -13
- package/docs/images/api/animation/character.webp +0 -0
- package/docs/images/api/animation/look-at-ring.webp +0 -0
- package/docs/images/api/animation/morph-tulips.webp +0 -0
- package/docs/images/api/animation/skeleton-lines.webp +0 -0
- package/docs/images/api/controls/gizmo-handles.webp +0 -0
- package/docs/images/api/controls/walk-and-fly.webp +0 -0
- package/docs/images/api/debug/debug-shapes.webp +0 -0
- package/docs/images/api/debug/levels-view.webp +0 -0
- package/docs/images/api/engine/transparent-canvas.webp +0 -0
- package/docs/images/api/feature-draws/feature-draw-clouds.webp +0 -0
- package/docs/images/api/feature-instances/compute-instances.webp +0 -0
- package/docs/images/api/feature-instances/instances-shadow.webp +0 -0
- package/docs/images/api/geometry/extra-shapes.webp +0 -0
- package/docs/images/api/geometry/generators.webp +0 -0
- package/docs/images/api/geometry/mesh-arrays.webp +0 -0
- package/docs/images/api/geometry/vertex-updates.webp +0 -0
- package/docs/images/api/grass/grass-grove.webp +0 -0
- package/docs/images/api/grass/grass-presets.webp +0 -0
- package/docs/images/api/grass/grass-shadow.webp +0 -0
- package/docs/images/api/impostors/impostor-handover.webp +0 -0
- package/docs/images/api/impostors/impostor-shadow.webp +0 -0
- package/docs/images/api/impostors/impostors-forest.webp +0 -0
- package/docs/images/api/lights/spot-cookies.webp +0 -0
- package/docs/images/api/lines/lines-lit.webp +0 -0
- package/docs/images/api/lines/lines-widths.webp +0 -0
- package/docs/images/api/materials/coat-and-sheen.webp +0 -0
- package/docs/images/api/materials/decals.webp +0 -0
- package/docs/images/api/materials/iridescence-and-anisotropy.webp +0 -0
- package/docs/images/api/materials/relief.webp +0 -0
- package/docs/images/api/materials/shader-inputs.webp +0 -0
- package/docs/images/api/materials/standard-grid.webp +0 -0
- package/docs/images/api/materials/subsurface.webp +0 -0
- package/docs/images/api/materials/translucency.webp +0 -0
- package/docs/images/api/objects/objects-turntable.webp +0 -0
- package/docs/images/api/particles/campfire.webp +0 -0
- package/docs/images/api/points/galaxy.webp +0 -0
- package/docs/images/api/reference/textures/texture-wrap.webp +0 -0
- package/docs/images/api/render/fullscreen-glow.webp +0 -0
- package/docs/images/api/render/reflection-mirror.webp +0 -0
- package/docs/images/api/render/security-camera.webp +0 -0
- package/docs/images/api/scene/aurora-sky-layer.webp +0 -0
- package/docs/images/api/sound/sound-demo.webp +0 -0
- package/docs/images/api/splats/splats-demo.webp +0 -0
- package/docs/images/api/sprites/sprites-lines.webp +0 -0
- package/docs/images/api/terrain/terrain-demo.webp +0 -0
- package/docs/images/api/textures/canvas-screen.webp +0 -0
- package/docs/images/api/textures/mipmaps.webp +0 -0
- package/docs/images/api/vertex-draws/rain.webp +0 -0
- package/docs/images/api/water/ocean.webp +0 -0
- package/docs/images/api/water/water-demo.webp +0 -0
- package/docs/images/api/water/water-rain.webp +0 -0
- package/docs/images/api/water/waterfall.webp +0 -0
- package/docs/images/concepts/assets/gltf-model.webp +0 -0
- package/docs/images/concepts/color-management/tone-mapped.webp +0 -0
- package/docs/images/concepts/culling/far-from-origin.webp +0 -0
- package/docs/images/concepts/instances/instances.webp +0 -0
- package/docs/images/concepts/instances/per-row-colors.webp +0 -0
- package/docs/images/concepts/large-worlds/large-world.webp +0 -0
- package/docs/images/concepts/lighting/area-lights.webp +0 -0
- package/docs/images/concepts/lighting/atmosphere.webp +0 -0
- package/docs/images/concepts/lighting/environment.webp +0 -0
- package/docs/images/concepts/lighting/light-shafts.webp +0 -0
- package/docs/images/concepts/lighting/reflection-probes.webp +0 -0
- package/docs/images/concepts/lod/forest.webp +0 -0
- package/docs/images/concepts/materials/weighted-transparency.webp +0 -0
- package/docs/images/concepts/post-processing/auto-exposure.webp +0 -0
- package/docs/images/concepts/post-processing/bounce-light.webp +0 -0
- package/docs/images/concepts/post-processing/depth-of-field.webp +0 -0
- package/docs/images/concepts/post-processing/post-effects-alley.webp +0 -0
- package/docs/images/concepts/post-processing/sharpen.webp +0 -0
- package/docs/images/concepts/post-processing/ssr-wet-street.webp +0 -0
- package/docs/images/concepts/render-layers/layers-cottages.webp +0 -0
- package/docs/images/concepts/shadows/hero-shadow.webp +0 -0
- package/docs/images/cookbook/index/picking.webp +0 -0
- package/docs/images/cookbook/index/time-of-day.webp +0 -0
- package/docs/images/errors/E1431/area-lights-no-tables.webp +0 -0
- package/docs/images/guides/custom-passes/reflection-water.webp +0 -0
- package/docs/images/guides/deterministic-simulation/replay-demo.webp +0 -0
- package/docs/images/guides/multiple-views/split-screen.webp +0 -0
- package/docs/images/guides/performance/overdraw-view.webp +0 -0
- package/docs/images/guides/testing/hold-mode-frame.webp +0 -0
- package/docs/images/index/showcase-island.webp +0 -0
- package/docs/images/porting/threejs-shaders/dissolve.webp +0 -0
- package/docs/images/shaders/builtins/builtins.webp +0 -0
- package/docs/images/shaders/surface-functions/custom-surface.webp +0 -0
- package/docs/images/shaders/surface-functions/vertex-offset.webp +0 -0
- package/docs/images/shots.json +2231 -0
- package/docs/index.md +14 -23
- package/docs/moves.json +1 -0
- package/docs/nav.json +300 -0
- package/docs/pages.md +230 -212
- package/docs/porting/react-three-fiber.md +2 -6
- package/docs/porting/threejs-loop-and-threads.md +1 -5
- package/docs/porting/threejs-mapping.md +1248 -234
- package/docs/porting/threejs-materials.md +10 -5
- package/docs/porting/threejs-overview.md +26 -6
- package/docs/porting/threejs-postprocessing.md +2 -6
- package/docs/porting/threejs-shaders.md +16 -14
- package/docs/porting/threejs-unsupported.md +6 -6
- package/docs/porting/verification.md +0 -4
- package/docs/shaders/builtins.md +15 -4
- package/docs/shaders/library.md +9 -6
- package/docs/shaders/surface-functions.md +51 -16
- package/docs/shaders/wgsl-rules.md +12 -5
- package/lib/debug/debug.d.ts +2 -2
- package/lib/debug/draw.d.ts +2 -2
- package/lib/debug/draw.js +8 -4
- package/lib/debug/overlay-look.d.ts +6 -0
- package/lib/debug/overlay-look.js +29 -7
- package/lib/debug/overlay.js +15 -11
- package/lib/debug/stats-options.d.ts +13 -0
- package/lib/debug/stats-panel.d.ts +21 -6
- package/lib/debug/stats-panel.js +80 -13
- package/lib/errors/codes.d.ts +17 -3
- package/lib/errors/codes.js +116 -105
- package/lib/errors/engine-error.js +1 -1
- package/lib/errors/fixes.d.ts +1 -0
- package/lib/errors/fixes.js +19 -18
- package/lib/generated/shader-permutations.d.ts +6 -0
- package/lib/generated/shader-permutations.js +6 -0
- package/lib/gpu/variants.d.ts +8 -2
- package/lib/gpu/variants.js +39 -7
- package/lib/gpu/webgl2/programs.js +1 -1
- package/lib/gpu/webgpu/pipelines.js +13 -13
- package/lib/index.d.ts +1 -1
- package/lib/page/capabilities.d.ts +1 -1
- package/lib/page/engine.d.ts +29 -7
- package/lib/page/engine.js +79 -7
- package/lib/page/label-loop.js +9 -4
- package/lib/page/stats-switch.js +2 -0
- package/lib/page/switches.d.ts +6 -4
- package/lib/page/switches.js +20 -4
- package/lib/scene/baked-light.d.ts +2 -2
- package/lib/scene/fake-call-values.js +2 -2
- package/lib/scene/frame-cameras.d.ts +16 -4
- package/lib/scene/frame-cameras.js +28 -10
- package/lib/scene/gltf.d.ts +1 -1
- package/lib/scene/level-rule.d.ts +6 -5
- package/lib/scene/level-rule.js +2 -2
- package/lib/scene/particles.d.ts +7 -3
- package/lib/scene/particles.js +3 -1
- package/lib/scene/post.d.ts +3 -2
- package/lib/scene/resources.d.ts +15 -9
- package/lib/scene/scene.d.ts +18 -2
- package/lib/scene/scene.js +47 -5
- package/lib/scene/time-of-day.d.ts +10 -5
- package/lib/scene/time-of-day.js +11 -7
- package/lib/shader-artifact.json +1 -1
- package/lib/shared/labels.d.ts +5 -2
- package/lib/shared/labels.js +5 -2
- package/lib/shared/permutation-words.d.ts +8 -0
- package/lib/shared/permutation-words.js +14 -0
- package/lib/shared/recording.d.ts +13 -5
- package/lib/shared/recording.js +31 -10
- package/lib/shared/sketch-data.d.ts +9 -0
- package/lib/shared/sketch-data.js +57 -0
- package/lib/shared/tier.d.ts +9 -0
- package/lib/shared/tier.js +4 -1
- package/lib/shared/version.d.ts +1 -1
- package/lib/shared/version.js +1 -1
- package/lib/sketch/define-sketch.d.ts +16 -7
- package/lib/sketch/define-sketch.js +2 -1
- package/lib/sketch/runner.d.ts +4 -0
- package/lib/sketch/runner.js +5 -0
- package/lib/sketch/ui.js +4 -2
- package/lib/stats.d.ts +1 -0
- package/lib/workers/protocol.d.ts +10 -0
- package/lib/workers/render-worker.js +4 -1
- package/lib/workers/sketch-worker.js +4 -1
- package/package.json +1 -1
package/docs/errors/E1209.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1209
|
|
3
3
|
title: "E1209: Too many textures"
|
|
4
|
-
|
|
5
|
-
since: "0.3"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "A material whose shader reads more textures than a WebGL2 shader stage has units. The engine numbers the textures that a program reads, and WebGL2 gives every stage at least 16 units, as many as the device reports. The lit shader reads most of them, so a custom material or add-on draw reaches the limit with its own textures, beside the maps and the shadows."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ A material whose shader reads more textures than a WebGL2 shader stage has units
|
|
|
16
15
|
|
|
17
16
|
Give the material fewer textures. WebGL2 gives each shader stage at least 16 texture units, as many as the device reports, and the engine's lit shader reads most of them, so a custom material's own textures must fit in what is left. Use the standard material's own maps where they draw the effect.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
19
|
+
|
|
20
|
+
## Example message
|
|
21
|
+
|
|
22
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
23
|
|
|
21
24
|
```text
|
|
22
25
|
E1209: a WebGL2 program reads 18 textures in its fragment stage, and a stage has 16 units: give the material fewer textures.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1213.md
CHANGED
|
@@ -1,23 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1213
|
|
3
3
|
title: "E1213: Invalid setting"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "A call received a setting that it does not have, or a value that the setting does not take. Examples are a tone mapping that the engine does not know, a negative exposure, a grading control outside its range, and a built-in environment that the engine does not have. It also covers a glTF extension handler that names no extension, that another handler reads, or that returns a part without a mesh or a material."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A call received a setting that it does not have, or a value that the setting does not take. A tone mapping that the engine does not know, or a grading control outside its range, are examples."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1213: Invalid setting
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
A call received a setting that it does not have, or a value that the setting does not take.
|
|
12
|
+
A call received a setting that it does not have, or a value that the setting does not take. A tone mapping that the engine does not know, or a grading control outside its range, are examples.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: the calls and settings that raise it</summary>
|
|
16
|
+
|
|
17
|
+
`post.set()` refuses a tone mapping that the engine does not know, a negative exposure, and a grading control outside its range.
|
|
18
|
+
|
|
19
|
+
`assets.builtinEnvironment()` refuses a name that no built-in environment has.
|
|
20
|
+
|
|
21
|
+
`assets.registerGltfExtension()` refuses a handler that names no extension, that another handler reads, or that returns a part without a mesh or a material.
|
|
22
|
+
|
|
23
|
+
`createEngine()` refuses sketch data that is not plain JSON data, or that takes more than 64 KiB as JSON.
|
|
24
|
+
|
|
25
|
+
</details>
|
|
14
26
|
|
|
15
27
|
## How to fix it
|
|
16
28
|
|
|
17
29
|
Pass only the settings that the call has, each with a value that it takes. The call's docs page lists them.
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
32
|
+
|
|
33
|
+
## Example message
|
|
34
|
+
|
|
35
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
36
|
|
|
21
37
|
```text
|
|
22
38
|
E1213: post.set() got the tone mapping "filmic", which is not 'agx', 'agx-punchy', 'neutral', 'aces' or 'none'.
|
|
23
39
|
```
|
|
40
|
+
|
|
41
|
+
## See also
|
|
42
|
+
|
|
43
|
+
- [Materials](../api/materials.md)
|
|
44
|
+
- [Error codes](index.md)
|
|
45
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1214.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1214
|
|
3
3
|
title: "E1214: Invalid sketch option"
|
|
4
|
-
|
|
5
|
-
since: "0.1"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "defineSketch() received an option out of its range. fixedRate must be a number above 0, and maxFixedSteps a whole number of 1 or more. downloads must be an array of file addresses: an empty string, or a string that is not an address, fails. The engine checks the options before it runs the setup function."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ defineSketch() received an option out of its range. fixedRate must be a number a
|
|
|
16
15
|
|
|
17
16
|
Give fixedRate the fixed steps per second, a number above 0 such as 60 or 120. Give maxFixedSteps a whole number of 1 or more, such as 8. Give downloads an array of the files that the setup loads, each a URL or an address string such as 'models/ship.glb'.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
19
|
+
|
|
20
|
+
## Example message
|
|
21
|
+
|
|
22
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
23
|
|
|
21
24
|
```text
|
|
22
25
|
E1214: defineSketch() got 0 for fixedRate.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1215.md
CHANGED
|
@@ -1,23 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1215
|
|
3
3
|
title: "E1215: Invalid custom WGSL"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "materials.shader(), post.addEffect(), post.set() or scene.setSkyLayer() received WGSL that it cannot draw with. The null3D Vite plugin compiles WGSL while it builds the project. The engine therefore takes only what the plugin compiled: a template literal after a /* wgsl */ comment, or a .wgsl file that a module imports. The WGSL of a custom material declares a surface function, a vertex offset or a lobe. A full shader instead has a @vertex entry point that takes an InstanceIn from null3d::mesh. An effect declares fn effect, a tone curve fn toneCurve, and a sky layer fn skyLayer."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "`materials.shader()`, `post.addEffect()`, `post.set()` or `scene.setSkyLayer()` received WGSL that it cannot draw with. The engine takes only WGSL that the null3D Vite plugin compiled, as a shader of the kind that the call takes."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1215: Invalid custom WGSL
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
materials.shader()
|
|
12
|
+
`materials.shader()`, `post.addEffect()`, `post.set()` or `scene.setSkyLayer()` received WGSL that it cannot draw with. The engine takes only WGSL that the null3D Vite plugin compiled, as a shader of the kind that the call takes.
|
|
14
13
|
|
|
15
14
|
## How to fix it
|
|
16
15
|
|
|
17
|
-
Add the null3D Vite plugin to vite.config.ts
|
|
16
|
+
Add the null3D Vite plugin to `vite.config.ts`. Write the WGSL in a template literal right after a `/* wgsl */` comment, or import it from a `.wgsl` file. Give each call the WGSL that its kind declares: the table on this page lists each declaration.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
<details>
|
|
19
|
+
<summary>Technical details: the WGSL that each call declares</summary>
|
|
20
|
+
|
|
21
|
+
| Call | WGSL declares |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `materials.shader()`, surface | `fn surface(input: SurfaceInput) -> Surface`, with no `@vertex` or `@fragment` entry |
|
|
24
|
+
| `materials.shader()`, vertex offset | `fn vertexOffset(input: VertexInput) -> vec3f` |
|
|
25
|
+
| `materials.shader()`, lobe | `fn lobe(input: LobeInput) -> vec3f` |
|
|
26
|
+
| `materials.shader()`, full shader | a `@vertex` entry that takes an `InstanceIn` from `null3d::mesh` |
|
|
27
|
+
| `materials.shader()`, own vertices | a `@vertex` entry with `@builtin(vertex_index)` and `@builtin(instance_index)`, and no mesh attribute |
|
|
28
|
+
| `post.addEffect()` | `fn effect(input: EffectInput) -> vec4f` |
|
|
29
|
+
| `post.set({ toneMapping })` | `fn toneCurve(color: vec3f) -> vec3f` |
|
|
30
|
+
| `scene.setSkyLayer()` | `fn skyLayer(input: SkyLayerInput) -> SkyLayer` |
|
|
31
|
+
|
|
32
|
+
</details>
|
|
33
|
+
|
|
34
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
35
|
+
|
|
36
|
+
## Example message
|
|
37
|
+
|
|
38
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
39
|
|
|
21
40
|
```text
|
|
22
41
|
E1215: materials.shader() got WGSL as text, which the null3D Vite plugin did not compile.
|
|
23
42
|
```
|
|
43
|
+
|
|
44
|
+
## See also
|
|
45
|
+
|
|
46
|
+
- [Custom shaders](../guides/custom-shaders.md)
|
|
47
|
+
- [Error codes](index.md)
|
|
48
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1216.md
CHANGED
|
@@ -1,23 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1216
|
|
3
3
|
title: "E1216: Invalid uniform or texture"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "A custom material's or effect's uniforms or textures did not match its WGSL. The uniforms option and set() take the names of the fields of struct Uniforms in the WGSL, each with a value of its type. A field cannot have the name of a standard value, such as color or roughness, because set() takes those too. The textures option takes the names of the WGSL's `var name: texture_2d<f32>;` and `var name: texture_2d_array<f32>;` declarations, each with a texture of the layers that its declaration takes."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A custom material's or effect's uniforms or textures did not match its WGSL. The options take the names of the fields of `struct Uniforms` and of the WGSL's texture declarations. Give each one a value or texture of the type that its declaration takes, and leave standard values such as `color` to `set()`."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1216: Invalid uniform or texture
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
A custom material's or effect's uniforms or textures did not match its WGSL. The
|
|
12
|
+
A custom material's or effect's uniforms or textures did not match its WGSL. The options take the names of the fields of `struct Uniforms` and of the WGSL's texture declarations. Give each one a value or texture of the type that its declaration takes, and leave standard values such as `color` to `set()`.
|
|
14
13
|
|
|
15
14
|
## How to fix it
|
|
16
15
|
|
|
17
|
-
Use the names of the fields of struct Uniforms in the WGSL
|
|
16
|
+
Use the names of the fields of `struct Uniforms` in the WGSL, and the names of its texture declarations. Give each value the type that its declaration takes. Rename a field that has the name of a standard value, such as `color`. Give `post.setEffectUniform()` an effect that `post.addEffect()` returned.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
<details>
|
|
19
|
+
<summary>Technical details: the value that each WGSL type takes</summary>
|
|
20
|
+
|
|
21
|
+
| WGSL type | Give |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `f32` | a number |
|
|
24
|
+
| `i32` | a whole number |
|
|
25
|
+
| `u32` | a whole number |
|
|
26
|
+
| `vec2f` | an array of 2 numbers |
|
|
27
|
+
| `vec3f` | an array of 3 numbers, or a color |
|
|
28
|
+
| `vec4f` | an array of 4 numbers |
|
|
29
|
+
| `texture_2d<f32>` | a texture of one layer |
|
|
30
|
+
| `texture_2d_array<f32>` | a texture of one or more layers, from `textures.fromData()` with a depth or a KTX2 file of layers |
|
|
31
|
+
|
|
32
|
+
</details>
|
|
33
|
+
|
|
34
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
35
|
+
|
|
36
|
+
## Example message
|
|
37
|
+
|
|
38
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
39
|
|
|
21
40
|
```text
|
|
22
41
|
E1216: materials.shader.set() got speeed, which is not a uniform of the material's WGSL.
|
|
23
42
|
```
|
|
43
|
+
|
|
44
|
+
## See also
|
|
45
|
+
|
|
46
|
+
- [Custom shaders](../guides/custom-shaders.md)
|
|
47
|
+
- [Error codes](index.md)
|
|
48
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1217.md
CHANGED
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1217
|
|
3
3
|
title: "E1217: Invalid material option"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "A material factory or scene.createLines() received an option value that it does not take, such as an unknown alpha mode, blending or line mode. Custom materials refuse the 'weighted' blending, and take alpha to coverage or the hash mode only where their WGSL sets or reads the surface's alpha. A material that lets light through refuses the hash alpha mode and the weighted blending. A layered material, with a clear coat, a sheen, iridescence or anisotropy, refuses a light map, specular maps, and two textures for a pair of layer maps that glTF packs into one. It refuses a transmission or a thickness map only where one of its layer maps fills the array that the map samples: the clear coat's normal map and iridescence's thickness map fill the array that the transmission map samples, and the sheen's maps and the anisotropy map fill the array that the thickness map samples. A material with transmission refuses a thickness map beside a specular color map, whose sRGB texture never shares the thickness map's array, and other materials refuse those two maps. A material that lets light through to its other side refuses the specular maps, whose places its diffuse transmission maps take, a clear coat, a sheen and the weighted blending, and other materials refuse the diffuse transmission maps. A custom material refuses subsurfaceRadius, which only a standard material takes. A custom material whose WGSL declares a coverage function takes the mask mode, or the blend mode with the cutoff that its shadow caster tests."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A material factory or scene.createLines() got an option value that it does not take, or two options that cannot go together. The message names the option and the rule it breaks."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1217: Invalid material option
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
A material factory or scene.createLines()
|
|
12
|
+
A material factory or scene.createLines() got an option value that it does not take, or two options that cannot go together. The message names the option and the rule it breaks.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: the rules for each material option</summary>
|
|
16
|
+
|
|
17
|
+
A material factory or scene.createLines() received an option value that it does not take, such as an unknown alpha mode, blending or line mode. Custom materials refuse the 'weighted' blending, and take alpha to coverage or the hash mode only where their WGSL sets or reads the surface's alpha. A material that lets light through refuses the hash alpha mode and the weighted blending.
|
|
18
|
+
|
|
19
|
+
A layered material, with a clear coat, a sheen, iridescence or anisotropy, refuses a light map, specular maps, and two textures for a pair of layer maps that glTF packs into one. It refuses a transmission or a thickness map only where one of its layer maps fills the array that the map samples: the clear coat's normal map and iridescence's thickness map fill the array that the transmission map samples, and the sheen's maps and the anisotropy map fill the array that the thickness map samples.
|
|
20
|
+
|
|
21
|
+
A material with transmission refuses a thickness map beside a specular color map, whose sRGB texture never shares the thickness map's array, and other materials refuse those two maps.
|
|
22
|
+
|
|
23
|
+
A material that lets light through to its other side refuses the specular maps, whose places its diffuse transmission maps take, a clear coat, a sheen and the weighted blending, and other materials refuse the diffuse transmission maps. A custom material refuses subsurfaceRadius, which only a standard material takes. A custom material whose WGSL declares a coverage function takes the mask mode, or the blend mode with the cutoff that its shadow caster tests.
|
|
24
|
+
|
|
25
|
+
</details>
|
|
14
26
|
|
|
15
27
|
## How to fix it
|
|
16
28
|
|
|
17
|
-
Give alphaMode 'opaque', 'mask', 'hash' or 'blend', and blending 'normal', 'additive', 'multiply' or 'weighted'. three.js's transparent: true is alphaMode: 'blend', and its alphaTest is alphaMode: 'mask' with alphaCutoff.
|
|
29
|
+
Give alphaMode 'opaque', 'mask', 'hash' or 'blend', and blending 'normal', 'additive', 'multiply' or 'weighted'. three.js's transparent: true is alphaMode: 'blend', and its alphaTest is alphaMode: 'mask' with alphaCutoff. For a conflict between two options, follow the message, or read the rule for each kind of material on the E1217 docs page.
|
|
30
|
+
|
|
31
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
32
|
+
|
|
33
|
+
## Example message
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
36
|
|
|
21
37
|
```text
|
|
22
38
|
E1217: materials.standard() got the alpha mode "cutout"; it takes 'opaque', 'mask' or 'blend'.
|
|
23
39
|
```
|
|
40
|
+
|
|
41
|
+
## See also
|
|
42
|
+
|
|
43
|
+
- [Materials](../api/materials.md)
|
|
44
|
+
- [Lines](../api/lines.md)
|
|
45
|
+
- [Error codes](index.md)
|
|
46
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1218.md
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1218
|
|
3
3
|
title: "E1218: Invalid animation call"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "An animator call named a clip, layer or joint that the object's animation does not have. Or it got an option out of range, such as a negative fade. animator() was called on an object that has no animation clips. Or the engine refused animation data, such as a skeleton that lists a joint before its parent. Or setMorphWeight or getMorphWeight named a morph target that the mesh does not have. A clip of more than 4,194,304 keys, its frames times its tracks, is refused too, as a clip whose keys lie hours apart is."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "An animation call, or animation data that the engine loads, named something that does not exist or gave a value out of range. The call can be an animator call, a morph-weight call or `animateProperty()`."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1218: Invalid animation call
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
An
|
|
12
|
+
An animation call, or animation data that the engine loads, named something that does not exist or gave a value out of range. The call can be an animator call, a morph-weight call or `animateProperty()`.
|
|
13
|
+
|
|
14
|
+
- An unknown clip, layer or joint.
|
|
15
|
+
- An option out of range, such as a negative fade, a layer outside 0 to 3, or a weight outside 0 to 1.
|
|
16
|
+
- `animator()` on an object that has no animation clips.
|
|
17
|
+
- A morph target that the mesh does not have.
|
|
18
|
+
- Two clips with the same name, or a clip event named `loop` or `finished`.
|
|
19
|
+
- Animation data that the core refuses, such as a skeleton that lists a joint before its parent.
|
|
20
|
+
- A clip of more than 4,194,304 keys, which is its frames times its tracks.
|
|
14
21
|
|
|
15
22
|
## How to fix it
|
|
16
23
|
|
|
17
|
-
Use the names in animator.clips
|
|
24
|
+
Use the names in `animator.clips`, and the joint names of the model's skeleton. Call `animator()` only on an object that a glTF file with animations created, and name clip events anything but `loop` and `finished`. Give `setMorphWeight` a target number below its geometry's `morphTargets`, or a name in its `morphTargetNames`. Trim or split a clip that holds keys hours apart, and keep layers, weights and fades inside the range that the message gives.
|
|
25
|
+
|
|
26
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
27
|
+
|
|
28
|
+
## Example message
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
31
|
|
|
21
32
|
```text
|
|
22
33
|
E1218: play() got "rnu", which names no clip of "Hero" (slot 3). Its clips are idle, run and walk.
|
|
23
34
|
```
|
|
35
|
+
|
|
36
|
+
## See also
|
|
37
|
+
|
|
38
|
+
- [Error codes](index.md)
|
|
39
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1219.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1219
|
|
3
3
|
title: "E1219: Invalid label"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "ui.trackLabel() or ui.untrackLabel() got an id that is not a string with at least one character. Or trackLabel() got a transform that is not 'screen', 'world' or 'billboard', or a rotation that is not a number for a label that faces the camera. Or the sketch tracked more labels at once than createEngine's maxLabels option allows: 4,096 by default. A label that is a plane of the scene counts against maxLabels3d instead, which holds 256 by default."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ ui.trackLabel() or ui.untrackLabel() got an id that is not a string with at leas
|
|
|
16
15
|
|
|
17
16
|
Give each label an id of its own, such as 'hp-12', and pass the same id to engine.labels.bind on the page. Give transform one of 'screen', 'world' or 'billboard', and a rotation only to a billboard label. Untrack labels that you no longer show with ui.untrackLabel. To track more labels at once, raise createEngine's maxLabels option, or maxLabels3d for labels that are planes of the scene.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
19
|
+
|
|
20
|
+
## Example message
|
|
21
|
+
|
|
22
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
23
|
|
|
21
24
|
```text
|
|
22
25
|
E1219: trackLabel() could not track "hp-4097": the engine already tracks 4096 labels. Raise createEngine()'s maxLabels option for more.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1220.md
CHANGED
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1220
|
|
3
3
|
title: "E1220: Invalid render pass"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "render.addPass() got options that it does not take: an unknown kind or option, no camera, a size outside 1 to the largest texture, both a size and a scale, an input image it does not know, a workgroup size or dispatch that a device cannot run, a format that a compute pass does not write, a compute pass on WebGL2 with no fallback, or a texture name or pass name that another pass has. Or the sketch added more passes than draw at once: 31. Or textures.fromPass(), render.setPassEnabled(), render.setPassUniform(), render.setPassUniforms() or render.removePass() got something that is not a render pass, render.setPassUniform() got a pass that is not a full-screen pass, or render.setPassUniforms() got a pass that is not a compute pass."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A render pass call got options that it does not take, or a pass of a kind that it does not work on. The message names the call and the rule that it breaks."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1220: Invalid render pass
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
render
|
|
12
|
+
A render pass call got options that it does not take, or a pass of a kind that it does not work on. The message names the call and the rule that it breaks.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: what each render call refuses</summary>
|
|
16
|
+
|
|
17
|
+
`render.addPass()` refuses an unknown kind or option, no camera, and a size outside 1 to the largest texture. It refuses both a size and a scale, an unknown input image, and a workgroup size or dispatch that a device cannot run.
|
|
18
|
+
|
|
19
|
+
It refuses a format that a compute pass does not write, and a compute pass on WebGL2 with no fallback. It refuses a texture name or pass name that another pass has, and a 32nd live pass, since at most 31 passes draw at once.
|
|
20
|
+
|
|
21
|
+
`textures.fromPass()`, `render.setPassEnabled()` and `render.removePass()` take any render pass. `render.setPassUniform()` takes a full-screen pass, and `render.setPassUniforms()` takes a compute pass and at most 32 numbers.
|
|
22
|
+
|
|
23
|
+
</details>
|
|
14
24
|
|
|
15
25
|
## How to fix it
|
|
16
26
|
|
|
17
27
|
Give render.addPass the options of its kind, such as { kind: 'scene', camera, writes: 'minimap', size: [256, 256] }. Give a compute pass a workgroup size that the shader declares and that a device runs, and a fallback for WebGL2. Give each pass a name and a texture name of its own. Remove passes that no longer draw before you add more.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
30
|
+
|
|
31
|
+
## Example message
|
|
32
|
+
|
|
33
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
34
|
|
|
21
35
|
```text
|
|
22
36
|
E1220: render.addPass() got writes "minimap", which the pass "minimap" writes already. Give each pass a texture name of its own.
|
|
23
37
|
```
|
|
38
|
+
|
|
39
|
+
## See also
|
|
40
|
+
|
|
41
|
+
- [Error codes](index.md)
|
|
42
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1221.md
CHANGED
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1221
|
|
3
3
|
title: "E1221: Invalid levels of detail"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "mesh.setLevels() received levels that the mesh cannot take, or a glTF file's MSFT_lod levels could not become them. Each level's error, distance or coverage must be a finite number above 0, and its switch distance must lie farther than the level's before it. A coarser level covers more of the screen, so its coverage is smaller. A mesh takes at most 15 lower levels. Each level must be another live mesh of the same engine, with the same vertex attributes as the base mesh. A level's material, where it gives one, must be a live material of the same engine. mesh.buildLevels() refuses a mesh with joints, morph targets or a vertex record, whose shape poses or moves."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "`mesh.setLevels()` received levels that the mesh cannot take, or a glTF file's MSFT_lod levels could not become them. Each level gives one of an error, a distance and a coverage, and the switch distances grow from level to level."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1221: Invalid levels of detail
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
mesh.setLevels() received levels that the mesh cannot take, or a glTF file's MSFT_lod levels could not become them. Each level
|
|
12
|
+
`mesh.setLevels()` received levels that the mesh cannot take, or a glTF file's MSFT_lod levels could not become them. Each level gives one of an error, a distance and a coverage, and the switch distances grow from level to level.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: the rules for each level</summary>
|
|
16
|
+
|
|
17
|
+
A mesh takes at most 15 lower levels. Each level gives exactly one of an error, a distance and a coverage, as a finite number above 0. Its switch distance must lie farther than the level before it, and a coarser level covers more of the screen, so its coverage is smaller.
|
|
18
|
+
|
|
19
|
+
Each level must be another live mesh of the same engine, with the same vertex attributes as the base mesh. A level's material, where it gives one, must be a live material of the same engine. The `fov` option sets the reference view, and lies between 0 and 180.
|
|
20
|
+
|
|
21
|
+
`mesh.buildLevels()` refuses a mesh with joints, morph targets or a vertex record, whose shape poses or moves.
|
|
22
|
+
|
|
23
|
+
</details>
|
|
14
24
|
|
|
15
25
|
## How to fix it
|
|
16
26
|
|
|
17
27
|
List the levels from the most detailed down, each with a larger error, a farther distance or a smaller coverage than the one before, at most 15 of them. Make each level from the same kind of arrays as the base mesh, with the same attributes, such as the same texture coordinates and tangents. Give a mesh that poses or moves its levels with setLevels, not buildLevels.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
30
|
+
|
|
31
|
+
## Example message
|
|
32
|
+
|
|
33
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
34
|
|
|
21
35
|
```text
|
|
22
36
|
E1221: mesh.setLevels() got an error of 0.02 for level 2, not above the 0.05 of level 1. Errors grow from level to level.
|
|
23
37
|
```
|
|
38
|
+
|
|
39
|
+
## See also
|
|
40
|
+
|
|
41
|
+
- [Error codes](index.md)
|
|
42
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1222.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1222
|
|
3
3
|
title: "E1222: Invalid light probe grid texture"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "scene.setLightProbeGrid() received a texture that is not a 3D texture. A probe grid sample reads a 3D texture, so the frame cannot bind a texture array in its place. setLightProbeGrid() also refuses a texture that is not live."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ scene.setLightProbeGrid() received a texture that is not a 3D texture. A probe g
|
|
|
16
15
|
|
|
17
16
|
Make the grid's texture with LightProbeGridData.toTexture(), which a 3D texture alone holds, or with textures.fromVolumeData(). An image texture, or one made with textures.fromData() and a depth, is a texture array, which the probe grid cannot bind.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
19
|
+
|
|
20
|
+
## Example message
|
|
21
|
+
|
|
22
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
23
|
|
|
21
24
|
```text
|
|
22
25
|
E1222: setLightProbeGrid() got a texture that is not a 3D texture. Make the grid's texture with LightProbeGridData.toTexture().
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1223.md
CHANGED
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1223
|
|
3
3
|
title: "E1223: Invalid feature description"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "defineFeature(), FeatureRegistry.add(), addFeatureDraw(), post.addFeatureEffect(), scene.setSkyLayer() or a compute pass of render.addPass() got a description that it cannot take: an unknown option, a name that is empty or longer than 64 characters, a frame point or kind that does not exist or does not go together, an order outside its band, an unknown resource, lighting slot or view, a resource or view without a frame point, an output with no neutral default, a feature name, output name or debug view name that another feature has, a lighting slot that another feature provides, a debug view name that names one of the views that the engine draws itself or gives no set callback, a draw at a frame point, view or alpha mode that the draw adapter does not place, a full-screen effect at another frame point or view, writing another resource, reading one the effect chain does not bind, publishing an output, providing a slot, or disagreeing with its WGSL about the scene depth, a sky layer that does not record at the background point, as a draw, providing the sky and drawing in the three views, or a compute pass at a frame point, view, scene resource read or output that the compute adapter does not place."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A call that registers a feature, a feature draw, a full-screen effect, a sky layer or a compute pass got a description it cannot take. The message names the value and the rule that it breaks."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1223: Invalid feature description
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
A call that registers a feature, a feature draw, a full-screen effect, a sky layer or a compute pass got a description it cannot take. The message names the value and the rule that it breaks.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: every description that the engine refuses</summary>
|
|
16
|
+
|
|
17
|
+
- Names: a name that is empty, longer than 64 characters, or holds a line break. A feature, output or debug view name that another feature has. An output name that names one of the engine's own resources.
|
|
18
|
+
- Frame points, kinds and order: a frame point or kind that does not exist, or two that do not go together. A kind, read, write or view without a frame point. An order outside its band.
|
|
19
|
+
- Resources, slots, views and outputs: an unknown resource, lighting slot or view, or the same one twice. An output without a neutral default. A lighting slot that another feature provides. A debug view that names an engine view, or whose set is not a function.
|
|
20
|
+
- Settings and budgets: an option that a description does not take. A setting whose presets are not four values from its range. A governor without a budget. A budget whose presets are not four times above 0, or whose minimum is outside 0 to 1.
|
|
21
|
+
- The GPU scope: a pass that `render.addPass()` did not return.
|
|
22
|
+
|
|
23
|
+
</details>
|
|
14
24
|
|
|
15
25
|
## How to fix it
|
|
16
26
|
|
|
17
|
-
Give each feature and output a name of its own. Give a frame point and a kind that go together,
|
|
27
|
+
Give each feature and output a name of its own. Give a frame point and a kind that go together, and keep the order inside its band. Name resources, lighting slots and views from the lists, and give every output a neutral default. One feature provides each lighting slot, and a setting takes the values that its range allows.
|
|
28
|
+
|
|
29
|
+
<details>
|
|
30
|
+
<summary>Technical details: what each kind of feature accepts</summary>
|
|
31
|
+
|
|
32
|
+
| Kind | Frame point | Views | Rules |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| Draw | 'opaque', 'transparent' or 'resolve' | main | The alpha mode must match the frame. |
|
|
35
|
+
| Full-screen effect | 'resolve' | main | Reads 'sceneColor', and 'sceneDepth' when its WGSL reads the depth. Writes 'sceneColor' alone. |
|
|
36
|
+
| Sky layer | 'background' | main, scenePass and reflection | Provides 'sky'. |
|
|
37
|
+
| Compute pass | 'background', 'opaque', 'transparent', 'resolve' or 'post' | main | Reads no scene resource. Publishes one output texture, or fills an instance draw's buffers. |
|
|
38
|
+
|
|
39
|
+
A full-screen effect publishes no texture and provides no lighting slot. A compute pass that fills an instance draw publishes no output. A budget gives its time in ms at full quality on each preset: four numbers above 0.
|
|
18
40
|
|
|
19
|
-
|
|
41
|
+
</details>
|
|
42
|
+
|
|
43
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
44
|
+
|
|
45
|
+
## Example message
|
|
46
|
+
|
|
47
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
48
|
|
|
21
49
|
```text
|
|
22
50
|
E1223: FeatureRegistry.add() got the slot 'ao', which the feature 'ambient-occlusion' provides already. One feature provides each lighting slot.
|
|
23
51
|
```
|
|
52
|
+
|
|
53
|
+
## See also
|
|
54
|
+
|
|
55
|
+
- [Error codes](index.md)
|
|
56
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1224.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1224
|
|
3
3
|
title: "E1224: Material cannot draw a mesh"
|
|
4
|
-
|
|
5
|
-
since: "0.3"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "scene.overrideMaterial received a sprite, point or line material. Such a material draws the rows of its batch, or a sprite or line of its own, rather than the surface of a mesh, so it cannot stand in for every mesh of the pass."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ scene.overrideMaterial received a sprite, point or line material. Such a materia
|
|
|
16
15
|
|
|
17
16
|
Give scene.overrideMaterial a material that draws meshes, from materials.standard(), materials.unlit(), materials.shader() or materials.decal(), or null to draw each mesh with its own material.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
19
|
+
|
|
20
|
+
## Example message
|
|
21
|
+
|
|
22
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
23
|
|
|
21
24
|
```text
|
|
22
25
|
E1224: scene.overrideMaterial got a sprite material. It takes a material that draws meshes, from materials.standard(), materials.unlit(), materials.shader() or materials.decal().
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1225.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1225
|
|
3
3
|
title: "E1225: Add-on name clash"
|
|
4
|
-
|
|
5
|
-
since: "0.3"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "An add-on registered a name that the engine or another add-on holds: its namespace, its shader library, an error-code range, a quality key, or the name of a feature, output or lighting slot. A namespace also names the package that owns it, so a second add-on that takes the name is refused even when its other fields match, while a reload of the same package keeps its namespace. Two add-ons cannot share a name, a range or a key, because the engine would have two answers for one of them."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ An add-on registered a name that the engine or another add-on holds: its namespa
|
|
|
16
15
|
|
|
17
16
|
Give each add-on a namespace of its own: one name at declareAddonNamespace(), claimed once where the add-on's module loads, with the package that owns it. Let its shader library default to that name, keep its error codes inside 2000 to 9999, and give its quality keys names that the engine's table lacks. Give each feature, output and lighting slot a name that no other add-on registers. Two add-ons that share a name cannot load together.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
19
|
+
|
|
20
|
+
## Example message
|
|
21
|
+
|
|
22
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
23
|
|
|
21
24
|
```text
|
|
22
25
|
E1225: declareAddonNamespace() got the add-on name 'water' for the package '@ben/water', which the package '@ana/water' claims already. Give each add-on a name of its own.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|