@fps-games/editor 0.1.4-beta.5 → 0.1.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/build-info.json +16 -16
  2. package/dist/local-editor-harness.d.ts +24 -5
  3. package/dist/local-editor-harness.d.ts.map +1 -1
  4. package/dist/local-editor-harness.js +457 -91
  5. package/dist/local-editor-harness.js.map +1 -1
  6. package/dist/local-editor-performance-stats.d.ts +12 -0
  7. package/dist/local-editor-performance-stats.d.ts.map +1 -0
  8. package/dist/local-editor-performance-stats.js +46 -0
  9. package/dist/local-editor-performance-stats.js.map +1 -0
  10. package/dist/playable-babylon-facade.d.ts +2 -2
  11. package/dist/playable-babylon-facade.d.ts.map +1 -1
  12. package/dist/playable-babylon-facade.js +1 -1
  13. package/dist/playable-babylon-facade.js.map +1 -1
  14. package/dist/playable-babylon-rendering.d.ts +57 -12
  15. package/dist/playable-babylon-rendering.d.ts.map +1 -1
  16. package/dist/playable-babylon-rendering.js +529 -20
  17. package/dist/playable-babylon-rendering.js.map +1 -1
  18. package/dist/playable-local-editor-host.d.ts +10 -9
  19. package/dist/playable-local-editor-host.d.ts.map +1 -1
  20. package/dist/playable-local-editor-host.js.map +1 -1
  21. package/dist/playable-sdk.d.ts +5 -3
  22. package/dist/playable-sdk.d.ts.map +1 -1
  23. package/dist/playable-sdk.js +3 -2
  24. package/dist/playable-sdk.js.map +1 -1
  25. package/dist/static-shadow-cpu-worker.d.ts +7 -0
  26. package/dist/static-shadow-cpu-worker.d.ts.map +1 -0
  27. package/dist/static-shadow-cpu-worker.js +221 -0
  28. package/dist/static-shadow-cpu-worker.js.map +1 -0
  29. package/node_modules/@fps-games/babylon-renderer/dist/index.d.ts +3 -1
  30. package/node_modules/@fps-games/babylon-renderer/dist/index.d.ts.map +1 -1
  31. package/node_modules/@fps-games/babylon-renderer/dist/index.js +3 -1
  32. package/node_modules/@fps-games/babylon-renderer/dist/index.js.map +1 -1
  33. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts +4 -0
  34. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts.map +1 -0
  35. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js +584 -0
  36. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js.map +1 -0
  37. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts +61 -0
  38. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts.map +1 -0
  39. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js +382 -0
  40. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js.map +1 -0
  41. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts +47 -0
  42. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts.map +1 -0
  43. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.js +285 -0
  44. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.js.map +1 -0
  45. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.d.ts +88 -0
  46. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.d.ts.map +1 -0
  47. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js +813 -0
  48. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js.map +1 -0
  49. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.d.ts +27 -0
  50. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.d.ts.map +1 -0
  51. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.js +220 -0
  52. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.js.map +1 -0
  53. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.d.ts +35 -3
  54. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.d.ts.map +1 -1
  55. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.js +65 -609
  56. package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.js.map +1 -1
  57. package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts +169 -14
  58. package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts.map +1 -1
  59. package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js +9 -3
  60. package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js.map +1 -1
  61. package/node_modules/@fps-games/babylon-renderer/package.json +1 -1
  62. package/node_modules/@fps-games/editor-babylon/dist/index.d.ts +2 -0
  63. package/node_modules/@fps-games/editor-babylon/dist/index.d.ts.map +1 -1
  64. package/node_modules/@fps-games/editor-babylon/dist/index.js +2 -0
  65. package/node_modules/@fps-games/editor-babylon/dist/index.js.map +1 -1
  66. package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.d.ts +34 -0
  67. package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.d.ts.map +1 -0
  68. package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.js +272 -0
  69. package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.js.map +1 -0
  70. package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.d.ts +26 -0
  71. package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.d.ts.map +1 -0
  72. package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.js +312 -0
  73. package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.js.map +1 -0
  74. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.d.ts.map +1 -1
  75. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js +51 -29
  76. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js.map +1 -1
  77. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +6 -0
  78. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  79. package/node_modules/@fps-games/editor-babylon/dist/projection.js +69 -40
  80. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  81. package/node_modules/@fps-games/editor-babylon/dist/rendering.d.ts +19 -0
  82. package/node_modules/@fps-games/editor-babylon/dist/rendering.d.ts.map +1 -0
  83. package/node_modules/@fps-games/editor-babylon/dist/rendering.js +66 -0
  84. package/node_modules/@fps-games/editor-babylon/dist/rendering.js.map +1 -0
  85. package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts +5 -2
  86. package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts.map +1 -1
  87. package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js +65 -32
  88. package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js.map +1 -1
  89. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  90. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +19 -2
  91. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  92. package/node_modules/@fps-games/editor-babylon/package.json +5 -5
  93. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +1 -1
  94. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  95. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  96. package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.d.ts +8 -0
  97. package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.d.ts.map +1 -0
  98. package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.js +14 -0
  99. package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.js.map +1 -0
  100. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.d.ts +5 -0
  101. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.d.ts.map +1 -1
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.js +34 -1
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.js.map +1 -1
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.d.ts +47 -0
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.d.ts.map +1 -0
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js +404 -0
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js.map +1 -0
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +59 -0
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.d.ts.map +1 -1
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js +10 -2
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js.map +1 -1
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +17 -0
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts +1 -1
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts.map +1 -1
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js +12 -6
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js.map +1 -1
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  123. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +466 -42
  124. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  125. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +70 -5
  126. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  127. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +3 -1
  128. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  129. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +596 -5
  130. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  131. package/node_modules/@fps-games/editor-browser/package.json +3 -3
  132. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +14 -1
  133. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
  134. package/node_modules/@fps-games/editor-core/dist/editor-session.js +34 -10
  135. package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
  136. package/node_modules/@fps-games/editor-core/dist/inspector.d.ts +2 -1
  137. package/node_modules/@fps-games/editor-core/dist/inspector.d.ts.map +1 -1
  138. package/node_modules/@fps-games/editor-core/dist/inspector.js +11 -1
  139. package/node_modules/@fps-games/editor-core/dist/inspector.js.map +1 -1
  140. package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts +7 -0
  141. package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts.map +1 -1
  142. package/node_modules/@fps-games/editor-core/dist/serialized-object.js +1 -0
  143. package/node_modules/@fps-games/editor-core/dist/serialized-object.js.map +1 -1
  144. package/node_modules/@fps-games/editor-core/package.json +2 -2
  145. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  146. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.d.ts.map +1 -1
  147. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js +10 -5
  148. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js.map +1 -1
  149. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.d.ts.map +1 -1
  150. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js +3 -1
  151. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js.map +1 -1
  152. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts +4 -1
  153. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
  154. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +29 -0
  155. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
  156. package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts +10 -0
  157. package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts.map +1 -1
  158. package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.d.ts.map +1 -1
  159. package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js +3 -0
  160. package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js.map +1 -1
  161. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
  162. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
  163. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
  164. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
  165. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts +33 -2
  166. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts.map +1 -1
  167. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js +232 -16
  168. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js.map +1 -1
  169. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts +1 -1
  170. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts.map +1 -1
  171. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js +1 -1
  172. package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js.map +1 -1
  173. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts +12 -1
  174. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts.map +1 -1
  175. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js +153 -0
  176. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js.map +1 -1
  177. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.d.ts +4 -2
  178. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.d.ts.map +1 -1
  179. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.js +2 -1
  180. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.js.map +1 -1
  181. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.d.ts.map +1 -1
  182. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js +4 -1
  183. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js.map +1 -1
  184. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.d.ts +19 -0
  185. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.d.ts.map +1 -0
  186. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.js +57 -0
  187. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.js.map +1 -0
  188. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/types.d.ts +7 -1
  189. package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/types.d.ts.map +1 -1
  190. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.d.ts.map +1 -1
  191. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +620 -36
  192. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
  193. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.d.ts +8 -3
  194. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.d.ts.map +1 -1
  195. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.js +258 -10
  196. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.js.map +1 -1
  197. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +110 -3
  198. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
  199. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.d.ts.map +1 -1
  200. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js +25 -0
  201. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js.map +1 -1
  202. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts +2 -1
  203. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts.map +1 -1
  204. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  205. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +4 -0
  206. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  207. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.d.ts +9 -1
  208. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.d.ts.map +1 -1
  209. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.js +12 -1
  210. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.js.map +1 -1
  211. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +2 -0
  212. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
  213. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts +1 -0
  214. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts.map +1 -1
  215. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js +75 -0
  216. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js.map +1 -1
  217. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.d.ts +1 -0
  218. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.d.ts.map +1 -1
  219. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.js +1 -0
  220. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.js.map +1 -1
  221. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts +17 -0
  222. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts.map +1 -0
  223. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js +262 -0
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js.map +1 -0
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.d.ts.map +1 -1
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.js +7 -3
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.js.map +1 -1
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.d.ts +6 -0
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.d.ts.map +1 -1
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.js +31 -0
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.js.map +1 -1
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts +2 -1
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts.map +1 -1
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js +1 -1
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts.map +1 -1
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js +21 -9
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js.map +1 -1
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts +151 -0
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts.map +1 -0
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js +445 -0
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js.map +1 -0
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.d.ts +2 -0
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.d.ts.map +1 -0
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.js +2 -0
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.js.map +1 -0
  247. package/node_modules/@fps-games/editor-playable-sdk/package.json +3 -3
  248. package/node_modules/@fps-games/editor-protocol/package.json +1 -1
  249. package/package.json +8 -8
@@ -0,0 +1,272 @@
1
+ const EMPTY_PERFORMANCE_SNAPSHOT = {
2
+ drawCalls: null,
3
+ meshes: null,
4
+ activeMeshes: null,
5
+ meshClassCounts: null,
6
+ activeMeshClassCounts: null,
7
+ meshCategoryCounts: null,
8
+ activeMeshCategoryCounts: null,
9
+ materials: null,
10
+ textures: null,
11
+ lights: null,
12
+ cameras: null,
13
+ };
14
+ export function createBabylonEditorPerformanceMonitor(scene) {
15
+ let disposed = false;
16
+ let latestDrawCalls = null;
17
+ const cleanupCallbacks = [];
18
+ const sceneLike = isRecord(scene) ? scene : null;
19
+ if (sceneLike) {
20
+ addSceneObserver(cleanupCallbacks, sceneLike.onBeforeAnimationsObservable, () => {
21
+ readDrawCallsCounter(sceneLike)?.fetchNewFrame?.();
22
+ });
23
+ addSceneObserver(cleanupCallbacks, sceneLike.onAfterRenderObservable, () => {
24
+ latestDrawCalls = readFiniteNumber(readDrawCallsCounter(sceneLike)?.current);
25
+ });
26
+ }
27
+ return {
28
+ readSnapshot() {
29
+ if (disposed || !sceneLike)
30
+ return cloneBabylonPerformanceSnapshot(EMPTY_PERFORMANCE_SNAPSHOT);
31
+ const meshCensus = readMeshCensus(sceneLike);
32
+ return {
33
+ drawCalls: latestDrawCalls,
34
+ meshes: meshCensus?.meshCount ?? readCollectionCount(sceneLike.meshes),
35
+ activeMeshes: meshCensus?.activeMeshCount ?? readActiveMeshesCount(sceneLike),
36
+ meshClassCounts: cloneBabylonMeshClassCounts(meshCensus?.meshClassCounts ?? null),
37
+ activeMeshClassCounts: cloneBabylonMeshClassCounts(meshCensus?.activeMeshClassCounts ?? null),
38
+ meshCategoryCounts: cloneBabylonMeshCategoryCounts(meshCensus?.meshCategoryCounts ?? null),
39
+ activeMeshCategoryCounts: cloneBabylonMeshCategoryCounts(meshCensus?.activeMeshCategoryCounts ?? null),
40
+ materials: readCollectionCount(sceneLike.materials),
41
+ textures: readCollectionCount(sceneLike.textures),
42
+ lights: readCollectionCount(sceneLike.lights),
43
+ cameras: readCollectionCount(sceneLike.cameras),
44
+ };
45
+ },
46
+ dispose() {
47
+ if (disposed)
48
+ return;
49
+ disposed = true;
50
+ for (const cleanup of cleanupCallbacks.splice(0))
51
+ cleanup();
52
+ latestDrawCalls = null;
53
+ },
54
+ };
55
+ }
56
+ export function cloneBabylonPerformanceSnapshot(snapshot) {
57
+ return {
58
+ ...snapshot,
59
+ meshClassCounts: cloneBabylonMeshClassCounts(snapshot.meshClassCounts),
60
+ activeMeshClassCounts: cloneBabylonMeshClassCounts(snapshot.activeMeshClassCounts),
61
+ meshCategoryCounts: cloneBabylonMeshCategoryCounts(snapshot.meshCategoryCounts),
62
+ activeMeshCategoryCounts: cloneBabylonMeshCategoryCounts(snapshot.activeMeshCategoryCounts),
63
+ };
64
+ }
65
+ function addSceneObserver(cleanupCallbacks, observable, callback) {
66
+ if (!isBabylonObservableLike(observable))
67
+ return;
68
+ const observer = observable.add(callback);
69
+ cleanupCallbacks.push(() => observable.remove(observer));
70
+ }
71
+ function isBabylonObservableLike(value) {
72
+ return !!value
73
+ && typeof value === 'object'
74
+ && typeof value.add === 'function'
75
+ && typeof value.remove === 'function';
76
+ }
77
+ function isRecord(value) {
78
+ return !!value && typeof value === 'object';
79
+ }
80
+ function readDrawCallsCounter(scene) {
81
+ const engine = typeof scene?.getEngine === 'function' ? scene.getEngine() : null;
82
+ const counter = engine?._drawCalls;
83
+ return counter && typeof counter === 'object' ? counter : null;
84
+ }
85
+ function readActiveMeshesCount(scene) {
86
+ if (typeof scene?.getActiveMeshes !== 'function')
87
+ return null;
88
+ try {
89
+ return readCollectionCount(scene.getActiveMeshes());
90
+ }
91
+ catch {
92
+ return null;
93
+ }
94
+ }
95
+ function readMeshCensus(scene) {
96
+ const meshes = readCollectionItems(scene.meshes);
97
+ if (!meshes)
98
+ return null;
99
+ const activeMeshes = readActiveMeshItems(scene);
100
+ const activeMeshSet = activeMeshes ? new Set(activeMeshes) : null;
101
+ const meshClassCounts = createEmptyMeshClassCounts();
102
+ const meshCategoryCounts = createEmptyMeshCategoryCounts();
103
+ const activeMeshClassCounts = activeMeshSet ? createEmptyMeshClassCounts() : null;
104
+ const activeMeshCategoryCounts = activeMeshSet ? createEmptyMeshCategoryCounts() : null;
105
+ for (const mesh of meshes) {
106
+ const classKey = classifyMeshClass(mesh);
107
+ const categoryKey = classifyMeshCategory(mesh);
108
+ meshClassCounts[classKey] += 1;
109
+ meshCategoryCounts[categoryKey] += 1;
110
+ if (activeMeshSet?.has(mesh)) {
111
+ activeMeshClassCounts[classKey] += 1;
112
+ activeMeshCategoryCounts[categoryKey] += 1;
113
+ }
114
+ }
115
+ return {
116
+ meshCount: meshes.length,
117
+ activeMeshCount: activeMeshes?.length ?? null,
118
+ meshClassCounts,
119
+ activeMeshClassCounts,
120
+ meshCategoryCounts,
121
+ activeMeshCategoryCounts,
122
+ };
123
+ }
124
+ function readActiveMeshItems(scene) {
125
+ if (typeof scene?.getActiveMeshes !== 'function')
126
+ return null;
127
+ try {
128
+ return readCollectionItems(scene.getActiveMeshes());
129
+ }
130
+ catch {
131
+ return null;
132
+ }
133
+ }
134
+ function readCollectionItems(value) {
135
+ if (Array.isArray(value))
136
+ return value;
137
+ if (!value || typeof value !== 'object')
138
+ return null;
139
+ const data = value.data;
140
+ const length = readFiniteNumber(value.length);
141
+ if (Array.isArray(data) && length != null)
142
+ return data.slice(0, Math.max(0, Math.floor(length)));
143
+ if (length == null)
144
+ return null;
145
+ const items = [];
146
+ const indexed = value;
147
+ for (let index = 0; index < length; index += 1) {
148
+ if (!(index in indexed))
149
+ return null;
150
+ items.push(indexed[index]);
151
+ }
152
+ return items;
153
+ }
154
+ function readCollectionCount(value) {
155
+ if (!value || typeof value !== 'object')
156
+ return null;
157
+ const length = value.length;
158
+ return readFiniteNumber(length);
159
+ }
160
+ function readFiniteNumber(value) {
161
+ return typeof value === 'number' && Number.isFinite(value) ? value : null;
162
+ }
163
+ function createEmptyMeshClassCounts() {
164
+ return {
165
+ mesh: 0,
166
+ instancedMesh: 0,
167
+ linesMesh: 0,
168
+ groundMesh: 0,
169
+ other: 0,
170
+ };
171
+ }
172
+ function createEmptyMeshCategoryCounts() {
173
+ return {
174
+ assetMesh: 0,
175
+ primitiveMesh: 0,
176
+ staticProjectedShadow: 0,
177
+ editorHelper: 0,
178
+ uncategorized: 0,
179
+ };
180
+ }
181
+ function cloneBabylonMeshClassCounts(counts) {
182
+ return counts ? { ...counts } : null;
183
+ }
184
+ function cloneBabylonMeshCategoryCounts(counts) {
185
+ return counts ? { ...counts } : null;
186
+ }
187
+ function classifyMeshClass(mesh) {
188
+ const className = readMeshClassName(mesh);
189
+ if (className === 'InstancedMesh')
190
+ return 'instancedMesh';
191
+ if (className === 'LinesMesh')
192
+ return 'linesMesh';
193
+ if (className === 'GroundMesh')
194
+ return 'groundMesh';
195
+ if (className === 'Mesh')
196
+ return 'mesh';
197
+ return 'other';
198
+ }
199
+ function readMeshClassName(mesh) {
200
+ if (!isRecord(mesh))
201
+ return '';
202
+ const getClassName = mesh.getClassName;
203
+ if (typeof getClassName === 'function') {
204
+ try {
205
+ const className = getClassName.call(mesh);
206
+ return typeof className === 'string' ? className : '';
207
+ }
208
+ catch {
209
+ return '';
210
+ }
211
+ }
212
+ const constructorName = mesh.constructor?.name;
213
+ return typeof constructorName === 'string' ? constructorName : '';
214
+ }
215
+ function classifyMeshCategory(mesh) {
216
+ const projection = readEditorProjectionMetadata(mesh);
217
+ const runtimeKind = typeof projection?.runtimeKind === 'string' ? projection.runtimeKind : '';
218
+ if (isStaticProjectedShadowMesh(mesh))
219
+ return 'staticProjectedShadow';
220
+ if (runtimeKind === 'camera' || runtimeKind === 'light' || projection?.helper != null || isEditorHelperMesh(mesh)) {
221
+ return 'editorHelper';
222
+ }
223
+ if (runtimeKind === 'assetMesh')
224
+ return 'assetMesh';
225
+ if (runtimeKind === 'primitive' || projection?.primitiveShape != null)
226
+ return 'primitiveMesh';
227
+ return 'uncategorized';
228
+ }
229
+ function readEditorProjectionMetadata(mesh) {
230
+ if (!isRecord(mesh))
231
+ return null;
232
+ const metadata = isRecord(mesh.metadata) ? mesh.metadata : null;
233
+ const projection = metadata && isRecord(metadata.editorProjection) ? metadata.editorProjection : null;
234
+ return projection;
235
+ }
236
+ function isStaticProjectedShadowMesh(mesh) {
237
+ if (!isRecord(mesh))
238
+ return false;
239
+ const metadata = isRecord(mesh.metadata) ? mesh.metadata : null;
240
+ if (metadata?.staticProjectedShadowInternal === true)
241
+ return true;
242
+ const material = isRecord(mesh.material) ? mesh.material : null;
243
+ return hasPerformanceNameFragment(mesh, 'staticProjected')
244
+ || hasPerformanceNameFragment(material, 'staticProjected');
245
+ }
246
+ function isEditorHelperMesh(mesh) {
247
+ if (!isRecord(mesh))
248
+ return false;
249
+ const metadata = isRecord(mesh.metadata) ? mesh.metadata : null;
250
+ if (metadata?.editorProjectionHelper === true)
251
+ return true;
252
+ const material = isRecord(mesh.material) ? mesh.material : null;
253
+ return hasPerformanceNameFragment(mesh, 'editor.world.sky')
254
+ || hasPerformanceNameFragment(mesh, 'editor-grid')
255
+ || hasPerformanceNameFragment(mesh, 'editorGrid')
256
+ || hasPerformanceNameFragment(mesh, 'grid-screen-layer')
257
+ || hasPerformanceNameFragment(material, 'editor.world.sky')
258
+ || hasPerformanceNameFragment(material, 'editor-grid')
259
+ || hasPerformanceNameFragment(material, 'editorGrid')
260
+ || hasPerformanceNameFragment(material, 'grid-screen-layer');
261
+ }
262
+ function hasPerformanceNameFragment(value, fragment) {
263
+ if (!isRecord(value))
264
+ return false;
265
+ return readPerformanceNameCandidates(value)
266
+ .some(candidate => candidate.includes(fragment));
267
+ }
268
+ function readPerformanceNameCandidates(value) {
269
+ return [value.name, value.id]
270
+ .filter((candidate) => typeof candidate === 'string');
271
+ }
272
+ //# sourceMappingURL=performance-monitor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-monitor.js","sourceRoot":"","sources":["../src/performance-monitor.ts"],"names":[],"mappings":"AA0CA,MAAM,0BAA0B,GAAqC;IACnE,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,IAAI;IACrB,qBAAqB,EAAE,IAAI;IAC3B,kBAAkB,EAAE,IAAI;IACxB,wBAAwB,EAAE,IAAI;IAC9B,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,UAAU,qCAAqC,CACnD,KAAqB;IAErB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,I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,CAAC,QAAQ,EAAE,kBAAkB,CAAC;WACxD,0BAA0B,CAAC,QAAQ,EAAE,aAAa,CAAC;WACnD,0BAA0B,CAAC,QAAQ,EAAE,YAAY,CAAC;WAClD,0BAA0B,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,0BAA0B,CAAC,KAAc,EAAE,QAAgB;IAClE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,OAAO,6BAA6B,CAAC,KAAK,CAAC;SACxC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,6BAA6B,CAAC,KAA0B;IAC/D,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,SAAS,EAAuB,EAAE,CAAC,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { RuntimeScene } from './types';
2
+ export interface BabylonProjectionPickResult {
3
+ hit: boolean;
4
+ nodeId: string | null;
5
+ pickedMesh: unknown | null;
6
+ }
7
+ export interface BabylonProjectionPickCandidate {
8
+ hit: unknown;
9
+ node: any;
10
+ projection: Record<string, unknown>;
11
+ selectionNodeId: string;
12
+ renderingGroupId: number;
13
+ alphaIndex: number;
14
+ distance: number;
15
+ }
16
+ export declare function resolveBabylonProjectionNodeId(target: unknown): string | null;
17
+ export declare function resolveBabylonPickSelectionNodeId(target: unknown): string | null;
18
+ export declare function pickBabylonProjectionNodeIdAt(scene: RuntimeScene, clientX: number, clientY: number): string | null;
19
+ export declare function pickBabylonProjectionAt(scene: RuntimeScene, x: number, y: number): BabylonProjectionPickResult;
20
+ export declare function pickBabylonProjectionAtAsync(scene: RuntimeScene, x: number, y: number, options?: {
21
+ alphaThreshold?: number;
22
+ }): Promise<BabylonProjectionPickResult>;
23
+ export declare function selectBabylonProjectionPickCandidate(scene: RuntimeScene, hits: readonly unknown[]): BabylonProjectionPickCandidate | null;
24
+ export declare function collectBabylonProjectionPickCandidates(hits: readonly unknown[]): BabylonProjectionPickCandidate[];
25
+ export declare function sortBabylonProjectionPickCandidates(scene: RuntimeScene, candidates: readonly BabylonProjectionPickCandidate[]): BabylonProjectionPickCandidate[];
26
+ //# sourceMappingURL=projection-pick-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection-pick-resolver.d.ts","sourceRoot":"","sources":["../src/projection-pick-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,8BAA8B;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,GAAG,CAAC;IACV,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAMD,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAQ7E;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAahF;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAKf;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,YAAY,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,2BAA2B,CAQ7B;AAED,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,YAAY,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,OAAO,CAAC,2BAA2B,CAAC,CAkBtC;AAED,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,SAAS,OAAO,EAAE,GACvB,8BAA8B,GAAG,IAAI,CAEvC;AAED,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,SAAS,OAAO,EAAE,GACvB,8BAA8B,EAAE,CAoBlC;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,SAAS,8BAA8B,EAAE,GACpD,8BAA8B,EAAE,CAclC"}
@@ -0,0 +1,312 @@
1
+ const DEFAULT_ALPHA_THRESHOLD = 8 / 255;
2
+ const ALPHA_SAMPLE_CACHE_LIMIT = 2048;
3
+ const alphaSampleCache = new Map();
4
+ export function resolveBabylonProjectionNodeId(target) {
5
+ let current = target;
6
+ while (current) {
7
+ const nodeId = current.metadata?.editorProjection?.nodeId;
8
+ if (typeof nodeId === 'string' && nodeId.length > 0)
9
+ return nodeId;
10
+ current = current.parent ?? null;
11
+ }
12
+ return null;
13
+ }
14
+ export function resolveBabylonPickSelectionNodeId(target) {
15
+ let current = target;
16
+ while (current) {
17
+ const projection = current.metadata?.editorProjection;
18
+ const rootNodeId = projection?.rootNodeId;
19
+ if (projection?.runtimeKind === 'assetMesh' && typeof rootNodeId === 'string' && rootNodeId.length > 0) {
20
+ return rootNodeId;
21
+ }
22
+ const nodeId = projection?.nodeId;
23
+ if (typeof nodeId === 'string' && nodeId.length > 0)
24
+ return nodeId;
25
+ current = current.parent ?? null;
26
+ }
27
+ return null;
28
+ }
29
+ export function pickBabylonProjectionNodeIdAt(scene, clientX, clientY) {
30
+ const canvas = scene.getEngine?.().getRenderingCanvas?.();
31
+ if (!canvas)
32
+ return null;
33
+ const rect = canvas.getBoundingClientRect();
34
+ return pickBabylonProjectionAt(scene, clientX - rect.left, clientY - rect.top).nodeId;
35
+ }
36
+ export function pickBabylonProjectionAt(scene, x, y) {
37
+ const hitBundle = collectScenePickHits(scene, x, y);
38
+ const candidate = selectBabylonProjectionPickCandidate(scene, hitBundle.hits);
39
+ return {
40
+ hit: hitBundle.hit,
41
+ nodeId: candidate?.selectionNodeId ?? null,
42
+ pickedMesh: candidate?.node ?? null,
43
+ };
44
+ }
45
+ export async function pickBabylonProjectionAtAsync(scene, x, y, options = {}) {
46
+ const hitBundle = collectScenePickHits(scene, x, y);
47
+ const candidates = sortBabylonProjectionPickCandidates(scene, collectBabylonProjectionPickCandidates(hitBundle.hits));
48
+ const alphaThreshold = options.alphaThreshold ?? DEFAULT_ALPHA_THRESHOLD;
49
+ for (const candidate of candidates) {
50
+ if (await isCandidateAlphaVisible(candidate, alphaThreshold)) {
51
+ return {
52
+ hit: hitBundle.hit,
53
+ nodeId: candidate.selectionNodeId,
54
+ pickedMesh: candidate.node,
55
+ };
56
+ }
57
+ }
58
+ return {
59
+ hit: hitBundle.hit,
60
+ nodeId: null,
61
+ pickedMesh: null,
62
+ };
63
+ }
64
+ export function selectBabylonProjectionPickCandidate(scene, hits) {
65
+ return sortBabylonProjectionPickCandidates(scene, collectBabylonProjectionPickCandidates(hits))[0] ?? null;
66
+ }
67
+ export function collectBabylonProjectionPickCandidates(hits) {
68
+ const candidates = [];
69
+ for (const hit of hits) {
70
+ const pickedNode = readPickedNode(hit);
71
+ if (!readHitFlag(hit) || !pickedNode)
72
+ continue;
73
+ const projection = findEditorProjectionMetadata(pickedNode);
74
+ if (!projection)
75
+ continue;
76
+ const selectionNodeId = resolveBabylonPickSelectionNodeId(pickedNode);
77
+ if (!selectionNodeId)
78
+ continue;
79
+ candidates.push({
80
+ hit,
81
+ node: pickedNode,
82
+ projection,
83
+ selectionNodeId,
84
+ renderingGroupId: readRenderingGroupId(pickedNode),
85
+ alphaIndex: readAlphaIndex(pickedNode),
86
+ distance: readPickDistance(hit),
87
+ });
88
+ }
89
+ return candidates;
90
+ }
91
+ export function sortBabylonProjectionPickCandidates(scene, candidates) {
92
+ if (candidates.length <= 1)
93
+ return [...candidates];
94
+ const nearestDistance = readNearestFiniteDistance(candidates);
95
+ const depthTolerance = Number.isFinite(nearestDistance)
96
+ ? Math.max(0.05, Math.abs(nearestDistance) * 0.001)
97
+ : Number.POSITIVE_INFINITY;
98
+ return [...candidates].sort((left, right) => {
99
+ const rightTier = readDepthVisibilityTier(scene, right, nearestDistance, depthTolerance);
100
+ const leftTier = readDepthVisibilityTier(scene, left, nearestDistance, depthTolerance);
101
+ return rightTier - leftTier
102
+ || right.renderingGroupId - left.renderingGroupId
103
+ || right.alphaIndex - left.alphaIndex
104
+ || left.distance - right.distance;
105
+ });
106
+ }
107
+ function collectScenePickHits(scene, x, y) {
108
+ if (typeof scene.multiPick === 'function') {
109
+ const hits = scene.multiPick(x, y);
110
+ if (Array.isArray(hits)) {
111
+ return {
112
+ hit: hits.some(readHitFlag),
113
+ hits,
114
+ };
115
+ }
116
+ }
117
+ const pick = typeof scene.pick === 'function' ? scene.pick(x, y) : null;
118
+ return {
119
+ hit: readHitFlag(pick),
120
+ hits: pick ? [pick] : [],
121
+ };
122
+ }
123
+ function readDepthVisibilityTier(scene, candidate, nearestDistance, depthTolerance) {
124
+ if (renderingGroupClearsDepth(scene, candidate.renderingGroupId))
125
+ return 2;
126
+ if (!Number.isFinite(nearestDistance) || !Number.isFinite(candidate.distance))
127
+ return 1;
128
+ return Math.abs(candidate.distance - nearestDistance) <= depthTolerance ? 1 : 0;
129
+ }
130
+ function renderingGroupClearsDepth(scene, renderingGroupId) {
131
+ if (renderingGroupId <= 0 || typeof scene.getAutoClearDepthStencilSetup !== 'function')
132
+ return false;
133
+ const setup = scene.getAutoClearDepthStencilSetup(renderingGroupId);
134
+ if (!setup || typeof setup !== 'object')
135
+ return false;
136
+ return setup.autoClear !== false && setup.depth !== false;
137
+ }
138
+ function findEditorProjectionMetadata(target) {
139
+ let current = target;
140
+ while (current) {
141
+ const projection = current.metadata?.editorProjection;
142
+ if (projection && typeof projection === 'object')
143
+ return projection;
144
+ current = current.parent ?? null;
145
+ }
146
+ return null;
147
+ }
148
+ function readPickedNode(hit) {
149
+ const pick = hit;
150
+ return pick?.pickedMesh ?? pick?.pickedPoint?.mesh ?? null;
151
+ }
152
+ function readHitFlag(hit) {
153
+ return !!hit?.hit;
154
+ }
155
+ function readPickDistance(hit) {
156
+ const distance = hit?.distance;
157
+ return typeof distance === 'number' && Number.isFinite(distance) ? distance : Number.POSITIVE_INFINITY;
158
+ }
159
+ function readNearestFiniteDistance(candidates) {
160
+ let nearest = Number.POSITIVE_INFINITY;
161
+ for (const candidate of candidates) {
162
+ if (Number.isFinite(candidate.distance) && candidate.distance < nearest)
163
+ nearest = candidate.distance;
164
+ }
165
+ return nearest;
166
+ }
167
+ function readRenderingGroupId(node) {
168
+ let current = node;
169
+ while (current) {
170
+ const value = current.renderingGroupId;
171
+ if (typeof value === 'number' && Number.isFinite(value))
172
+ return value;
173
+ current = current.parent ?? null;
174
+ }
175
+ return 0;
176
+ }
177
+ function readAlphaIndex(node) {
178
+ let current = node;
179
+ while (current) {
180
+ const value = current.alphaIndex;
181
+ if (typeof value === 'number' && Number.isFinite(value))
182
+ return value;
183
+ current = current.parent ?? null;
184
+ }
185
+ return 0;
186
+ }
187
+ async function isCandidateAlphaVisible(candidate, alphaThreshold) {
188
+ const texture = readCandidateAlphaTexture(candidate.node);
189
+ if (!texture)
190
+ return true;
191
+ const uv = readPickTextureCoordinates(candidate.hit);
192
+ if (!uv)
193
+ return true;
194
+ try {
195
+ const alpha = await sampleTextureAlpha(texture, uv);
196
+ return alpha == null || alpha >= alphaThreshold;
197
+ }
198
+ catch {
199
+ return true;
200
+ }
201
+ }
202
+ function readCandidateAlphaTexture(node) {
203
+ const material = node?.material;
204
+ if (!material || typeof material !== 'object')
205
+ return null;
206
+ const diffuseTexture = material.diffuseTexture;
207
+ if (isAlphaTexture(diffuseTexture) && (material.useAlphaFromDiffuseTexture === true || diffuseTexture.hasAlpha === true)) {
208
+ return diffuseTexture;
209
+ }
210
+ const albedoTexture = material.albedoTexture ?? material.baseTexture;
211
+ if (isAlphaTexture(albedoTexture) && (material.useAlphaFromAlbedoTexture === true || albedoTexture.hasAlpha === true)) {
212
+ return albedoTexture;
213
+ }
214
+ const opacityTexture = material.opacityTexture;
215
+ if (isAlphaTexture(opacityTexture))
216
+ return opacityTexture;
217
+ return null;
218
+ }
219
+ function isAlphaTexture(texture) {
220
+ return !!texture && typeof texture === 'object' && typeof texture.readPixels === 'function';
221
+ }
222
+ function readPickTextureCoordinates(hit) {
223
+ const pick = hit;
224
+ const uv = typeof pick?.getTextureCoordinates === 'function' ? pick.getTextureCoordinates() : null;
225
+ const x = uv?.x;
226
+ const y = uv?.y;
227
+ return typeof x === 'number' && Number.isFinite(x) && typeof y === 'number' && Number.isFinite(y)
228
+ ? { x, y }
229
+ : null;
230
+ }
231
+ async function sampleTextureAlpha(texture, uv) {
232
+ const size = readTextureSize(texture);
233
+ if (!size)
234
+ return null;
235
+ const transformed = transformTextureUv(texture, uv);
236
+ const x = toTexturePixelCoordinate(transformed.x, size.width, texture.wrapU);
237
+ const y = toTexturePixelCoordinate(transformed.y, size.height, texture.wrapV);
238
+ const cacheKey = createAlphaSampleCacheKey(texture, size.width, size.height, x, y);
239
+ const cached = alphaSampleCache.get(cacheKey);
240
+ if (cached)
241
+ return cached;
242
+ const sample = readTextureAlphaPixel(texture, x, y)
243
+ .then(alpha => {
244
+ if (alpha == null)
245
+ alphaSampleCache.delete(cacheKey);
246
+ return alpha;
247
+ }, error => {
248
+ alphaSampleCache.delete(cacheKey);
249
+ throw error;
250
+ });
251
+ rememberAlphaSample(cacheKey, sample);
252
+ return sample;
253
+ }
254
+ function readTextureSize(texture) {
255
+ const size = typeof texture.getSize === 'function'
256
+ ? texture.getSize()
257
+ : typeof texture.getBaseSize === 'function'
258
+ ? texture.getBaseSize()
259
+ : null;
260
+ const width = size?.width;
261
+ const height = size?.height;
262
+ return typeof width === 'number' && Number.isFinite(width) && width > 0
263
+ && typeof height === 'number' && Number.isFinite(height) && height > 0
264
+ ? { width: Math.floor(width), height: Math.floor(height) }
265
+ : null;
266
+ }
267
+ function transformTextureUv(texture, uv) {
268
+ const uScale = readTextureNumber(texture.uScale, 1);
269
+ const vScale = readTextureNumber(texture.vScale, 1);
270
+ const uOffset = readTextureNumber(texture.uOffset, 0);
271
+ const vOffset = readTextureNumber(texture.vOffset, 0);
272
+ return {
273
+ x: uv.x * uScale + uOffset,
274
+ y: uv.y * vScale + vOffset,
275
+ };
276
+ }
277
+ function readTextureNumber(value, fallback) {
278
+ return typeof value === 'number' && Number.isFinite(value) ? value : fallback;
279
+ }
280
+ function toTexturePixelCoordinate(value, size, wrapMode) {
281
+ const normalized = wrapMode === 0 ? clamp01(value) : wrap01(value);
282
+ return Math.min(size - 1, Math.max(0, Math.floor(normalized * size)));
283
+ }
284
+ function clamp01(value) {
285
+ return Math.min(1, Math.max(0, value));
286
+ }
287
+ function wrap01(value) {
288
+ return ((value % 1) + 1) % 1;
289
+ }
290
+ function createAlphaSampleCacheKey(texture, width, height, x, y) {
291
+ const textureId = texture.uniqueId ?? texture.uid ?? texture.name ?? texture.url ?? 'anonymous';
292
+ return `${String(textureId)}:${width}x${height}:${x},${y}`;
293
+ }
294
+ function rememberAlphaSample(key, sample) {
295
+ alphaSampleCache.set(key, sample);
296
+ while (alphaSampleCache.size > ALPHA_SAMPLE_CACHE_LIMIT) {
297
+ const oldestKey = alphaSampleCache.keys().next().value;
298
+ if (typeof oldestKey !== 'string')
299
+ break;
300
+ alphaSampleCache.delete(oldestKey);
301
+ }
302
+ }
303
+ async function readTextureAlphaPixel(texture, x, y) {
304
+ const pixels = await texture.readPixels(0, 0, undefined, false, false, x, y, 1, 1);
305
+ if (!pixels || typeof pixels.byteLength !== 'number' || pixels.length < 4)
306
+ return null;
307
+ const alpha = Number(pixels[3]);
308
+ if (!Number.isFinite(alpha))
309
+ return null;
310
+ return alpha <= 1 ? alpha : alpha / 255;
311
+ }
312
+ //# sourceMappingURL=projection-pick-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection-pick-resolver.js","sourceRoot":"","sources":["../src/projection-pick-resolver.ts"],"names":[],"mappings":"AAkBA,MAAM,uBAAuB,GAAG,CAAC,GAAG,GAAG,CAAC;AACxC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AACtC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkC,CAAC;AAEnE,MAAM,UAAU,8BAA8B,CAAC,MAAe;IAC5D,IAAI,OAAO,GAAQ,MAAM,CAAC;IAC1B,OAAO,OAAO,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,CAAC;QAC1D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,MAAM,CAAC;QACnE,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,MAAe;IAC/D,IAAI,OAAO,GAAQ,MAAM,CAAC;IAC1B,OAAO,OAAO,EAAE,CAAC;QACf,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,gBAAgB,CAAC;QACtD,MAAM,UAAU,GAAG,UAAU,EAAE,UAAU,CAAC;QAC1C,IAAI,UAAU,EAAE,WAAW,KAAK,WAAW,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvG,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,MAAM,MAAM,GAAG,UAAU,EAAE,MAAM,CAAC;QAClC,IAAI,O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GAAG,IAAI,CAAC;IACnF,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAChF,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3C,kBAAkB,IAAI,IAAI,CAAC;IAC3B,OAAO,IAAI,IAAI,CAAC;CACjB;AAiBD,wBAAgB,0CAA0C,CACxD,OAAO,EAAE,2CAA2C,GACnD,oCAAoC,CAiHtC"}
1
+ {"version":3,"file":"projection-selection-controller.d.ts","sourceRoot":"","sources":["../src/projection-selection-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,2CAA2C;IAC1D,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,uBAAuB,CAAC;IACpC,OAAO,EAAE,MAAM,mBAAmB,CAAC;IACnC,YAAY,EAAE,MAAM,oBAAoB,CAAC;IACzC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC;IACnC,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,gB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