@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/feature-draws
3
3
  title: "Add-on feature draws: API reference"
4
- status: generated
5
- since: "0.3"
4
+ generated: true
6
5
  summary: "Every export of the Add-on feature draws API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -30,7 +29,7 @@ One add-on draw that a feature description declared. It draws its vertices with
30
29
 
31
30
  ## `FeatureDrawOptions`
32
31
 
33
- Interface `FeatureDrawOptions`, which extends `Omit`.
32
+ Interface `FeatureDrawOptions`, which extends `Omit<ShaderOptions<Wgsl>, 'wgsl'>`.
34
33
 
35
34
  Options of `scene.addFeatureDraw` besides the feature description. The shader and its uniforms take the options of `materials.shader`, so a draw takes every value and texture that a custom material takes. Where the draw sits, and where it sorts, come from the description.
36
35
 
@@ -71,7 +70,7 @@ A draw of many copies: one shape that the engine repeats once for each row of an
71
70
 
72
71
  ## `FeatureInstancesOptions`
73
72
 
74
- Interface `FeatureInstancesOptions`, which extends `FeatureDrawOptions`.
73
+ Interface `FeatureInstancesOptions`, which extends `FeatureDrawOptions<Wgsl>`.
75
74
 
76
75
  Options of `scene.addFeatureInstances`: the options of a draw, and the number of copies that the engine draws of its one shape. Each copy is a row of an instance batch, with its own place, color and values, which the add-on writes in the batch's arrays.
77
76
 
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/feature-effects
3
3
  title: "Add-on feature effects: API reference"
4
- status: generated
5
- since: "0.3"
4
+ generated: true
6
5
  summary: "Every export of the Add-on feature effects API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -27,6 +26,6 @@ A full-screen feature that `post.addFeatureEffect` placed: the effect while the
27
26
 
28
27
  ## `FeatureEffectOptions`
29
28
 
30
- Interface `FeatureEffectOptions`, which extends `Omit`.
29
+ Interface `FeatureEffectOptions`, which extends `Omit<EffectOptions<Wgsl>, 'order'>`.
31
30
 
32
31
  Options of `post.addFeatureEffect` besides the feature description: the pass's WGSL, its first uniform values and its textures, as `post.addEffect` takes them. The description gives the place where the pass runs, so the options take no order.
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/feature-instances
3
3
  title: "Add-on instance draws: API reference"
4
- status: generated
5
- since: "0.3"
4
+ generated: true
6
5
  summary: "Every export of the Add-on instance draws API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -14,7 +13,9 @@ summary: "Every export of the Add-on instance draws API, from the engine's doc c
14
13
 
15
14
  Class `ComputeInstances`.
16
15
 
17
- One add-on draw whose live count the GPU writes. Draw its instances from the add-on's own buffer with `setInstances`, or from a compute pass that writes the count word, and free it with `destroy`. The description's `ready` callback decides each frame whether the draw draws. While it answers false the engine records nothing for the draw: no draw, no count copy and no conversion.
16
+ One add-on draw whose live count the GPU writes. Draw its instances from the add-on's own buffer with `setInstances`, or from a compute pass that writes the count word, and free it with `destroy`.
17
+
18
+ The description's `ready` callback decides each frame whether the draw draws. While it answers false the engine records nothing for the draw: no draw, no count copy and no conversion.
18
19
 
19
20
  | Member | Description |
20
21
  | --- | --- |
@@ -31,7 +32,7 @@ One add-on draw whose live count the GPU writes. Draw its instances from the add
31
32
 
32
33
  ## `ComputeInstancesOptions`
33
34
 
34
- Interface `ComputeInstancesOptions`, which extends `Omit`.
35
+ Interface `ComputeInstancesOptions`, which extends `Omit<ShaderOptions<Wgsl>, 'wgsl'>`.
35
36
 
36
37
  Options of `scene.addComputeInstances` besides the feature description. The shader and its uniforms take the options of `materials.shader`, so a draw takes every value and texture that a custom material takes.
37
38
 
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/features
3
3
  title: "Add-on feature descriptions: API reference"
4
- status: generated
5
- since: "0.3"
4
+ generated: true
6
5
  summary: "Every export of the Add-on feature descriptions API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -62,7 +61,9 @@ Claims the names in `description` for one add-on, and returns the frozen namespa
62
61
  function defineFeature(description: FeatureDescription): FeatureDescription
63
62
  ```
64
63
 
65
- Declares one add-on render feature. The engine checks the description and fills its neutral defaults, and returns a frozen copy: the `'normal'` band with order 0, empty reads and writes, no outputs or lighting slots, and the main view, for a feature that records a frame point. Throws E1223 for an option that a description does not take, 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, slot or view, an output with no neutral default, a setting with a value outside its own range or a governor without a budget, a budget whose presets are not four times above 0, or a GPU scope pass that `render.addPass` did not return.
64
+ Declares one add-on render feature. The engine checks the description and fills its neutral defaults, and returns a frozen copy: the `'normal'` band with order 0, empty reads and writes, no outputs or lighting slots, and the main view, for a feature that records a frame point.
65
+
66
+ Throws E1223 for an option that a description does not take, 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, slot or view, an output with no neutral default, a setting with a value outside its own range or a governor without a budget, a budget whose presets are not four times above 0, or a GPU scope pass that `render.addPass` did not return.
66
67
 
67
68
  ## `ExportedNames`
68
69
 
@@ -192,7 +193,9 @@ A feature that a host registered: the values that its own code reads in each fra
192
193
 
193
194
  Class `FeatureHost`.
194
195
 
195
- One add-on's features, kept in step with the sketch's quality. `add` registers a feature, resolves its settings for the preset and the GPU path in use, and registers its budget with the sketch's budgets, so that the frame-budget governor's steps reach it. The host calls the feature's `quality` callback when a value changes, and reports the features' figures to the page's stats overlay. Call `destroy` when the add-on stops, so that its budgets and its change handler go away.
196
+ One add-on's features, kept in step with the sketch's quality. `add` registers a feature, resolves its settings for the preset and the GPU path in use, and registers its budget with the sketch's budgets, so that the frame-budget governor's steps reach it. The host calls the feature's `quality` callback when a value changes, and reports the features' figures to the page's stats overlay.
197
+
198
+ Call `destroy` when the add-on stops, so that its budgets and its change handler go away.
196
199
 
197
200
  | Member | Description |
198
201
  | --- | --- |
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  id: api/reference/geometry
3
3
  title: "Geometry: API reference"
4
- status: generated
5
- since: "0.1"
4
+ generated: true
6
5
  summary: "Every export of the Geometry API, from the engine's doc comments."
7
6
  ---
8
7
 
@@ -14,6 +13,8 @@ summary: "Every export of the Geometry API, from the engine's doc comments."
14
13
 
15
14
  Class `ArcCurve`, which extends `EllipseCurve`.
16
15
 
16
+ Import from `@null3d/geometry`.
17
+
17
18
  A 2D circle or part of one: an `EllipseCurve` with one radius.
18
19
 
19
20
  ## `BoxOptions`
@@ -57,7 +58,9 @@ Options for `geometry.capsule`: a cylinder with a half sphere on each end. The c
57
58
 
58
59
  ## `CatmullRomCurve3`
59
60
 
60
- Class `CatmullRomCurve3`, which extends `Curve`.
61
+ Class `CatmullRomCurve3`, which extends `Curve<[number, number, number]>`.
62
+
63
+ Import from `@null3d/geometry`.
61
64
 
62
65
  A smooth 3D curve through a list of points.
63
66
 
@@ -75,6 +78,8 @@ A smooth 3D curve through a list of points.
75
78
  type CatmullRomCurveType = 'centripetal' | 'chordal' | 'catmullrom';
76
79
  ```
77
80
 
81
+ Import from `@null3d/geometry`.
82
+
78
83
  How a `CatmullRomCurve3` spaces its spline between points. `'centripetal'` uses the fourth root of the distance, `'chordal'` the square root, and `'catmullrom'` even steps with a tension.
79
84
 
80
85
  ## `CircleOptions`
@@ -108,7 +113,9 @@ Options for `geometry.cone`. The cone stands on the Y axis, centered on its orig
108
113
 
109
114
  ## `CubicBezierCurve`
110
115
 
111
- Class `CubicBezierCurve`, which extends `Curve`.
116
+ Class `CubicBezierCurve`, which extends `Curve<[number, number]>`.
117
+
118
+ Import from `@null3d/geometry`.
112
119
 
113
120
  A 2D cubic Bézier curve from `v0` to `v3`, shaped by the control points `v1` and `v2`.
114
121
 
@@ -122,7 +129,9 @@ A 2D cubic Bézier curve from `v0` to `v3`, shaped by the control points `v1` an
122
129
 
123
130
  ## `CubicBezierCurve3`
124
131
 
125
- Class `CubicBezierCurve3`, which extends `Curve`.
132
+ Class `CubicBezierCurve3`, which extends `Curve<[number, number, number]>`.
133
+
134
+ Import from `@null3d/geometry`.
126
135
 
127
136
  A 3D cubic Bézier curve from `v0` to `v3`, shaped by the control points `v1` and `v2`.
128
137
 
@@ -138,6 +147,8 @@ A 3D cubic Bézier curve from `v0` to `v3`, shaped by the control points `v1` an
138
147
 
139
148
  Class `Curve`.
140
149
 
150
+ Import from `@null3d/geometry`.
151
+
141
152
  The base class of all curves. A subclass gives `getPoint`. The class adds sampling by arc length, tangents and, for 3D curves, Frenet frames. `Point` is the type of the curve's points. It is `[number, number]` for a 2D curve and `[number, number, number]` for a 3D curve.
142
153
 
143
154
  | Member | Description |
@@ -159,7 +170,9 @@ The base class of all curves. A subclass gives `getPoint`. The class adds sampli
159
170
 
160
171
  ## `CurvePath`
161
172
 
162
- Class `CurvePath`, which extends `Curve`.
173
+ Class `CurvePath`, which extends `Curve<Point>`.
174
+
175
+ Import from `@null3d/geometry`.
163
176
 
164
177
  A list of curves joined end to end and treated as one curve. Its `t` runs over the whole path by length.
165
178
 
@@ -200,11 +213,15 @@ Options for `geometry.cylinder`. The cylinder stands on the Y axis, centered on
200
213
  function dodecahedron(options: PolyhedronShapeOptions = {}): GeneratedArrays
201
214
  ```
202
215
 
216
+ Import from `@null3d/geometry`.
217
+
203
218
  The arrays of a dodecahedron. The mesh has no indices.
204
219
 
205
220
  ## `EllipseCurve`
206
221
 
207
- Class `EllipseCurve`, which extends `Curve`.
222
+ Class `EllipseCurve`, which extends `Curve<[number, number]>`.
223
+
224
+ Import from `@null3d/geometry`.
208
225
 
209
226
  A 2D ellipse or part of one. Angles are in radians, measured from the positive x axis.
210
227
 
@@ -226,12 +243,18 @@ A 2D ellipse or part of one. Angles are in radians, measured from the positive x
226
243
  function extrude(options: ExtrudeOptions = {}): GeneratedArrays
227
244
  ```
228
245
 
229
- The arrays of an extruded shape. The mesh has no indices: each three vertices in a row make a triangle. Its normals are flat, one per face. The caps and the side walls form one mesh, caps first. To give each its own material, make two meshes.
246
+ Import from `@null3d/geometry`.
247
+
248
+ The arrays of an extruded shape. The mesh has no indices: each three vertices in a row make a triangle. Its normals are flat, one per face.
249
+
250
+ The caps and the side walls form one mesh, caps first. To give each its own material, make two meshes.
230
251
 
231
252
  ## `ExtrudeOptions`
232
253
 
233
254
  Interface `ExtrudeOptions`.
234
255
 
256
+ Import from `@null3d/geometry`.
257
+
235
258
  Options for `extrude`.
236
259
 
237
260
  | Member | Description |
@@ -252,6 +275,8 @@ Options for `extrude`.
252
275
 
253
276
  Interface `FrenetFrames`.
254
277
 
278
+ Import from `@null3d/geometry`.
279
+
255
280
  The frames along a 3D curve that `computeFrenetFrames` returns: one tangent, normal and binormal per sample, each a unit vector.
256
281
 
257
282
  | Member | Description |
@@ -264,6 +289,8 @@ The frames along a 3D curve that `computeFrenetFrames` returns: one tangent, nor
264
289
 
265
290
  Interface `GeneratedArrays`.
266
291
 
292
+ Import from `@null3d/geometry`.
293
+
267
294
  The arrays that a generator returns, ready for `geometry.fromArrays`. Each array holds the values of vertex 0, then vertex 1, and so on.
268
295
 
269
296
  | Member | Description |
@@ -302,6 +329,8 @@ Mesh generators for common shapes, and meshes from arrays.
302
329
  function icosahedron(options: PolyhedronShapeOptions = {}): GeneratedArrays
303
330
  ```
304
331
 
332
+ Import from `@null3d/geometry`.
333
+
305
334
  The arrays of an icosahedron. The mesh has no indices.
306
335
 
307
336
  ## `IntegerArray`
@@ -318,12 +347,16 @@ The integer typed arrays that vertex attributes take: 8-bit and 16-bit, signed a
318
347
  function lathe(options: LatheOptions = {}): GeneratedArrays
319
348
  ```
320
349
 
350
+ Import from `@null3d/geometry`.
351
+
321
352
  The arrays of a lathe: a profile of points turned around the Y axis. The mesh has indices.
322
353
 
323
354
  ## `LatheOptions`
324
355
 
325
356
  Interface `LatheOptions`.
326
357
 
358
+ Import from `@null3d/geometry`.
359
+
327
360
  Options for `lathe`.
328
361
 
329
362
  | Member | Description |
@@ -349,15 +382,25 @@ function levelAt(view: LevelView, levels: readonly LevelSwitch[], scale: number,
349
382
 
350
383
  The level of detail that a source draws: 0 for the base mesh, 1 for the first lower level, and so on, as `setLevels` takes them. The level is the last one whose switch distance lies under the distance, which is how the core's culling picks every source. This gives the level alone, not whether the source draws at all: a bound that covers fewer pixels than the threshold is hidden, and a draw range hides a source outside it.
351
384
 
385
+ | Parameter | Description |
386
+ | --- | --- |
387
+ | `view` | The view that measures the levels. |
388
+ | `levels` | The lower levels, from the finest to the coarsest. |
389
+ | `scale` | The largest axis scale of the source's world matrix. |
390
+ | `radius` | The radius of the source's world bounds, in meters, which a coverage reads. |
391
+ | `distance` | A distance, which both measures read as a camera does, or the two distances that `levelDistances` gives. |
392
+
393
+ Returns: The level's index among the base mesh and `levels`.
394
+
352
395
  ## `LevelBounds`
353
396
 
354
397
  Interface `LevelBounds`.
355
398
 
356
- A source's world bounds about the camera: the centre of its bounding sphere relative to the camera, and the sphere's radius.
399
+ A source's world bounds about the camera: the center of its bounding sphere relative to the camera, and the sphere's radius.
357
400
 
358
401
  | Member | Description |
359
402
  | --- | --- |
360
- | `readonly centre: readonly [number, number, number]` | The bounding sphere's centre, relative to the camera. |
403
+ | `readonly centre: readonly [number, number, number]` | The bounding sphere's center, relative to the camera. |
361
404
  | `readonly radius: number` | The bounding sphere's radius, in meters. |
362
405
 
363
406
  ## `levelDistances`
@@ -368,6 +411,13 @@ function levelDistances(view: LevelView, bounds: LevelBounds): LevelDistances
368
411
 
369
412
  Both distances that a view's rule compares for a source's bounds. An error measures to a point halfway into the sphere, capped at twice the distance to its nearest point, so a camera beside a large mesh measures the surface below it. A distance or a coverage, and a distance band, measure to the nearest point. Both are at least `LEAST_LEVEL_DISTANCE`. An orthographic view compares an error at a distance of 1, since its pixels do not shrink with distance, and keeps the nearest point for the other measures.
370
413
 
414
+ | Parameter | Description |
415
+ | --- | --- |
416
+ | `view` | The view that measures the source. |
417
+ | `bounds` | The source's bounds, with the center relative to the camera. |
418
+
419
+ Returns: The two distances, in meters.
420
+
371
421
  ## `LevelDistances`
372
422
 
373
423
  Interface `LevelDistances`.
@@ -385,7 +435,9 @@ The two distances that the rule compares for a source's bounds. A level given by
385
435
  type LevelsOption = boolean | BuildLevelsOptions | 'pieces';
386
436
  ```
387
437
 
388
- The levels of detail that a mesh made in code plans on its own. By default it plans them the first time the scene draws it, when it holds `geometry.automaticLevelTriangles` triangles or more, or when it holds at least `geometry.automaticCopyTriangles` triangles and its copies hold `geometry.automaticDrawnTriangles` together; `false` plans none, and `true` or options plan them when the mesh is made, at any size. `'pieces'` plans no lower levels, and sorts a mesh of 32,768 triangles or more into pieces by space at its first draw, as a merged far cell or a large ground whose levels come from elsewhere gains from.
438
+ The levels of detail that a mesh made in code plans on its own. By default it plans them the first time the scene draws it, when it holds `geometry.automaticLevelTriangles` triangles or more, or when it holds at least `geometry.automaticCopyTriangles` triangles and its copies hold `geometry.automaticDrawnTriangles` together; `false` plans none, and `true` or options plan them when the mesh is made, at any size.
439
+
440
+ `'pieces'` plans no lower levels, and sorts a mesh of 32,768 triangles or more into pieces by space at its first draw, as a merged far cell or a large ground whose levels come from elsewhere gains from.
389
441
 
390
442
  ## `LevelSwitch`
391
443
 
@@ -404,7 +456,18 @@ One of a mesh's lower levels and the measure that sets its switch: give exactly
404
456
  function levelSwitchDistance(view: LevelView, level: LevelSwitch, scale: number, radius = 0): number
405
457
  ```
406
458
 
407
- The distance at which one of a part's levels switches in. An error switches where it covers the view's threshold in pixels; a distance at its own figure, scaled by the source; and a coverage where the bounds' radius covers that share of the render height. A bias above 1 divides every result, so the level switches nearer.
459
+ The distance at which one of a part's levels switches in.
460
+
461
+ An error switches where it covers the view's threshold in pixels; a distance at its own figure, scaled by the source; and a coverage where the bounds' radius covers that share of the render height. A bias above 1 divides every result, so the level switches nearer.
462
+
463
+ | Parameter | Description |
464
+ | --- | --- |
465
+ | `view` | The view that measures the level. |
466
+ | `level` | The level's switch measure. |
467
+ | `scale` | The largest axis scale of the source's world matrix. |
468
+ | `radius` | The radius of the source's world bounds, in meters, which a coverage reads. |
469
+
470
+ Returns: The distance in meters at which the level draws, or `Infinity` for a coverage that is not above 0.
408
471
 
409
472
  ## `LevelView`
410
473
 
@@ -418,11 +481,13 @@ A view that measures levels of detail: the height it renders, its vertical field
418
481
  | `readonly fov: number` | The vertical field of view in degrees, between 0 and 180. |
419
482
  | `readonly threshold?: number` | The largest change, in pixels, that a coarser level may make to the picture. The default is 1, the setting of the presets that High and above draw. A larger threshold draws coarser levels from nearer. |
420
483
  | `readonly orthographic?: boolean` | True for an orthographic camera, whose pixels do not shrink with distance. The default is false. An orthographic view compares a level's error at a distance of 1, so the source's scale alone picks the level. |
421
- | `readonly bias?: number` | The source's threshold bias, as Godot's `lod_bias`: above 1 switches every level nearer, so coarser levels draw, and below 1 keeps its detail. The default is 1. |
484
+ | `readonly bias?: number` | The source's threshold bias, as the inverse of Godot's `lod_bias`: a Godot bias of 2 is about a null3D bias of 0.5. Above 1 switches every level nearer, so coarser levels draw, and below 1 keeps its detail. The default is 1. |
422
485
 
423
486
  ## `LineCurve`
424
487
 
425
- Class `LineCurve`, which extends `Curve`.
488
+ Class `LineCurve`, which extends `Curve<[number, number]>`.
489
+
490
+ Import from `@null3d/geometry`.
426
491
 
427
492
  A straight 2D line from `v1` to `v2`.
428
493
 
@@ -437,7 +502,9 @@ A straight 2D line from `v1` to `v2`.
437
502
 
438
503
  ## `LineCurve3`
439
504
 
440
- Class `LineCurve3`, which extends `Curve`.
505
+ Class `LineCurve3`, which extends `Curve<[number, number, number]>`.
506
+
507
+ Import from `@null3d/geometry`.
441
508
 
442
509
  A straight 3D line from `v1` to `v2`.
443
510
 
@@ -454,7 +521,9 @@ A straight 3D line from `v1` to `v2`.
454
521
 
455
522
  Interface `MeshArrays`.
456
523
 
457
- The arrays of a mesh for `geometry.fromArrays`. Each array holds its values for vertex 0, then vertex 1, and so on. The engine copies them. An attribute can come as 32-bit floats, or as the 8-bit and 16-bit integers that glTF's `KHR_mesh_quantization` allows for it. The mesh keeps that type on the GPU. Smaller types take less memory and upload faster. Integer positions keep their own scale, so give the object the scale that turns them into meters, as a glTF node does. Meshes share GPU buffers with the meshes whose attributes have the same types.
524
+ The arrays of a mesh for `geometry.fromArrays`. Each array holds its values for vertex 0, then vertex 1, and so on. The engine copies them.
525
+
526
+ An attribute can come as 32-bit floats, or as the 8-bit and 16-bit integers that glTF's `KHR_mesh_quantization` allows for it. The mesh keeps that type on the GPU. Smaller types take less memory and upload faster. Integer positions keep their own scale, so give the object the scale that turns them into meters, as a glTF node does. Meshes share GPU buffers with the meshes whose attributes have the same types.
458
527
 
459
528
  | Member | Description |
460
529
  | --- | --- |
@@ -495,7 +564,9 @@ A mesh the engine can draw: its id in the engine core, its bounding radius, and
495
564
 
496
565
  Interface `MeshLevel`.
497
566
 
498
- A lower level of detail of a mesh: a simpler mesh that draws in the base mesh's place. Give its `error`, the `distance` at which it switches in, or the screen `coverage` under which it draws. A level with a measured error, which the asset tool writes, changes the picture by under a pixel at a small threshold and switches at once. When the governor raises the threshold above about one and a half pixels, that switch shows, and such a level then fades too. A level given by a distance, by a coverage or by a hand-set error fades over a short band, so its switch does not pop.
567
+ A lower level of detail of a mesh: a simpler mesh that draws in the base mesh's place. Give its `error`, the `distance` at which it switches in, or the screen `coverage` under which it draws. A level with a measured error, which the asset tool writes, changes the picture by under a pixel at a small threshold and switches at once.
568
+
569
+ When the governor raises the threshold above about one and a half pixels, that switch shows, and such a level then fades too. A level given by a distance, by a coverage or by a hand-set error fades over a short band, so its switch does not pop.
499
570
 
500
571
  | Member | Description |
501
572
  | --- | --- |
@@ -537,11 +608,15 @@ A mesh's morph targets, as glTF stores them. Each list holds one array per targe
537
608
  function octahedron(options: PolyhedronShapeOptions = {}): GeneratedArrays
538
609
  ```
539
610
 
611
+ Import from `@null3d/geometry`.
612
+
540
613
  The arrays of an octahedron. The mesh has no indices.
541
614
 
542
615
  ## `Path`
543
616
 
544
- Class `Path`, which extends `CurvePath`.
617
+ Class `Path`, which extends `CurvePath<[number, number]>`.
618
+
619
+ Import from `@null3d/geometry`.
545
620
 
546
621
  A 2D path drawn with commands like a canvas's, such as `moveTo`, `lineTo` and `bezierCurveTo`. Each command adds a curve that starts at the current point.
547
622
 
@@ -578,12 +653,16 @@ Options for `geometry.plane`. The plane lies in the XY plane, centered on its or
578
653
  function polyhedron(options: PolyhedronOptions = {}): GeneratedArrays
579
654
  ```
580
655
 
656
+ Import from `@null3d/geometry`.
657
+
581
658
  The arrays of a polyhedron from your own corners and faces, with its vertices on a sphere. The mesh has no indices: each three vertices in a row make a triangle.
582
659
 
583
660
  ## `PolyhedronOptions`
584
661
 
585
662
  Interface `PolyhedronOptions`.
586
663
 
664
+ Import from `@null3d/geometry`.
665
+
587
666
  Options for `polyhedron`.
588
667
 
589
668
  | Member | Description |
@@ -597,6 +676,8 @@ Options for `polyhedron`.
597
676
 
598
677
  Interface `PolyhedronShapeOptions`.
599
678
 
679
+ Import from `@null3d/geometry`.
680
+
600
681
  Options for the named polyhedra, such as `icosahedron`.
601
682
 
602
683
  | Member | Description |
@@ -606,7 +687,9 @@ Options for the named polyhedra, such as `icosahedron`.
606
687
 
607
688
  ## `QuadraticBezierCurve`
608
689
 
609
- Class `QuadraticBezierCurve`, which extends `Curve`.
690
+ Class `QuadraticBezierCurve`, which extends `Curve<[number, number]>`.
691
+
692
+ Import from `@null3d/geometry`.
610
693
 
611
694
  A 2D quadratic Bézier curve from `v0` to `v2`, pulled toward the control point `v1`.
612
695
 
@@ -619,7 +702,9 @@ A 2D quadratic Bézier curve from `v0` to `v2`, pulled toward the control point
619
702
 
620
703
  ## `QuadraticBezierCurve3`
621
704
 
622
- Class `QuadraticBezierCurve3`, which extends `Curve`.
705
+ Class `QuadraticBezierCurve3`, which extends `Curve<[number, number, number]>`.
706
+
707
+ Import from `@null3d/geometry`.
623
708
 
624
709
  A 3D quadratic Bézier curve from `v0` to `v2`, pulled toward the control point `v1`.
625
710
 
@@ -651,12 +736,16 @@ Options for `geometry.ring`: a flat disc with a hole. The ring lies in the XY pl
651
736
  function shape(options: ShapeOptions = {}): GeneratedArrays
652
737
  ```
653
738
 
739
+ Import from `@null3d/geometry`.
740
+
654
741
  The arrays of flat shapes. The mesh has indices, and all its normals point along +Z. The shapes of a list form one mesh, so a material per shape needs one `shape` call per shape.
655
742
 
656
743
  ## `Shape`
657
744
 
658
745
  Class `Shape`, which extends `Path`.
659
746
 
747
+ Import from `@null3d/geometry`.
748
+
660
749
  A closed 2D outline with optional holes. The `shape` and `extrude` generators fill it.
661
750
 
662
751
  | Member | Description |
@@ -679,6 +768,8 @@ The levels of detail that a generator's mesh plans on its own, as `MeshArrays.le
679
768
 
680
769
  Interface `ShapeOptions`.
681
770
 
771
+ Import from `@null3d/geometry`.
772
+
682
773
  Options for `shape`.
683
774
 
684
775
  | Member | Description |
@@ -690,6 +781,8 @@ Options for `shape`.
690
781
 
691
782
  Namespace `ShapeUtils`.
692
783
 
784
+ Import from `@null3d/geometry`.
785
+
693
786
  Helpers for 2D outlines: `ShapeUtils.area`, `ShapeUtils.isClockWise` and `ShapeUtils.triangulateShape`.
694
787
 
695
788
  | Member | Description |
@@ -716,7 +809,9 @@ Options for `geometry.sphere`. The sphere is centered on its origin, with its po
716
809
 
717
810
  ## `SplineCurve`
718
811
 
719
- Class `SplineCurve`, which extends `Curve`.
812
+ Class `SplineCurve`, which extends `Curve<[number, number]>`.
813
+
814
+ Import from `@null3d/geometry`.
720
815
 
721
816
  A smooth 2D curve through a list of points. It uses Catmull-Rom interpolation.
722
817
 
@@ -731,6 +826,8 @@ A smooth 2D curve through a list of points. It uses Catmull-Rom interpolation.
731
826
  function tetrahedron(options: PolyhedronShapeOptions = {}): GeneratedArrays
732
827
  ```
733
828
 
829
+ Import from `@null3d/geometry`.
830
+
734
831
  The arrays of a tetrahedron. The mesh has no indices.
735
832
 
736
833
  ## `torusKnot`
@@ -739,12 +836,16 @@ The arrays of a tetrahedron. The mesh has no indices.
739
836
  function torusKnot(options: TorusKnotOptions = {}): GeneratedArrays
740
837
  ```
741
838
 
839
+ Import from `@null3d/geometry`.
840
+
742
841
  The arrays of a torus knot: a tube that winds around a torus. The mesh has indices.
743
842
 
744
843
  ## `TorusKnotOptions`
745
844
 
746
845
  Interface `TorusKnotOptions`.
747
846
 
847
+ Import from `@null3d/geometry`.
848
+
748
849
  Options for `torusKnot`.
749
850
 
750
851
  | Member | Description |
@@ -778,12 +879,16 @@ Options for `geometry.torus`. The torus is centered on its origin, around the Z
778
879
  function tube(options: TubeOptions = {}): GeneratedArrays
779
880
  ```
780
881
 
882
+ Import from `@null3d/geometry`.
883
+
781
884
  The arrays of a tube along a 3D curve. The mesh has indices.
782
885
 
783
886
  ## `TubeOptions`
784
887
 
785
888
  Interface `TubeOptions`.
786
889
 
890
+ Import from `@null3d/geometry`.
891
+
787
892
  Options for `tube`.
788
893
 
789
894
  | Member | Description |
@@ -813,6 +918,8 @@ The vertex attributes that `mesh.updateVertices` writes, by their names in `Mesh
813
918
 
814
919
  Interface `UVGenerator`.
815
920
 
921
+ Import from `@null3d/geometry`.
922
+
816
923
  Makes the texture coordinates of an extrusion's triangles, for the `UVGenerator` option of `extrude`. Each method gets the positions made so far, three numbers per vertex, and the vertex numbers of one triangle or one side quad.
817
924
 
818
925
  | Member | Description |
@@ -826,6 +933,8 @@ Makes the texture coordinates of an extrusion's triangles, for the `UVGenerator`
826
933
  type Vec2Like = { [index: number]: number; };
827
934
  ```
828
935
 
936
+ Import from `@null3d/geometry`.
937
+
829
938
  A 2D vector (x, y) in an array: a tuple such as `[0, 1]`, a plain array or a typed array. The package reads its first two elements.
830
939
 
831
940
  ## `VertexArray`
@@ -853,4 +962,6 @@ The numbers of one vertex attribute: a typed array, a plain array of numbers, or
853
962
  const WorldUVGenerator: UVGenerator
854
963
  ```
855
964
 
965
+ Import from `@null3d/geometry`.
966
+
856
967
  The default texture coordinates for an extrusion. A cap vertex takes its x and y. A side wall vertex takes its x or its y, whichever changes more along the wall, and 1 minus its z.