@ifc-lite/renderer 3.1.0 → 4.2.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 (429) hide show
  1. package/README.md +22 -0
  2. package/dist/aabb-edges.d.ts +10 -0
  3. package/dist/aabb-edges.d.ts.map +1 -1
  4. package/dist/aabb-edges.js +13 -0
  5. package/dist/aabb-edges.js.map +1 -1
  6. package/dist/ao-params.d.ts +85 -0
  7. package/dist/ao-params.d.ts.map +1 -0
  8. package/dist/ao-params.js +109 -0
  9. package/dist/ao-params.js.map +1 -0
  10. package/dist/ao-pass.d.ts +47 -0
  11. package/dist/ao-pass.d.ts.map +1 -0
  12. package/dist/ao-pass.js +157 -0
  13. package/dist/ao-pass.js.map +1 -0
  14. package/dist/appearance-preview.d.ts +2 -0
  15. package/dist/appearance-preview.d.ts.map +1 -1
  16. package/dist/appearance-preview.js +4 -0
  17. package/dist/appearance-preview.js.map +1 -1
  18. package/dist/camera-animation-immediate.d.ts +5 -0
  19. package/dist/camera-animation-immediate.d.ts.map +1 -0
  20. package/dist/camera-animation-immediate.js +16 -0
  21. package/dist/camera-animation-immediate.js.map +1 -0
  22. package/dist/camera-animation.d.ts +3 -9
  23. package/dist/camera-animation.d.ts.map +1 -1
  24. package/dist/camera-animation.js +14 -9
  25. package/dist/camera-animation.js.map +1 -1
  26. package/dist/camera-matrices.d.ts +3 -0
  27. package/dist/camera-matrices.d.ts.map +1 -1
  28. package/dist/camera-matrices.js +12 -1
  29. package/dist/camera-matrices.js.map +1 -1
  30. package/dist/camera-orientation.d.ts +62 -0
  31. package/dist/camera-orientation.d.ts.map +1 -0
  32. package/dist/camera-orientation.js +155 -0
  33. package/dist/camera-orientation.js.map +1 -0
  34. package/dist/camera-projection.d.ts +3 -1
  35. package/dist/camera-projection.d.ts.map +1 -1
  36. package/dist/camera-projection.js +26 -20
  37. package/dist/camera-projection.js.map +1 -1
  38. package/dist/camera-surface-zoom.d.ts +32 -0
  39. package/dist/camera-surface-zoom.d.ts.map +1 -0
  40. package/dist/camera-surface-zoom.js +37 -0
  41. package/dist/camera-surface-zoom.js.map +1 -0
  42. package/dist/camera.d.ts +32 -61
  43. package/dist/camera.d.ts.map +1 -1
  44. package/dist/camera.js +71 -167
  45. package/dist/camera.js.map +1 -1
  46. package/dist/clash-solid-pipeline.d.ts +9 -3
  47. package/dist/clash-solid-pipeline.d.ts.map +1 -1
  48. package/dist/clash-solid-pipeline.js +31 -8
  49. package/dist/clash-solid-pipeline.js.map +1 -1
  50. package/dist/constants.d.ts +1 -1
  51. package/dist/constants.d.ts.map +1 -1
  52. package/dist/constants.js +4 -3
  53. package/dist/constants.js.map +1 -1
  54. package/dist/depth-reconstruct.d.ts +43 -0
  55. package/dist/depth-reconstruct.d.ts.map +1 -0
  56. package/dist/depth-reconstruct.js +35 -0
  57. package/dist/depth-reconstruct.js.map +1 -0
  58. package/dist/device-recovery.d.ts +60 -0
  59. package/dist/device-recovery.d.ts.map +1 -0
  60. package/dist/device-recovery.js +153 -0
  61. package/dist/device-recovery.js.map +1 -0
  62. package/dist/device.d.ts +2 -0
  63. package/dist/device.d.ts.map +1 -1
  64. package/dist/device.js +13 -1
  65. package/dist/device.js.map +1 -1
  66. package/dist/environment.d.ts +26 -15
  67. package/dist/environment.d.ts.map +1 -1
  68. package/dist/environment.js +24 -13
  69. package/dist/environment.js.map +1 -1
  70. package/dist/federation-registry.d.ts +16 -0
  71. package/dist/federation-registry.d.ts.map +1 -1
  72. package/dist/federation-registry.js +80 -9
  73. package/dist/federation-registry.js.map +1 -1
  74. package/dist/gpu-static-upload.d.ts +39 -0
  75. package/dist/gpu-static-upload.d.ts.map +1 -0
  76. package/dist/gpu-static-upload.js +70 -0
  77. package/dist/gpu-static-upload.js.map +1 -0
  78. package/dist/gpu-upload-guard.d.ts +95 -0
  79. package/dist/gpu-upload-guard.d.ts.map +1 -0
  80. package/dist/gpu-upload-guard.js +88 -0
  81. package/dist/gpu-upload-guard.js.map +1 -0
  82. package/dist/index.d.ts +71 -41
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +340 -375
  85. package/dist/index.js.map +1 -1
  86. package/dist/instanced-override-color.d.ts +8 -0
  87. package/dist/instanced-override-color.d.ts.map +1 -1
  88. package/dist/instanced-override-color.js +10 -0
  89. package/dist/instanced-override-color.js.map +1 -1
  90. package/dist/instanced-render.d.ts +22 -2
  91. package/dist/instanced-render.d.ts.map +1 -1
  92. package/dist/instanced-render.js +47 -10
  93. package/dist/instanced-render.js.map +1 -1
  94. package/dist/instanced-rte.d.ts +17 -0
  95. package/dist/instanced-rte.d.ts.map +1 -0
  96. package/dist/instanced-rte.js +32 -0
  97. package/dist/instanced-rte.js.map +1 -0
  98. package/dist/merged-mesh-extract.d.ts.map +1 -1
  99. package/dist/merged-mesh-extract.js +5 -0
  100. package/dist/merged-mesh-extract.js.map +1 -1
  101. package/dist/mesh-rte-uniforms.d.ts +46 -0
  102. package/dist/mesh-rte-uniforms.d.ts.map +1 -0
  103. package/dist/mesh-rte-uniforms.js +59 -0
  104. package/dist/mesh-rte-uniforms.js.map +1 -0
  105. package/dist/model-bounds-tracker.d.ts +7 -0
  106. package/dist/model-bounds-tracker.d.ts.map +1 -1
  107. package/dist/model-bounds-tracker.js +16 -5
  108. package/dist/model-bounds-tracker.js.map +1 -1
  109. package/dist/model-translation.d.ts +40 -2
  110. package/dist/model-translation.d.ts.map +1 -1
  111. package/dist/model-translation.js +152 -17
  112. package/dist/model-translation.js.map +1 -1
  113. package/dist/pick-rte-snapshot.d.ts +7 -0
  114. package/dist/pick-rte-snapshot.d.ts.map +1 -0
  115. package/dist/pick-rte-snapshot.js +15 -0
  116. package/dist/pick-rte-snapshot.js.map +1 -0
  117. package/dist/pick-types.d.ts +17 -0
  118. package/dist/pick-types.d.ts.map +1 -0
  119. package/dist/pick-types.js +5 -0
  120. package/dist/pick-types.js.map +1 -0
  121. package/dist/pick-uniforms.d.ts +6 -0
  122. package/dist/pick-uniforms.d.ts.map +1 -1
  123. package/dist/pick-uniforms.js +22 -18
  124. package/dist/pick-uniforms.js.map +1 -1
  125. package/dist/pick-world-position.d.ts +18 -0
  126. package/dist/pick-world-position.d.ts.map +1 -0
  127. package/dist/pick-world-position.js +21 -0
  128. package/dist/pick-world-position.js.map +1 -0
  129. package/dist/picker-readbacks.d.ts +6 -0
  130. package/dist/picker-readbacks.d.ts.map +1 -0
  131. package/dist/picker-readbacks.js +20 -0
  132. package/dist/picker-readbacks.js.map +1 -0
  133. package/dist/picker-rte-uniforms.d.ts +6 -0
  134. package/dist/picker-rte-uniforms.d.ts.map +1 -0
  135. package/dist/picker-rte-uniforms.js +41 -0
  136. package/dist/picker-rte-uniforms.js.map +1 -0
  137. package/dist/picker.d.ts +6 -7
  138. package/dist/picker.d.ts.map +1 -1
  139. package/dist/picker.js +88 -115
  140. package/dist/picker.js.map +1 -1
  141. package/dist/picking-manager.d.ts +10 -1
  142. package/dist/picking-manager.d.ts.map +1 -1
  143. package/dist/picking-manager.js +57 -21
  144. package/dist/picking-manager.js.map +1 -1
  145. package/dist/pipeline.d.ts +1 -7
  146. package/dist/pipeline.d.ts.map +1 -1
  147. package/dist/pipeline.js +17 -20
  148. package/dist/pipeline.js.map +1 -1
  149. package/dist/point-picker.d.ts +5 -1
  150. package/dist/point-picker.d.ts.map +1 -1
  151. package/dist/point-picker.js +49 -9
  152. package/dist/point-picker.js.map +1 -1
  153. package/dist/pointcloud/point-cloud-handle-ids.d.ts +22 -0
  154. package/dist/pointcloud/point-cloud-handle-ids.d.ts.map +1 -0
  155. package/dist/pointcloud/point-cloud-handle-ids.js +31 -0
  156. package/dist/pointcloud/point-cloud-handle-ids.js.map +1 -0
  157. package/dist/pointcloud/point-cloud-node.d.ts +14 -6
  158. package/dist/pointcloud/point-cloud-node.d.ts.map +1 -1
  159. package/dist/pointcloud/point-cloud-node.js.map +1 -1
  160. package/dist/pointcloud/point-cloud-pick-sources.d.ts +47 -0
  161. package/dist/pointcloud/point-cloud-pick-sources.d.ts.map +1 -0
  162. package/dist/pointcloud/point-cloud-pick-sources.js +32 -0
  163. package/dist/pointcloud/point-cloud-pick-sources.js.map +1 -0
  164. package/dist/pointcloud/point-cloud-placement.d.ts.map +1 -1
  165. package/dist/pointcloud/point-cloud-placement.js +20 -5
  166. package/dist/pointcloud/point-cloud-placement.js.map +1 -1
  167. package/dist/pointcloud/point-cloud-ray-transform.d.ts +78 -4
  168. package/dist/pointcloud/point-cloud-ray-transform.d.ts.map +1 -1
  169. package/dist/pointcloud/point-cloud-ray-transform.js +31 -84
  170. package/dist/pointcloud/point-cloud-ray-transform.js.map +1 -1
  171. package/dist/pointcloud/point-cloud-renderer.d.ts +21 -19
  172. package/dist/pointcloud/point-cloud-renderer.d.ts.map +1 -1
  173. package/dist/pointcloud/point-cloud-renderer.js +46 -52
  174. package/dist/pointcloud/point-cloud-renderer.js.map +1 -1
  175. package/dist/pointcloud/point-cloud-stream-lifecycle.d.ts +44 -0
  176. package/dist/pointcloud/point-cloud-stream-lifecycle.d.ts.map +1 -0
  177. package/dist/pointcloud/point-cloud-stream-lifecycle.js +44 -0
  178. package/dist/pointcloud/point-cloud-stream-lifecycle.js.map +1 -0
  179. package/dist/pointcloud/point-cloud-uniforms.d.ts +5 -0
  180. package/dist/pointcloud/point-cloud-uniforms.d.ts.map +1 -1
  181. package/dist/pointcloud/point-cloud-uniforms.js +55 -44
  182. package/dist/pointcloud/point-cloud-uniforms.js.map +1 -1
  183. package/dist/pointcloud/point-cloud-visibility.d.ts +10 -0
  184. package/dist/pointcloud/point-cloud-visibility.d.ts.map +1 -0
  185. package/dist/pointcloud/point-cloud-visibility.js +18 -0
  186. package/dist/pointcloud/point-cloud-visibility.js.map +1 -0
  187. package/dist/pointcloud/point-pipeline.d.ts +4 -9
  188. package/dist/pointcloud/point-pipeline.d.ts.map +1 -1
  189. package/dist/pointcloud/point-pipeline.js +4 -9
  190. package/dist/pointcloud/point-pipeline.js.map +1 -1
  191. package/dist/pointcloud/point-shader.wgsl.d.ts +1 -21
  192. package/dist/pointcloud/point-shader.wgsl.d.ts.map +1 -1
  193. package/dist/pointcloud/point-shader.wgsl.js +25 -5
  194. package/dist/pointcloud/point-shader.wgsl.js.map +1 -1
  195. package/dist/post-pass-chain.d.ts +38 -0
  196. package/dist/post-pass-chain.d.ts.map +1 -0
  197. package/dist/post-pass-chain.js +99 -0
  198. package/dist/post-pass-chain.js.map +1 -0
  199. package/dist/post-processor.d.ts +12 -26
  200. package/dist/post-processor.d.ts.map +1 -1
  201. package/dist/post-processor.js +14 -72
  202. package/dist/post-processor.js.map +1 -1
  203. package/dist/raycast-engine.d.ts +7 -5
  204. package/dist/raycast-engine.d.ts.map +1 -1
  205. package/dist/raycast-engine.js +17 -20
  206. package/dist/raycast-engine.js.map +1 -1
  207. package/dist/raycast-point-cloud-query.d.ts +1 -1
  208. package/dist/raycast-point-cloud-query.d.ts.map +1 -1
  209. package/dist/reference-image-pipeline.d.ts +1 -1
  210. package/dist/reference-image-pipeline.d.ts.map +1 -1
  211. package/dist/reference-image-pipeline.js +25 -7
  212. package/dist/reference-image-pipeline.js.map +1 -1
  213. package/dist/reference-images.d.ts +3 -1
  214. package/dist/reference-images.d.ts.map +1 -1
  215. package/dist/reference-images.js +15 -5
  216. package/dist/reference-images.js.map +1 -1
  217. package/dist/relative-to-eye.d.ts +146 -0
  218. package/dist/relative-to-eye.d.ts.map +1 -0
  219. package/dist/relative-to-eye.js +326 -0
  220. package/dist/relative-to-eye.js.map +1 -0
  221. package/dist/render-section-draw.d.ts +11 -0
  222. package/dist/render-section-draw.d.ts.map +1 -1
  223. package/dist/render-section-draw.js +6 -3
  224. package/dist/render-section-draw.js.map +1 -1
  225. package/dist/renderer-color-readback.d.ts +50 -0
  226. package/dist/renderer-color-readback.d.ts.map +1 -0
  227. package/dist/renderer-color-readback.js +145 -0
  228. package/dist/renderer-color-readback.js.map +1 -0
  229. package/dist/renderer-overlays.d.ts +15 -3
  230. package/dist/renderer-overlays.d.ts.map +1 -1
  231. package/dist/renderer-overlays.js +46 -20
  232. package/dist/renderer-overlays.js.map +1 -1
  233. package/dist/renderer-screenshot.d.ts +4 -0
  234. package/dist/renderer-screenshot.d.ts.map +1 -0
  235. package/dist/renderer-screenshot.js +17 -0
  236. package/dist/renderer-screenshot.js.map +1 -0
  237. package/dist/renderer-symbolic-overlays.d.ts +5 -2
  238. package/dist/renderer-symbolic-overlays.d.ts.map +1 -1
  239. package/dist/renderer-symbolic-overlays.js +36 -13
  240. package/dist/renderer-symbolic-overlays.js.map +1 -1
  241. package/dist/renderer-viewport.d.ts +45 -0
  242. package/dist/renderer-viewport.d.ts.map +1 -1
  243. package/dist/renderer-viewport.js +44 -0
  244. package/dist/renderer-viewport.js.map +1 -1
  245. package/dist/rte-clip-space.d.ts +12 -0
  246. package/dist/rte-clip-space.d.ts.map +1 -0
  247. package/dist/rte-clip-space.js +22 -0
  248. package/dist/rte-clip-space.js.map +1 -0
  249. package/dist/rte-frustum.d.ts +24 -0
  250. package/dist/rte-frustum.d.ts.map +1 -0
  251. package/dist/rte-frustum.js +45 -0
  252. package/dist/rte-frustum.js.map +1 -0
  253. package/dist/scene-appearance-preview.d.ts +2 -0
  254. package/dist/scene-appearance-preview.d.ts.map +1 -1
  255. package/dist/scene-appearance-preview.js +9 -0
  256. package/dist/scene-appearance-preview.js.map +1 -1
  257. package/dist/scene-authored-owner.d.ts +10 -0
  258. package/dist/scene-authored-owner.d.ts.map +1 -1
  259. package/dist/scene-authored-owner.js +44 -5
  260. package/dist/scene-authored-owner.js.map +1 -1
  261. package/dist/scene-batch-rebuild.d.ts +18 -0
  262. package/dist/scene-batch-rebuild.d.ts.map +1 -0
  263. package/dist/scene-batch-rebuild.js +49 -0
  264. package/dist/scene-batch-rebuild.js.map +1 -0
  265. package/dist/scene-batch-upload.d.ts +4 -1
  266. package/dist/scene-batch-upload.d.ts.map +1 -1
  267. package/dist/scene-batch-upload.js +31 -38
  268. package/dist/scene-batch-upload.js.map +1 -1
  269. package/dist/scene-bucket-routing.d.ts +21 -0
  270. package/dist/scene-bucket-routing.d.ts.map +1 -0
  271. package/dist/scene-bucket-routing.js +44 -0
  272. package/dist/scene-bucket-routing.js.map +1 -0
  273. package/dist/scene-contents.d.ts +8 -0
  274. package/dist/scene-contents.d.ts.map +1 -1
  275. package/dist/scene-derived-mesh-provenance.d.ts +13 -0
  276. package/dist/scene-derived-mesh-provenance.d.ts.map +1 -0
  277. package/dist/scene-derived-mesh-provenance.js +30 -0
  278. package/dist/scene-derived-mesh-provenance.js.map +1 -0
  279. package/dist/scene-device-recovery.d.ts +103 -0
  280. package/dist/scene-device-recovery.d.ts.map +1 -0
  281. package/dist/scene-device-recovery.js +295 -0
  282. package/dist/scene-device-recovery.js.map +1 -0
  283. package/dist/scene-finalize-regroup.d.ts +54 -0
  284. package/dist/scene-finalize-regroup.d.ts.map +1 -0
  285. package/dist/scene-finalize-regroup.js +136 -0
  286. package/dist/scene-finalize-regroup.js.map +1 -0
  287. package/dist/scene-geometry.d.ts +1 -0
  288. package/dist/scene-geometry.d.ts.map +1 -1
  289. package/dist/scene-geometry.js +3 -23
  290. package/dist/scene-geometry.js.map +1 -1
  291. package/dist/scene-instance-bounds.d.ts +12 -0
  292. package/dist/scene-instance-bounds.d.ts.map +1 -0
  293. package/dist/scene-instance-bounds.js +48 -0
  294. package/dist/scene-instance-bounds.js.map +1 -0
  295. package/dist/scene-instance-materialization.d.ts +4 -1
  296. package/dist/scene-instance-materialization.d.ts.map +1 -1
  297. package/dist/scene-instance-materialization.js +21 -6
  298. package/dist/scene-instance-materialization.js.map +1 -1
  299. package/dist/scene-instance-translation.d.ts +17 -0
  300. package/dist/scene-instance-translation.d.ts.map +1 -0
  301. package/dist/scene-instance-translation.js +50 -0
  302. package/dist/scene-instance-translation.js.map +1 -0
  303. package/dist/scene-instance-types.d.ts +6 -0
  304. package/dist/scene-instance-types.d.ts.map +1 -1
  305. package/dist/scene-model-translation.d.ts +13 -1
  306. package/dist/scene-model-translation.d.ts.map +1 -1
  307. package/dist/scene-model-translation.js +23 -1
  308. package/dist/scene-model-translation.js.map +1 -1
  309. package/dist/scene-precision.d.ts +16 -0
  310. package/dist/scene-precision.d.ts.map +1 -0
  311. package/dist/scene-precision.js +73 -0
  312. package/dist/scene-precision.js.map +1 -0
  313. package/dist/scene-rect-select.d.ts +11 -1
  314. package/dist/scene-rect-select.d.ts.map +1 -1
  315. package/dist/scene-rect-select.js +7 -4
  316. package/dist/scene-rect-select.js.map +1 -1
  317. package/dist/scene.d.ts +42 -39
  318. package/dist/scene.d.ts.map +1 -1
  319. package/dist/scene.js +258 -375
  320. package/dist/scene.js.map +1 -1
  321. package/dist/section-2d-lift.d.ts +10 -2
  322. package/dist/section-2d-lift.d.ts.map +1 -1
  323. package/dist/section-2d-lift.js +14 -6
  324. package/dist/section-2d-lift.js.map +1 -1
  325. package/dist/section-2d-line-buffer.d.ts +12 -4
  326. package/dist/section-2d-line-buffer.d.ts.map +1 -1
  327. package/dist/section-2d-line-buffer.js +59 -33
  328. package/dist/section-2d-line-buffer.js.map +1 -1
  329. package/dist/section-2d-overlay.d.ts +18 -72
  330. package/dist/section-2d-overlay.d.ts.map +1 -1
  331. package/dist/section-2d-overlay.js +72 -103
  332. package/dist/section-2d-overlay.js.map +1 -1
  333. package/dist/section-2d-types.d.ts +38 -0
  334. package/dist/section-2d-types.d.ts.map +1 -0
  335. package/dist/section-2d-types.js +6 -0
  336. package/dist/section-2d-types.js.map +1 -0
  337. package/dist/section-cap-pipelines.d.ts +6 -0
  338. package/dist/section-cap-pipelines.d.ts.map +1 -0
  339. package/dist/section-cap-pipelines.js +87 -0
  340. package/dist/section-cap-pipelines.js.map +1 -0
  341. package/dist/section-plane-geometry.d.ts +24 -0
  342. package/dist/section-plane-geometry.d.ts.map +1 -0
  343. package/dist/section-plane-geometry.js +93 -0
  344. package/dist/section-plane-geometry.js.map +1 -0
  345. package/dist/section-plane.d.ts +23 -24
  346. package/dist/section-plane.d.ts.map +1 -1
  347. package/dist/section-plane.js +58 -174
  348. package/dist/section-plane.js.map +1 -1
  349. package/dist/shaders/ao.wgsl.d.ts +2 -0
  350. package/dist/shaders/ao.wgsl.d.ts.map +1 -0
  351. package/dist/shaders/ao.wgsl.js +234 -0
  352. package/dist/shaders/ao.wgsl.js.map +1 -0
  353. package/dist/shaders/color-transfer.wgsl.d.ts +26 -0
  354. package/dist/shaders/color-transfer.wgsl.d.ts.map +1 -0
  355. package/dist/shaders/color-transfer.wgsl.js +53 -0
  356. package/dist/shaders/color-transfer.wgsl.js.map +1 -0
  357. package/dist/shaders/depth-reconstruct.wgsl.d.ts +16 -0
  358. package/dist/shaders/depth-reconstruct.wgsl.d.ts.map +1 -0
  359. package/dist/shaders/depth-reconstruct.wgsl.js +69 -0
  360. package/dist/shaders/depth-reconstruct.wgsl.js.map +1 -0
  361. package/dist/shaders/main-rte-shadow.wgsl.d.ts +4 -0
  362. package/dist/shaders/main-rte-shadow.wgsl.d.ts.map +1 -0
  363. package/dist/shaders/main-rte-shadow.wgsl.js +54 -0
  364. package/dist/shaders/main-rte-shadow.wgsl.js.map +1 -0
  365. package/dist/shaders/main.wgsl.d.ts +1 -6
  366. package/dist/shaders/main.wgsl.d.ts.map +1 -1
  367. package/dist/shaders/main.wgsl.js +110 -159
  368. package/dist/shaders/main.wgsl.js.map +1 -1
  369. package/dist/shaders/relative-to-eye.wgsl.d.ts +12 -0
  370. package/dist/shaders/relative-to-eye.wgsl.d.ts.map +1 -0
  371. package/dist/shaders/relative-to-eye.wgsl.js +40 -0
  372. package/dist/shaders/relative-to-eye.wgsl.js.map +1 -0
  373. package/dist/shaders/section-2d-overlay.wgsl.d.ts +28 -12
  374. package/dist/shaders/section-2d-overlay.wgsl.d.ts.map +1 -1
  375. package/dist/shaders/section-2d-overlay.wgsl.js +40 -13
  376. package/dist/shaders/section-2d-overlay.wgsl.js.map +1 -1
  377. package/dist/shaders/shadow.wgsl.d.ts +1 -1
  378. package/dist/shaders/shadow.wgsl.d.ts.map +1 -1
  379. package/dist/shaders/shadow.wgsl.js +25 -7
  380. package/dist/shaders/shadow.wgsl.js.map +1 -1
  381. package/dist/shaders/sky.wgsl.d.ts +1 -11
  382. package/dist/shaders/sky.wgsl.d.ts.map +1 -1
  383. package/dist/shaders/sky.wgsl.js +17 -19
  384. package/dist/shaders/sky.wgsl.js.map +1 -1
  385. package/dist/shaders/symbolic-overlay.wgsl.d.ts +2 -9
  386. package/dist/shaders/symbolic-overlay.wgsl.d.ts.map +1 -1
  387. package/dist/shaders/symbolic-overlay.wgsl.js +88 -17
  388. package/dist/shaders/symbolic-overlay.wgsl.js.map +1 -1
  389. package/dist/shaders/textured.wgsl.d.ts.map +1 -1
  390. package/dist/shaders/textured.wgsl.js +11 -9
  391. package/dist/shaders/textured.wgsl.js.map +1 -1
  392. package/dist/shadow-light-matrix.d.ts +7 -0
  393. package/dist/shadow-light-matrix.d.ts.map +1 -1
  394. package/dist/shadow-light-matrix.js +11 -0
  395. package/dist/shadow-light-matrix.js.map +1 -1
  396. package/dist/shadow-occluder-batches.d.ts +10 -0
  397. package/dist/shadow-occluder-batches.d.ts.map +1 -0
  398. package/dist/shadow-occluder-batches.js +39 -0
  399. package/dist/shadow-occluder-batches.js.map +1 -0
  400. package/dist/shadow-occluders.d.ts.map +1 -1
  401. package/dist/shadow-occluders.js +4 -0
  402. package/dist/shadow-occluders.js.map +1 -1
  403. package/dist/shadow-pass.d.ts +5 -51
  404. package/dist/shadow-pass.d.ts.map +1 -1
  405. package/dist/shadow-pass.js +49 -45
  406. package/dist/shadow-pass.js.map +1 -1
  407. package/dist/shadow-types.d.ts +39 -0
  408. package/dist/shadow-types.d.ts.map +1 -0
  409. package/dist/shadow-types.js +15 -0
  410. package/dist/shadow-types.js.map +1 -0
  411. package/dist/symbolic-overlay-geometry.d.ts +7 -0
  412. package/dist/symbolic-overlay-geometry.d.ts.map +1 -0
  413. package/dist/symbolic-overlay-geometry.js +43 -0
  414. package/dist/symbolic-overlay-geometry.js.map +1 -0
  415. package/dist/symbolic-overlay-pipelines.d.ts +24 -36
  416. package/dist/symbolic-overlay-pipelines.d.ts.map +1 -1
  417. package/dist/symbolic-overlay-pipelines.js +175 -182
  418. package/dist/symbolic-overlay-pipelines.js.map +1 -1
  419. package/dist/symbolic-text-atlas.d.ts +21 -0
  420. package/dist/symbolic-text-atlas.d.ts.map +1 -1
  421. package/dist/symbolic-text-atlas.js +29 -1
  422. package/dist/symbolic-text-atlas.js.map +1 -1
  423. package/dist/types.d.ts +20 -26
  424. package/dist/types.d.ts.map +1 -1
  425. package/dist/visual-enhancement.d.ts +23 -1
  426. package/dist/visual-enhancement.d.ts.map +1 -1
  427. package/dist/visual-enhancement.js +38 -12
  428. package/dist/visual-enhancement.js.map +1 -1
  429. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"camera-projection.js","sourceRoot":"","sources":["../src/camera-projection.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAExE;;;;;;;;GAQG;AACH,SAAS,SAAS,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,MAAc;IAC9E,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;IACpG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAER;IACA;IAFnB,YACmB,KAA0B,EAC1B,cAA0B;QAD1B,UAAK,GAAL,KAAK,CAAqB;QAC1B,mBAAc,GAAd,cAAc,CAAY;IAC1C,CAAC;IAEJ;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,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QAElC,qCAAqC;QACrC,4DAA4D;QAC5D,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG;YAC3B,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAI,QAAQ;YACxC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAI,QAAQ;YACxC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAI,QAAQ;SACzC,CAAC;QAEF,0EAA0E;QAC1E,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,mBAAmB,CAAC,SAAiB;QACnC,+DAA+D;IACjE,CAAC;CACF"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Zoom toward the surface under the cursor (#5393).
3
+ *
4
+ * Plain wheel zoom anchors on the plane through the orbit target and dollies
5
+ * the target forward by half of every step (`CameraControls.zoomPerspective`,
6
+ * the anti-"Zeno" dolly), so its step has no relation to how far the surface
7
+ * under the cursor is: repeated notches pass straight through a pipe or a
8
+ * small building into empty space.
9
+ *
10
+ * With a picked surface point P, each notch instead moves the camera along the
11
+ * cursor ray toward P by a fraction of the REMAINING distance, down to a
12
+ * standoff. That approaches the surface asymptotically and never reaches it.
13
+ * The camera is translated, not rotated, so P stays under the cursor; the
14
+ * orbit target is re-seated on the view axis at P's depth, so orbit and pan
15
+ * afterwards scale with the surface the user zoomed to rather than with the
16
+ * old, now far-behind, target.
17
+ */
18
+ import type { Vec3 } from './types.js';
19
+ /** Closest the camera gets to the picked surface, in scene units (metres). */
20
+ export declare const SURFACE_ZOOM_MIN_STANDOFF = 0.02;
21
+ export interface SurfaceZoomPose {
22
+ position: Vec3;
23
+ target: Vec3;
24
+ }
25
+ /**
26
+ * One zoom-in notch toward `point`. `fraction` in (0, 1) is the share of the
27
+ * remaining distance to cover. Returns the new pose, or null when the point is
28
+ * unusable (non-finite, at the eye, or not in front of the camera), in which
29
+ * case the caller falls back to plain zoom.
30
+ */
31
+ export declare function surfaceZoomStep(pose: SurfaceZoomPose, point: Vec3, fraction: number): SurfaceZoomPose | null;
32
+ //# sourceMappingURL=camera-surface-zoom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"camera-surface-zoom.d.ts","sourceRoot":"","sources":["../src/camera-surface-zoom.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;CACd;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAuB5G"}
@@ -0,0 +1,37 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /** Closest the camera gets to the picked surface, in scene units (metres). */
5
+ export const SURFACE_ZOOM_MIN_STANDOFF = 0.02;
6
+ /**
7
+ * One zoom-in notch toward `point`. `fraction` in (0, 1) is the share of the
8
+ * remaining distance to cover. Returns the new pose, or null when the point is
9
+ * unusable (non-finite, at the eye, or not in front of the camera), in which
10
+ * case the caller falls back to plain zoom.
11
+ */
12
+ export function surfaceZoomStep(pose, point, fraction) {
13
+ const { position: p, target: t } = pose;
14
+ if (![point.x, point.y, point.z].every(Number.isFinite) || !(fraction > 0 && fraction < 1))
15
+ return null;
16
+ const fx = t.x - p.x, fy = t.y - p.y, fz = t.z - p.z;
17
+ const fLen = Math.hypot(fx, fy, fz);
18
+ if (!(fLen > 0) || !Number.isFinite(fLen))
19
+ return null;
20
+ const forward = { x: fx / fLen, y: fy / fLen, z: fz / fLen };
21
+ const toX = point.x - p.x, toY = point.y - p.y, toZ = point.z - p.z;
22
+ const dist = Math.hypot(toX, toY, toZ);
23
+ const depth0 = toX * forward.x + toY * forward.y + toZ * forward.z;
24
+ // A point behind the eye (or on it) is no surface to approach.
25
+ if (!(dist > 0) || !(depth0 > 0))
26
+ return null;
27
+ // Moving along the cursor ray scales the point's depth (its distance along
28
+ // the view axis, which is what the near plane clips) by the same factor as
29
+ // its distance, so the standoff is enforced on depth: an off-axis point is
30
+ // shallower than it is far.
31
+ const next = Math.max(dist * (1 - fraction), (SURFACE_ZOOM_MIN_STANDOFF * dist) / depth0);
32
+ const k = next < dist ? 1 - next / dist : 0; // at the standoff: hold still, never pass
33
+ const position = { x: p.x + toX * k, y: p.y + toY * k, z: p.z + toZ * k };
34
+ const d = depth0 * (1 - k); // the point's depth after the move, >= the standoff
35
+ return { position, target: { x: position.x + forward.x * d, y: position.y + forward.y * d, z: position.z + forward.z * d } };
36
+ }
37
+ //# sourceMappingURL=camera-surface-zoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"camera-surface-zoom.js","sourceRoot":"","sources":["../src/camera-surface-zoom.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAsB/D,8EAA8E;AAC9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAO9C;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAqB,EAAE,KAAW,EAAE,QAAgB;IAClF,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ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,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,yBAAyB,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;IAC1F,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0CAA0C;IACvF,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC;IAC1E,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,oDAAoD;IAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;AAC/H,CAAC"}
package/dist/camera.d.ts CHANGED
@@ -8,17 +8,20 @@ import type { Vec3, Mat4 } from './types.js';
8
8
  import { type InteractionMode } from './camera-controls.js';
9
9
  import type { ProjectionMode } from './camera-state.js';
10
10
  import { type Bounds3, type FitPolicy } from './camera-fit-policy.js';
11
+ import { RelativeToEyeFrame } from './relative-to-eye.js';
11
12
  export declare class Camera {
12
13
  private state;
13
14
  private controls;
14
15
  private animator;
15
16
  private projection;
16
17
  private firstPerson;
18
+ private orientation;
19
+ /** The sole renderer camera frame used by all RTE-capable consumers. */
20
+ private readonly relativeToEyeFrame;
21
+ /** Mirror of the controls' gate, for the surface zoom below (#5393). */
22
+ private interactionMode;
17
23
  constructor();
18
- /**
19
- * Cold-path convenience for this class's own setters. The hot path uses the
20
- * closure built in the constructor; see the note there.
21
- */
24
+ /** Publish both camera frames after every setter, gesture and animation. */
22
25
  private updateMatrices;
23
26
  /**
24
27
  * Set camera aspect ratio
@@ -66,8 +69,15 @@ export declare class Camera {
66
69
  * @param mouseY - Mouse Y position in canvas coordinates
67
70
  * @param canvasWidth - Canvas width
68
71
  * @param canvasHeight - Canvas height
72
+ * @param fastZoom - Pure dolly (Shift / Cesium): the full step translates the rig
73
+ * @param surfacePoint - World point on the visible surface under the cursor
74
+ * (#5393). Zooming IN approaches it and stops short of it; it is ignored
75
+ * for zoom-out, fast zoom and orthographic. The surface step applies no
76
+ * inertia, so `addVelocity` has no effect on it.
69
77
  */
70
- zoom(delta: number, addVelocity?: boolean, mouseX?: number, mouseY?: number, canvasWidth?: number, canvasHeight?: number, fastZoom?: boolean): void;
78
+ zoom(delta: number, addVelocity?: boolean, mouseX?: number, mouseY?: number, canvasWidth?: number, canvasHeight?: number, fastZoom?: boolean, surfacePoint?: Vec3): void;
79
+ /** One zoom-in notch toward a picked surface point; false = not applied. */
80
+ private zoomTowardSurface;
71
81
  /**
72
82
  * Fit view to bounding box. Sets camera to southeast isometric view (typical
73
83
  * BIM starting view). Y-up coordinate system: Y is vertical
@@ -145,6 +155,13 @@ export declare class Camera {
145
155
  */
146
156
  reset(): void;
147
157
  getViewProjMatrix(): Mat4;
158
+ /** The reverse-Z projection matrix (perspective or orthographic); a copy. */
159
+ getProjMatrix(): Mat4;
160
+ /**
161
+ * Return the shared RTE frame for the current camera state. GPU consumers
162
+ * must use this instead of deriving a second camera rebase.
163
+ */
164
+ getRelativeToEyeFrame(): RelativeToEyeFrame;
148
165
  getPosition(): Vec3;
149
166
  getTarget(): Vec3;
150
167
  /**
@@ -158,73 +175,27 @@ export declare class Camera {
158
175
  /**
159
176
  * The aspect ratio (width / height) the projection is currently built from.
160
177
  *
161
- * This is the DRAWING BUFFER's ratio, not the CSS box's: the render loop
162
- * floors the canvas width to a multiple of 64 for WebGPU's 256-byte texture
163
- * row alignment before calling {@link setAspect}, so on a viewport whose CSS
164
- * width is not a multiple of 64 the two differ by up to 63 pixels.
178
+ * This is the DRAWING BUFFER's ratio. Since #5383 the buffer is the CSS box
179
+ * scaled by one pixel ratio on both axes, so the two agree up to integer
180
+ * rounding of the buffer (the width used to be floored to a multiple of 64,
181
+ * which made them differ by up to 63 pixels).
165
182
  *
166
- * That is the right one for BCF (#3612). A viewpoint's snapshot PNG comes
167
- * from `canvas.toDataURL()`, which encodes that same drawing buffer, so the
168
- * `<AspectRatio>` written beside it describes the image actually in the
169
- * archive; the CSS ratio would describe an image nobody has. It is also the
170
- * ratio the projection matrix used, so a viewer restoring the camera
171
- * reproduces the framing rather than one 63 pixels wider.
183
+ * The buffer ratio is the right one for BCF (#3612). A viewpoint's snapshot
184
+ * PNG comes from `canvas.toDataURL()`, which encodes that same drawing
185
+ * buffer, so the `<AspectRatio>` written beside it describes the image
186
+ * actually in the archive. It is also the ratio the projection matrix used,
187
+ * so a viewer restoring the camera reproduces the framing.
172
188
  *
173
189
  * Always finite and positive -- {@link setAspect} rejects anything else --
174
190
  * which is what BCF 3.0's `PositiveDouble` schema type requires.
175
191
  */
176
192
  getAspect(): number;
177
- /**
178
- * Get distance from camera position to target.
179
- *
180
- * Deliberately **unsanitized**: it reports the pose as it actually is, so a
181
- * malformed one (a BCF viewpoint restored from a file reaches the public
182
- * setters unvalidated) yields NaN rather than a substituted number. This is
183
- * a measurement, not a control input: it is what `useBCF` reads back when
184
- * restoring a viewpoint and what the BCF overlay scales markers by. There is
185
- * no substitute that is right for every reader — a plausible-looking `1`
186
- * would place every restored target one unit from the eye — and returning a
187
- * number here would contradict `getPosition()`/`getTarget()`, which are raw,
188
- * leaving callers no way to tell that the pose is broken. Gesture code inside
189
- * this package guards with {@link isUsableDistance} instead; each gesture
190
- * needs a different fallback. Callers OUTSIDE the package cannot use that
191
- * predicate (it is package-internal) and are not all guarded — see #2466 for
192
- * the viewpoint-restore path (#2441).
193
- */
193
+ /** Raw pose distance; non-finite source poses remain observable. */
194
194
  getDistance(): number;
195
- /**
196
- * Get current camera rotation angles in degrees
197
- * Returns { azimuth, elevation } where:
198
- * - azimuth: horizontal rotation (0-360), 0 = front
199
- * - elevation: vertical rotation (-90 to 90), 0 = horizon
200
- */
201
195
  getRotation(): {
202
196
  azimuth: number;
203
197
  elevation: number;
204
198
  };
205
- /**
206
- * Place the camera at an ABSOLUTE orientation around its current target,
207
- * in the same angle convention {@link getRotation} reports — the exact
208
- * inverse of it, so `setRotation(a, e)` then `getRotation()` returns
209
- * `{ azimuth: a, elevation: e }` (modulo the normalisation and pole clamp
210
- * below).
211
- *
212
- * This is the only absolute-orientation entry point on the camera. Everything
213
- * else is relative (`orbit`, and the viewer's 90° rotate steppers built on it)
214
- * or names a direction rather than an angle (`setPresetView`), which is why a
215
- * host command that says "go to azimuth 120°, elevation 30°" had nothing to
216
- * call and silently did nothing (#2934).
217
- *
218
- * The orbit radius and the target are preserved — this rotates the camera on
219
- * its current sphere, it does not reframe. `up` is reset to world Y, matching
220
- * `orbit`, so the reported azimuth comes back through `getRotation`'s
221
- * position-based branch.
222
- *
223
- * @param azimuth Horizontal angle in degrees; normalised into [0, 360).
224
- * @param elevation Vertical angle in degrees, 0 = horizon. Clamped to just
225
- * inside ±90° (the same `MIN_PHI` margin `orbit` uses) — the exact poles
226
- * collapse `cross(forward, up)` and flip the model.
227
- */
228
199
  setRotation(azimuth: number, elevation: number): void;
229
200
  /**
230
201
  * Unproject screen coordinates to a ray in world space
@@ -1 +1 @@
1
- {"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../src/camera.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,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,CAAC;QAAC,GAAG,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;CAGtH"}
package/dist/camera.js CHANGED
@@ -6,9 +6,12 @@ import { CameraControls } from './camera-controls.js';
6
6
  import { CameraAnimator } from './camera-animation.js';
7
7
  import { CameraProjection } from './camera-projection.js';
8
8
  import { FirstPersonNavigator } from './camera-first-person.js';
9
- import { updateCameraMatrices } from './camera-matrices.js';
9
+ import { updateCameraMatrices, updateCameraRelativeFrame } from './camera-matrices.js';
10
+ import { CameraOrientation } from './camera-orientation.js';
10
11
  import { pickFitPolicy } from './camera-fit-policy.js';
11
- import { areFiniteNumbers, DEFAULT_ORTHO_SIZE, isUsableBounds, isUsableDistance, usableOrthoSize, } from './camera-guards.js';
12
+ import { DEFAULT_ORTHO_SIZE, isUsableBounds, isUsableDistance, usableOrthoSize, } from './camera-guards.js';
13
+ import { RelativeToEyeFrame } from './relative-to-eye.js';
14
+ import { surfaceZoomStep } from './camera-surface-zoom.js';
12
15
  import { CAMERA_CONSTANTS } from './constants.js';
13
16
  export class Camera {
14
17
  state;
@@ -16,6 +19,11 @@ export class Camera {
16
19
  animator;
17
20
  projection;
18
21
  firstPerson;
22
+ orientation;
23
+ /** The sole renderer camera frame used by all RTE-capable consumers. */
24
+ relativeToEyeFrame = new RelativeToEyeFrame();
25
+ /** Mirror of the controls' gate, for the surface zoom below (#5393). */
26
+ interactionMode = 'all';
19
27
  constructor() {
20
28
  // Geometry is converted from IFC Z-up to WebGL Y-up during import
21
29
  this.state = {
@@ -36,24 +44,19 @@ export class Camera {
36
44
  sceneBounds: null,
37
45
  orbitAnchorBounds: null,
38
46
  };
39
- // Bound straight to the module-level function rather than to
40
- // `this.updateMatrices()`: this closure is the per-frame path every
41
- // sub-system drives the matrices through, and routing it via the private
42
- // method would add a hop to it. Depth is therefore unchanged from before
43
- // the extraction (closure → one call), and the callee is monomorphic.
44
- const updateMatrices = () => updateCameraMatrices(this.state);
47
+ // All pose writers publish the ordinary and relative frames together.
48
+ const updateMatrices = () => this.updateMatrices();
45
49
  this.controls = new CameraControls(this.state, updateMatrices);
46
- this.projection = new CameraProjection(this.state, updateMatrices);
50
+ this.projection = new CameraProjection(this.state, updateMatrices, this.relativeToEyeFrame);
47
51
  this.animator = new CameraAnimator(this.state, updateMatrices, this.controls, this.projection);
48
52
  this.firstPerson = new FirstPersonNavigator(this.state, updateMatrices);
53
+ this.orientation = new CameraOrientation(this.state, this.animator, updateMatrices);
49
54
  this.updateMatrices();
50
55
  }
51
- /**
52
- * Cold-path convenience for this class's own setters. The hot path uses the
53
- * closure built in the constructor; see the note there.
54
- */
56
+ /** Publish both camera frames after every setter, gesture and animation. */
55
57
  updateMatrices() {
56
58
  updateCameraMatrices(this.state);
59
+ updateCameraRelativeFrame(this.state, this.relativeToEyeFrame);
57
60
  }
58
61
  /**
59
62
  * Set camera aspect ratio
@@ -117,6 +120,7 @@ export class Camera {
117
120
  }
118
121
  /** Restrict interactive orbit/pan/zoom (embed `controls` param, #2934). */
119
122
  setInteractionMode(mode) {
123
+ this.interactionMode = mode;
120
124
  this.controls.setInteractionMode(mode);
121
125
  }
122
126
  /**
@@ -159,8 +163,18 @@ export class Camera {
159
163
  * @param mouseY - Mouse Y position in canvas coordinates
160
164
  * @param canvasWidth - Canvas width
161
165
  * @param canvasHeight - Canvas height
162
- */
163
- zoom(delta, addVelocity = false, mouseX, mouseY, canvasWidth, canvasHeight, fastZoom) {
166
+ * @param fastZoom - Pure dolly (Shift / Cesium): the full step translates the rig
167
+ * @param surfacePoint - World point on the visible surface under the cursor
168
+ * (#5393). Zooming IN approaches it and stops short of it; it is ignored
169
+ * for zoom-out, fast zoom and orthographic. The surface step applies no
170
+ * inertia, so `addVelocity` has no effect on it.
171
+ */
172
+ zoom(delta, addVelocity = false, mouseX, mouseY, canvasWidth, canvasHeight, fastZoom, surfacePoint) {
173
+ // Zooming IN over geometry approaches the picked surface instead of the
174
+ // target plane, so repeated notches stop short of it (#5393). Pure dolly
175
+ // (fast zoom, Cesium) and orthographic keep the plain path.
176
+ if (surfacePoint && delta < 0 && !fastZoom && this.zoomTowardSurface(delta, surfacePoint))
177
+ return;
164
178
  // Gate inertia on whether `zoom` applied, same reason as `orbit` above (#2934 review).
165
179
  if (!this.controls.zoom(delta, mouseX, mouseY, canvasWidth, canvasHeight, fastZoom))
166
180
  return;
@@ -169,6 +183,23 @@ export class Camera {
169
183
  this.animator.addZoomVelocity(normalizedDelta);
170
184
  }
171
185
  }
186
+ /** One zoom-in notch toward a picked surface point; false = not applied. */
187
+ zoomTowardSurface(delta, point) {
188
+ // Same gate as CameraControls.zoom: only 'all' may dolly (#2934).
189
+ if (this.interactionMode !== 'all' || this.state.projectionMode !== 'perspective')
190
+ return false;
191
+ const fraction = Math.min(Math.abs(delta) * CAMERA_CONSTANTS.ZOOM_SENSITIVITY, CAMERA_CONSTANTS.MAX_ZOOM_DELTA);
192
+ const next = surfaceZoomStep(this.state.camera, point, fraction);
193
+ if (!next)
194
+ return false;
195
+ // The orbit centre is left where it is on purpose: the mouse path re-seats
196
+ // it on every orbit start, and the new target already sits at the surface.
197
+ // In place, like every other pose writer: callers may hold these objects.
198
+ Object.assign(this.state.camera.position, next.position);
199
+ Object.assign(this.state.camera.target, next.target);
200
+ this.updateMatrices();
201
+ return true;
202
+ }
172
203
  /**
173
204
  * Fit view to bounding box. Sets camera to southeast isometric view (typical
174
205
  * BIM starting view). Y-up coordinate system: Y is vertical
@@ -310,7 +341,18 @@ export class Camera {
310
341
  this.state.orbitAnchorBounds = null;
311
342
  }
312
343
  getViewProjMatrix() {
313
- return this.state.viewProjMatrix;
344
+ return { m: new Float32Array(this.state.viewProjMatrix.m) };
345
+ }
346
+ /** The reverse-Z projection matrix (perspective or orthographic); a copy. */
347
+ getProjMatrix() {
348
+ return { m: new Float32Array(this.state.projMatrix.m) };
349
+ }
350
+ /**
351
+ * Return the shared RTE frame for the current camera state. GPU consumers
352
+ * must use this instead of deriving a second camera rebase.
353
+ */
354
+ getRelativeToEyeFrame() {
355
+ return this.relativeToEyeFrame;
314
356
  }
315
357
  getPosition() {
316
358
  return { ...this.state.camera.position };
@@ -333,17 +375,16 @@ export class Camera {
333
375
  /**
334
376
  * The aspect ratio (width / height) the projection is currently built from.
335
377
  *
336
- * This is the DRAWING BUFFER's ratio, not the CSS box's: the render loop
337
- * floors the canvas width to a multiple of 64 for WebGPU's 256-byte texture
338
- * row alignment before calling {@link setAspect}, so on a viewport whose CSS
339
- * width is not a multiple of 64 the two differ by up to 63 pixels.
378
+ * This is the DRAWING BUFFER's ratio. Since #5383 the buffer is the CSS box
379
+ * scaled by one pixel ratio on both axes, so the two agree up to integer
380
+ * rounding of the buffer (the width used to be floored to a multiple of 64,
381
+ * which made them differ by up to 63 pixels).
340
382
  *
341
- * That is the right one for BCF (#3612). A viewpoint's snapshot PNG comes
342
- * from `canvas.toDataURL()`, which encodes that same drawing buffer, so the
343
- * `<AspectRatio>` written beside it describes the image actually in the
344
- * archive; the CSS ratio would describe an image nobody has. It is also the
345
- * ratio the projection matrix used, so a viewer restoring the camera
346
- * reproduces the framing rather than one 63 pixels wider.
383
+ * The buffer ratio is the right one for BCF (#3612). A viewpoint's snapshot
384
+ * PNG comes from `canvas.toDataURL()`, which encodes that same drawing
385
+ * buffer, so the `<AspectRatio>` written beside it describes the image
386
+ * actually in the archive. It is also the ratio the projection matrix used,
387
+ * so a viewer restoring the camera reproduces the framing.
347
388
  *
348
389
  * Always finite and positive -- {@link setAspect} rejects anything else --
349
390
  * which is what BCF 3.0's `PositiveDouble` schema type requires.
@@ -351,147 +392,10 @@ export class Camera {
351
392
  getAspect() {
352
393
  return this.state.camera.aspect;
353
394
  }
354
- /**
355
- * Get distance from camera position to target.
356
- *
357
- * Deliberately **unsanitized**: it reports the pose as it actually is, so a
358
- * malformed one (a BCF viewpoint restored from a file reaches the public
359
- * setters unvalidated) yields NaN rather than a substituted number. This is
360
- * a measurement, not a control input: it is what `useBCF` reads back when
361
- * restoring a viewpoint and what the BCF overlay scales markers by. There is
362
- * no substitute that is right for every reader — a plausible-looking `1`
363
- * would place every restored target one unit from the eye — and returning a
364
- * number here would contradict `getPosition()`/`getTarget()`, which are raw,
365
- * leaving callers no way to tell that the pose is broken. Gesture code inside
366
- * this package guards with {@link isUsableDistance} instead; each gesture
367
- * needs a different fallback. Callers OUTSIDE the package cannot use that
368
- * predicate (it is package-internal) and are not all guarded — see #2466 for
369
- * the viewpoint-restore path (#2441).
370
- */
371
- getDistance() {
372
- const dir = {
373
- x: this.state.camera.position.x - this.state.camera.target.x,
374
- y: this.state.camera.position.y - this.state.camera.target.y,
375
- z: this.state.camera.position.z - this.state.camera.target.z,
376
- };
377
- return Math.sqrt(dir.x * dir.x + dir.y * dir.y + dir.z * dir.z);
378
- }
379
- /**
380
- * Get current camera rotation angles in degrees
381
- * Returns { azimuth, elevation } where:
382
- * - azimuth: horizontal rotation (0-360), 0 = front
383
- * - elevation: vertical rotation (-90 to 90), 0 = horizon
384
- */
385
- getRotation() {
386
- const dir = {
387
- x: this.state.camera.position.x - this.state.camera.target.x,
388
- y: this.state.camera.position.y - this.state.camera.target.y,
389
- z: this.state.camera.position.z - this.state.camera.target.z,
390
- };
391
- const distance = Math.sqrt(dir.x * dir.x + dir.y * dir.y + dir.z * dir.z);
392
- // `distance < 1e-6` alone is a magnitude test, not a finiteness one: the
393
- // comparison is false for NaN, so a malformed pose fell through the guard
394
- // that looked like it was catching it, and `Math.asin(Math.max(-1,
395
- // Math.min(1, NaN)))` is NaN — a NaN elevation that leaves the renderer
396
- // entirely, into the viewer's rotation readout and the measurement
397
- // handlers (#2441). Same neutral answer as the degenerate pose, which is
398
- // preserved verbatim.
399
- if (!isUsableDistance(distance, 1e-6))
400
- return { azimuth: 0, elevation: 0 };
401
- // Elevation: angle from horizontal plane
402
- const elevation = Math.asin(Math.max(-1, Math.min(1, dir.y / distance))) * 180 / Math.PI;
403
- // Calculate azimuth smoothly using up vector
404
- // The up vector defines the "screen up" direction, which determines rotation
405
- const upX = this.state.camera.up.x;
406
- const upY = this.state.camera.up.y;
407
- const upZ = this.state.camera.up.z;
408
- // Project up vector onto horizontal plane (XZ plane)
409
- const upLen = Math.sqrt(upX * upX + upZ * upZ);
410
- let azimuth;
411
- if (upLen > 0.01) {
412
- // Use up vector projection for azimuth (smooth and consistent)
413
- azimuth = (Math.atan2(-upX, -upZ) * 180 / Math.PI + 360) % 360;
414
- // For bottom view, flip azimuth
415
- if (elevation < -80 && upY < 0) {
416
- azimuth = (azimuth + 180) % 360;
417
- }
418
- }
419
- else {
420
- // Fallback: use position-based azimuth when up vector is vertical
421
- azimuth = (Math.atan2(dir.x, dir.z) * 180 / Math.PI + 360) % 360;
422
- }
423
- return { azimuth, elevation };
424
- }
425
- /**
426
- * Place the camera at an ABSOLUTE orientation around its current target,
427
- * in the same angle convention {@link getRotation} reports — the exact
428
- * inverse of it, so `setRotation(a, e)` then `getRotation()` returns
429
- * `{ azimuth: a, elevation: e }` (modulo the normalisation and pole clamp
430
- * below).
431
- *
432
- * This is the only absolute-orientation entry point on the camera. Everything
433
- * else is relative (`orbit`, and the viewer's 90° rotate steppers built on it)
434
- * or names a direction rather than an angle (`setPresetView`), which is why a
435
- * host command that says "go to azimuth 120°, elevation 30°" had nothing to
436
- * call and silently did nothing (#2934).
437
- *
438
- * The orbit radius and the target are preserved — this rotates the camera on
439
- * its current sphere, it does not reframe. `up` is reset to world Y, matching
440
- * `orbit`, so the reported azimuth comes back through `getRotation`'s
441
- * position-based branch.
442
- *
443
- * @param azimuth Horizontal angle in degrees; normalised into [0, 360).
444
- * @param elevation Vertical angle in degrees, 0 = horizon. Clamped to just
445
- * inside ±90° (the same `MIN_PHI` margin `orbit` uses) — the exact poles
446
- * collapse `cross(forward, up)` and flip the model.
447
- */
448
- setRotation(azimuth, elevation) {
449
- // Angles are an input class of their own, and both of them reach the
450
- // trigonometry below unguarded: a non-finite one writes a NaN position and
451
- // destroys an otherwise valid pose. Same rejection `orbit` applies to its
452
- // deltas — a rejected call changes nothing at all.
453
- if (!areFiniteNumbers(azimuth, elevation))
454
- return;
455
- // An in-flight tween or leftover inertia writes position/target on the next
456
- // `update()` and would erase this pose a frame later — a host that sends
457
- // SET_VIEW (animated) and then SET_CAMERA would end up at the preset. An
458
- // absolute placement supersedes whatever motion is still running, so cancel
459
- // it; this also drops the preset-view rotation cycle, which is correct
460
- // after the camera has been reoriented out from under it.
461
- this.animator.reset();
462
- const target = this.state.camera.target;
463
- const dir = {
464
- x: this.state.camera.position.x - target.x,
465
- y: this.state.camera.position.y - target.y,
466
- z: this.state.camera.position.z - target.z,
467
- };
468
- const current = Math.sqrt(dir.x * dir.x + dir.y * dir.y + dir.z * dir.z);
469
- // A degenerate pose (position === target, or a non-finite one) has no orbit
470
- // radius to preserve. Any positive radius yields a well-formed view matrix
471
- // at the requested direction, which is strictly better than propagating the
472
- // degeneracy — and leaves the caller's angles observable, which is the
473
- // whole point of the command.
474
- const distance = isUsableDistance(current, 1e-6) ? current : 1;
475
- // The TARGET is the other unguarded input, and `isUsableDistance` above only
476
- // rescues the radius. `setTarget` accepts non-finite coordinates, and every
477
- // position component below is `target.<axis> + ...`, so one NaN there makes
478
- // the whole pose NaN -- and this method's contract is that it RECOVERS a
479
- // pose, so silently writing an unrecoverable one is worse than refusing.
480
- // Same rejection shape as the angle guard at the top: change nothing.
481
- if (!areFiniteNumbers(target.x, target.y, target.z))
482
- return;
483
- const theta = ((((azimuth % 360) + 360) % 360) * Math.PI) / 180;
484
- const poleMargin = CAMERA_CONSTANTS.MIN_PHI;
485
- const phi = Math.max(poleMargin, Math.min(Math.PI - poleMargin, ((90 - elevation) * Math.PI) / 180));
486
- const sinPhi = Math.sin(phi);
487
- this.state.camera.position = {
488
- x: target.x + distance * sinPhi * Math.sin(theta),
489
- y: target.y + distance * Math.cos(phi),
490
- z: target.z + distance * sinPhi * Math.cos(theta),
491
- };
492
- this.state.camera.up = { x: 0, y: 1, z: 0 };
493
- this.updateMatrices();
494
- }
395
+ /** Raw pose distance; non-finite source poses remain observable. */
396
+ getDistance() { return this.orientation.getDistance(); }
397
+ getRotation() { return this.orientation.getRotation(); }
398
+ setRotation(azimuth, elevation) { this.orientation.setRotation(azimuth, elevation); }
495
399
  /**
496
400
  * Unproject screen coordinates to a ray in world space
497
401
  * @param screenX - X position in screen coordinates