tosijs-3d 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/CHANGELOG.md +465 -0
  2. package/Migration.md +64 -0
  3. package/README.md +56 -3
  4. package/dist/aim.d.ts +157 -0
  5. package/dist/aim.d.ts.map +1 -0
  6. package/dist/aim.js +399 -0
  7. package/dist/aim.js.map +1 -0
  8. package/dist/ambient-leaves.d.ts.map +1 -1
  9. package/dist/ambient-leaves.js +8 -4
  10. package/dist/ambient-leaves.js.map +1 -1
  11. package/dist/angle-field.d.ts +44 -0
  12. package/dist/angle-field.d.ts.map +1 -0
  13. package/dist/angle-field.js +414 -0
  14. package/dist/angle-field.js.map +1 -0
  15. package/dist/animation-layers.d.ts +44 -0
  16. package/dist/animation-layers.d.ts.map +1 -0
  17. package/dist/animation-layers.js +273 -0
  18. package/dist/animation-layers.js.map +1 -0
  19. package/dist/arc.d.ts +95 -0
  20. package/dist/arc.d.ts.map +1 -0
  21. package/dist/arc.js +206 -0
  22. package/dist/arc.js.map +1 -0
  23. package/dist/asset-url.d.ts +27 -1
  24. package/dist/asset-url.d.ts.map +1 -1
  25. package/dist/asset-url.js +29 -2
  26. package/dist/asset-url.js.map +1 -1
  27. package/dist/atmosphere.d.ts +15 -0
  28. package/dist/atmosphere.d.ts.map +1 -1
  29. package/dist/atmosphere.js.map +1 -1
  30. package/dist/b3d-aircraft.d.ts +63 -1
  31. package/dist/b3d-aircraft.d.ts.map +1 -1
  32. package/dist/b3d-aircraft.js +315 -14
  33. package/dist/b3d-aircraft.js.map +1 -1
  34. package/dist/b3d-ambient.d.ts +4 -0
  35. package/dist/b3d-ambient.d.ts.map +1 -1
  36. package/dist/b3d-ambient.js +27 -3
  37. package/dist/b3d-ambient.js.map +1 -1
  38. package/dist/b3d-beacon.d.ts +63 -0
  39. package/dist/b3d-beacon.d.ts.map +1 -0
  40. package/dist/b3d-beacon.js +307 -0
  41. package/dist/b3d-beacon.js.map +1 -0
  42. package/dist/b3d-biped.d.ts +273 -1
  43. package/dist/b3d-biped.d.ts.map +1 -1
  44. package/dist/b3d-biped.js +1090 -25
  45. package/dist/b3d-biped.js.map +1 -1
  46. package/dist/b3d-cloud-deck.d.ts +535 -0
  47. package/dist/b3d-cloud-deck.d.ts.map +1 -0
  48. package/dist/b3d-cloud-deck.js +2098 -0
  49. package/dist/b3d-cloud-deck.js.map +1 -0
  50. package/dist/b3d-clouds.d.ts +11 -0
  51. package/dist/b3d-clouds.d.ts.map +1 -1
  52. package/dist/b3d-clouds.js +68 -7
  53. package/dist/b3d-clouds.js.map +1 -1
  54. package/dist/b3d-controller.d.ts +2 -2
  55. package/dist/b3d-controller.d.ts.map +1 -1
  56. package/dist/b3d-controller.js +14 -1
  57. package/dist/b3d-controller.js.map +1 -1
  58. package/dist/b3d-crowd.d.ts +399 -0
  59. package/dist/b3d-crowd.d.ts.map +1 -0
  60. package/dist/b3d-crowd.js +2264 -0
  61. package/dist/b3d-crowd.js.map +1 -0
  62. package/dist/b3d-destroyable.d.ts +28 -2
  63. package/dist/b3d-destroyable.d.ts.map +1 -1
  64. package/dist/b3d-destroyable.js +99 -36
  65. package/dist/b3d-destroyable.js.map +1 -1
  66. package/dist/b3d-elevator.d.ts +70 -0
  67. package/dist/b3d-elevator.d.ts.map +1 -0
  68. package/dist/b3d-elevator.js +243 -0
  69. package/dist/b3d-elevator.js.map +1 -0
  70. package/dist/b3d-exploder.d.ts.map +1 -1
  71. package/dist/b3d-exploder.js +4 -9
  72. package/dist/b3d-exploder.js.map +1 -1
  73. package/dist/b3d-fog.js +1 -1
  74. package/dist/b3d-fog.js.map +1 -1
  75. package/dist/b3d-galaxy.d.ts +45 -0
  76. package/dist/b3d-galaxy.d.ts.map +1 -1
  77. package/dist/b3d-galaxy.js +309 -14
  78. package/dist/b3d-galaxy.js.map +1 -1
  79. package/dist/b3d-input-focus.d.ts.map +1 -1
  80. package/dist/b3d-input-focus.js +50 -6
  81. package/dist/b3d-input-focus.js.map +1 -1
  82. package/dist/b3d-interactive.d.ts +9 -4
  83. package/dist/b3d-interactive.d.ts.map +1 -1
  84. package/dist/b3d-interactive.js +75 -4
  85. package/dist/b3d-interactive.js.map +1 -1
  86. package/dist/b3d-launcher.d.ts +150 -0
  87. package/dist/b3d-launcher.d.ts.map +1 -1
  88. package/dist/b3d-launcher.js +594 -4
  89. package/dist/b3d-launcher.js.map +1 -1
  90. package/dist/b3d-light.d.ts +1 -0
  91. package/dist/b3d-light.d.ts.map +1 -1
  92. package/dist/b3d-light.js +11 -0
  93. package/dist/b3d-light.js.map +1 -1
  94. package/dist/b3d-manipulator.d.ts +101 -0
  95. package/dist/b3d-manipulator.d.ts.map +1 -0
  96. package/dist/b3d-manipulator.js +579 -0
  97. package/dist/b3d-manipulator.js.map +1 -0
  98. package/dist/b3d-physics.d.ts.map +1 -1
  99. package/dist/b3d-physics.js +4 -9
  100. package/dist/b3d-physics.js.map +1 -1
  101. package/dist/b3d-planet.js +2 -2
  102. package/dist/b3d-primitives.d.ts +66 -0
  103. package/dist/b3d-primitives.d.ts.map +1 -1
  104. package/dist/b3d-primitives.js +179 -9
  105. package/dist/b3d-primitives.js.map +1 -1
  106. package/dist/b3d-prop.d.ts +31 -0
  107. package/dist/b3d-prop.d.ts.map +1 -0
  108. package/dist/b3d-prop.js +244 -0
  109. package/dist/b3d-prop.js.map +1 -0
  110. package/dist/b3d-shadows.d.ts.map +1 -1
  111. package/dist/b3d-shadows.js +20 -1
  112. package/dist/b3d-shadows.js.map +1 -1
  113. package/dist/b3d-skybox.d.ts +170 -0
  114. package/dist/b3d-skybox.d.ts.map +1 -1
  115. package/dist/b3d-skybox.js +1536 -8
  116. package/dist/b3d-skybox.js.map +1 -1
  117. package/dist/b3d-sound.d.ts.map +1 -1
  118. package/dist/b3d-sound.js +5 -7
  119. package/dist/b3d-sound.js.map +1 -1
  120. package/dist/b3d-spawner.d.ts +24 -0
  121. package/dist/b3d-spawner.d.ts.map +1 -1
  122. package/dist/b3d-spawner.js +52 -10
  123. package/dist/b3d-spawner.js.map +1 -1
  124. package/dist/b3d-star-system.d.ts.map +1 -1
  125. package/dist/b3d-star-system.js +5 -2
  126. package/dist/b3d-star-system.js.map +1 -1
  127. package/dist/b3d-svg-plane.d.ts.map +1 -1
  128. package/dist/b3d-svg-plane.js +8 -79
  129. package/dist/b3d-svg-plane.js.map +1 -1
  130. package/dist/b3d-terrain.d.ts +32 -0
  131. package/dist/b3d-terrain.d.ts.map +1 -1
  132. package/dist/b3d-terrain.js +378 -33
  133. package/dist/b3d-terrain.js.map +1 -1
  134. package/dist/b3d-trigger.d.ts.map +1 -1
  135. package/dist/b3d-trigger.js +8 -1
  136. package/dist/b3d-trigger.js.map +1 -1
  137. package/dist/b3d-turret.d.ts +16 -0
  138. package/dist/b3d-turret.d.ts.map +1 -1
  139. package/dist/b3d-turret.js +76 -0
  140. package/dist/b3d-turret.js.map +1 -1
  141. package/dist/b3d-utils.d.ts +174 -2
  142. package/dist/b3d-utils.d.ts.map +1 -1
  143. package/dist/b3d-utils.js +384 -7
  144. package/dist/b3d-utils.js.map +1 -1
  145. package/dist/b3d-warhead.d.ts +4 -1
  146. package/dist/b3d-warhead.d.ts.map +1 -1
  147. package/dist/b3d-warhead.js +43 -19
  148. package/dist/b3d-warhead.js.map +1 -1
  149. package/dist/b3d-water.d.ts +9 -0
  150. package/dist/b3d-water.d.ts.map +1 -1
  151. package/dist/b3d-water.js +74 -3
  152. package/dist/b3d-water.js.map +1 -1
  153. package/dist/bone-mask.d.ts +96 -0
  154. package/dist/bone-mask.d.ts.map +1 -0
  155. package/dist/bone-mask.js +207 -0
  156. package/dist/bone-mask.js.map +1 -0
  157. package/dist/box.d.ts.map +1 -1
  158. package/dist/box.js +11 -3
  159. package/dist/box.js.map +1 -1
  160. package/dist/camera-fit.d.ts +119 -0
  161. package/dist/camera-fit.d.ts.map +1 -0
  162. package/dist/camera-fit.js +154 -0
  163. package/dist/camera-fit.js.map +1 -0
  164. package/dist/cloud-field.d.ts +40 -0
  165. package/dist/cloud-field.d.ts.map +1 -0
  166. package/dist/cloud-field.js +232 -0
  167. package/dist/cloud-field.js.map +1 -0
  168. package/dist/cloud-shadows.d.ts +13 -0
  169. package/dist/cloud-shadows.d.ts.map +1 -1
  170. package/dist/cloud-shadows.js +32 -2
  171. package/dist/cloud-shadows.js.map +1 -1
  172. package/dist/color-field.d.ts +30 -0
  173. package/dist/color-field.d.ts.map +1 -0
  174. package/dist/color-field.js +351 -0
  175. package/dist/color-field.js.map +1 -0
  176. package/dist/color.d.ts +47 -0
  177. package/dist/color.d.ts.map +1 -0
  178. package/dist/color.js +216 -0
  179. package/dist/color.js.map +1 -0
  180. package/dist/control-input.d.ts +9 -0
  181. package/dist/control-input.d.ts.map +1 -1
  182. package/dist/control-input.js +3 -0
  183. package/dist/control-input.js.map +1 -1
  184. package/dist/destroyable-behavior.d.ts +23 -3
  185. package/dist/destroyable-behavior.d.ts.map +1 -1
  186. package/dist/destroyable-behavior.js +107 -4
  187. package/dist/destroyable-behavior.js.map +1 -1
  188. package/dist/destroyable.d.ts +50 -1
  189. package/dist/destroyable.d.ts.map +1 -1
  190. package/dist/destroyable.js +28 -4
  191. package/dist/destroyable.js.map +1 -1
  192. package/dist/galaxy-data.d.ts +59 -2
  193. package/dist/galaxy-data.d.ts.map +1 -1
  194. package/dist/galaxy-data.js +229 -24
  195. package/dist/galaxy-data.js.map +1 -1
  196. package/dist/game-controller.d.ts +51 -0
  197. package/dist/game-controller.d.ts.map +1 -1
  198. package/dist/game-controller.js +195 -4
  199. package/dist/game-controller.js.map +1 -1
  200. package/dist/icon-data.d.ts.map +1 -1
  201. package/dist/icon-data.js +11 -0
  202. package/dist/icon-data.js.map +1 -1
  203. package/dist/icon-grid.d.ts.map +1 -1
  204. package/dist/icon-grid.js +12 -2
  205. package/dist/icon-grid.js.map +1 -1
  206. package/dist/index.d.ts +47 -6
  207. package/dist/index.d.ts.map +1 -1
  208. package/dist/index.js +59 -4
  209. package/dist/index.js.map +1 -1
  210. package/dist/interaction.d.ts +58 -3
  211. package/dist/interaction.d.ts.map +1 -1
  212. package/dist/interaction.js +26 -10
  213. package/dist/interaction.js.map +1 -1
  214. package/dist/interactive-behavior.d.ts +85 -5
  215. package/dist/interactive-behavior.d.ts.map +1 -1
  216. package/dist/interactive-behavior.js +150 -8
  217. package/dist/interactive-behavior.js.map +1 -1
  218. package/dist/key-layout.d.ts +1 -1
  219. package/dist/key-layout.d.ts.map +1 -1
  220. package/dist/key-layout.js +30 -0
  221. package/dist/key-layout.js.map +1 -1
  222. package/dist/keyboard-gamepad.d.ts.map +1 -1
  223. package/dist/keyboard-gamepad.js +18 -0
  224. package/dist/keyboard-gamepad.js.map +1 -1
  225. package/dist/keyboard.d.ts.map +1 -1
  226. package/dist/keyboard.js +123 -22
  227. package/dist/keyboard.js.map +1 -1
  228. package/dist/landform.d.ts +77 -7
  229. package/dist/landform.d.ts.map +1 -1
  230. package/dist/landform.js +162 -10
  231. package/dist/landform.js.map +1 -1
  232. package/dist/library-mesh.d.ts +47 -0
  233. package/dist/library-mesh.d.ts.map +1 -0
  234. package/dist/library-mesh.js +114 -0
  235. package/dist/library-mesh.js.map +1 -0
  236. package/dist/manipulator-view.d.ts +79 -0
  237. package/dist/manipulator-view.d.ts.map +1 -0
  238. package/dist/manipulator-view.js +552 -0
  239. package/dist/manipulator-view.js.map +1 -0
  240. package/dist/manipulator.d.ts +214 -0
  241. package/dist/manipulator.d.ts.map +1 -0
  242. package/dist/manipulator.js +423 -0
  243. package/dist/manipulator.js.map +1 -0
  244. package/dist/mersenne-twister.d.ts +32 -2
  245. package/dist/mersenne-twister.d.ts.map +1 -1
  246. package/dist/mersenne-twister.js +56 -2
  247. package/dist/mersenne-twister.js.map +1 -1
  248. package/dist/model-transform.d.ts +34 -0
  249. package/dist/model-transform.d.ts.map +1 -1
  250. package/dist/model-transform.js +46 -0
  251. package/dist/model-transform.js.map +1 -1
  252. package/dist/panel-layer.d.ts +34 -0
  253. package/dist/panel-layer.d.ts.map +1 -0
  254. package/dist/panel-layer.js +154 -0
  255. package/dist/panel-layer.js.map +1 -0
  256. package/dist/panel-orbit.d.ts +156 -0
  257. package/dist/panel-orbit.d.ts.map +1 -0
  258. package/dist/panel-orbit.js +289 -0
  259. package/dist/panel-orbit.js.map +1 -0
  260. package/dist/perf-probe.d.ts +6 -0
  261. package/dist/perf-probe.d.ts.map +1 -1
  262. package/dist/perf-probe.js +3 -0
  263. package/dist/perf-probe.js.map +1 -1
  264. package/dist/picker.d.ts +40 -0
  265. package/dist/picker.d.ts.map +1 -0
  266. package/dist/picker.js +385 -0
  267. package/dist/picker.js.map +1 -0
  268. package/dist/playground.d.ts +18 -0
  269. package/dist/playground.d.ts.map +1 -0
  270. package/dist/playground.js +525 -0
  271. package/dist/playground.js.map +1 -0
  272. package/dist/png.d.ts +12 -0
  273. package/dist/png.d.ts.map +1 -0
  274. package/dist/png.js +105 -0
  275. package/dist/png.js.map +1 -0
  276. package/dist/popup-surface.d.ts +13 -0
  277. package/dist/popup-surface.d.ts.map +1 -1
  278. package/dist/popup-surface.js +4 -1
  279. package/dist/popup-surface.js.map +1 -1
  280. package/dist/rocket-ascent.d.ts +20 -0
  281. package/dist/rocket-ascent.d.ts.map +1 -0
  282. package/dist/rocket-ascent.js +410 -0
  283. package/dist/rocket-ascent.js.map +1 -0
  284. package/dist/scene-schemas.d.ts.map +1 -1
  285. package/dist/scene-schemas.js +216 -29
  286. package/dist/scene-schemas.js.map +1 -1
  287. package/dist/skybox-baker.d.ts +213 -0
  288. package/dist/skybox-baker.d.ts.map +1 -0
  289. package/dist/skybox-baker.js +540 -0
  290. package/dist/skybox-baker.js.map +1 -0
  291. package/dist/starfield-codec.d.ts +162 -0
  292. package/dist/starfield-codec.d.ts.map +1 -0
  293. package/dist/starfield-codec.js +554 -0
  294. package/dist/starfield-codec.js.map +1 -0
  295. package/dist/surface.d.ts.map +1 -1
  296. package/dist/surface.js +6 -2
  297. package/dist/surface.js.map +1 -1
  298. package/dist/surroundings-probe.d.ts +69 -0
  299. package/dist/surroundings-probe.d.ts.map +1 -0
  300. package/dist/surroundings-probe.js +164 -0
  301. package/dist/surroundings-probe.js.map +1 -0
  302. package/dist/surroundings.d.ts +162 -0
  303. package/dist/surroundings.d.ts.map +1 -0
  304. package/dist/surroundings.js +508 -0
  305. package/dist/surroundings.js.map +1 -0
  306. package/dist/svg-icons.d.ts.map +1 -1
  307. package/dist/svg-icons.js +34 -3
  308. package/dist/svg-icons.js.map +1 -1
  309. package/dist/terrain-editor.d.ts +20 -0
  310. package/dist/terrain-editor.d.ts.map +1 -0
  311. package/dist/terrain-editor.js +295 -0
  312. package/dist/terrain-editor.js.map +1 -0
  313. package/dist/terrain-grid.d.ts +30 -0
  314. package/dist/terrain-grid.d.ts.map +1 -1
  315. package/dist/terrain-grid.js +33 -0
  316. package/dist/terrain-grid.js.map +1 -1
  317. package/dist/text-entry.d.ts +9 -0
  318. package/dist/text-entry.d.ts.map +1 -0
  319. package/dist/text-entry.js +105 -0
  320. package/dist/text-entry.js.map +1 -0
  321. package/dist/tosi-b3d.d.ts +177 -0
  322. package/dist/tosi-b3d.d.ts.map +1 -1
  323. package/dist/tosi-b3d.js +781 -48
  324. package/dist/tosi-b3d.js.map +1 -1
  325. package/dist/vector-field.d.ts +2 -10
  326. package/dist/vector-field.d.ts.map +1 -1
  327. package/dist/vector-field.js +19 -19
  328. package/dist/vector-field.js.map +1 -1
  329. package/dist/vertex-animation.d.ts +126 -0
  330. package/dist/vertex-animation.d.ts.map +1 -0
  331. package/dist/vertex-animation.js +215 -0
  332. package/dist/vertex-animation.js.map +1 -0
  333. package/dist/virtual-gamepad.d.ts +5 -1
  334. package/dist/virtual-gamepad.d.ts.map +1 -1
  335. package/dist/virtual-gamepad.js +64 -9
  336. package/dist/virtual-gamepad.js.map +1 -1
  337. package/dist/weapon-fit.d.ts +2 -0
  338. package/dist/weapon-fit.d.ts.map +1 -0
  339. package/dist/weapon-fit.js +212 -0
  340. package/dist/weapon-fit.js.map +1 -0
  341. package/dist/widget-box.d.ts.map +1 -1
  342. package/dist/widget-box.js +5 -1
  343. package/dist/widget-box.js.map +1 -1
  344. package/dist/widgets3d-layout.d.ts +42 -1
  345. package/dist/widgets3d-layout.d.ts.map +1 -1
  346. package/dist/widgets3d-layout.js +74 -3
  347. package/dist/widgets3d-layout.js.map +1 -1
  348. package/dist/widgets3d.d.ts +94 -0
  349. package/dist/widgets3d.d.ts.map +1 -1
  350. package/dist/widgets3d.js +741 -101
  351. package/dist/widgets3d.js.map +1 -1
  352. package/dist/wind.d.ts +90 -0
  353. package/dist/wind.d.ts.map +1 -0
  354. package/dist/wind.js +263 -0
  355. package/dist/wind.js.map +1 -0
  356. package/dist/world-sim.d.ts +2 -0
  357. package/dist/world-sim.d.ts.map +1 -0
  358. package/dist/world-sim.js +197 -0
  359. package/dist/world-sim.js.map +1 -0
  360. package/package.json +6 -1
  361. package/static/attributes.json +4557 -0
  362. package/static/attributes.txt +1209 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,471 @@ 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.8.2
10
+
11
+ ### Added
12
+
13
+ - **The encoded sky** — `starfield-codec` + `skybox-baker`. A starfield is data,
14
+ not a picture: six small RGBA faces carry sub-texel position, gamma brightness
15
+ and a spectral A-byte, decoded in the sky shader into points that stay points
16
+ at any zoom. The shipped pair (256 smooth + 1024 data) renders a 100k-star
17
+ galaxy at 25 MiB of VRAM and 0.4 MB on disk, against the 2.3 MB / 96 MiB
18
+ raster it replaces. The A-byte spends precision where the eye is: faint stars
19
+ are warm yellow, bright stars carry a 224-step spectral ramp, galaxy discs
20
+ their size.
21
+ - **`png.ts`** — a lossless PNG encoder — and with it the package's first
22
+ runtime dependency: **`fflate` (`^0.8.3`)** supplies the deflate, because
23
+ Chrome's `CompressionStream` output is rejected by Chrome's own PNG decoder
24
+ and the packed fields must survive byte-exact. The packed fields must survive
25
+ byte-exact, and both the canvas path (premultiplied backing store) and
26
+ Chrome's `CompressionStream` deflate destroy them; the encoder writes the
27
+ bytes directly and a test round-trips through real inflate.
28
+ - **Distant dim stars** (`distantStars`, default 3000) — isotropic points
29
+ outside the disc, so the off-band sky has texture instead of blankness.
30
+ - **`b3d-cloud-deck`** — the cloud DECK: a tiled field shader with one
31
+ coverage dial driving transmission, gloom and depth; orographic clouds that
32
+ ask the terrain for its own height sampler; a shared cloud shadow.
33
+ - **The `world-sim` page** — the kitchen sink: live-dialed terrain (sea level
34
+ as a fraction of v-size), weather, and the encoded sky, under Demos.
35
+ - **`spectralGlsl`/`spectralRamp`/`spectralValue`** and the `generatePlanets`
36
+ galaxy option — the colour follows the class, and planets (71% of galaxy
37
+ generation time) are computed on demand via `generateStarSystem`.
38
+
39
+ ### Changed
40
+
41
+ - **Galaxy generation is ~70× faster** — names derive from each star's own
42
+ seed via a cheap PRNG (no collision retries, no name table), planets are
43
+ on-demand, and the core nebulae are a fixed budget rather than a fraction.
44
+ - **The sky is one rigid frame** — the dome's rotation carries the gradient,
45
+ the sun, the moon and the stars together; the star fade dies by gamma at the
46
+ first hint of daylight, and the golden hour has two stops (amber, then a
47
+ pink-red at the horizon crossing) feeding the deck's fringe and the fog
48
+ through the light's colour.
49
+ - **The baker downloads ONE zip** — twelve separate downloads got silently
50
+ dropped by the browser mid-burst.
51
+
52
+ ### Fixed
53
+
54
+ - The biome classifier's sea level and lapse rate are LIVE dials — they
55
+ move the snow line without re-cutting the tile pool (the shader reads the
56
+ plugin params every bind; the old spelling regenerated the world for a
57
+ value the shader never saw).
58
+ - The cloud-deck shadow survived field re-bakes (the shadow's sampler was
59
+ left pointing at a disposed texture).
60
+ - The cloud-deck's core glow no longer blows out at high star counts.
61
+ - The sky shader compiles under the strictest decoders — floats in the
62
+ generated GLSL now LOOK like floats.
63
+
64
+ ## 0.8.1
65
+
66
+ ### ⚠️ Breaking
67
+
68
+ Nothing breaks at compile time. Two behaviours change, and
69
+ [Migration.md](./Migration.md) has the before/after for each.
70
+
71
+ - **Aircraft guns are direct-hit, not area-effect.** `gun-mode="blast"`
72
+ restores the old behaviour; `gunBlastRadius`/`gunFullRadius` are attributes
73
+ now rather than hardcoded.
74
+ - **`activationVeto` takes an optional second parameter.** Existing callers
75
+ compile unchanged, and a veto that ignores its argument behaves identically.
76
+ When the info is omitted a reach veto now **refuses** rather than passing —
77
+ see Migration.md for why that direction, and how to say otherwise.
78
+ - **`select3d` no longer draws ‹ › stepper arrows.** The popup it always had is
79
+ now the only way in, and is discoverable.
80
+
81
+ ### Changed
82
+
83
+ - **Aircraft guns damage what they pass through, instead of firing an area
84
+ effect** (#23). Blast damage resolves by distance to a destroyable's
85
+ registered point — ONE point, at the model's origin — so scaling a fighter 4×
86
+ puts its wing outside a 1.5 m blast and point-blank fire does nothing, with
87
+ no error. Direct-hit damage has no length scale in it and is immune to that
88
+ whole class. `gunMode="blast"` restores the previous behaviour, and
89
+ `gunFullRadius`/`gunBlastRadius` are attributes now rather than hardcoded.
90
+ - **A disposed mesh now takes its own materials and textures with it.**
91
+ `mesh.dispose()` leaves them behind, so every scene child that built one
92
+ leaked it on every teardown — including every RE-PARENT, since a move
93
+ disconnects the child while the scene deliberately survives. Measured:
94
+ re-parenting one scene six times took materials 3 → 15 and textures 3 → 21,
95
+ unbounded, meshes correctly flat. `disposeMeshTree` CHECKS before disposing —
96
+ a glTF file shares one material across many meshes and a disposed material
97
+ still answers `isReady()`, so a wrong sharing rule turns siblings black
98
+ silently. Textures held by the scene environment, a render target or a
99
+ light's gel are exempt, because nothing references those from a material.
100
+ - **A blast finds every destroyable, not every `<tosi-b3d-destroyable>`.**
101
+ `detonateWarhead` queried one tag name, so `b3d-loader` models — which attach
102
+ the same behaviour — were invisible to every explosion in the scene. The
103
+ registry now lives on `DestroyableBehavior`, so anything attaching one is a
104
+ target by construction.
105
+
106
+ ### Fixed
107
+
108
+ A second headset pass found the rest of these. Between the two, every one was
109
+ invisible to a green suite — and the ones on panels were all reproducible flat,
110
+ which is now written down rather than re-learned (CLAUDE.md, "A PANEL IS NOT A
111
+ HEADSET-ONLY SURFACE").
112
+
113
+ - **We were eating other people's keystrokes.** `KeyboardGamepad` listens on
114
+ `window` so you can steer without clicking the canvas first, and the on-screen
115
+ keyboard listens there so an in-scene field types with no DOM focus — the only
116
+ way that works in a headset. Both then `preventDefault` what they claim, with
117
+ no notion of where the event came from. `a` is a strafe key, so typing "lamp"
118
+ into a search box lost the character AND strafed the demo, on any page
119
+ carrying a scene. `isTextEntry(event)` is the one predicate all three
120
+ listeners consult. An input you PRESS is not typing — space on a checkbox
121
+ stays a press — and key RELEASE is deliberately unguarded, or a key pressed on
122
+ the canvas and released in a field would stay down forever.
123
+ - **A popup is a popup, not something its panel crops.** `select3d`'s menu and
124
+ `openMenu3d` went to the panel-bounded path, so a menu was squeezed into
125
+ whatever room was left under its own row. Only the keyboard called
126
+ `showLayer`, because someone knew it existed. `showPopup` now prefers a layer
127
+ and keeps the bounded path as its fallback, so the fix reaches every caller;
128
+ `boundedPopup` remains for a popup that must not escape. **Picking an option
129
+ dismisses it** — `closePopup()` is the panel's own tracking and knows nothing
130
+ about layers, so a menu set the value and stayed standing.
131
+ - **An in-scene panel's popups open on their own plane.** A panel rasterised
132
+ onto a plane is not in the document, so the DOM layer cannot auto-install and
133
+ every popup took the cropped path. `panelScene` had registered a scene layer
134
+ since the keyboard needed one; the `<tosi-b3d>` settings panel never did. The
135
+ placement maths is extracted to `panel-layer` rather than copied — a formula
136
+ at three sites, fixed at one, is a mistake this repo has already paid for.
137
+ - **A popup is drawn at its panel's scale.** It took `width * 0.95` whatever it
138
+ contained: right for a keyboard, grotesque for a 160-unit menu at twice the
139
+ text size of the thing that opened it. One viewBox unit is now the same
140
+ physical size on a panel and its popup.
141
+ - **A press aimed at a popup reaches the popup.** The XR panel's re-pick ignored
142
+ what the ray actually hit and forced a pick against itself, so a press on a
143
+ popup in FRONT of it was routed to the panel behind — close and move never saw
144
+ a thing. An occluder that is itself UI now wins.
145
+ - **No empty band above a flat popup.** 30px was reserved for the move/close
146
+ glyphs an in-scene popup draws; a DOM layer draws none. Reserved only when a
147
+ mounting host actually draws chrome.
148
+ - **The keyboard's × means "put it away".** It closed only the presentation you
149
+ pressed, leaving the other up and the field still believing it had a keyboard
150
+ open — and left the mode on, so the glyph stayed lit over nothing and the next
151
+ press flipped the preference instead of reopening. A takeover is still not a
152
+ dismissal: swapping layouts between fields must not darken the glyph.
153
+ - **`Migration.md`'s first block ran as a live example.** The doc system executes
154
+ `html` fences, which is the natural fence for illustrative markup. Now `xml`,
155
+ and `doc-examples.test.ts` — which scanned only `src/*.ts` — fails on any live
156
+ fence in a published markdown doc.
157
+
158
+ Five of these came from one headset pass on the terrain editor, which is the
159
+ argument for `RELEASING.md` step 5a in one paragraph: every one of them was
160
+ invisible to 2300 passing tests, and the first was invisible to a day of
161
+ reading the source.
162
+
163
+ - **A pinned panel header was clipped away — invisible, but still hittable.**
164
+ The header was appended inside the clipped body group, whose clip rect
165
+ necessarily starts below it, so it was clipped in full while its band stayed
166
+ reserved and the pointer router kept routing to it. Three symptoms, one cause:
167
+ the Exit VR / Re-seat / Pause buttons vanished, the panel grew a tall empty
168
+ band, and pressing where they _should_ be worked. ⚠️ It only bit a panel that
169
+ SCROLLS, because `clip-path` is only applied then — so every small panel in
170
+ the demos and tests was fine and the terrain editor was not.
171
+ - **An icon bar ran off the edge of its panel.** `layout()` ignored the width it
172
+ was handed. A scene's bar is Exit VR + Re-seat + Perf Stats + one per
173
+ registered debug source + the gadgets — ten items, 380px, in a 296px panel. It
174
+ wraps now, and the hit test reads `y` as well as `x`.
175
+ - **Noise `scale` sliders are LOGARITHMIC.** They are frequencies: on the old
176
+ linear 0.005–0.3 track the whole usable band was the first 15% and the default
177
+ sat at 3%, so every value you actually want was crushed against the left stop.
178
+ The schema has said `x-scale: 'log'` all along and `terrainEditor3d` honours
179
+ it — the hand-rolled demo panels did not, which is how it shipped.
180
+ - **A scrolling panel has a scroll RAIL.** Scrolling began on empty space, and a
181
+ panel full of controls has none, so in a headset there was no gesture that
182
+ scrolled it at all. The rail is also the only visible sign that there IS more
183
+ below — a texture on a plane has no scrollbar, no overflow shadow and no
184
+ momentum. Rows are measured twice so it never overlaps a control.
185
+ - **A slider keeps a usable track however narrow its row.** The label took a
186
+ flat 45% and the readout took whatever it needed, leaving a 53px track at
187
+ 282px wide with a unit in the format. The track reserves a minimum now and the
188
+ label yields, clipped so it cannot paint over the control it gave way to.
189
+
190
+ - **`operable` contradicted `useNearest` on the same door.** With no pointer on
191
+ it the getter knows no distance, so a reach veto blocks — while `useNearest`,
192
+ which measures the distance itself, opens that same door 1 m away. Nothing in
193
+ the behaviour knows where your actor is standing, so `operableFor(info)` is
194
+ the question to ask for a "press E" prompt; it runs the same veto pass as
195
+ `activate()`, so a check and the act cannot disagree.
196
+
197
+ - **A terrain attribute change no longer rebuilds the whole world every frame,
198
+ and a retained tile is the cell it claims to be.**
199
+ tosijs queues one render per animation frame and `slider3d` writes on every
200
+ pointer move, so an attribute-driven rebuild that cleared the tile pool and
201
+ refilled it unbounded cost a FULL rebuild per frame for as long as you dragged
202
+ — ~50 ms of noise alone at the high tier, ~6.3 ms at the quest tier inside a
203
+ 13.9 ms VR frame, before skirts, normals and the vertex uploads. It now marks
204
+ the pool stale and re-cuts under the ordinary `fillBudget`/`tileBuildMs` cap,
205
+ so the world morphs instead of blinking out. `regenerate()` keeps its
206
+ documented unbounded behaviour, and now adopts the generation key so "set the
207
+ attributes, then call `regenerate()`" stops paying for two rebuilds.
208
+
209
+ Retaining tiles rather than clearing them exposed a second thing: a tile's
210
+ key is `(level, gx, gz)` and says nothing about SIZE or PLACE, so after a
211
+ `tileSize`/`horizScale` change an old tile key-matched a desired cell that was
212
+ a different size somewhere else — and the world came out gapped and
213
+ wrong-scale while the streamer reported itself finished. A retained tile now
214
+ adopts the whole desired cell and marks itself stale when its geometry moved,
215
+ so the two rebuild paths agree about what the world is.
216
+
217
+ - **`disposeMeshTree` could dispose a texture a library model was still
218
+ drawing.** The material guard asks `scene.meshes` and was right; the texture
219
+ guard asked `scene.materials`, which cannot see a library-instantiated model's
220
+ materials — those belong to the `AssetContainer` while their meshes are in the
221
+ scene. A texture shared with a hand-made material was disposed under the
222
+ library model, which went black, silently. The in-use set is now derived from
223
+ the meshes that remain.
224
+ - **The attribute index lost three elements' documentation to one legend
225
+ table.** The generator rejects a table whose header names an identifier
226
+ (`touch-gamepad` maps `data-part` values to gamepad fields — its rows are
227
+ values, not attributes), but applied the rejection to the whole DOCUMENT on
228
+ the strength of the first table it found. `b3d-lamp` opens with a capability
229
+ matrix, so the point, spot and area lights all shipped bare attribute names
230
+ with no default and no prose. Each table is judged on its own header now.
231
+ - **`operable` and `debugState` contradicted what a pointer press actually
232
+ did.** Both were routed through the same helper as a scripted `activate()`,
233
+ which reports an unknown distance as `Infinity` so a reach veto fails closed.
234
+ That is right for an activation and wrong for an inspection: a hovered door
235
+ reported `operable: false` and `out-of-reach:blocks` at the moment a press
236
+ opened it. While the pointer is on it they now judge with the real hover, and
237
+ `debugState` prints the info it judged with — it is the only debug readout
238
+ that exists in a headset.
239
+ - **The attribute index ships inside the package.** `static/attributes.txt` and
240
+ `attributes.json` are in `files` now, so an agent already in a consumer
241
+ project reads `node_modules/tosijs-3d/static/attributes.txt` with no network
242
+ and no proxy. It was published to the doc site only, which is the one place
243
+ the actor it was built for cannot reach.
244
+
245
+ - **`b3d-destroyable` could not place a library piece properly** — three
246
+ reports from `tosijs-3d-ensemble` against one function, and one bug family:
247
+ the async load treated its callback as if nothing could change underneath it.
248
+ - **Rotation was dropped** (#48). Only x/y/z reached `instantiate`. It looks
249
+ like it should not matter, since `AbstractMesh.render()` syncs `rx/ry/rz` —
250
+ but that is a COMPONENT render, and it had already run by the time the
251
+ async callback assigned `this.mesh`. Position applied, rotation did not.
252
+ Now forwarded, and the transform is re-synced once the node exists.
253
+ - **No scale** (#47). `size` is the placeholder cube's edge length and does
254
+ nothing once `library` is set, so a placed model could not be resized at
255
+ all — ensemble measured a piece at 5.273 units for `scale` 1, 2 and 4
256
+ alike. New `scale` attribute, uniform, applied to the instance root.
257
+ - **A removed element orphaned its node permanently** (#49). Remove it inside
258
+ the load window and the disconnect handler found nothing to dispose, then
259
+ the pending callback built a node owned by no element — a ghost nothing
260
+ would ever move or free. Guarded with `loadGeneration`, the mechanism
261
+ `b3d-aircraft` already used; the retry poll stops on a stale generation too.
262
+ - **Two engines on one canvas are now impossible, and a lost context says so**
263
+ (#56). Building an engine over a live one disposed nothing and failed
264
+ silently — the first context's shader programs go invalid while every uniform
265
+ still reads back correctly, which is why it presented as four different bugs
266
+ (white meshes, dark sky, empty scene, half-loaded scene). It now disposes the
267
+ old engine and warns. Separately, `webglcontextlost` is reported to the
268
+ console and the debug ring instead of just rendering wrong.
269
+ - **The flat scene panel now closes on a background press**, like every other
270
+ transient overlay here. A press inside it, or on the gear, still does not —
271
+ the gear toggles, so closing first would make it look inert.
272
+ - **A still sky never found a late sun** (#55). `updateSky` writes
273
+ `sunPosition`, `rayleigh` and `turbidity` only when a sun element's light
274
+ exists, and the frame gate re-ran it only when `timeOfDay` moved — so
275
+ `realtimeScale: 0`, which is what a reproducible authored scene wants, ran it
276
+ once and came up dark about four loads in five. The default `realtimeScale:
277
+ 10` hid it, because a drifting clock reopens the gate until some pass catches
278
+ the sun. The retry is now gated on the OUTCOME rather than the clock, and
279
+ bounded so a scene with no sun does not retry forever.
280
+ - **A flat popup could open off-screen with no way back** (#57). The DOM layer
281
+ set `left`/`top` straight from the anchor with no bounds check, so a field in
282
+ a right-hand panel opened a keyboard 112px past the right edge — rightmost
283
+ column of keys unreachable, and unrecoverable, because the move/close chrome
284
+ is drawn by picking and picking exists only in the scene. It now places
285
+ through `placePopup`, the same pure flip/clamp the in-scene presentation
286
+ uses, **and the holder can be dragged** — which is the better fix, since only
287
+ the person typing knows what the popup is covering. A press that lands on a
288
+ widget still belongs to the widget, or you could never type.
289
+ - **`chaseDistance` / `chaseHeight` / `chaseMinHeight` / `hudSize` accepted a
290
+ write and did nothing** (#43). All four were consumed when the rig and HUD
291
+ plane were built and never read again, so a settings slider bound to any of
292
+ them read back correctly and moved nothing — ensemble measured bit-identical
293
+ framing across a 3× change. Worse than an ordinary no-op because
294
+ `chasePitchFollow` on the same element IS live, so the element looked
295
+ responsive and only some of it was. The chase geometry now comes from one
296
+ path used at build AND every frame; the HUD remounts when its geometry
297
+ changes, instead of latching on a boolean.
298
+ - **`select3d` looked like a cycler** (#37). It has opened a popup list all
299
+ along — nothing said so, so a consumer counted 23 taps to reach the 24th
300
+ option. It now draws a downward chevron, the whole control opens the list,
301
+ and the arrows are gone. Stepping survives only where a panel gives no host
302
+ and a menu is impossible.
303
+ - **An icon name colliding with `Object.prototype` threw** rather than falling
304
+ back — `iconGlyph('constructor')` and friends. 0.8.0 was the first release
305
+ where table DATA becomes an icon name, with no `catch` in the repaint path.
306
+ Fixed at all three unsafe sites, including `registerIcons`, where `__proto__`
307
+ was an assignment that would have corrupted the map rather than failing.
308
+ - **`spinner3d` leaked into a module-global ticker.** `Widget3d` gained
309
+ `dispose?()`, and `B3d` releases the widget set it replaces on each repaint.
310
+ Reaping by `el.isConnected` would have been wrong: an in-scene panel's SVG is
311
+ never attached, so a visible VR spinner would have been culled.
312
+ - Panels size to their content, the in-scene icon bar is pinned, and the theme
313
+ editor no longer follows you between demos (from the 0.8.0 headset pass).
314
+
315
+ ### Added
316
+
317
+ - **A spatial panel can be dragged, and the drag is aimed at where you POINT.**
318
+ `orbitFromAim` walks the controller ray to the sphere's radius and asks which
319
+ way that point lies from the anchor. Using the ray's DIRECTION instead treats
320
+ your hand as if it were at your eyes: the panel sat where the arithmetic said
321
+ rather than where you pointed, and hand wobble swung it by the whole
322
+ head-to-hand offset.
323
+
324
+ The seat lives on the element, so a structural refresh — pressing Pause, say —
325
+ no longer snaps the panel back to its default. A seat names an EDGE and the
326
+ pin BLENDS across the horizon: a hard switch moved the panel by its entire
327
+ height in one frame as you dragged through eye level. The grip is
328
+ `iconGlyph('move')`, the same mark a torn-off popup already uses.
329
+
330
+ - **A spatial panel can be dragged, on the sphere around its rig anchor.** Two
331
+ properties fall out rather than being built: the distance cannot drift (so it
332
+ can never be shoved into your face or out of reach) and the facing comes free.
333
+ `panel-orbit` is the pure half — no Babylon, no DOM — so the placement rule is
334
+ testable without a headset.
335
+
336
+ A drag past a limit **follows you and stiffens**, and letting go springs back:
337
+ a hard stop is the right resting behaviour and the wrong live one, because a
338
+ panel that simply stops following your hand reads as a dropped drag rather
339
+ than a limit. The band and the clamp deliberately disagree — the panel may
340
+ PASS a limit and may never come to REST past one, since out there its own Exit
341
+ VR and Re-seat buttons are hard to reach.
342
+
343
+ A seat names an EDGE, not a centre: below the equator it is bottom-relative
344
+ and above it top-relative, so a tall panel's extra height always grows back
345
+ toward eye level instead of trailing into the floor or pushing past the
346
+ ceiling it was just clamped to. The ceiling is 60°, which is the default seat
347
+ exactly, so the panel can only ever be dragged somewhere more comfortable than
348
+ where it started.
349
+
350
+ - **`budgetedReach(reach, tileSize)` and `MAX_TILES_ACROSS` are exported from
351
+ `tosijs-3d/terrain-grid`**, so a UI can clamp its own slider against the same
352
+ limit `<tosi-b3d-terrain>` enforces rather than guessing. `reach` × `tileSize`
353
+ is the footgun and neither looks dangerous alone: reach 5000 at tileSize 10 is
354
+ a million finest tiles, which is the slider that killed a tab (#66) and got
355
+ capped at "400 m" as a guess. Pure, no scene needed. The element's own
356
+ `_budgetedReach` is now a call to it, so they cannot drift.
357
+
358
+ - **A manipulator — translate, rotate and scale handles you can grab** (#38),
359
+ ported from `tosijs-3d-ensemble` where it was shaken out against real
360
+ authoring, including on a phone. Three files on the usual split:
361
+ `manipulator.ts` (pure — the five grip readings, snapping, the drag reducer),
362
+ `manipulator-view.ts` (the Babylon handles, with the two-pass pick and the
363
+ euler composition folded in so a consumer no longer writes either), and
364
+ `<tosi-b3d-manipulator>`. The flat pointer is wired; `grab`/`grabNear`/
365
+ `drag`/`release` take world rays so a controller or a hand drives the same
366
+ code. Note `move`/`turn` rather than `translate`/`rotate`: `translate` is a
367
+ real `HTMLElement` property and declaring it gives one word two owners.
368
+ - **`<tosi-b3d-beacon>`** — a clickable hull for anything with a position and
369
+ no geometry: a lamp, a positional sound, a spawn point (#70). Invisible via
370
+ `visibility = 0` rather than `isVisible = false`, which is the whole trick —
371
+ Babylon's default pick test is `isEnabled && isVisible && isPickable`, so the
372
+ obvious way to hide a hull makes it unpickable, and the failure returns
373
+ _whatever is behind it_ rather than nothing. `beaconOwner(mesh)` is the entire
374
+ reading-side API.
375
+ - **`angle3d` and `arc3d`** — dial a bearing, dial a firing arc (#71). An angle
376
+ on a linear track has ends where the quantity does not, so 359° and 1° sit at
377
+ opposite ends of the slider. `arc.ts` is the pure model, and an arc is a
378
+ CENTRE and a WIDTH rather than a start and an end — which makes "is this
379
+ bearing inside" and "does that arc contain this one" one line each, and makes
380
+ straddling north unrepresentable rather than special-cased. An envelope is
381
+ drawn, not merely clamped against, so a turret's restricted arc explains the
382
+ ship instead of silently snapping.
383
+ - **`picker3d`** — choosing one of five hundred (#37). A `table` for the
384
+ virtualized filterable list, an `inputField` for the query, a `select3d` for
385
+ the family: two levels without a tree, because a tree needs a pointer to
386
+ expand and two flat controls work from a D-pad. Filtering is AND across terms
387
+ over the whole name, so word order cannot matter.
388
+ - **`terrainEditor3d`** — a terrain editor built FROM `sceneSchemas.terrain()`
389
+ (#66), so a range cannot disagree with the element it edits. Curated, not
390
+ generated: most of the schema's thirty properties are performance internals,
391
+ and a panel showing all of them is a settings dump.
392
+ - **`FieldType: 'color'` and a swatch on `inputField`** (#72). Tolerant in,
393
+ canonical out — `#abc`, `red` and `rgb(255,128,0)` all commit as `#rrggbb`,
394
+ and a five-digit hex is valid WHILE TYPING and refused at commit rather than
395
+ silently accepted. The swatch holds the last good colour while the text does
396
+ not parse, so a half-typed value does not read as a lost one.
397
+ - **One wind for the scene** (#73) — `windSpeed`, `windBearingDeg`, `windGust`
398
+ on `<tosi-b3d>`, with `wind="scene|own"` on clouds, water and ambient.
399
+ Clouds, water and leaves each carried their own wind in three spellings and
400
+ could silently disagree. `wind.ts` is pure: Cartesian inside, degrees at the
401
+ edge, and that IS the composition rule — a valley funnelling, a lee
402
+ sheltering and a headland curling are all just contributions that add.
403
+ - **Combat attribution** (#8) — `Cause {by, kind, via, hops}` on `damaged` and
404
+ `destroyed`, threaded through chain links, `tick` and `deathBlast`, and
405
+ stored on the `Destroyable` so a reaction a frame later can still ask. `by`
406
+ is the ORIGINATOR however many hops back, because re-attributing each hop to
407
+ the thing next to it launders the credit away. Measured on the 48-drum
408
+ cascade: one hit, 48 kills, all credited, hop counts 1/3/5/7/9/11/6/6.
409
+ - **`b3d-aircraft` can be damaged and locked** (#23) — `destroyable="on"`
410
+ attaches the same behaviour `b3d-loader` uses, and `blip="on"` mounts a radar
411
+ blip, without which an enemy cannot be missile-locked and a player reports
412
+ that "missiles don't work".
413
+ - **A veto is told about the activation** (#36) — `blocks(info)` receives
414
+ `{actor, source, distance, …}`, so one door can answer differently for an NPC
415
+ holding the key and a player who is not, and can tell a hand within reach
416
+ from a ray across the room. A veto that ignores its argument is unaffected.
417
+ - **A configured terrain now draws itself** (#66). `<tosi-b3d-terrain>` built a
418
+ tile pool and filled it only when told, so a terrain with its attributes set
419
+ rendered nothing until someone called `regenerate()` — a silent failure that
420
+ every consumer worked around with their own bounded retry. Ordinary attribute
421
+ changes now regenerate on the next frame, like every other element. Keyed on
422
+ the GENERATION attributes only, so a `wireframe` toggle stays a material tweak,
423
+ and relying on tosijs's own render batching for bursts rather than
424
+ reimplementing it — five writes in a task are already one `render()`.
425
+ - **`b3d-turret` and `b3d-launcher` take a `library`** (#34), so a piece that
426
+ IS a turret no longer renders as a cylinder and a box. Which node aims is
427
+ declared by the MODEL — a `_barrel` suffix, resolved like `_centerOfGravity`
428
+ and the collider suffixes — because a rigger declares moving parts in Blender,
429
+ not in scene markup. `_muzzle` is separate and says where rounds leave: the
430
+ same node on a simple gun, a different one on a multi-barrel mount. A model
431
+ with neither still works — it yaws as a unit and the muzzle falls back to the
432
+ existing forward offset.
433
+ - **`b3d-spawner` can spawn at an authored PLACE**, not only on a ring around
434
+ the player (#40). `anchor="place"` plus `x`/`y`/`z` and `facingDeg` — a
435
+ carrier deck, a hangar door, a dungeon entrance. Mutually exclusive with the
436
+ distances by construction rather than by warning, and a placed spawn does not
437
+ consume the RNG, so adding a launchpad cannot shift the encounters in a scene
438
+ that promises "same seed, same battles".
439
+ - **`<tosi-b3d-prop>`** — a library model in the scene and nothing else (#68).
440
+ Every existing route to a library-backed mesh brought behaviour with it: a
441
+ plain prop had to be a `<tosi-b3d-destroyable>` carrying `capacity`, `armor`,
442
+ `explode` and a combat id for something nothing will ever shoot.
443
+
444
+ It matters more than a convenience element, because it is the difference
445
+ between the CDN's 5,108 models being reachable or not **from a page that
446
+ cannot run JavaScript**. Every model in those kit libraries sits at the origin
447
+ with no translation (the format is built for `clone()`), so a consumer with a
448
+ JS build reaches all of them and a consumer writing declarative HTML reached
449
+ none. `library-url` covers the one-model case without a separate
450
+ `<tosi-b3d-library>` and a `type` handshake, sharing one library element per
451
+ URL so ten props do not fetch the kit ten times.
452
+
453
+ - **Collision GROUPS** — `markCollisionGroup(mesh, 'water')` plus
454
+ `collidable(reject, { ignoreGroups: ['water'] })` (#44). The single
455
+ `b3dNoCollide` boolean answered "does anything hit this", which is one answer
456
+ for every asker — and a sea needs two, since _"the aircraft should not treat
457
+ water as ground"_ and _"shells should splash on water"_ were the same switch.
458
+ Groups move the answer to the ASKER: the mesh says what it is, each mover says
459
+ what it treats as solid, so one sea answers differently for a seaplane and a
460
+ submarine on the same frame. Additive, and composes with the existing UI
461
+ exclusion and reject hook rather than replacing either. `b3d-water` now tags
462
+ itself `'water'`.
463
+ - **`color3d` — a colour picker that exists in a headset**, and `color.ts`, the
464
+ pure model under it (parse/format, RGB↔HSV, `contrastInk`; no DOM, so a
465
+ consumer can validate a document's colours headlessly). This was the one
466
+ control the SVG UI did not have: the only two ways to pick a colour were
467
+ `<input type="color">` (which cannot express alpha) or a consumer injecting
468
+ one, and **neither exists in an immersive session** — so the theme editor, of
469
+ all things, had no colour control in the presentation this library is for.
470
+ - **Colour icons for scene concepts** — `sky`, `sun`, `water`, `terrain`,
471
+ `fog`, `mesh`, `decor` (#64). Unlike the stroked/filled sets these carry
472
+ literal colours and no `currentColor`, so they do not follow the theme.
473
+
9
474
  ## 0.8.0
10
475
 
11
476
  Lights, editors, and the schema surface `tosijs-3d-ensemble` asked for — plus
package/Migration.md CHANGED
@@ -9,6 +9,70 @@ 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.8.0 → 0.8.1
13
+
14
+ **Nothing breaks at compile time, and one behaviour changes.** The
15
+ `activationVeto` signature grew a second parameter and it is OPTIONAL — a
16
+ required one would have been a hard TypeScript break for every caller, and the
17
+ default is chosen so that a veto reading it gets a conservative answer rather
18
+ than a permissive one.
19
+
20
+ ### 1. Aircraft guns are direct-hit, not area-effect
21
+
22
+ **What changed.** `<tosi-b3d-aircraft>`'s cannon damages the thing its shell
23
+ passes through. It used to detonate a small AOE warhead at the impact point.
24
+
25
+ **Why.** Blast damage resolves by distance to a destroyable's registered point —
26
+ one point, at the model's origin. Scale a fighter up and its wing sits outside
27
+ the blast, so point-blank fire does nothing, silently. Direct-hit damage has no
28
+ length scale in it, so it cannot break that way. Reported by an adopter who hit
29
+ it by making their world four times larger (#23).
30
+
31
+ **If you relied on the old behaviour**, say so explicitly:
32
+
33
+ <!--
34
+ `xml`, NOT `html` — the doc system RUNS a ```html fence as a live example, and
35
+ this one is illustrative markup in a reference document with no scene to mount
36
+ into. `xml` highlights the same and stays inert. See `doc-examples.test.ts`,
37
+ which now fails on any live-language fence in a published markdown file.
38
+ -->
39
+
40
+ ```xml
41
+ <tosi-b3d-aircraft
42
+ gun-mode="blast"
43
+ gun-blast-radius="1.5"
44
+ gun-full-radius="0.5"
45
+ ></tosi-b3d-aircraft>
46
+ ```
47
+
48
+ Both radii are attributes now; they used to be hardcoded. Missiles and bombs are
49
+ unchanged — AOE is right for those.
50
+
51
+ ### 2. `activationVeto`'s second parameter (optional)
52
+
53
+ `blocks(info)` now receives a description of the activation — who, how, how far.
54
+ A veto that ignores its argument is unaffected, which is every veto written
55
+ before this existed:
56
+
57
+ ```javascript
58
+ use.vetoes.push({ name: 'locked', blocks: () => !hasKey }) // unchanged
59
+ ```
60
+
61
+ Calling `activationVeto(vetoes)` directly still compiles. When you omit the
62
+ info, vetoes are told `distance: Infinity` — "we do not know that you are near"
63
+ — so a **reach veto refuses** rather than waving the activation through. If you
64
+ call it yourself and want a reach veto to pass, supply the distance:
65
+
66
+ ```javascript
67
+ activationVeto(vetoes, { source: 'near', distance: 0.4 })
68
+ ```
69
+
70
+ ### 3. `select3d` no longer draws ‹ › stepper arrows
71
+
72
+ Tapping the control opens a popup list, which it already did — the arrows were
73
+ a second way to do the same thing and made the popup undiscoverable. Nothing to
74
+ change; the control is the same size and the same tap.
75
+
12
76
  ## 0.7.8 → 0.8.0
13
77
 
14
78
  **Nothing breaks at runtime.** Both items below keep working in 0.8.x; one is an
package/README.md CHANGED
@@ -6,13 +6,66 @@
6
6
  <img style="width: 280px; height: 280px;" alt="tosijs-3d logo" src="https://3d.tosijs.net/favicon.svg">
7
7
  </div>
8
8
 
9
+ **tosijs-3d is a library for building 3D web apps** — and standalone apps, if
10
+ that is what you want. Under the hood it uses Babylon.js for rendering, glTF/GLB
11
+ for models and the usual bitmap formats for textures — but it also leans on
12
+ **SVG**, for textures and for the entire user interface.
13
+
14
+ Free and open source, and light for what it is (Babylon is not small; this
15
+ adds little to it). Scenes are composed from **web components**, so a world is
16
+ markup you can read:
17
+
18
+ ```javascript
19
+ b3d(
20
+ b3dSun({ shadowCascading: true }),
21
+ b3dSkybox({ timeOfDay: 6 }),
22
+ b3dLoader({ url: './scene.glb' }),
23
+ b3dWater({ y: -0.2 })
24
+ )
25
+ ```
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.
29
+
30
+ ## Four things you may not have seen in a 3D library
31
+
32
+ **Flat 3D and VR are the same app.** You can enter and leave an immersive
33
+ session without the simulation resetting — the scene, the physics and your
34
+ place in the world all survive the transition, because nothing is torn down to
35
+ make it.
36
+
37
+ **One user interface, in three places.** The SVG-powered widget set renders
38
+ identically as a DOM overlay, on a plane inside a 3D scene, and in VR. Not three
39
+ implementations that drift — one, with three presentations, where any divergence
40
+ is treated as a bug.
41
+
42
+ **One control system, every input.** Keyboard and mouse, gamepads, VR
43
+ controllers and touch all arrive as the same `ControlInput`. You write the
44
+ behaviour once; supporting a new device is a new provider, not a rewrite.
45
+
46
+ **The simulation is testable without a GPU.** The flight model, the combat
47
+ maths, the world state and the layout engine are deliberately Babylon-free,
48
+ deterministic, and unit-tested — so the interesting logic can be exercised in
49
+ milliseconds rather than in a browser.
50
+
51
+ ## Finding things
52
+
53
+ **Search the [attribute index](https://3d.tosijs.net/attributes.txt)** before
54
+ assuming a capability does not exist — one greppable line per attribute,
55
+ generated from source on every build. There is a [JSON
56
+ form](https://3d.tosijs.net/attributes.json) for tools, and both ship **inside
57
+ the package**, so an agent already in a consumer project reads
58
+ `node_modules/tosijs-3d/static/attributes.txt` with no network.
59
+
60
+ It exists because the recurring adopter failure is not a missing feature, it is
61
+ a feature that ships, is documented, and cannot be found: three issues in one
62
+ week turned out to be capability that was already there. One `grep water` finds
63
+ `submersible`; reading 147 doc pages does not.
64
+
9
65
  **Upgrading?** See [Migration.md](./Migration.md) for the breaking changes and
10
66
  what to do about them, and [CHANGELOG.md](./CHANGELOG.md) for the full detail.
11
67
  Both ship inside the package, so they work from `node_modules` too.
12
68
 
13
- Declarative 3D/XR framework built on Babylon.js and tosijs. Compose 3D scenes with web components.
14
- See the [b3d](?tosi-b3d.ts) page for a live interactive demo.
15
-
16
69
  ```javascript
17
70
  import {
18
71
  b3d,