@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.3

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 (335) hide show
  1. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
  2. package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
  3. package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
  4. package/dist/build-info.json +46 -46
  5. package/dist/internal/material-preview.d.ts +22 -0
  6. package/dist/internal/material-preview.d.ts.map +1 -0
  7. package/dist/internal/material-preview.js +186 -0
  8. package/dist/internal/material-preview.js.map +1 -0
  9. package/dist/internal/project-model-preview.d.ts +4 -0
  10. package/dist/internal/project-model-preview.d.ts.map +1 -0
  11. package/dist/internal/project-model-preview.js +359 -0
  12. package/dist/internal/project-model-preview.js.map +1 -0
  13. package/dist/local-editor-agent-context.d.ts +12 -1
  14. package/dist/local-editor-agent-context.d.ts.map +1 -1
  15. package/dist/local-editor-agent-context.js +47 -0
  16. package/dist/local-editor-agent-context.js.map +1 -1
  17. package/dist/local-editor-harness.d.ts +15 -2
  18. package/dist/local-editor-harness.d.ts.map +1 -1
  19. package/dist/local-editor-harness.js +326 -28
  20. package/dist/local-editor-harness.js.map +1 -1
  21. package/dist/local-editor-tools.d.ts +1 -0
  22. package/dist/local-editor-tools.d.ts.map +1 -1
  23. package/dist/local-editor-tools.js +3 -0
  24. package/dist/local-editor-tools.js.map +1 -1
  25. package/dist/playable-babylon-rendering.d.ts +8 -7
  26. package/dist/playable-babylon-rendering.d.ts.map +1 -1
  27. package/dist/playable-babylon-rendering.js +77 -32
  28. package/dist/playable-babylon-rendering.js.map +1 -1
  29. package/dist/playable-local-editor-host.d.ts +4 -0
  30. package/dist/playable-local-editor-host.d.ts.map +1 -1
  31. package/dist/playable-local-editor-host.js +27 -0
  32. package/dist/playable-local-editor-host.js.map +1 -1
  33. package/dist/playable-product-projection-preview.d.ts +2 -0
  34. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  35. package/dist/playable-product-projection-preview.js +7 -4
  36. package/dist/playable-product-projection-preview.js.map +1 -1
  37. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  38. package/dist/playable-product-scene-capabilities.js +9 -3
  39. package/dist/playable-product-scene-capabilities.js.map +1 -1
  40. package/dist/playable-sdk.d.ts +1 -1
  41. package/dist/playable-sdk.d.ts.map +1 -1
  42. package/dist/playable-sdk.js +1 -1
  43. package/dist/playable-sdk.js.map +1 -1
  44. package/dist/playable-standard-project.d.ts +0 -1
  45. package/dist/playable-standard-project.d.ts.map +1 -1
  46. package/dist/playable-standard-project.js +17 -5
  47. package/dist/playable-standard-project.js.map +1 -1
  48. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts +4 -2
  49. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts.map +1 -1
  50. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js +301 -121
  51. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js.map +1 -1
  52. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js +5 -4
  53. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js.map +1 -1
  54. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts +4 -4
  55. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts.map +1 -1
  56. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js +1 -1
  57. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js.map +1 -1
  58. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts +2 -0
  59. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts.map +1 -1
  60. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js +12 -1
  61. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js.map +1 -1
  62. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts +6 -3
  63. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts.map +1 -1
  64. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js +100 -39
  65. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js.map +1 -1
  66. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts +1 -3
  67. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts.map +1 -1
  68. package/node_modules/@fps-games/babylon-renderer/dist/reference.js.map +1 -1
  69. package/node_modules/@fps-games/babylon-renderer/package.json +11 -8
  70. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
  71. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
  72. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
  73. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  74. package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
  75. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  76. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
  77. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
  78. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
  79. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
  80. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  81. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
  82. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  83. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
  84. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  85. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
  86. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  87. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
  88. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
  89. package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
  90. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  91. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
  92. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  93. package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
  94. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  95. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
  96. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
  97. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
  98. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
  99. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
  100. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
  101. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
  123. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
  124. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
  125. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
  126. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
  127. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
  128. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
  129. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
  130. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
  131. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
  132. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
  133. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
  134. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
  135. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
  137. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  138. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
  139. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
  140. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
  141. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
  142. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
  143. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  144. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  145. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
  146. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
  147. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
  148. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
  149. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
  150. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  151. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
  152. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  153. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
  154. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
  155. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
  156. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
  157. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  158. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
  159. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
  160. package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
  161. package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
  162. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
  163. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
  164. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
  165. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
  166. package/node_modules/@fps-games/editor-core/package.json +6 -6
  167. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  168. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -1
  169. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +10 -3
  170. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -1
  171. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +2 -1
  172. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -1
  173. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +1 -1
  174. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -1
  175. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
  176. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
  177. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
  178. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
  179. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
  180. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
  181. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
  182. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
  183. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
  184. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
  185. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
  186. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
  187. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
  188. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
  189. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
  190. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
  191. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
  192. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
  193. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
  194. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
  195. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
  196. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
  197. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
  198. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +4 -0
  199. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
  200. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
  201. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
  202. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
  203. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
  204. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
  205. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
  206. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
  207. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
  208. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
  209. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
  210. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
  211. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
  212. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
  213. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
  214. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
  215. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
  216. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
  217. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
  218. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
  219. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
  220. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +4 -4
  221. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
  222. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +2 -1
  223. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.js.map +1 -1
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +1 -5
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +53 -0
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +2 -0
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
  247. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
  248. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
  249. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
  250. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
  251. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
  252. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  253. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
  254. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
  255. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
  256. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  257. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  258. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
  259. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
  260. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
  261. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  262. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts +1 -0
  263. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts.map +1 -1
  264. package/node_modules/@fps-games/playable-assets/dist/identity.js +1 -1
  265. package/node_modules/@fps-games/playable-assets/dist/identity.js.map +1 -1
  266. package/node_modules/@fps-games/playable-assets/dist/index.d.ts +1 -0
  267. package/node_modules/@fps-games/playable-assets/dist/index.d.ts.map +1 -1
  268. package/node_modules/@fps-games/playable-assets/dist/index.js +1 -0
  269. package/node_modules/@fps-games/playable-assets/dist/index.js.map +1 -1
  270. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts +46 -0
  271. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts.map +1 -0
  272. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js +109 -0
  273. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js.map +1 -0
  274. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  275. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  276. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  277. package/node_modules/@fps-games/playable-runtime/dist/runtime.d.ts.map +1 -1
  278. package/node_modules/@fps-games/playable-runtime/dist/runtime.js +5 -0
  279. package/node_modules/@fps-games/playable-runtime/dist/runtime.js.map +1 -1
  280. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts +2 -0
  281. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts.map +1 -1
  282. package/node_modules/@fps-games/playable-runtime/dist/types.js.map +1 -1
  283. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  284. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  285. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  286. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  287. package/node_modules/@fps-games/plugin-assets/dist/reference.d.ts.map +1 -1
  288. package/node_modules/@fps-games/plugin-assets/dist/reference.js +11 -4
  289. package/node_modules/@fps-games/plugin-assets/dist/reference.js.map +1 -1
  290. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts +8 -0
  291. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts.map +1 -0
  292. package/node_modules/@fps-games/plugin-assets/dist/renderer.js +13 -0
  293. package/node_modules/@fps-games/plugin-assets/dist/renderer.js.map +1 -0
  294. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts +12 -0
  295. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts.map +1 -0
  296. package/node_modules/@fps-games/plugin-assets/dist/resources.js +8 -0
  297. package/node_modules/@fps-games/plugin-assets/dist/resources.js.map +1 -0
  298. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts +2 -1
  299. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts.map +1 -1
  300. package/node_modules/@fps-games/plugin-assets/dist/runtime.js +3 -0
  301. package/node_modules/@fps-games/plugin-assets/dist/runtime.js.map +1 -1
  302. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  303. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  304. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  305. package/node_modules/@fps-games/plugin-assets/package.json +32 -8
  306. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  307. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  308. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  309. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  310. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  311. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  312. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  313. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  314. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  315. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  316. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  317. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  318. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  319. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  320. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  321. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  322. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  323. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  324. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  325. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  326. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  327. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  328. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  329. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  330. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  331. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  332. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  333. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  334. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  335. package/package.json +24 -22
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,GAErC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,yCAAyC,EAAE,MAAM,iDAAiD,CAAC;AAC5G,OAAO,EACL,8BAA8B,GAE/B,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EACL,iDAAiD,EACjD,sDAAsD,GACvD,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EACL,sCAAsC,EACtC,2CAA2C,GAM5C,MAAM,2CAA2C,CAAC;AAMnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AA4DhE,MAAM,CAAC,MAAM,4BAA4B,GAAG,qBAAqB,CAC/D,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AI,CAAC;WACN,MAAM,CAAC,kBAAkB;WACzB,IAAI,CAAC;IACV,MAAM,wBAAwB,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CACjD,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,mCAAmC,CAChE,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI;QACJ,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,UAAU;YACV,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,YAAY;YAC3C,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS;SACzC,CAAC;QACF,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,uBAAuB,EAAE,wBAAwB;YAC/C,CAAC,CAAC,qCAAqC,CAAC,wBAAwB,CAAC,IAAI,CAAC;YACtE,CAAC,CAAC,IAAI;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Camera } from '@babylonjs/core/Cameras/camera.js';\nimport type { Scene } from '@babylonjs/core/scene.js';\nimport type { FpsRuntimeAsset, FpsRuntimeData } from '@fps-games/playable-contracts';\nimport {\n createFpsRuntimeDataSnapshot,\n} from '@fps-games/playable-runtime-data';\nimport {\n FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n createShadowMapExperimentPlanSnapshot,\n normalizeEditorSceneRenderingProfile,\n type ShadowMapExperimentPlan,\n} from '@fps-games/playable-rendering/runtime';\nimport {\n defineFpsPluginEntry,\n defineFpsPluginManifest,\n defineFpsServiceToken,\n type FpsPluginEntry,\n type FpsPluginManifest,\n} from '@fps-games/plugin-api';\nimport { createFpsPluginHost, type FpsPluginHost } from '@fps-games/plugin-host';\nimport { createBabylonEnvironmentTextureController } from './environment/environment-texture-controller.js';\nimport {\n FPS_BABYLON_RENDERER_PLUGIN_ID,\n type FpsBabylonRendererPluginConfig,\n} from './reference.js';\nimport type {\n BabylonEnvironmentTextureController,\n BabylonEnvironmentTextureFactory,\n} from './environment/types.js';\nimport {\n createBabylonDefaultPostProcessPipelineController,\n readBabylonDefaultPostProcessPipelineControllerCleanup,\n} from './post-process/babylon-default-pipeline.js';\nimport type {\n BabylonDefaultPostProcessPipelineController,\n} from './post-process/types.js';\nimport {\n createBabylonShadowMapExperimentSystem,\n readBabylonShadowMapExperimentSystemCleanup,\n type BabylonRuntimeShadowObjectsOwner,\n type BabylonRuntimeShadowObjectsRegistration,\n type BabylonRuntimeShadowObjectsSnapshot,\n type BabylonShadowMapExperimentEvidence,\n type BabylonShadowMapExperimentSystem,\n} from './shadows/shadow-map-experiment-system.js';\nimport type {\n ShadowMapExperimentActivityKind,\n ShadowMapExperimentActivitySourceController,\n} from '@fps-games/playable-rendering/runtime';\n\nexport { FPS_BABYLON_RENDERER_PLUGIN_ID } from './reference.js';\n\nexport interface FpsBabylonRendererContext {\n readonly scene: Scene;\n readonly cameras: readonly Camera[];\n readonly resolveAssetUrl?: (\n assetId: string,\n asset: FpsRuntimeAsset | null,\n ) => string | null;\n readonly createEnvironmentTexture?: BabylonEnvironmentTextureFactory;\n}\n\nexport interface FpsBabylonRendererService {\n readonly shadows: FpsBabylonRendererShadowService;\n}\n\nexport interface FpsBabylonRendererHostController extends FpsBabylonRendererService {\n readonly environment: BabylonEnvironmentTextureController;\n readonly postProcess: BabylonDefaultPostProcessPipelineController;\n getRuntimeData(): FpsRuntimeData;\n update(data: FpsRuntimeData): Promise<void>;\n dispose(): Promise<void>;\n}\n\nexport interface FpsBabylonRendererShadowService {\n registerRuntimeShadowObjects(\n input: BabylonRuntimeShadowObjectsRegistration,\n ): BabylonRuntimeShadowObjectsOwner;\n registerActivitySource(input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }): ShadowMapExperimentActivitySourceController;\n getRuntimeSnapshot(): BabylonRuntimeShadowObjectsSnapshot;\n getEvidence(): BabylonShadowMapExperimentEvidence;\n}\n\nexport interface FpsBabylonRendererPlugin {\n readonly manifest: Readonly<FpsPluginManifest>;\n readonly renderer: Readonly<FpsPluginEntry>;\n}\n\nexport interface FpsBabylonRendererPluginOptions {\n readonly pluginVersion: string;\n}\n\nexport interface FpsBabylonRendererHostOptions extends FpsBabylonRendererPluginOptions {\n readonly data: FpsRuntimeData;\n readonly context: FpsBabylonRendererContext;\n readonly config?: FpsBabylonRendererPluginConfig;\n readonly report?: Parameters<typeof createFpsPluginHost>[0]['report'];\n}\n\nexport interface FpsBabylonRendererHost {\n readonly pluginId: typeof FPS_BABYLON_RENDERER_PLUGIN_ID;\n readonly host: FpsPluginHost;\n readonly renderer: FpsBabylonRendererHostController;\n dispose(): Promise<void>;\n}\n\nexport const FPS_BABYLON_RENDERER_CONTEXT = defineFpsServiceToken<FpsBabylonRendererContext>(\n 'fps.renderer.babylon.context',\n);\nexport const FPS_BABYLON_RENDERER_DATA = defineFpsServiceToken<FpsRuntimeData>(\n 'fps.renderer.babylon.runtime-data',\n);\nexport const FPS_BABYLON_RENDERER_SERVICE = defineFpsServiceToken<FpsBabylonRendererHostController>(\n 'fps.renderer.babylon.service',\n);\n\nconst fpsBabylonRendererSceneOwners = new WeakMap<Scene, object>();\n\nexport const pluginEntry = defineFpsPluginEntry({\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n environment: 'renderer',\n register(context) {\n const rendererContext = context.services.get(FPS_BABYLON_RENDERER_CONTEXT);\n const runtimeData = context.services.get(FPS_BABYLON_RENDERER_DATA);\n const releaseSceneOwnership = reserveFpsBabylonRendererScene(rendererContext.scene);\n let createdService: FpsBabylonRendererInternalService;\n try {\n createdService = createFpsBabylonRendererService(\n runtimeData,\n rendererContext,\n (context.config ?? {}) as FpsBabylonRendererPluginConfig,\n releaseSceneOwnership,\n );\n } catch (error) {\n const recoverConstruction = readFpsBabylonRendererConstructionCleanup(error)\n ?? readBabylonShadowMapExperimentSystemCleanup(error)\n ?? readBabylonDefaultPostProcessPipelineControllerCleanup(error);\n if (recoverConstruction) {\n context.add(() => {\n const cleanupErrors = [...recoverConstruction()];\n if (cleanupErrors.length > 0) {\n throw Object.assign(\n new Error('Babylon renderer construction cleanup failed.'),\n { cleanupErrors: Object.freeze(cleanupErrors) },\n );\n }\n releaseSceneOwnership();\n });\n } else {\n try { releaseSceneOwnership(); }\n catch (cleanupError) {\n const recoverRelease = createFpsBabylonRendererConstructionCleanup([releaseSceneOwnership]);\n context.add(() => throwCleanupResult(recoverRelease()));\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors: Object.freeze([cleanupError]),\n fpsBabylonRendererConstructionCleanup: recoverRelease,\n },\n );\n }\n }\n throw error;\n }\n context.add(context.services.register(FPS_BABYLON_RENDERER_SERVICE, createdService));\n context.add(() => createdService.dispose());\n },\n async start(context) {\n await getFpsBabylonRendererInternalService(context).initialize();\n },\n async dispose(context) {\n await (context.services.getOptional(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService | undefined)?.dispose();\n },\n});\n\nexport function createFpsBabylonRendererPlugin(\n options: FpsBabylonRendererPluginOptions,\n): FpsBabylonRendererPlugin {\n const manifest = defineFpsPluginManifest({\n id: FPS_BABYLON_RENDERER_PLUGIN_ID,\n version: options.pluginVersion,\n apiVersion: 1,\n requires: {},\n provides: { features: ['fps.renderer.babylon'] },\n entries: { renderer: './renderer' },\n environmentContracts: {\n renderer: {\n requires: {\n services: [\n FPS_BABYLON_RENDERER_CONTEXT.id,\n FPS_BABYLON_RENDERER_DATA.id,\n ],\n },\n provides: { services: [FPS_BABYLON_RENDERER_SERVICE.id] },\n scopes: ['application'],\n },\n },\n });\n return Object.freeze({ manifest, renderer: pluginEntry });\n}\n\nexport async function createFpsBabylonRendererHost(\n options: FpsBabylonRendererHostOptions,\n): Promise<FpsBabylonRendererHost> {\n const plugin = createFpsBabylonRendererPlugin(options);\n const host = createFpsPluginHost({\n environment: 'renderer',\n apiVersion: 1,\n manifests: [plugin.manifest],\n pluginConfigs: { [FPS_BABYLON_RENDERER_PLUGIN_ID]: options.config ?? {} },\n initialServices: [\n { token: FPS_BABYLON_RENDERER_CONTEXT, value: options.context },\n { token: FPS_BABYLON_RENDERER_DATA, value: options.data },\n ],\n loadEntry: async manifest => manifest.id === plugin.manifest.id ? plugin.renderer : null,\n report: options.report,\n });\n await host.start();\n const renderer = host.services.get(FPS_BABYLON_RENDERER_SERVICE);\n let hostDisposePromise: Promise<void> | null = null;\n return {\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n host,\n renderer,\n dispose: () => {\n if (!hostDisposePromise) {\n const operation = (async () => {\n const errors: unknown[] = [];\n try { await renderer.dispose(); } catch (error) { errors.push(error); }\n try { await host.dispose(); } catch (error) { errors.push(error); }\n if (errors.length === 1) throw errors[0];\n if (errors.length > 1) {\n throw Object.assign(new Error('Babylon renderer host disposal failed.'), { errors });\n }\n })();\n hostDisposePromise = operation.catch(error => {\n hostDisposePromise = null;\n throw error;\n });\n }\n return hostDisposePromise;\n },\n };\n}\n\ninterface FpsBabylonRendererInternalService extends FpsBabylonRendererHostController {\n readonly shadowMapExperimentSystem: BabylonShadowMapExperimentSystem;\n initialize(): Promise<void>;\n}\n\nfunction createFpsBabylonRendererService(\n initialData: FpsRuntimeData,\n context: FpsBabylonRendererContext,\n config: FpsBabylonRendererPluginConfig,\n releaseSceneOwnership: () => void,\n): FpsBabylonRendererInternalService {\n const initialPrepared = prepareFpsBabylonRendererUpdate(initialData, context, config);\n let data = initialPrepared.data;\n let disposed = false;\n let acceptingUpdates = true;\n let activeAbort: AbortController | null = null;\n let queue: Promise<void> = Promise.resolve();\n let disposePromise: Promise<void> | null = null;\n const originalEnvironmentTexture = context.scene.environmentTexture;\n const sceneWithIntensity = context.scene as unknown as { environmentIntensity?: number };\n const originalEnvironmentIntensity = sceneWithIntensity.environmentIntensity;\n const restoreOriginalSceneEnvironment = (): void => {\n context.scene.environmentTexture = originalEnvironmentTexture;\n if (originalEnvironmentIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = originalEnvironmentIntensity;\n };\n const postProcess = createBabylonDefaultPostProcessPipelineController(\n context.scene,\n [...context.cameras],\n null,\n );\n let environment: BabylonEnvironmentTextureController;\n try {\n environment = createBabylonEnvironmentTextureController(context.scene, null, {\n createTexture: context.createEnvironmentTexture,\n });\n } catch (error) {\n throwFpsBabylonRendererConstructionFailure(error, [\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n let shadowMapExperiment: BabylonShadowMapExperimentSystem;\n try {\n shadowMapExperiment = createBabylonShadowMapExperimentSystem(context.scene);\n } catch (error) {\n const shadowCleanup = readBabylonShadowMapExperimentSystemCleanup(error);\n throwFpsBabylonRendererConstructionFailure(error, [\n ...(shadowCleanup ? [() => throwCleanupResult(shadowCleanup())] : []),\n () => environment.dispose(),\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n const assertAcceptingShadowOwnership = (): void => {\n if (!acceptingUpdates || disposed) {\n throw new Error('Babylon renderer service is disposed.');\n }\n };\n const shadows: FpsBabylonRendererShadowService = Object.freeze({\n registerRuntimeShadowObjects: (input: BabylonRuntimeShadowObjectsRegistration) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerRuntimeShadowObjects(input);\n },\n registerActivitySource: (input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerCasterActivitySource(input);\n },\n getRuntimeSnapshot: () => shadowMapExperiment.getEvidence().runtime,\n getEvidence: () => shadowMapExperiment.getEvidence(),\n });\n\n const cleanup = (): void => {\n const cleanupErrors: unknown[] = [];\n try { shadowMapExperiment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { environment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { postProcess.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { restoreOriginalSceneEnvironment(); } catch (error) { cleanupErrors.push(error); }\n if (cleanupErrors.length === 0) {\n try { releaseSceneOwnership(); } catch (error) { cleanupErrors.push(error); }\n }\n if (cleanupErrors.length > 0) {\n const error = new Error('Babylon renderer cleanup failed.');\n Object.assign(error, { cleanupErrors });\n throw error;\n }\n };\n\n const commit = async (\n prepared: FpsBabylonRendererPreparedUpdate,\n signal: AbortSignal,\n ): Promise<void> => {\n const previousEnvironment = environment.getProfile();\n const previousControllerTexture = environment.getTexture();\n const previousSceneTexture = context.scene.environmentTexture;\n const previousSceneIntensity = sceneWithIntensity.environmentIntensity;\n const previousPostProcess = postProcess.getProfile();\n const previousShadowMapExperimentPlan = shadowMapExperiment.getPlan();\n try {\n shadowMapExperiment.setPlan(prepared.shadowMapExperimentPlan);\n postProcess.setProfile(prepared.postProcess);\n await environment.setProfileAsync(prepared.environment, signal);\n if (signal.aborted) throw createFpsBabylonRendererAbortError();\n data = prepared.data;\n } catch (error) {\n const rollbackErrors: unknown[] = [];\n try { await environment.setProfileAsync(previousEnvironment); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try {\n if (previousSceneTexture !== previousControllerTexture) {\n context.scene.environmentTexture = previousSceneTexture;\n }\n if (previousSceneIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = previousSceneIntensity;\n } catch (rollbackError) {\n rollbackErrors.push(rollbackError);\n }\n try { postProcess.setProfile(previousPostProcess); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try { shadowMapExperiment.setPlan(previousShadowMapExperimentPlan); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n if (rollbackErrors.length > 0) {\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer update failed.',\n { rollbackErrors: Object.freeze(rollbackErrors) },\n );\n }\n throw error;\n }\n };\n\n const enqueue = (prepared: FpsBabylonRendererPreparedUpdate): Promise<void> => {\n const operation = queue.then(async () => {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n const abort = new AbortController();\n activeAbort = abort;\n try {\n await commit(prepared, abort.signal);\n } finally {\n if (activeAbort === abort) activeAbort = null;\n }\n });\n queue = operation.then(() => undefined, () => undefined);\n return operation;\n };\n\n const service: FpsBabylonRendererInternalService = {\n environment,\n postProcess,\n shadows,\n shadowMapExperimentSystem: shadowMapExperiment,\n getRuntimeData: () => data,\n initialize: () => enqueue(initialPrepared),\n async update(nextData) {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n await enqueue(prepareFpsBabylonRendererUpdate(nextData, context, config));\n },\n async dispose() {\n if (disposePromise) return disposePromise;\n acceptingUpdates = false;\n activeAbort?.abort();\n const operation = (async () => {\n await queue;\n if (disposed) return;\n cleanup();\n disposed = true;\n })();\n disposePromise = operation.catch(error => {\n disposePromise = null;\n throw error;\n });\n return disposePromise;\n },\n };\n return service;\n}\n\ntype FpsBabylonRendererConstructionCleanup = () => readonly unknown[];\n\nfunction throwFpsBabylonRendererConstructionFailure(\n failure: unknown,\n operations: readonly (() => void)[],\n): never {\n const cleanup = createFpsBabylonRendererConstructionCleanup(operations);\n const cleanupErrors = cleanup();\n if (cleanupErrors.length === 0) throw failure;\n throw createFailureWithMetadata(\n failure,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors,\n fpsBabylonRendererConstructionCleanup: cleanup,\n },\n );\n}\n\nfunction createFpsBabylonRendererConstructionCleanup(\n operations: readonly (() => void)[],\n): FpsBabylonRendererConstructionCleanup {\n let pending = [...operations];\n return () => {\n const cleanupErrors: unknown[] = [];\n const retry: (() => void)[] = [];\n for (const operation of pending) {\n try { operation(); }\n catch (error) {\n cleanupErrors.push(error);\n retry.push(operation);\n }\n }\n pending = retry;\n return Object.freeze(cleanupErrors);\n };\n}\n\nfunction readFpsBabylonRendererConstructionCleanup(\n error: unknown,\n): FpsBabylonRendererConstructionCleanup | null {\n if (!error || (typeof error !== 'object' && typeof error !== 'function')) return null;\n const cleanup = (error as { fpsBabylonRendererConstructionCleanup?: unknown })\n .fpsBabylonRendererConstructionCleanup;\n return typeof cleanup === 'function' ? cleanup as FpsBabylonRendererConstructionCleanup : null;\n}\n\nfunction throwCleanupResult(cleanupErrors: readonly unknown[]): void {\n if (cleanupErrors.length === 0) return;\n if (cleanupErrors.length === 1) throw cleanupErrors[0];\n throw Object.assign(new Error('Babylon renderer construction cleanup failed.'), {\n cleanupErrors: Object.freeze([...cleanupErrors]),\n });\n}\n\nfunction createFailureWithMetadata(\n failure: unknown,\n fallbackMessage: string,\n metadata: Readonly<Record<string, unknown>>,\n): object {\n if (failure && (typeof failure === 'object' || typeof failure === 'function')) {\n try {\n Object.assign(failure, metadata);\n if (Object.entries(metadata).every(([key, value]) => (\n (failure as Record<string, unknown>)[key] === value\n ))) return failure;\n } catch {\n // A non-extensible primary error is wrapped so recovery metadata remains reachable.\n }\n }\n return Object.assign(\n new Error(failure instanceof Error ? failure.message : fallbackMessage),\n { cause: failure, ...metadata },\n );\n}\n\nfunction reserveFpsBabylonRendererScene(scene: Scene): () => void {\n if (fpsBabylonRendererSceneOwners.has(scene)) {\n throw new Error('Babylon renderer Scene already has an active owner.');\n }\n const owner = Object.freeze({});\n fpsBabylonRendererSceneOwners.set(scene, owner);\n let released = false;\n return () => {\n if (released) return;\n if (fpsBabylonRendererSceneOwners.get(scene) !== owner) {\n throw new Error('Babylon renderer Scene ownership was replaced before cleanup completed.');\n }\n fpsBabylonRendererSceneOwners.delete(scene);\n released = true;\n };\n}\n\nfunction getFpsBabylonRendererInternalService(\n context: Parameters<NonNullable<FpsPluginEntry['start']>>[0],\n): FpsBabylonRendererInternalService {\n return context.services.get(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService;\n}\n\nfunction createFpsBabylonRendererAbortError(): Error {\n return Object.assign(new Error('Babylon renderer update aborted.'), { name: 'AbortError' });\n}\n\ninterface FpsBabylonRendererPreparedUpdate {\n readonly data: FpsRuntimeData;\n readonly environment: {\n readonly textureUrl: string | null;\n readonly intensity: number;\n readonly rotationY: number;\n };\n readonly postProcess: ReturnType<typeof normalizeEditorSceneRenderingProfile>['postProcess'];\n readonly shadowMapExperimentPlan: ShadowMapExperimentPlan | null;\n}\n\nfunction prepareFpsBabylonRendererUpdate(\n input: FpsRuntimeData,\n context: FpsBabylonRendererContext,\n config: FpsBabylonRendererPluginConfig,\n): FpsBabylonRendererPreparedUpdate {\n const data = createFpsRuntimeDataSnapshot(input);\n const profile = normalizeEditorSceneRenderingProfile(data.rendering);\n const textureRef = profile.environment.texture;\n const textureAsset = textureRef?.textureAssetId\n ? data.assets.find(asset => asset.id === textureRef.textureAssetId) ?? null\n : null;\n const textureUrl = textureRef?.url\n ?? (textureRef?.textureAssetId\n ? context.resolveAssetUrl?.(textureRef.textureAssetId, textureAsset) ?? textureAsset?.url ?? null\n : null)\n ?? config.environmentTexture\n ?? null;\n const shadowMapExperimentEntry = data.plugins?.find(\n entry => entry.pluginId === FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n );\n return Object.freeze({\n data,\n environment: Object.freeze({\n textureUrl,\n intensity: profile.environment.iblIntensity,\n rotationY: profile.environment.rotationY,\n }),\n postProcess: profile.postProcess,\n shadowMapExperimentPlan: shadowMapExperimentEntry\n ? createShadowMapExperimentPlanSnapshot(shadowMapExperimentEntry.data)\n : null,\n });\n}\n"]}
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,GAErC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GAItB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,IAAI,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC7F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ED,SAAS,oCAAoC,CAC3C,UAAqD;IAErD,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAC5F,IAAI,UAAU,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;QACnD,OAAO,sBAAsB,QAAQ,gDAAgD,CAAC;IACxF,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,+BAA+B,EAAE,CAAC;QACxD,OAAO,sBAAsB,QAAQ,mCAAmC,CAAC;IAC3E,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,mCAAmC,EAAE,CAAC;QAC5D,OAAO,sBAAsB,QAAQ,4BAA4B,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,CAAC;IACvG,CAAC;IACD,OAAO,sBAAsB,QAAQ,wBAAwB,CAAC;AAChE,CAAC","sourcesContent":["import type { Camera } from '@babylonjs/core/Cameras/camera.js';\nimport type { Scene } from '@babylonjs/core/scene.js';\nimport type { FpsRuntimeData } from '@fps-games/playable-contracts';\nimport type {\n PlayableAssetResourceResolutionDiagnostic,\n PlayableAssetResourceResolver,\n PlayableResolvedAssetResource,\n} from '@fps-games/playable-assets';\nimport {\n createFpsRuntimeDataSnapshot,\n} from '@fps-games/playable-runtime-data';\nimport {\n FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n createShadowMapExperimentPlanSnapshot,\n normalizeEditorSceneRenderingProfile,\n type ShadowMapExperimentPlan,\n} from '@fps-games/playable-rendering/runtime';\nimport {\n defineFpsPluginEntry,\n defineFpsPluginManifest,\n defineFpsServiceToken,\n type FpsPluginEntry,\n type FpsDiagnostic,\n type FpsPluginManifest,\n} from '@fps-games/plugin-api';\nimport { createFpsPluginHost, type FpsPluginHost } from '@fps-games/plugin-host';\nimport {\n FPS_ASSETS_PLUGIN_ID,\n createFpsAssetsPluginManifest,\n} from '@fps-games/plugin-assets';\nimport { pluginEntry as assetsRendererPluginEntry } from '@fps-games/plugin-assets/renderer';\nimport {\n FPS_ASSET_CATALOG_SOURCE,\n FPS_ASSET_RESOURCE_RESOLVER,\n type FpsAssetCatalogSource,\n} from '@fps-games/plugin-assets/resources';\nimport { createBabylonEnvironmentTextureController } from './environment/environment-texture-controller.js';\nimport {\n FPS_BABYLON_RENDERER_PLUGIN_ID,\n type FpsBabylonRendererPluginConfig,\n} from './reference.js';\nimport type {\n BabylonEnvironmentTextureController,\n BabylonEnvironmentTextureFactory,\n} from './environment/types.js';\nimport {\n createBabylonDefaultPostProcessPipelineController,\n readBabylonDefaultPostProcessPipelineControllerCleanup,\n} from './post-process/babylon-default-pipeline.js';\nimport type {\n BabylonDefaultPostProcessPipelineController,\n} from './post-process/types.js';\nimport {\n createBabylonShadowMapExperimentSystem,\n readBabylonShadowMapExperimentSystemCleanup,\n type BabylonRuntimeShadowObjectsOwner,\n type BabylonRuntimeShadowObjectsRegistration,\n type BabylonRuntimeShadowObjectsSnapshot,\n type BabylonShadowMapExperimentEvidence,\n type BabylonShadowMapExperimentSystem,\n} from './shadows/shadow-map-experiment-system.js';\nimport type {\n ShadowMapExperimentActivityKind,\n ShadowMapExperimentActivitySourceController,\n} from '@fps-games/playable-rendering/runtime';\n\nexport { FPS_BABYLON_RENDERER_PLUGIN_ID } from './reference.js';\n\nexport interface FpsBabylonRendererContext {\n readonly scene: Scene;\n readonly cameras: readonly Camera[];\n readonly createEnvironmentTexture?: BabylonEnvironmentTextureFactory;\n}\n\nexport interface FpsBabylonRendererService {\n readonly shadows: FpsBabylonRendererShadowService;\n}\n\nexport interface FpsBabylonRendererHostController extends FpsBabylonRendererService {\n readonly environment: BabylonEnvironmentTextureController;\n readonly postProcess: BabylonDefaultPostProcessPipelineController;\n getRuntimeData(): FpsRuntimeData;\n update(data: FpsRuntimeData): Promise<void>;\n dispose(): Promise<void>;\n}\n\nexport interface FpsBabylonRendererShadowService {\n registerRuntimeShadowObjects(\n input: BabylonRuntimeShadowObjectsRegistration,\n ): BabylonRuntimeShadowObjectsOwner;\n registerActivitySource(input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }): ShadowMapExperimentActivitySourceController;\n getRuntimeSnapshot(): BabylonRuntimeShadowObjectsSnapshot;\n getEvidence(): BabylonShadowMapExperimentEvidence;\n}\n\nexport interface FpsBabylonRendererPlugin {\n readonly manifest: Readonly<FpsPluginManifest>;\n readonly renderer: Readonly<FpsPluginEntry>;\n}\n\nexport interface FpsBabylonRendererPluginOptions {\n readonly pluginVersion: string;\n}\n\nexport interface FpsBabylonRendererHostOptions extends FpsBabylonRendererPluginOptions {\n readonly data: FpsRuntimeData;\n readonly assetCatalog: FpsAssetCatalogSource['catalog'];\n readonly context: FpsBabylonRendererContext;\n readonly config?: FpsBabylonRendererPluginConfig;\n readonly report?: Parameters<typeof createFpsPluginHost>[0]['report'];\n}\n\nexport interface FpsBabylonRendererHost {\n readonly pluginId: typeof FPS_BABYLON_RENDERER_PLUGIN_ID;\n readonly host: FpsPluginHost;\n readonly renderer: FpsBabylonRendererHostController;\n dispose(): Promise<void>;\n}\n\nexport const FPS_BABYLON_RENDERER_CONTEXT = defineFpsServiceToken<FpsBabylonRendererContext>(\n 'fps.renderer.babylon.context',\n);\nexport const FPS_BABYLON_RENDERER_DATA = defineFpsServiceToken<FpsRuntimeData>(\n 'fps.renderer.babylon.runtime-data',\n);\nexport const FPS_BABYLON_RENDERER_SERVICE = defineFpsServiceToken<FpsBabylonRendererHostController>(\n 'fps.renderer.babylon.service',\n);\n\nexport type FpsBabylonRendererHostCleanup = () => Promise<void>;\n\nexport function readFpsBabylonRendererHostCleanup(\n error: unknown,\n): FpsBabylonRendererHostCleanup | null {\n if (!error || (typeof error !== 'object' && typeof error !== 'function')) return null;\n const cleanup = (error as { fpsBabylonRendererHostCleanup?: unknown })\n .fpsBabylonRendererHostCleanup;\n return typeof cleanup === 'function' ? cleanup as FpsBabylonRendererHostCleanup : null;\n}\n\nconst fpsBabylonRendererSceneOwners = new WeakMap<Scene, object>();\n\nexport const pluginEntry = defineFpsPluginEntry({\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n environment: 'renderer',\n register(context) {\n const rendererContext = context.services.get(FPS_BABYLON_RENDERER_CONTEXT);\n const runtimeData = context.services.get(FPS_BABYLON_RENDERER_DATA);\n const assetResources = context.services.get(FPS_ASSET_RESOURCE_RESOLVER);\n const releaseSceneOwnership = reserveFpsBabylonRendererScene(rendererContext.scene);\n let createdService: FpsBabylonRendererInternalService;\n try {\n createdService = createFpsBabylonRendererService(\n runtimeData,\n rendererContext,\n assetResources,\n diagnostic => context.report(diagnostic),\n releaseSceneOwnership,\n );\n } catch (error) {\n const recoverConstruction = readFpsBabylonRendererConstructionCleanup(error)\n ?? readBabylonShadowMapExperimentSystemCleanup(error)\n ?? readBabylonDefaultPostProcessPipelineControllerCleanup(error);\n if (recoverConstruction) {\n context.add(() => {\n const cleanupErrors = [...recoverConstruction()];\n if (cleanupErrors.length > 0) {\n throw Object.assign(\n new Error('Babylon renderer construction cleanup failed.'),\n { cleanupErrors: Object.freeze(cleanupErrors) },\n );\n }\n releaseSceneOwnership();\n });\n } else {\n try { releaseSceneOwnership(); }\n catch (cleanupError) {\n const recoverRelease = createFpsBabylonRendererConstructionCleanup([releaseSceneOwnership]);\n context.add(() => throwCleanupResult(recoverRelease()));\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors: Object.freeze([cleanupError]),\n fpsBabylonRendererConstructionCleanup: recoverRelease,\n },\n );\n }\n }\n throw error;\n }\n context.add(context.services.register(FPS_BABYLON_RENDERER_SERVICE, createdService));\n context.add(() => createdService.dispose());\n },\n async start(context) {\n await getFpsBabylonRendererInternalService(context).initialize();\n },\n async dispose(context) {\n await (context.services.getOptional(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService | undefined)?.dispose();\n },\n});\n\nexport function createFpsBabylonRendererPlugin(\n options: FpsBabylonRendererPluginOptions,\n): FpsBabylonRendererPlugin {\n const manifest = defineFpsPluginManifest({\n id: FPS_BABYLON_RENDERER_PLUGIN_ID,\n version: options.pluginVersion,\n apiVersion: 1,\n requires: {},\n provides: { features: ['fps.renderer.babylon'] },\n entries: { renderer: './renderer' },\n environmentContracts: {\n renderer: {\n requires: {\n services: [\n FPS_BABYLON_RENDERER_CONTEXT.id,\n FPS_BABYLON_RENDERER_DATA.id,\n FPS_ASSET_RESOURCE_RESOLVER.id,\n ],\n },\n provides: { services: [FPS_BABYLON_RENDERER_SERVICE.id] },\n scopes: ['application'],\n },\n },\n });\n return Object.freeze({ manifest, renderer: pluginEntry });\n}\n\nexport async function createFpsBabylonRendererHost(\n options: FpsBabylonRendererHostOptions,\n): Promise<FpsBabylonRendererHost> {\n const plugin = createFpsBabylonRendererPlugin(options);\n const assetsManifest = createFpsAssetsPluginManifest();\n const host = createFpsPluginHost({\n environment: 'renderer',\n apiVersion: 1,\n manifests: [assetsManifest, plugin.manifest],\n pluginConfigs: {\n [FPS_ASSETS_PLUGIN_ID]: null,\n [FPS_BABYLON_RENDERER_PLUGIN_ID]: options.config ?? {},\n },\n initialServices: [\n { token: FPS_BABYLON_RENDERER_CONTEXT, value: options.context },\n { token: FPS_BABYLON_RENDERER_DATA, value: options.data },\n {\n token: FPS_ASSET_CATALOG_SOURCE,\n value: Object.freeze({ catalog: options.assetCatalog }),\n },\n ],\n loadEntry: async manifest => (\n manifest.id === assetsManifest.id\n ? assetsRendererPluginEntry\n : manifest.id === plugin.manifest.id\n ? plugin.renderer\n : null\n ),\n report: options.report,\n });\n try {\n await host.start();\n } catch (error) {\n if (host.state !== 'cleanup-failed') throw error;\n const retryCleanup: FpsBabylonRendererHostCleanup = () => host.dispose();\n throw attachFpsBabylonRendererHostCleanup(error, retryCleanup);\n }\n const renderer = host.services.get(FPS_BABYLON_RENDERER_SERVICE);\n let hostDisposePromise: Promise<void> | null = null;\n return {\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n host,\n renderer,\n dispose: () => {\n if (!hostDisposePromise) {\n const operation = (async () => {\n // Abort queued renderer work immediately. If cleanup fails, keep the\n // Plugin Host and Scene ownership intact until the caller explicitly\n // retries this public disposal operation.\n await renderer.dispose();\n await host.dispose();\n })();\n hostDisposePromise = operation.catch(error => {\n hostDisposePromise = null;\n throw error;\n });\n }\n return hostDisposePromise;\n },\n };\n}\n\nfunction attachFpsBabylonRendererHostCleanup(\n failure: unknown,\n cleanup: FpsBabylonRendererHostCleanup,\n): Error {\n const error = failure instanceof Error\n ? failure\n : new Error('Babylon Renderer Host start failed and cleanup is incomplete.');\n const metadata = {\n fpsBabylonRendererHostCleanup: cleanup,\n retryCleanup: cleanup,\n };\n try {\n Object.assign(error, metadata);\n if (readFpsBabylonRendererHostCleanup(error) === cleanup) return error;\n } catch {\n // Preserve the primary rejection as cause when it cannot carry cleanup metadata.\n }\n return Object.assign(\n new Error('Babylon Renderer Host start failed and cleanup is incomplete.'),\n { cause: failure, ...metadata },\n );\n}\n\ninterface FpsBabylonRendererInternalService extends FpsBabylonRendererHostController {\n readonly shadowMapExperimentSystem: BabylonShadowMapExperimentSystem;\n initialize(): Promise<void>;\n}\n\nfunction createFpsBabylonRendererService(\n initialData: FpsRuntimeData,\n context: FpsBabylonRendererContext,\n assetResources: PlayableAssetResourceResolver,\n report: (diagnostic: FpsDiagnostic) => void,\n releaseSceneOwnership: () => void,\n): FpsBabylonRendererInternalService {\n const initialPrepared = prepareFpsBabylonRendererUpdate(initialData, assetResources, report);\n let data = initialPrepared.data;\n let disposed = false;\n let acceptingUpdates = true;\n let activeAbort: AbortController | null = null;\n let queue: Promise<void> = Promise.resolve();\n let disposePromise: Promise<void> | null = null;\n const originalEnvironmentTexture = context.scene.environmentTexture;\n const sceneWithIntensity = context.scene as unknown as { environmentIntensity?: number };\n const originalEnvironmentIntensity = sceneWithIntensity.environmentIntensity;\n const restoreOriginalSceneEnvironment = (): void => {\n context.scene.environmentTexture = originalEnvironmentTexture;\n if (originalEnvironmentIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = originalEnvironmentIntensity;\n };\n const postProcess = createBabylonDefaultPostProcessPipelineController(\n context.scene,\n [...context.cameras],\n null,\n );\n let environment: BabylonEnvironmentTextureController;\n try {\n environment = createBabylonEnvironmentTextureController(context.scene, {\n createTexture: context.createEnvironmentTexture,\n });\n } catch (error) {\n throwFpsBabylonRendererConstructionFailure(error, [\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n let shadowMapExperiment: BabylonShadowMapExperimentSystem;\n try {\n shadowMapExperiment = createBabylonShadowMapExperimentSystem(context.scene);\n } catch (error) {\n const shadowCleanup = readBabylonShadowMapExperimentSystemCleanup(error);\n throwFpsBabylonRendererConstructionFailure(error, [\n ...(shadowCleanup ? [() => throwCleanupResult(shadowCleanup())] : []),\n () => environment.dispose(),\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n const assertAcceptingShadowOwnership = (): void => {\n if (!acceptingUpdates || disposed) {\n throw new Error('Babylon renderer service is disposed.');\n }\n };\n const shadows: FpsBabylonRendererShadowService = Object.freeze({\n registerRuntimeShadowObjects: (input: BabylonRuntimeShadowObjectsRegistration) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerRuntimeShadowObjects(input);\n },\n registerActivitySource: (input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerCasterActivitySource(input);\n },\n getRuntimeSnapshot: () => shadowMapExperiment.getEvidence().runtime,\n getEvidence: () => shadowMapExperiment.getEvidence(),\n });\n\n const cleanup = (): void => {\n const cleanupErrors: unknown[] = [];\n try { shadowMapExperiment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { environment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { postProcess.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { restoreOriginalSceneEnvironment(); } catch (error) { cleanupErrors.push(error); }\n if (cleanupErrors.length === 0) {\n try { releaseSceneOwnership(); } catch (error) { cleanupErrors.push(error); }\n }\n if (cleanupErrors.length > 0) {\n const error = new Error('Babylon renderer cleanup failed.');\n Object.assign(error, { cleanupErrors });\n throw error;\n }\n };\n\n const commit = async (\n prepared: FpsBabylonRendererPreparedUpdate,\n signal: AbortSignal,\n ): Promise<void> => {\n const previousEnvironment = environment.getProfile();\n const previousControllerTexture = environment.getTexture();\n const previousSceneTexture = context.scene.environmentTexture;\n const previousSceneIntensity = sceneWithIntensity.environmentIntensity;\n const previousPostProcess = postProcess.getProfile();\n const previousShadowMapExperimentPlan = shadowMapExperiment.getPlan();\n try {\n shadowMapExperiment.setPlan(prepared.shadowMapExperimentPlan);\n postProcess.setProfile(prepared.postProcess);\n await environment.applyProfile(prepared.environment, signal);\n if (signal.aborted) throw createFpsBabylonRendererAbortError();\n data = prepared.data;\n } catch (error) {\n const rollbackErrors: unknown[] = [];\n try { await environment.applyProfile(previousEnvironment); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try {\n if (previousSceneTexture !== previousControllerTexture) {\n context.scene.environmentTexture = previousSceneTexture;\n }\n if (previousSceneIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = previousSceneIntensity;\n } catch (rollbackError) {\n rollbackErrors.push(rollbackError);\n }\n try { postProcess.setProfile(previousPostProcess); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try { shadowMapExperiment.setPlan(previousShadowMapExperimentPlan); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n if (rollbackErrors.length > 0) {\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer update failed.',\n { rollbackErrors: Object.freeze(rollbackErrors) },\n );\n }\n throw error;\n }\n };\n\n const enqueue = (prepared: FpsBabylonRendererPreparedUpdate): Promise<void> => {\n const operation = queue.then(async () => {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n const abort = new AbortController();\n activeAbort = abort;\n try {\n await commit(prepared, abort.signal);\n } finally {\n if (activeAbort === abort) activeAbort = null;\n }\n });\n queue = operation.then(() => undefined, () => undefined);\n return operation;\n };\n\n const service: FpsBabylonRendererInternalService = {\n environment,\n postProcess,\n shadows,\n shadowMapExperimentSystem: shadowMapExperiment,\n getRuntimeData: () => data,\n initialize: () => enqueue(initialPrepared),\n async update(nextData) {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n await enqueue(prepareFpsBabylonRendererUpdate(nextData, assetResources, report));\n },\n async dispose() {\n if (disposePromise) return disposePromise;\n acceptingUpdates = false;\n activeAbort?.abort();\n const operation = (async () => {\n await queue;\n if (disposed) return;\n cleanup();\n disposed = true;\n })();\n disposePromise = operation.catch(error => {\n disposePromise = null;\n throw error;\n });\n return disposePromise;\n },\n };\n return service;\n}\n\ntype FpsBabylonRendererConstructionCleanup = () => readonly unknown[];\n\nfunction throwFpsBabylonRendererConstructionFailure(\n failure: unknown,\n operations: readonly (() => void)[],\n): never {\n const cleanup = createFpsBabylonRendererConstructionCleanup(operations);\n const cleanupErrors = cleanup();\n if (cleanupErrors.length === 0) throw failure;\n throw createFailureWithMetadata(\n failure,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors,\n fpsBabylonRendererConstructionCleanup: cleanup,\n },\n );\n}\n\nfunction createFpsBabylonRendererConstructionCleanup(\n operations: readonly (() => void)[],\n): FpsBabylonRendererConstructionCleanup {\n let pending = [...operations];\n return () => {\n const cleanupErrors: unknown[] = [];\n const retry: (() => void)[] = [];\n for (const operation of pending) {\n try { operation(); }\n catch (error) {\n cleanupErrors.push(error);\n retry.push(operation);\n }\n }\n pending = retry;\n return Object.freeze(cleanupErrors);\n };\n}\n\nfunction readFpsBabylonRendererConstructionCleanup(\n error: unknown,\n): FpsBabylonRendererConstructionCleanup | null {\n if (!error || (typeof error !== 'object' && typeof error !== 'function')) return null;\n const cleanup = (error as { fpsBabylonRendererConstructionCleanup?: unknown })\n .fpsBabylonRendererConstructionCleanup;\n return typeof cleanup === 'function' ? cleanup as FpsBabylonRendererConstructionCleanup : null;\n}\n\nfunction throwCleanupResult(cleanupErrors: readonly unknown[]): void {\n if (cleanupErrors.length === 0) return;\n if (cleanupErrors.length === 1) throw cleanupErrors[0];\n throw Object.assign(new Error('Babylon renderer construction cleanup failed.'), {\n cleanupErrors: Object.freeze([...cleanupErrors]),\n });\n}\n\nfunction createFailureWithMetadata(\n failure: unknown,\n fallbackMessage: string,\n metadata: Readonly<Record<string, unknown>>,\n): object {\n if (failure && (typeof failure === 'object' || typeof failure === 'function')) {\n try {\n Object.assign(failure, metadata);\n if (Object.entries(metadata).every(([key, value]) => (\n (failure as Record<string, unknown>)[key] === value\n ))) return failure;\n } catch {\n // A non-extensible primary error is wrapped so recovery metadata remains reachable.\n }\n }\n return Object.assign(\n new Error(failure instanceof Error ? failure.message : fallbackMessage),\n { cause: failure, ...metadata },\n );\n}\n\nfunction reserveFpsBabylonRendererScene(scene: Scene): () => void {\n if (fpsBabylonRendererSceneOwners.has(scene)) {\n throw new Error('Babylon renderer Scene already has an active owner.');\n }\n const owner = Object.freeze({});\n fpsBabylonRendererSceneOwners.set(scene, owner);\n let released = false;\n return () => {\n if (released) return;\n if (fpsBabylonRendererSceneOwners.get(scene) !== owner) {\n throw new Error('Babylon renderer Scene ownership was replaced before cleanup completed.');\n }\n fpsBabylonRendererSceneOwners.delete(scene);\n released = true;\n };\n}\n\nfunction getFpsBabylonRendererInternalService(\n context: Parameters<NonNullable<FpsPluginEntry['start']>>[0],\n): FpsBabylonRendererInternalService {\n return context.services.get(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService;\n}\n\nfunction createFpsBabylonRendererAbortError(): Error {\n return Object.assign(new Error('Babylon renderer update aborted.'), { name: 'AbortError' });\n}\n\ninterface FpsBabylonRendererPreparedUpdate {\n readonly data: FpsRuntimeData;\n readonly environment: {\n readonly texture: PlayableResolvedAssetResource | null;\n readonly intensity: number;\n readonly rotationY: number;\n };\n readonly postProcess: ReturnType<typeof normalizeEditorSceneRenderingProfile>['postProcess'];\n readonly shadowMapExperimentPlan: ShadowMapExperimentPlan | null;\n}\n\nfunction prepareFpsBabylonRendererUpdate(\n input: FpsRuntimeData,\n assetResources: PlayableAssetResourceResolver,\n report: (diagnostic: FpsDiagnostic) => void,\n): FpsBabylonRendererPreparedUpdate {\n const data = createFpsRuntimeDataSnapshot(input);\n const profile = normalizeEditorSceneRenderingProfile(data.rendering);\n const textureRef = profile.environment.texture;\n const textureResolution = textureRef\n ? assetResources.resolve({\n assetId: textureRef.textureAssetId,\n url: textureRef.url,\n })\n : null;\n if (textureResolution && !textureResolution.ok) {\n const diagnostic: FpsDiagnostic = {\n code: textureResolution.diagnostic.code,\n severity: 'error',\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n message: createAssetResourceResolutionMessage(textureResolution.diagnostic),\n details: { ...textureResolution.diagnostic },\n };\n report(diagnostic);\n throw Object.assign(new Error(diagnostic.message), {\n code: diagnostic.code,\n diagnostic: Object.freeze(diagnostic),\n });\n }\n const shadowMapExperimentEntry = data.plugins?.find(\n entry => entry.pluginId === FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n );\n return Object.freeze({\n data,\n environment: Object.freeze({\n texture: textureResolution?.resource ?? null,\n intensity: profile.environment.iblIntensity,\n rotationY: profile.environment.rotationY,\n }),\n postProcess: profile.postProcess,\n shadowMapExperimentPlan: shadowMapExperimentEntry\n ? createShadowMapExperimentPlanSnapshot(shadowMapExperimentEntry.data)\n : null,\n });\n}\n\nfunction createAssetResourceResolutionMessage(\n diagnostic: PlayableAssetResourceResolutionDiagnostic,\n): string {\n const identity = diagnostic.assetId ? ` asset ${diagnostic.assetId}` : ' external resource';\n if (diagnostic.code === 'asset.resource.not-found') {\n return `Environment texture${identity} was not found in the generated asset catalog.`;\n }\n if (diagnostic.code === 'asset.resource.format-missing') {\n return `Environment texture${identity} has no resolvable source format.`;\n }\n if (diagnostic.code === 'asset.resource.format-unsupported') {\n return `Environment texture${identity} uses unsupported format ${diagnostic.format ?? '<unknown>'}.`;\n }\n return `Environment texture${identity} reference is invalid.`;\n}\n"]}
@@ -1,8 +1,6 @@
1
1
  import { type FpsPluginReference } from '@fps-games/plugin-api';
2
2
  export declare const FPS_BABYLON_RENDERER_PLUGIN_ID = "fps.renderer.babylon";
3
3
  export declare const FPS_BABYLON_RENDERER_PACKAGE_NAME = "@fps-games/babylon-renderer";
4
- export interface FpsBabylonRendererPluginConfig {
5
- readonly environmentTexture?: string | null;
6
- }
4
+ export type FpsBabylonRendererPluginConfig = Readonly<Record<string, never>>;
7
5
  export declare function babylonRendererPlugin(config?: FpsBabylonRendererPluginConfig): Readonly<FpsPluginReference<FpsBabylonRendererPluginConfig>>;
8
6
  //# sourceMappingURL=reference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AACrE,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAE/E,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7C;AAED,wBAAgB,qBAAqB,CACnC,MAAM,GAAE,8BAAmC,GAC1C,QAAQ,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAC,CAY9D"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AACrE,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAE/E,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAE7E,wBAAgB,qBAAqB,CACnC,MAAM,GAAE,8BAAmC,GAC1C,QAAQ,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAC,CAY9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,8BAA8B,GAAG,sBAAsB,CAAC;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;AAM/E,MAAM,UAAU,qBAAqB,CACnC,SAAyC,EAAE;IAE3C,OAAO,wBAAwB,CAAC;QAC9B,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,8BAA8B;QACxC,MAAM;QACN,YAAY,EAAE;YACZ,QAAQ,EAAE;gBACR,8BAA8B;gBAC9B,mCAAmC;aACpC;SACF;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n defineFpsPluginReference,\n type FpsPluginReference,\n} from '@fps-games/plugin-api';\n\nexport const FPS_BABYLON_RENDERER_PLUGIN_ID = 'fps.renderer.babylon';\nexport const FPS_BABYLON_RENDERER_PACKAGE_NAME = '@fps-games/babylon-renderer';\n\nexport interface FpsBabylonRendererPluginConfig {\n readonly environmentTexture?: string | null;\n}\n\nexport function babylonRendererPlugin(\n config: FpsBabylonRendererPluginConfig = {},\n): Readonly<FpsPluginReference<FpsBabylonRendererPluginConfig>> {\n return defineFpsPluginReference({\n packageName: FPS_BABYLON_RENDERER_PACKAGE_NAME,\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n config,\n hostServices: {\n renderer: [\n 'fps.renderer.babylon.context',\n 'fps.renderer.babylon.runtime-data',\n ],\n },\n });\n}\n"]}
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,8BAA8B,GAAG,sBAAsB,CAAC;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;AAI/E,MAAM,UAAU,qBAAqB,CACnC,SAAyC,EAAE;IAE3C,OAAO,wBAAwB,CAAC;QAC9B,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,8BAA8B;QACxC,MAAM;QACN,YAAY,EAAE;YACZ,QAAQ,EAAE;gBACR,8BAA8B;gBAC9B,mCAAmC;aACpC;SACF;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n defineFpsPluginReference,\n type FpsPluginReference,\n} from '@fps-games/plugin-api';\n\nexport const FPS_BABYLON_RENDERER_PLUGIN_ID = 'fps.renderer.babylon';\nexport const FPS_BABYLON_RENDERER_PACKAGE_NAME = '@fps-games/babylon-renderer';\n\nexport type FpsBabylonRendererPluginConfig = Readonly<Record<string, never>>;\n\nexport function babylonRendererPlugin(\n config: FpsBabylonRendererPluginConfig = {},\n): Readonly<FpsPluginReference<FpsBabylonRendererPluginConfig>> {\n return defineFpsPluginReference({\n packageName: FPS_BABYLON_RENDERER_PACKAGE_NAME,\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n config,\n hostServices: {\n renderer: [\n 'fps.renderer.babylon.context',\n 'fps.renderer.babylon.runtime-data',\n ],\n },\n });\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/babylon-renderer",
3
- "version": "0.2.1-beta.1",
3
+ "version": "0.2.1-beta.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Babylon-backed renderer capabilities for fps-game-editor.",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "fpsGamePlugin": {
26
26
  "id": "fps.renderer.babylon",
27
- "version": "0.2.1-beta.1",
27
+ "version": "0.2.1-beta.3",
28
28
  "apiVersion": 1,
29
29
  "requires": {},
30
30
  "provides": {
@@ -40,7 +40,8 @@
40
40
  "requires": {
41
41
  "services": [
42
42
  "fps.renderer.babylon.context",
43
- "fps.renderer.babylon.runtime-data"
43
+ "fps.renderer.babylon.runtime-data",
44
+ "fps.asset.resource.resolver"
44
45
  ]
45
46
  },
46
47
  "provides": {
@@ -55,11 +56,13 @@
55
56
  }
56
57
  },
57
58
  "dependencies": {
58
- "@fps-games/playable-contracts": "0.2.1-beta.1",
59
- "@fps-games/playable-rendering": "0.2.1-beta.1",
60
- "@fps-games/playable-runtime-data": "0.2.1-beta.1",
61
- "@fps-games/plugin-api": "0.2.1-beta.1",
62
- "@fps-games/plugin-host": "0.2.1-beta.1"
59
+ "@fps-games/playable-assets": "0.2.1-beta.3",
60
+ "@fps-games/playable-contracts": "0.2.1-beta.3",
61
+ "@fps-games/playable-rendering": "0.2.1-beta.3",
62
+ "@fps-games/playable-runtime-data": "0.2.1-beta.3",
63
+ "@fps-games/plugin-assets": "0.2.1-beta.3",
64
+ "@fps-games/plugin-api": "0.2.1-beta.3",
65
+ "@fps-games/plugin-host": "0.2.1-beta.3"
63
66
  },
64
67
  "peerDependencies": {
65
68
  "@babylonjs/core": "^8.0.0"
@@ -1329,6 +1329,19 @@ function createTransformBounds(transform) {
1329
1329
  y: max.y - min.y,
1330
1330
  z: max.z - min.z,
1331
1331
  },
1332
+ oriented: {
1333
+ center: { ...transform.position },
1334
+ size: {
1335
+ x: Math.abs(transform.scale.x),
1336
+ y: Math.abs(transform.scale.y),
1337
+ z: Math.abs(transform.scale.z),
1338
+ },
1339
+ axes: {
1340
+ x: rotateVec3ByEuler({ x: 1, y: 0, z: 0 }, transform.rotation),
1341
+ y: rotateVec3ByEuler({ x: 0, y: 1, z: 0 }, transform.rotation),
1342
+ z: rotateVec3ByEuler({ x: 0, y: 0, z: 1 }, transform.rotation),
1343
+ },
1344
+ },
1332
1345
  };
1333
1346
  }
1334
1347
  function rotateVec3ByEuler(value, rotation) {
@@ -1390,6 +1403,17 @@ function cloneBounds(bounds) {
1390
1403
  max: { ...bounds.max },
1391
1404
  center: { ...bounds.center },
1392
1405
  size: { ...bounds.size },
1406
+ ...(bounds.oriented ? {
1407
+ oriented: {
1408
+ center: { ...bounds.oriented.center },
1409
+ size: { ...bounds.oriented.size },
1410
+ axes: {
1411
+ x: { ...bounds.oriented.axes.x },
1412
+ y: { ...bounds.oriented.axes.y },
1413
+ z: { ...bounds.oriented.axes.z },
1414
+ },
1415
+ },
1416
+ } : {}),
1393
1417
  };
1394
1418
  }
1395
1419
  //# sourceMappingURL=marker-overlay.js.map