@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/E1412.md
CHANGED
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1412
|
|
3
3
|
title: "E1412: Asset not decoded"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "A loading call downloaded its file but could not read it. The browser could not decode the image, as with a format it does not support. Or the file was a KTX2 file that the engine does not load, or not valid JSON. Or it was a color grading table that the engine does not read, such as a 1D table or one with a texel missing. Or it was not an environment map that `bunx @null3d/cli assets env` writes. The message says what in the file the engine could not read, with its line where it has one. A KTX2 file also fails before it transcodes when it passes a limit. It may be wider or taller than textures.maxSize, or hold more than 256 layers. It may hold more mip levels than its size has, or texels of more than 256 MiB. A PNG or JPEG file fails before it decodes when its header gives a side longer than textures.maxSize, or 16,384 for loadImageBitmap."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A loading call downloaded its file but could not read it. The message says what in the file the engine could not read, with its line where it has one."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1412: Asset not decoded
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
A loading call downloaded its file but could not read it. The
|
|
12
|
+
A loading call downloaded its file but could not read it. The message says what in the file the engine could not read, with its line where it has one.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: the files that the readers refuse and their limits</summary>
|
|
16
|
+
|
|
17
|
+
- An image that the browser cannot decode, such as one in a format that it does not support.
|
|
18
|
+
- A KTX2 file that the engine does not load.
|
|
19
|
+
- A file that is not valid JSON.
|
|
20
|
+
- A color grading table that the engine does not read, such as a 1D table or one with a texel missing.
|
|
21
|
+
- A file that is not an environment map that `bunx @null3d/cli assets env` writes.
|
|
22
|
+
|
|
23
|
+
A KTX2 file fails before it transcodes when it is wider or taller than `textures.maxSize`, or holds more than 256 layers. It also fails when it holds more mip levels than its size has, or texels of more than 256 MiB.
|
|
24
|
+
|
|
25
|
+
A PNG, JPEG, WebP or AVIF file fails before it decodes when its header gives a side longer than `textures.maxSize`, or longer than 16,384 for `assets.loadImageBitmap()`.
|
|
26
|
+
|
|
27
|
+
</details>
|
|
14
28
|
|
|
15
29
|
## How to fix it
|
|
16
30
|
|
|
17
|
-
Give loadTexture and loadImageBitmap a PNG, JPEG or WebP file, or an AVIF file in
|
|
31
|
+
Give `loadTexture` and `loadImageBitmap` a PNG, JPEG or WebP file, or an AVIF file in a browser that decodes AVIF. Give `loadTexture` KTX2 files of 2D ETC1S or UASTC data, as basisu writes them. Give `loadJson` valid JSON, and check that the server sends the file itself, not an error page. Save KTX2 textures no larger than `textures.maxSize` on each side.
|
|
18
32
|
|
|
19
|
-
|
|
33
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
34
|
+
|
|
35
|
+
## Example message
|
|
36
|
+
|
|
37
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
38
|
|
|
21
39
|
```text
|
|
22
40
|
E1412: assets.loadTexture() could not decode https://example.com/tex/brick.tga as an image: The source image could not be decoded.
|
|
23
41
|
```
|
|
42
|
+
|
|
43
|
+
## See also
|
|
44
|
+
|
|
45
|
+
- [Error codes](index.md)
|
|
46
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1413.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1413
|
|
3
3
|
title: "E1413: Asset from another origin blocked"
|
|
4
|
-
|
|
5
|
-
since: "0.1"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "A loading call could not read a file from another origin. The browser reads such a file only when its server allows the page's origin with an Access-Control-Allow-Origin header. The browser gives no reason, so the server may also have been unreachable."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ A loading call could not read a file from another origin. The browser reads such
|
|
|
16
15
|
|
|
17
16
|
Serve the file from the same origin as the page, or have its server send Access-Control-Allow-Origin with the page's origin or *. On a page with Cross-Origin-Embedder-Policy: require-corp, the file needs that header too.
|
|
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
|
E1413: assets.loadTexture() could not read https://cdn.example.com/brick.png: its server did not allow this page to read it, or could not be reached (Failed to fetch).
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1414.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1414
|
|
3
3
|
title: "E1414: Frame not captured"
|
|
4
|
-
|
|
5
|
-
since: "0.1"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "engine.capture() could not give an image of a frame. The engine had stopped, or the thread that draws could not read the frame back from the GPU or encode it. The thread that draws can also stop taking messages, as when a GPU call never returns: the engine then fails the request once its wait for the answer has taken longer than its limit, instead of leaving the call to wait with no end."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ engine.capture() could not give an image of a frame. The engine had stopped, or
|
|
|
16
15
|
|
|
17
16
|
Call engine.capture() while the engine runs, before destroy(). When the message names a GPU failure, wait for the engine to recover from it and call capture() again. When it says that the worker did not answer, the thread that draws is stuck, often inside a GPU call that never returned: reload the page, or start another engine on another canvas.
|
|
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
|
E1414: engine.capture() failed: the engine has stopped.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1415.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1415
|
|
3
3
|
title: "E1415: Page thread already runs a sketch"
|
|
4
|
-
|
|
5
|
-
since: "0.1"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "createEngine() was asked to run a sketch on the page's thread while another engine still runs its sketch there. The page's copy of the engine core serves one engine at a time. This happens with sketchThread: 'main', and in the single-threaded build, which runs every sketch on the page's thread."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ createEngine() was asked to run a sketch on the page's thread while another engi
|
|
|
16
15
|
|
|
17
16
|
Stop the other engine with destroy() and wait for its promise before you start this one. To run both at once, leave out sketchThread: 'main' on one of them, so that its sketch runs in a worker.
|
|
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
|
E1415: createEngine() found another engine that runs its sketch on this page, which has not stopped.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1416.md
CHANGED
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1416
|
|
3
3
|
title: "E1416: glTF file not read"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "assets.loadGltf() downloaded a file that is not a glTF 2.0 model it can read. Its JSON or binary chunk may be broken, or an offset or a count may point past the data. A buffer or an image may be missing, or its nodes may form a loop. A skin or a clip may break glTF's rules, such as key times that fall back. Draco data may not decode, or decode to other counts than its accessors give. Or its skins and clips may move more than 1,024 nodes, which is more than one skeleton holds. Or the file would decode to more than the engine allows one file. That is 64 MiB, plus 32 bytes for each byte of the file and its buffers, up to 1 GiB. A block of meshopt data counts against that total. One array may hold at most 256 MiB. Or a clip would hold more than 4,194,304 keys, its frames times its tracks. A PNG or JPEG image inside the file may claim sides past 4,096, or its images may decode to more than 1 GiB. Or the rewriteUrl option refused an address that the file names."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "assets.loadGltf() could not read a file as a glTF 2.0 model. The file is broken, it goes past a limit of the engine, or the rewriteUrl option refused an address that it names. The message names the part that failed."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1416: glTF file not read
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
assets.loadGltf()
|
|
12
|
+
assets.loadGltf() could not read a file as a glTF 2.0 model. The file is broken, it goes past a limit of the engine, or the rewriteUrl option refused an address that it names. The message names the part that failed.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: the limits for one model file</summary>
|
|
16
|
+
|
|
17
|
+
- A broken file: a broken JSON or binary chunk, an offset or count past the data, a missing buffer or image, a node loop, a skin or clip that breaks glTF's rules, or Draco data that does not decode to the counts its accessors give.
|
|
18
|
+
- Decoded data for one file: 64 MiB, plus 32 bytes for each byte of the file and its buffers, up to 1 GiB. A block of meshopt data counts too.
|
|
19
|
+
- One array: 256 MiB.
|
|
20
|
+
- Nodes moved by skins and clips: 1,024.
|
|
21
|
+
- Keys in one clip, its frames times its tracks: 4,194,304.
|
|
22
|
+
- Sides of one PNG or JPEG image: 4,096. Decoded images: 1 GiB.
|
|
23
|
+
|
|
24
|
+
</details>
|
|
14
25
|
|
|
15
26
|
## How to fix it
|
|
16
27
|
|
|
17
|
-
Check that the file is a glTF 2.0 model
|
|
28
|
+
Check that the file is a glTF 2.0 model: a .glb file, or a .gltf file with its buffers and images beside it. For a broken file, open it in the Khronos glTF Validator and export it again. For a skeleton that is too large, export each character to its own file. For a file over a size limit, split it or simplify its meshes.
|
|
29
|
+
|
|
30
|
+
[Where problems appear](../guides/debugging.md#where-problems-appear) says where each kind of error reaches your code.
|
|
18
31
|
|
|
19
|
-
## Example
|
|
32
|
+
## Example message
|
|
33
|
+
|
|
34
|
+
The engine prints the part below, then the fix above and a link to this page.
|
|
20
35
|
|
|
21
36
|
```text
|
|
22
37
|
E1416: assets.loadGltf() could not read https://example.com/ship.glb: accessor 3 reads 4800 bytes from bufferView 1, which holds 2400.
|
|
23
38
|
```
|
|
39
|
+
|
|
40
|
+
## See also
|
|
41
|
+
|
|
42
|
+
- [Assets](../api/assets.md)
|
|
43
|
+
- [Error codes](index.md)
|
|
44
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1417.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1417
|
|
3
3
|
title: "E1417: glTF feature not supported"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "A glTF file needs an extension that the engine does not read, as its extensionsRequired list says. When a foundation add-on reads that extension, the message names the package to import, such as \"Import @null3d/splats, which reads it\", and that add-on registers the handler that loads the file. Or a call asked a model for something it cannot give, such as instance batches of a model with no meshes."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ A glTF file needs an extension that the engine does not read, as its extensionsR
|
|
|
16
15
|
|
|
17
16
|
Export the model again without the extension that the message names, or import the add-on that the message names and register its handler on assets. Call createInstances with a model that has meshes and no instancing of its own, or with one of its meshes and a 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
|
E1417: assets.loadGltf() cannot load https://example.com/ship.glb: it requires KHR_materials_variants, which the engine does not read.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1418.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1418
|
|
3
3
|
title: "E1418: WebAssembly blocked by the page"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "The page's Content-Security-Policy does not allow WebAssembly, so the engine core, the KTX2 transcoder, the meshopt decoder or the Draco decoder could not compile. A policy allows it only when its script-src, or its default-src without a script-src, holds 'wasm-unsafe-eval'."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,18 @@ The page's Content-Security-Policy does not allow WebAssembly, so the engine cor
|
|
|
16
15
|
|
|
17
16
|
Add 'wasm-unsafe-eval' to the script-src of the page's Content-Security-Policy, for example script-src 'self' 'wasm-unsafe-eval'. It allows WebAssembly and no JavaScript eval. The hosting page of the docs gives the whole policy that the engine needs.
|
|
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
|
E1418: the page's Content-Security-Policy does not let the threaded engine core compile: WebAssembly.compileStreaming(): Refused to compile or instantiate WebAssembly module.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Hosting and cross-origin isolation](../getting-started/hosting.md)
|
|
31
|
+
- [Error codes](index.md)
|
|
32
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1419.md
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1419
|
|
3
3
|
title: "E1419: Canvas held by another engine"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "createEngine() got a canvas that another engine still draws on, or a canvas whose drawing thread ended, so no engine can draw on it again. That thread ends when it fails, or when the canvas leaves the page. It also ends when the page goes away, or when the browser refuses memory for a new engine. A canvas serves one engine at a time. After destroy(), a new engine can start on the same canvas."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "`createEngine()` got a canvas that another engine still draws on, or a canvas whose drawing thread ended, so no engine can draw on it again. That thread ends when it fails, when the canvas leaves the page, or when the browser refuses memory for a new engine. A canvas serves one engine at a time, but after `destroy()` a new engine can start on it."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1419: Canvas held by another engine
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
createEngine() got a canvas that another engine still draws on, or a canvas whose drawing thread ended, so no engine can draw on it again. That thread ends when it fails,
|
|
12
|
+
`createEngine()` got a canvas that another engine still draws on, or a canvas whose drawing thread ended, so no engine can draw on it again. That thread ends when it fails, when the canvas leaves the page, or when the browser refuses memory for a new engine. A canvas serves one engine at a time, but after `destroy()` a new engine can start on it.
|
|
14
13
|
|
|
15
14
|
## How to fix it
|
|
16
15
|
|
|
17
16
|
Wait for the other engine's destroy() promise before you start a new engine on its canvas. In React, call destroy() in the effect's cleanup. When the message says that no engine can draw on the canvas again, put a new canvas element in its place.
|
|
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
|
E1419: createEngine() got a canvas that another engine draws on, which has not stopped.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1420.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1420
|
|
3
3
|
title: "E1420: Engine stopped"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "Sketch code called the engine after the engine stopped, from a timer, a promise or an event handler that outlived destroy(). The call did nothing. engine.firstFrame rejects with it too when the page destroys the engine before its first frame."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ Sketch code called the engine after the engine stopped, from a timer, a promise
|
|
|
16
15
|
|
|
17
16
|
Remove the sketch's timers, event listeners and message handlers in its onDestroy callback, which runs when the engine stops. A page that destroys an engine before its first frame stops waiting for engine.firstFrame, or catches its rejection.
|
|
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
|
E1420: a call reached the engine after it stopped.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1421.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1421
|
|
3
3
|
title: "E1421: Unknown feature to preload"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "createEngine()'s preload option names a feature whose shaders the engine does not have. The features are ao, background, bloom, coat_sheen, coverage, cutout, dof, effect_groups, hash, lines, lod_fade, morph, occlusion, row_values, skinning, sky, sprites, transmission and views, and instance_index and texcoords for the engine's own tests."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ createEngine()'s preload option names a feature whose shaders the engine does no
|
|
|
16
15
|
|
|
17
16
|
Name each feature as the message lists it. Leave a feature out to let its shaders download the first time the sketch uses it.
|
|
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
|
E1421: createEngine() got 'skining' in preload. The features are ao, background, bloom, coat_sheen, coverage, cutout, dof, effect_groups, hash, instance_index, lines, lod_fade, morph, occlusion, row_values, skinning, sky, sprites, texcoords, transmission, views.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1422.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1422
|
|
3
3
|
title: "E1422: Engine file blocked by the page"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "The engine's files come from another origin than the page, such as a CDN, and the page's Content-Security-Policy blocks one of them. The engine starts each worker from a blob: address that imports the worker's script from that origin, and downloads its .wasm files from there. So the policy's worker-src must allow blob: and the other origin, and its script-src and connect-src must allow the other origin too. Firefox checks the modules that a worker imports against worker-src."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,18 @@ The engine's files come from another origin than the page, such as a CDN, and th
|
|
|
16
15
|
|
|
17
16
|
Add what the message names to the page's Content-Security-Policy. Its worker-src needs blob: and the origin of the engine's files, and its script-src and connect-src need that origin. For example: worker-src 'self' blob: https://cdn.example.com; script-src 'self' https://cdn.example.com 'wasm-unsafe-eval'; connect-src 'self' https://cdn.example.com. Or serve the engine's files from the page's own origin.
|
|
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
|
E1422: the page's Content-Security-Policy blocks the job-0 worker: its worker-src does not allow blob:, which the engine starts its workers from when its files come from another origin.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Hosting and cross-origin isolation](../getting-started/hosting.md)
|
|
31
|
+
- [Error codes](index.md)
|
|
32
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1423.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1423
|
|
3
3
|
title: "E1423: Engine file without CORS"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "The engine's files come from another origin than the page, such as a CDN. One of them came without a CORS header, or did not download. A page loads a module or a .wasm file from another origin only when the response carries Access-Control-Allow-Origin."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,18 @@ The engine's files come from another origin than the page, such as a CDN. One of
|
|
|
16
15
|
|
|
17
16
|
Have the server of the engine's files send Access-Control-Allow-Origin with the page's origin or *, on every file: the scripts, the workers and the .wasm files. If it does, check that the file exists at the address that the message names.
|
|
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
|
E1423: the KTX2 transcoder from https://cdn.example.com came without a CORS header, or did not download: Failed to fetch.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Hosting and cross-origin isolation](../getting-started/hosting.md)
|
|
31
|
+
- [Error codes](index.md)
|
|
32
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1424.md
CHANGED
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1424
|
|
3
3
|
title: "E1424: Custom shader builds not downloaded"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "A set of a custom shader's builds did not download. The null3D Vite plugin builds each custom material, effect and tone curve for every GPU path, and puts the builds in files of their own beside the sketch's files. A material's files are named material-*.js: one for each GPU path, each kind of device, and the builds that skin. An effect's and a tone curve's are named effect-*.js and curve-*.js: one for each GPU path. A page downloads its device's file when the sketch first uses the shader, and another material file when a pipeline needs it, such as the builds that skin for the first skinned mesh. The server answered with an error or sent another file in its place, such as a web page, or the connection broke off. The engine then draws no new frames."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: "A file that holds a custom shader's builds did not download, so the engine draws no new frames. The server answered with an error, sent another file in its place, such as a web page, or the connection broke off."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# E1424: Custom shader builds not downloaded
|
|
10
9
|
|
|
11
10
|
## What happened
|
|
12
11
|
|
|
13
|
-
A
|
|
12
|
+
A file that holds a custom shader's builds did not download, so the engine draws no new frames. The server answered with an error, sent another file in its place, such as a web page, or the connection broke off.
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Technical details: the shader build files</summary>
|
|
16
|
+
|
|
17
|
+
The null3D Vite plugin builds each custom material, effect and tone curve for every GPU path. It puts the builds in files of their own beside the sketch's files.
|
|
18
|
+
|
|
19
|
+
A material's files are named material-*.js: one for each GPU path and each set of builds that the device fixes. Those sets hold the builds that tone map or skin. An effect's and a tone curve's files are named effect-*.js and curve-*.js: one for each GPU path.
|
|
20
|
+
|
|
21
|
+
A page downloads its device's file when the sketch first uses the shader. It downloads another material file when a pipeline needs one, such as the builds that skin for the first skinned mesh.
|
|
22
|
+
|
|
23
|
+
</details>
|
|
14
24
|
|
|
15
25
|
## How to fix it
|
|
16
26
|
|
|
17
27
|
Deploy every file that the build wrote, the material-*.js, effect-*.js and curve-*.js files among them, from one build, and serve them as JavaScript at the paths that the build gave them. A strict Content-Security-Policy must allow them in its script-src. On the dev server, reload the page. After a failure during play, destroy the engine and start a new one.
|
|
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
|
E1424: the builds of a custom shader did not load: Failed to fetch dynamically imported module: https://example.com/assets/material-glsl-3-4c1d2e9a5b6f7081-Bx3kQ9.js.
|
|
23
37
|
```
|
|
38
|
+
|
|
39
|
+
## See also
|
|
40
|
+
|
|
41
|
+
- [Error codes](index.md)
|
|
42
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1425.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1425
|
|
3
3
|
title: "E1425: Pointer lock refused"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "engine.requestPointerLock() asked the browser to lock the pointer to the canvas, and the browser refused or ended the lock before it began. Browsers lock the pointer only right after the user clicks or presses a key. They never lock it on phones or in some frames, and they refuse for a moment after the user pressed Esc."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ engine.requestPointerLock() asked the browser to lock the pointer to the canvas,
|
|
|
16
15
|
|
|
17
16
|
Call engine.requestPointerLock() inside a click or key handler on the page, as browsers lock the pointer only right after the user acts. A page in an iframe needs allow-pointer-lock in the iframe's sandbox attribute. Browsers on phones have no pointer lock, so give touch screens other controls. Pressing Esc ends the lock, and Chrome then refuses a new lock for about a second.
|
|
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
|
E1425: the browser refused the pointer lock: NotAllowedError.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1426.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1426
|
|
3
3
|
title: "E1426: Pointer lock with input off"
|
|
4
|
-
|
|
5
|
-
since: "0.3"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "engine.requestPointerLock() asked for the pointer lock on an engine started with input: false. The lock is part of the engine's input: the sketch reads the mouse's movement through the engine's listeners, which that option turns off. So the engine takes no lock, and leaves the lock to the code that records the page's input."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ engine.requestPointerLock() asked for the pointer lock on an engine started with
|
|
|
16
15
|
|
|
17
16
|
Lock the pointer through the code that records the page's input, which reads the mouse's movement: call canvas.requestPointerLock() there. Or start the engine without input: false, so that the sketch reads the movement through engine.requestPointerLock().
|
|
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
|
E1426: engine.requestPointerLock() was called on an engine started with input: false, which reads no pointer movement.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1430.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1430
|
|
3
3
|
title: "E1430: Too many reflection probes"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "scene.createReflectionProbe() would make a 17th reflection probe, and a scene has at most 16. Or the scene's first probe needs 6 views of the scene for its captures. The scene and its passes share 32 views, and its passes left fewer than 6."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ scene.createReflectionProbe() would make a 17th reflection probe, and a scene ha
|
|
|
16
15
|
|
|
17
16
|
Destroy a probe that you no longer need before you make another, or let one probe's box cover more of the scene. Probes blend where their boxes overlap, so a few large boxes with a blend distance often look as good as many small ones. For the views, remove a scene pass or a reflection pass before you make the first probe.
|
|
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
|
E1430: scene.createReflectionProbe() would make reflection probe 17; a scene has at most 16.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1431.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1431
|
|
3
3
|
title: "E1431: Area lights' tables missing"
|
|
4
|
-
|
|
5
|
-
since: "0.2"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "The sketch made a rectangle or tube light, and the file of the area lights' fitted tables did not download. The engine's package ships the file, area-light-tables.bin, beside its code, and the engine downloads it with the first area light. Until the file arrives, area lights give no light. A server or a build that leaves out the file, or a Content-Security-Policy whose connect-src blocks its address, stops the download."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ The sketch made a rectangle or tube light, and the file of the area lights' fitt
|
|
|
16
15
|
|
|
17
16
|
Serve the engine's area-light-tables.bin file at the address that the message names. A build with the null3D Vite plugin copies it beside the engine's code: deploy it with the rest of the build. When the engine's files come from another origin, that server must send Access-Control-Allow-Origin, and the page's connect-src must allow the origin.
|
|
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
|
E1431: the area lights' tables did not load from https://example.com/assets/area-light-tables-Zx8c_Vb1.bin: HTTP 404
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1432.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1432
|
|
3
3
|
title: "E1432: Add-on for another engine version"
|
|
4
|
-
|
|
5
|
-
since: "0.3"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "An add-on package loaded beside an engine of another version. Each add-on ships in step with the engine and pins the engine version that it was built for, so a page may mix no two versions. The message names the add-on, its version and the engine version."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ An add-on package loaded beside an engine of another version. Each add-on ships
|
|
|
16
15
|
|
|
17
16
|
Run bunx @null3d/cli upgrade in the project's folder, then bun install, so that every null3D package takes one version. An add-on that the project builds itself names the engine version that the project develops against.
|
|
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
|
E1432: @null3d/controls 0.1.0 was built for null3D 0.1.0, and this page runs null3D 0.2.0.
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|
package/docs/errors/E1433.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: errors/E1433
|
|
3
3
|
title: "E1433: Add-on for another plugin interface"
|
|
4
|
-
|
|
5
|
-
since: "0.3"
|
|
4
|
+
generated: true
|
|
6
5
|
summary: "An add-on from another developer loaded against a plugin interface that its declared range does not include, or the add-on declares no range of whole versions. An outside add-on declares the plugin interface versions that it works with, because it ships on its own schedule. The engine's own add-ons pin the engine version instead. The message names the add-on, the range it declares and this engine's plugin interface version."
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -16,8 +15,17 @@ An add-on from another developer loaded against a plugin interface that its decl
|
|
|
16
15
|
|
|
17
16
|
Install the release of the add-on that matches this engine's plugin interface, or run the project on an engine whose plugin interface the add-on declares. The engine's own add-ons need no range: run bunx @null3d/cli upgrade, then bun install, so that each one takes the engine's version.
|
|
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
|
E1433: @acme/splats was built for plugin interface 1 to 2, and this page has plugin interface 3 (null3D 0.3.0).
|
|
23
26
|
```
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [Error codes](index.md)
|
|
31
|
+
- [Debugging](../guides/debugging.md)
|