tosijs-3d 0.7.7 → 0.8.0

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 (397) hide show
  1. package/CHANGELOG.md +266 -0
  2. package/Migration.md +48 -0
  3. package/dist/ambient-budget.d.ts +1 -1
  4. package/dist/ambient-budget.d.ts.map +1 -1
  5. package/dist/b3d-aircraft.d.ts +5 -5
  6. package/dist/b3d-aircraft.d.ts.map +1 -1
  7. package/dist/b3d-aircraft.js +23 -9
  8. package/dist/b3d-aircraft.js.map +1 -1
  9. package/dist/b3d-ambient.d.ts +4 -4
  10. package/dist/b3d-ambient.d.ts.map +1 -1
  11. package/dist/b3d-ambient.js +4 -4
  12. package/dist/b3d-ambient.js.map +1 -1
  13. package/dist/b3d-biped.d.ts +5 -5
  14. package/dist/b3d-biped.d.ts.map +1 -1
  15. package/dist/b3d-biped.js +8 -8
  16. package/dist/b3d-biped.js.map +1 -1
  17. package/dist/b3d-black-hole.d.ts +2 -2
  18. package/dist/b3d-black-hole.d.ts.map +1 -1
  19. package/dist/b3d-black-hole.js +1 -1
  20. package/dist/b3d-black-hole.js.map +1 -1
  21. package/dist/b3d-button.d.ts +2 -2
  22. package/dist/b3d-button.d.ts.map +1 -1
  23. package/dist/b3d-button.js +1 -1
  24. package/dist/b3d-button.js.map +1 -1
  25. package/dist/b3d-car.d.ts +4 -4
  26. package/dist/b3d-car.d.ts.map +1 -1
  27. package/dist/b3d-car.js +2 -2
  28. package/dist/b3d-car.js.map +1 -1
  29. package/dist/b3d-clouds.d.ts +2 -2
  30. package/dist/b3d-clouds.d.ts.map +1 -1
  31. package/dist/b3d-clouds.js +4 -4
  32. package/dist/b3d-clouds.js.map +1 -1
  33. package/dist/b3d-collisions.d.ts +2 -2
  34. package/dist/b3d-collisions.d.ts.map +1 -1
  35. package/dist/b3d-collisions.js +2 -2
  36. package/dist/b3d-collisions.js.map +1 -1
  37. package/dist/b3d-controllable.d.ts +4 -4
  38. package/dist/b3d-controllable.d.ts.map +1 -1
  39. package/dist/b3d-controllable.js +2 -2
  40. package/dist/b3d-controllable.js.map +1 -1
  41. package/dist/b3d-controller.d.ts +4 -4
  42. package/dist/b3d-controller.d.ts.map +1 -1
  43. package/dist/b3d-controller.js +4 -4
  44. package/dist/b3d-controller.js.map +1 -1
  45. package/dist/b3d-death.d.ts +5 -5
  46. package/dist/b3d-death.d.ts.map +1 -1
  47. package/dist/b3d-death.js +11 -10
  48. package/dist/b3d-death.js.map +1 -1
  49. package/dist/b3d-destroyable.d.ts +4 -4
  50. package/dist/b3d-destroyable.d.ts.map +1 -1
  51. package/dist/b3d-destroyable.js +4 -4
  52. package/dist/b3d-destroyable.js.map +1 -1
  53. package/dist/b3d-exploder.js +2 -2
  54. package/dist/b3d-exploder.js.map +1 -1
  55. package/dist/b3d-fog.d.ts +2 -2
  56. package/dist/b3d-fog.d.ts.map +1 -1
  57. package/dist/b3d-fog.js +1 -1
  58. package/dist/b3d-fog.js.map +1 -1
  59. package/dist/b3d-galaxy.d.ts +3 -3
  60. package/dist/b3d-galaxy.d.ts.map +1 -1
  61. package/dist/b3d-galaxy.js +3 -3
  62. package/dist/b3d-galaxy.js.map +1 -1
  63. package/dist/b3d-hud.d.ts +3 -3
  64. package/dist/b3d-hud.d.ts.map +1 -1
  65. package/dist/b3d-hud.js +5 -5
  66. package/dist/b3d-hud.js.map +1 -1
  67. package/dist/b3d-input-focus.d.ts +4 -4
  68. package/dist/b3d-input-focus.d.ts.map +1 -1
  69. package/dist/b3d-input-focus.js +4 -4
  70. package/dist/b3d-input-focus.js.map +1 -1
  71. package/dist/b3d-interactive.d.ts +4 -4
  72. package/dist/b3d-interactive.d.ts.map +1 -1
  73. package/dist/b3d-interactive.js +2 -2
  74. package/dist/b3d-interactive.js.map +1 -1
  75. package/dist/b3d-lamp.d.ts +321 -0
  76. package/dist/b3d-lamp.d.ts.map +1 -0
  77. package/dist/b3d-lamp.js +1047 -0
  78. package/dist/b3d-lamp.js.map +1 -0
  79. package/dist/b3d-launcher.d.ts +5 -5
  80. package/dist/b3d-launcher.d.ts.map +1 -1
  81. package/dist/b3d-launcher.js +6 -6
  82. package/dist/b3d-launcher.js.map +1 -1
  83. package/dist/b3d-library.d.ts +3 -3
  84. package/dist/b3d-library.d.ts.map +1 -1
  85. package/dist/b3d-library.js +5 -5
  86. package/dist/b3d-library.js.map +1 -1
  87. package/dist/b3d-light.d.ts +2 -2
  88. package/dist/b3d-light.d.ts.map +1 -1
  89. package/dist/b3d-light.js +1 -1
  90. package/dist/b3d-light.js.map +1 -1
  91. package/dist/b3d-loader.d.ts +3 -3
  92. package/dist/b3d-loader.d.ts.map +1 -1
  93. package/dist/b3d-loader.js +2 -2
  94. package/dist/b3d-loader.js.map +1 -1
  95. package/dist/b3d-panel.d.ts +1 -1
  96. package/dist/b3d-panel.d.ts.map +1 -1
  97. package/dist/b3d-particles.d.ts +2 -2
  98. package/dist/b3d-particles.d.ts.map +1 -1
  99. package/dist/b3d-particles.js +1 -1
  100. package/dist/b3d-particles.js.map +1 -1
  101. package/dist/b3d-physics.d.ts +3 -3
  102. package/dist/b3d-physics.d.ts.map +1 -1
  103. package/dist/b3d-physics.js +5 -5
  104. package/dist/b3d-physics.js.map +1 -1
  105. package/dist/b3d-planet.d.ts +4 -4
  106. package/dist/b3d-planet.d.ts.map +1 -1
  107. package/dist/b3d-planet.js +5 -5
  108. package/dist/b3d-planet.js.map +1 -1
  109. package/dist/b3d-primitives.d.ts +2 -2
  110. package/dist/b3d-primitives.d.ts.map +1 -1
  111. package/dist/b3d-primitives.js +1 -1
  112. package/dist/b3d-primitives.js.map +1 -1
  113. package/dist/b3d-probe.d.ts +1 -1
  114. package/dist/b3d-probe.d.ts.map +1 -1
  115. package/dist/b3d-probe.js +3 -3
  116. package/dist/b3d-probe.js.map +1 -1
  117. package/dist/b3d-quality.d.ts +1 -1
  118. package/dist/b3d-quality.d.ts.map +1 -1
  119. package/dist/b3d-quality.js +1 -1
  120. package/dist/b3d-quality.js.map +1 -1
  121. package/dist/b3d-radar-blip.d.ts +2 -2
  122. package/dist/b3d-radar-blip.d.ts.map +1 -1
  123. package/dist/b3d-radar-blip.js +1 -1
  124. package/dist/b3d-radar-blip.js.map +1 -1
  125. package/dist/b3d-radar.d.ts +3 -3
  126. package/dist/b3d-radar.d.ts.map +1 -1
  127. package/dist/b3d-radar.js +2 -2
  128. package/dist/b3d-radar.js.map +1 -1
  129. package/dist/b3d-reflections.d.ts +2 -2
  130. package/dist/b3d-reflections.d.ts.map +1 -1
  131. package/dist/b3d-reflections.js +3 -3
  132. package/dist/b3d-reflections.js.map +1 -1
  133. package/dist/b3d-shadows.d.ts +2 -2
  134. package/dist/b3d-shadows.d.ts.map +1 -1
  135. package/dist/b3d-shadows.js +2 -2
  136. package/dist/b3d-shadows.js.map +1 -1
  137. package/dist/b3d-skybox.d.ts +2 -2
  138. package/dist/b3d-skybox.d.ts.map +1 -1
  139. package/dist/b3d-skybox.js +1 -1
  140. package/dist/b3d-skybox.js.map +1 -1
  141. package/dist/b3d-sound.d.ts +2 -2
  142. package/dist/b3d-sound.d.ts.map +1 -1
  143. package/dist/b3d-sound.js +3 -3
  144. package/dist/b3d-sound.js.map +1 -1
  145. package/dist/b3d-spawner.d.ts +3 -3
  146. package/dist/b3d-spawner.d.ts.map +1 -1
  147. package/dist/b3d-spawner.js +3 -3
  148. package/dist/b3d-spawner.js.map +1 -1
  149. package/dist/b3d-star-system.d.ts +3 -3
  150. package/dist/b3d-star-system.d.ts.map +1 -1
  151. package/dist/b3d-star-system.js +3 -3
  152. package/dist/b3d-star-system.js.map +1 -1
  153. package/dist/b3d-star.d.ts +2 -2
  154. package/dist/b3d-star.d.ts.map +1 -1
  155. package/dist/b3d-star.js +2 -2
  156. package/dist/b3d-star.js.map +1 -1
  157. package/dist/b3d-svg-plane.d.ts +3 -3
  158. package/dist/b3d-svg-plane.d.ts.map +1 -1
  159. package/dist/b3d-svg-plane.js +4 -4
  160. package/dist/b3d-svg-plane.js.map +1 -1
  161. package/dist/b3d-terrain.d.ts +4 -4
  162. package/dist/b3d-terrain.d.ts.map +1 -1
  163. package/dist/b3d-terrain.js +11 -11
  164. package/dist/b3d-terrain.js.map +1 -1
  165. package/dist/b3d-trigger.d.ts +6 -2
  166. package/dist/b3d-trigger.d.ts.map +1 -1
  167. package/dist/b3d-trigger.js +28 -4
  168. package/dist/b3d-trigger.js.map +1 -1
  169. package/dist/b3d-turret.d.ts +4 -4
  170. package/dist/b3d-turret.d.ts.map +1 -1
  171. package/dist/b3d-turret.js +4 -4
  172. package/dist/b3d-turret.js.map +1 -1
  173. package/dist/b3d-utils.d.ts +1 -1
  174. package/dist/b3d-utils.d.ts.map +1 -1
  175. package/dist/b3d-warhead.d.ts +3 -3
  176. package/dist/b3d-warhead.d.ts.map +1 -1
  177. package/dist/b3d-warhead.js +2 -2
  178. package/dist/b3d-warhead.js.map +1 -1
  179. package/dist/b3d-water.d.ts +2 -2
  180. package/dist/b3d-water.d.ts.map +1 -1
  181. package/dist/b3d-water.js +4 -4
  182. package/dist/b3d-water.js.map +1 -1
  183. package/dist/biome-chart.js +3 -3
  184. package/dist/box.d.ts +6 -2
  185. package/dist/box.d.ts.map +1 -1
  186. package/dist/box.js +19 -10
  187. package/dist/box.js.map +1 -1
  188. package/dist/carve.d.ts +1 -1
  189. package/dist/carve.d.ts.map +1 -1
  190. package/dist/carve.js +1 -1
  191. package/dist/carve.js.map +1 -1
  192. package/dist/curve-field.d.ts +89 -3
  193. package/dist/curve-field.d.ts.map +1 -1
  194. package/dist/curve-field.js +331 -60
  195. package/dist/curve-field.js.map +1 -1
  196. package/dist/curve-program.d.ts +41 -0
  197. package/dist/curve-program.d.ts.map +1 -0
  198. package/dist/curve-program.js +390 -0
  199. package/dist/curve-program.js.map +1 -0
  200. package/dist/curve.d.ts +102 -1
  201. package/dist/curve.d.ts.map +1 -1
  202. package/dist/curve.js +238 -1
  203. package/dist/curve.js.map +1 -1
  204. package/dist/demo-utils.d.ts +4 -4
  205. package/dist/demo-utils.d.ts.map +1 -1
  206. package/dist/demo-utils.js +1 -1
  207. package/dist/demo-utils.js.map +1 -1
  208. package/dist/destroyable-behavior.d.ts +2 -2
  209. package/dist/destroyable-behavior.d.ts.map +1 -1
  210. package/dist/destroyable-behavior.js +2 -2
  211. package/dist/destroyable-behavior.js.map +1 -1
  212. package/dist/destroyable.d.ts +1 -1
  213. package/dist/destroyable.d.ts.map +1 -1
  214. package/dist/destroyable.js +1 -1
  215. package/dist/destroyable.js.map +1 -1
  216. package/dist/footprint-field.d.ts +7 -2
  217. package/dist/footprint-field.d.ts.map +1 -1
  218. package/dist/footprint-field.js +8 -4
  219. package/dist/footprint-field.js.map +1 -1
  220. package/dist/frame-panel.d.ts +1 -1
  221. package/dist/frame-panel.d.ts.map +1 -1
  222. package/dist/frame-panel.js +4 -4
  223. package/dist/frame-panel.js.map +1 -1
  224. package/dist/galaxy-data.d.ts +1 -1
  225. package/dist/galaxy-data.d.ts.map +1 -1
  226. package/dist/galaxy-data.js +1 -1
  227. package/dist/galaxy-data.js.map +1 -1
  228. package/dist/game-controller.d.ts +3 -3
  229. package/dist/game-controller.d.ts.map +1 -1
  230. package/dist/game-controller.js +2 -2
  231. package/dist/game-controller.js.map +1 -1
  232. package/dist/gamepad-focus.d.ts +1 -1
  233. package/dist/gamepad-focus.d.ts.map +1 -1
  234. package/dist/glass-gamepad.d.ts +1 -1
  235. package/dist/glass-gamepad.d.ts.map +1 -1
  236. package/dist/glass-gamepad.js +3 -3
  237. package/dist/glass-gamepad.js.map +1 -1
  238. package/dist/gradient-editor.d.ts +1 -1
  239. package/dist/gradient-editor.d.ts.map +1 -1
  240. package/dist/gradient-editor.js +1 -1
  241. package/dist/gradient-editor.js.map +1 -1
  242. package/dist/handler-of.d.ts +14 -0
  243. package/dist/handler-of.d.ts.map +1 -0
  244. package/dist/handler-of.js +65 -0
  245. package/dist/handler-of.js.map +1 -0
  246. package/dist/hardware-gamepad.d.ts +1 -1
  247. package/dist/hardware-gamepad.d.ts.map +1 -1
  248. package/dist/hardware-gamepad.js +1 -1
  249. package/dist/hardware-gamepad.js.map +1 -1
  250. package/dist/hud-math.d.ts +1 -1
  251. package/dist/hud-math.d.ts.map +1 -1
  252. package/dist/hud-math.js +1 -1
  253. package/dist/hud-math.js.map +1 -1
  254. package/dist/hud.d.ts +3 -3
  255. package/dist/hud.d.ts.map +1 -1
  256. package/dist/hud.js +1 -1
  257. package/dist/hud.js.map +1 -1
  258. package/dist/icon-grid.d.ts +33 -5
  259. package/dist/icon-grid.d.ts.map +1 -1
  260. package/dist/icon-grid.js +104 -43
  261. package/dist/icon-grid.js.map +1 -1
  262. package/dist/index.d.ts +228 -212
  263. package/dist/index.d.ts.map +1 -1
  264. package/dist/index.js +177 -137
  265. package/dist/index.js.map +1 -1
  266. package/dist/interactive-behavior.d.ts +3 -3
  267. package/dist/interactive-behavior.d.ts.map +1 -1
  268. package/dist/interactive-behavior.js +2 -2
  269. package/dist/interactive-behavior.js.map +1 -1
  270. package/dist/jolt-plugin.d.ts +12 -12
  271. package/dist/jolt-plugin.d.ts.map +1 -1
  272. package/dist/jolt-plugin.js +5 -5
  273. package/dist/jolt-plugin.js.map +1 -1
  274. package/dist/keyboard-gamepad.d.ts +1 -1
  275. package/dist/keyboard-gamepad.d.ts.map +1 -1
  276. package/dist/keyboard-gamepad.js +1 -1
  277. package/dist/keyboard-gamepad.js.map +1 -1
  278. package/dist/keyboard.d.ts +20 -4
  279. package/dist/keyboard.d.ts.map +1 -1
  280. package/dist/keyboard.js +49 -33
  281. package/dist/keyboard.js.map +1 -1
  282. package/dist/light-editor.d.ts +41 -0
  283. package/dist/light-editor.d.ts.map +1 -0
  284. package/dist/light-editor.js +244 -0
  285. package/dist/light-editor.js.map +1 -0
  286. package/dist/light-modulation.d.ts +218 -0
  287. package/dist/light-modulation.d.ts.map +1 -0
  288. package/dist/light-modulation.js +691 -0
  289. package/dist/light-modulation.js.map +1 -0
  290. package/dist/light-settings.d.ts +59 -0
  291. package/dist/light-settings.d.ts.map +1 -0
  292. package/dist/light-settings.js +161 -0
  293. package/dist/light-settings.js.map +1 -0
  294. package/dist/make-mesh.js +2 -2
  295. package/dist/make-mesh.js.map +1 -1
  296. package/dist/min-sim-conformance.d.ts +1 -1
  297. package/dist/min-sim-conformance.d.ts.map +1 -1
  298. package/dist/popup-surface.d.ts +3 -3
  299. package/dist/popup-surface.d.ts.map +1 -1
  300. package/dist/popup-surface.js +5 -5
  301. package/dist/popup-surface.js.map +1 -1
  302. package/dist/portal-transform.d.ts +1 -1
  303. package/dist/portal-transform.d.ts.map +1 -1
  304. package/dist/portal-transform.js +1 -1
  305. package/dist/portal-transform.js.map +1 -1
  306. package/dist/prefab.d.ts +1 -1
  307. package/dist/prefab.d.ts.map +1 -1
  308. package/dist/province-climate.d.ts +82 -0
  309. package/dist/province-climate.d.ts.map +1 -0
  310. package/dist/province-climate.js +242 -0
  311. package/dist/province-climate.js.map +1 -0
  312. package/dist/scene-schemas.d.ts +110 -0
  313. package/dist/scene-schemas.d.ts.map +1 -0
  314. package/dist/scene-schemas.js +358 -0
  315. package/dist/scene-schemas.js.map +1 -0
  316. package/dist/sdf-lattice.js +4 -4
  317. package/dist/shadow-decal.js +1 -1
  318. package/dist/shadow-decal.js.map +1 -1
  319. package/dist/slope-profile.d.ts +1 -1
  320. package/dist/slope-profile.d.ts.map +1 -1
  321. package/dist/slope-profile.js +2 -2
  322. package/dist/slope-profile.js.map +1 -1
  323. package/dist/surface.d.ts +4 -2
  324. package/dist/surface.d.ts.map +1 -1
  325. package/dist/surface.js +13 -12
  326. package/dist/surface.js.map +1 -1
  327. package/dist/svg-icons.d.ts +29 -2
  328. package/dist/svg-icons.d.ts.map +1 -1
  329. package/dist/svg-icons.js +92 -7
  330. package/dist/svg-icons.js.map +1 -1
  331. package/dist/svg-texture.js +1 -1
  332. package/dist/svg-texture.js.map +1 -1
  333. package/dist/table-layout.d.ts +31 -0
  334. package/dist/table-layout.d.ts.map +1 -1
  335. package/dist/table-layout.js.map +1 -1
  336. package/dist/table.d.ts +29 -3
  337. package/dist/table.d.ts.map +1 -1
  338. package/dist/table.js +140 -12
  339. package/dist/table.js.map +1 -1
  340. package/dist/theme-editor.d.ts +3 -1
  341. package/dist/theme-editor.d.ts.map +1 -1
  342. package/dist/theme-editor.js +25 -6
  343. package/dist/theme-editor.js.map +1 -1
  344. package/dist/tosi-b3d.d.ts +15 -13
  345. package/dist/tosi-b3d.d.ts.map +1 -1
  346. package/dist/tosi-b3d.js +86 -62
  347. package/dist/tosi-b3d.js.map +1 -1
  348. package/dist/touch-gamepad.d.ts +1 -1
  349. package/dist/touch-gamepad.d.ts.map +1 -1
  350. package/dist/touch-gamepad.js +1 -1
  351. package/dist/touch-gamepad.js.map +1 -1
  352. package/dist/vector-field.d.ts +7 -5
  353. package/dist/vector-field.d.ts.map +1 -1
  354. package/dist/vector-field.js +10 -9
  355. package/dist/vector-field.js.map +1 -1
  356. package/dist/virtual-gamepad.d.ts +1 -1
  357. package/dist/virtual-gamepad.d.ts.map +1 -1
  358. package/dist/virtual-gamepad.js +1 -1
  359. package/dist/virtual-gamepad.js.map +1 -1
  360. package/dist/w3d-theme.d.ts.map +1 -1
  361. package/dist/w3d-theme.js +22 -3
  362. package/dist/w3d-theme.js.map +1 -1
  363. package/dist/water-normal.d.ts +1 -1
  364. package/dist/water-normal.d.ts.map +1 -1
  365. package/dist/water-normal.js +1 -1
  366. package/dist/water-normal.js.map +1 -1
  367. package/dist/widget-box.d.ts +2 -2
  368. package/dist/widget-box.d.ts.map +1 -1
  369. package/dist/widget-box.js +2 -2
  370. package/dist/widget-box.js.map +1 -1
  371. package/dist/widgets3d-layout.d.ts +23 -3
  372. package/dist/widgets3d-layout.d.ts.map +1 -1
  373. package/dist/widgets3d-layout.js +125 -9
  374. package/dist/widgets3d-layout.js.map +1 -1
  375. package/dist/widgets3d.d.ts +278 -1
  376. package/dist/widgets3d.d.ts.map +1 -1
  377. package/dist/widgets3d.js +594 -40
  378. package/dist/widgets3d.js.map +1 -1
  379. package/dist/world-store.d.ts +1 -1
  380. package/dist/world-store.d.ts.map +1 -1
  381. package/dist/world-store.js +1 -1
  382. package/dist/world-store.js.map +1 -1
  383. package/dist/world-topology.d.ts +1 -1
  384. package/dist/world-topology.d.ts.map +1 -1
  385. package/dist/world-view.d.ts +2 -2
  386. package/dist/world-view.d.ts.map +1 -1
  387. package/dist/wreck-fall.js +1 -1
  388. package/dist/wreck-fall.js.map +1 -1
  389. package/dist/xr-gamepad.d.ts +2 -2
  390. package/dist/xr-gamepad.d.ts.map +1 -1
  391. package/dist/xr-gamepad.js +1 -1
  392. package/dist/xr-gamepad.js.map +1 -1
  393. package/dist/xr-input-provider.d.ts +2 -2
  394. package/dist/xr-input-provider.d.ts.map +1 -1
  395. package/dist/xr-input-provider.js +1 -1
  396. package/dist/xr-input-provider.js.map +1 -1
  397. package/package.json +12 -5
package/CHANGELOG.md CHANGED
@@ -6,6 +6,272 @@ 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.0
10
+
11
+ Lights, editors, and the schema surface `tosijs-3d-ensemble` asked for — plus
12
+ the two renames that were waiting for a minor.
13
+
14
+ ### ⚠️ Breaking
15
+
16
+ - **Peer dependency: `tosijs` is now `^1.9.2`** (was `^1.7.8`). Upgrade tosijs
17
+ alongside this. The floor moved because 1.9 fixes five issues we filed
18
+ (tosijs#14/#15/#22/#24/#27) and holding it down only defers the work.
19
+
20
+ Behaviour that changed with it, verified rather than assumed: a wrong-typed
21
+ write to an `initAttributes` prop used to be **silently discarded** and now
22
+ **warns and applies the value**. So `foo: false` on an `'on'|'off'` attribute
23
+ genuinely sets `false` where it used to quietly default — use `isOff()`,
24
+ which accepts `'off'`, `false` and `'false'`.
25
+
26
+ - **Callbacks are `handleX`, not `onX`.** `handleChange`, `handleClick`,
27
+ `handleSelect`. **Both spellings work through 0.8.x** and the old one warns
28
+ once per name; `onX` is removed in 0.9.
29
+
30
+ Not a style preference: these are plain factories today, but the moment one
31
+ becomes a tosijs component the element creator binds an `on*` prop as a DOM
32
+ event **listener** and the class field is silently never called. `handleX`
33
+ cannot be mistaken for an event name. Giving both, the new one wins.
34
+
35
+ **Migrated in this release** — `inputField`, `keyboard`, `table`,
36
+ `box`/`surface`, popups, debug actions and the curve/footprint/vector fields.
37
+ In other words: all of them. `b3d-trigger` gains `whenEnter`/`whenExit`
38
+ instead, because components use `when*` (see Fixed).
39
+
40
+ ### Added
41
+
42
+ - **`handlerOf`** (`handler-of.ts`, exported from the barrel) — the shim behind
43
+ the `handleX`/`onX` rule, in its own dependency-free module so the smallest
44
+ widget can adopt it without importing `widgets3d`. Use it for your own
45
+ widgets: `handlerOf(config, 'handleChange', 'onChange')?.(value)`.
46
+
47
+ - **Lamps** — `b3dPointLight`, `b3dSpotLight`, `b3dAreaLight`: a placed light
48
+ with its own fixture geometry, which **tracks the light** (a fluorescent's
49
+ bulb stutters as it strikes and dims to a red ember as it dies). Shadows where
50
+ Babylon allows, **gels** where it allows (spot only), and a generated cone
51
+ `shape` (`circle`/`square` + `shapeAspect`, `shapeSoftness`) plus a true
52
+ `innerAngle` penumbra.
53
+
54
+ - **Light programs** — one curve per channel (brightness, hue, saturation,
55
+ range) split into attack / sustain / decay by two markers. `duration` divides
56
+ by those markers, so dragging one **retimes** the lamp. Presets: `steady`,
57
+ `fluorescent`, `flickery`, `brownout`, `candle`, `fireplace`. `timeSource`
58
+ picks the real clock (default — a flicker should not freeze when the world
59
+ pauses) or the world's.
60
+
61
+ - **Editors** — `curveProgram3d` (several curves sharing one pair of draggable
62
+ split markers), `lightEditor3d` (the whole lamp), and `curveMarkers`.
63
+ Controlled, with `handleCommit(value, describe)` once per gesture carrying
64
+ canonical values and a verb phrase, so a document records one undo step.
65
+
66
+ - **`scene-schemas`** — JSON Schema for all nine scene primitives: skybox, sun,
67
+ water, ground, fog, clouds, ambient, terrain, reflections (and the hemispheric
68
+ light). **No DOM, no Babylon.** So nobody hand-copies our
69
+ attributes: a consumer's hand-written skybox schema carried 6 of 16 and
70
+ disagreed on a default. Drift is caught by a test, not promised.
71
+
72
+ - **`province-climate`** — water, temperature and volcanism as bipolar bias
73
+ curves (`0.5` leaves the base alone) plus water presence and level as scalars,
74
+ because "there is a lake here at 12 m" is not something a curve can say.
75
+
76
+ - **`spinner3d` / `progress3d`** — the widget set could say what a value IS but
77
+ not that work was under way. The spinner animates as GEOMETRY, not CSS,
78
+ because a keyframe animation does not run once the SVG is rasterised to a
79
+ texture — it would look right flat and freeze in a headset.
80
+
81
+ - **Filtered tables** — `filter` / `setFilter(predicate)` and `counts`. A filter
82
+ never drops a selection: hiding is a view state, and losing a selection to it
83
+ would make typing in a search box destructive.
84
+
85
+ - **`table` button columns** — `kind: 'button'` with `menu(row)` opens an action
86
+ menu anchored to the cell. The button takes the press instead of the row, so
87
+ a row's ⋯ does not also select it.
88
+
89
+ - **`registerIcons`** — consumers add icons every widget resolves by name.
90
+ - **Log sliders** — `scale: 'log' | 'log2'`, `snap`, and `zeroStop` for a
91
+ quantity that spans decades and can still be switched off.
92
+ - **Action menus** — `openMenu3d`, `button3d({ menu })`, `iconGrid3d` menu
93
+ cells; `disabled` takes a predicate so a menu can be a constant.
94
+ - **`table`** — `ColumnSpec.kind: 'icon'`.
95
+
96
+ ### Fixed
97
+
98
+ - A **move** no longer costs a scene, and a genuine removal now disposes the
99
+ engine — a leaked WebGL context is not just memory (Chrome caps them near 16
100
+ and force-loses the oldest).
101
+ - `shadows`, the gel and `geometry` each accepted a write and did nothing; all
102
+ three now sync per render. Lamps also never marked shadow **receivers**, so a
103
+ shadow map was rendered that nothing read.
104
+ - `canonicalProgram` silently dropped `duration`, so a committed edit turned a
105
+ flickering lamp steady.
106
+ - A nested widget's popup opened at the top of its container rather than beside
107
+ the control.
108
+ - `lightEditor3d` shipped demo copy into every consumer's panel; the hint is now
109
+ opt-in.
110
+ - The aircraft chase camera sat too close after content moved to human scale.
111
+ - **`themeEditor` never called back.** It read `config.onChange` while its
112
+ callers passed `handleChange`, so the theme table updated and the host's
113
+ rebuild never ran — the controls moved and the panels they edit did not.
114
+ `handleChange` is now the option; `onChange` still works, deprecated.
115
+ - A metric typed **out of range** left the slider on the cap and the number
116
+ field above it, with the theme taking the out-of-range value — the exact
117
+ drift a paired slider-and-field exists to prevent. Values are clamped now.
118
+ - Two demos (`w3d-theme`, `keyboard`) passed `handleChange` to `inputField`,
119
+ which reads `onChange` — so typing updated nothing. Demo code lives in doc
120
+ comments and is **not type-checked**, which is why this class of mistake
121
+ reaches a page instead of the compiler.
122
+ - **The `curve-program` demo was truncated on the published site.** Its doc
123
+ comment contained a nested `/* … */`, and block comments do not nest — the
124
+ inner `*/` closed the page early, so roughly half the demo silently vanished.
125
+ - **The in-scene panel was sized by a guess, and the guess was wrong for the
126
+ one panel that mattered.** Height was `46 + rows × 48`, which assumes a row is
127
+ about 48px. `lightEditor3d` is ONE row that lays out over 1200px, so its panel
128
+ was built ~142px tall and you scrolled a postage stamp. It now sizes to its
129
+ content (`height: 'fit'`) with a cap, so the same panel is 620px — Tonio, from
130
+ the headset: _"crammed into a tiny tiny view so you have to scroll it
131
+ constantly… I didn't try messing with curves because they were too far down."_
132
+ - **The in-scene panel's icon bar no longer scrolls away.** It carries Exit VR,
133
+ and a control you need in order to LEAVE is the one thing a headset panel
134
+ cannot afford to lose. `panel3d` gained a `header` option — rows pinned above
135
+ the scrolling body — which also ends a divergence, since the flat
136
+ presentation has always pinned its bar by rendering it as DOM.
137
+ - **The theme editor no longer follows you to other demos.** It edits the global
138
+ table deliberately (that is what makes both panels re-theme live), but the doc
139
+ site is one page, so walking away left everything else wearing your palette.
140
+ The demo now restores it on unmount.
141
+ - **`dist` could not be imported by Node at all** — 394 relative specifiers were
142
+ written without an extension (`from './tosi-b3d'`), which every bundler and
143
+ Bun resolves and Node's ESM resolver does not. Reported by
144
+ `tosijs-3d-ensemble` (#69) after they fixed the identical fault in their own
145
+ package and the failure moved one level down into ours.
146
+
147
+ Source specifiers now carry `.js` — the TypeScript convention, passed through
148
+ by `tsc` and resolved fine by bundlers, so it works everywhere and keeps the
149
+ per-file `dist` we ship deliberately. That covers deep package subpaths too
150
+ (`@babylonjs/core/Misc/observable.js`), which failed the same way. Verified by
151
+ importing the built package under Node 24, not by reasoning about it.
152
+
153
+ A test now asserts it **of the source**, so it fails at authoring time rather
154
+ than after a publish — the only moment anyone was going to notice, since every
155
+ loop here is a bundler or Bun.
156
+
157
+ - **Subpath exports** — `import { validateLight } from 'tosijs-3d/light-settings'`
158
+ now works. The pure modules were split from their editors precisely so a
159
+ consumer could validate documents headlessly, but the only export was the
160
+ barrel, which defines custom elements on import and needs `HTMLElement`. So
161
+ the headless half was still behind a browser. It is not now.
162
+
163
+ ⚠️ **This is a wildcard** (`"./*"` → `./dist/*.js`), so **every module in
164
+ `dist/` is now a supported specifier** and covered by semver — renaming one is
165
+ a breaking change from here on. 142 of them were already public through the
166
+ barrel; the genuinely new surface is nine. The three superseded modules
167
+ (`reflections`, `dynamic-shadows`, `rippling-water`) are explicitly blocked so
168
+ the wildcard cannot resurrect them.
169
+
170
+ - **`handleX` now works on every callback option, and `onX` is deprecated.**
171
+ It used to depend on which widget you were holding — `curve3d` took
172
+ `handleChange`, `inputField` took `onChange`, and neither complained about the
173
+ other — which is what made three of the bugs above possible. Migrated:
174
+ `table` (`handleSelect`/`handleActivate`), `box`'s `BoxChild` and `button`
175
+ (`handleActivate`), `surface`'s `MenuItem` (`handleSelect`), `inputField`
176
+ (`handleChange`/`handleEnter`/`handleFocus`, on the object as well as in
177
+ config), `keyboard` (`handleKey`/`handleAction`/`handleCaretMove`), popups
178
+ (`handleClose`), and debug-source actions (`handleClick`). Every `onX` still
179
+ works, warns **once per name**, and is removed in 0.9.
180
+ - `b3d-trigger` gains **`whenEnter`/`whenExit`** (components use `when*`, like
181
+ `whenImpact`). Passing `onEnter` to the element creator never set the field at
182
+ all — it added a listener for the `'enter'` CustomEvent, so the callback got
183
+ an Event while `trigger.onEnter = fn` got the trigger. Same callback, two
184
+ different arguments depending on how you attached it.
185
+ - The `curve-program` and `curve-field` editors did not exist inside a headset:
186
+ both put their controls in flat DOM beside the canvas, which an immersive
187
+ session does not render. Both now also build through `scenePanel`.
188
+
189
+ ### Changed
190
+
191
+ - Doc pages are named for what they are (`Light program editor`, `Curve
192
+ editor`, `Lamps`) rather than for their module. URLs are unchanged.
193
+ - ⚠️ `shadows="on"` is not free — one extra render of the caster list per lamp
194
+ per frame, worse with a large `range`. Prefer `off` for dynamically inserted
195
+ content.
196
+
197
+ ## 0.7.8
198
+
199
+ Lights you can see, edit and animate — and the editor surface `tosijs-3d-ensemble`
200
+ asked for, built to their spec so they can adopt it without writing widgets.
201
+
202
+ ### Added
203
+
204
+ - **Lamps.** `b3dPointLight`, `b3dSpotLight`, `b3dAreaLight` — a placed light
205
+ that comes with its own fixture geometry (toggle it, scale it, bring a GLB, or
206
+ parent your own to the lamp's `node`). Shadows where Babylon allows them
207
+ (point/spot; `RectAreaLight` is not a `ShadowLight`) and **gels** where it does
208
+ (spot only — `projectionTexture`, bitmap or SVG). The two gaps warn once rather
209
+ than being faked.
210
+
211
+ The fixture **tracks its light**: a fluorescent's bulb stutters as it strikes
212
+ and dims to a red ember as it dies.
213
+
214
+ - **Light programs** (`light-modulation`). A lamp's whole life as ONE curve per
215
+ channel — brightness, hue, saturation, range — divided into attack / sustain /
216
+ decay by two markers. The seams cannot jump because there is only one curve, so
217
+ **the curve's value at `attackEnd` IS the sustain level**.
218
+
219
+ ⚠️ **Contract:** if `sustainEnd` precedes `attackEnd` the sustain collapses to
220
+ zero width AT `attackEnd`, deterministically. Stated because a consumer's
221
+ validator reports it as a warning rather than an error, which is only correct
222
+ while the behaviour is specified. Changing it is a breaking change.
223
+
224
+ - **`curveProgram3d`** — several curves sharing one pair of draggable split
225
+ markers, as a single field. **`lightEditor3d`** wraps it with the lamp's static
226
+ properties (power switch, type, colour, intensity, range, shadows).
227
+
228
+ - **`light-settings`** — a lamp as DATA: schema, canonical form, validator. **No
229
+ DOM and no Babylon**, so it works in a headless runner.
230
+
231
+ - **Curve interop**, to `tosijs-3d-ensemble`'s specification: `canonicalCurve`
232
+ (4dp, stable bytes), `readCurve` (accepts the bare array or a `{kind, points}`
233
+ wrapper), `validateCurve` / `validateProgram` / `validateLight` (never throw;
234
+ `error`/`warning` only; relative JSON Pointer paths), and `curveSchema` /
235
+ `lightProgramSchema` / `lightSettingsSchema` emitting `x-widget` +
236
+ `x-curve-kind` for panels generated from JSON Schema.
237
+
238
+ - **`handleCommit`** alongside the live `onChange` on `curve3d`, `curveMarkers`,
239
+ `curveProgram3d` and `lightEditor3d` — one commit per gesture, carrying
240
+ canonical values and a bare verb phrase (`'move attack split'`), so a document
241
+ records one undo step per edit instead of one per pointer-move.
242
+
243
+ - **Log sliders.** `slider3d({ scale: 'log' | 'log2' })` gives every decade or
244
+ octave equal travel, plus `snap` to quantise the value. For intensity, noise
245
+ scale, grid size — anything where a linear track puts everything you want in
246
+ its first few percent.
247
+
248
+ - **Action menus.** `openMenu3d` / `menu3d`, `button3d({ menu })`, and a `menu`
249
+ on an `iconGrid3d` cell. `disabled` takes a **predicate**, so a menu can be a
250
+ module-level constant instead of being rebuilt whenever its state moves.
251
+ `WidgetHost` is now exported — it was unnameable from outside.
252
+
253
+ ### Fixed
254
+
255
+ - **Lamps never marked shadow RECEIVERS**, so a `shadows="on"` lamp rendered a
256
+ shadow map nothing read — a full extra render pass that presented as lights
257
+ shining through solid objects.
258
+ - **`shadows` accepted a write and did nothing.** It was set up once at scene
259
+ ready and never re-read, so toggling it in an editor had no effect.
260
+ - **A pale lamp could not be reddened.** Rotating a hue preserves saturation and
261
+ the saturation curve is `[0,1]`, so it could only desaturate — "pale tube dies
262
+ as a red ember" was inexpressible. Added `saturationScale`.
263
+ - **The aircraft chase camera** sat too close after content moved to human
264
+ scale; pulled back 30% with the framing angle preserved (0.13° drift).
265
+ - Log slider values no longer carry float noise (`0.010000000000000009`), which
266
+ matters because they are serialised and diffed.
267
+
268
+ ### Changed
269
+
270
+ - ⚠️ **`shadows="on"` is not free**, and the cost is worst where it is least
271
+ visible: every such lamp is an extra render of the caster list, per frame, and
272
+ large `range` sweeps more of the world into it. Prefer `off` for dynamically
273
+ inserted content. See `TODO.md` → arbitration for inserted lights.
274
+
9
275
  ## 0.7.7
10
276
 
11
277
  A lifecycle release. `<tosi-b3d>` now distinguishes being **moved** from being
package/Migration.md CHANGED
@@ -9,6 +9,54 @@ 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.7.8 → 0.8.0
13
+
14
+ **Nothing breaks at runtime.** Both items below keep working in 0.8.x; one is an
15
+ install-time floor, the other is a deprecation with a removal date.
16
+
17
+ ### 1. Peer floor: `tosijs` `^1.7.8` → `^1.9.2`
18
+
19
+ Upgrade `tosijs` alongside this. npm will refuse to install otherwise
20
+ (`ERESOLVE`); bun and pnpm warn and proceed, which is the case worth reading on.
21
+
22
+ One behaviour changed with it, and it is silent. A wrong-typed write to an
23
+ `initAttributes` prop used to be **discarded**; since tosijs 1.9 it **warns and
24
+ applies the value as given**. So on an `'on' | 'off'` attribute, `foo: false`
25
+ used to mean `'on'` and now genuinely sets `false` — anything comparing against
26
+ the string breaks instead of quietly defaulting.
27
+
28
+ Use **`isOff()`** from `tosijs-3d`, which accepts `'off'`, `false` and
29
+ `'false'`, rather than comparing to a string yourself.
30
+
31
+ ### 2. Callback options: `onX` → `handleX`
32
+
33
+ Every callback option in the library now takes `handleX`. The old `onX` spelling
34
+ still works, warns **once per name**, and is **removed in 0.9**.
35
+
36
+ | widget | old | new |
37
+ | ---------------------------------------- | ------------------------------------ | ------------------------------------------------ |
38
+ | `inputField` | `onChange` / `onEnter` / `onFocus` | `handleChange` / `handleEnter` / `handleFocus` |
39
+ | `keyboard` | `onKey` / `onAction` / `onCaretMove` | `handleKey` / `handleAction` / `handleCaretMove` |
40
+ | `table` | `onSelect` / `onActivate` | `handleSelect` / `handleActivate` |
41
+ | `box` `button` / `BoxChild` | `onActivate` | `handleActivate` |
42
+ | `surface` `MenuItem` | `onSelect` | `handleSelect` |
43
+ | `showPopup` / `openPopup` / `openMenu3d` | `onClose` | `handleClose` |
44
+ | `addDebugSource` actions | `onClick` | `handleClick` |
45
+ | `themeEditor` | `onChange` | `handleChange` |
46
+
47
+ **Why, in one sentence:** these are plain factories today, but the moment one
48
+ becomes a tosijs component the element creator binds an `on*` prop as a DOM
49
+ event **listener**, so the callback is never called and nothing errors — which
50
+ is not hypothetical, it shipped three times in this codebase.
51
+
52
+ **Components use `when*`, not `handleX`** — `b3d-trigger` gains
53
+ `whenEnter`/`whenExit` (`onEnter`/`onExit` still work). Passing `onEnter` to the
54
+ element creator never set the field at all; it added a listener for the `'enter'`
55
+ CustomEvent, so your callback received an `Event` instead of the trigger.
56
+
57
+ If you write your own widgets, `handlerOf(config, 'handleX', 'onX')` is exported
58
+ so you can follow the same rule.
59
+
12
60
  ## 0.6.2 → 0.7.0
13
61
 
14
62
  > # ⚠️ READ THIS FIRST: library rotation
@@ -1,4 +1,4 @@
1
- import type { PerfTier } from './perf-probe';
1
+ import type { PerfTier } from './perf-probe.js';
2
2
  /** What one ambient effect is asking the scene for. */
3
3
  export type AmbientRequest = {
4
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ambient-budget.d.ts","sourceRoot":"","sources":["../src/ambient-budget.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,uDAAuD;AACvD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV;8DAC0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,yFAAyF;IACzF,GAAG,EAAE,MAAM,CAAA;IACX,uDAAuD;IACvD,OAAO,EAAE,QA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;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAA;IACd,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5C,QAAQ,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC7C,IAAI,EAAE,gBAAgB,GACrB;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAsBrC"}
@@ -1,11 +1,11 @@
1
1
  import * as BABYLON from '@babylonjs/core';
2
- import type { B3d } from './tosi-b3d';
3
- import { B3dControllable } from './b3d-controllable';
4
- import type { ControlInput } from './control-input';
5
- import type { B3dRadar } from './b3d-radar';
2
+ import type { B3d } from './tosi-b3d.js';
3
+ import { B3dControllable } from './b3d-controllable.js';
4
+ import type { ControlInput } from './control-input.js';
5
+ import type { B3dRadar } from './b3d-radar.js';
6
6
  export declare class B3dAircraft extends B3dControllable {
7
7
  static preferredTagName: string;
8
- inputMapping: import("./virtual-gamepad").InputMapping;
8
+ inputMapping: import("./virtual-gamepad.js").InputMapping;
9
9
  static initAttributes: {
10
10
  url: string;
11
11
  library: string;
@@ -1 +1 @@
1
- {"version":3,"file":"b3d-aircraft.d.ts","sourceRoot":"","sources":["../src/b3d-aircraft.ts"],"names":[],"mappings":"AAkTA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAkBnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAiE3C,qBAAa,WAAY,SAAQ,eAAe;IAC9C,MAAM,CAAC,gBAAgB,SAAsB;IAE7C,YAAY,2CAAoB;IAEhC,MAAM,CAAC,cAAc;;;;;;;;;;;;;;QA0BnB,yDAAyD;;QAEzD,mEAAmE;;QAEnE;;;;WAIG;kBACe,IAAI,GAAG,KAAK;QAC9B;6EACqE;;QAErE;4CACoC;;QAEpC,8BAA8B;;QAE9B,qCAAqC;;QAErC,oEAAoE;;QAEpE,2DAA2D;;QAE3D,+DAA+D;;QAE/D,uDAAuD;;QAEvD;4DACoD;;QAEpD;;;;;WAKG;;QAEH;;;;;;WAMG;;;;QAgBH;;;;;;;WAOG;;;;;;;;;;;;;;;;;;;;;;;;MAuBJ;IAGD,QAAQ,SAAI;IACZ,QAAQ,SAAI;IACZ,aAAa,SAAI;IACjB,UAAU,UAAQ;IAClB,QAAQ,UAAQ;IAChB,MAAM,UAAQ;IACd,QAAQ,UAAQ;IAChB,OAAO,UAAQ;IACf,8FAA8F;IAC9F,OAAO,CAAC,SAAS,CAAQ;IACzB;kEAC8D;IAC9D,UAAU,EAAE,OAAO,GAAG,SAAS,CAAU;IACzC,OAAO,CAAC,cAAc,CAAQ;IAE9B;;;wEAGoE;IACpE,SAAS,SAAM;IACf,cAAc,SAAM;IACpB,cAAc,SAAM;IACpB,WAAW,SAAM;IACj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,CAAC,WAAW;IAUnB;gFAC4E;IAC5E,OAAO,CAAC,cAAc;IAWtB,+EAA+E;IAC/E,OAAO,CAAC,KAAK;IA0Cb;;qDAEiD;IACjD,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,YAAY;IAgBpB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK;IAwC3C,OAAO,CAAC,WAAW;IAkCnB,OAAO,CAAC,eAAe;IAwCvB,OAAO,CAAC,SAAS;IAuCjB;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IA8BtB,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,aAAa,CAAkC;IAEvD,iBAAiB;IA6EjB;;qCAEiC;IACjC,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS;IAQvC,YAAY;CA+Cb;AAED,eAAO,MAAM,WAAW,8CAA+B,CAAA"}
@@ -304,12 +304,12 @@ faster than `crashSpeed`, or banked/inverted, crashes instead of lands.
304
304
  */
305
305
  /*{ "parent": "Vehicles" }*/
306
306
  import * as BABYLON from '@babylonjs/core';
307
- import { canonicalize, applyCenterOfGravity } from './model-transform';
308
- import { B3dControllable } from './b3d-controllable';
309
- import { aircraftMapping } from './virtual-gamepad';
310
- import { equilibriumSpeed, flyByWireStep, targetVelocity, chaseVelocity, } from './fly-by-wire';
311
- import { placeOnSurface, boundingBottomOffset, isOff, collidable, } from './b3d-utils';
312
- import { spawnProjectile, spawnMissile } from './b3d-launcher';
307
+ import { canonicalize, applyCenterOfGravity } from './model-transform.js';
308
+ import { B3dControllable } from './b3d-controllable.js';
309
+ import { aircraftMapping } from './virtual-gamepad.js';
310
+ import { equilibriumSpeed, flyByWireStep, targetVelocity, chaseVelocity, } from './fly-by-wire.js';
311
+ import { placeOnSurface, boundingBottomOffset, isOff, collidable, } from './b3d-utils.js';
312
+ import { spawnProjectile, spawnMissile } from './b3d-launcher.js';
313
313
  // Small gap kept between the model's belly and the ground.
314
314
  const GROUND_SEPARATION = 0.05;
315
315
  const DEG2RAD = Math.PI / 180;
@@ -486,9 +486,23 @@ export class B3dAircraft extends B3dControllable {
486
486
  * rather than being swung below when the aircraft pitches/rolls. */
487
487
  eyeHeight = 0.9; // cockpit height above the origin
488
488
  cockpitForward = 0.5; // cockpit offset toward the nose (local +Z)
489
- chaseMinHeight = 2.0; // chase height zoomed all the way in
490
- chaseHeight = 3.2; // chase height zoomed out (overview)
491
- chaseDistance = 4.8; // chase distance behind
489
+ /*
490
+ Scaled 1.3x when content moved to human scale (a person is 1.8 m, so the
491
+ aircraft roughly doubled) and the chase sat too close — the plane filled the
492
+ frame.
493
+
494
+ All three move TOGETHER on purpose: `_chaseLookPitch` is
495
+ `atan2(chaseMinHeight, chaseDistance)`, so scaling both leaves the ratio and
496
+ therefore the framing ANGLE untouched. The camera backs off along the same
497
+ sight line rather than tilting, which is what "pull it back" should mean and
498
+ is not what changing distance alone would do.
499
+
500
+ These feed the XR rig too (tosi-b3d reads them for the VR chase), so this
501
+ moves both presentations — correct, since the subject grew in both.
502
+ */
503
+ chaseMinHeight = 2.6; // chase height zoomed all the way in
504
+ chaseHeight = 4.2; // chase height zoomed out (overview)
505
+ chaseDistance = 6.2; // chase distance behind
492
506
  velocity = new BABYLON.Vector3(0, 0, 0);
493
507
  _fwd = new BABYLON.Vector3(); // scratch: world nose direction (unit)
494
508
  // Weapon cooldowns (seconds until ready) + edge-detect for the one-shot weapons.