@volter/game-editor 0.5.82 → 0.5.83

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 (332) hide show
  1. package/BUNDLED_NOTICES +22 -22
  2. package/catalog/entries/blender.json +2 -2
  3. package/catalog/entries/music.json +2 -2
  4. package/catalog/entries/reflections.json +1 -1
  5. package/catalog/project-source/src/lib/reflections/ReflectionProbe.tsx +34 -5
  6. package/catalog/project-source/src/lib/reflections/index.ts +1 -0
  7. package/catalog/project-source/src/lib/reflections/probe-controller.ts +44 -3
  8. package/catalog/project-source/src/lib/reflections/reflection-probe-registry.ts +32 -7
  9. package/catalog/project-source/src/lib/reflections/volume-reflection-material.ts +638 -160
  10. package/dist/.vite/manifest.json +2206 -2188
  11. package/dist/assets/{AssetBudgetPanel-Iip49rxI.js → AssetBudgetPanel-SrgQ5Lx5.js} +3 -3
  12. package/dist/assets/{AudioViewer-DmkOvskF.js → AudioViewer-BqEwLSZN.js} +1 -1
  13. package/dist/assets/{CanvasBoardDocument-DCS8uzQo.js → CanvasBoardDocument-BfzWZdLX.js} +1 -1
  14. package/dist/assets/{CanvasSceneViewport-CfOuQiQ0.js → CanvasSceneViewport-CQ7ewAlO.js} +1 -1
  15. package/dist/assets/{ColorInput-7CPpl8MI.js → ColorInput-DQ6YyPD_.js} +1 -1
  16. package/dist/assets/EntityModelDocument-By-BM9dS.js +1 -0
  17. package/dist/assets/{EnvironmentAssetDocument-DlS6KFJu.js → EnvironmentAssetDocument-CrD37BI0.js} +1 -1
  18. package/dist/assets/{GameplaySessionTimeline-C3zH6edi.js → GameplaySessionTimeline-DYtnW0Si.js} +1 -1
  19. package/dist/assets/{ImageViewer-C0lQ6YO0.js → ImageViewer-CZNpdUEA.js} +1 -1
  20. package/dist/assets/InspectorObjectPreview-gWOVV6Ll.js +1 -0
  21. package/dist/assets/{JsonAssetDocument-DjmH9CQH.js → JsonAssetDocument-Bg74MDXy.js} +1 -1
  22. package/dist/assets/{LiveModuleDocument-Hiot8Q5L.js → LiveModuleDocument-CSqzNMjn.js} +1 -1
  23. package/dist/assets/{LutAssetDocument-6bBwNMOn.js → LutAssetDocument-CsboXa8x.js} +1 -1
  24. package/dist/assets/ModelAssetDocument-DDVoKZpQ.js +1 -0
  25. package/dist/assets/{NonThreeAuthoringBootstrap-DpieYAMC.js → NonThreeAuthoringBootstrap-DcqD6_34.js} +1 -1
  26. package/dist/assets/{Object3DDocumentToolbar-BtZkDxKa.js → Object3DDocumentToolbar-p2pd2TuS.js} +1 -1
  27. package/dist/assets/Object3DDocumentViewport-BvNfSHi_.js +2 -0
  28. package/dist/assets/{Object3DPreview-DdrYVJUZ.js → Object3DPreview-Bv0fZcdS.js} +1 -1
  29. package/dist/assets/{OnlineAssetDetail-D06eTe3y.js → OnlineAssetDetail-CPDafN4x.js} +1 -1
  30. package/dist/assets/{PlayBar-BbzjgLFJ.js → PlayBar-CBD4rcED.js} +1 -1
  31. package/dist/assets/{QuarksAssetDocument-wGHNt4ov.js → QuarksAssetDocument-DUUhKUxZ.js} +1 -1
  32. package/dist/assets/{ReactCanvasControls-BL2tOUj6.js → ReactCanvasControls-3ual87uP.js} +1 -1
  33. package/dist/assets/{RootSelectionOverlay-C6Wu8nIs.js → RootSelectionOverlay-DtX8yWUQ.js} +1 -1
  34. package/dist/assets/{ShaderAssetDocument-BDi8iNLA.js → ShaderAssetDocument-rkhRdPRk.js} +3 -3
  35. package/dist/assets/{ShadowEditor-C3L0UWSH.js → ShadowEditor-B-3FlftY.js} +1 -1
  36. package/dist/assets/{SourceAssetViewer-D832bARo.js → SourceAssetViewer-CsMPohqK.js} +1 -1
  37. package/dist/assets/StageHost-BOaImrmu.js +2 -0
  38. package/dist/assets/{StoryPreviewMount-CmOEFzZY.js → StoryPreviewMount-BI-ANJix.js} +1 -1
  39. package/dist/assets/{ThreeBoardDocument-BtBMGtiQ.js → ThreeBoardDocument-CoBjs8BP.js} +2 -2
  40. package/dist/assets/{ThreeIsolationSceneContent-BEHNSEsi.js → ThreeIsolationSceneContent-uShwSK1O.js} +1 -1
  41. package/dist/assets/{ToolObject3DPreview-76LMkfin.js → ToolObject3DPreview-CBZdWA_7.js} +1 -1
  42. package/dist/assets/{Toolbar-BEBQdxRz.js → Toolbar-DJK7o_be.js} +1 -1
  43. package/dist/assets/{TransientHint-CzsdY8W6.js → TransientHint-Dgu6u7U5.js} +1 -1
  44. package/dist/assets/{VideoViewer-Ckrawyuq.js → VideoViewer-BwTcASO2.js} +1 -1
  45. package/dist/assets/{ViewportShadingMenu-BofQt6_4.js → ViewportShadingMenu-DUROUZdC.js} +1 -1
  46. package/dist/assets/{active-ingest-D_ryI_R4.js → active-ingest-Ra07ruDo.js} +3 -3
  47. package/dist/assets/{animation-clock-QjtJDIsR.js → animation-clock-CKeqYCt9.js} +1 -1
  48. package/dist/assets/{animation-mixers.service-BInUs1US.js → animation-mixers.service-BNiEU2dA.js} +1 -1
  49. package/dist/assets/{animation-timeline.utility-DUrfNSwn.js → animation-timeline.utility-DQqMh1lF.js} +1 -1
  50. package/dist/assets/{asset-budget-asset.menu-DVQEksFp.js → asset-budget-asset.menu-DFFih9b4.js} +1 -1
  51. package/dist/assets/{asset-budget.action-C-ENAa52.js → asset-budget.action-C3SMMeSX.js} +1 -1
  52. package/dist/assets/{asset-budget.document-Bb1PyL3H.js → asset-budget.document-B5NTy5dU.js} +1 -1
  53. package/dist/assets/{asset-budget.menu-CPi2yjBA.js → asset-budget.menu-Cclz2utV.js} +1 -1
  54. package/dist/assets/{asset-editor-persistence-Duoq7o22.js → asset-editor-persistence-DsIjTddX.js} +1 -1
  55. package/dist/assets/{asset-loaders-BftJ2m7-.js → asset-loaders-CQiLyapK.js} +1 -1
  56. package/dist/assets/{asset-preview-BS71mXsZ.js → asset-preview-BkFAKkZH.js} +1 -1
  57. package/dist/assets/{audio-unlock.service-C3ygvDjU.js → audio-unlock.service-CupzdUuC.js} +1 -1
  58. package/dist/assets/{audio.utility-DF55sgHW.js → audio.utility-0il96T5s.js} +1 -1
  59. package/dist/assets/autoplay.service-SQBFaKvM.js +1 -0
  60. package/dist/assets/{babylon-authoring-adapter-CmeehOBt.js → babylon-authoring-adapter-HZ_SbAet.js} +1 -1
  61. package/dist/assets/{binding-resolver-DUz8C8Fs.js → binding-resolver-BoecCqTq.js} +2 -2
  62. package/dist/assets/blender-emscripten-engine-Dk-rq4bm.js +2 -0
  63. package/dist/assets/{blender-node-editor.document-B8S2TVMM.js → blender-node-editor.document-B_MGPd1D.js} +1 -1
  64. package/dist/assets/{blender-properties-tab-y-_BeZDx.js → blender-properties-tab-ITmWT_gZ.js} +1 -1
  65. package/dist/assets/{blender-runtime-host-CUH6peXj.js → blender-runtime-host-CACzxt1b.js} +1 -1
  66. package/dist/assets/{blender-runtime-skin-B1tYITn2.js → blender-runtime-skin-CwFW2Hj7.js} +13 -13
  67. package/dist/assets/blender-runtime.document-CozOB5TX.js +13 -0
  68. package/dist/assets/blender-screenshot.menu-BFR44H0L.js +1 -0
  69. package/dist/assets/{blender-timeline.document-CeCylyXB.js → blender-timeline.document-C0Zzi8Vo.js} +1 -1
  70. package/dist/assets/{blender-uv-editor.document-DEllMw3a.js → blender-uv-editor.document-BktbYoor.js} +1 -1
  71. package/dist/assets/{blender-version.status-CrT9NqK-.js → blender-version.status-CLPjDPFV.js} +1 -1
  72. package/dist/assets/blender-wali-engine-CUWSQ_vI.js +2 -0
  73. package/dist/assets/{blender.command-GIjMG1-m.js → blender.command-DdHEHM62.js} +1 -1
  74. package/dist/assets/{board-guides-B6TEPOPi.js → board-guides-DhwRYHGT.js} +1 -1
  75. package/dist/assets/bridge.command-D4O9w4ft.js +3 -0
  76. package/dist/assets/{browserAll-k35XRFil.js → browserAll-BhQBgoJL.js} +1 -1
  77. package/dist/assets/{build-player.document-CHxj4P8q.js → build-player.document-DFr-d97N.js} +1 -1
  78. package/dist/assets/{build-profiles.document-CZCk1HYA.js → build-profiles.document-C-64YHSV.js} +2 -2
  79. package/dist/assets/{build-progress.status-BNwBxP2a.js → build-progress.status-DVm95Lmt.js} +1 -1
  80. package/dist/assets/{build-session-CW2UyYFF.js → build-session-C_SD2MNJ.js} +1 -1
  81. package/dist/assets/{build.action-EmCcMu47.js → build.action-CPee4b_9.js} +1 -1
  82. package/dist/assets/{build.command-CzEckGcR.js → build.command-CrZ5sHYt.js} +1 -1
  83. package/dist/assets/{build.header-CsYLpZbh.js → build.header-DDbhXD6t.js} +1 -1
  84. package/dist/assets/{build.menu-CaDkDQuy.js → build.menu-Ci-W_A1E.js} +1 -1
  85. package/dist/assets/{build.service-BcKtbU0-.js → build.service-CpUtTLP4.js} +1 -1
  86. package/dist/assets/{camera-BwWZUyKt.js → camera-BZM67LhS.js} +1 -1
  87. package/dist/assets/{camera-runtime.inspector-CJyi3zmp.js → camera-runtime.inspector-BLgPGd97.js} +1 -1
  88. package/dist/assets/{canvas-design-mount-B_uwZkEU.js → canvas-design-mount-DPAhHuIQ.js} +4 -4
  89. package/dist/assets/{canvas-entry-runtime-DskaohHK.js → canvas-entry-runtime-DeyvFKWS.js} +2 -2
  90. package/dist/assets/{canvas-preview-frames-BzLeTumX.js → canvas-preview-frames-Cm0GJ-40.js} +1 -1
  91. package/dist/assets/{canvas-story-capture.service-C80CsS8r.js → canvas-story-capture.service-Ziv9XNot.js} +2 -2
  92. package/dist/assets/{capability-coverage-wd6bAhv3.js → capability-coverage-39yK3DGt.js} +3 -3
  93. package/dist/assets/collaboration-presence-MR8LW4mZ.js +1 -0
  94. package/dist/assets/{collider-Dw2iWV3F.js → collider-4Sgmy-qt.js} +1 -1
  95. package/dist/assets/component-board.service-BdcOkwgn.js +2 -0
  96. package/dist/assets/{component-board.service-CH99sgj0.js → component-board.service-DO_oHdnS.js} +2 -2
  97. package/dist/assets/{component-board.service-XAxyLCnM.js → component-board.service-DRJcETCR.js} +2 -2
  98. package/dist/assets/{component-contracts.service-DerT0BP-.js → component-contracts.service-BYQTO1HK.js} +1 -1
  99. package/dist/assets/{component-instance-root-Cw_-ajBX.js → component-instance-root-CzRnRMe6.js} +1 -1
  100. package/dist/assets/{component-verbs.command-BHK9M2Rk.js → component-verbs.command-CFv5y_pR.js} +1 -1
  101. package/dist/assets/component-verbs.service-BMBAwqjA.js +1 -0
  102. package/dist/assets/{config-1rCvm02z.js → config-C6iAsozB.js} +3 -3
  103. package/dist/assets/{configurations-CRTYw0r9.js → configurations-Dua_x6Wx.js} +1 -1
  104. package/dist/assets/{connection.status-D4fjnH24.js → connection.status-DQJvEgdT.js} +1 -1
  105. package/dist/assets/{constraints.inspector-BgnafOLf.js → constraints.inspector-AHeP-LBc.js} +1 -1
  106. package/dist/assets/{content-bounds-D5pXeHJN.js → content-bounds-tMCAobKq.js} +1 -1
  107. package/dist/assets/{contract-system-adapters-rVGdworX.js → contract-system-adapters-D6ion7SF.js} +1 -1
  108. package/dist/assets/{coverage.service-BNme5Agb.js → coverage.service-Dm_H5o74.js} +2 -2
  109. package/dist/assets/{create-runtime-CcuQTSfy.js → create-runtime-C82CmCbc.js} +2 -2
  110. package/dist/assets/{curve-DorFv33R.js → curve-C7Gg05DV.js} +1 -1
  111. package/dist/assets/{data-asset-CAE35Emh.js → data-asset-BquhdFX2.js} +1 -1
  112. package/dist/assets/{data-ref-DXqRnZsJ.js → data-ref-Dcq9KJIG.js} +1 -1
  113. package/dist/assets/{debug-bridge-DdCJSEni.js → debug-bridge-DODnLefz.js} +1 -1
  114. package/dist/assets/{debug-registry-xQJcVubm.js → debug-registry-CwYeaZ9J.js} +1 -1
  115. package/dist/assets/{deferred-ingest-play-CEnsC3uN.js → deferred-ingest-play-7EJo_GNB.js} +2 -2
  116. package/dist/assets/{design-time-canvas-mount-CPRrCPFA.js → design-time-canvas-mount-DCINR1Hg.js} +2 -2
  117. package/dist/assets/{design-time-layers-hmGqBp06.js → design-time-layers-i1N-JjPz.js} +1 -1
  118. package/dist/assets/{design-time-mount.service-CLL-1Za4.js → design-time-mount.service-CtnijZJJ.js} +2 -2
  119. package/dist/assets/{design-time-mount.service-CEmJjRIJ.js → design-time-mount.service-DrUVDx2-.js} +2 -2
  120. package/dist/assets/{design-time-react-mount-DmXi3GBy.js → design-time-react-mount-CpgoPMGr.js} +1 -1
  121. package/dist/assets/{document-preview-three-B4j_zNef.js → document-preview-three-CuBUMP4o.js} +1 -1
  122. package/dist/assets/{dom-authoring-adapter-BklRbjZB.js → dom-authoring-adapter-DSM-2JgU.js} +1 -1
  123. package/dist/assets/{draco3d-CFWI1XDT.js → draco3d--d91Ay95.js} +1 -1
  124. package/dist/assets/{edit-mode-audio.service-SUzv0nHs.js → edit-mode-audio.service-C9_299G0.js} +1 -1
  125. package/dist/assets/{edit-mode-authoring-CSt3zzmS.js → edit-mode-authoring-DgvzXpiM.js} +1 -1
  126. package/dist/assets/{edit-mode-networking.service-D6UohrCr.js → edit-mode-networking.service-B6l9ESo-.js} +1 -1
  127. package/dist/assets/editor-api-D9NJWRVZ.js +1 -0
  128. package/dist/assets/{editor-layers-CjeYrUlm.js → editor-layers-D7HXdvWY.js} +1 -1
  129. package/dist/assets/{editor-shell-store-DckLm6m8.js → editor-shell-store-CGWO4Ldz.js} +1 -1
  130. package/dist/assets/{entity-object-V13bGmay.js → entity-object-Dl04-FE8.js} +1 -1
  131. package/dist/assets/{extend-BQeRA-aV.js → extend-GXzJ7XU_.js} +1 -1
  132. package/dist/assets/fork-menu-DO1KASKk.js +1 -0
  133. package/dist/assets/{frame-debugger-store-DDxWlDPK.js → frame-debugger-store-DOewah-x.js} +1 -1
  134. package/dist/assets/{game-contract-seams-DrYyE5PX.js → game-contract-seams-B5a-Ev-f.js} +1 -1
  135. package/dist/assets/{game-css-scope-transform-D5hQWaci.js → game-css-scope-transform-CQhuDfMR.js} +1 -1
  136. package/dist/assets/{game-document.service-cJ1yKc2V.js → game-document.service-CMc6SfH9.js} +1 -1
  137. package/dist/assets/{game-eval.command-CKo-W17_.js → game-eval.command-MY5YxNL-.js} +1 -1
  138. package/dist/assets/{game-module-access-DuptGLGx.js → game-module-access-BafPamOR.js} +1 -1
  139. package/dist/assets/{game-network-CAH_Jsh6.js → game-network-COQRxS_4.js} +3 -3
  140. package/dist/assets/{gameplay-export-B-JE4uSD.js → gameplay-export-i_fnSpRp.js} +1 -1
  141. package/dist/assets/gameplay-replay-BM_frdpr.js +1 -0
  142. package/dist/assets/{gameplay.command-D4cY3nOq.js → gameplay.command-Dkp2IG9Q.js} +1 -1
  143. package/dist/assets/{generation-jobs-CcCrhKLM.js → generation-jobs-B6T_j2D_.js} +1 -1
  144. package/dist/assets/{generation.service-CQwmLAOQ.js → generation.service-BXJTa6dr.js} +1 -1
  145. package/dist/assets/{generations-qfhCRH8C.js → generations-DqNhoKz8.js} +1 -1
  146. package/dist/assets/{generations.status-CcbR2OfF.js → generations.status-Dt8TW7Lk.js} +1 -1
  147. package/dist/assets/{hierarchy-marks-B1jSqxSv.js → hierarchy-marks-fSNwXIFe.js} +1 -1
  148. package/dist/assets/{hosted-asset-materialization-BZf-8JA1.js → hosted-asset-materialization-76jdNP28.js} +2 -2
  149. package/dist/assets/ibl-override-material-C09OAhCc.js +6 -0
  150. package/dist/assets/{index-V4J7xfRg.js → index-C5tasxXb.js} +294 -294
  151. package/dist/assets/{index-DXtfej3G.js → index-CKznhnFr.js} +1 -1
  152. package/dist/assets/index-CO6HFW9e.js +1 -0
  153. package/dist/assets/{index-aREcGExk.js → index-Cf-uQvPt.js} +1 -1
  154. package/dist/assets/{index-D_ViOFCz.js → index-Cub6ESrb.js} +2 -2
  155. package/dist/assets/{index-DrEVdQvN.js → index-D5pDWxZH.js} +1 -1
  156. package/dist/assets/{index-Cj_b0Ygc.js → index-c6fd_bqy.js} +1 -1
  157. package/dist/assets/{index-CHa43s2p.js → index-cGaEzVz5.js} +1 -1
  158. package/dist/assets/{index-D-RMHSzb.js → index-cNdu8TlA.js} +1 -1
  159. package/dist/assets/{inference-diagnostics-DoZQ1mpg.js → inference-diagnostics-D7uYs70A.js} +1 -1
  160. package/dist/assets/{ingest-boot-viewport-DWdOtGGE.js → ingest-boot-viewport-CjtFKkMD.js} +1 -1
  161. package/dist/assets/{ingest-siblings-DyvasVDH.js → ingest-siblings-Dlx0quan.js} +1 -1
  162. package/dist/assets/{ingest-source-persistence-CQOJeGhj.js → ingest-source-persistence-SAe0xIy-.js} +1 -1
  163. package/dist/assets/{ingest.service-CqIcydem.js → ingest.service-BXkZ1vXa.js} +1 -1
  164. package/dist/assets/{inspect-DiSjB-N1.js → inspect-BqIL-41D.js} +1 -1
  165. package/dist/assets/instances.command-wpQVWPb9.js +1 -0
  166. package/dist/assets/{json-history-resource-CH2nzMZh.js → json-history-resource-BUJgH5iK.js} +1 -1
  167. package/dist/assets/layered-pick-RElCrqXb.js +1 -0
  168. package/dist/assets/{light-CxiGIJma.js → light-DLADuHH2.js} +1 -1
  169. package/dist/assets/{live-project-verbs-CnknlUlT.js → live-project-verbs-Cc1GXtG5.js} +1 -1
  170. package/dist/assets/{machine.document-D7jMrzXt.js → machine.document-ER7OD-37.js} +1 -1
  171. package/dist/assets/{machines.finder-Dor3O0uf.js → machines.finder-CZ2ZxPFR.js} +1 -1
  172. package/dist/assets/material-CspuVO3Q.js +1 -0
  173. package/dist/assets/{material-factory-BN3Lax5C.js → material-factory-KV4mqSzl.js} +1 -1
  174. package/dist/assets/{mesh-Cj-CYroI.js → mesh-CrIkl8_H.js} +1 -1
  175. package/dist/assets/{model-asset-sections.service-mC4WJFTA.js → model-asset-sections.service-Cyom1FRs.js} +1 -1
  176. package/dist/assets/{model-inspection-8o57YSZW.js → model-inspection-BLOiPoW4.js} +1 -1
  177. package/dist/assets/{model-thumbnail-chePRlH7.js → model-thumbnail-B7DVMYtQ.js} +1 -1
  178. package/dist/assets/{models.finder-CKkT5ZdU.js → models.finder-At2wuWE3.js} +1 -1
  179. package/dist/assets/{module-mode-BMiMhHI3.js → module-mode-CHqvCb69.js} +2 -2
  180. package/dist/assets/{mount-canvas-ingest-root-B1swVIUJ.js → mount-canvas-ingest-root-uISMj3zn.js} +2 -2
  181. package/dist/assets/{mount-dom-ingest-root-B8hO5mht.js → mount-dom-ingest-root-C8PsgrCd.js} +2 -2
  182. package/dist/assets/{mount-ingest-root-Cbnh-mSw.js → mount-ingest-root-Dmb_D_oY.js} +2 -2
  183. package/dist/assets/{mount-manifest-B7oL1Abg.js → mount-manifest-CGwCOZO6.js} +1 -1
  184. package/dist/assets/{mount-three-ingest-root-BdUJx6ix.js → mount-three-ingest-root-BGdd6UoG.js} +1 -1
  185. package/dist/assets/{mounted-authoring-C47L5H5t.js → mounted-authoring-BS53gpIm.js} +1 -1
  186. package/dist/assets/{mounted-story-viewport-source-CyEK_vaq.js → mounted-story-viewport-source-CL9Ra-_N.js} +1 -1
  187. package/dist/assets/{native-debug-module-JJOFtIVz.js → native-debug-module-DRmkIrIW.js} +1 -1
  188. package/dist/assets/{navigation-ROJM2w84.js → navigation-DOuNvaV6.js} +1 -1
  189. package/dist/assets/{navmesh.menu-DjefqtkI.js → navmesh.menu-9g4nO2dp.js} +1 -1
  190. package/dist/assets/{navmesh.service-BPqjEQiq.js → navmesh.service-B7MllQj9.js} +1 -1
  191. package/dist/assets/network-observer.service-DY_39EdG.js +1 -0
  192. package/dist/assets/{network.utility-6Y5u53n8.js → network.utility-BgzPLUS5.js} +1 -1
  193. package/dist/assets/{object3d-document-session-registry-DNCOGA3i.js → object3d-document-session-registry-Bk-I9jZH.js} +2 -2
  194. package/dist/assets/{oid-transform-DQzN_Gl_.js → oid-transform-CHeHFNUu.js} +1 -1
  195. package/dist/assets/{particles-DGdUmqOr.js → particles-RD4cI69F.js} +1 -1
  196. package/dist/assets/{pixi-authoring-adapter-BRktdcIz.js → pixi-authoring-adapter-BuP3Qc7X.js} +1 -1
  197. package/dist/assets/{pixi-live-write-target-Dg0mdLaa.js → pixi-live-write-target-DzyXhmiw.js} +1 -1
  198. package/dist/assets/{play.command-4IDAqR5W.js → play.command-C7iZbm26.js} +2 -2
  199. package/dist/assets/{presentation-8m-RDKIS.js → presentation-43UAzXCV.js} +1 -1
  200. package/dist/assets/{product-t6tauO7R.js → product-BfaoEtK8.js} +1 -1
  201. package/dist/assets/{profiler.action-CXA4IkQB.js → profiler.action-DIp4OPNA.js} +1 -1
  202. package/dist/assets/{profiler.menu-BgIBv4-I.js → profiler.menu-tHZqii7c.js} +1 -1
  203. package/dist/assets/{profiler.utility-BYoRbfIK.js → profiler.utility-CSg5WNN8.js} +1 -1
  204. package/dist/assets/{project-authoring-session-DkekCxNv.js → project-authoring-session-BbwFHEzZ.js} +2 -2
  205. package/dist/assets/{properties-bone-constraints.inspector-DXpiCtf9.js → properties-bone-constraints.inspector-ooGWoGiI.js} +1 -1
  206. package/dist/assets/{properties-bone.inspector-wIDsP4c5.js → properties-bone.inspector-C_UdJjDe.js} +1 -1
  207. package/dist/assets/{properties-collection.inspector-5SRPbqfM.js → properties-collection.inspector-Dm4MNZQK.js} +1 -1
  208. package/dist/assets/{properties-constraints.inspector-DIjKz692.js → properties-constraints.inspector-DlCHF3Nd.js} +1 -1
  209. package/dist/assets/{properties-data.inspector-DE6i8biZ.js → properties-data.inspector-DTfv2ILq.js} +1 -1
  210. package/dist/assets/{properties-material.inspector-Cu1UCPY4.js → properties-material.inspector-C_-GsOvF.js} +1 -1
  211. package/dist/assets/{properties-modifiers.inspector-DsQzA638.js → properties-modifiers.inspector-BELGiG49.js} +1 -1
  212. package/dist/assets/{properties-object.inspector-C57X0GJq.js → properties-object.inspector-COLlzAo4.js} +1 -1
  213. package/dist/assets/{properties-output.inspector-DzrcFuRM.js → properties-output.inspector-DLpqLRCp.js} +1 -1
  214. package/dist/assets/{properties-particles.inspector-DGqSnelN.js → properties-particles.inspector-C8ZhuG-X.js} +1 -1
  215. package/dist/assets/{properties-physics.inspector-DIjhtiLe.js → properties-physics.inspector-DQ3fUdPx.js} +1 -1
  216. package/dist/assets/{properties-render.inspector-CX0orwn9.js → properties-render.inspector-DlPuoXQ-.js} +1 -1
  217. package/dist/assets/{properties-scene.inspector-DaHNL_sq.js → properties-scene.inspector-itnV8qGu.js} +1 -1
  218. package/dist/assets/{properties-texture.inspector-B5hmxPRy.js → properties-texture.inspector-BZbBAQ_O.js} +1 -1
  219. package/dist/assets/{properties-view-layer.inspector-C7hdJgei.js → properties-view-layer.inspector-CNOevOy3.js} +1 -1
  220. package/dist/assets/{properties-world.inspector-EWTC6jNw.js → properties-world.inspector-C7u-dAkO.js} +1 -1
  221. package/dist/assets/{r3f-design-session-CXlGV9hp.js → r3f-design-session-DbXiRez3.js} +2 -2
  222. package/dist/assets/{r3f-physics-binding-DZSIB0d_.js → r3f-physics-binding-B8Je7bNy.js} +1 -1
  223. package/dist/assets/{r3f-source-authoring-adapter-GR97EmII.js → r3f-source-authoring-adapter-CarxaAwC.js} +1 -1
  224. package/dist/assets/{react-canvas-navigation-L_mOnybL.js → react-canvas-navigation-BTVCmK_d.js} +1 -1
  225. package/dist/assets/{react-inspector.service-B4P3UnSY.js → react-inspector.service-BV9ZVls7.js} +1 -1
  226. package/dist/assets/{react-story-board-CT1_3sk_.js → react-story-board-CETbMKNG.js} +1 -1
  227. package/dist/assets/{react-three-rapier.esm-DyMNYoA_.js → react-three-rapier.esm-BQ3IBcaP.js} +1 -1
  228. package/dist/assets/{react-world-authoring-adapter-OR1SW2jI.js → react-world-authoring-adapter-DsywMgco.js} +1 -1
  229. package/dist/assets/{realm-services-u0mnjXU9.js → realm-services-DoN23Ol2.js} +1 -1
  230. package/dist/assets/{reflection-probe-capture.inspector-CTNlSaGW.js → reflection-probe-capture.inspector-D0grUDdX.js} +1 -1
  231. package/dist/assets/{registry-wqakYaDW.js → registry-CZxNkOhN.js} +1 -1
  232. package/dist/assets/{relative-import-specifier-DXWVQf0o.js → relative-import-specifier-DMppRnNH.js} +1 -1
  233. package/dist/assets/{render-env-CN09NtDf.js → render-env-BAO3Rc6G.js} +1 -1
  234. package/dist/assets/{render-features-HCEupUJ6.js → render-features-CBm-s0QE.js} +1 -1
  235. package/dist/assets/{render-settings-Clt6d05o.js → render-settings-DCZaLK-j.js} +1 -1
  236. package/dist/assets/{resolve-three-CLzKVMx2.js → resolve-three-Bwj7rkZB.js} +3 -3
  237. package/dist/assets/{root-seam-contract-D2uQHWF9.js → root-seam-contract-DMUsCBFW.js} +1 -1
  238. package/dist/assets/{run-selection-AyelFc9T.js → run-selection-DRkjJF-w.js} +1 -1
  239. package/dist/assets/{scene-capture-WbPcLfJl.js → scene-capture-DVXdql_1.js} +1 -1
  240. package/dist/assets/{scene-document.service-4U6rDhCp.js → scene-document.service-CxGQ1BN-.js} +2 -2
  241. package/dist/assets/{scene-framing-DzSL2Cld.js → scene-framing-DUd4lKtW.js} +1 -1
  242. package/dist/assets/{seeded-random-tpdJjdqy.js → seeded-random-DzZFJTfh.js} +1 -1
  243. package/dist/assets/{setup-renderer-B5vZmCyu.js → setup-renderer-DF2zFw-E.js} +1 -1
  244. package/dist/assets/{source-object3d-authoring-adapter-BQnQ3Qzg.js → source-object3d-authoring-adapter-RimvAMDG.js} +1 -1
  245. package/dist/assets/{source-persistence-backend-uyd6NiWD.js → source-persistence-backend-BRcy23H9.js} +1 -1
  246. package/dist/assets/{stage-keyboard-B2yrk2zu.js → stage-keyboard-JRZ1CNbL.js} +1 -1
  247. package/dist/assets/{stage-overlay-set-Cqtz3s06.js → stage-overlay-set-DHN11xPU.js} +1 -1
  248. package/dist/assets/{stage-presence-markers-BgLs0Aj5.js → stage-presence-markers-AQuGIbnu.js} +1 -1
  249. package/dist/assets/stage-transform-tools-B8u8n8gJ.js +1 -0
  250. package/dist/assets/{standard-viewport-dressing-uhv_3JvQ.js → standard-viewport-dressing-NHKaiGVg.js} +3 -3
  251. package/dist/assets/{state-watch.action-BJ08HgcO.js → state-watch.action-B_conRk5.js} +1 -1
  252. package/dist/assets/{state-watch.menu-rAULwijr.js → state-watch.menu-B6GNrnYH.js} +1 -1
  253. package/dist/assets/{state-watch.utility-eEbQcj8t.js → state-watch.utility-CxuUOPhl.js} +1 -1
  254. package/dist/assets/story-capture-DYXQlnlZ.js +1 -0
  255. package/dist/assets/{story-documents-Cm4jCkW5.js → story-documents-D_Tg0idt.js} +2 -2
  256. package/dist/assets/{story-documents.service-Cgtg6rXn.js → story-documents.service-DQh0SkkQ.js} +1 -1
  257. package/dist/assets/{story-documents.service-BDvQCslK.js → story-documents.service-ES8nxeNu.js} +1 -1
  258. package/dist/assets/story-media-presence-D4w-waFJ.js +1 -0
  259. package/dist/assets/{story-pixi-preview-D62Q_vIW.js → story-pixi-preview-B6GFGUQG.js} +1 -1
  260. package/dist/assets/{story-presentation-CofUdEU7.js → story-presentation-6qhUDkv4.js} +1 -1
  261. package/dist/assets/{story-three-preview-B9O1wapP.js → story-three-preview-BgLSJIlN.js} +2 -2
  262. package/dist/assets/{studio-environment-BIhqrtFc.js → studio-environment-BGU84AOG.js} +1 -1
  263. package/dist/assets/{surface-state-DrM3wsrr.js → surface-state-BtNEZzCd.js} +1 -1
  264. package/dist/assets/{syntactic-prop-specs-BGz0N7Dg.js → syntactic-prop-specs-B309atpv.js} +1 -1
  265. package/dist/assets/{team-playtest.service-CiE8UJAe.js → team-playtest.service-B8leDEE-.js} +1 -1
  266. package/dist/assets/{three-BQfhEwUz.js → three-BRZq2Px5.js} +1 -1
  267. package/dist/assets/{three-authoring-adapter-COBwREQO.js → three-authoring-adapter-DkfGlaNQ.js} +1 -1
  268. package/dist/assets/three-authoring.service-sOchR4o8.js +2 -0
  269. package/dist/assets/{three-ingest-runtime-BnRF_nJN.js → three-ingest-runtime-D9JoNRjk.js} +1 -1
  270. package/dist/assets/three-integration-D3zBmOoj.js +2 -0
  271. package/dist/assets/three-integration.service-CE8aNHob.js +1 -0
  272. package/dist/assets/{three-projection-core-PQm-CO61.js → three-projection-core-Dt5ARGlM.js} +1 -1
  273. package/dist/assets/{three-state-C7khRIQE.js → three-state-3qPk0Sq8.js} +1 -1
  274. package/dist/assets/{three-story-capture.service-B0oiGIfp.js → three-story-capture.service-B3U2L4qG.js} +2 -2
  275. package/dist/assets/three-story-model-C96x-E0V.js +1 -0
  276. package/dist/assets/{three-viewport-presentation-B_tBudM-.js → three-viewport-presentation-DGctcUkE.js} +1 -1
  277. package/dist/assets/{transform-mode-request-DWM6BdRA.js → transform-mode-request-C0cdwtJf.js} +1 -1
  278. package/dist/assets/{transport-strip-vgXGDgkI.js → transport-strip-8OsPiJIm.js} +1 -1
  279. package/dist/assets/transport.header-D1Otpit3.js +1 -0
  280. package/dist/assets/{tuples-BnYrlQqS.js → tuples-CaBWqclR.js} +1 -1
  281. package/dist/assets/ui-board-document-BMTAhmJP.js +2 -0
  282. package/dist/assets/{user-data-CifDDvSr.js → user-data-4Ls0MsfF.js} +1 -1
  283. package/dist/assets/{utility-view-state-BPl8Asup.js → utility-view-state-gIzv2Oo_.js} +1 -1
  284. package/dist/assets/{viewport-door-BCXEYmon.js → viewport-door-C4Fu0zS3.js} +1 -1
  285. package/dist/assets/{viewport-root-presentation-DJLpUuf0.js → viewport-root-presentation-DMMIH4rt.js} +1 -1
  286. package/dist/assets/{viewport-surface-status-jwLhIK_M.js → viewport-surface-status-CdI6sQko.js} +1 -1
  287. package/dist/assets/{webworkerAll-P6jePa6X.js → webworkerAll-BINEvomm.js} +1 -1
  288. package/dist/assets/worker-Cu9kIzIf.js +2 -0
  289. package/dist/assets/{workspace-arrangement-B_OcbQbj.js → workspace-arrangement-w-T2xUGF.js} +1 -1
  290. package/dist/assets/{world-documents-Bx3j867R.js → world-documents-feEUCgVE.js} +1 -1
  291. package/dist/assets/{world-root-stage-binding-LEhjWDkn.js → world-root-stage-binding-BDb6wt_C.js} +1 -1
  292. package/dist/assets/{xstate-animation-binding-Dionc_fC.js → xstate-animation-binding-Bhz1Uhhw.js} +1 -1
  293. package/dist/assets/{xstate-animation-meta-XEmD_qc_.js → xstate-animation-meta-CvDlYgrt.js} +1 -1
  294. package/dist-node/cli.js +21 -18
  295. package/package.json +16 -16
  296. package/template/src/lib/reflections/ReflectionProbe.tsx +34 -5
  297. package/template/src/lib/reflections/index.ts +1 -0
  298. package/template/src/lib/reflections/probe-controller.ts +44 -3
  299. package/template/src/lib/reflections/reflection-probe-registry.ts +32 -7
  300. package/template/src/lib/reflections/volume-reflection-material.ts +638 -160
  301. package/dist/assets/EntityModelDocument-CplmAib0.js +0 -1
  302. package/dist/assets/InspectorObjectPreview-Bjc1Tn-I.js +0 -1
  303. package/dist/assets/ModelAssetDocument-G6ajiV51.js +0 -1
  304. package/dist/assets/Object3DDocumentViewport-BhH8afDi.js +0 -2
  305. package/dist/assets/StageHost-Bor1eHEO.js +0 -2
  306. package/dist/assets/autoplay.service-DaonKf7O.js +0 -1
  307. package/dist/assets/blender-emscripten-engine-DQljvfR7.js +0 -2
  308. package/dist/assets/blender-runtime.document-DnSl0twI.js +0 -12
  309. package/dist/assets/blender-wali-engine-CO-jG_ik.js +0 -2
  310. package/dist/assets/bridge.command-D6qTcgje.js +0 -3
  311. package/dist/assets/collaboration-presence-DcPhahtF.js +0 -1
  312. package/dist/assets/component-board.service-Cd1c9oSN.js +0 -2
  313. package/dist/assets/component-verbs.service-DsxhVcvk.js +0 -1
  314. package/dist/assets/editor-api-WeHVNlEo.js +0 -1
  315. package/dist/assets/fork-menu-Bthg9viY.js +0 -1
  316. package/dist/assets/gameplay-replay-WyopKGyB.js +0 -1
  317. package/dist/assets/ibl-override-material-CMo_a49U.js +0 -6
  318. package/dist/assets/index-yXSK_qPW.js +0 -1
  319. package/dist/assets/instances.command-COw2QpbN.js +0 -1
  320. package/dist/assets/layered-pick-BUr1U8lU.js +0 -1
  321. package/dist/assets/material-B6cH1Oqw.js +0 -1
  322. package/dist/assets/network-observer.service-GFzXuBMb.js +0 -1
  323. package/dist/assets/stage-transform-tools-BHcz53td.js +0 -1
  324. package/dist/assets/story-capture-B8wfSf5s.js +0 -1
  325. package/dist/assets/story-media-presence-SGlp_afL.js +0 -1
  326. package/dist/assets/three-authoring.service-C0azvoq8.js +0 -2
  327. package/dist/assets/three-integration-DeWYFf1x.js +0 -2
  328. package/dist/assets/three-integration.service-CoWCBTmg.js +0 -1
  329. package/dist/assets/three-story-model-D7g2pqfJ.js +0 -1
  330. package/dist/assets/transport.header-CfVHXjrT.js +0 -1
  331. package/dist/assets/ui-board-document-B_-K9luq.js +0 -2
  332. package/dist/assets/worker-CJIsrsP6.js +0 -2
@@ -1 +1 @@
1
- import{collectMachineAnimationMeta as V,clipNamesOf as L,isBlendTreeAnimationMeta as S,asBlendTreeDef as z}from"./xstate-animation-meta-XEmD_qc_.js";import{cW as J,p as Z,c as _,cQ as ee,l as te,dk as ne,cf as ie,cd as oe}from"./three.core-3arARmh6.js";import"./index-V4J7xfRg.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";class M extends Error{constructor(i,c){super(i),this.stateId=c,this.name="AnimationBindingError"}}function ae(n){const i=n.logic;if(i?.root)return i;const c=n.getSnapshot();if(c?.machine?.root)return c.machine;throw new M("[bindXStateAnimation] the actor exposes no state machine — only a state-machine actor carries the `meta.animation` this binder reads")}const W=n=>n.layer??"base",B=n=>n.weight??1,I=n=>n.blendMode??"override";function T(n){try{return ne.parseTrackName(n.name).nodeName??""}catch{const i=n.name.indexOf(".");return i<0?n.name:n.name.slice(0,i)}}function C(n,i,c){const o=new Set,l=[];for(const f of i){let u=!1;n.traverse(m=>{m.name===f&&(u=!0,m.traverse(d=>{d.name&&o.add(d.name)}))}),c.has(f)&&(u=!0,o.add(f)),u||l.push(f)}return{names:o,missing:l}}function se(n,i,c,o){const l=new Set(n.tracks.map(T)),f=i.include?C(c,i.include,l):void 0,u=i.exclude?C(c,i.exclude,l):void 0,m=[...f?.missing??[],...u?.missing??[]];if(m.length)throw new M(`[bindXStateAnimation] state "${o}" boneMask names unknown bones/objects: ${m.join(", ")}`,o);const d=n.tracks.filter(p=>{const w=T(p);return(!f||f.names.has(w))&&!u?.names.has(w)});if(d.length===0)throw new M(`[bindXStateAnimation] state "${o}" boneMask removes every track from clip "${n.name}"`,o);return new te(n.name,n.duration,d.map(p=>p.clone()))}function re(n){return n.reduce((i,c)=>c.weight>i.weight?c:i,n[0])}function Se(n,i,c,o={}){const l=i.getRoot(),f=o.root??(l instanceof J?l:void 0);if(!f)throw new M("[bindXStateAnimation] a THREE.Object3D `root` option is required when the mixer uses AnimationObjectGroup");const u=ae(n).root,m=V(u),d=new Map(m.map(t=>[t.stateId,t.meta]));for(const t of m)for(const e of L(t.meta))if(!c.has(e))throw new M(`[bindXStateAnimation] state "${t.stateId}" references clip "${e}", which is not present in the supplied clips map. Known clips: ${[...c.keys()].join(", ")||"(none)"}`,t.stateId);const p=new Map;function w(t,e,s){return W(e)!=="base"||!!e.boneMask||I(e)==="additive"?`${t}\0${s}`:s}for(const{stateId:t,meta:e}of m)for(const s of L(e)){const a=w(t,e,s);if(p.has(a))continue;const r=c.get(s);let h=e.boneMask?se(r,e.boneMask,f,t):r;(h!==r||a!==s)&&(h===r&&(h=r.clone()),h.name=`${r.name}@${W(e)}:${t}`),I(e)==="additive"?(Z.makeClipAdditive(h),h.blendMode=_):h.blendMode=ee,p.set(a,h)}const g=new Map;function K(t,e,s,a){let r=g.get(t);if(!r){const h=p.get(t);if(!h)throw new M(`[bindXStateAnimation] prepared clip "${t}" not found`);const v=i.clipAction(h);v.setEffectiveWeight(0),v.play(),r={action:v,clip:h},g.set(t,r)}return r.action.setLoop(e?ie:oe,1/0),r.action.clampWhenFinished=!e,r.action.timeScale=s,r.action.weight=a,r.action}function N(t){const e=o.selectParameters?o.selectParameters(t):t;return new Map(Object.entries(e??{}))}function D(t,e,s){return(S(e)?ce(z(e.blendTree),N(s)):[{clip:e.clip,weight:1}]).map(({clip:r,weight:h})=>({clip:r,weight:h,actionKey:w(t,e,r)}))}const y=new Map;let O=!1;function R(t,e,s){for(const a of t){if(a.actionKey===e)continue;const r=g.get(a.actionKey)?.action;r&&(s>0?r.fadeOut(s):r.setEffectiveWeight(0))}}function k(t,e){if(!S(t.meta))return;t.natural=D(t.stateId,t.meta,e);const s=B(t.meta);for(const a of t.natural)g.get(a.actionKey)?.action.setEffectiveWeight(a.weight*s)}function P(t,e,s){const a=W(e),r=y.get(a)??null,h=D(t,e,s),v=re(h),H=S(e)?!0:e.loop,Q=S(e)?1:e.speed,x=B(e);for(const b of h)K(b.actionKey,H,Q,x);const $=g.get(v.actionKey).action;$.reset().setEffectiveWeight(x);for(const b of h)b.actionKey!==v.actionKey&&g.get(b.actionKey).action.reset().setEffectiveWeight(0);const A=e.crossfade?.duration??0,U=e.crossfade?.warp??!1;if(!r)A>0&&$.fadeIn(A);else{R(r.natural,r.dominantActionKey,A);const b=g.get(r.dominantActionKey)?.action;b&&A>0?b.crossFadeTo($,A,U):(b?.setEffectiveWeight(0),$.setEffectiveWeight(x))}const j={layer:a,stateId:t,meta:e,natural:h,dominantActionKey:v.actionKey,crossfadeRemaining:A};y.set(a,j),S(e)&&A<=0&&k(j,s)}function q(t){return Object.keys(t.getMeta()).filter(e=>d.has(e))}function X(t){const e=new Map;for(const s of q(t)){const a=d.get(s),r=W(a),h=e.get(r);if(h)throw new M(`[bindXStateAnimation] animated states "${h}" and "${s}" are both active on layer "${r}". Give parallel regions distinct meta.animation.layer names.`,s);e.set(r,s)}for(const[s,a]of y)e.has(s)||(R(a.natural,void 0,0),y.delete(s));for(const[s,a]of e)y.get(s)?.stateId!==a&&P(a,d.get(a),t.context)}const F=n.getSnapshot();X(F);const G=n.subscribe(t=>{O||X(t)});function E(t){if(O)return;const e=t,s=n.getSnapshot().context;for(const a of y.values())a.crossfadeRemaining>0?(a.crossfadeRemaining=Math.max(0,a.crossfadeRemaining-e),a.crossfadeRemaining<=0&&k(a,s)):k(a,s);i.update(e)}const Y={tick:E,actor:n,getParameters:()=>N(n.getSnapshot().context),getActiveLayers:()=>[...y.values()].map(t=>({layer:t.layer,stateId:t.stateId,clips:t.natural.map(e=>e.clip),clipWeights:t.natural.map(e=>({clip:e.clip,weight:g.get(e.actionKey)?.action.getEffectiveWeight()??0})),weight:B(t.meta),blendMode:I(t.meta),...t.meta.boneMask?{boneMask:t.meta.boneMask}:{}})),dispose(){if(!O){O=!0,o.systems?.remove("animation",E),G.unsubscribe();for(const{action:t,clip:e}of g.values())t.stop(),i.uncacheAction(e,t.getRoot());g.clear(),y.clear()}}};return o.systems?.add("animation",E),Y}function ce(n,i){switch(n.type){case"1D":return le(n,i);case"2D":return fe(n,i);case"direct":return de(n);default:return n.children.map(c=>({clip:c.clip,weight:1/n.children.length}))}}function le(n,i){const c=Number(i.get(n.parameter)??0),o=[...n.children].sort((f,u)=>f.threshold-u.threshold),l=o.map(f=>({clip:f.clip,weight:0}));if(o.length===0)return l;if(o.length===1||c<=o[0].threshold)return l[0].weight=1,l;if(c>=o[o.length-1].threshold)return l[l.length-1].weight=1,l;for(let f=0;f<o.length-1;f++){const u=o[f],m=o[f+1];if(c>=u.threshold&&c<=m.threshold){const d=m.threshold-u.threshold,p=d>0?(c-u.threshold)/d:0;return l[f].weight=1-p,l[f+1].weight=p,l}}return l}function fe(n,i){const c=Number(i.get(n.parameter)??0),o=Number(i.get(n.parameterY??"")??0),l=n.children,f=l.map(d=>({clip:d.clip,weight:0}));let u=0;const m=[];for(const d of l){const p=c-d.threshold,w=o-(d.thresholdY??0),g=Math.sqrt(p*p+w*w),K=g<.001?1e3:1/g;m.push(K),u+=K}if(u>0)for(let d=0;d<f.length;d++)f[d].weight=m[d]/u;return f}function de(n){const i=n.children.map(o=>({clip:o.clip,weight:o.weight??0})),c=i.reduce((o,l)=>o+l.weight,0);if(c>0)for(const o of i)o.weight/=c;return i}export{M as AnimationBindingError,Se as bindXStateAnimation,ce as evaluateBlendTree,ae as machineOfXStateActor};
1
+ import{collectMachineAnimationMeta as V,clipNamesOf as L,isBlendTreeAnimationMeta as S,asBlendTreeDef as z}from"./xstate-animation-meta-CvDlYgrt.js";import{cW as J,p as Z,c as _,cQ as ee,l as te,dk as ne,cf as ie,cd as oe}from"./three.core-3arARmh6.js";import"./index-C5tasxXb.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";class M extends Error{constructor(i,c){super(i),this.stateId=c,this.name="AnimationBindingError"}}function ae(n){const i=n.logic;if(i?.root)return i;const c=n.getSnapshot();if(c?.machine?.root)return c.machine;throw new M("[bindXStateAnimation] the actor exposes no state machine — only a state-machine actor carries the `meta.animation` this binder reads")}const W=n=>n.layer??"base",B=n=>n.weight??1,I=n=>n.blendMode??"override";function T(n){try{return ne.parseTrackName(n.name).nodeName??""}catch{const i=n.name.indexOf(".");return i<0?n.name:n.name.slice(0,i)}}function C(n,i,c){const o=new Set,l=[];for(const f of i){let u=!1;n.traverse(m=>{m.name===f&&(u=!0,m.traverse(d=>{d.name&&o.add(d.name)}))}),c.has(f)&&(u=!0,o.add(f)),u||l.push(f)}return{names:o,missing:l}}function se(n,i,c,o){const l=new Set(n.tracks.map(T)),f=i.include?C(c,i.include,l):void 0,u=i.exclude?C(c,i.exclude,l):void 0,m=[...f?.missing??[],...u?.missing??[]];if(m.length)throw new M(`[bindXStateAnimation] state "${o}" boneMask names unknown bones/objects: ${m.join(", ")}`,o);const d=n.tracks.filter(p=>{const w=T(p);return(!f||f.names.has(w))&&!u?.names.has(w)});if(d.length===0)throw new M(`[bindXStateAnimation] state "${o}" boneMask removes every track from clip "${n.name}"`,o);return new te(n.name,n.duration,d.map(p=>p.clone()))}function re(n){return n.reduce((i,c)=>c.weight>i.weight?c:i,n[0])}function Se(n,i,c,o={}){const l=i.getRoot(),f=o.root??(l instanceof J?l:void 0);if(!f)throw new M("[bindXStateAnimation] a THREE.Object3D `root` option is required when the mixer uses AnimationObjectGroup");const u=ae(n).root,m=V(u),d=new Map(m.map(t=>[t.stateId,t.meta]));for(const t of m)for(const e of L(t.meta))if(!c.has(e))throw new M(`[bindXStateAnimation] state "${t.stateId}" references clip "${e}", which is not present in the supplied clips map. Known clips: ${[...c.keys()].join(", ")||"(none)"}`,t.stateId);const p=new Map;function w(t,e,s){return W(e)!=="base"||!!e.boneMask||I(e)==="additive"?`${t}\0${s}`:s}for(const{stateId:t,meta:e}of m)for(const s of L(e)){const a=w(t,e,s);if(p.has(a))continue;const r=c.get(s);let h=e.boneMask?se(r,e.boneMask,f,t):r;(h!==r||a!==s)&&(h===r&&(h=r.clone()),h.name=`${r.name}@${W(e)}:${t}`),I(e)==="additive"?(Z.makeClipAdditive(h),h.blendMode=_):h.blendMode=ee,p.set(a,h)}const g=new Map;function K(t,e,s,a){let r=g.get(t);if(!r){const h=p.get(t);if(!h)throw new M(`[bindXStateAnimation] prepared clip "${t}" not found`);const v=i.clipAction(h);v.setEffectiveWeight(0),v.play(),r={action:v,clip:h},g.set(t,r)}return r.action.setLoop(e?ie:oe,1/0),r.action.clampWhenFinished=!e,r.action.timeScale=s,r.action.weight=a,r.action}function N(t){const e=o.selectParameters?o.selectParameters(t):t;return new Map(Object.entries(e??{}))}function D(t,e,s){return(S(e)?ce(z(e.blendTree),N(s)):[{clip:e.clip,weight:1}]).map(({clip:r,weight:h})=>({clip:r,weight:h,actionKey:w(t,e,r)}))}const y=new Map;let O=!1;function R(t,e,s){for(const a of t){if(a.actionKey===e)continue;const r=g.get(a.actionKey)?.action;r&&(s>0?r.fadeOut(s):r.setEffectiveWeight(0))}}function k(t,e){if(!S(t.meta))return;t.natural=D(t.stateId,t.meta,e);const s=B(t.meta);for(const a of t.natural)g.get(a.actionKey)?.action.setEffectiveWeight(a.weight*s)}function P(t,e,s){const a=W(e),r=y.get(a)??null,h=D(t,e,s),v=re(h),H=S(e)?!0:e.loop,Q=S(e)?1:e.speed,x=B(e);for(const b of h)K(b.actionKey,H,Q,x);const $=g.get(v.actionKey).action;$.reset().setEffectiveWeight(x);for(const b of h)b.actionKey!==v.actionKey&&g.get(b.actionKey).action.reset().setEffectiveWeight(0);const A=e.crossfade?.duration??0,U=e.crossfade?.warp??!1;if(!r)A>0&&$.fadeIn(A);else{R(r.natural,r.dominantActionKey,A);const b=g.get(r.dominantActionKey)?.action;b&&A>0?b.crossFadeTo($,A,U):(b?.setEffectiveWeight(0),$.setEffectiveWeight(x))}const j={layer:a,stateId:t,meta:e,natural:h,dominantActionKey:v.actionKey,crossfadeRemaining:A};y.set(a,j),S(e)&&A<=0&&k(j,s)}function q(t){return Object.keys(t.getMeta()).filter(e=>d.has(e))}function X(t){const e=new Map;for(const s of q(t)){const a=d.get(s),r=W(a),h=e.get(r);if(h)throw new M(`[bindXStateAnimation] animated states "${h}" and "${s}" are both active on layer "${r}". Give parallel regions distinct meta.animation.layer names.`,s);e.set(r,s)}for(const[s,a]of y)e.has(s)||(R(a.natural,void 0,0),y.delete(s));for(const[s,a]of e)y.get(s)?.stateId!==a&&P(a,d.get(a),t.context)}const F=n.getSnapshot();X(F);const G=n.subscribe(t=>{O||X(t)});function E(t){if(O)return;const e=t,s=n.getSnapshot().context;for(const a of y.values())a.crossfadeRemaining>0?(a.crossfadeRemaining=Math.max(0,a.crossfadeRemaining-e),a.crossfadeRemaining<=0&&k(a,s)):k(a,s);i.update(e)}const Y={tick:E,actor:n,getParameters:()=>N(n.getSnapshot().context),getActiveLayers:()=>[...y.values()].map(t=>({layer:t.layer,stateId:t.stateId,clips:t.natural.map(e=>e.clip),clipWeights:t.natural.map(e=>({clip:e.clip,weight:g.get(e.actionKey)?.action.getEffectiveWeight()??0})),weight:B(t.meta),blendMode:I(t.meta),...t.meta.boneMask?{boneMask:t.meta.boneMask}:{}})),dispose(){if(!O){O=!0,o.systems?.remove("animation",E),G.unsubscribe();for(const{action:t,clip:e}of g.values())t.stop(),i.uncacheAction(e,t.getRoot());g.clear(),y.clear()}}};return o.systems?.add("animation",E),Y}function ce(n,i){switch(n.type){case"1D":return le(n,i);case"2D":return fe(n,i);case"direct":return de(n);default:return n.children.map(c=>({clip:c.clip,weight:1/n.children.length}))}}function le(n,i){const c=Number(i.get(n.parameter)??0),o=[...n.children].sort((f,u)=>f.threshold-u.threshold),l=o.map(f=>({clip:f.clip,weight:0}));if(o.length===0)return l;if(o.length===1||c<=o[0].threshold)return l[0].weight=1,l;if(c>=o[o.length-1].threshold)return l[l.length-1].weight=1,l;for(let f=0;f<o.length-1;f++){const u=o[f],m=o[f+1];if(c>=u.threshold&&c<=m.threshold){const d=m.threshold-u.threshold,p=d>0?(c-u.threshold)/d:0;return l[f].weight=1-p,l[f+1].weight=p,l}}return l}function fe(n,i){const c=Number(i.get(n.parameter)??0),o=Number(i.get(n.parameterY??"")??0),l=n.children,f=l.map(d=>({clip:d.clip,weight:0}));let u=0;const m=[];for(const d of l){const p=c-d.threshold,w=o-(d.thresholdY??0),g=Math.sqrt(p*p+w*w),K=g<.001?1e3:1/g;m.push(K),u+=K}if(u>0)for(let d=0;d<f.length;d++)f[d].weight=m[d]/u;return f}function de(n){const i=n.children.map(o=>({clip:o.clip,weight:o.weight??0})),c=i.reduce((o,l)=>o+l.weight,0);if(c>0)for(const o of i)o.weight/=c;return i}export{M as AnimationBindingError,Se as bindXStateAnimation,ce as evaluateBlendTree,ae as machineOfXStateActor};
@@ -1 +1 @@
1
- import{dY as b,dZ as u,t as o,u as c,v as n,w as l,c5 as r,c4 as m,c3 as f}from"./index-V4J7xfRg.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const d=o({clip:n().min(1).describe("Animation clip name this child plays"),threshold:r().describe("1D/2D blend position on the primary parameter axis"),thresholdY:r().optional().describe("2D blend position on the secondary parameter axis (2D blend trees only)"),weight:r().min(0).optional().describe('Explicit weight for "direct" blend trees (ignored by 1D/2D)')}).strict(),y=o({type:l("1D").describe("Interpolates linearly between sorted children by threshold"),parameter:n().min(1).describe("Context/selector value driving the blend"),children:c(d).min(2,"1D blend tree needs at least 2 children to interpolate between")}).strict(),v=o({type:l("2D").describe("Inverse-distance-weights children by (parameter, parameterY) position"),parameter:n().min(1).describe("Primary axis context/selector value"),parameterY:n().min(1).describe("Secondary axis context/selector value"),children:c(d.extend({thresholdY:r()})).min(1,"2D blend tree needs at least 1 child")}).strict(),g=o({type:l("direct").describe("Each child has an explicit weight, normalized to sum to 1"),parameter:n().default(""),children:c(d.extend({weight:r().min(0)})).min(1,"direct blend tree needs at least 1 child")}).strict(),A=b("type",[y,v,g]);function P(e){return e}const p=o({duration:r().min(0).default(0).describe("Seconds to blend from the previously active clip into this state on entry, applied via native `AnimationAction.crossFadeTo`/`fadeIn` (E2). 0 = instant activation, no fade."),warp:m().default(!1).describe("Passed through to AnimationAction.crossFadeTo's `warp` param — linearly warps timeScale across the two clips during the blend so differing clip lengths line up. Default false.")}).strict().describe("Blend-in/out/crossfade timing for entering this state"),x=o({include:c(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are retained"),exclude:c(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are removed")}).strict().refine(e=>!!(e.include?.length||e.exclude?.length),{message:"boneMask needs at least one include or exclude bone name"}).describe("Filters animation tracks by named Object3D/Bone subtrees"),h={layer:n().min(1).optional().describe("Composition layer name; omitted means the single base layer"),weight:r().min(0).max(1).optional().describe("Layer weight multiplier from 0 to 1; defaults to 1"),blendMode:f(["override","additive"]).optional().describe("Native Three normal/override or additive action blending; defaults to override"),boneMask:x.optional().describe("Optional include/exclude filter applied to every clip track in this state")},w=o({clip:n().min(1).describe("Single clip to play while this XState state is active"),loop:m().default(!0).describe("Loop the clip (THREE.LoopRepeat) vs play once (THREE.LoopOnce, clamped on last frame)"),speed:r().positive().default(1).describe("Playback speed multiplier (AnimationAction.timeScale)"),crossfade:p.optional(),...h}).strict(),S=o({blendTree:A.describe("Multiple clips blended by a live context/selector-driven parameter"),crossfade:p.optional(),...h}).strict(),D=u([w,S]);function M(e){return"clip"in e}function $(e){return"blendTree"in e}class T extends Error{constructor(a,i,t){super(a),this.stateId=i,this.issues=t,this.name="AnimationMetaValidationError"}}function B(e,a){const i=D.safeParse(a);if(!i.success){const t=i.error.issues.map(s=>`${s.path.length?s.path.join("."):"(root)"}: ${s.message}`).join("; ");throw new T(`[xstate-animation] invalid meta.animation for state "${e}": ${t}`,e,i.error.issues)}return i.data}function R(e){const a=[],i=t=>{t.meta&&"animation"in t.meta&&t.meta.animation!==void 0&&a.push({stateId:t.id,meta:B(t.id,t.meta.animation)});for(const s of Object.values(t.states??{}))i(s)};return i(e),a}function H(e){return M(e)?[e.clip]:e.blendTree.children.map(a=>a.clip)}export{A as AnimationBlendTreeSchema,T as AnimationMetaValidationError,D as StateAnimationMetaSchema,P as asBlendTreeDef,H as clipNamesOf,R as collectMachineAnimationMeta,$ as isBlendTreeAnimationMeta,M as isClipAnimationMeta,B as parseStateAnimationMeta};
1
+ import{dZ as b,d_ as u,u as o,v as c,w as n,x as l,c6 as r,c5 as m,c4 as f}from"./index-C5tasxXb.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const d=o({clip:n().min(1).describe("Animation clip name this child plays"),threshold:r().describe("1D/2D blend position on the primary parameter axis"),thresholdY:r().optional().describe("2D blend position on the secondary parameter axis (2D blend trees only)"),weight:r().min(0).optional().describe('Explicit weight for "direct" blend trees (ignored by 1D/2D)')}).strict(),y=o({type:l("1D").describe("Interpolates linearly between sorted children by threshold"),parameter:n().min(1).describe("Context/selector value driving the blend"),children:c(d).min(2,"1D blend tree needs at least 2 children to interpolate between")}).strict(),v=o({type:l("2D").describe("Inverse-distance-weights children by (parameter, parameterY) position"),parameter:n().min(1).describe("Primary axis context/selector value"),parameterY:n().min(1).describe("Secondary axis context/selector value"),children:c(d.extend({thresholdY:r()})).min(1,"2D blend tree needs at least 1 child")}).strict(),g=o({type:l("direct").describe("Each child has an explicit weight, normalized to sum to 1"),parameter:n().default(""),children:c(d.extend({weight:r().min(0)})).min(1,"direct blend tree needs at least 1 child")}).strict(),A=b("type",[y,v,g]);function Y(e){return e}const p=o({duration:r().min(0).default(0).describe("Seconds to blend from the previously active clip into this state on entry, applied via native `AnimationAction.crossFadeTo`/`fadeIn` (E2). 0 = instant activation, no fade."),warp:m().default(!1).describe("Passed through to AnimationAction.crossFadeTo's `warp` param — linearly warps timeScale across the two clips during the blend so differing clip lengths line up. Default false.")}).strict().describe("Blend-in/out/crossfade timing for entering this state"),x=o({include:c(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are retained"),exclude:c(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are removed")}).strict().refine(e=>!!(e.include?.length||e.exclude?.length),{message:"boneMask needs at least one include or exclude bone name"}).describe("Filters animation tracks by named Object3D/Bone subtrees"),h={layer:n().min(1).optional().describe("Composition layer name; omitted means the single base layer"),weight:r().min(0).max(1).optional().describe("Layer weight multiplier from 0 to 1; defaults to 1"),blendMode:f(["override","additive"]).optional().describe("Native Three normal/override or additive action blending; defaults to override"),boneMask:x.optional().describe("Optional include/exclude filter applied to every clip track in this state")},w=o({clip:n().min(1).describe("Single clip to play while this XState state is active"),loop:m().default(!0).describe("Loop the clip (THREE.LoopRepeat) vs play once (THREE.LoopOnce, clamped on last frame)"),speed:r().positive().default(1).describe("Playback speed multiplier (AnimationAction.timeScale)"),crossfade:p.optional(),...h}).strict(),S=o({blendTree:A.describe("Multiple clips blended by a live context/selector-driven parameter"),crossfade:p.optional(),...h}).strict(),D=u([w,S]);function M(e){return"clip"in e}function $(e){return"blendTree"in e}class T extends Error{constructor(a,i,t){super(a),this.stateId=i,this.issues=t,this.name="AnimationMetaValidationError"}}function B(e,a){const i=D.safeParse(a);if(!i.success){const t=i.error.issues.map(s=>`${s.path.length?s.path.join("."):"(root)"}: ${s.message}`).join("; ");throw new T(`[xstate-animation] invalid meta.animation for state "${e}": ${t}`,e,i.error.issues)}return i.data}function R(e){const a=[],i=t=>{t.meta&&"animation"in t.meta&&t.meta.animation!==void 0&&a.push({stateId:t.id,meta:B(t.id,t.meta.animation)});for(const s of Object.values(t.states??{}))i(s)};return i(e),a}function H(e){return M(e)?[e.clip]:e.blendTree.children.map(a=>a.clip)}export{A as AnimationBlendTreeSchema,T as AnimationMetaValidationError,D as StateAnimationMetaSchema,Y as asBlendTreeDef,H as clipNamesOf,R as collectMachineAnimationMeta,$ as isBlendTreeAnimationMeta,M as isClipAnimationMeta,B as parseStateAnimationMeta};
package/dist-node/cli.js CHANGED
@@ -2027,8 +2027,11 @@ function projectRelative(project, absolute) {
2027
2027
  }
2028
2028
  async function serveBlenderMcp(project, ensureEditor, command) {
2029
2029
  const runtimeIdentity = `Blender ${BUNDLE_default.blender} (source ${BUNDLE_default.source}), compiled to WebAssembly and running headless in the editor tab; three.js takes its photographs. Factory bpy.context.scene.render.engine: '${BUNDLE_default.factoryEngine}'. Documents are .blend. save_as_mainfile records the actual saved path in bpy.data.filepath; open_mainfile reopens it.`;
2030
+ const photographs = `A photograph is shown to the person in the editor, never in another app: get_viewport_screenshot returns one, and an image file written inside the project opens as an editor document with \`npx ${command} eval 'editor.openAsset("<project-relative path>")'\`. Do not run the OS \`open\` on it.`;
2031
+ const instructions = `${runtimeIdentity}
2032
+ ${photographs}`;
2030
2033
  const tools = blender_mcp_tools_default.map(
2031
- (tool) => tool.name === "execute_blender_code" ? { ...tool, description: `${runtimeIdentity}
2034
+ (tool) => tool.name === "execute_blender_code" ? { ...tool, description: `${instructions}
2032
2035
  ${tool.description}` } : tool
2033
2036
  );
2034
2037
  const defaults = blender_mcp_defaults_default;
@@ -2041,7 +2044,7 @@ ${tool.description}` } : tool
2041
2044
  { name: "BlenderMCP", version: BLENDER_MCP_VERSION },
2042
2045
  {
2043
2046
  capabilities: { tools: {}, prompts: {} },
2044
- instructions: runtimeIdentity
2047
+ instructions
2045
2048
  }
2046
2049
  );
2047
2050
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
@@ -2310,7 +2313,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
2310
2313
  var package_default = {
2311
2314
  name: "@volter/game-editor",
2312
2315
  author: "Volter AI, Inc.",
2313
- version: "0.5.82",
2316
+ version: "0.5.83",
2314
2317
  publishConfig: {
2315
2318
  access: "public"
2316
2319
  },
@@ -2359,22 +2362,22 @@ var package_default = {
2359
2362
  }
2360
2363
  },
2361
2364
  dependencies: {
2362
- "@volter/editor-core": "0.5.82",
2363
- "@volter/editor-game": "0.5.82",
2364
- "@volter/editor-react": "0.5.82",
2365
- "@volter/editor-threejs": "0.5.82",
2366
- "@volter/editor-xstate": "0.5.82",
2367
- "@volter/editor-blender": "0.1.22",
2368
- "@volter/dawproject": "0.5.82",
2369
- "@volter/editor-dawproject": "0.5.82",
2370
- "@volter/blender-engine": "0.1.20",
2371
- "@volter/editor-project": "0.5.82",
2372
- "@volter/editor-sdk": "0.5.82",
2373
- "@volter/editor-live": "0.5.82",
2374
- "@volter/game-live": "0.5.82",
2365
+ "@volter/editor-core": "0.5.83",
2366
+ "@volter/editor-game": "0.5.83",
2367
+ "@volter/editor-react": "0.5.83",
2368
+ "@volter/editor-threejs": "0.5.83",
2369
+ "@volter/editor-xstate": "0.5.83",
2370
+ "@volter/editor-blender": "0.1.23",
2371
+ "@volter/dawproject": "0.5.83",
2372
+ "@volter/editor-dawproject": "0.5.83",
2373
+ "@volter/blender-engine": "0.1.21",
2374
+ "@volter/editor-project": "0.5.83",
2375
+ "@volter/editor-sdk": "0.5.83",
2376
+ "@volter/editor-live": "0.5.83",
2377
+ "@volter/game-live": "0.5.83",
2375
2378
  "@modelcontextprotocol/sdk": "1.30.0",
2376
- "@volter/game-runtime": "0.5.82",
2377
- "@volter/threejs-runtime": "0.5.82",
2379
+ "@volter/game-runtime": "0.5.83",
2380
+ "@volter/threejs-runtime": "0.5.83",
2378
2381
  undici: "7.29.1",
2379
2382
  typescript: "5.9.3",
2380
2383
  "@colyseus/schema": "^4.0.14",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@volter/game-editor",
3
3
  "author": "Volter AI, Inc.",
4
- "version": "0.5.82",
4
+ "version": "0.5.83",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -50,22 +50,22 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@volter/editor-core": "0.5.82",
54
- "@volter/editor-game": "0.5.82",
55
- "@volter/editor-react": "0.5.82",
56
- "@volter/editor-threejs": "0.5.82",
57
- "@volter/editor-xstate": "0.5.82",
58
- "@volter/editor-blender": "0.1.22",
59
- "@volter/dawproject": "0.5.82",
60
- "@volter/editor-dawproject": "0.5.82",
61
- "@volter/blender-engine": "0.1.20",
62
- "@volter/editor-project": "0.5.82",
63
- "@volter/editor-sdk": "0.5.82",
64
- "@volter/editor-live": "0.5.82",
65
- "@volter/game-live": "0.5.82",
53
+ "@volter/editor-core": "0.5.83",
54
+ "@volter/editor-game": "0.5.83",
55
+ "@volter/editor-react": "0.5.83",
56
+ "@volter/editor-threejs": "0.5.83",
57
+ "@volter/editor-xstate": "0.5.83",
58
+ "@volter/editor-blender": "0.1.23",
59
+ "@volter/dawproject": "0.5.83",
60
+ "@volter/editor-dawproject": "0.5.83",
61
+ "@volter/blender-engine": "0.1.21",
62
+ "@volter/editor-project": "0.5.83",
63
+ "@volter/editor-sdk": "0.5.83",
64
+ "@volter/editor-live": "0.5.83",
65
+ "@volter/game-live": "0.5.83",
66
66
  "@modelcontextprotocol/sdk": "1.30.0",
67
- "@volter/game-runtime": "0.5.82",
68
- "@volter/threejs-runtime": "0.5.82",
67
+ "@volter/game-runtime": "0.5.83",
68
+ "@volter/threejs-runtime": "0.5.83",
69
69
  "undici": "7.29.1",
70
70
  "typescript": "5.9.3",
71
71
  "@colyseus/schema": "^4.0.14",
@@ -1,8 +1,7 @@
1
1
  import { type ThreeElements, useFrame, useThree } from '@react-three/fiber';
2
- import type { ReflectionProbeConfig } from '@volter/threejs-runtime/adapter/reflection-probe';
3
2
  import { type ReactNode, useLayoutEffect, useRef, useState } from 'react';
4
3
  import type * as THREE from 'three';
5
- import { createReflectionProbeMark } from './probe-controller';
4
+ import { createReflectionProbeMark, type VolumeReflectionProbeConfig } from './probe-controller';
6
5
  import {
7
6
  acquireReflectionProbeRegistry,
8
7
  type ReflectionProbeRegistryLease,
@@ -60,6 +59,15 @@ export type ReflectionProbeProps = Omit<ThreeElements['group'], 'children'> & {
60
59
  readonly blendDistance?: number;
61
60
  readonly priority?: number;
62
61
  readonly intensity?: number;
62
+ /**
63
+ * The diffuse light the volume material takes from this probe: its capture
64
+ * (default), the constant `diffuseColor`, or none. See `ReflectionProbeDiffuse`.
65
+ */
66
+ readonly diffuse?: 'capture' | 'color' | 'none';
67
+ /** Scales the probe's diffuse light in the volume material; defaults to `intensity`. */
68
+ readonly diffuseIntensity?: number;
69
+ /** Linear RGB of the `color` diffuse. */
70
+ readonly diffuseColor?: [number, number, number];
63
71
  readonly parallaxProjection?: boolean;
64
72
  /** Full local-space projection-box dimensions. */
65
73
  readonly parallaxSize?: [number, number, number];
@@ -73,6 +81,19 @@ export type ReflectionProbeProps = Omit<ThreeElements['group'], 'children'> & {
73
81
  readonly captureShadows?: boolean;
74
82
  };
75
83
 
84
+ /** The diffuse fields a probe states, leaving out the ones it does not (they keep their defaults). */
85
+ function diffuseConfig(
86
+ diffuse: ReflectionProbeProps['diffuse'],
87
+ diffuseIntensity: number | undefined,
88
+ diffuseColor: [number, number, number] | undefined,
89
+ ): Partial<VolumeReflectionProbeConfig> {
90
+ return {
91
+ ...(diffuse === undefined ? {} : { diffuse }),
92
+ ...(diffuseIntensity === undefined ? {} : { diffuseIntensity }),
93
+ ...(diffuseColor === undefined ? {} : { diffuseColor }),
94
+ };
95
+ }
96
+
76
97
  export function ReflectionProbe({
77
98
  name = 'Reflection Probe',
78
99
  children,
@@ -82,6 +103,9 @@ export function ReflectionProbe({
82
103
  blendDistance = 1,
83
104
  priority = 0,
84
105
  intensity = 1,
106
+ diffuse,
107
+ diffuseIntensity,
108
+ diffuseColor,
85
109
  parallaxProjection = true,
86
110
  parallaxSize = [10, 6, 10],
87
111
  parallaxOffset = [0, 0, 0],
@@ -109,6 +133,7 @@ export function ReflectionProbe({
109
133
  blendDistance,
110
134
  priority,
111
135
  intensity,
136
+ ...diffuseConfig(diffuse, diffuseIntensity, diffuseColor),
112
137
  parallaxProjection,
113
138
  parallaxSize,
114
139
  parallaxOffset,
@@ -121,13 +146,14 @@ export function ReflectionProbe({
121
146
  captureShadows,
122
147
  }),
123
148
  );
124
- const config: ReflectionProbeConfig = {
149
+ const config: VolumeReflectionProbeConfig = {
125
150
  shape,
126
151
  size,
127
152
  radius,
128
153
  blendDistance,
129
154
  priority,
130
155
  intensity,
156
+ ...diffuseConfig(diffuse, diffuseIntensity, diffuseColor),
131
157
  parallaxProjection,
132
158
  parallaxSize,
133
159
  parallaxOffset,
@@ -149,6 +175,9 @@ export function ReflectionProbe({
149
175
  blendDistance,
150
176
  priority,
151
177
  intensity,
178
+ diffuse,
179
+ diffuseIntensity,
180
+ diffuseColor,
152
181
  parallaxProjection,
153
182
  parallaxSize,
154
183
  parallaxOffset,
@@ -170,8 +199,8 @@ export function ReflectionProbe({
170
199
  unobserve.current = acquired.registry.observe((probes: readonly ReflectionProbeRuntime[]) => {
171
200
  const self = probes.find((probe) => probe.node === object);
172
201
  const published = self?.ready ? self.texture : null;
173
- // Runs every update; React re-renders only when the published texture
174
- // actually changes identity, which is once per capture at most.
202
+ // Runs whenever the registry changes; React re-renders only when the
203
+ // published texture actually changes identity, once per capture at most.
175
204
  setEnvMap((current) => (current === published ? current : published));
176
205
  });
177
206
  return () => {
@@ -3,6 +3,7 @@ export {
3
3
  type ReflectionProbeProps,
4
4
  type ReflectionProbePublication,
5
5
  } from './ReflectionProbe';
6
+ export type { ReflectionProbeDiffuse, VolumeReflectionProbeConfig } from './probe-controller';
6
7
  export {
7
8
  acquireReflectionProbeRegistry,
8
9
  createReflectionProbeRegistry,
@@ -4,17 +4,53 @@ import type {
4
4
  ReflectionProbeSnapshot,
5
5
  } from '@volter/threejs-runtime/adapter/reflection-probe';
6
6
 
7
+ /**
8
+ * How a probe lights the diffuse term of the volume material that blends it,
9
+ * carried in its mark's config beside the format-neutral fields. Every field
10
+ * is optional; left out, a probe lights the diffuse from its capture, scaled
11
+ * by its `intensity`, as the reflected term is.
12
+ */
13
+ export interface ReflectionProbeDiffuse {
14
+ /**
15
+ * Where the probe's diffuse light comes from: its `capture` (the default), the
16
+ * constant `color` below, or `none` — the probe lights no diffuse, and a
17
+ * fragment that only it covers keeps the environment's.
18
+ */
19
+ readonly diffuse?: 'capture' | 'color' | 'none';
20
+ /** Scales the probe's diffuse light. Defaults to the probe's `intensity`. */
21
+ readonly diffuseIntensity?: number;
22
+ /** Linear RGB radiance of the `color` diffuse. */
23
+ readonly diffuseColor?: readonly [number, number, number];
24
+ }
25
+
26
+ /** A probe's config as the capability's own element states it. */
27
+ export type VolumeReflectionProbeConfig = ReflectionProbeConfig & ReflectionProbeDiffuse;
28
+
7
29
  export interface MutableReflectionProbeMark extends ReflectionProbeMark {
8
30
  updateConfig(config: ReflectionProbeConfig): void;
9
31
  setCaptureStatus(snapshot: ReflectionProbeSnapshot): void;
10
32
  }
11
33
 
12
- /** One live projection of a component's JSX props and capture state. */
34
+ /**
35
+ * The config as a capture sees it: everything but the diffuse fields, which
36
+ * only the volume material reads (from the probe's uniforms, not its capture).
37
+ */
38
+ function captureSignature(config: ReflectionProbeConfig): string {
39
+ const { diffuse, diffuseIntensity, diffuseColor, ...captured } = config as VolumeReflectionProbeConfig;
40
+ return JSON.stringify(captured);
41
+ }
42
+
43
+ /**
44
+ * One live projection of a component's JSX props and capture state. A config
45
+ * change that a capture sees queues a recapture (outside Manual); one that
46
+ * only changes the diffuse fields takes effect without one.
47
+ */
13
48
  export function createReflectionProbeMark(
14
49
  initial: ReflectionProbeConfig,
15
50
  ): MutableReflectionProbeMark {
16
51
  let config = initial;
17
52
  let configSignature = JSON.stringify(initial);
53
+ let capturedSignature = captureSignature(initial);
18
54
  let revision = 0;
19
55
  let snapshot: ReflectionProbeSnapshot = {
20
56
  status: initial.captureMode === 'manual' ? 'idle' : 'queued',
@@ -47,12 +83,17 @@ export function createReflectionProbeMark(
47
83
  const signature = JSON.stringify(next);
48
84
  if (signature === configSignature) return;
49
85
  const previousMode = config.captureMode;
86
+ const nextCaptured = captureSignature(next);
87
+ const recapture = nextCaptured !== capturedSignature;
50
88
  config = next;
51
89
  configSignature = signature;
52
- if (next.captureMode !== 'manual') {
90
+ capturedSignature = nextCaptured;
91
+ // A diffuse-only change needs no capture: the registry sees the new config
92
+ // and the volume material rewrites its uniforms.
93
+ if (recapture && next.captureMode !== 'manual') {
53
94
  revision += 1;
54
95
  snapshot = { status: 'queued', lastCapturedAt: snapshot.lastCapturedAt };
55
- } else if (previousMode !== 'manual' && snapshot.status !== 'ready') {
96
+ } else if (next.captureMode === 'manual' && previousMode !== 'manual' && snapshot.status !== 'ready') {
56
97
  // Entering Manual never performs an implicit capture. A valid existing
57
98
  // result remains valid; otherwise the explicit Recapture button is the
58
99
  // only operation that advances the capture revision.
@@ -71,9 +71,17 @@ interface ProbeState extends ReflectionProbeRuntime {
71
71
  ready: boolean;
72
72
  capturedRevision: number;
73
73
  readonly capturedTransform: Matrix4;
74
+ /** The node's world matrix and the mark's config as observers were last told them. */
75
+ readonly publishedTransform: Matrix4;
76
+ publishedConfig: ReflectionProbeMark['config'] | null;
74
77
  }
75
78
 
76
- /** Called every update, and again the moment a capture window opens/closes. */
79
+ /**
80
+ * Called when an observer starts observing, and again whenever what it reads
81
+ * changes: a probe added or removed, a capture window opening or closing (and
82
+ * the result it published), a probe's node moved or its config changed. A
83
+ * frame in which nothing changed calls no observer.
84
+ */
77
85
  export type ReflectionProbeObserver = (
78
86
  probes: readonly ReflectionProbeRuntime[],
79
87
  capturing: boolean,
@@ -129,6 +137,8 @@ function makeProbe(node: Object3D, mark: ReflectionProbeMark): ProbeState {
129
137
  parallaxOffset: new Vector3(),
130
138
  captureOffset: new Vector3(),
131
139
  capturedTransform: new Matrix4().makeScale(0, 0, 0),
140
+ publishedTransform: new Matrix4().makeScale(0, 0, 0),
141
+ publishedConfig: null,
132
142
  filtered: null,
133
143
  atlases: new Map(),
134
144
  texture: null,
@@ -174,6 +184,10 @@ function releaseProbeResources(probe: ProbeState): void {
174
184
  probe.ready = false;
175
185
  }
176
186
 
187
+ /**
188
+ * Bring the probe's volume up to date with its node and config; true when
189
+ * that changed what an observer reads since it was last told.
190
+ */
177
191
  function refreshProbe(probe: ProbeState): boolean {
178
192
  const config = probe.mark.config;
179
193
  const cubeSize = cubeSizeOf(probe.mark);
@@ -194,9 +208,15 @@ function refreshProbe(probe: ProbeState): boolean {
194
208
  probe.parallaxExtents.fromArray(config.parallaxSize).multiplyScalar(0.5);
195
209
  probe.parallaxOffset.fromArray(config.parallaxOffset);
196
210
  probe.captureOffset.fromArray(config.captureOffset);
197
- const moved = !probe.capturedTransform.equals(probe.node.matrixWorld);
198
- if (moved && config.captureMode === 'on-change') probe.ready = false;
199
- return moved;
211
+ if (config.captureMode === 'on-change' && movedSinceCapture(probe)) probe.ready = false;
212
+ const changed = probe.publishedConfig !== config || !probe.publishedTransform.equals(probe.node.matrixWorld);
213
+ probe.publishedConfig = config;
214
+ probe.publishedTransform.copy(probe.node.matrixWorld);
215
+ return changed;
216
+ }
217
+
218
+ function movedSinceCapture(probe: ProbeState): boolean {
219
+ return !probe.capturedTransform.equals(probe.node.matrixWorld);
200
220
  }
201
221
 
202
222
  /** The cube target and camera, created here because only a capture needs them. */
@@ -300,7 +320,7 @@ export function createReflectionProbeRegistry(
300
320
  for (let offset = 0; offset < probes.length; offset += 1) {
301
321
  const index = (cursor + offset) % probes.length;
302
322
  const probe = probes[index]!;
303
- const moved = refreshProbe(probe);
323
+ const moved = movedSinceCapture(probe);
304
324
  const mode = probe.mark.config.captureMode;
305
325
  const due =
306
326
  mode === 'realtime' ||
@@ -336,10 +356,15 @@ export function createReflectionProbeRegistry(
336
356
  update(frameToken) {
337
357
  if (disposed || frameToken === lastFrame || !canCaptureEnvironment(renderer)) return;
338
358
  lastFrame = frameToken;
339
- for (const probe of probes) refreshProbe(probe);
359
+ let changed = false;
360
+ for (const probe of probes) {
361
+ const ready = probe.ready;
362
+ if (refreshProbe(probe) || probe.ready !== ready) changed = true;
363
+ }
340
364
  const due = nextCapture();
341
365
  if (due) capture(due);
342
- notify(false);
366
+ // A capture opened a window (and published a result): closing it tells every observer.
367
+ if (due || changed) notify(false);
343
368
  },
344
369
  dispose() {
345
370
  if (disposed) return;