@null3d/engine 0.1.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.
Files changed (381) hide show
  1. package/dist/wasm/single/null3d.js +10 -8
  2. package/dist/wasm/single/null3d_bg.wasm +0 -0
  3. package/dist/wasm/threaded/null3d.js +10 -8
  4. package/dist/wasm/threaded/null3d_bg.wasm +0 -0
  5. package/docs/api/animation.md +96 -24
  6. package/docs/api/assets.md +99 -29
  7. package/docs/api/cameras.md +38 -7
  8. package/docs/api/controls.md +47 -23
  9. package/docs/api/debug.md +105 -35
  10. package/docs/api/engine.md +108 -32
  11. package/docs/api/feature-draws.md +21 -15
  12. package/docs/api/feature-effects.md +8 -8
  13. package/docs/api/feature-instances.md +68 -17
  14. package/docs/api/features.md +68 -37
  15. package/docs/api/geometry.md +83 -14
  16. package/docs/api/grass.md +55 -13
  17. package/docs/api/impostors.md +92 -50
  18. package/docs/api/input.md +22 -9
  19. package/docs/api/lights.md +67 -16
  20. package/docs/api/lines.md +38 -13
  21. package/docs/api/materials.md +187 -59
  22. package/docs/api/math.md +6 -6
  23. package/docs/api/objects.md +40 -15
  24. package/docs/api/page.md +58 -7
  25. package/docs/api/particles.md +36 -11
  26. package/docs/api/points.md +18 -8
  27. package/docs/api/post.md +57 -23
  28. package/docs/api/quality.md +36 -16
  29. package/docs/api/raycast.md +57 -24
  30. package/docs/api/reference/animation.md +1 -2
  31. package/docs/api/reference/assets.md +7 -4
  32. package/docs/api/reference/cameras.md +3 -2
  33. package/docs/api/reference/controls.md +59 -2
  34. package/docs/api/reference/debug.md +58 -6
  35. package/docs/api/reference/engine.md +39 -10
  36. package/docs/api/reference/feature-draws.md +3 -4
  37. package/docs/api/reference/feature-effects.md +2 -3
  38. package/docs/api/reference/feature-instances.md +5 -4
  39. package/docs/api/reference/features.md +7 -4
  40. package/docs/api/reference/geometry.md +132 -21
  41. package/docs/api/reference/grass.md +62 -2
  42. package/docs/api/reference/impostors.md +120 -16
  43. package/docs/api/reference/input.md +1 -2
  44. package/docs/api/reference/lights.md +4 -3
  45. package/docs/api/reference/lines.md +3 -4
  46. package/docs/api/reference/materials.md +7 -6
  47. package/docs/api/reference/math.md +13 -2
  48. package/docs/api/reference/objects.md +2 -3
  49. package/docs/api/reference/particles.md +31 -6
  50. package/docs/api/reference/points.md +2 -3
  51. package/docs/api/reference/post.md +4 -3
  52. package/docs/api/reference/quality.md +1 -2
  53. package/docs/api/reference/raycast.md +1 -2
  54. package/docs/api/reference/render.md +4 -3
  55. package/docs/api/reference/scene.md +24 -5
  56. package/docs/api/reference/sketch.md +11 -11
  57. package/docs/api/reference/sound.md +33 -2
  58. package/docs/api/reference/splats.md +42 -3
  59. package/docs/api/reference/sprites.md +2 -3
  60. package/docs/api/reference/tasks.md +16 -3
  61. package/docs/api/reference/terrain.md +26 -5
  62. package/docs/api/reference/textures.md +1 -2
  63. package/docs/api/reference/three-compat.md +18 -7
  64. package/docs/api/reference/time.md +1 -2
  65. package/docs/api/reference/ui.md +10 -7
  66. package/docs/api/reference/vertex-draws.md +2 -3
  67. package/docs/api/reference/water.md +78 -5
  68. package/docs/api/reference/wind.md +15 -2
  69. package/docs/api/render.md +67 -25
  70. package/docs/api/scene.md +129 -36
  71. package/docs/api/sketch.md +45 -19
  72. package/docs/api/sound.md +48 -12
  73. package/docs/api/splats.md +42 -15
  74. package/docs/api/sprites.md +8 -6
  75. package/docs/api/tasks.md +31 -22
  76. package/docs/api/terrain.md +44 -12
  77. package/docs/api/textures.md +61 -12
  78. package/docs/api/three-compat.md +15 -7
  79. package/docs/api/time.md +3 -5
  80. package/docs/api/ui.md +18 -10
  81. package/docs/api/vertex-draws.md +13 -12
  82. package/docs/api/water.md +111 -67
  83. package/docs/api/wind.md +61 -15
  84. package/docs/cli/null3d.md +90 -15
  85. package/docs/concepts/architecture.md +69 -23
  86. package/docs/concepts/assets.md +57 -16
  87. package/docs/concepts/backends.md +65 -25
  88. package/docs/concepts/color-management.md +42 -13
  89. package/docs/concepts/culling.md +68 -47
  90. package/docs/concepts/handles.md +14 -5
  91. package/docs/concepts/instances.md +72 -23
  92. package/docs/concepts/large-worlds.md +17 -7
  93. package/docs/concepts/lighting.md +117 -44
  94. package/docs/concepts/lod.md +128 -33
  95. package/docs/concepts/materials.md +43 -12
  96. package/docs/concepts/particle-buffer.md +48 -35
  97. package/docs/concepts/post-processing.md +77 -14
  98. package/docs/concepts/quality-preset-tables.md +3 -2
  99. package/docs/concepts/quality-presets.md +122 -39
  100. package/docs/concepts/render-graph.md +56 -21
  101. package/docs/concepts/render-layers.md +9 -5
  102. package/docs/concepts/shadows.md +96 -25
  103. package/docs/concepts/static-dynamic.md +22 -7
  104. package/docs/cookbook/index.md +163 -119
  105. package/docs/data/threejs-mapping.json +301 -340
  106. package/docs/errors/E1101.md +23 -5
  107. package/docs/errors/E1102.md +11 -3
  108. package/docs/errors/E1103.md +11 -3
  109. package/docs/errors/E1104.md +11 -3
  110. package/docs/errors/E1105.md +13 -5
  111. package/docs/errors/E1106.md +11 -3
  112. package/docs/errors/E1107.md +15 -5
  113. package/docs/errors/E1108.md +11 -3
  114. package/docs/errors/E1109.md +32 -6
  115. package/docs/errors/E1110.md +23 -5
  116. package/docs/errors/E1111.md +11 -3
  117. package/docs/errors/E1112.md +11 -3
  118. package/docs/errors/E1203.md +12 -4
  119. package/docs/errors/E1204.md +11 -3
  120. package/docs/errors/E1205.md +11 -3
  121. package/docs/errors/E1206.md +28 -6
  122. package/docs/errors/E1207.md +11 -3
  123. package/docs/errors/E1208.md +12 -3
  124. package/docs/errors/E1209.md +11 -3
  125. package/docs/errors/E1213.md +27 -5
  126. package/docs/errors/E1214.md +11 -3
  127. package/docs/errors/E1215.md +31 -6
  128. package/docs/errors/E1216.md +31 -6
  129. package/docs/errors/E1217.md +29 -6
  130. package/docs/errors/E1218.md +22 -6
  131. package/docs/errors/E1219.md +11 -3
  132. package/docs/errors/E1220.md +24 -5
  133. package/docs/errors/E1221.md +24 -5
  134. package/docs/errors/E1222.md +11 -3
  135. package/docs/errors/E1223.md +39 -6
  136. package/docs/errors/E1224.md +11 -3
  137. package/docs/errors/E1225.md +11 -3
  138. package/docs/errors/E1301.md +11 -3
  139. package/docs/errors/E1302.md +11 -3
  140. package/docs/errors/E1303.md +11 -3
  141. package/docs/errors/E1304.md +11 -3
  142. package/docs/errors/E1305.md +13 -3
  143. package/docs/errors/E1306.md +11 -3
  144. package/docs/errors/E1307.md +23 -6
  145. package/docs/errors/E1401.md +11 -3
  146. package/docs/errors/E1402.md +13 -5
  147. package/docs/errors/E1403.md +11 -3
  148. package/docs/errors/E1404.md +13 -3
  149. package/docs/errors/E1405.md +15 -4
  150. package/docs/errors/E1406.md +31 -5
  151. package/docs/errors/E1407.md +11 -3
  152. package/docs/errors/E1408.md +11 -3
  153. package/docs/errors/E1409.md +11 -3
  154. package/docs/errors/E1410.md +13 -5
  155. package/docs/errors/E1411.md +11 -3
  156. package/docs/errors/E1412.md +29 -6
  157. package/docs/errors/E1413.md +11 -3
  158. package/docs/errors/E1414.md +11 -3
  159. package/docs/errors/E1415.md +11 -3
  160. package/docs/errors/E1416.md +27 -6
  161. package/docs/errors/E1417.md +11 -3
  162. package/docs/errors/E1418.md +12 -3
  163. package/docs/errors/E1419.md +13 -5
  164. package/docs/errors/E1420.md +11 -3
  165. package/docs/errors/E1421.md +11 -3
  166. package/docs/errors/E1422.md +12 -3
  167. package/docs/errors/E1423.md +12 -3
  168. package/docs/errors/E1424.md +24 -5
  169. package/docs/errors/E1425.md +11 -3
  170. package/docs/errors/E1426.md +11 -3
  171. package/docs/errors/E1430.md +11 -3
  172. package/docs/errors/E1431.md +11 -3
  173. package/docs/errors/E1432.md +11 -3
  174. package/docs/errors/E1433.md +11 -3
  175. package/docs/errors/E1434.md +15 -6
  176. package/docs/errors/E1435.md +11 -3
  177. package/docs/errors/E1436.md +11 -3
  178. package/docs/errors/E1437.md +14 -6
  179. package/docs/errors/E1501.md +41 -6
  180. package/docs/errors/E1502.md +13 -3
  181. package/docs/errors/E1503.md +11 -3
  182. package/docs/errors/E1504.md +11 -3
  183. package/docs/errors/E1505.md +23 -5
  184. package/docs/errors/E1506.md +11 -3
  185. package/docs/errors/index.md +52 -29
  186. package/docs/getting-started/cdn.md +15 -9
  187. package/docs/getting-started/first-scene.md +20 -12
  188. package/docs/getting-started/hosting.md +111 -63
  189. package/docs/getting-started/install.md +39 -24
  190. package/docs/getting-started/network-use.md +31 -21
  191. package/docs/getting-started/project-structure.md +20 -8
  192. package/docs/getting-started/third-party-notices.md +6 -10
  193. package/docs/guides/accessibility.md +4 -4
  194. package/docs/guides/add-ons.md +83 -13
  195. package/docs/guides/agents.md +2 -6
  196. package/docs/guides/assets-pipeline.md +248 -72
  197. package/docs/guides/audio.md +17 -15
  198. package/docs/guides/baked-light-data.md +44 -23
  199. package/docs/guides/car-paint.md +37 -31
  200. package/docs/guides/content-pages.md +53 -29
  201. package/docs/guides/custom-passes.md +59 -17
  202. package/docs/guides/custom-shaders.md +54 -37
  203. package/docs/guides/debugging.md +31 -41
  204. package/docs/guides/deploying.md +6 -27
  205. package/docs/guides/deterministic-simulation.md +23 -16
  206. package/docs/guides/first-use-shaders.md +83 -45
  207. package/docs/guides/lens-kit.md +29 -26
  208. package/docs/guides/loading-screens.md +70 -30
  209. package/docs/guides/multiple-views.md +22 -11
  210. package/docs/guides/performance.md +188 -37
  211. package/docs/guides/phones.md +71 -19
  212. package/docs/guides/physics.md +6 -10
  213. package/docs/guides/screens.md +41 -29
  214. package/docs/guides/start-time.md +120 -85
  215. package/docs/guides/testing.md +137 -98
  216. package/docs/guides/ui-overlays.md +17 -12
  217. package/docs/guides/video-textures.md +14 -13
  218. package/docs/images/api/animation/character.webp +0 -0
  219. package/docs/images/api/animation/look-at-ring.webp +0 -0
  220. package/docs/images/api/animation/morph-tulips.webp +0 -0
  221. package/docs/images/api/animation/skeleton-lines.webp +0 -0
  222. package/docs/images/api/controls/gizmo-handles.webp +0 -0
  223. package/docs/images/api/controls/walk-and-fly.webp +0 -0
  224. package/docs/images/api/debug/debug-shapes.webp +0 -0
  225. package/docs/images/api/debug/levels-view.webp +0 -0
  226. package/docs/images/api/engine/transparent-canvas.webp +0 -0
  227. package/docs/images/api/feature-draws/feature-draw-clouds.webp +0 -0
  228. package/docs/images/api/feature-instances/compute-instances.webp +0 -0
  229. package/docs/images/api/feature-instances/instances-shadow.webp +0 -0
  230. package/docs/images/api/geometry/extra-shapes.webp +0 -0
  231. package/docs/images/api/geometry/generators.webp +0 -0
  232. package/docs/images/api/geometry/mesh-arrays.webp +0 -0
  233. package/docs/images/api/geometry/vertex-updates.webp +0 -0
  234. package/docs/images/api/grass/grass-grove.webp +0 -0
  235. package/docs/images/api/grass/grass-presets.webp +0 -0
  236. package/docs/images/api/grass/grass-shadow.webp +0 -0
  237. package/docs/images/api/impostors/impostor-handover.webp +0 -0
  238. package/docs/images/api/impostors/impostor-shadow.webp +0 -0
  239. package/docs/images/api/impostors/impostors-forest.webp +0 -0
  240. package/docs/images/api/lights/spot-cookies.webp +0 -0
  241. package/docs/images/api/lines/lines-lit.webp +0 -0
  242. package/docs/images/api/lines/lines-widths.webp +0 -0
  243. package/docs/images/api/materials/coat-and-sheen.webp +0 -0
  244. package/docs/images/api/materials/decals.webp +0 -0
  245. package/docs/images/api/materials/iridescence-and-anisotropy.webp +0 -0
  246. package/docs/images/api/materials/relief.webp +0 -0
  247. package/docs/images/api/materials/shader-inputs.webp +0 -0
  248. package/docs/images/api/materials/standard-grid.webp +0 -0
  249. package/docs/images/api/materials/subsurface.webp +0 -0
  250. package/docs/images/api/materials/translucency.webp +0 -0
  251. package/docs/images/api/objects/objects-turntable.webp +0 -0
  252. package/docs/images/api/particles/campfire.webp +0 -0
  253. package/docs/images/api/points/galaxy.webp +0 -0
  254. package/docs/images/api/reference/textures/texture-wrap.webp +0 -0
  255. package/docs/images/api/render/fullscreen-glow.webp +0 -0
  256. package/docs/images/api/render/reflection-mirror.webp +0 -0
  257. package/docs/images/api/render/security-camera.webp +0 -0
  258. package/docs/images/api/scene/aurora-sky-layer.webp +0 -0
  259. package/docs/images/api/sound/sound-demo.webp +0 -0
  260. package/docs/images/api/splats/splats-demo.webp +0 -0
  261. package/docs/images/api/sprites/sprites-lines.webp +0 -0
  262. package/docs/images/api/terrain/terrain-demo.webp +0 -0
  263. package/docs/images/api/textures/canvas-screen.webp +0 -0
  264. package/docs/images/api/textures/mipmaps.webp +0 -0
  265. package/docs/images/api/vertex-draws/rain.webp +0 -0
  266. package/docs/images/api/water/ocean.webp +0 -0
  267. package/docs/images/api/water/water-demo.webp +0 -0
  268. package/docs/images/api/water/water-rain.webp +0 -0
  269. package/docs/images/api/water/waterfall.webp +0 -0
  270. package/docs/images/concepts/assets/gltf-model.webp +0 -0
  271. package/docs/images/concepts/color-management/tone-mapped.webp +0 -0
  272. package/docs/images/concepts/culling/far-from-origin.webp +0 -0
  273. package/docs/images/concepts/instances/instances.webp +0 -0
  274. package/docs/images/concepts/instances/per-row-colors.webp +0 -0
  275. package/docs/images/concepts/large-worlds/large-world.webp +0 -0
  276. package/docs/images/concepts/lighting/area-lights.webp +0 -0
  277. package/docs/images/concepts/lighting/atmosphere.webp +0 -0
  278. package/docs/images/concepts/lighting/environment.webp +0 -0
  279. package/docs/images/concepts/lighting/light-shafts.webp +0 -0
  280. package/docs/images/concepts/lighting/reflection-probes.webp +0 -0
  281. package/docs/images/concepts/lod/forest.webp +0 -0
  282. package/docs/images/concepts/materials/weighted-transparency.webp +0 -0
  283. package/docs/images/concepts/post-processing/auto-exposure.webp +0 -0
  284. package/docs/images/concepts/post-processing/bounce-light.webp +0 -0
  285. package/docs/images/concepts/post-processing/depth-of-field.webp +0 -0
  286. package/docs/images/concepts/post-processing/post-effects-alley.webp +0 -0
  287. package/docs/images/concepts/post-processing/sharpen.webp +0 -0
  288. package/docs/images/concepts/post-processing/ssr-wet-street.webp +0 -0
  289. package/docs/images/concepts/render-layers/layers-cottages.webp +0 -0
  290. package/docs/images/concepts/shadows/hero-shadow.webp +0 -0
  291. package/docs/images/cookbook/index/picking.webp +0 -0
  292. package/docs/images/cookbook/index/time-of-day.webp +0 -0
  293. package/docs/images/errors/E1431/area-lights-no-tables.webp +0 -0
  294. package/docs/images/guides/custom-passes/reflection-water.webp +0 -0
  295. package/docs/images/guides/deterministic-simulation/replay-demo.webp +0 -0
  296. package/docs/images/guides/multiple-views/split-screen.webp +0 -0
  297. package/docs/images/guides/performance/overdraw-view.webp +0 -0
  298. package/docs/images/guides/testing/hold-mode-frame.webp +0 -0
  299. package/docs/images/index/showcase-island.webp +0 -0
  300. package/docs/images/porting/threejs-shaders/dissolve.webp +0 -0
  301. package/docs/images/shaders/builtins/builtins.webp +0 -0
  302. package/docs/images/shaders/surface-functions/custom-surface.webp +0 -0
  303. package/docs/images/shaders/surface-functions/vertex-offset.webp +0 -0
  304. package/docs/images/shots.json +2231 -0
  305. package/docs/index.md +14 -23
  306. package/docs/moves.json +1 -0
  307. package/docs/nav.json +300 -0
  308. package/docs/pages.md +230 -212
  309. package/docs/porting/react-three-fiber.md +2 -6
  310. package/docs/porting/threejs-loop-and-threads.md +1 -5
  311. package/docs/porting/threejs-mapping.md +1248 -234
  312. package/docs/porting/threejs-materials.md +10 -5
  313. package/docs/porting/threejs-overview.md +26 -6
  314. package/docs/porting/threejs-postprocessing.md +2 -6
  315. package/docs/porting/threejs-shaders.md +16 -14
  316. package/docs/porting/threejs-unsupported.md +6 -6
  317. package/docs/porting/verification.md +0 -4
  318. package/docs/shaders/builtins.md +15 -4
  319. package/docs/shaders/library.md +9 -6
  320. package/docs/shaders/surface-functions.md +51 -16
  321. package/docs/shaders/wgsl-rules.md +12 -5
  322. package/lib/debug/debug.d.ts +2 -2
  323. package/lib/debug/draw.d.ts +2 -2
  324. package/lib/debug/draw.js +8 -4
  325. package/lib/debug/overlay-look.d.ts +6 -0
  326. package/lib/debug/overlay-look.js +29 -7
  327. package/lib/debug/overlay.js +15 -11
  328. package/lib/debug/stats-options.d.ts +13 -0
  329. package/lib/debug/stats-panel.d.ts +21 -6
  330. package/lib/debug/stats-panel.js +80 -13
  331. package/lib/errors/codes.d.ts +17 -3
  332. package/lib/errors/codes.js +111 -105
  333. package/lib/errors/fixes.js +18 -18
  334. package/lib/gpu/variants.d.ts +8 -2
  335. package/lib/gpu/variants.js +39 -7
  336. package/lib/gpu/webgl2/programs.js +1 -1
  337. package/lib/gpu/webgpu/pipelines.js +13 -13
  338. package/lib/index.d.ts +1 -1
  339. package/lib/page/capabilities.d.ts +1 -1
  340. package/lib/page/engine.d.ts +14 -5
  341. package/lib/page/engine.js +18 -2
  342. package/lib/page/label-loop.js +9 -4
  343. package/lib/page/stats-switch.js +2 -0
  344. package/lib/page/switches.d.ts +6 -4
  345. package/lib/page/switches.js +20 -4
  346. package/lib/scene/baked-light.d.ts +2 -2
  347. package/lib/scene/fake-call-values.js +2 -2
  348. package/lib/scene/frame-cameras.d.ts +16 -4
  349. package/lib/scene/frame-cameras.js +28 -10
  350. package/lib/scene/gltf.d.ts +1 -1
  351. package/lib/scene/level-rule.d.ts +6 -5
  352. package/lib/scene/level-rule.js +2 -2
  353. package/lib/scene/particles.d.ts +7 -3
  354. package/lib/scene/particles.js +3 -1
  355. package/lib/scene/post.d.ts +3 -2
  356. package/lib/scene/resources.d.ts +15 -9
  357. package/lib/scene/scene.d.ts +18 -2
  358. package/lib/scene/scene.js +47 -5
  359. package/lib/scene/time-of-day.d.ts +10 -5
  360. package/lib/scene/time-of-day.js +11 -7
  361. package/lib/shader-artifact.json +1 -1
  362. package/lib/shared/labels.d.ts +5 -2
  363. package/lib/shared/labels.js +5 -2
  364. package/lib/shared/permutation-words.d.ts +2 -0
  365. package/lib/shared/permutation-words.js +8 -0
  366. package/lib/shared/recording.d.ts +13 -5
  367. package/lib/shared/recording.js +31 -10
  368. package/lib/shared/sketch-data.d.ts +9 -0
  369. package/lib/shared/sketch-data.js +57 -0
  370. package/lib/shared/version.d.ts +1 -1
  371. package/lib/shared/version.js +1 -1
  372. package/lib/sketch/define-sketch.d.ts +16 -7
  373. package/lib/sketch/define-sketch.js +2 -1
  374. package/lib/sketch/runner.d.ts +4 -0
  375. package/lib/sketch/runner.js +5 -0
  376. package/lib/sketch/ui.js +4 -2
  377. package/lib/stats.d.ts +1 -0
  378. package/lib/workers/protocol.d.ts +10 -0
  379. package/lib/workers/render-worker.js +4 -1
  380. package/lib/workers/sketch-worker.js +4 -1
  381. package/package.json +1 -1
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/splats
3
3
  title: "Gaussian splats (@null3d/splats): API reference"
4
- status: generated
5
- since: "0.3"
4
+ generated: true
6
5
  summary: "Every export of the Gaussian splats (@null3d/splats) API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -16,12 +15,16 @@ summary: "Every export of the Gaussian splats (@null3d/splats) API, from the eng
16
15
  function checkSplats(data: SplatData, what: string): SplatData
17
16
  ```
18
17
 
18
+ Import from `@null3d/splats`.
19
+
19
20
  Checks that a cloud's arrays hold what its count says, and throws when they do not.
20
21
 
21
22
  ## `ChunkOptions`
22
23
 
23
24
  Interface `ChunkOptions`.
24
25
 
26
+ Import from `@null3d/splats`.
27
+
25
28
  How a cloud is cut, and what the caller sees as it is.
26
29
 
27
30
  | Member | Description |
@@ -36,6 +39,8 @@ How a cloud is cut, and what the caller sees as it is.
36
39
  function chunkSplats(data: SplatData, options: ChunkOptions = {}): Promise<SplatChunks>
37
40
  ```
38
41
 
42
+ Import from `@null3d/splats`.
43
+
39
44
  Cuts a cloud into chunks of nearby splats, each ordered so that its first splats cover the most surface. `yieldTo` runs between chunks, and `onChunk` sees each chunk as it is ready: a draw that takes them one by one appears coarse to fine, and a large cloud never holds up a frame.
40
45
 
41
46
  ## `colorOfSh`
@@ -44,6 +49,8 @@ Cuts a cloud into chunks of nearby splats, each ordered so that its first splats
44
49
  function colorOfSh(dc: readonly [number, number, number], encoded = true, out = new Float32Array(3)): Float32Array
45
50
  ```
46
51
 
52
+ Import from `@null3d/splats`.
53
+
47
54
  The linear RGB of a first-band spherical-harmonic coefficient, from its three channels. `encoded` says that the reconstructed value is an sRGB display value, which this decodes; leave it out for a value that is already linear.
48
55
 
49
56
  ## `createSplats`
@@ -52,7 +59,13 @@ The linear RGB of a first-band spherical-harmonic coefficient, from its three ch
52
59
  function createSplats(ctx: SketchContext, options: SplatsOptions): Promise<Splats>
53
60
  ```
54
61
 
55
- Draws a cloud of Gaussian splats in a sketch. The cloud comes from an SPZ file, from a splat stream index, or from the data of another reader. A glTF model that carries `KHR_gaussian_splatting` loads through `assets.loadGltf`, because the add-on's module registers the reader as it loads. A cloud draws with detail levels, a budget that follows the quality preset and the GPU path, and a soft mix with the scene's opaque meshes. A splat stream starts drawing before its whole cloud has downloaded: give the address of its index, and the add-on fetches the chunks that the view needs as it needs them. Each chunk of the cloud is an SPZ file, and the index names them. Call `splats.update(eye)` once in each frame, with the camera's position from `getPosition`, and free the cloud with `splats.destroy()`.
62
+ Import from `@null3d/splats`.
63
+
64
+ Draws a cloud of Gaussian splats in a sketch. The cloud comes from an SPZ file, from a splat stream index, or from the data of another reader. A glTF model that carries `KHR_gaussian_splatting` loads through `assets.loadGltf`, because the add-on's module registers the reader as it loads. A cloud draws with detail levels, a budget that follows the quality preset and the GPU path, and a soft mix with the scene's opaque meshes.
65
+
66
+ A splat stream starts drawing before its whole cloud has downloaded: give the address of its index, and the add-on fetches the chunks that the view needs as it needs them. Each chunk of the cloud is an SPZ file, and the index names them.
67
+
68
+ Call `splats.update(eye)` once in each frame, with the camera's position from `getPosition`, and free the cloud with `splats.destroy()`.
56
69
 
57
70
  ## `decodeSpz`
58
71
 
@@ -60,6 +73,8 @@ Draws a cloud of Gaussian splats in a sketch. The cloud comes from an SPZ file,
60
73
  function decodeSpz(file: Uint8Array | ArrayBuffer): Promise<SplatData>
61
74
  ```
62
75
 
76
+ Import from `@null3d/splats`.
77
+
63
78
  Reads an SPZ file into a cloud of splats. `file` holds the file's bytes as the browser delivers them. Throws when the file is not an SPZ file this reader knows, when its sizes do not fit, and when a zstd stream needs a browser without the zstd decompressor.
64
79
 
65
80
  ## `encodeSpz`
@@ -68,6 +83,8 @@ Reads an SPZ file into a cloud of splats. `file` holds the file's bytes as the b
68
83
  function encodeSpz(data: SplatData): Promise<Uint8Array>
69
84
  ```
70
85
 
86
+ Import from `@null3d/splats`.
87
+
71
88
  Writes a cloud as a version 3 SPZ file, gzipped as the readers of the format expect. A stream writer cuts a cloud with `chunkSplats` and writes each chunk with this call, then names the files in a stream index. Throws E2101 for a cloud whose arrays do not fit its count.
72
89
 
73
90
  ## `parseStreamIndex`
@@ -76,6 +93,8 @@ Writes a cloud as a version 3 SPZ file, gzipped as the readers of the format exp
76
93
  function parseStreamIndex(text: string, base: string | URL | undefined, what = 'the splat stream index'): SplatStream
77
94
  ```
78
95
 
96
+ Import from `@null3d/splats`.
97
+
79
98
  Reads a stream index. `base` resolves each chunk's address, which a relative one needs. Throws E2112 for a text that is not a stream index of this version, and for a cloud whose chunks do not hold the number of splats that it names.
80
99
 
81
100
  ## `SPLAT_EXTENSION`
@@ -84,12 +103,16 @@ Reads a stream index. `base` resolves each chunk's address, which a relative one
84
103
  const SPLAT_EXTENSION: 'KHR_gaussian_splatting'
85
104
  ```
86
105
 
106
+ Import from `@null3d/splats`.
107
+
87
108
  The glTF extension that a splat file carries, which this handler reads.
88
109
 
89
110
  ## `SplatChunk`
90
111
 
91
112
  Interface `SplatChunk`.
92
113
 
114
+ Import from `@null3d/splats`.
115
+
93
116
  One chunk of a cloud, with its splats in the order that a coarser level keeps.
94
117
 
95
118
  | Member | Description |
@@ -107,6 +130,8 @@ One chunk of a cloud, with its splats in the order that a coarser level keeps.
107
130
 
108
131
  Interface `SplatChunks`.
109
132
 
133
+ Import from `@null3d/splats`.
134
+
110
135
  A cloud cut into chunks, and the splits that its levels take.
111
136
 
112
137
  | Member | Description |
@@ -118,6 +143,8 @@ A cloud cut into chunks, and the splits that its levels take.
118
143
 
119
144
  Interface `SplatData`.
120
145
 
146
+ Import from `@null3d/splats`.
147
+
121
148
  One cloud of Gaussian splats, ready to draw.
122
149
 
123
150
  | Member | Description |
@@ -132,6 +159,8 @@ One cloud of Gaussian splats, ready to draw.
132
159
 
133
160
  Interface `Splats`.
134
161
 
162
+ Import from `@null3d/splats`.
163
+
135
164
  A cloud of Gaussian splats that a scene draws, with its levels and its budget.
136
165
 
137
166
  | Member | Description |
@@ -155,6 +184,8 @@ A cloud of Gaussian splats that a scene draws, with its levels and its budget.
155
184
 
156
185
  Interface `SplatsDraw`.
157
186
 
187
+ Import from `@null3d/splats`.
188
+
158
189
  The draw that a cloud fills: the instance batch whose rows are the splats that draw. Write the rows, mark them, and set the number that draw. The draw's material is the add-on's shader.
159
190
 
160
191
  | Member | Description |
@@ -168,6 +199,8 @@ The draw that a cloud fills: the instance batch whose rows are the splats that d
168
199
 
169
200
  Interface `SplatsOptions`.
170
201
 
202
+ Import from `@null3d/splats`.
203
+
171
204
  Options of `createSplats`. Give the cloud itself, or the address of a splat file or a stream index.
172
205
 
173
206
  | Member | Description |
@@ -183,6 +216,8 @@ Options of `createSplats`. Give the cloud itself, or the address of a splat file
183
216
 
184
217
  Interface `SplatStream`.
185
218
 
219
+ Import from `@null3d/splats`.
220
+
186
221
  A splat stream's index: the cloud's count and the chunks that it is cut into.
187
222
 
188
223
  | Member | Description |
@@ -195,6 +230,8 @@ A splat stream's index: the cloud's count and the chunks that it is cut into.
195
230
 
196
231
  Interface `StreamChunk`.
197
232
 
233
+ Import from `@null3d/splats`.
234
+
198
235
  One chunk of a splat stream: where its file lies, how many splats it holds, and the bounds that the selection needs before it loads.
199
236
 
200
237
  | Member | Description |
@@ -211,4 +248,6 @@ One chunk of a splat stream: where its file lies, how many splats it holds, and
211
248
  type Yielder = () => Promise<void>;
212
249
  ```
213
250
 
251
+ Import from `@null3d/splats`.
252
+
214
253
  Hands the thread back between chunks, so a large cloud never holds up a frame.
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/sprites
3
3
  title: "Sprites: API reference"
4
- status: generated
5
- since: "0.2"
4
+ generated: true
6
5
  summary: "Every export of the Sprites API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -46,7 +45,7 @@ Many sprites: quads that face the camera, each with its own position, size, rota
46
45
 
47
46
  ## `SpriteOptions`
48
47
 
49
- Interface `SpriteOptions`, which extends `SpriteValues`, `Omit`.
48
+ Interface `SpriteOptions`, which extends `SpriteValues`, `Omit<MaterialFeatures, 'doubleSided' | 'vertexColors' | 'forceSinglePass'>`.
50
49
 
51
50
  Options of `scene.createSprites`. The look of the sprites takes the options of an unlit material, but sprites blend by default.
52
51
 
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/tasks
3
3
  title: "Tasks on the job workers: API reference"
4
- status: generated
5
- since: "0.3"
4
+ generated: true
6
5
  summary: "Every export of the Tasks on the job workers API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -16,7 +15,21 @@ summary: "Every export of the Tasks on the job workers API, from the engine's do
16
15
  function runTask<T>(task: Task, input: unknown, transfer: Transferable[] = NO_TRANSFER): Promise<T>
17
16
  ```
18
17
 
19
- Runs a task in a job worker, beside the frames, and resolves with its output. The task's module is imported once in each worker that runs it, so a module keeps its state between tasks, and each of its WebAssembly files compiles once per page. A module exports `run`, which gets the task's input and a function that returns each compiled module by the name that the task gives it. The task runs in a job worker, never in the thread that ran the sketch. A job worker leaves the job system only between the chunks of a frame, so a frame never waits for a task, and with two or more job workers one stays for the frames. The engine resolves the promise between two frames, so code in its `then` runs before the next frame's `onUpdate`, and that frame draws what the task wrote. Tasks run at the same time in different job workers, so their answers come in no fixed order. Await one task's answer before you queue the next when the order matters. A `SharedArrayBuffer` in the input reaches the worker shared rather than copied, and the task writes into it. While the task runs, order the writes that both threads read with `Atomics`. Once the promise resolves, the worker has stopped writing, and the thread that ran the task reads the buffer as it stands. Such a buffer suits data too large to copy, such as the depths and order of many instances sorted in every frame. The engine asks the page for job workers with the first task, and sends no task to one that did not start. Where no job worker takes the tasks, the engine starts a task worker for them, as on a page without worker threads. The promise rejects with a `TaskFailure` when the task's module or WebAssembly fails to start, when its `run` throws, or when the engine stops before the answer arrives. A WebAssembly file that does not download or compile rejects with the engine's error. Call it from the code that runs the sketch: the setup function or a callback. A task's input and output must pass to another worker: numbers, strings, plain objects and arrays, typed arrays, `ArrayBuffer`s, `SharedArrayBuffer`s and the objects that the transfer list names.
18
+ Runs a task in a job worker, beside the frames, and resolves with its output.
19
+
20
+ The task's module is imported once in each worker that runs it, so a module keeps its state between tasks, and each of its WebAssembly files compiles once per page. A module exports `run`, which gets the task's input and a function that returns each compiled module by the name that the task gives it.
21
+
22
+ The task runs in a job worker, never in the thread that ran the sketch. A job worker leaves the job system only between the chunks of a frame, so a frame never waits for a task, and with two or more job workers one stays for the frames.
23
+
24
+ The engine resolves the promise between two frames, so code in its `then` runs before the next frame's `onUpdate`, and that frame draws what the task wrote. Tasks run at the same time in different job workers, so their answers come in no fixed order. Await one task's answer before you queue the next when the order matters.
25
+
26
+ A `SharedArrayBuffer` in the input reaches the worker shared rather than copied, and the task writes into it. While the task runs, order the writes that both threads read with `Atomics`. Once the promise resolves, the worker has stopped writing, and the thread that ran the task reads the buffer as it stands. Such a buffer suits data too large to copy, such as the depths and order of many instances sorted in every frame.
27
+
28
+ The engine asks the page for job workers with the first task, and sends no task to one that did not start. Where no job worker takes the tasks, the engine starts a task worker for them, as on a page without worker threads.
29
+
30
+ The promise rejects with a `TaskFailure` when the task's module or WebAssembly fails to start, when its `run` throws, or when the engine stops before the answer arrives. A WebAssembly file that does not download or compile rejects with the engine's error.
31
+
32
+ Call it from the code that runs the sketch: the setup function or a callback. A task's input and output must pass to another worker: numbers, strings, plain objects and arrays, typed arrays, `ArrayBuffer`s, `SharedArrayBuffer`s and the objects that the transfer list names.
20
33
 
21
34
  ## `Task`
22
35
 
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/terrain
3
3
  title: "Terrain (@null3d/terrain): API reference"
4
- status: generated
5
- since: "0.2"
4
+ generated: true
6
5
  summary: "Every export of the Terrain (@null3d/terrain) API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -16,6 +15,8 @@ summary: "Every export of the Terrain (@null3d/terrain) API, from the engine's d
16
15
  function createHeightfield(options: HeightfieldOptions): Heightfield
17
16
  ```
18
17
 
18
+ Import from `@null3d/terrain`.
19
+
19
20
  Makes a height field. See `Heightfield`.
20
21
 
21
22
  ## `createTerrain`
@@ -24,12 +25,16 @@ Makes a height field. See `Heightfield`.
24
25
  function createTerrain(context: SketchContext, options: TerrainOptions): Terrain
25
26
  ```
26
27
 
28
+ Import from `@null3d/terrain`.
29
+
27
30
  Makes a terrain: a height field drawn as a quadtree of blocks with a splat-mapped surface. Call `terrain.update(eye)` with the camera's world position when it moves, and read `heightAt` and `normalAt` to place what stands on the ground. `terrain.destroy()` frees it.
28
31
 
29
32
  ## `Heightfield`
30
33
 
31
34
  Class `Heightfield`.
32
35
 
36
+ Import from `@null3d/terrain`.
37
+
33
38
  The height field that a terrain builds every block from: the height of a square piece of ground, sampled once and read back with bilinear interpolation.
34
39
 
35
40
  | Member | Description |
@@ -49,6 +54,8 @@ The height field that a terrain builds every block from: the height of a square
49
54
 
50
55
  Interface `HeightfieldOptions`.
51
56
 
57
+ Import from `@null3d/terrain`.
58
+
52
59
  Options for `createHeightfield`.
53
60
 
54
61
  | Member | Description |
@@ -63,12 +70,16 @@ Options for `createHeightfield`.
63
70
  type SplatFunction = (x: number, z: number, out: number[]) => void;
64
71
  ```
65
72
 
73
+ Import from `@null3d/terrain`.
74
+
66
75
  A weight of each layer at a point, written into `out` as red, green, blue and alpha.
67
76
 
68
77
  ## `Terrain`
69
78
 
70
79
  Class `Terrain`.
71
80
 
81
+ Import from `@null3d/terrain`.
82
+
72
83
  A ground drawn as a quadtree of blocks. `createTerrain` makes one.
73
84
 
74
85
  | Member | Description |
@@ -81,7 +92,7 @@ A ground drawn as a quadtree of blocks. `createTerrain` makes one.
81
92
  | `heightAt(x: number, z: number): number` | The height of the ground at a point, in meters, with bilinear interpolation between the samples of the height field. Allocates nothing. |
82
93
  | `normalAt(x: number, z: number, out: number[] \| Float32Array): void` | The unit normal of the ground at a point, written into `out` as x, y and z, for placing an object that stands on the ground. Allocates nothing. |
83
94
  | `update(eye: Vec3Like): void` | Picks the blocks to draw for a camera whose world position `eye` holds, as x, y and z. The ground picks again when the camera crosses a cell of the finest level, rises by one such cell, or draws through a different field of view or buffer height, so a still camera costs no work. The selection and the block build run in the add-on's WebAssembly module on the engine's job workers, so this call only asks for them. A new selection builds at most `blocksPerUpdate` blocks in one task, the first selection builds every block it needs, and the ground draws the selection it had until the new one is built. A block that the new selection needs takes the mesh of one that it left out. Call it in `onUpdate` with the camera's own position, in an array you keep: an array crosses the call as it is, where two fractions make the browser box each of them into an object. |
84
- | `setTint(tint: readonly [number, number, number]): void` | Multiplies every layer's colour, so a scene darkens its open ground with the hour: white leaves the ground as its maps give it. It sets the material's own color, which every block shares, so a value that holds still costs nothing. |
95
+ | `setTint(tint: readonly [number, number, number]): void` | Multiplies every layer's color, so a scene darkens its open ground with the hour: white leaves the ground as its maps give it. It sets the material's own color, which every block shares, so a value that holds still costs nothing. |
85
96
  | `setMorph(enabled: boolean): void` | Turns the block morph on or off, from the next frame. The ground reads the selection's scale again with the last view, so a page that compares the look or measures the cost needs no new selection. |
86
97
  | `setVisible(visible: boolean): void` | Shows or hides the whole ground, for a camera high above it. |
87
98
  | `destroy(): void` | Destroys the ground: every block's object and mesh, and the material's own textures. |
@@ -90,6 +101,8 @@ A ground drawn as a quadtree of blocks. `createTerrain` makes one.
90
101
 
91
102
  Interface `TerrainLayer`.
92
103
 
104
+ Import from `@null3d/terrain`.
105
+
93
106
  One layer of the ground's surface: a tiled color map, and how rough it is.
94
107
 
95
108
  | Member | Description |
@@ -104,6 +117,8 @@ One layer of the ground's surface: a tiled color map, and how rough it is.
104
117
 
105
118
  Interface `TerrainOptions`.
106
119
 
120
+ Import from `@null3d/terrain`.
121
+
107
122
  What `createTerrain` needs and what the ground may change.
108
123
 
109
124
  | Member | Description |
@@ -120,7 +135,7 @@ What `createTerrain` needs and what the ground may change.
120
135
  | `error?: number` | The screen error, in pixels, above which a block splits into four. The default is 35 times the quality preset's `lodThreshold`, so the ground draws with that preset's detail: Low picks coarser blocks. 0 keeps the finest level everywhere. |
121
136
  | `bakedNormals?: boolean` | True lights every pixel from a normal map baked over the ground, which shows relief that a coarse block's vertices cannot. The default is true; false lights from the mesh's own normals. |
122
137
  | `steepFaces?: boolean` | True maps the third layer, the rock, from the sides on a steep face, where a map laid from above stretches into streaks. It costs two more samples of that map. The default is false. |
123
- | `skirt?: number` | How far the skirt around each block hangs down, in meters. The default is four of the block's cells, which closes the seam against a neighbour up to a level or two coarser. |
138
+ | `skirt?: number` | How far the skirt around each block hangs down, in meters. The default is four of the block's cells, which closes the seam against a neighbor up to a level or two coarser. |
124
139
  | `morph?: boolean` | True moves each block toward its parent block's surface as the camera pulls away, so a block that hands over to a coarser one does not pop. The default is true. False switches each block at once and keeps the block's vertices as they are. |
125
140
  | `metalness?: number` | How much the ground acts like a metal, from 0 to 1. The default is 0. |
126
141
  | `castShadows?: boolean` | True makes the ground cast the shadows of the lights that cast them. The default is true. |
@@ -132,6 +147,8 @@ What `createTerrain` needs and what the ground may change.
132
147
 
133
148
  Interface `TerrainTextureOptions`.
134
149
 
150
+ Import from `@null3d/terrain`.
151
+
135
152
  How to make the layer maps.
136
153
 
137
154
  | Member | Description |
@@ -145,12 +162,16 @@ How to make the layer maps.
145
162
  function terrainTextures(textures: SketchContext['textures'], options: TerrainTextureOptions = {}): TerrainTextures
146
163
  ```
147
164
 
148
- Makes the four layer maps in code. Each is `size` texels across and repeats; the noise tiles, so the maps do too, and the same seed gives the same maps on every run. Each map keeps a height in its alpha channel, so a layer that reads its height from there pushes its clumps and stones through a neighbour at a boundary.
165
+ Import from `@null3d/terrain`.
166
+
167
+ Makes the four layer maps in code. Each is `size` texels across and repeats; the noise tiles, so the maps do too, and the same seed gives the same maps on every run. Each map keeps a height in its alpha channel, so a layer that reads its height from there pushes its clumps and stones through a neighbor at a boundary.
149
168
 
150
169
  ## `TerrainTextures`
151
170
 
152
171
  Interface `TerrainTextures`.
153
172
 
173
+ Import from `@null3d/terrain`.
174
+
154
175
  The four layer maps, ready for `TerrainLayer.map`.
155
176
 
156
177
  | Member | Description |
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/textures
3
3
  title: "Textures: API reference"
4
- status: generated
5
- since: "0.1"
4
+ generated: true
6
5
  summary: "Every export of the Textures API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -1,14 +1,13 @@
1
1
  ---
2
2
  id: api/reference/three-compat
3
- title: "three.js compatibility (@null3d/three-compat): API reference"
4
- status: generated
5
- since: "0.3"
6
- summary: "Every export of the three.js compatibility (@null3d/three-compat) API, from the engine's doc comments."
3
+ title: "three.js looks (@null3d/three-compat): API reference"
4
+ generated: true
5
+ summary: "Every export of the three.js looks (@null3d/three-compat) API, from the engine's doc comments."
7
6
  ---
8
7
 
9
- # three.js compatibility (@null3d/three-compat): API reference
8
+ # three.js looks (@null3d/three-compat): API reference
10
9
 
11
- > [three.js compatibility (@null3d/three-compat)](../three-compat.md) explains these exports. The engine's doc comments make this page.
10
+ > [three.js looks (@null3d/three-compat)](../three-compat.md) explains these exports. The engine's doc comments make this page.
12
11
 
13
12
  ## `cineon`
14
13
 
@@ -16,6 +15,8 @@ summary: "Every export of the three.js compatibility (@null3d/three-compat) API,
16
15
  const cineon: ToneCurve
17
16
  ```
18
17
 
18
+ Import from `@null3d/three-compat`.
19
+
19
20
  Cineon's tone curve, with three.js's `CineonToneMapping` formula, the filmic operator of Jim Hejl and Richard Burgess-Dawson. Give it to `post.set({ toneMapping })` where the three.js scene sets `CineonToneMapping`.
20
21
 
21
22
  ## `createOutlinePass`
@@ -24,12 +25,18 @@ Cineon's tone curve, with three.js's `CineonToneMapping` formula, the filmic ope
24
25
  function createOutlinePass(ctx: SketchContext, options: OutlinePassOptions = {}): OutlinePass
25
26
  ```
26
27
 
27
- Draws an outline with three.js's `OutlinePass` look: a soft edge around the meshes that `mesh.setOutlined(true)` marks, its glow, and its pulse. Settings turn it on, and the core draws the mask that it reads. The edge is soft, and the core's crisp line is off. A scene that also wants the crisp line sets `post.set({ outline: { width } })` after this call.
28
+ Import from `@null3d/three-compat`.
29
+
30
+ Draws an outline with three.js's `OutlinePass` look: a soft edge around the meshes that `mesh.setOutlined(true)` marks, its glow, and its pulse. Settings turn it on, and the core draws the mask that it reads.
31
+
32
+ The edge is soft, and the core's crisp line is off. A scene that also wants the crisp line sets `post.set({ outline: { width } })` after this call.
28
33
 
29
34
  ## `OutlinePass`
30
35
 
31
36
  Interface `OutlinePass`.
32
37
 
38
+ Import from `@null3d/three-compat`.
39
+
33
40
  An outline that `createOutlinePass` made. A call to `set` changes its settings from the next frame on.
34
41
 
35
42
  | Member | Description |
@@ -40,6 +47,8 @@ An outline that `createOutlinePass` made. A call to `set` changes its settings f
40
47
 
41
48
  Interface `OutlinePassOptions`.
42
49
 
50
+ Import from `@null3d/three-compat`.
51
+
43
52
  The settings of an outline, with three.js's `OutlinePass` names and defaults. A setting that a call leaves out keeps its value.
44
53
 
45
54
  | Member | Description |
@@ -57,4 +66,6 @@ The settings of an outline, with three.js's `OutlinePass` names and defaults. A
57
66
  const reinhard: ToneCurve
58
67
  ```
59
68
 
69
+ Import from `@null3d/three-compat`.
70
+
60
71
  Reinhard's tone curve, with three.js's `ReinhardToneMapping` formula. Give it to `post.set({ toneMapping })` where the three.js scene sets `ReinhardToneMapping`.
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/time
3
3
  title: "Time: API reference"
4
- status: generated
5
- since: "0.1"
4
+ generated: true
6
5
  summary: "Every export of the Time API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -1,14 +1,13 @@
1
1
  ---
2
2
  id: api/reference/ui
3
- title: "UI overlays and labels: API reference"
4
- status: generated
5
- since: "0.2"
6
- summary: "Every export of the UI overlays and labels API, from the engine's doc comments."
3
+ title: "Labels that follow objects: API reference"
4
+ generated: true
5
+ summary: "Every export of the Labels that follow objects API, from the engine's doc comments."
7
6
  ---
8
7
 
9
- # UI overlays and labels: API reference
8
+ # Labels that follow objects: API reference
10
9
 
11
- > [UI overlays and labels](../ui.md) explains these exports. The engine's doc comments make this page.
10
+ > [Labels that follow objects](../ui.md) explains these exports. The engine's doc comments make this page.
12
11
 
13
12
  ## `EngineLabels`
14
13
 
@@ -38,7 +37,11 @@ Options for `ui.trackLabel`.
38
37
  type LabelTransform = 'screen' | 'world' | 'billboard';
39
38
  ```
40
39
 
41
- How a label's element sits in the scene. - `'screen'` keeps the element flat on the screen at the label's place, always the same size. - `'world'` makes the element a plane of the scene: it turns and scales with the object. - `'billboard'` makes the element a plane of the scene that always faces the camera.
40
+ How a label's element sits in the scene.
41
+
42
+ - `'screen'` keeps the element flat on the screen at the label's place, always the same size.
43
+ - `'world'` makes the element a plane of the scene: it turns and scales with the object.
44
+ - `'billboard'` makes the element a plane of the scene that always faces the camera.
42
45
 
43
46
  ## `Ui`
44
47
 
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/vertex-draws
3
3
  title: "Draws from a vertex count: API reference"
4
- status: generated
5
- since: "0.2"
4
+ generated: true
6
5
  summary: "Every export of the Draws from a vertex count API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -39,7 +38,7 @@ The sphere that culls a draw. The engine draws the whole draw or none of it, so
39
38
 
40
39
  ## `VertexDrawOptions`
41
40
 
42
- Interface `VertexDrawOptions`, which extends `Omit`.
41
+ Interface `VertexDrawOptions`, which extends `Omit<ShaderOptions<Wgsl>, 'wgsl'>`.
43
42
 
44
43
  Options of `scene.createVertexDraw`: the shader, its two counts, its bounds, and every option of `materials.shader`, such as the blending and `doubleSided`. A draw blends, so its material draws in the transparent pass, where its sphere culls it and one shape covers the ones behind it.
45
44