@null3d/engine 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -0
- package/THIRD-PARTY-NOTICES.txt +0 -1
- package/dist/wasm/single/null3d.js +25 -10
- package/dist/wasm/single/null3d_bg.wasm +0 -0
- package/dist/wasm/threaded/null3d.js +25 -10
- package/dist/wasm/threaded/null3d_bg.wasm +0 -0
- package/docs/api/animation.md +114 -86
- package/docs/api/assets.md +135 -49
- package/docs/api/cameras.md +45 -12
- package/docs/api/controls.md +88 -62
- package/docs/api/debug.md +116 -41
- package/docs/api/engine.md +117 -35
- package/docs/api/feature-draws.md +23 -17
- package/docs/api/feature-effects.md +11 -11
- package/docs/api/feature-instances.md +70 -19
- package/docs/api/features.md +77 -47
- package/docs/api/geometry.md +132 -82
- package/docs/api/grass.md +55 -13
- package/docs/api/impostors.md +175 -22
- package/docs/api/input.md +24 -18
- package/docs/api/lights.md +78 -51
- package/docs/api/lines.md +41 -33
- package/docs/api/materials.md +248 -121
- package/docs/api/math.md +12 -13
- package/docs/api/objects.md +47 -22
- package/docs/api/page.md +58 -7
- package/docs/api/particles.md +33 -20
- package/docs/api/points.md +19 -31
- package/docs/api/post.md +75 -42
- package/docs/api/quality.md +42 -17
- package/docs/api/raycast.md +65 -51
- package/docs/api/reference/animation.md +10 -11
- package/docs/api/reference/assets.md +25 -22
- package/docs/api/reference/cameras.md +8 -4
- package/docs/api/reference/controls.md +134 -25
- package/docs/api/reference/debug.md +81 -14
- package/docs/api/reference/engine.md +58 -17
- 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 +287 -97
- package/docs/api/reference/grass.md +63 -3
- package/docs/api/reference/impostors.md +208 -13
- package/docs/api/reference/input.md +4 -5
- package/docs/api/reference/lights.md +13 -12
- package/docs/api/reference/lines.md +10 -11
- package/docs/api/reference/materials.md +54 -53
- package/docs/api/reference/math.md +35 -24
- package/docs/api/reference/objects.md +11 -12
- package/docs/api/reference/particles.md +31 -6
- package/docs/api/reference/points.md +6 -7
- package/docs/api/reference/post.md +21 -20
- package/docs/api/reference/quality.md +8 -5
- package/docs/api/reference/raycast.md +7 -8
- package/docs/api/reference/render.md +5 -4
- package/docs/api/reference/scene.md +52 -30
- package/docs/api/reference/sketch.md +15 -11
- package/docs/api/reference/sound.md +234 -0
- package/docs/api/reference/splats.md +42 -3
- package/docs/api/reference/sprites.md +7 -8
- package/docs/api/reference/tasks.md +16 -3
- package/docs/api/reference/terrain.md +27 -5
- package/docs/api/reference/textures.md +5 -6
- package/docs/api/reference/three-compat.md +18 -7
- package/docs/api/reference/time.md +1 -2
- package/docs/api/reference/ui.md +12 -9
- package/docs/api/reference/vertex-draws.md +5 -6
- package/docs/api/reference/water.md +153 -9
- package/docs/api/reference/wind.md +17 -4
- package/docs/api/render.md +73 -29
- package/docs/api/scene.md +164 -60
- package/docs/api/sketch.md +102 -15
- package/docs/api/sound.md +205 -0
- package/docs/api/splats.md +46 -12
- package/docs/api/sprites.md +10 -24
- package/docs/api/tasks.md +33 -24
- package/docs/api/terrain.md +42 -22
- package/docs/api/textures.md +68 -19
- package/docs/api/three-compat.md +15 -7
- package/docs/api/time.md +3 -5
- package/docs/api/ui.md +19 -23
- package/docs/api/vertex-draws.md +13 -12
- package/docs/api/water.md +262 -35
- package/docs/api/wind.md +63 -17
- package/docs/cli/null3d.md +177 -27
- package/docs/concepts/architecture.md +73 -27
- package/docs/concepts/assets.md +57 -33
- package/docs/concepts/backends.md +69 -27
- package/docs/concepts/color-management.md +54 -36
- package/docs/concepts/culling.md +68 -47
- package/docs/concepts/handles.md +14 -5
- package/docs/concepts/instances.md +74 -25
- package/docs/concepts/large-worlds.md +18 -8
- package/docs/concepts/lighting.md +155 -87
- package/docs/concepts/lod.md +126 -44
- package/docs/concepts/materials.md +58 -27
- package/docs/concepts/particle-buffer.md +48 -35
- package/docs/concepts/post-processing.md +84 -43
- package/docs/concepts/quality-preset-tables.md +56 -52
- package/docs/concepts/quality-presets.md +164 -52
- package/docs/concepts/render-graph.md +69 -29
- package/docs/concepts/render-layers.md +11 -21
- package/docs/concepts/shadows.md +105 -52
- package/docs/concepts/static-dynamic.md +22 -7
- package/docs/cookbook/index.md +164 -120
- package/docs/data/threejs-mapping.json +362 -367
- 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 +14 -6
- 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 +40 -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 +14 -6
- 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 +54 -30
- package/docs/getting-started/cdn.md +32 -10
- package/docs/getting-started/first-scene.md +21 -13
- package/docs/getting-started/hosting.md +152 -63
- package/docs/getting-started/install.md +44 -28
- package/docs/getting-started/network-use.md +33 -15
- package/docs/getting-started/project-structure.md +33 -12
- package/docs/getting-started/third-party-notices.md +12 -14
- package/docs/guides/accessibility.md +5 -5
- package/docs/guides/add-ons.md +86 -15
- package/docs/guides/agents.md +16 -9
- package/docs/guides/assets-pipeline.md +259 -82
- package/docs/guides/audio.md +115 -128
- package/docs/guides/baked-light-data.md +44 -23
- package/docs/guides/car-paint.md +38 -32
- package/docs/guides/content-pages.md +63 -35
- package/docs/guides/custom-passes.md +65 -22
- package/docs/guides/custom-shaders.md +59 -39
- package/docs/guides/debugging.md +74 -10
- package/docs/guides/deploying.md +85 -6
- package/docs/guides/deterministic-simulation.md +24 -17
- package/docs/guides/first-use-shaders.md +83 -45
- package/docs/guides/lens-kit.md +29 -26
- package/docs/guides/loading-screens.md +132 -47
- package/docs/guides/multiple-views.md +63 -13
- package/docs/guides/performance.md +192 -38
- package/docs/guides/phones.md +78 -15
- package/docs/guides/physics.md +7 -11
- package/docs/guides/screens.md +47 -33
- package/docs/guides/start-time.md +363 -0
- package/docs/guides/testing.md +152 -95
- package/docs/guides/ui-overlays.md +19 -14
- 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 +18 -23
- package/docs/moves.json +1 -0
- package/docs/nav.json +300 -0
- package/docs/pages.md +230 -209
- package/docs/porting/react-three-fiber.md +225 -6
- package/docs/porting/threejs-loop-and-threads.md +217 -7
- package/docs/porting/threejs-mapping.md +1249 -233
- package/docs/porting/threejs-materials.md +218 -6
- package/docs/porting/threejs-overview.md +240 -7
- package/docs/porting/threejs-postprocessing.md +4 -8
- package/docs/porting/threejs-shaders.md +301 -6
- package/docs/porting/threejs-unsupported.md +83 -7
- package/docs/porting/verification.md +178 -6
- package/docs/shaders/builtins.md +15 -4
- package/docs/shaders/library.md +72 -45
- package/docs/shaders/surface-functions.md +59 -23
- package/docs/shaders/wgsl-rules.md +12 -5
- package/lib/debug/channel.d.ts +103 -0
- package/lib/debug/channel.js +269 -0
- package/lib/debug/debug.d.ts +11 -9
- package/lib/debug/draw.d.ts +11 -2
- package/lib/debug/draw.js +57 -6
- package/lib/debug/inspector.d.ts +60 -0
- package/lib/debug/inspector.js +475 -0
- 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 +22 -7
- package/lib/debug/stats-panel.js +80 -13
- package/lib/debug/stats.d.ts +2 -3
- package/lib/errors/codes.d.ts +17 -3
- package/lib/errors/codes.js +117 -105
- package/lib/errors/engine-error.js +25 -10
- package/lib/errors/fixes.d.ts +1 -0
- package/lib/errors/fixes.js +20 -19
- package/lib/generated/core.d.ts +1 -1
- package/lib/generated/core.js +1 -1
- package/lib/gpu/early-builds.d.ts +68 -0
- package/lib/gpu/early-builds.js +158 -0
- package/lib/gpu/pipeline-name.d.ts +6 -0
- package/lib/gpu/pipeline-name.js +23 -0
- package/lib/gpu/variants.d.ts +8 -2
- package/lib/gpu/variants.js +39 -7
- package/lib/gpu/webgl2/backend.d.ts +63 -2
- package/lib/gpu/webgl2/backend.js +226 -8
- package/lib/gpu/webgl2/programs.d.ts +18 -0
- package/lib/gpu/webgl2/programs.js +5 -2
- package/lib/gpu/webgpu/backend.d.ts +89 -2
- package/lib/gpu/webgpu/backend.js +255 -8
- package/lib/gpu/webgpu/pipelines.d.ts +13 -0
- package/lib/gpu/webgpu/pipelines.js +28 -14
- package/lib/index.d.ts +7 -5
- package/lib/index.js +3 -2
- package/lib/math/color.d.ts +5 -5
- package/lib/math/color.js +5 -5
- package/lib/math/mat4.d.ts +6 -12
- package/lib/math/mat4.js +6 -12
- package/lib/math/namespaces/quat.d.ts +3 -3
- package/lib/math/namespaces/quat.js +3 -3
- package/lib/math/quat.d.ts +8 -12
- package/lib/math/quat.js +8 -12
- package/lib/math/random.d.ts +2 -3
- package/lib/math/random.js +2 -3
- package/lib/math/types.d.ts +4 -4
- package/lib/math/vec3.d.ts +3 -6
- package/lib/math/vec3.js +3 -6
- package/lib/page/capabilities.d.ts +8 -8
- package/lib/page/capabilities.js +39 -25
- package/lib/page/check-store.d.ts +14 -2
- package/lib/page/check-store.js +34 -11
- package/lib/page/engine.d.ts +117 -31
- package/lib/page/engine.js +438 -99
- package/lib/page/first-frame.d.ts +16 -0
- package/lib/page/first-frame.js +35 -0
- package/lib/page/frame-stats.d.ts +34 -1
- package/lib/page/frame-stats.js +15 -0
- package/lib/page/label-loop.d.ts +7 -3
- package/lib/page/label-loop.js +26 -14
- package/lib/page/labels.d.ts +3 -3
- package/lib/page/pipeline-store.d.ts +25 -0
- package/lib/page/pipeline-store.js +84 -0
- package/lib/page/start-marker.d.ts +4 -1
- package/lib/page/start-marker.js +5 -2
- package/lib/page/stats-switch.js +2 -0
- package/lib/page/switches.d.ts +38 -6
- package/lib/page/switches.js +29 -5
- package/lib/quality/check.d.ts +24 -3
- package/lib/quality/check.js +21 -7
- package/lib/quality/chooser.d.ts +6 -0
- package/lib/quality/chooser.js +8 -0
- package/lib/quality/governor.d.ts +98 -6
- package/lib/quality/governor.js +250 -20
- package/lib/quality/preset-docs.d.ts +16 -1
- package/lib/quality/preset-docs.js +3 -0
- package/lib/quality/presets.d.ts +84 -7
- package/lib/quality/presets.js +94 -2
- package/lib/render/draw.d.ts +3 -2
- package/lib/render/draw.js +15 -5
- package/lib/render/load-draw.d.ts +7 -5
- package/lib/render/load-draw.js +7 -5
- package/lib/render/loss.d.ts +28 -10
- package/lib/render/loss.js +50 -22
- package/lib/render/recovery.d.ts +20 -0
- package/lib/render/recovery.js +44 -4
- package/lib/render/renderer.d.ts +85 -9
- package/lib/render/renderer.js +181 -42
- package/lib/render/scene-renderer.d.ts +19 -1
- package/lib/render/scene-renderer.js +25 -1
- package/lib/render/webgl2-renderers.js +8 -5
- package/lib/render/webgpu-renderers.js +5 -4
- package/lib/scene/animation.d.ts +28 -32
- package/lib/scene/animation.js +12 -15
- package/lib/scene/assets.d.ts +61 -86
- package/lib/scene/assets.js +103 -236
- package/lib/scene/background.d.ts +14 -18
- package/lib/scene/background.js +5 -2
- package/lib/scene/baked-light.d.ts +2 -2
- package/lib/scene/color.d.ts +3 -3
- package/lib/scene/downloads.d.ts +2 -0
- package/lib/scene/downloads.js +371 -0
- package/lib/scene/environment.d.ts +7 -7
- package/lib/scene/environment.js +1 -1
- package/lib/scene/fake-call-values.js +3 -3
- package/lib/scene/fog.d.ts +11 -4
- package/lib/scene/fog.js +8 -2
- package/lib/scene/frame-cameras.d.ts +35 -4
- package/lib/scene/frame-cameras.js +86 -10
- package/lib/scene/gltf.d.ts +33 -3
- package/lib/scene/gltf.js +78 -49
- package/lib/scene/grading.d.ts +2 -2
- package/lib/scene/grading.js +3 -3
- package/lib/scene/ktx2.d.ts +9 -1
- package/lib/scene/ktx2.js +3 -2
- package/lib/scene/level-rule.d.ts +121 -0
- package/lib/scene/level-rule.js +130 -0
- package/lib/scene/lines.d.ts +13 -17
- package/lib/scene/lines.js +3 -3
- package/lib/scene/lut.d.ts +1 -2
- package/lib/scene/lut.js +1 -2
- package/lib/scene/particles.d.ts +7 -3
- package/lib/scene/particles.js +3 -1
- package/lib/scene/picks.d.ts +2 -2
- package/lib/scene/pointer-events.d.ts +4 -7
- package/lib/scene/post.d.ts +39 -43
- package/lib/scene/post.js +4 -1
- package/lib/scene/prefab.d.ts +7 -8
- package/lib/scene/prefab.js +7 -8
- package/lib/scene/property-animation.d.ts +1 -1
- package/lib/scene/property-animation.js +1 -1
- package/lib/scene/queries.d.ts +7 -13
- package/lib/scene/resources.d.ts +238 -261
- package/lib/scene/resources.js +179 -81
- package/lib/scene/scene.d.ts +167 -120
- package/lib/scene/scene.js +243 -103
- package/lib/scene/serial-loads.d.ts +29 -0
- package/lib/scene/serial-loads.js +68 -0
- package/lib/scene/shader-preloads.d.ts +34 -0
- package/lib/scene/shader-preloads.js +38 -0
- package/lib/scene/sprites.d.ts +14 -17
- package/lib/scene/sprites.js +5 -6
- package/lib/scene/textures.d.ts +11 -12
- package/lib/scene/textures.js +9 -10
- package/lib/scene/time-of-day.d.ts +11 -7
- package/lib/scene/time-of-day.js +11 -8
- package/lib/scene/vertex-draws.d.ts +5 -4
- package/lib/scene/vertex-draws.js +7 -5
- package/lib/shader-artifact.json +1 -0
- package/lib/shared/core.d.ts +5 -0
- package/lib/shared/core.js +1 -0
- package/lib/shared/import-once.d.ts +6 -0
- package/lib/shared/import-once.js +19 -0
- package/lib/shared/labels.d.ts +5 -2
- package/lib/shared/labels.js +5 -2
- package/lib/shared/metrics.d.ts +38 -0
- package/lib/shared/metrics.js +62 -1
- package/lib/shared/permutation-words.d.ts +2 -0
- package/lib/shared/permutation-words.js +8 -0
- package/lib/shared/recording.d.ts +13 -5
- package/lib/shared/recording.js +31 -10
- package/lib/shared/run-task.js +7 -1
- package/lib/shared/sketch-data.d.ts +9 -0
- package/lib/shared/sketch-data.js +57 -0
- package/lib/shared/task-pending.d.ts +12 -0
- package/lib/shared/task-pending.js +61 -1
- package/lib/shared/tasks.js +79 -32
- package/lib/shared/version.d.ts +17 -1
- package/lib/shared/version.js +19 -1
- package/lib/shared/wasm.d.ts +12 -4
- package/lib/shared/wasm.js +50 -27
- package/lib/shared/worker-start.d.ts +7 -0
- package/lib/shared/worker-start.js +27 -0
- package/lib/sketch/define-sketch.d.ts +51 -7
- package/lib/sketch/define-sketch.js +2 -1
- package/lib/sketch/input.d.ts +2 -2
- package/lib/sketch/preset-check.d.ts +20 -6
- package/lib/sketch/preset-check.js +42 -17
- package/lib/sketch/quality.d.ts +69 -11
- package/lib/sketch/quality.js +54 -13
- package/lib/sketch/runner.d.ts +80 -9
- package/lib/sketch/runner.js +390 -52
- package/lib/sketch/ui.d.ts +5 -8
- package/lib/sketch/ui.js +4 -2
- package/lib/stats.d.ts +1 -0
- package/lib/workers/probe-worker.d.ts +5 -0
- package/lib/workers/probe-worker.js +13 -4
- package/lib/workers/protocol.d.ts +71 -13
- package/lib/workers/protocol.js +4 -0
- package/lib/workers/render-worker.js +29 -5
- package/lib/workers/sketch-worker.js +108 -16
- package/package.json +2 -2
package/docs/pages.md
CHANGED
|
@@ -1,239 +1,260 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: pages
|
|
3
3
|
title: All pages
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
summary: "Every docs page by area, with its status and version."
|
|
4
|
+
generated: true
|
|
5
|
+
summary: The docs pages of each area and group.
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# All pages
|
|
10
9
|
|
|
11
|
-
> The docs generator writes this list from each page's front matter. [
|
|
10
|
+
> The docs generator writes this list from the docs inventory and each page's front matter. [Error codes](errors/index.md) lists every error code.
|
|
12
11
|
|
|
13
12
|
## Getting started
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
### First steps
|
|
15
|
+
|
|
16
|
+
| Page | What it covers |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| [Install null3D](getting-started/install.md) | The npm packages; the Vite plugin, which every Vite build needs; package versions always match; the optional `null3d` command. |
|
|
19
|
+
| [Your first scene](getting-started/first-scene.md) | page.ts with createEngine; sketch.ts with defineSketch; camera, light, mesh; running it with Vite. |
|
|
20
|
+
| [Project structure](getting-started/project-structure.md) | Starting from the `empty`, `product` or `game` template with `bunx @null3d/cli create`; page.ts, sketch.ts, AGENTS.md and the agent hook; what runs where. |
|
|
21
|
+
|
|
22
|
+
### Hosting and licenses
|
|
23
|
+
|
|
24
|
+
| Page | What it covers |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| [Hosting and cross-origin isolation](getting-started/hosting.md) | COOP and COEP headers; require-corp on Safari; CORS and CORP for assets; the Content-Security-Policy; the engine's files on a CDN; Brotli; the third-party notices; offline play with a service worker and the build's file list; the caches between visits; the single-threaded fallback; Electron desktop apps served from a custom scheme. |
|
|
27
|
+
| [Try null3D from a CDN](getting-started/cdn.md) | The CDN build; its production and development entries; one HTML file with no bundler; import maps; the policy and CORS headers; both thread modes; what needs a build step. |
|
|
28
|
+
| [Network use](getting-started/network-use.md) | What null3D downloads, when each file loads, the build's one download, and how to keep a page on its own origin. |
|
|
29
|
+
| [Third-party notices](getting-started/third-party-notices.md) | The third-party code in each null3D package, with its version and license, and the notices file that a build writes beside the page. |
|
|
24
30
|
|
|
25
31
|
## Concepts
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
| --- | --- | --- | --- |
|
|
29
|
-
| [Architecture: threads and the frame](concepts/architecture.md) | Main thread, sketch worker, render worker, job workers; where the sketch runs; the pipelined frame and its passes; grid cells; latency modes. | experimental | 0.1 |
|
|
30
|
-
| [Handles and objects](concepts/handles.md) | 30-bit handles; wrapper objects; stale-handle errors; keeping per-object data in your own arrays. | experimental | 0.1 |
|
|
31
|
-
| [Static and dynamic objects](concepts/static-dynamic.md) | When to mark objects static; setters versus direct array writes; dirty ranges. | experimental | 0.1 |
|
|
32
|
-
| [Instances and batching](concepts/instances.md) | createInstances; typed-array views; markDirty; automatic batching; per-row colors and values. | experimental | 0.1 |
|
|
33
|
-
| [The particle buffer](concepts/particle-buffer.md) | What a particle buffer holds: its 32-byte records, its values and its frame's values; how an emitter or sketch code writes births into it; and the limits that it meets. | experimental | 0.2 |
|
|
34
|
-
| [GPU tiers and backends](concepts/backends.md) | WebGPU core, compatibility mode and WebGL2; color, anti-aliasing and depth on each tier; capability flags; the portable budget; never branching on GPU names. | experimental | 0.1 |
|
|
35
|
-
| [Quality presets, dynamic resolution and frame budgets](concepts/quality-presets.md) | Low to Ultra; pixel-ratio caps; the preset check; switching presets; the frame-budget governor; quality events for sketch code. | experimental | 0.1 |
|
|
36
|
-
| [Color management](concepts/color-management.md) | Linear working space; sRGB hex colors and linear arrays; texture color spaces; HDR color; exposure and tone mapping; transparent canvases; parity with three.js. | experimental | 0.1 |
|
|
37
|
-
| [Materials and pipelines](concepts/materials.md) | Built-in materials; permutations; pipeline warm-up; why changing shader features can stall a frame. | experimental | 0.1 |
|
|
38
|
-
| [Lighting and environment](concepts/lighting.md) | Light types, units and exposure; clustered lighting; fog; environment maps and spherical harmonics; light probe grids; sky and environment backgrounds; the sky's light and time of day. | experimental | 0.1 |
|
|
39
|
-
| [Shadows](concepts/shadows.md) | Cascades that stay still as the camera turns and blend where they meet; contact shadows where small objects touch the ground; the shadow atlas of spot and point lights; update rates and filtering per preset; bias settings. | experimental | 0.1 |
|
|
40
|
-
| [Render layers](concepts/render-layers.md) | 32-bit layer masks that choose which cameras draw which objects and instance batches. | experimental | 0.1 |
|
|
41
|
-
| [The render graph](concepts/render-graph.md) | Declared reads and writes; automatic order; transient memory; validation errors; the text dump. | experimental | 0.1 |
|
|
42
|
-
| [Large worlds and precision](concepts/large-worlds.md) | Cell-relative positions and per-frame camera-to-cell offsets; reversed depth; largeWorld mode; batch origins; floating-origin geometry. | experimental | 0.2 |
|
|
43
|
-
| [Culling](concepts/culling.md) | Frustum culling on the GPU on WebGPU, or on the job workers there when the device draws directly, and on the job workers on WebGL2; grid cells, whole cells out of view skipped first, positions relative to the camera, and occlusion culling: behind large opaque objects that the GPU picks on WebGPU, and behind marked blockers on WebGL2. | experimental | 0.1 |
|
|
44
|
-
| [Levels of detail](concepts/lod.md) | LOD groups; levels that meshes made in code plan on the job workers; generated LODs; cluster patches; staged downloads; per-instance selection; small-object hiding. | experimental | 0.2 |
|
|
45
|
-
| [Assets and prefabs](concepts/assets.md) | glTF, KTX2, meshopt, Draco; prefabs and instantiate; upload budgets; memory. | experimental | 0.2 |
|
|
46
|
-
| [The post-processing chain](concepts/post-processing.md) | HDR scene color, ambient occlusion and screen-space reflections at half size, custom effects, depth of field with near and far fields, bloom through a chain of mip levels, automatic exposure from a meter on the GPU, an outline mask, and the final pass for the vignette, tone mapping, FXAA, outlines, color grading and dithering, in two steps once the render scale can drop below the whole canvas; still views that blend and then rest the GPU. | experimental | 0.2 |
|
|
47
|
-
| [Quality preset tables](concepts/quality-preset-tables.md) | Each preset's starting devices, GPU path caps, check rules and settings. | generated | 0.1 |
|
|
33
|
+
### How the engine runs
|
|
48
34
|
|
|
49
|
-
|
|
35
|
+
| Page | What it covers |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| [Architecture: threads and the frame](concepts/architecture.md) | Main thread, sketch worker, render worker, job workers; where the sketch runs; the pipelined frame and its passes; grid cells; latency modes. |
|
|
38
|
+
| [Handles and objects](concepts/handles.md) | 30-bit handles; wrapper objects; stale-handle errors; keeping per-object data in your own arrays. |
|
|
39
|
+
| [Static and dynamic objects](concepts/static-dynamic.md) | When to mark objects static; setters versus direct array writes; dirty ranges. |
|
|
40
|
+
| [Instances and batching](concepts/instances.md) | createInstances; typed-array views; markDirty; automatic batching; per-row colors and values. |
|
|
41
|
+
| [The particle buffer](concepts/particle-buffer.md) | What a particle buffer holds: its 32-byte records, its values and its frame's values; how an emitter or sketch code writes births into it; and the limits that it meets. |
|
|
42
|
+
| [Assets and prefabs](concepts/assets.md) | glTF, KTX2, meshopt, Draco; prefabs and instantiate; upload budgets; memory. |
|
|
43
|
+
| [GPU tiers and backends](concepts/backends.md) | WebGPU core, compatibility mode and WebGL2; color, anti-aliasing and depth on each tier; capability flags; the portable budget; never branching on GPU names. |
|
|
44
|
+
| [Quality presets, dynamic resolution and frame budgets](concepts/quality-presets.md) | Low to Ultra; pixel-ratio caps; the preset check; switching presets; the frame-budget governor; quality events for sketch code. |
|
|
45
|
+
| [Quality preset tables](concepts/quality-preset-tables.md) | Each preset's starting devices, GPU path caps, check rules and settings. |
|
|
46
|
+
|
|
47
|
+
### Drawing a frame
|
|
48
|
+
|
|
49
|
+
| Page | What it covers |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| [Color management](concepts/color-management.md) | Linear working space; sRGB hex colors and linear arrays; texture color spaces; HDR color; exposure and tone mapping; transparent canvases. |
|
|
52
|
+
| [Materials and pipelines](concepts/materials.md) | Built-in materials; shader variants; pipeline warm-up; why a new combination of shader features costs a build. |
|
|
53
|
+
| [Lighting and environment](concepts/lighting.md) | Light types, units and exposure; clustered lighting; fog; environment maps and spherical harmonics; light probe grids; sky and environment backgrounds; the sky's light and time of day. |
|
|
54
|
+
| [Shadows](concepts/shadows.md) | Cascades that stay still as the camera turns and blend where they meet; contact shadows where small objects touch the ground; the shadow atlas of spot and point lights; update rates and filtering per preset; bias settings. |
|
|
55
|
+
| [Render layers](concepts/render-layers.md) | 32-bit layer masks that choose which cameras draw which objects and instance batches. |
|
|
56
|
+
| [The render graph](concepts/render-graph.md) | Declared reads and writes; automatic order; transient memory; validation errors; the text dump. |
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
| [
|
|
64
|
-
| [Animation](api/animation.md) | The animator; play, crossFade, clip weights, start times, 1D blends, layers, joint masks, additive clips, joint overrides and look-at, events; property animation of lights, cameras and materials, glTF's KHR_animation_pointer; morph weights. | experimental | 0.2 |
|
|
65
|
-
| [Raycasting and spatial queries](api/raycast.md) | raycast, raycastAny, raycastAll, raycastBatch, overlap queries, pointer events on objects. | experimental | 0.2 |
|
|
66
|
-
| [Input](api/input.md) | Pointer, keyboard, touch and gamepad; action maps; pointer events on objects. | experimental | 0.1 |
|
|
67
|
-
| [Controls (@null3d/controls)](api/controls.md) | Orbit and map controls (0.1); fly and first-person controls, with pointer lock (0.2); drag, rotate and scale gizmos. | experimental | 0.1 |
|
|
68
|
-
| [Post-processing API](api/post.md) | post.set for tone mapping, exposure and a camera's EV100, automatic exposure, bloom, ambient occlusion, screen-space reflections, depth of field, outlines, color grading tables and controls, the vignette and sharpening; custom effects with post.addEffect, custom tone curves, and still views. | experimental | 0.1 |
|
|
69
|
-
| [Render graph API](api/render.md) | render.addPass for scene passes, reflection passes, full-screen passes and compute passes of your own WGSL that write into textures; half and quarter render sizes; the outline mask as an input; switching and removing passes; render.dumpGraph. | experimental | 0.2 |
|
|
70
|
-
| [Add-on feature descriptions](api/features.md) | One description for an add-on's render work: the frame point, the reads and writes, the callbacks, the outputs with neutral defaults, the lighting slots, the order band and the view mask. | experimental | 0.3 |
|
|
71
|
-
| [Draws from a vertex count](api/vertex-draws.md) | scene.createVertexDraw: a custom material and a vertex count with no mesh data, the vertex and instance index in the shader, a bounds sphere, and helpers that wrap positions around the camera. | experimental | 0.2 |
|
|
72
|
-
| [Add-on feature draws](api/feature-draws.md) | scene.addFeatureDraw turns a draw feature description into a draw of your WGSL, your vertices, your uniforms and the description's sort place, on both GPU paths and in every thread mode; scene.addFeatureInstances repeats that shape once for each row of a batch. | experimental | 0.3 |
|
|
73
|
-
| [Add-on feature effects](api/feature-effects.md) | post.addFeatureEffect turns a full-screen feature description into a pass of your WGSL over the scene's color, at the resolve point, on both GPU paths and in every thread mode, and draws it only while the feature is ready. | experimental | 0.3 |
|
|
74
|
-
| [Add-on instance draws](api/feature-instances.md) | scene.addComputeInstances draws a capacity of instances from your own buffer, with a count that the GPU writes, on WebGPU, and an instance batch that the CPU fills on WebGL2. | experimental | 0.3 |
|
|
75
|
-
| [Quality API](api/quality.md) | quality.preset, quality.set, quality.setPreset, the preset check, the frame-budget governor, budgets for a sketch's own systems, quality events. | experimental | 0.1 |
|
|
76
|
-
| [Debug drawing and stats](api/debug.md) | debug.line, box, sphere, arrow, axes, grid, frustum, light and skeleton; the stats overlay, debug.frameStats and @null3d/engine/stats; engine.measure and its figures; debug.view, the ?view switch and add-on views; debug.shadowCamera. | experimental | 0.1 |
|
|
77
|
-
| [Math helpers](api/math.md) | vec3, quat, mat4 and color on plain arrays; math.clamp, lerp, damp and a random generator that hold mode seeds; the maths entry and createMath for a deterministic simulation. | experimental | 0.1 |
|
|
78
|
-
| [Time](api/time.md) | dt, time.now, fixed steps. | experimental | 0.1 |
|
|
79
|
-
| [Sprites](api/sprites.md) | createSprites; world and screen size modes; atlases. | experimental | 0.2 |
|
|
80
|
-
| [Points](api/points.md) | createPoints; size attenuation; textures. | experimental | 0.2 |
|
|
81
|
-
| [Lines](api/lines.md) | createLines; strips, loops and pairs; pixel and world widths; dashes; lit lines. | experimental | 0.2 |
|
|
82
|
-
| [Particles (@null3d/particles)](api/particles.md) | createParticles: emitters, bursts and sub-emitters; closed-form GPU motion; soft particles; flipbooks made in code. | experimental | 0.2 |
|
|
83
|
-
| [Impostors (@null3d/impostors)](api/impostors.md) | createImpostors: far objects as camera-facing cards that blend the three stored views nearest the camera and light from baked normals; mergeFarGeometry: one mesh per far grid cell. | experimental | 0.2 |
|
|
84
|
-
| [Terrain (@null3d/terrain)](api/terrain.md) | createTerrain: a height field drawn as a camera-centered quadtree of blocks, lit per pixel from baked normals, with a height-blended splat surface, and heightAt and normalAt for placing objects. | experimental | 0.2 |
|
|
85
|
-
| [Grass (@null3d/grass)](api/grass.md) | createGrass: tufts of bent blades over a ground, placed by integer hashes, built in a compute pass on WebGPU with near shadows, swaying in the wind add-on's field, with a share for each quality preset. | experimental | 0.3 |
|
|
86
|
-
| [Gaussian splats (@null3d/splats)](api/splats.md) | createSplats: SPZ files, streamed chunk files and KHR_gaussian_splatting models drawn as Gaussian splats, with detail levels, a budget that follows the preset and the GPU path, and a soft mix with meshes. | experimental | 0.3 |
|
|
87
|
-
| [Water (@null3d/water)](api/water.md) | createWater: a river and a lake from one shape, with waves that the current carries, ripples, caustics, foam, a soft shore that reads the scene's depth or the shape's bed, a reflection whose cadence follows the preset, and createUnderwater for the view from below the surface. createOcean: an open sea of spectra transformed on the GPU. | experimental | 0.3 |
|
|
88
|
-
| [Wind (@null3d/wind)](api/wind.md) | createWind: one field of air that plants, flags, smoke and water read, from an analytic wind of place and time with traveling gusts and pushes, held in a grid that follows the camera. | experimental | 0.3 |
|
|
89
|
-
| [UI overlays and labels](api/ui.md) | ui.trackLabel in the sketch; engine.labels.bind on the page. | experimental | 0.2 |
|
|
90
|
-
| [Messages between sketch and page](api/page.md) | page.post and page.onMessage in the sketch; engine.postToSketch and engine.onSketchMessage on the page. | experimental | 0.1 |
|
|
91
|
-
| [Tasks on the job workers](api/tasks.md) | runTask: an add-on's code and WebAssembly on the job workers; shared memory; ordering with the frames; failures. | experimental | 0.3 |
|
|
58
|
+
### Large scenes
|
|
59
|
+
|
|
60
|
+
| Page | What it covers |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| [Large worlds and precision](concepts/large-worlds.md) | Cell-relative positions and per-frame camera-to-cell offsets; reversed depth; largeWorld mode; batch origins; floating-origin geometry. |
|
|
63
|
+
| [Culling](concepts/culling.md) | Frustum culling on the GPU on WebGPU, or on the job workers there when the device draws directly, and on the job workers on WebGL2; grid cells, whole cells out of view skipped first, positions relative to the camera, and occlusion culling: behind large opaque objects that the GPU picks on WebGPU, and behind marked blockers on WebGL2. |
|
|
64
|
+
| [Levels of detail](concepts/lod.md) | LOD groups; levels that meshes made in code plan on the job workers; generated LODs; cluster patches; staged downloads; per-instance selection; small-object hiding. |
|
|
65
|
+
|
|
66
|
+
### Effects after the scene
|
|
67
|
+
|
|
68
|
+
| Page | What it covers |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| [The post-processing chain](concepts/post-processing.md) | HDR scene color, ambient occlusion and screen-space reflections at half size, custom effects, depth of field with near and far fields, bloom through a chain of mip levels, automatic exposure from a meter on the GPU, an outline mask, and the final pass for the vignette, tone mapping, FXAA, outlines, color grading and dithering, in two steps once the render scale can drop below the whole canvas; still views that blend and then rest the GPU. |
|
|
92
71
|
|
|
93
72
|
## Guides
|
|
94
73
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
| [
|
|
100
|
-
| [
|
|
101
|
-
| [
|
|
102
|
-
| [
|
|
103
|
-
| [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
| [
|
|
110
|
-
| [
|
|
111
|
-
| [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
| [
|
|
118
|
-
| [
|
|
119
|
-
| [
|
|
120
|
-
| [
|
|
74
|
+
### Performance and loading
|
|
75
|
+
|
|
76
|
+
| Page | What it covers |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| [Performance guide](guides/performance.md) | Measuring; the frame budget on computers, phones and tablets; common causes of slow frames and their fixes. |
|
|
79
|
+
| [Phones and tablets](guides/phones.md) | Pixel-ratio caps; memory budgets; heat; testing on real devices. |
|
|
80
|
+
| [Loading screens and warm-up](guides/loading-screens.md) | The download list; preload; onProgress; loads one after another; scene.warmUp; shader files that load up front; the preset check during play or before it; upload budgets; switching presets behind a loading screen. |
|
|
81
|
+
| [Shaders that load on first use](guides/first-use-shaders.md) | The features whose shaders download on first use, which createEngine's preload takes. |
|
|
82
|
+
| [A fast start](guides/start-time.md) | Where a page's start goes, on a simulated phone link and on real phones; compression, cache headers, the compiled core and HTTP/2 on the host; the early core script; what the engine does while the core downloads; downloads of the first view and of the rest; the preset check; pipelines on phones; testing and measuring a start. |
|
|
83
|
+
|
|
84
|
+
### Shaders and rendering
|
|
85
|
+
|
|
86
|
+
| Page | What it covers |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| [Custom shaders](guides/custom-shaders.md) | WGSL in sketch code; shader errors; surface functions; full shaders; uniforms, textures and typed materials; hot reload. |
|
|
89
|
+
| [Custom passes and render targets](guides/custom-passes.md) | Custom effects and tone curves in WGSL; declaring passes; reading and writing named textures; layer masks; reflections and a water recipe; full-screen passes, a soft outline glow and effects that read textures. |
|
|
90
|
+
| [Baked light data](guides/baked-light-data.md) | One file format for probe grids and light maps baked outside the engine: the JSON members, base64 payloads, the loading calls, the engine's own bake, and the faults that the loader names. |
|
|
91
|
+
|
|
92
|
+
### Pages and UI
|
|
93
|
+
|
|
94
|
+
| Page | What it covers |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| [HTML UI around the scene](guides/ui-overlays.md) | HTML UI on the page; labels that follow objects; GUI panels. |
|
|
97
|
+
| [3D scenes on content pages](guides/content-pages.md) | Product and marketing pages: the fallback page, a load deadline, pausing off screen, scroll-driven cameras, second visits and crashes. |
|
|
98
|
+
| [Accessibility](guides/accessibility.md) | What the canvas tells assistive technology; keyboard use; reduced motion; pausing; loading and errors. |
|
|
99
|
+
| [Multiple views](guides/multiple-views.md) | Split screens and picture in picture with scene.createView: a camera and a rectangle of the canvas, drawn after the camera's view in the same frame; per-view culling; the cost of each view. |
|
|
100
|
+
| [Video textures](guides/video-textures.md) | engine.registerVideo on the page and textures.fromVideo in the sketch; frame sizes and the upload budget; browser limits. |
|
|
101
|
+
|
|
102
|
+
### Game systems
|
|
103
|
+
|
|
104
|
+
| Page | What it covers |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| [Using a physics library](guides/physics.md) | Running Rapier or cannon-es in the sketch worker; copying transforms. |
|
|
107
|
+
| [Using null3D with a deterministic simulation](guides/deterministic-simulation.md) | The maths entry a simulation may import; createMath with an exact math library; input, picking and physics that decide a result stay out of the sketch; createEngine's input option; a camera that the player aims from recorded input; a production build of a game's engine files. |
|
|
108
|
+
| [Sound in a scene](guides/audio.md) | Sound that follows the scene with @null3d/sound: beds whose level the scene sets, sources at places, groups of many sources, and events. |
|
|
109
|
+
|
|
110
|
+
### Example add-ons
|
|
111
|
+
|
|
112
|
+
| Page | What it covers |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| [Car paint](guides/car-paint.md) | An example add-on you copy: a paint material over the clear coat, with glinting metal flakes that stop shimmering, panel seams that follow the pixel, and an optional carbon weave with direction-dependent shine. |
|
|
115
|
+
| [Lens kit](guides/lens-kit.md) | An example add-on you copy: one look for the camera's marks: a grade, a sharpening, a vignette, film grain, color fringes, an anamorphic streak read from bloom, and a speed blur. |
|
|
116
|
+
| [In-world screens](guides/screens.md) | An example add-on you copy: displays painted on an OffscreenCanvas in the sketch, with a refresh rate for each screen, uploads of only the changed rectangles, an LCD look that changes with distance, a boot glitch, and clicks mapped back to the canvas's coordinates. |
|
|
117
|
+
|
|
118
|
+
### Testing and debugging
|
|
119
|
+
|
|
120
|
+
| Page | What it covers |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| [Testing your sketch](guides/testing.md) | Hold mode; image tests; reading results; frames that stay the same on every run; browser tests of a whole app. |
|
|
123
|
+
| [Debugging](guides/debugging.md) | Error codes; the in-page inspector; the MCP server; the render-graph dump; common failures. |
|
|
124
|
+
|
|
125
|
+
### Building and shipping
|
|
126
|
+
|
|
127
|
+
| Page | What it covers |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| [The asset pipeline (the `assets` command)](guides/assets-pipeline.md) | optimize, convert, pack-orm, normal-from-bump, env; LODs; texture compression; blockers and stored trees; budget reports. |
|
|
130
|
+
| [Deploying](guides/deploying.md) | Headers on common hosts; asset caching; size budgets. |
|
|
131
|
+
|
|
132
|
+
### Agents and add-ons
|
|
133
|
+
|
|
134
|
+
| Page | What it covers |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| [Working with AI agents](guides/agents.md) | Installing the null3D skills in Claude Code, claude.ai and other agent tools; docs by ID; the test loop; the MCP server and the in-page inspector. |
|
|
137
|
+
| [Building an add-on](guides/add-ons.md) | One package with one entry; claim a namespace and the plugin interface range; import only the public entry points; compile the shaders on both paths; name a page; run the check. |
|
|
138
|
+
|
|
139
|
+
## Cookbook
|
|
140
|
+
|
|
141
|
+
| Page | What it covers |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| [Cookbook](cookbook/index.md) | Recipes for one common task each: selection, cameras, characters, loading, sky and effects, screens, and hiding what walls hide. |
|
|
121
144
|
|
|
122
145
|
## Shaders
|
|
123
146
|
|
|
124
|
-
| Page | What it covers |
|
|
125
|
-
| --- | --- |
|
|
126
|
-
| [
|
|
127
|
-
| [
|
|
128
|
-
| [
|
|
129
|
-
| [
|
|
147
|
+
| Page | What it covers |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| [Surface functions](shaders/surface-functions.md) | The surface record; normals for the diffuse light and the sky's light; occlusion counted once; uniforms and textures; reflections; transmission; light through thin surfaces; clear coat and sheen; vertex-offset functions; the coverage of a shadow caster and where its lookup reads; a material's own lobe; values per row of a batch; second texture coordinates, pixel position and instance index. |
|
|
150
|
+
| [Built-in shader inputs](shaders/builtins.md) | Camera, time, object and instance values available to custom shaders, with the camera's and the object's matrices and ids. |
|
|
151
|
+
| [Shader library and imports](shaders/library.md) | The WGSL modules that ship with the engine: math, noise, color, lighting, fog, vertex, depth and signed distance helpers, and how to import them. |
|
|
152
|
+
| [WGSL rules for portable shaders](shaders/wgsl-rules.md) | The three shared language features; optional features; flat interpolation; a warning for atomic compare-exchange; limits budget; rules the build cannot check. |
|
|
130
153
|
|
|
131
154
|
## Porting from three.js
|
|
132
155
|
|
|
133
|
-
| Page | What it covers |
|
|
134
|
-
| --- | --- |
|
|
135
|
-
| [Porting from three.js](porting/threejs-overview.md) |
|
|
136
|
-
| [
|
|
137
|
-
| [
|
|
138
|
-
| [Porting
|
|
139
|
-
| [
|
|
140
|
-
| [Porting
|
|
141
|
-
| [
|
|
142
|
-
| [
|
|
143
|
-
| [
|
|
156
|
+
| Page | What it covers |
|
|
157
|
+
| --- | --- |
|
|
158
|
+
| [Porting from three.js](porting/threejs-overview.md) | A port is a rewrite; the limits a port meets; the porting workflow; what gets faster; what needs rewriting. |
|
|
159
|
+
| [three.js to null3D mapping](porting/threejs-mapping.md) | Every three.js API a port is likely to meet, with its null3D equivalent. |
|
|
160
|
+
| [The render loop, threads and the DOM](porting/threejs-loop-and-threads.md) | What moves to the sketch worker; what stays on the page; messages. |
|
|
161
|
+
| [Porting materials and textures](porting/threejs-materials.md) | Parameter-by-parameter conversion; color spaces; approximations. |
|
|
162
|
+
| [Porting shaders: GLSL, onBeforeCompile and TSL](porting/threejs-shaders.md) | GLSL to WGSL; three.js built-ins to engine built-ins; worked examples. |
|
|
163
|
+
| [Porting post-processing](porting/threejs-postprocessing.md) | EffectComposer passes and pmndrs effects to post.set settings; ShaderPass to post.addEffect; three.js tone mappings to custom tone curves. |
|
|
164
|
+
| [Porting React Three Fiber](porting/react-three-fiber.md) | Canvas, useFrame, drei helpers; keeping React for the page UI. |
|
|
165
|
+
| [Unsupported three.js features](porting/threejs-unsupported.md) | three.js features with no null3D equivalent, with workarounds. |
|
|
166
|
+
| [Verifying a port](porting/verification.md) | Parity images per camera view; performance comparison; the WebGL2 path; phones. |
|
|
144
167
|
|
|
145
|
-
##
|
|
168
|
+
## API reference
|
|
146
169
|
|
|
147
|
-
|
|
148
|
-
| --- | --- | --- | --- |
|
|
149
|
-
| [The `null3d` command](cli/null3d.md) | create, test, bench, check-addon, shot, upgrade, assets, docs, port, skills, mcp, doctor. | experimental | 0.1 |
|
|
170
|
+
### Page and sketch
|
|
150
171
|
|
|
151
|
-
|
|
172
|
+
| Page | What it covers |
|
|
173
|
+
| --- | --- |
|
|
174
|
+
| [Page API: createEngine](api/engine.md) | createEngine options and start errors; memory; capabilities and mode; pausing, detaching, failures, measuring, captureFrame, messages, pointer lock and destroy. |
|
|
175
|
+
| [Sketch API: defineSketch and the context](api/sketch.md) | The context object: the start data, scene, assets, materials, geometry, textures, input, time, engine, quality, post, render, page, ui, debug; the callbacks; the options, with the download list. |
|
|
176
|
+
| [Messages between sketch and page](api/page.md) | page.post and page.onMessage in the sketch; engine.postToSketch and engine.onSketchMessage on the page; start data that the setup reads as ctx.data. |
|
|
152
177
|
|
|
153
|
-
|
|
154
|
-
| --- | --- | --- | --- |
|
|
155
|
-
| [E1101: Stale handle](errors/E1101.md) | A call used an object after it was destroyed. Its slot may already hold a new object. | generated | 0.1 |
|
|
156
|
-
| [E1102: Too many objects](errors/E1102.md) | The scene, the table of instance batches or the queue of changes for the next frame is full. The message names which one, and how many it holds. | generated | 0.1 |
|
|
157
|
-
| [E1103: Object from another engine](errors/E1103.md) | A call received an object that this engine did not create. | generated | 0.1 |
|
|
158
|
-
| [E1104: Parent loop](errors/E1104.md) | A call would make an object its own ancestor: the new parent is the object itself or one of its descendants. | generated | 0.1 |
|
|
159
|
-
| [E1105: Unknown command](errors/E1105.md) | The engine core received a structural change it does not know, so the TypeScript side and the core come from different builds. | generated | 0.1 |
|
|
160
|
-
| [E1106: Object never created](errors/E1106.md) | A call such as `setVisible` or `setParent` queued a change for an object that the engine never created. The engine creates an object when the next frame starts. When that fails, for example because its parent was destroyed, the object never joins the scene. | generated | 0.1 |
|
|
161
|
-
| [E1107: Object created twice](errors/E1107.md) | The engine core received a second create command for one object, so the TypeScript side and the core disagree about the scene. | generated | 0.1 |
|
|
162
|
-
| [E1108: Value out of range](errors/E1108.md) | A call received a number outside the range it takes. Examples are a row past the capacity of an instance batch, an opacity above 1, a negative radius, and a camera's far plane that does not lie beyond its near plane. | generated | 0.1 |
|
|
163
|
-
| [E1109: Engine memory full](errors/E1109.md) | The engine could not create or grow its WebAssembly memory. A page with worker threads gives the engine 1 GiB by default, and up to 4 GiB through the memory option of createEngine. Each instance row takes about 210 bytes, or about 300 with per-row colors or values. So about 5 million rows fill 1 GiB, along with the rest of the scene. A mesh of millions of vertices can fill it too, from geometry.fromArrays or a model file. Building such a mesh with normals to compute takes about 100 bytes per vertex for a moment. A frame can fail too, because the first frame copies every mesh of the scene. Its need is largest on the direct draw path: a scene with 84 MiB of meshes peaks at about 270 MiB there and about 205 MiB on the indirect path. The engine also keeps the last 8 MiB under the limit for its own small requests, so a scene stops once it reaches them. A browser can refuse memory sooner, as phones often do. It can also refuse a new engine's memory while the memory of an engine that stopped before is not free yet. The engine then tries again for about 45 seconds before it fails, and reports memory-wait through onProgress after 10 seconds. | generated | 0.1 |
|
|
164
|
-
| [E1110: Unmarked write to a static object](errors/E1110.md) | A static object's position, rotation, scale or bounding sphere changed without a setter. The engine recomputes a static object only in a frame where a setter marks it or its parent moves. So such a change can show late, or never. Development builds check these values of every static object before each transform update. Each frame has one transform update, and a sketch with onLateUpdate gets a second one after that callback. A row of a static instance, sprite or point batch that changed without markDirty() raises it too: the engine updates only the marked rows, and development builds check the drawn rows before each batch update, a share of a large batch in each frame. Release builds leave the check out. | generated | 0.1 |
|
|
165
|
-
| [E1111: Mesh or model still in use](errors/E1111.md) | A call to destroy() named a mesh, or a model that assets.loadGltf loaded, while an object or an instance batch still uses it. For a model, that includes objects that use one of its meshes or materials, and objects that its animation clips move. The engine keeps the mesh or model, so nothing draws freed memory. | generated | 0.2 |
|
|
166
|
-
| [E1112: Unsupported cookie texture](errors/E1112.md) | A spot light's map copies its picture once, when the texture's texels reach the GPU. A video's texture and a render pass's texture change every frame, and a 3D or cube texture holds more than one image, so none of them fits the copy. | generated | 0.3 |
|
|
167
|
-
| [E1203: Invalid number](errors/E1203.md) | A call received a number that is not finite, such as NaN or Infinity. | generated | 0.1 |
|
|
168
|
-
| [E1204: Invalid color](errors/E1204.md) | A call received a color that is not a hex string, a number from 0 to 0xffffff, or three numbers from 0 to 1. | generated | 0.1 |
|
|
169
|
-
| [E1205: Unknown input name](errors/E1205.md) | An input call received a name that no key, button or action has, or `input.actions.define()` received an action name that a key or button already has. `on()` and `off()` received an event type that objects do not have. Names are case-sensitive: `KeyW` is the W key, and `keyW` names nothing. | generated | 0.1 |
|
|
170
|
-
| [E1206: Invalid mesh arrays](errors/E1206.md) | geometry.fromArrays() received arrays that make no mesh, scene.createLines() received points that make no line, or scene.createPoints() received arrays that make no points. An array can have the wrong length for the vertex count, an index can name no vertex, or a value can be NaN or Infinity. Normals can also be missing, or both given and computed. A mesh can also take `targets` or `morphTargets`, not both. A line needs at least 2 points, and pairs of points need an even number. Points need at least 1 point, with 3 or 4 numbers of color each. Or mesh.updateVertices() received values that do not fit the mesh: an attribute the mesh lacks or that takes no updates, another array type than the mesh keeps, or vertices past its last one. | generated | 0.1 |
|
|
171
|
-
| [E1207: Invalid layer mask](errors/E1207.md) | A call that sets layers received a number that is not a 32-bit layer mask: a fraction, NaN, or a number past 32 bits. | generated | 0.1 |
|
|
172
|
-
| [E1208: Invalid texture](errors/E1208.md) | A call that makes or updates a texture received something it cannot use. It can be an option the engine does not know, or an image without pixels or larger than the device takes. It can also be data that does not fit the texture's size and format, or numbers that make no color grading table. With a KTX2 file, it can be an option that the file cannot take, or an update of its texture. | generated | 0.1 |
|
|
173
|
-
| [E1209: Too many textures](errors/E1209.md) | 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. | generated | 0.3 |
|
|
174
|
-
| [E1213: Invalid setting](errors/E1213.md) | 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. | generated | 0.1 |
|
|
175
|
-
| [E1214: Invalid sketch option](errors/E1214.md) | defineSketch() received an option out of its range. fixedRate must be a number above 0, and maxFixedSteps a whole number of 1 or more. The engine checks the options before it runs the setup function. | generated | 0.1 |
|
|
176
|
-
| [E1215: Invalid custom WGSL](errors/E1215.md) | 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. | generated | 0.1 |
|
|
177
|
-
| [E1216: Invalid uniform or texture](errors/E1216.md) | 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. | generated | 0.1 |
|
|
178
|
-
| [E1217: Invalid material option](errors/E1217.md) | 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. | generated | 0.1 |
|
|
179
|
-
| [E1218: Invalid animation call](errors/E1218.md) | 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. | generated | 0.2 |
|
|
180
|
-
| [E1219: Invalid label](errors/E1219.md) | 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. | generated | 0.2 |
|
|
181
|
-
| [E1220: Invalid render pass](errors/E1220.md) | 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. | generated | 0.2 |
|
|
182
|
-
| [E1221: Invalid levels of detail](errors/E1221.md) | 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. | generated | 0.2 |
|
|
183
|
-
| [E1222: Invalid light probe grid texture](errors/E1222.md) | 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. | generated | 0.2 |
|
|
184
|
-
| [E1223: Invalid feature description](errors/E1223.md) | 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. | generated | 0.3 |
|
|
185
|
-
| [E1224: Material cannot draw a mesh](errors/E1224.md) | 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. | generated | 0.3 |
|
|
186
|
-
| [E1225: Add-on name clash](errors/E1225.md) | 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. | generated | 0.3 |
|
|
187
|
-
| [E1301: No usable GPU path](errors/E1301.md) | The browser offers neither WebGPU nor WebGL2 for the way the engine was asked to draw. | generated | 0.1 |
|
|
188
|
-
| [E1302: GPU lost](errors/E1302.md) | The browser took the GPU away while the engine drew, for example after a driver reset or a GPU crash, and the engine could not carry on. No new GPU device started, or the GPU was lost more than twice within a minute. The engine stopped drawing. | generated | 0.1 |
|
|
189
|
-
| [E1303: WebAssembly SIMD missing](errors/E1303.md) | The browser runs WebAssembly without SIMD, which the engine's core needs. | generated | 0.1 |
|
|
190
|
-
| [E1304: GPU out of memory](errors/E1304.md) | The GPU had no room for a buffer or texture that the engine made after the start. The objects that use it draw wrong or not at all. The engine reports the first time this happens on each GPU device, and draws on. | generated | 0.2 |
|
|
191
|
-
| [E1305: GPU rejected work](errors/E1305.md) | The GPU path refused a command that the engine gave it after the start, such as a buffer larger than the device allows. The objects that the command made or drew are missing, and the canvas can stay black. The engine reports the first time this happens on each GPU device, and draws on. | generated | 0.2 |
|
|
192
|
-
| [E1306: Safari before 18](errors/E1306.md) | The browser runs the WebKit engine of a Safari before 18, which null3D does not support. Every browser on iPhone and iPad runs WebKit, so Chrome, Edge and Firefox there count too. | generated | 0.2 |
|
|
193
|
-
| [E1401: Not a sketch module](errors/E1401.md) | The module passed to createEngine as the sketch does not export a sketch as its default export. | generated | 0.1 |
|
|
194
|
-
| [E1402: Engine core out of date](errors/E1402.md) | The engine core WebAssembly file lacks functions that the TypeScript side calls, so the two come from different builds. Development builds check this when the core loads. When null3D's own dev server serves the engine from a checkout of its repository, the check also compares the stamp of the Rust sources that the core was built from with the stamp of the checkout's sources. A core built before a merge or an edit of those sources then fails at once, before it can run with code that expects another core. | generated | 0.1 |
|
|
195
|
-
| [E1403: Engine core not ready](errors/E1403.md) | An engine call ran before the engine core started in this worker, or the core started twice. | generated | 0.1 |
|
|
196
|
-
| [E1404: Engine thread failed](errors/E1404.md) | An engine thread, or the drawing on the page, hit an error it could not handle, such as a trap in the engine core. After the start, the thread stops its loop: the engine draws no new frames, and engine.onFailure receives this error. During the start, createEngine() stops the engine and rejects with this error. | generated | 0.1 |
|
|
197
|
-
| [E1405: Engine thread did not start](errors/E1405.md) | An engine worker failed while the engine started. The worker's script, the engine core or the renderer did not start there, or the sketch's setup function threw an error without an engine code. | generated | 0.1 |
|
|
198
|
-
| [E1406: Engine file not downloaded](errors/E1406.md) | A file of the engine core did not download whole, or a file that a call loads the first time. The first KTX2 file loads the KTX2 transcoder, and the first glTF file the glTF loader. The first mesh that plans its levels of detail loads the level planner and its simplifier. The first glTF file with meshopt compression loads the meshopt decoder, and the first with Draco compression the Draco decoder. The first color grading table loads its readers, and the first environment its reader. The first sprite or point batch loads the sprite code, and the first line batch the line code. The first feature draw, instance draw or full-screen effect loads that adapter. The server answered with an error or sent another file in its place, such as a web page, or the connection broke off. | generated | 0.1 |
|
|
199
|
-
| [E1407: Invalid hold time](errors/E1407.md) | The ?hold= switch or the hold option of createEngine gave a hold time that is not a number of seconds from 0 to 600. | generated | 0.1 |
|
|
200
|
-
| [E1408: Hold failed](errors/E1408.md) | The sketch or the engine failed in hold mode, before the engine read the held frame back. A live engine logs an error in the sketch and carries on. Hold mode stops at the first one, so a test fails at once. | generated | 0.1 |
|
|
201
|
-
| [E1409: Invalid memory maximum](errors/E1409.md) | The memory option of createEngine asked for a maximum that is not a whole number of MiB from 256 to 4096. | generated | 0.1 |
|
|
202
|
-
| [E1410: Sketch module not loaded](errors/E1410.md) | The sketch module that createEngine got did not load. It did not download, or its code threw an error while the module loaded. The engine imports a module that does not load once more after a short wait, and the console notes that second import. The error comes only when the second import fails too, and it gives the reason of the first. A module whose code threw is not downloaded again, since it would throw again. | generated | 0.1 |
|
|
203
|
-
| [E1411: Asset not downloaded](errors/E1411.md) | A loading call could not download its file. The server answered with an error, such as 404 for a missing file, or the network failed. | generated | 0.1 |
|
|
204
|
-
| [E1412: Asset not decoded](errors/E1412.md) | 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. | generated | 0.1 |
|
|
205
|
-
| [E1413: Asset from another origin blocked](errors/E1413.md) | 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. | generated | 0.1 |
|
|
206
|
-
| [E1414: Frame not captured](errors/E1414.md) | 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. | generated | 0.1 |
|
|
207
|
-
| [E1415: Page thread already runs a sketch](errors/E1415.md) | 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. | generated | 0.1 |
|
|
208
|
-
| [E1416: glTF file not read](errors/E1416.md) | 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. | generated | 0.2 |
|
|
209
|
-
| [E1417: glTF feature not supported](errors/E1417.md) | 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. | generated | 0.2 |
|
|
210
|
-
| [E1418: WebAssembly blocked by the page](errors/E1418.md) | 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'. | generated | 0.2 |
|
|
211
|
-
| [E1419: Canvas held by another engine](errors/E1419.md) | 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. | generated | 0.2 |
|
|
212
|
-
| [E1420: Engine stopped](errors/E1420.md) | 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. | generated | 0.2 |
|
|
213
|
-
| [E1421: Unknown feature to preload](errors/E1421.md) | 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. | generated | 0.2 |
|
|
214
|
-
| [E1422: Engine file blocked by the page](errors/E1422.md) | 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. | generated | 0.2 |
|
|
215
|
-
| [E1423: Engine file without CORS](errors/E1423.md) | 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. | generated | 0.2 |
|
|
216
|
-
| [E1424: Custom shader builds not downloaded](errors/E1424.md) | 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. | generated | 0.2 |
|
|
217
|
-
| [E1425: Pointer lock refused](errors/E1425.md) | 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. | generated | 0.2 |
|
|
218
|
-
| [E1426: Pointer lock with input off](errors/E1426.md) | 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. | generated | 0.3 |
|
|
219
|
-
| [E1430: Too many reflection probes](errors/E1430.md) | 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. | generated | 0.2 |
|
|
220
|
-
| [E1431: Area lights' tables missing](errors/E1431.md) | 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. | generated | 0.2 |
|
|
221
|
-
| [E1432: Add-on for another engine version](errors/E1432.md) | 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. | generated | 0.3 |
|
|
222
|
-
| [E1433: Add-on for another plugin interface](errors/E1433.md) | 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. | generated | 0.3 |
|
|
223
|
-
| [E1434: Baked light file not read](errors/E1434.md) | assets.loadLightProbeGrid() or assets.loadLightMap() downloaded a file that is not a baked light file that this engine reads. The file may not be JSON, or its format marker may be missing. Its version may not be the one that this engine reads, or its kind may not be the one that the call takes. A probe grid may have counts or spacing that a grid cannot take. Its coefficients may not hold 12 floats for each probe in the counts' product, or its validity or skyVisibility may not hold one float from 0 to 1 for each probe. A light map may have a width or height that a texture cannot take, or an encoding other than rgb8 or rgba16float. Its radiance or its direction may not hold the bytes that its size needs, which a cut-short file shows. The message names the fault. | generated | 0.3 |
|
|
224
|
-
| [E1435: Recording not read](errors/E1435.md) | createEngine() could not read the recording that ?replay= names, or the recording does not match this page. The file may not be a null3D recording, may come from another version of the format, may be cut short, or may name keys or fixed steps that this engine does not have. The message names the fault. | generated | 0.3 |
|
|
225
|
-
| [E1436: Pick lost with the GPU](errors/E1436.md) | A pick waited for the GPU to copy its pixel back when the browser took the GPU away. The engine started a new device, but the frame that recorded the pick drew on the lost device, so its read never lands. The pick is rejected rather than repeated on the new device. | generated | 0.3 |
|
|
226
|
-
| [E1437: Chrome for Testing refused](errors/E1437.md) | The null3D command-line tool did not install Chrome for Testing, the browser that draws on the computer's GPU. The archive it downloaded does not have the SHA-256 hash that the tool records for the pinned version on this platform. Or the tool has no build, and so no hash, for this platform. The tool deletes a refused archive before it unpacks it, and never runs it. | generated | 0.3 |
|
|
227
|
-
| [E1501: Render space full](errors/E1501.md) | The scene needs more room than the renderer has. The message names the full part: the material table, the upload space, the culling pass, skinning on WebGPU, the draw list, one GPU buffer, or the shadow atlas. On WebGPU the culling pass covers 2,097,152 objects and instance rows on every device, and more on devices with larger GPU buffers. On WebGL2 the number follows the largest texture the device allows. The number for the device is in engine.capabilities.maxInstances. On WebGPU, skinned meshes keep their skinned vertices in at most 8 GPU buffers. Those hold 1 GiB in all on most devices. Skinned meshes fill at most 32 mesh buffers. The draw list grows with the scene, so it fills only when memory runs out. A frame that fails draws nothing, and the canvas keeps the last whole frame. | generated | 0.1 |
|
|
228
|
-
| [E1502: Pass input missing](errors/E1502.md) | A render pass uses a target or buffer that no pass creates, or reads one that no pass running in the frame writes. The render graph checks the sketch's passes when render.addPass() or render.removePass() changes them, and every pass before the frame draws. | generated | 0.1 |
|
|
229
|
-
| [E1503: Target created twice](errors/E1503.md) | Two render passes create the same target, or a pass creates a target that the render graph keeps between frames. A sketch's pass whose texture has the name of a target of the engine's own passes does this. Each target has one creator, which sets its format and size. | generated | 0.1 |
|
|
230
|
-
| [E1504: Render pass cycle](errors/E1504.md) | Render passes need each other in a loop, so no order runs each pass after the passes whose output it reads. A sketch's pass that reads its own texture makes such a loop. | generated | 0.1 |
|
|
231
|
-
| [E1505: Pass targets do not match](errors/E1505.md) | A render pass draws into targets that one GPU render pass cannot hold together. A target can have another size than the pass, or the targets can have different sample counts. The pass can also draw into two depth targets, into a whole texture array instead of one layer, or into no target. It can draw into more than four color targets, or into color targets of more than 32 bytes per sample, which some devices cannot hold. A resolve pass fails the same way when it cannot resolve its target into the canvas. That target must be multisampled, in the canvas's format and size, and read by no other running pass. | generated | 0.1 |
|
|
232
|
-
| [E1506: Feature draw after the first frame](errors/E1506.md) | A draw whose instance count the GPU writes was created after the engine recorded its first frame, on a device that draws its scene directly. The direct path counts every draw on the CPU and keeps no indirect draw, so the frame has nowhere to copy the count. The frame records no draw. | generated | 0.3 |
|
|
233
|
-
| [Error codes](errors/index.md) | Every EngineError code with its cause and fix. | generated | 0.1 |
|
|
178
|
+
### Scene and objects
|
|
234
179
|
|
|
235
|
-
|
|
180
|
+
| Page | What it covers |
|
|
181
|
+
| --- | --- |
|
|
182
|
+
| [Scene](api/scene.md) | Creating objects; models and copies; find; multiple views of one scene; background, environment, reflection probes, fog, sky; the light probe grid; the material override; warmUp. |
|
|
183
|
+
| [Objects and transforms](api/objects.md) | Setters and getters; parents; flags; destroy; pointer events. |
|
|
184
|
+
| [Cameras](api/cameras.md) | Perspective and orthographic cameras; a perspective camera's focal length; lens shift; screenToRay; worldToScreen; layers. |
|
|
185
|
+
| [Lights](api/lights.md) | Directional, point, spot, hemisphere, ambient, rectangle and tube lights; shadow options. |
|
|
186
|
+
| [Geometry](api/geometry.md) | Generators of common shapes; extra shapes in @null3d/geometry; meshes from arrays; morph targets; vertices that change; levels of detail that meshes plan on the job workers; vertex formats; large meshes. |
|
|
187
|
+
| [Materials](api/materials.md) | standard, unlit, shader, shadowCatcher; every option. |
|
|
188
|
+
| [Textures](api/textures.md) | loadTexture options; KTX2 files; fromData; fromImageBitmap; fromCanvas; fromVideo; fromPass. |
|
|
189
|
+
| [Assets](api/assets.md) | loadGltf, registerGltfExtension, loadTexture, loadImageBitmap, loadLut, lutFromData, loadEnvironment, builtinEnvironment, skyEnvironment, loadCubemap, loadLightProbeGrid, loadLightMap, lightProbeGridFile, loadJson, loadBinary, preload, onProgress, cache. |
|
|
190
|
+
| [Animation](api/animation.md) | The animator; play, crossFade, clip weights, start times, 1D blends, layers, joint masks, additive clips, joint overrides and look-at, events; property animation of lights, cameras and materials, glTF's KHR_animation_pointer; morph weights. |
|
|
191
|
+
|
|
192
|
+
### Sprites, points, lines and vertex draws
|
|
193
|
+
|
|
194
|
+
| Page | What it covers |
|
|
195
|
+
| --- | --- |
|
|
196
|
+
| [Sprites](api/sprites.md) | createSprites; world and screen size modes; atlases. |
|
|
197
|
+
| [Points](api/points.md) | createPoints; size attenuation; textures. |
|
|
198
|
+
| [Lines](api/lines.md) | createLines; strips, loops and pairs; pixel and world widths; dashes; lit lines. |
|
|
199
|
+
| [Draws from a vertex count](api/vertex-draws.md) | scene.createVertexDraw: a custom material and a vertex count with no mesh data, the vertex and instance index in the shader, a bounds sphere, and helpers that wrap positions around the camera. |
|
|
200
|
+
|
|
201
|
+
### Interaction
|
|
202
|
+
|
|
203
|
+
| Page | What it covers |
|
|
204
|
+
| --- | --- |
|
|
205
|
+
| [Input](api/input.md) | Pointer, keyboard, touch and gamepad; action maps; pointer events on objects. |
|
|
206
|
+
| [Raycasting and spatial queries](api/raycast.md) | raycast, raycastAny, raycastAll, raycastBatch, overlap queries, pointer events on objects. |
|
|
207
|
+
| [Labels that follow objects](api/ui.md) | ui.trackLabel in the sketch; engine.labels.bind on the page. |
|
|
208
|
+
| [Controls (@null3d/controls)](api/controls.md) | Orbit and map controls; fly and first-person controls, with pointer lock; drag, rotate and scale gizmos. |
|
|
209
|
+
|
|
210
|
+
### Rendering and quality
|
|
211
|
+
|
|
212
|
+
| Page | What it covers |
|
|
213
|
+
| --- | --- |
|
|
214
|
+
| [Post-processing API](api/post.md) | post.set for tone mapping, exposure and a camera's EV100, automatic exposure, bloom, ambient occlusion, screen-space reflections, depth of field, outlines, color grading tables and controls, the vignette and sharpening; custom effects with post.addEffect, custom tone curves, and still views. |
|
|
215
|
+
| [Render graph API](api/render.md) | render.addPass for scene passes, reflection passes, full-screen passes and compute passes of your own WGSL that write into textures; half and quarter render sizes; the outline mask as an input; switching and removing passes; render.dumpGraph. |
|
|
216
|
+
| [Quality API](api/quality.md) | quality.preset, quality.set, quality.setPreset, the preset check, the frame-budget governor, budgets for a sketch's own systems, quality events. |
|
|
217
|
+
| [Debug drawing and stats](api/debug.md) | debug.line, box, sphere, arrow, axes, grid, frustum, light and skeleton; the stats overlay, debug.frameStats and @null3d/engine/stats; engine.measure and its figures; debug.view, the ?view switch and add-on views; debug.shadowCamera; the in-page inspector and engine.inspect. |
|
|
218
|
+
|
|
219
|
+
### Utilities
|
|
220
|
+
|
|
221
|
+
| Page | What it covers |
|
|
222
|
+
| --- | --- |
|
|
223
|
+
| [Time](api/time.md) | dt, time.now, fixed steps. |
|
|
224
|
+
| [Math helpers](api/math.md) | vec3, quat, mat4 and color on plain arrays; math.clamp, lerp, damp and a random generator that hold mode seeds; the maths entry and createMath for a deterministic simulation. |
|
|
225
|
+
|
|
226
|
+
### Add-on packages
|
|
227
|
+
|
|
228
|
+
| Page | What it covers |
|
|
229
|
+
| --- | --- |
|
|
230
|
+
| [Particles (@null3d/particles)](api/particles.md) | createParticles: emitters, bursts and sub-emitters; closed-form GPU motion; soft particles; flipbooks made in code. |
|
|
231
|
+
| [Impostors (@null3d/impostors)](api/impostors.md) | createImpostors: far objects as camera-facing cards that blend the three stored views nearest the camera and light from baked normals; mergeFarGeometry: one mesh per far grid cell. |
|
|
232
|
+
| [Terrain (@null3d/terrain)](api/terrain.md) | createTerrain: a height field drawn as a camera-centered quadtree of blocks, lit per pixel from baked normals, with a height-blended splat surface, and heightAt and normalAt for placing objects. |
|
|
233
|
+
| [Grass (@null3d/grass)](api/grass.md) | createGrass: tufts of bent blades over a ground, placed by integer hashes, built in a compute pass on WebGPU with the sun's shadows, swaying in the wind add-on's field, with a share for each quality preset. |
|
|
234
|
+
| [Gaussian splats (@null3d/splats)](api/splats.md) | createSplats: SPZ files, streamed chunk files and KHR_gaussian_splatting models drawn as Gaussian splats, with detail levels, a budget that follows the preset and the GPU path, and a soft mix with meshes. |
|
|
235
|
+
| [Water (@null3d/water)](api/water.md) | createWater: a river and a lake from one shape, with waves that the current carries, ripples, caustics, foam, rain rings, a soft shore that reads the scene's depth or the shape's bed, a reflection whose cadence follows the preset, and createUnderwater for the view from below the surface. createWaterfall: a fall from a river's lip, with spray and mist. createOcean: an open sea of spectra transformed on the GPU. |
|
|
236
|
+
| [Wind (@null3d/wind)](api/wind.md) | createWind: one field of air that plants, flags, smoke and water read, from an analytic wind of place and time with traveling gusts and pushes, held in a grid that follows the camera. |
|
|
237
|
+
| [Sound (@null3d/sound)](api/sound.md) | createSound and connectSound: loops, groups and one-shots placed in the scene, played with the browser's audio and driven from the sketch on the audio thread. |
|
|
238
|
+
| [three.js looks (@null3d/three-compat)](api/three-compat.md) | Reinhard and Cineon tone curves for post.set, and an outline with three.js OutlinePass's glow, pulse and blurred edge. It runs no three.js code. |
|
|
239
|
+
|
|
240
|
+
### Building add-ons
|
|
241
|
+
|
|
242
|
+
| Page | What it covers |
|
|
243
|
+
| --- | --- |
|
|
244
|
+
| [Add-on feature descriptions](api/features.md) | One description for an add-on's render work: the frame point, the reads and writes, the callbacks, the outputs with neutral defaults, the lighting slots, the order band and the view mask. |
|
|
245
|
+
| [Add-on feature draws](api/feature-draws.md) | scene.addFeatureDraw turns a draw feature description into a draw of your WGSL, your vertices, your uniforms and the description's sort place, on both GPU paths and in every thread mode; scene.addFeatureInstances repeats that shape once for each row of a batch. |
|
|
246
|
+
| [Add-on feature effects](api/feature-effects.md) | post.addFeatureEffect turns a full-screen feature description into a pass of your WGSL over the scene's color, at the resolve point, on both GPU paths and in every thread mode, and draws it only while the feature is ready. |
|
|
247
|
+
| [Add-on instance draws](api/feature-instances.md) | scene.addComputeInstances draws a capacity of instances from your own buffer, with a count that the GPU writes, on WebGPU, and an instance batch that the CPU fills on WebGL2. |
|
|
248
|
+
| [Tasks on the job workers](api/tasks.md) | runTask: an add-on's code and WebAssembly on the job workers; shared memory; ordering with the frames; failures. |
|
|
249
|
+
|
|
250
|
+
## Command-line tool
|
|
251
|
+
|
|
252
|
+
| Page | What it covers |
|
|
253
|
+
| --- | --- |
|
|
254
|
+
| [The `null3d` command](cli/null3d.md) | create, test, bench, check-addon, shot, upgrade, assets, mcp, shaders record. |
|
|
255
|
+
|
|
256
|
+
## Errors
|
|
236
257
|
|
|
237
|
-
| Page | What it covers |
|
|
238
|
-
| --- | --- |
|
|
239
|
-
| [
|
|
258
|
+
| Page | What it covers |
|
|
259
|
+
| --- | --- |
|
|
260
|
+
| [Error codes](errors/index.md) | Every EngineError code with its cause and fix. |
|