tosijs-3d 0.9.0 → 0.10.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 (498) hide show
  1. package/CHANGELOG.md +298 -3
  2. package/Migration.md +99 -4
  3. package/README.md +61 -32
  4. package/dist/aim.js +1 -1
  5. package/dist/ambient-budget.js +3 -3
  6. package/dist/ambient-budget.js.map +1 -1
  7. package/dist/ambient-leaves.js +1 -1
  8. package/dist/ambient-leaves.js.map +1 -1
  9. package/dist/angle-field.d.ts +0 -4
  10. package/dist/angle-field.d.ts.map +1 -1
  11. package/dist/angle-field.js +1 -1
  12. package/dist/angle-field.js.map +1 -1
  13. package/dist/animation-layers.js +1 -1
  14. package/dist/arc.js +1 -1
  15. package/dist/arc.js.map +1 -1
  16. package/dist/asset-url.js +1 -1
  17. package/dist/asset-url.js.map +1 -1
  18. package/dist/atmosphere.js +1 -1
  19. package/dist/atmosphere.js.map +1 -1
  20. package/dist/b3d-aircraft.d.ts +7 -0
  21. package/dist/b3d-aircraft.d.ts.map +1 -1
  22. package/dist/b3d-aircraft.js +47 -17
  23. package/dist/b3d-aircraft.js.map +1 -1
  24. package/dist/b3d-ambient.js +1 -1
  25. package/dist/b3d-ambient.js.map +1 -1
  26. package/dist/b3d-beacon.js +1 -1
  27. package/dist/b3d-beacon.js.map +1 -1
  28. package/dist/b3d-biped.d.ts.map +1 -1
  29. package/dist/b3d-biped.js +4 -2
  30. package/dist/b3d-biped.js.map +1 -1
  31. package/dist/b3d-black-hole.js +6 -6
  32. package/dist/b3d-black-hole.js.map +1 -1
  33. package/dist/b3d-car.js +1 -1
  34. package/dist/b3d-car.js.map +1 -1
  35. package/dist/b3d-cloud-deck.d.ts +1 -0
  36. package/dist/b3d-cloud-deck.d.ts.map +1 -1
  37. package/dist/b3d-cloud-deck.js +3 -4
  38. package/dist/b3d-cloud-deck.js.map +1 -1
  39. package/dist/b3d-clouds.js +1 -1
  40. package/dist/b3d-clouds.js.map +1 -1
  41. package/dist/b3d-collisions.js +1 -1
  42. package/dist/b3d-collisions.js.map +1 -1
  43. package/dist/b3d-controllable.js +1 -1
  44. package/dist/b3d-controllable.js.map +1 -1
  45. package/dist/b3d-crowd.js +1 -1
  46. package/dist/b3d-crowd.js.map +1 -1
  47. package/dist/b3d-death.d.ts.map +1 -1
  48. package/dist/b3d-death.js +4 -1
  49. package/dist/b3d-death.js.map +1 -1
  50. package/dist/b3d-decorator.d.ts +21 -1
  51. package/dist/b3d-decorator.d.ts.map +1 -1
  52. package/dist/b3d-decorator.js +58 -14
  53. package/dist/b3d-decorator.js.map +1 -1
  54. package/dist/b3d-destroyable.js +1 -1
  55. package/dist/b3d-destroyable.js.map +1 -1
  56. package/dist/b3d-elevator.d.ts +1 -0
  57. package/dist/b3d-elevator.d.ts.map +1 -1
  58. package/dist/b3d-elevator.js +3 -4
  59. package/dist/b3d-elevator.js.map +1 -1
  60. package/dist/b3d-exploder.js +1 -1
  61. package/dist/b3d-exploder.js.map +1 -1
  62. package/dist/b3d-fog.js +1 -1
  63. package/dist/b3d-fog.js.map +1 -1
  64. package/dist/b3d-galaxy.d.ts +0 -6
  65. package/dist/b3d-galaxy.d.ts.map +1 -1
  66. package/dist/b3d-galaxy.js +1 -15
  67. package/dist/b3d-galaxy.js.map +1 -1
  68. package/dist/b3d-hud.d.ts +5 -0
  69. package/dist/b3d-hud.d.ts.map +1 -1
  70. package/dist/b3d-hud.js +42 -8
  71. package/dist/b3d-hud.js.map +1 -1
  72. package/dist/b3d-input-focus.js +1 -1
  73. package/dist/b3d-input-focus.js.map +1 -1
  74. package/dist/b3d-interactive.js +1 -1
  75. package/dist/b3d-interactive.js.map +1 -1
  76. package/dist/b3d-lamp.js +1 -1
  77. package/dist/b3d-lamp.js.map +1 -1
  78. package/dist/b3d-launcher.js +1 -1
  79. package/dist/b3d-launcher.js.map +1 -1
  80. package/dist/b3d-library.js +1 -1
  81. package/dist/b3d-library.js.map +1 -1
  82. package/dist/b3d-light-shafts.d.ts +1 -0
  83. package/dist/b3d-light-shafts.d.ts.map +1 -1
  84. package/dist/b3d-light-shafts.js +11 -2
  85. package/dist/b3d-light-shafts.js.map +1 -1
  86. package/dist/b3d-light.js +2 -2
  87. package/dist/b3d-light.js.map +1 -1
  88. package/dist/b3d-lightning.d.ts +3 -0
  89. package/dist/b3d-lightning.d.ts.map +1 -1
  90. package/dist/b3d-lightning.js +61 -5
  91. package/dist/b3d-lightning.js.map +1 -1
  92. package/dist/b3d-loader.js +1 -1
  93. package/dist/b3d-loader.js.map +1 -1
  94. package/dist/b3d-manipulator.d.ts +0 -4
  95. package/dist/b3d-manipulator.d.ts.map +1 -1
  96. package/dist/b3d-manipulator.js +4 -9
  97. package/dist/b3d-manipulator.js.map +1 -1
  98. package/dist/b3d-moon.js +1 -1
  99. package/dist/b3d-moon.js.map +1 -1
  100. package/dist/b3d-panel.js +1 -1
  101. package/dist/b3d-panel.js.map +1 -1
  102. package/dist/b3d-particles.js +2 -2
  103. package/dist/b3d-particles.js.map +1 -1
  104. package/dist/b3d-physics.js +1 -1
  105. package/dist/b3d-physics.js.map +1 -1
  106. package/dist/b3d-planet.js +1 -1
  107. package/dist/b3d-planet.js.map +1 -1
  108. package/dist/b3d-primitives.d.ts.map +1 -1
  109. package/dist/b3d-primitives.js +70 -0
  110. package/dist/b3d-primitives.js.map +1 -1
  111. package/dist/b3d-probe.js +1 -1
  112. package/dist/b3d-probe.js.map +1 -1
  113. package/dist/b3d-prop.js +1 -1
  114. package/dist/b3d-prop.js.map +1 -1
  115. package/dist/b3d-quality.d.ts.map +1 -1
  116. package/dist/b3d-quality.js +19 -1
  117. package/dist/b3d-quality.js.map +1 -1
  118. package/dist/b3d-radar-blip.js +1 -1
  119. package/dist/b3d-radar-blip.js.map +1 -1
  120. package/dist/b3d-radar.js +1 -1
  121. package/dist/b3d-radar.js.map +1 -1
  122. package/dist/b3d-reflections.js +1 -1
  123. package/dist/b3d-reflections.js.map +1 -1
  124. package/dist/b3d-shadows.js +2 -2
  125. package/dist/b3d-shadows.js.map +1 -1
  126. package/dist/b3d-skybox.js +1 -1
  127. package/dist/b3d-skybox.js.map +1 -1
  128. package/dist/b3d-sound.js +1 -1
  129. package/dist/b3d-sound.js.map +1 -1
  130. package/dist/b3d-spawner.js +1 -1
  131. package/dist/b3d-spawner.js.map +1 -1
  132. package/dist/b3d-ssao.js +1 -1
  133. package/dist/b3d-ssao.js.map +1 -1
  134. package/dist/b3d-star-system.js +1 -1
  135. package/dist/b3d-star-system.js.map +1 -1
  136. package/dist/b3d-star.js +1 -1
  137. package/dist/b3d-star.js.map +1 -1
  138. package/dist/b3d-svg-plane.js +3 -3
  139. package/dist/b3d-svg-plane.js.map +1 -1
  140. package/dist/b3d-terrain.js +1 -1
  141. package/dist/b3d-terrain.js.map +1 -1
  142. package/dist/b3d-trail.js +1 -1
  143. package/dist/b3d-trail.js.map +1 -1
  144. package/dist/b3d-trigger.d.ts +0 -4
  145. package/dist/b3d-trigger.d.ts.map +1 -1
  146. package/dist/b3d-trigger.js +10 -14
  147. package/dist/b3d-trigger.js.map +1 -1
  148. package/dist/b3d-turret.js +1 -1
  149. package/dist/b3d-turret.js.map +1 -1
  150. package/dist/b3d-utils.d.ts +29 -0
  151. package/dist/b3d-utils.d.ts.map +1 -1
  152. package/dist/b3d-utils.js +79 -2
  153. package/dist/b3d-utils.js.map +1 -1
  154. package/dist/b3d-warhead.d.ts.map +1 -1
  155. package/dist/b3d-warhead.js +37 -11
  156. package/dist/b3d-warhead.js.map +1 -1
  157. package/dist/b3d-water.d.ts +4 -0
  158. package/dist/b3d-water.d.ts.map +1 -1
  159. package/dist/b3d-water.js +124 -29
  160. package/dist/b3d-water.js.map +1 -1
  161. package/dist/b3d-weather-cell.js +1 -1
  162. package/dist/b3d-weather-cell.js.map +1 -1
  163. package/dist/ballistics.d.ts.map +1 -1
  164. package/dist/ballistics.js +32 -10
  165. package/dist/ballistics.js.map +1 -1
  166. package/dist/biome-chart.js +1 -1
  167. package/dist/biome-chart.js.map +1 -1
  168. package/dist/biome-plugin.d.ts +36 -0
  169. package/dist/biome-plugin.d.ts.map +1 -1
  170. package/dist/biome-plugin.js +176 -7
  171. package/dist/biome-plugin.js.map +1 -1
  172. package/dist/bone-mask.js +2 -2
  173. package/dist/box.d.ts +3 -7
  174. package/dist/box.d.ts.map +1 -1
  175. package/dist/box.js +5 -7
  176. package/dist/box.js.map +1 -1
  177. package/dist/buoyancy.js +1 -1
  178. package/dist/buoyancy.js.map +1 -1
  179. package/dist/camera-fit.js +2 -2
  180. package/dist/carve.js +1 -1
  181. package/dist/carve.js.map +1 -1
  182. package/dist/caustics.js +1 -1
  183. package/dist/caustics.js.map +1 -1
  184. package/dist/cloud-field.js +1 -1
  185. package/dist/cloud-field.js.map +1 -1
  186. package/dist/cloud-shadows.d.ts +3 -0
  187. package/dist/cloud-shadows.d.ts.map +1 -1
  188. package/dist/cloud-shadows.js +22 -1
  189. package/dist/cloud-shadows.js.map +1 -1
  190. package/dist/color-field.d.ts +0 -2
  191. package/dist/color-field.d.ts.map +1 -1
  192. package/dist/color-field.js +1 -1
  193. package/dist/color-field.js.map +1 -1
  194. package/dist/color.js +1 -1
  195. package/dist/color.js.map +1 -1
  196. package/dist/control-input.js +1 -1
  197. package/dist/control-input.js.map +1 -1
  198. package/dist/cost-sweep.d.ts +92 -0
  199. package/dist/cost-sweep.d.ts.map +1 -0
  200. package/dist/cost-sweep.js +213 -0
  201. package/dist/cost-sweep.js.map +1 -0
  202. package/dist/curve-field.d.ts +2 -6
  203. package/dist/curve-field.d.ts.map +1 -1
  204. package/dist/curve-field.js +2 -3
  205. package/dist/curve-field.js.map +1 -1
  206. package/dist/curve-program.js +1 -1
  207. package/dist/curve-program.js.map +1 -1
  208. package/dist/curve.js +1 -1
  209. package/dist/curve.js.map +1 -1
  210. package/dist/debug-sink.d.ts +6 -0
  211. package/dist/debug-sink.d.ts.map +1 -0
  212. package/dist/debug-sink.js +42 -0
  213. package/dist/debug-sink.js.map +1 -0
  214. package/dist/demo-utils.js +1 -1
  215. package/dist/demo-utils.js.map +1 -1
  216. package/dist/destroyable-behavior.js +1 -1
  217. package/dist/destroyable-behavior.js.map +1 -1
  218. package/dist/destroyable.d.ts.map +1 -1
  219. package/dist/destroyable.js +31 -0
  220. package/dist/destroyable.js.map +1 -1
  221. package/dist/dialog-placement.js +1 -1
  222. package/dist/dialog-placement.js.map +1 -1
  223. package/dist/draw-order.d.ts +23 -0
  224. package/dist/draw-order.d.ts.map +1 -0
  225. package/dist/draw-order.js +47 -0
  226. package/dist/draw-order.js.map +1 -0
  227. package/dist/embed-font.js +1 -1
  228. package/dist/embed-font.js.map +1 -1
  229. package/dist/flow-layout.js +1 -1
  230. package/dist/fly-by-wire.d.ts.map +1 -1
  231. package/dist/fly-by-wire.js +35 -20
  232. package/dist/fly-by-wire.js.map +1 -1
  233. package/dist/footprint-field.d.ts +1 -5
  234. package/dist/footprint-field.d.ts.map +1 -1
  235. package/dist/footprint-field.js +2 -3
  236. package/dist/footprint-field.js.map +1 -1
  237. package/dist/formations.js +1 -1
  238. package/dist/formations.js.map +1 -1
  239. package/dist/frame-panel.js +1 -1
  240. package/dist/frame-panel.js.map +1 -1
  241. package/dist/galaxy-data.d.ts +0 -16
  242. package/dist/galaxy-data.d.ts.map +1 -1
  243. package/dist/galaxy-data.js +9 -34
  244. package/dist/galaxy-data.js.map +1 -1
  245. package/dist/game-controller.js +1 -1
  246. package/dist/game-controller.js.map +1 -1
  247. package/dist/gamepad-focus.js +1 -1
  248. package/dist/gamepad-focus.js.map +1 -1
  249. package/dist/gamepad-svg.js +1 -1
  250. package/dist/gamepad-svg.js.map +1 -1
  251. package/dist/glass-gamepad.d.ts +10 -0
  252. package/dist/glass-gamepad.d.ts.map +1 -1
  253. package/dist/glass-gamepad.js +44 -1
  254. package/dist/glass-gamepad.js.map +1 -1
  255. package/dist/glb-manifest.js +1 -1
  256. package/dist/glb-manifest.js.map +1 -1
  257. package/dist/gradient-filter.d.ts.map +1 -1
  258. package/dist/gradient-filter.js +25 -0
  259. package/dist/gradient-filter.js.map +1 -1
  260. package/dist/guidance.d.ts.map +1 -1
  261. package/dist/guidance.js +29 -12
  262. package/dist/guidance.js.map +1 -1
  263. package/dist/handler-of.d.ts +5 -2
  264. package/dist/handler-of.d.ts.map +1 -1
  265. package/dist/handler-of.js +26 -20
  266. package/dist/handler-of.js.map +1 -1
  267. package/dist/hardware-gamepad.js +1 -1
  268. package/dist/hardware-gamepad.js.map +1 -1
  269. package/dist/hud-math.js +1 -1
  270. package/dist/hud-math.js.map +1 -1
  271. package/dist/hud.js +1 -1
  272. package/dist/hud.js.map +1 -1
  273. package/dist/icon-grid.js +1 -1
  274. package/dist/icon-grid.js.map +1 -1
  275. package/dist/icon-name.js +1 -1
  276. package/dist/icon-name.js.map +1 -1
  277. package/dist/index.d.ts +10 -5
  278. package/dist/index.d.ts.map +1 -1
  279. package/dist/index.js +10 -6
  280. package/dist/index.js.map +1 -1
  281. package/dist/interaction.js +1 -1
  282. package/dist/interaction.js.map +1 -1
  283. package/dist/interactive-behavior.js +1 -1
  284. package/dist/interactive-behavior.js.map +1 -1
  285. package/dist/key-layout.js +1 -1
  286. package/dist/key-layout.js.map +1 -1
  287. package/dist/keyboard-gamepad.js +1 -1
  288. package/dist/keyboard-gamepad.js.map +1 -1
  289. package/dist/keyboard.d.ts +1 -17
  290. package/dist/keyboard.d.ts.map +1 -1
  291. package/dist/keyboard.js +3 -11
  292. package/dist/keyboard.js.map +1 -1
  293. package/dist/land-and-sky.js +4 -9
  294. package/dist/land-and-sky.js.map +1 -1
  295. package/dist/landform.js +1 -1
  296. package/dist/landform.js.map +1 -1
  297. package/dist/library-mesh.js +1 -1
  298. package/dist/library-mesh.js.map +1 -1
  299. package/dist/light-editor.js +1 -1
  300. package/dist/light-editor.js.map +1 -1
  301. package/dist/light-modulation.js +1 -1
  302. package/dist/light-rays.js +1 -1
  303. package/dist/light-rays.js.map +1 -1
  304. package/dist/light-settings.js +1 -1
  305. package/dist/light-settings.js.map +1 -1
  306. package/dist/lightning.js +1 -1
  307. package/dist/lightning.js.map +1 -1
  308. package/dist/make-mesh.js +1 -1
  309. package/dist/make-mesh.js.map +1 -1
  310. package/dist/manipulator-view.js +1 -1
  311. package/dist/manipulator-view.js.map +1 -1
  312. package/dist/manipulator.js +1 -1
  313. package/dist/manipulator.js.map +1 -1
  314. package/dist/mantle.js +1 -1
  315. package/dist/mantle.js.map +1 -1
  316. package/dist/medium.js +1 -1
  317. package/dist/medium.js.map +1 -1
  318. package/dist/mersenne-twister.d.ts +1 -1
  319. package/dist/mersenne-twister.d.ts.map +1 -1
  320. package/dist/mersenne-twister.js +11 -2
  321. package/dist/mersenne-twister.js.map +1 -1
  322. package/dist/min-sim-conformance.d.ts +6 -0
  323. package/dist/min-sim-conformance.d.ts.map +1 -1
  324. package/dist/min-sim-conformance.js +45 -5
  325. package/dist/min-sim-conformance.js.map +1 -1
  326. package/dist/noise-volume.d.ts +6 -0
  327. package/dist/noise-volume.d.ts.map +1 -0
  328. package/dist/noise-volume.js +79 -0
  329. package/dist/noise-volume.js.map +1 -0
  330. package/dist/panel-layer.d.ts.map +1 -1
  331. package/dist/panel-layer.js +10 -1
  332. package/dist/panel-layer.js.map +1 -1
  333. package/dist/panel-orbit.js +1 -1
  334. package/dist/panel-orbit.js.map +1 -1
  335. package/dist/patch-field.js +1 -1
  336. package/dist/patch-field.js.map +1 -1
  337. package/dist/perf-probe.d.ts +19 -0
  338. package/dist/perf-probe.d.ts.map +1 -1
  339. package/dist/perf-probe.js +10 -1
  340. package/dist/perf-probe.js.map +1 -1
  341. package/dist/perlin-noise.d.ts.map +1 -1
  342. package/dist/perlin-noise.js +22 -1
  343. package/dist/perlin-noise.js.map +1 -1
  344. package/dist/picker.d.ts +0 -2
  345. package/dist/picker.d.ts.map +1 -1
  346. package/dist/picker.js +1 -1
  347. package/dist/picker.js.map +1 -1
  348. package/dist/playground.js +1 -1
  349. package/dist/popup-chrome.js +1 -1
  350. package/dist/popup-chrome.js.map +1 -1
  351. package/dist/popup-surface.d.ts +2 -3
  352. package/dist/popup-surface.d.ts.map +1 -1
  353. package/dist/popup-surface.js +76 -16
  354. package/dist/popup-surface.js.map +1 -1
  355. package/dist/portal-transform.js +1 -1
  356. package/dist/portal-transform.js.map +1 -1
  357. package/dist/prefab.js +1 -1
  358. package/dist/prefab.js.map +1 -1
  359. package/dist/procedural-rock.js +1 -1
  360. package/dist/procedural-rock.js.map +1 -1
  361. package/dist/province-climate.js +1 -1
  362. package/dist/province-climate.js.map +1 -1
  363. package/dist/radar.js +2 -2
  364. package/dist/radar.js.map +1 -1
  365. package/dist/resource.d.ts.map +1 -1
  366. package/dist/resource.js +21 -9
  367. package/dist/resource.js.map +1 -1
  368. package/dist/rocket-ascent.js +1 -1
  369. package/dist/rounded-rect.js +1 -1
  370. package/dist/rounded-rect.js.map +1 -1
  371. package/dist/scatter.d.ts +47 -2
  372. package/dist/scatter.d.ts.map +1 -1
  373. package/dist/scatter.js +130 -9
  374. package/dist/scatter.js.map +1 -1
  375. package/dist/scene-schemas.d.ts.map +1 -1
  376. package/dist/scene-schemas.js +22 -1
  377. package/dist/scene-schemas.js.map +1 -1
  378. package/dist/sdf-lattice.js +1 -1
  379. package/dist/sdf-lattice.js.map +1 -1
  380. package/dist/selection.js +1 -1
  381. package/dist/selection.js.map +1 -1
  382. package/dist/shadow-decal.js +1 -1
  383. package/dist/shadow-decal.js.map +1 -1
  384. package/dist/skybox-baker.js +1 -1
  385. package/dist/slope-profile.js +1 -1
  386. package/dist/slope-profile.js.map +1 -1
  387. package/dist/spatial-transform.js +1 -1
  388. package/dist/spatial-transform.js.map +1 -1
  389. package/dist/spectral-classes.js +5 -5
  390. package/dist/star-populations.js +1 -1
  391. package/dist/star-populations.js.map +1 -1
  392. package/dist/starfield-codec.js +1 -1
  393. package/dist/starfield-codec.js.map +1 -1
  394. package/dist/surface.d.ts +1 -3
  395. package/dist/surface.d.ts.map +1 -1
  396. package/dist/surface.js +2 -2
  397. package/dist/surface.js.map +1 -1
  398. package/dist/surroundings-probe.js +1 -1
  399. package/dist/surroundings.js +1 -1
  400. package/dist/svg-icons.js +2 -2
  401. package/dist/svg-icons.js.map +1 -1
  402. package/dist/svg-texture.d.ts +12 -0
  403. package/dist/svg-texture.d.ts.map +1 -1
  404. package/dist/svg-texture.js +20 -2
  405. package/dist/svg-texture.js.map +1 -1
  406. package/dist/swim-aim.js +1 -1
  407. package/dist/swim-aim.js.map +1 -1
  408. package/dist/table-layout.js +1 -1
  409. package/dist/table-layout.js.map +1 -1
  410. package/dist/table.d.ts +0 -4
  411. package/dist/table.d.ts.map +1 -1
  412. package/dist/table.js +2 -2
  413. package/dist/table.js.map +1 -1
  414. package/dist/terrain-editor.d.ts +0 -2
  415. package/dist/terrain-editor.d.ts.map +1 -1
  416. package/dist/terrain-editor.js +1 -1
  417. package/dist/terrain-editor.js.map +1 -1
  418. package/dist/terrain-grid.d.ts.map +1 -1
  419. package/dist/terrain-grid.js +22 -0
  420. package/dist/terrain-grid.js.map +1 -1
  421. package/dist/text-edit.js +1 -1
  422. package/dist/text-edit.js.map +1 -1
  423. package/dist/text-entry.js +1 -1
  424. package/dist/text-entry.js.map +1 -1
  425. package/dist/theme-editor.d.ts +0 -2
  426. package/dist/theme-editor.d.ts.map +1 -1
  427. package/dist/theme-editor.js +4 -4
  428. package/dist/theme-editor.js.map +1 -1
  429. package/dist/tosi-b3d.d.ts +51 -2
  430. package/dist/tosi-b3d.d.ts.map +1 -1
  431. package/dist/tosi-b3d.js +484 -15
  432. package/dist/tosi-b3d.js.map +1 -1
  433. package/dist/touch-gamepad.js +1 -1
  434. package/dist/touch-gamepad.js.map +1 -1
  435. package/dist/touch-gesture.js +1 -1
  436. package/dist/touch-gesture.js.map +1 -1
  437. package/dist/touch-orbit.js +1 -1
  438. package/dist/touch-orbit.js.map +1 -1
  439. package/dist/vector-field.d.ts +0 -2
  440. package/dist/vector-field.d.ts.map +1 -1
  441. package/dist/vector-field.js +1 -1
  442. package/dist/vector-field.js.map +1 -1
  443. package/dist/vertex-animation.js +1 -1
  444. package/dist/vertex-animation.js.map +1 -1
  445. package/dist/virtual-gamepad.js +1 -1
  446. package/dist/virtual-gamepad.js.map +1 -1
  447. package/dist/voxel-galaxy.js +4 -4
  448. package/dist/voxel-galaxy.js.map +1 -1
  449. package/dist/w3d-theme.js +1 -1
  450. package/dist/w3d-theme.js.map +1 -1
  451. package/dist/warhead.d.ts.map +1 -1
  452. package/dist/warhead.js +28 -12
  453. package/dist/warhead.js.map +1 -1
  454. package/dist/water-normal.js +1 -1
  455. package/dist/water-normal.js.map +1 -1
  456. package/dist/water-shore-shader.d.ts +11 -0
  457. package/dist/water-shore-shader.d.ts.map +1 -1
  458. package/dist/water-shore-shader.js +59 -4
  459. package/dist/water-shore-shader.js.map +1 -1
  460. package/dist/water-shore.d.ts +16 -0
  461. package/dist/water-shore.d.ts.map +1 -1
  462. package/dist/water-shore.js +31 -1
  463. package/dist/water-shore.js.map +1 -1
  464. package/dist/weapon-fit.js +1 -1
  465. package/dist/weather.js +1 -1
  466. package/dist/weather.js.map +1 -1
  467. package/dist/widget-box.js +1 -1
  468. package/dist/widget-box.js.map +1 -1
  469. package/dist/widgets3d-layout.js +1 -1
  470. package/dist/widgets3d-layout.js.map +1 -1
  471. package/dist/widgets3d.d.ts +1 -19
  472. package/dist/widgets3d.d.ts.map +1 -1
  473. package/dist/widgets3d.js +16 -10
  474. package/dist/widgets3d.js.map +1 -1
  475. package/dist/wind.js +1 -1
  476. package/dist/wind.js.map +1 -1
  477. package/dist/world-contract.d.ts +14 -2
  478. package/dist/world-contract.d.ts.map +1 -1
  479. package/dist/world-contract.js +17 -7
  480. package/dist/world-contract.js.map +1 -1
  481. package/dist/world-store.d.ts +6 -0
  482. package/dist/world-store.d.ts.map +1 -1
  483. package/dist/world-store.js +42 -4
  484. package/dist/world-store.js.map +1 -1
  485. package/dist/world-topology.js +1 -1
  486. package/dist/world-topology.js.map +1 -1
  487. package/dist/world-view.d.ts.map +1 -1
  488. package/dist/world-view.js +5 -4
  489. package/dist/world-view.js.map +1 -1
  490. package/dist/wreck-fall.js +1 -1
  491. package/dist/wreck-fall.js.map +1 -1
  492. package/dist/xr-frames.js +1 -1
  493. package/dist/xr-frames.js.map +1 -1
  494. package/dist/xr-gamepad.js +2 -2
  495. package/dist/xr-gamepad.js.map +1 -1
  496. package/package.json +2 -2
  497. package/static/attributes.json +167 -58
  498. package/static/attributes.txt +56 -36
package/CHANGELOG.md CHANGED
@@ -1,11 +1,306 @@
1
1
  # Changelog
2
2
 
3
- <!--{ "order": 3 }-->
3
+ <!--{ "parent": "reference", "order": 20 }-->
4
4
 
5
5
  All notable changes to **tosijs-3d**. This project is pre-1.0 (`0.x`), so minor
6
6
  versions may carry breaking peer-dependency changes — each is called out in a
7
7
  **⚠️ Breaking** block in its version section below, with what a consumer must do.
8
8
 
9
+ ## 0.10.1
10
+
11
+ Five requests from manta-recon. Nothing changes unless you set the new dials,
12
+ with two exceptions marked **(behaviour)**.
13
+
14
+ ### Added
15
+
16
+ - **`<tosi-b3d-aircraft climbCost>`** (default `0.4`): what a climb costs in
17
+ speed as a fraction of `maxSpeed`. It was fixed, so the only way to make a
18
+ craft hold speed uphill was `acceleration`, which also changes spool-up. The
19
+ `maxPitch` row now says which climbs cannot be sustained.
20
+ - **`<tosi-b3d-aircraft chaseLookAhead>`** (default `0`): metres ahead of the
21
+ craft the chase camera aims at. `0` aims at the craft, as before (22.6° down
22
+ with the default camera, which puts anything level with you at the top of the
23
+ screen).
24
+ - **`<tosi-b3d-hud blend opacity>`**, also `--hud-blend` and `--hud-opacity`:
25
+ the flat overlay was additive at half opacity with no way to change it, and
26
+ went faint over a black sky.
27
+ - **`pad.suppress(reason)` / `pad.release(reason)`** on the glass gamepad, for
28
+ a menu drawn in the scene.
29
+
30
+ ### Fixed
31
+
32
+ - **(behaviour) The glass gamepad steps aside while the scene is paused,
33
+ while a death panel is up and while a modal popup is open.** It sat over
34
+ them and took the taps meant for their buttons. This reaches a pad inside
35
+ the scene element or directly beside it. There is no attribute to opt out;
36
+ `pad.release('pause')` from a `pause` listener puts it back.
37
+ - **Popups open at the same time no longer flicker through each other.** Each
38
+ was meant to sit a step nearer the viewer than the one behind it, and
39
+ pressing one brings it to the front. Three faults undid that: a new popup
40
+ took no place in the stack until something was pressed, the step was applied
41
+ in the tilted panel's own axes, and two restacks in one frame cancelled out.
42
+ - **(behaviour) In a headset, the chase view has a HUD.** The flat overlay is
43
+ DOM, which a headset does not show, and the in-scene plane was cockpit-only.
44
+ In a session the plane now also shows in chase: level, ahead of the craft,
45
+ scaled to cover the angle it covers from the cockpit. `hudChaseOff` still
46
+ keeps the chase view bare. Checked in the emulated headset, not on a device.
47
+
48
+ Size: barrel (min, packages external) 972.0 KB raw / 327.7 KB gz, +0.17% on 0.10.0.
49
+
50
+ ## 0.10.0
51
+
52
+ **A quality release: the deprecated names are gone, and a long list of bugs
53
+ with them.** No new elements; what was added is tooling for measuring and
54
+ debugging on a device, and some defaults changed (listed under **Changed
55
+ defaults** below). Most of what breaks was announced in 0.8 and
56
+ 0.9; three things were not, and are listed below with the rest:
57
+ `new MersenneTwister()` without a seed, `WorldStore` queries returning copies,
58
+ and `surface.openPanel`'s `onClose`. [Migration.md](https://3d.tosijs.net/Migration/) has every
59
+ pair and what to do.
60
+
61
+ Size: barrel (min, packages external) 970.3 KB raw / 327.2 KB gz, +2.30% on
62
+ 0.9.0.
63
+
64
+ ### ⚠️ Breaking
65
+
66
+ - **`onX` callback options are removed.** `onChange`, `onClick`, `onSelect`,
67
+ `onActivate`, `onClose`, `onKey`, `onAction`, `onCaretMove`, `onEnter` and
68
+ `onFocus` are no longer called; use `handleX`. An old name is not dropped
69
+ silently: `handlerOf` warns once per name that it is ignored and names the
70
+ replacement.
71
+ - **`<tosi-b3d-trigger>`'s `onEnter` / `onExit` properties** are removed; use
72
+ `whenEnter` / `whenExit`. **`<tosi-b3d-manipulator>`'s `handleChange` /
73
+ `handleCommit`** are removed; use `whenChange` / `whenCommit`.
74
+ - **`generateGalaxy`** is removed; use `voxelGalaxy({ seed, brightBudget }).view()`.
75
+ **`galaxy.getStarSPS()`** is removed; use `pickStar`.
76
+ - **`new MersenneTwister()` needs a seed.** It used to seed from the clock
77
+ when the argument was left out, which silently broke "same seed, same
78
+ result". It now throws; pass `Date.now()` if that is what you want.
79
+ - **`WorldStore.getState()`, `getEntity()` and `query()` return copies.** A
80
+ driver could change the simulation by writing to what a query returned.
81
+ Code that relied on that (deliberately or not) must call a command instead.
82
+ The engine's own systems read `store.liveState`.
83
+ A copy is made on every call, so read once per frame, not once per entity.
84
+ - **A store passed to the conformance kit must implement
85
+ `chooseOption(choiceId, optionId)`.** The kit now covers the choice
86
+ primitive and calls it.
87
+ - **`surface.openPanel({ onClose })` is `handleClose`.** This one was never
88
+ announced: it was the last `onX` option in the library and follows the same
89
+ rule now (ignored, with a warning).
90
+
91
+
92
+ ### Changed defaults
93
+
94
+ Nothing here removes an API, but a scene can look or behave differently
95
+ without a line of yours changing. Each has the setting that puts it back.
96
+
97
+ - **Opaque meshes are drawn nearest first, the sky last** (was material
98
+ order). The picture is the same for ordinary opaque meshes; one with depth
99
+ write off can differ. `scene.setRenderingOrder(0)` restores Babylon's order,
100
+ and a camera-pinned sky of your own must set `infiniteDistance`.
101
+ - **A headset session renders at a reduced scale with foveation** on the low
102
+ tier (`xrRenderScale`, `xrFoveation`; `1` and `0` for full).
103
+ - **The decorator places a tier share of its budget** (0.6 on the low tier)
104
+ and plant rules thin with moisture (`thirst`), so the same seed gives a
105
+ different layout from 0.9. `budgetScale: 1` places the whole budget.
106
+ - **Scatter rules gather more** (`clump` 0.95, was 0.85).
107
+ - **Water receives sun and cloud shadows.**
108
+ - **The low tier uses the lighter ground shader** (`groundDetail`).
109
+ - **`PerlinNoise(0)` is a seed**, not "no seed".
110
+
111
+ ### Docs
112
+
113
+ - **The doc site is reorganised.** Sections now list the elements you put in a
114
+ scene, with the pure models and helpers each is built from tucked beneath
115
+ it (the flight model under the aircraft, the biome chart under the
116
+ terrain). UI was one list of 39 pages and Environment one of 37; no section
117
+ now has more than 12 direct children. Environment is split into Sky and
118
+ light, Weather and clouds, Terrain and Water; Migration and the Changelog
119
+ moved from second and third to a Reference section at the end. Page URLs
120
+ are unchanged, except the section landing pages.
121
+ - **Getting started**: the install line with its peer dependencies, a first
122
+ scene that needs no model file, and where to go next. The README has the
123
+ same.
124
+ - **Ten modules that other pages linked to had no page**: the flight model,
125
+ ballistics, guidance, warhead, destroyable, resource, Perlin noise, gradient
126
+ filter, terrain grid and the primitives (box, sphere, ground). 17 links were
127
+ dead. A test now fails on a link to a page that does not exist.
128
+ - Every section landing page says which page you want, where most were a bare
129
+ list of links.
130
+
131
+ ### Fixed
132
+
133
+ - **A headset is drawn at the device tier's resolution.** It never was: the
134
+ tier lowered the engine's hardware scaling for a session, and that does not
135
+ reach the XR layer, so every tier drew both eyes at full size. The viewport
136
+ is now scaled per frame (`xrRenderScale`, auto: 0.67 on the low tier, 0.83
137
+ on medium) and fixed foveation is set (`xrFoveation`, auto: 1 on low, 0.5 on
138
+ medium). Measured on a Quest in Land and Sky at 90 ms a frame: half the
139
+ pixels saved 19 ms and full foveation 12 ms. Both are attributes of
140
+ `<tosi-b3d>`; set `xrRenderScale="1" xrFoveation="0"` for the old picture.
141
+ - **Opaque meshes are drawn nearest first, and the sky last.** Babylon draws
142
+ them in creation order, so a sky made first was shaded across the whole view
143
+ and then painted over by the land. The picture is the same; a covered pixel
144
+ is now rejected before its shader runs. `nearFirst(scene)` is exported for a
145
+ render target of your own (the water's two have it).
146
+ - **A cheaper ground shader for a weak GPU** (`<tosi-b3d groundDetail>`:
147
+ `auto`, `full`, `lite`). The biome shader took eight noise samples a pixel;
148
+ `lite` takes three and looks nearly the same from a distance. `auto` picks
149
+ it on the low tier, and in a headset on the medium tier. Measured on a Quest
150
+ in Land and Sky, the terrain was 40 ms of a 90 ms frame. The cost sweep
151
+ measures the other form on your device.
152
+ - **The ground shader reads its fine noise from a texture.** It computed 3D
153
+ noise four times a pixel, eight hashed corners each; it now reads a shared
154
+ 64-texel tiling block (`noiseVolume`, exported) once per sample. Mip-mapped,
155
+ so the detail fades in the distance where the computed noise shimmered. On
156
+ every tier with WebGL 2; `setBiomeComputedNoise(scene, true)` is the way
157
+ back, and the cost sweep measures it. The climate noise is still computed.
158
+ - **The water's reflection and refraction are drawn once for both eyes, and
159
+ every Nth frame in a headset too.** Each is the scene drawn again, and a
160
+ headset drew both for each eye on every frame: four extra scene passes.
161
+ Each is now looked up through the view it was drawn from, so one drawing is
162
+ in the right place from either eye and on later frames (`reflectionRefresh`,
163
+ from the device tier: every 3rd frame on the low tier). This also fixes the
164
+ refraction sliding against the seabed between redraws on a flat screen.
165
+ - **Perf Stats reports what SVG texture repaints cost** (the HUD, panels):
166
+ repaints a second and main-thread milliseconds a second (`svgTextureCost`).
167
+ It also shows the JS heap against its first reading and the total redraw
168
+ count, so a leak is visible from inside a headset.
169
+ - **Debug sink** (`debugSink.url`, `sendDebug`): a page can post its readings
170
+ to an endpoint, for a headset that has no console. With a URL set,
171
+ `<tosi-b3d>` sends each cost sweep step, the Perf Stats lines while that
172
+ popup is open in a session, and every `logDebug` event. Off by default.
173
+ - **`bun run xr … --counters [--again n]`**: documents, DOM nodes, listeners
174
+ and JS heap before and after a script, after a collection.
175
+ - **Cost sweep** (`b3d.costSweep()`, and a button in Perf Stats): where a
176
+ frame goes, measured on the device, by switching one thing off at a time.
177
+ Runs are numbered and the last four are kept, each saying whether it
178
+ finished or where it stopped, so a run that hangs does not replace the one
179
+ before. **Shader sweep** is a separate button: it measures the ground
180
+ shader's other forms, which recompiles shaders.
181
+ - **A popup's move and close icons keep their size on a tall popup in a
182
+ headset.** The title bar was a fifth of the popup's height, so Perf Stats
183
+ with a long list got icons several times too large, over its first rows.
184
+ - **A popup is capped in height and scrolls past the cap** (480 units, or the
185
+ caller's `maxHeight`). Perf Stats with a sweep listed was taller than the
186
+ screen flat and enormous in a headset, with no way to its lower rows.
187
+ - **The decorator places a share of its budget set by the device tier**
188
+ (`budgetScale`, `0` = auto: 1, and 0.6 on the low tier, which is a Quest in
189
+ a session). Measured on a Quest: decorations were 16 ms of a 42 ms frame.
190
+ Set `budgetScale: 1` to place the whole budget everywhere.
191
+ - **A thinned scatter loses clumps, not density** (`ScatterOptions.share`,
192
+ `clumpCentreFor`): the weaker clumps go and the middle of the rest stays as
193
+ full, in the same places as the whole scatter. The decorator's share and the
194
+ moisture thinning both work this way. Rules also gather more by default
195
+ (`clump` 0.95, was 0.85), so fewer things stand alone.
196
+ - **The cost sweep's two headset rows measure what the resolution levers are
197
+ saving** (`+ full resolution`, `+ no foveation`). The old rows set the
198
+ values the tier already uses, so they measured nothing.
199
+ - **Wetter country grows more.** A scatter rule's moisture band only said
200
+ where a kind may grow, and every plant's band reached the top, so anything
201
+ damp enough for a tree grew the same forest as the wettest setting. Plant
202
+ rules now have a `thirst`: the drier it is, the more of their places are
203
+ left empty (`moistureCover`). In Land and Sky, trees go from about 120 at
204
+ moisture 0.5 to about 240 at 1; rocks are unchanged.
205
+ - **A headset session no longer freezes the second time your hands are
206
+ tracked.** Babylon's hand tracking (9.16) takes the topmost ancestor of its
207
+ shared hand mesh as a root and parents it to the camera's parent every
208
+ frame. The second time hands appear (a controller put down twice), that root
209
+ is the camera's parent itself, which became its own parent; the next enable
210
+ or dispose then recursed until the stack ran out and the picture stopped.
211
+ Found on a Quest with Perf Stats open (#3135). The rig now refuses such a
212
+ parent (`refuseOwnAncestor`, exported for anyone parenting an XR camera to
213
+ their own node).
214
+ - **Underwater light rays go away when you leave the water.** They were still
215
+ fading on the frame you surfaced, the update read the water that was no
216
+ longer above you and threw, and it threw again every frame after, so the
217
+ rays stayed for good.
218
+ - **A popup moved in a headset stays with its panel.** Dragging an owned popup
219
+ used to tear it off, so moving the panel afterwards left it behind. It now
220
+ moves relative to its opener and stays owned; `tearOff()` is still how a
221
+ caller lets one go.
222
+ - **No second, dead copy of a popup after a panel rebuild in a headset.** The
223
+ rebuild dropped its popups' handles and relied on each dying with the panel
224
+ plane. One that was torn off, or not yet mounted, stayed in the scene: a
225
+ Perf Stats that never updated and could not be closed. They are now closed
226
+ before the plane goes, and a popup whose opener has been disposed closes
227
+ itself.
228
+ - **Perf Stats refreshes every two seconds in a headset** (was 0.4 s). A
229
+ Quest hung within minutes with it open and ran on with it closed; the cause
230
+ is not known, this redraws its texture less often.
231
+ - **Water, and the ice on it, receives shadows.** The surface never did: it
232
+ was not marked as a shadow receiver, so nothing cast a shadow on the sea,
233
+ which on a white ice sheet is obvious. `<tosi-b3d-water receiveShadows="off">`
234
+ restores the old behaviour and saves a shadow lookup per water pixel (the
235
+ cost on a headset has not been measured).
236
+ - **Cloud shadows fall on water and ice.** They never did, on any device:
237
+ cloud shadows are a material plugin, and Babylon's water material runs no
238
+ plugins. The lookup is now in the water's own shader, fed from the scene's
239
+ cloud shadow map (`cloudShadowMapOf(scene)`, new). `receiveShadows="off"`
240
+ turns it off with the sun's shadows. Every water now uses the patched
241
+ shader, not only `shore="on"`.
242
+ - `PerlinNoise(0)` uses seed 0. It was treated as "no seed" and gave a
243
+ different field every time.
244
+ - `world-store.ts` compiles under `noUncheckedIndexedAccess` (the steer loop
245
+ read `r.portals[0]` unguarded), so a project that vendors it with strict
246
+ settings no longer has to pin an old copy.
247
+ - The world contract now says what it meant: a driver must supply `spec.id` to
248
+ `spawn` (the return value cannot cross a worker boundary), and `setIntent`
249
+ is legacy (`steer` is what the sim honours).
250
+ - The conformance kit covers the choice primitive: a pick emits exactly one
251
+ `choiceMade`, an option that is not on the menu emits nothing, a choice is
252
+ reported once, and the sim resolves nothing.
253
+ - **A bomb that goes off on terrain now hurts what is above it.** The blast's
254
+ line of sight started on (or just under) the surface it hit, so the terrain
255
+ was cover for everything and a ground burst damaged nothing. A burst near a
256
+ surface now looks from a metre above it; a hill or wall in between is still
257
+ cover. (Only a mesh named `ground` was exempt before.)
258
+ - **Decorator: naming the default library explicitly no longer empties the
259
+ scatter.** Default rules were chosen by whether `url` was set, so
260
+ `url="…/quaternius/libraries/nature.glb"` got the other library's rules,
261
+ which matched no model. The choice is now made from the library in use.
262
+ - **Decorator: `NATURE_ROLES` applies only to the default library.** Its keys
263
+ are generic material names (`White`, `Wood`), so a third-party model with a
264
+ material of the same name had it replaced by flat biome shading. Set `roles`
265
+ to opt a custom library in.
266
+ - The Perf Stats "Occlusion" button says whether occlusion is running, not
267
+ what was asked for (`on, not running here` when the method cannot run in
268
+ the current mode). Land and Sky's own occlusion select, which drifted out of
269
+ step with it, is gone.
270
+ - **Lightning bolts are solid, not see-through.** The channel was faded by
271
+ transparency between re-strokes, so up close it was a pale translucent
272
+ tube. It is opaque while the stroke is live, far brighter than white (so it
273
+ blooms), and the glow around it fades to nothing at its edge. The flicker is
274
+ carried by the glow, the cloud and the ground.
275
+ - **Thunder stops when its storm does.** Thunder is queued as far ahead as
276
+ sound takes to arrive, so changing world left the old storm's thunder
277
+ playing over the new one.
278
+ - **In VR, the pointer no longer lands on the vehicle you are sitting in.**
279
+ In the aircraft's cockpit the controller ray hit the canopy first, and on a
280
+ Quest the panel behind it could be hovered but not pressed or dragged, so
281
+ there was no way out of the session from inside. Anything beneath the node
282
+ the XR rig rides on is no longer a pointer target; your own panels are.
283
+ (Reproduced and checked with the emulated headset; not yet on a device.)
284
+ - **Sea ice: the plate pattern no longer depends on the GPU's `sin`.** The
285
+ plates were laid out with the classic `fract(sin(x) * 43758.5)` hash, which
286
+ mobile GPUs evaluate differently from desktop ones; in a headset the ice
287
+ showed severe mismatches that a Mac never did. The hash is arithmetic only
288
+ now. Plate edges are also a little softer. (The layout of plates for a given
289
+ place changes. Not yet confirmed on a headset.)
290
+ - **No holes in solid sea ice near its edge.** The invisible mesh a car or a
291
+ shell lands on kept a triangle only if all three corners were solid, so a
292
+ band one cell wide (16 m and more far from the viewer) was drawn solid and
293
+ had nothing to stand on. A triangle is kept when it is solid on average,
294
+ which is where the drawn ice crosses the same line.
295
+ - **The HUD page no longer throws 30 times a second.** Its demo still called
296
+ `setTraces(traces, viewer, options)`, a signature that went away when the
297
+ HUD started projecting through the camera. The demo passes the camera, and
298
+ `setTraces` warns once (and draws nothing) if it is handed anything else.
299
+ - Three demo controls were dead because they still used an old name the
300
+ compiler cannot see in a doc comment: the aircraft page's "chase pitch
301
+ follow" and "follow lag" sliders, and the particles page's Burst button.
302
+ (They worked, with a warning, until the fallback was removed here.)
303
+
9
304
  ## 0.9.0
10
305
 
11
306
  **A sea that knows its shore, and a temperature that means one.** The water
@@ -28,7 +323,7 @@ Size: barrel (min, packages external) 948.5 KB raw / 318.9 KB gz, +1.75% on
28
323
  chart is a window onto the new scale (-22.5 °C to 40 °C) and clamps beyond
29
324
  it. `chartTemperature` / `planetTemperature` convert. Everything inside the
30
325
  biome shader, province climate and decorator bands is still in chart
31
- units. See [Migration](./Migration.md).
326
+ units. See [Migration](https://3d.tosijs.net/Migration/).
32
327
 
33
328
  ### Changed
34
329
 
@@ -1363,7 +1658,7 @@ demo is now **Land and Sky**.
1363
1658
  ### ⚠️ Breaking
1364
1659
 
1365
1660
  Nothing breaks at compile time. Two behaviours change, and
1366
- [Migration.md](./Migration.md) has the before/after for each.
1661
+ [Migration.md](https://3d.tosijs.net/Migration/) has the before/after for each.
1367
1662
 
1368
1663
  - **Aircraft guns are direct-hit, not area-effect.** `gun-mode="blast"`
1369
1664
  restores the old behaviour; `gunBlastRadius`/`gunFullRadius` are attributes
package/Migration.md CHANGED
@@ -1,14 +1,109 @@
1
1
  # Migration
2
2
 
3
- <!--{ "order": 2 }-->
3
+ <!--{ "parent": "reference", "order": 10 }-->
4
4
 
5
5
  What to change when upgrading. Only breaking changes are listed — everything
6
- else is additive. The full detail for each is in [CHANGELOG.md](./CHANGELOG.md).
6
+ else is additive. The full detail for each is in [CHANGELOG.md](https://3d.tosijs.net/CHANGELOG/).
7
7
 
8
8
  This file ships **inside the package**, because a migration table you can only
9
9
  read on GitHub does not exist for someone who has already installed the thing
10
10
  and is staring at an error.
11
11
 
12
+ ## 0.9.0 → 0.10.0
13
+
14
+ ### 1. The deprecated callback names are gone: `onX` → `handleX`
15
+
16
+ **What changed.** The `onX` callback options were deprecated in 0.8.0 and kept
17
+ working, with a warning, through 0.9.x. They are removed. An `onX` option is
18
+ no longer called.
19
+
20
+ **Who is affected.** Anyone who saw the console warning
21
+ "`onChange` is deprecated — use `handleChange`" and has not renamed yet.
22
+
23
+ **How you will notice.** TypeScript reports the old name as an unknown
24
+ property. At runtime the callback does not fire, and the console says so once
25
+ per name: "`onChange` was removed in 0.10 and is IGNORED — use `handleChange`".
26
+ Demo code in doc comments and plain JavaScript is not type-checked, so search
27
+ for the names rather than relying on the compiler.
28
+
29
+ **What to do.** Rename. Every pair:
30
+
31
+ | where | removed | use |
32
+ | --- | --- | --- |
33
+ | `toggle3d` `slider3d` `select3d` `color3d` `vector3d` `euler3d` `angle3d` `arc3d` `picker3d` `curve3d` `footprint3d` `themeEditor` `terrainEditor3d` | `onChange` | `handleChange` |
34
+ | `button3d`, menu actions, `addDebugSource` actions | `onClick` | `handleClick` |
35
+ | `list3d`, `surface` `MenuItem`, `table` | `onSelect` | `handleSelect` |
36
+ | `table`, `box` `button` / `BoxChild` | `onActivate` | `handleActivate` |
37
+ | `showPopup` / `openPopup` / `openMenu3d` / `surface.openPanel` | `onClose` | `handleClose` |
38
+ | `inputField` | `onChange` / `onEnter` / `onFocus` | `handleChange` / `handleEnter` / `handleFocus` |
39
+ | `keyboard` | `onKey` / `onAction` / `onCaretMove` | `handleKey` / `handleAction` / `handleCaretMove` |
40
+ | `curve3d` / `footprint3d` result (`field.onChange = …`) | `onChange` | `handleChange` |
41
+
42
+ Components take `when*`:
43
+
44
+ | component | removed | use |
45
+ | --- | --- | --- |
46
+ | `<tosi-b3d-trigger>` | `onEnter` / `onExit` properties | `whenEnter` / `whenExit` |
47
+ | `<tosi-b3d-manipulator>` | `handleChange` / `handleCommit` | `whenChange` / `whenCommit` |
48
+
49
+ `b3dTrigger({ onEnter })` through the element creator is unchanged: it was
50
+ never the property, it is a listener for the `'enter'` event and receives an
51
+ `Event`.
52
+
53
+ `handlerOf(config, 'handleX', 'onX')` keeps its signature. It now returns only
54
+ `handleX`, and warns once if it finds a function under the old name.
55
+
56
+ ### 2. `generateGalaxy` and `galaxy.getStarSPS()` are removed
57
+
58
+ `generateGalaxy(seed, count, options)` was an adapter over the voxel galaxy.
59
+ Call that directly:
60
+
61
+ ```javascript
62
+ // before
63
+ const galaxy = generateGalaxy(1234, 10000, options)
64
+ // after
65
+ const galaxy = voxelGalaxy({
66
+ seed: 1234,
67
+ brightBudget: 10000,
68
+ dimBudget: 0,
69
+ galaxyOptions: options,
70
+ }).view({ generatePlanets: options.generatePlanets === true })
71
+ ```
72
+
73
+ The result is identical. `getStarSPS()` on `<tosi-b3d-galaxy>` returned `null`
74
+ since the stars moved to a vertex shader; use `galaxy.pickStar(x, y)`.
75
+
76
+ ### 3. `new MersenneTwister()` needs a seed
77
+
78
+ It used to seed from `Date.now()` when you left the argument out. It now
79
+ throws. Pass a seed, or `new MersenneTwister(Date.now())` if you want a
80
+ different sequence each run. (`PRNG` always required one.)
81
+
82
+ ### 4. `WorldStore` queries return copies
83
+
84
+ `getState()`, `getEntity()` and `query()` used to return the store's live
85
+ objects, so writing to a result changed the simulation. They return copies
86
+ now. If you were moving something by writing to a query result, call the
87
+ command for it. Engine-side code that needs the live state every frame reads
88
+ `store.liveState` and must not write to it. A store passed to the conformance
89
+ kit must also implement `chooseOption(choiceId, optionId)`.
90
+
91
+ ### 5. Some defaults changed: a scene can look different
92
+
93
+ Nothing to rename, but four things change what you see without a line of
94
+ yours changing. The changelog's **Changed defaults** block has all of them.
95
+
96
+ - **Decoration layouts differ again.** Plants thin out in drier country, things
97
+ gather into clumps more strongly, and a low-tier device (a Quest in a
98
+ session) places 60% of the budget as fewer clumps. `budgetScale: 1` places
99
+ the whole budget; `clump: 0.85` on the decorator is the old gathering.
100
+ - **Opaque meshes are drawn nearest first.** Same picture for ordinary meshes.
101
+ `scene.setRenderingOrder(0)` puts Babylon's order back; a camera-pinned sky
102
+ of your own needs `infiniteDistance`.
103
+ - **A headset on the low tier renders at reduced scale with foveation.**
104
+ `xrRenderScale: 1` and `xrFoveation: 0` are full resolution.
105
+ - **Water receives sun and cloud shadows.**
106
+
12
107
  ## 0.8.15 → 0.9.0
13
108
 
14
109
  ### 1. `biomeTemperature` is in degrees now: 0 is 0 °C, 1 is 50 °C
@@ -186,8 +281,8 @@ Use **`isOff()`** from `tosijs-3d`, which accepts `'off'`, `false` and
186
281
  ### 2. Callback options: `onX` → `handleX`
187
282
 
188
283
  Every callback option in the library now takes `handleX`. The old `onX` spelling
189
- still works, warns **once per name**, and is **removed in 0.10** (announced
190
- for 0.9, then kept one more minor).
284
+ kept working through 0.9.x, warning **once per name**, and was **removed in
285
+ 0.10** (see the top of this file).
191
286
 
192
287
  | widget | old | new |
193
288
  | ---------------------------------------- | ------------------------------------ | ------------------------------------------------ |
package/README.md CHANGED
@@ -24,8 +24,54 @@ b3d(
24
24
  )
25
25
  ```
26
26
 
27
- See the [b3d](?tosi-b3d.ts) page for that running, and every page here carries a
28
- live demo you can edit in place.
27
+ The [doc site](https://3d.tosijs.net) has about a hundred live demos you can
28
+ edit in place; the [b3d page](https://3d.tosijs.net/tosi-b3d/) is that scene
29
+ running.
30
+
31
+ ## Getting started
32
+
33
+ ```bash
34
+ npm install tosijs-3d tosijs @babylonjs/core @babylonjs/gui @babylonjs/loaders @babylonjs/materials
35
+ ```
36
+
37
+ Babylon (`^9`) and `tosijs` (`^1.9.2`) are peer dependencies: you install
38
+ them, so there is exactly one copy of the engine in your app. `jolt-physics`
39
+ is an optional peer, needed only if you use `b3dPhysics`.
40
+
41
+ A first scene, with no model file to find:
42
+
43
+ ```javascript
44
+ import { b3d, b3dSun, b3dSkybox, b3dGround, b3dBox, b3dSphere } from 'tosijs-3d'
45
+
46
+ document.body.append(
47
+ b3d(
48
+ b3dSun({ shadowCascading: true }),
49
+ b3dSkybox({ timeOfDay: 10 }),
50
+ b3dGround({ size: 24, texture: 'checker' }),
51
+ b3dBox({ x: -1.5, y: 0.5, color: '#c8553d' }),
52
+ b3dSphere({ x: 1.5, y: 1, diameter: 2, color: '#ffd166' })
53
+ )
54
+ )
55
+ ```
56
+
57
+ Give `tosi-b3d` a size in CSS (`tosi-b3d { width: 100vw; height: 100vh }`) and
58
+ you have a lit scene with shadows and an orbit camera. Then:
59
+
60
+ - **Your own model:** [b3d-loader](https://3d.tosijs.net/b3d-loader/) takes a
61
+ GLB; name suffixes on its meshes (`_collide`, `_mirror`, `_nocast`) set how
62
+ they behave.
63
+ - **Something to drive:** a [character](https://3d.tosijs.net/b3d-biped/), a
64
+ [car](https://3d.tosijs.net/b3d-car/) or an
65
+ [aircraft](https://3d.tosijs.net/b3d-aircraft/), inside an
66
+ [input focus](https://3d.tosijs.net/b3d-input-focus/) so keyboard, gamepad,
67
+ touch and VR controllers all work.
68
+ - **A world:** [terrain](https://3d.tosijs.net/b3d-terrain/),
69
+ [water](https://3d.tosijs.net/b3d-water/) and a
70
+ [sky](https://3d.tosijs.net/b3d-skybox/); [Land and
71
+ Sky](https://3d.tosijs.net/land-and-sky/) is all of it at once.
72
+ - **Controls that work in a headset:** the `scenePanel` hook on
73
+ [b3d](https://3d.tosijs.net/tosi-b3d/) and the
74
+ [widget set](https://3d.tosijs.net/widgets3d/).
29
75
 
30
76
  ## Four things you may not have seen in a 3D library
31
77
 
@@ -60,33 +106,13 @@ the package**, so an agent already in a consumer project reads
60
106
  It exists because the recurring adopter failure is not a missing feature, it is
61
107
  a feature that ships, is documented, and cannot be found: three issues in one
62
108
  week turned out to be capability that was already there. One `grep water` finds
63
- `submersible`; reading 147 doc pages does not.
64
-
65
- **Upgrading?** See [Migration.md](./Migration.md) for the breaking changes and
66
- what to do about them, and [CHANGELOG.md](./CHANGELOG.md) for the full detail.
67
- Both ship inside the package, so they work from `node_modules` too.
68
-
69
- ```javascript
70
- import {
71
- b3d,
72
- b3dSun,
73
- b3dSkybox,
74
- b3dLoader,
75
- b3dWater,
76
- b3dReflections,
77
- } from 'tosijs-3d'
109
+ `submersible`; reading two hundred doc pages does not.
78
110
 
79
- document.body.append(
80
- b3d(
81
- { glowLayerIntensity: 1 },
82
- b3dSun({ shadowCascading: true }),
83
- b3dSkybox({ timeOfDay: 6, realtimeScale: 100 }),
84
- b3dLoader({ url: './scene.glb' }),
85
- b3dWater({ y: -0.2 }),
86
- b3dReflections()
87
- )
88
- )
89
- ```
111
+ **Upgrading?** See [Migration](https://3d.tosijs.net/Migration/) for the
112
+ breaking changes and what to do about them, and the
113
+ [Changelog](https://3d.tosijs.net/CHANGELOG/) for the full detail. Both ship
114
+ inside the package as `Migration.md` and `CHANGELOG.md`, so they work from
115
+ `node_modules` too.
90
116
 
91
117
  ## Highlights
92
118
 
@@ -137,8 +163,9 @@ performance-sensitive settings resolve to `auto` rather than to a number that is
137
163
  always wrong for something. A Quest and a workstation get different worlds.
138
164
 
139
165
  **Pure models, actually tested** — the flight model, ballistics, guidance, biome
140
- classification, layout and text editing are engine-free and unit-tested (1000+
141
- assertions run in ~2s with no GPU). If it can be a function of its inputs, it is.
166
+ classification, layout and text editing are engine-free and unit-tested (about
167
+ 3,000 tests, run in seconds with no GPU). If it can be a function of its inputs,
168
+ it is.
142
169
 
143
170
  ## Development
144
171
 
@@ -146,9 +173,11 @@ Requires [Bun](https://bun.sh).
146
173
 
147
174
  ```bash
148
175
  bun install
149
- bun start
176
+ bun tls # once: local HTTPS certificates (needs mkcert)
177
+ bun start # the doc site and dev server, rebuilding on change
178
+ bun test
150
179
  ```
151
180
 
152
- Dev server runs on https://localhost:8030 with auto-rebuild on file changes.
181
+ The dev server runs on https://localhost:8030.
153
182
 
154
183
  <!--{ "pin": "top" }-->
package/dist/aim.js CHANGED
@@ -188,7 +188,7 @@ legible bad-shooter behaviour there is: the aim visibly trails the target, so a
188
188
  player can *see* they are being missed rather than merely surviving. Pair it
189
189
  with `aimWobble` for a shooter who cannot hold still.
190
190
  */
191
- /*{ "parent": "Vehicles", "order": 167 }*/
191
+ /*{ "parent": "b3d-biped", "order": 40 }*/
192
192
  /**
193
193
  * Human-ish defaults, and each one is a posture rather than a round number.
194
194
  *
@@ -30,7 +30,7 @@ import { allocateAmbient } from 'tosijs-3d'
30
30
 
31
31
  Effects **compete**. Rain, dust and motes can each be individually "within budget" and still cook
32
32
  the frame together. So the device tier vends ONE `ambientParticles` pool for the whole scene and
33
- [`allocateAmbient`](#allocateambient) divides it — which is also why a future decal system
33
+ `allocateAmbient` divides it — which is also why a future decal system
34
34
  (footprints, blood, bullet holes) should draw from this same pool rather than inventing its own.
35
35
 
36
36
  ## Why the cost model is *modelled*, not measured
@@ -47,11 +47,11 @@ reasons that are worth writing down so nobody tries again:
47
47
  least trustworthy on the device that needs it most.
48
48
 
49
49
  So cost is **modelled** from what actually drives fill — area and blend mode
50
- ([`fillWeight`](#fillweight)) — and bounded against a pool sized from the *measured device*.
50
+ (`fillWeight`) — and bounded against a pool sized from the *measured device*.
51
51
  Same lesson `tileBuildMs` taught the terrain: bound the frame **by construction**, not by hoping
52
52
  a counter shows up.
53
53
  */
54
- /*{ "parent": "Performance", "order": 900 }*/
54
+ /*{ "parent": "b3d-ambient", "order": 20 }*/
55
55
  const TIER_RANK = { low: 0, medium: 1, high: 2 };
56
56
  /** The reference particle: 0.15 across, standard blend. Everything is priced against it. */
57
57
  const REF_SIZE = 0.15;
@@ -1 +1 @@
1
- {"version":3,"file":"ambient-budget.js","sourceRoot":"","sources":["../src/ambient-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDE;AACF,6CAA6C;AAiC7C,MAAM,SAAS,GAA6B,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;AAE1E,4FAA4F;AAC5F,MAAM,QAAQ,GAAG,IAAI,C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
  // the budget + drain, so prefer <tosi-b3d-ambient> unless you're wiring your own ambient system.
35
35
  ```
36
36
  */
37
- /*{ "parent": "Environment", "order": 900 }*/
37
+ /*{ "parent": "b3d-ambient", "order": 10 }*/
38
38
  import * as BABYLON from '@babylonjs/core';
39
39
  const TAU = Math.PI * 2;
40
40
  /** Fade a leaf in/out over seconds, so it drifts into view instead of blinking on. */