@3driseai/3drise-viewer 0.1.26 → 0.1.28

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 (476) hide show
  1. package/dist/animationsV2/ClipPlayer.d.ts +3 -0
  2. package/dist/animationsV2/ClipPlayer.d.ts.map +1 -1
  3. package/dist/animationsV2/ClipPlayer.js +67 -8
  4. package/dist/animationsV2/ClipsRuntime.d.ts +39 -0
  5. package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
  6. package/dist/animationsV2/ClipsRuntime.js +245 -14
  7. package/dist/animationsV2/appliers.d.ts +5 -0
  8. package/dist/animationsV2/appliers.d.ts.map +1 -1
  9. package/dist/animationsV2/appliers.js +25 -7
  10. package/dist/animationsV2/index.d.ts +1 -1
  11. package/dist/animationsV2/index.d.ts.map +1 -1
  12. package/dist/animationsV2/normalize.d.ts.map +1 -1
  13. package/dist/animationsV2/normalize.js +18 -7
  14. package/dist/animationsV2/sequenceUtils.d.ts +42 -1
  15. package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
  16. package/dist/animationsV2/sequenceUtils.js +103 -3
  17. package/dist/animationsV2/types.d.ts +20 -0
  18. package/dist/animationsV2/types.d.ts.map +1 -1
  19. package/dist/components/AdvancedGrid.d.ts +8 -2
  20. package/dist/components/AdvancedGrid.d.ts.map +1 -1
  21. package/dist/components/AdvancedGrid.js +31 -14
  22. package/dist/components/AnimatedObject.d.ts.map +1 -1
  23. package/dist/components/AnimatedObject.js +7 -5
  24. package/dist/components/ApollonianGrid.d.ts +25 -0
  25. package/dist/components/ApollonianGrid.d.ts.map +1 -0
  26. package/dist/components/ApollonianGrid.js +80 -0
  27. package/dist/components/Bubbles.d.ts +7 -1
  28. package/dist/components/Bubbles.d.ts.map +1 -1
  29. package/dist/components/Bubbles.js +42 -22
  30. package/dist/components/ChladniGrid.d.ts +8 -4
  31. package/dist/components/ChladniGrid.d.ts.map +1 -1
  32. package/dist/components/ChladniGrid.js +31 -13
  33. package/dist/components/CircuitGrid.d.ts +8 -11
  34. package/dist/components/CircuitGrid.d.ts.map +1 -1
  35. package/dist/components/CircuitGrid.js +31 -13
  36. package/dist/components/CloudsGenerator.d.ts +1 -1
  37. package/dist/components/CloudsGenerator.js +1 -1
  38. package/dist/components/ConformalGrid.d.ts +25 -0
  39. package/dist/components/ConformalGrid.d.ts.map +1 -0
  40. package/dist/components/ConformalGrid.js +97 -0
  41. package/dist/components/ContourGrid.d.ts +8 -14
  42. package/dist/components/ContourGrid.d.ts.map +1 -1
  43. package/dist/components/ContourGrid.js +31 -13
  44. package/dist/components/EffectsGenerator.d.ts +7 -1
  45. package/dist/components/EffectsGenerator.d.ts.map +1 -1
  46. package/dist/components/EffectsGenerator.js +39 -38
  47. package/dist/components/EnvironmentManager.d.ts +4 -4
  48. package/dist/components/EnvironmentManager.d.ts.map +1 -1
  49. package/dist/components/FlowNetGrid.d.ts +8 -4
  50. package/dist/components/FlowNetGrid.d.ts.map +1 -1
  51. package/dist/components/FlowNetGrid.js +31 -13
  52. package/dist/components/FractalGrid.d.ts +8 -12
  53. package/dist/components/FractalGrid.d.ts.map +1 -1
  54. package/dist/components/FractalGrid.js +31 -13
  55. package/dist/components/GirihGrid.d.ts +8 -1
  56. package/dist/components/GirihGrid.d.ts.map +1 -1
  57. package/dist/components/GirihGrid.js +31 -13
  58. package/dist/components/Glyphs.d.ts +7 -1
  59. package/dist/components/Glyphs.d.ts.map +1 -1
  60. package/dist/components/Glyphs.js +40 -34
  61. package/dist/components/GravWaveGrid.d.ts +8 -1
  62. package/dist/components/GravWaveGrid.d.ts.map +1 -1
  63. package/dist/components/GravWaveGrid.js +31 -13
  64. package/dist/components/GridsGenerator.d.ts +9 -3
  65. package/dist/components/GridsGenerator.d.ts.map +1 -1
  66. package/dist/components/GridsGenerator.js +41 -18
  67. package/dist/components/HexGrid.d.ts +8 -10
  68. package/dist/components/HexGrid.d.ts.map +1 -1
  69. package/dist/components/HexGrid.js +31 -13
  70. package/dist/components/HilbertGrid.d.ts +25 -0
  71. package/dist/components/HilbertGrid.d.ts.map +1 -0
  72. package/dist/components/HilbertGrid.js +93 -0
  73. package/dist/components/HyperbolicGrid.d.ts +8 -4
  74. package/dist/components/HyperbolicGrid.d.ts.map +1 -1
  75. package/dist/components/HyperbolicGrid.js +31 -13
  76. package/dist/components/LandscapeBuilder.d.ts +1 -1
  77. package/dist/components/LandscapeBuilder.d.ts.map +1 -1
  78. package/dist/components/LandscapeBuilder.js +1 -1
  79. package/dist/components/LandscapeObject.d.ts +1 -1
  80. package/dist/components/LandscapeObject.d.ts.map +1 -1
  81. package/dist/components/LandscapeObject.js +1 -1
  82. package/dist/components/LensingGrid.d.ts +25 -0
  83. package/dist/components/LensingGrid.d.ts.map +1 -0
  84. package/dist/components/LensingGrid.js +81 -0
  85. package/dist/components/MoireGrid.d.ts +8 -12
  86. package/dist/components/MoireGrid.d.ts.map +1 -1
  87. package/dist/components/MoireGrid.js +31 -13
  88. package/dist/components/ObjectNode.d.ts.map +1 -1
  89. package/dist/components/ObjectNode.js +2 -2
  90. package/dist/components/ObjectsRenderer.d.ts.map +1 -1
  91. package/dist/components/ObjectsRenderer.js +37 -3
  92. package/dist/components/OceanBuilder.d.ts +1 -1
  93. package/dist/components/OceanBuilder.js +1 -1
  94. package/dist/components/ParastichyGrid.d.ts +25 -0
  95. package/dist/components/ParastichyGrid.d.ts.map +1 -0
  96. package/dist/components/ParastichyGrid.js +82 -0
  97. package/dist/components/ParticlesGenerator.d.ts.map +1 -1
  98. package/dist/components/ParticlesGenerator.js +6 -0
  99. package/dist/components/PhyllotaxisGrid.d.ts +25 -0
  100. package/dist/components/PhyllotaxisGrid.d.ts.map +1 -0
  101. package/dist/components/PhyllotaxisGrid.js +95 -0
  102. package/dist/components/QuasiGrid.d.ts +8 -11
  103. package/dist/components/QuasiGrid.d.ts.map +1 -1
  104. package/dist/components/QuasiGrid.js +31 -13
  105. package/dist/components/RadarGrid.d.ts +8 -13
  106. package/dist/components/RadarGrid.d.ts.map +1 -1
  107. package/dist/components/RadarGrid.js +31 -13
  108. package/dist/components/ReactionDiffusionGrid.d.ts +8 -1
  109. package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
  110. package/dist/components/ReactionDiffusionGrid.js +33 -139
  111. package/dist/components/SceneBuilder.js +1 -1
  112. package/dist/components/SkySystem.d.ts +1 -1
  113. package/dist/components/SparklesBurst.d.ts +7 -1
  114. package/dist/components/SparklesBurst.d.ts.map +1 -1
  115. package/dist/components/SparklesBurst.js +31 -28
  116. package/dist/components/TerrainBuilder.d.ts +1 -1
  117. package/dist/components/TerrainBuilder.d.ts.map +1 -1
  118. package/dist/components/TerrainBuilder.js +1 -1
  119. package/dist/components/TruchetGrid.d.ts +25 -0
  120. package/dist/components/TruchetGrid.d.ts.map +1 -0
  121. package/dist/components/TruchetGrid.js +82 -0
  122. package/dist/components/VoronoiGrid.d.ts +8 -10
  123. package/dist/components/VoronoiGrid.d.ts.map +1 -1
  124. package/dist/components/VoronoiGrid.js +31 -13
  125. package/dist/components/WallpaperGrid.d.ts +8 -1
  126. package/dist/components/WallpaperGrid.d.ts.map +1 -1
  127. package/dist/components/WallpaperGrid.js +33 -210
  128. package/dist/components/effects/AuraEffect.d.ts +8 -3
  129. package/dist/components/effects/AuraEffect.d.ts.map +1 -1
  130. package/dist/components/effects/AuraEffect.js +49 -24
  131. package/dist/components/effects/AuroraEffect.d.ts +8 -3
  132. package/dist/components/effects/AuroraEffect.d.ts.map +1 -1
  133. package/dist/components/effects/AuroraEffect.js +45 -25
  134. package/dist/components/effects/BlackHoleEffect.d.ts +8 -3
  135. package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -1
  136. package/dist/components/effects/BlackHoleEffect.js +42 -21
  137. package/dist/components/effects/ConstellationEffect.d.ts +8 -3
  138. package/dist/components/effects/ConstellationEffect.d.ts.map +1 -1
  139. package/dist/components/effects/ConstellationEffect.js +49 -23
  140. package/dist/components/effects/DandelionSeedsEffect.d.ts +7 -2
  141. package/dist/components/effects/DandelionSeedsEffect.d.ts.map +1 -1
  142. package/dist/components/effects/DandelionSeedsEffect.js +19 -9
  143. package/dist/components/effects/DataStreamEffect.d.ts +8 -3
  144. package/dist/components/effects/DataStreamEffect.d.ts.map +1 -1
  145. package/dist/components/effects/DataStreamEffect.js +54 -26
  146. package/dist/components/effects/DnaHelixEffect.d.ts +8 -3
  147. package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -1
  148. package/dist/components/effects/DnaHelixEffect.js +62 -30
  149. package/dist/components/effects/FallingLeavesEffect.d.ts +7 -2
  150. package/dist/components/effects/FallingLeavesEffect.d.ts.map +1 -1
  151. package/dist/components/effects/FallingLeavesEffect.js +19 -9
  152. package/dist/components/effects/FieldLinesEffect.d.ts +8 -3
  153. package/dist/components/effects/FieldLinesEffect.d.ts.map +1 -1
  154. package/dist/components/effects/FieldLinesEffect.js +30 -20
  155. package/dist/components/effects/Fire.d.ts +8 -3
  156. package/dist/components/effects/Fire.d.ts.map +1 -1
  157. package/dist/components/effects/Fire.js +47 -10
  158. package/dist/components/effects/FireflySwarmEffect.d.ts +7 -2
  159. package/dist/components/effects/FireflySwarmEffect.d.ts.map +1 -1
  160. package/dist/components/effects/FireflySwarmEffect.js +19 -9
  161. package/dist/components/effects/Flares.d.ts +10 -3
  162. package/dist/components/effects/Flares.d.ts.map +1 -1
  163. package/dist/components/effects/Flares.js +53 -56
  164. package/dist/components/effects/ForcefieldEffect.d.ts +8 -3
  165. package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -1
  166. package/dist/components/effects/ForcefieldEffect.js +52 -33
  167. package/dist/components/effects/GalaxyEffect.d.ts +7 -2
  168. package/dist/components/effects/GalaxyEffect.d.ts.map +1 -1
  169. package/dist/components/effects/GalaxyEffect.js +19 -9
  170. package/dist/components/effects/HarmonicShellEffect.d.ts +8 -3
  171. package/dist/components/effects/HarmonicShellEffect.d.ts.map +1 -1
  172. package/dist/components/effects/HarmonicShellEffect.js +30 -22
  173. package/dist/components/effects/HologramEffect.d.ts +8 -3
  174. package/dist/components/effects/HologramEffect.d.ts.map +1 -1
  175. package/dist/components/effects/HologramEffect.js +52 -23
  176. package/dist/components/effects/IceCrystalsEffect.d.ts +8 -3
  177. package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -1
  178. package/dist/components/effects/IceCrystalsEffect.js +36 -21
  179. package/dist/components/effects/IceHaloEffect.d.ts +7 -2
  180. package/dist/components/effects/IceHaloEffect.d.ts.map +1 -1
  181. package/dist/components/effects/IceHaloEffect.js +19 -9
  182. package/dist/components/effects/LichtenbergEffect.d.ts +7 -2
  183. package/dist/components/effects/LichtenbergEffect.d.ts.map +1 -1
  184. package/dist/components/effects/LichtenbergEffect.js +19 -9
  185. package/dist/components/effects/LightningEffect.d.ts +8 -3
  186. package/dist/components/effects/LightningEffect.d.ts.map +1 -1
  187. package/dist/components/effects/LightningEffect.js +54 -32
  188. package/dist/components/effects/MoleculesEffect.d.ts +8 -3
  189. package/dist/components/effects/MoleculesEffect.d.ts.map +1 -1
  190. package/dist/components/effects/MoleculesEffect.js +31 -21
  191. package/dist/components/effects/MurmurationEffect.d.ts +7 -2
  192. package/dist/components/effects/MurmurationEffect.d.ts.map +1 -1
  193. package/dist/components/effects/MurmurationEffect.js +19 -9
  194. package/dist/components/effects/NeuralNetworkEffect.d.ts +8 -3
  195. package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -1
  196. package/dist/components/effects/NeuralNetworkEffect.js +66 -33
  197. package/dist/components/effects/OrbEffect.d.ts +8 -3
  198. package/dist/components/effects/OrbEffect.d.ts.map +1 -1
  199. package/dist/components/effects/OrbEffect.js +89 -42
  200. package/dist/components/effects/PlanetaryRingsEffect.d.ts +7 -2
  201. package/dist/components/effects/PlanetaryRingsEffect.d.ts.map +1 -1
  202. package/dist/components/effects/PlanetaryRingsEffect.js +19 -9
  203. package/dist/components/effects/PortalEffect.d.ts +8 -3
  204. package/dist/components/effects/PortalEffect.d.ts.map +1 -1
  205. package/dist/components/effects/PortalEffect.js +41 -25
  206. package/dist/components/effects/ShockwaveEffect.d.ts +7 -2
  207. package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
  208. package/dist/components/effects/ShockwaveEffect.js +19 -9
  209. package/dist/components/effects/SmokePlumeEffect.d.ts +8 -3
  210. package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -1
  211. package/dist/components/effects/SmokePlumeEffect.js +30 -20
  212. package/dist/components/effects/SmokeRibbon.d.ts +8 -2
  213. package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
  214. package/dist/components/effects/SmokeRibbon.js +34 -24
  215. package/dist/components/effects/SmokeRingEffect.d.ts +8 -3
  216. package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -1
  217. package/dist/components/effects/SmokeRingEffect.js +33 -21
  218. package/dist/components/effects/StrangeAttractorEffect.d.ts +8 -3
  219. package/dist/components/effects/StrangeAttractorEffect.d.ts.map +1 -1
  220. package/dist/components/effects/StrangeAttractorEffect.js +30 -20
  221. package/dist/components/effects/VolumetricFogEffect.d.ts +8 -3
  222. package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -1
  223. package/dist/components/effects/VolumetricFogEffect.js +38 -20
  224. package/dist/components/effects/WaterCausticsEffect.d.ts +7 -2
  225. package/dist/components/effects/WaterCausticsEffect.d.ts.map +1 -1
  226. package/dist/components/effects/WaterCausticsEffect.js +19 -9
  227. package/dist/components/effects/index.d.ts +0 -1
  228. package/dist/components/effects/index.d.ts.map +1 -1
  229. package/dist/components/effects/index.js +0 -1
  230. package/dist/components/index.d.ts +14 -1
  231. package/dist/components/index.d.ts.map +1 -1
  232. package/dist/components/index.js +7 -1
  233. package/dist/components/landscape/LandscapeMesh.js +1 -1
  234. package/dist/components/landscape/types.d.ts +1 -1
  235. package/dist/components/landscape/types.d.ts.map +1 -1
  236. package/dist/components/particles/MagneticBottleParticles.d.ts +17 -0
  237. package/dist/components/particles/MagneticBottleParticles.d.ts.map +1 -0
  238. package/dist/components/particles/MagneticBottleParticles.js +618 -0
  239. package/dist/components/particles/ShapeBurstParticles.d.ts +17 -0
  240. package/dist/components/particles/ShapeBurstParticles.d.ts.map +1 -0
  241. package/dist/components/particles/ShapeBurstParticles.js +588 -0
  242. package/dist/components/particles/ShapeFlowParticles.d.ts +17 -0
  243. package/dist/components/particles/ShapeFlowParticles.d.ts.map +1 -0
  244. package/dist/components/particles/ShapeFlowParticles.js +755 -0
  245. package/dist/components/particles/index.d.ts +6 -0
  246. package/dist/components/particles/index.d.ts.map +1 -1
  247. package/dist/components/particles/index.js +3 -0
  248. package/dist/components/terrain/types.d.ts +1 -1
  249. package/dist/components/terrain/types.d.ts.map +1 -1
  250. package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +1 -1
  251. package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
  252. package/dist/components/volumetricClouds/types.d.ts +1 -1
  253. package/dist/components/volumetricClouds/types.d.ts.map +1 -1
  254. package/dist/components/water/types.d.ts +1 -1
  255. package/dist/components/water/types.d.ts.map +1 -1
  256. package/dist/hooks/index.d.ts +2 -0
  257. package/dist/hooks/index.d.ts.map +1 -1
  258. package/dist/hooks/index.js +1 -0
  259. package/dist/hooks/useConfigDriver.d.ts +22 -0
  260. package/dist/hooks/useConfigDriver.d.ts.map +1 -0
  261. package/dist/hooks/useConfigDriver.js +43 -0
  262. package/dist/hooks/useConfigLive.d.ts +1 -1
  263. package/dist/hooks/useConfigLive.d.ts.map +1 -1
  264. package/dist/hooks/useLandscapeMaps.d.ts +1 -1
  265. package/dist/hooks/useLandscapeMaps.d.ts.map +1 -1
  266. package/dist/hooks/useOceanMaterial.d.ts +1 -1
  267. package/dist/hooks/useThunder.d.ts +1 -1
  268. package/dist/index.d.ts +1 -2
  269. package/dist/index.d.ts.map +1 -1
  270. package/dist/index.js +1 -2
  271. package/dist/interactions/index.d.ts +2 -1
  272. package/dist/interactions/index.d.ts.map +1 -1
  273. package/dist/interactions/index.js +1 -1
  274. package/dist/interactions/runner.d.ts +18 -3
  275. package/dist/interactions/runner.d.ts.map +1 -1
  276. package/dist/interactions/runner.js +25 -2
  277. package/dist/operations/catalogue/curlSmoke.d.ts +3 -0
  278. package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -0
  279. package/dist/operations/catalogue/curlSmoke.js +178 -0
  280. package/dist/operations/catalogue/displayImage.d.ts.map +1 -1
  281. package/dist/operations/catalogue/displayImage.js +1 -0
  282. package/dist/operations/catalogue/dissolve.d.ts +3 -0
  283. package/dist/operations/catalogue/dissolve.d.ts.map +1 -0
  284. package/dist/operations/catalogue/dissolve.js +57 -0
  285. package/dist/operations/catalogue/emberAsh.d.ts +3 -0
  286. package/dist/operations/catalogue/emberAsh.d.ts.map +1 -0
  287. package/dist/operations/catalogue/emberAsh.js +171 -0
  288. package/dist/operations/catalogue/fade.d.ts.map +1 -1
  289. package/dist/operations/catalogue/fade.js +1 -0
  290. package/dist/operations/catalogue/flip.d.ts +3 -0
  291. package/dist/operations/catalogue/flip.d.ts.map +1 -0
  292. package/dist/operations/catalogue/flip.js +69 -0
  293. package/dist/operations/catalogue/flock.d.ts +3 -0
  294. package/dist/operations/catalogue/flock.d.ts.map +1 -0
  295. package/dist/operations/catalogue/flock.js +163 -0
  296. package/dist/operations/catalogue/focus.d.ts.map +1 -1
  297. package/dist/operations/catalogue/focus.js +1 -0
  298. package/dist/operations/catalogue/frame.d.ts +3 -0
  299. package/dist/operations/catalogue/frame.d.ts.map +1 -0
  300. package/dist/operations/catalogue/frame.js +44 -0
  301. package/dist/operations/catalogue/frost.d.ts +3 -0
  302. package/dist/operations/catalogue/frost.d.ts.map +1 -0
  303. package/dist/operations/catalogue/frost.js +111 -0
  304. package/dist/operations/catalogue/fxInstances.d.ts +21 -0
  305. package/dist/operations/catalogue/fxInstances.d.ts.map +1 -0
  306. package/dist/operations/catalogue/fxInstances.js +47 -0
  307. package/dist/operations/catalogue/fxPoints.d.ts +22 -0
  308. package/dist/operations/catalogue/fxPoints.d.ts.map +1 -0
  309. package/dist/operations/catalogue/fxPoints.js +70 -0
  310. package/dist/operations/catalogue/glow.d.ts.map +1 -1
  311. package/dist/operations/catalogue/glow.js +2 -1
  312. package/dist/operations/catalogue/heatCracks.d.ts +3 -0
  313. package/dist/operations/catalogue/heatCracks.d.ts.map +1 -0
  314. package/dist/operations/catalogue/heatCracks.js +134 -0
  315. package/dist/operations/catalogue/hologram.d.ts +3 -0
  316. package/dist/operations/catalogue/hologram.d.ts.map +1 -0
  317. package/dist/operations/catalogue/hologram.js +118 -0
  318. package/dist/operations/catalogue/inkBloom.d.ts +3 -0
  319. package/dist/operations/catalogue/inkBloom.d.ts.map +1 -0
  320. package/dist/operations/catalogue/inkBloom.js +156 -0
  321. package/dist/operations/catalogue/ivy.d.ts +13 -0
  322. package/dist/operations/catalogue/ivy.d.ts.map +1 -0
  323. package/dist/operations/catalogue/ivy.js +469 -0
  324. package/dist/operations/catalogue/jelly.d.ts +3 -0
  325. package/dist/operations/catalogue/jelly.d.ts.map +1 -0
  326. package/dist/operations/catalogue/jelly.js +50 -0
  327. package/dist/operations/catalogue/kintsugi.d.ts +3 -0
  328. package/dist/operations/catalogue/kintsugi.d.ts.map +1 -0
  329. package/dist/operations/catalogue/kintsugi.js +173 -0
  330. package/dist/operations/catalogue/lidarScan.d.ts +3 -0
  331. package/dist/operations/catalogue/lidarScan.d.ts.map +1 -0
  332. package/dist/operations/catalogue/lidarScan.js +240 -0
  333. package/dist/operations/catalogue/liquidMetal.d.ts +3 -0
  334. package/dist/operations/catalogue/liquidMetal.d.ts.map +1 -0
  335. package/dist/operations/catalogue/liquidMetal.js +122 -0
  336. package/dist/operations/catalogue/metalize.d.ts +3 -0
  337. package/dist/operations/catalogue/metalize.d.ts.map +1 -0
  338. package/dist/operations/catalogue/metalize.js +135 -0
  339. package/dist/operations/catalogue/moveToFront.d.ts.map +1 -1
  340. package/dist/operations/catalogue/moveToFront.js +1 -0
  341. package/dist/operations/catalogue/orbit.d.ts +3 -0
  342. package/dist/operations/catalogue/orbit.d.ts.map +1 -0
  343. package/dist/operations/catalogue/orbit.js +29 -0
  344. package/dist/operations/catalogue/particleSwarm.d.ts +3 -0
  345. package/dist/operations/catalogue/particleSwarm.d.ts.map +1 -0
  346. package/dist/operations/catalogue/particleSwarm.js +138 -0
  347. package/dist/operations/catalogue/petalPeel.d.ts +3 -0
  348. package/dist/operations/catalogue/petalPeel.d.ts.map +1 -0
  349. package/dist/operations/catalogue/petalPeel.js +137 -0
  350. package/dist/operations/catalogue/petrify.d.ts +3 -0
  351. package/dist/operations/catalogue/petrify.d.ts.map +1 -0
  352. package/dist/operations/catalogue/petrify.js +94 -0
  353. package/dist/operations/catalogue/portal.d.ts +3 -0
  354. package/dist/operations/catalogue/portal.d.ts.map +1 -0
  355. package/dist/operations/catalogue/portal.js +224 -0
  356. package/dist/operations/catalogue/print3d.d.ts +3 -0
  357. package/dist/operations/catalogue/print3d.d.ts.map +1 -0
  358. package/dist/operations/catalogue/print3d.js +275 -0
  359. package/dist/operations/catalogue/rainBeads.d.ts +3 -0
  360. package/dist/operations/catalogue/rainBeads.d.ts.map +1 -0
  361. package/dist/operations/catalogue/rainBeads.js +223 -0
  362. package/dist/operations/catalogue/restPose.d.ts +21 -0
  363. package/dist/operations/catalogue/restPose.d.ts.map +1 -0
  364. package/dist/operations/catalogue/restPose.js +55 -0
  365. package/dist/operations/catalogue/rimLight.d.ts +3 -0
  366. package/dist/operations/catalogue/rimLight.d.ts.map +1 -0
  367. package/dist/operations/catalogue/rimLight.js +72 -0
  368. package/dist/operations/catalogue/sandErosion.d.ts +3 -0
  369. package/dist/operations/catalogue/sandErosion.d.ts.map +1 -0
  370. package/dist/operations/catalogue/sandErosion.js +167 -0
  371. package/dist/operations/catalogue/shaderLayers.d.ts +74 -0
  372. package/dist/operations/catalogue/shaderLayers.d.ts.map +1 -0
  373. package/dist/operations/catalogue/shaderLayers.js +322 -0
  374. package/dist/operations/catalogue/shatter.d.ts +3 -0
  375. package/dist/operations/catalogue/shatter.d.ts.map +1 -0
  376. package/dist/operations/catalogue/shatter.js +267 -0
  377. package/dist/operations/catalogue/silkDrape.d.ts +3 -0
  378. package/dist/operations/catalogue/silkDrape.d.ts.map +1 -0
  379. package/dist/operations/catalogue/silkDrape.js +340 -0
  380. package/dist/operations/catalogue/spin.d.ts +3 -0
  381. package/dist/operations/catalogue/spin.d.ts.map +1 -0
  382. package/dist/operations/catalogue/spin.js +42 -0
  383. package/dist/operations/catalogue/surfaceSample.d.ts +17 -0
  384. package/dist/operations/catalogue/surfaceSample.d.ts.map +1 -0
  385. package/dist/operations/catalogue/surfaceSample.js +187 -0
  386. package/dist/operations/catalogue/swirl.d.ts +3 -0
  387. package/dist/operations/catalogue/swirl.d.ts.map +1 -0
  388. package/dist/operations/catalogue/swirl.js +69 -0
  389. package/dist/operations/catalogue/teleport.d.ts +3 -0
  390. package/dist/operations/catalogue/teleport.d.ts.map +1 -0
  391. package/dist/operations/catalogue/teleport.js +213 -0
  392. package/dist/operations/catalogue/transitionField.d.ts +124 -0
  393. package/dist/operations/catalogue/transitionField.d.ts.map +1 -0
  394. package/dist/operations/catalogue/transitionField.js +278 -0
  395. package/dist/operations/catalogue/unweave.d.ts +3 -0
  396. package/dist/operations/catalogue/unweave.d.ts.map +1 -0
  397. package/dist/operations/catalogue/unweave.js +233 -0
  398. package/dist/operations/catalogue/visibility.d.ts.map +1 -1
  399. package/dist/operations/catalogue/visibility.js +1 -0
  400. package/dist/operations/catalogue/voxelize.d.ts +3 -0
  401. package/dist/operations/catalogue/voxelize.d.ts.map +1 -0
  402. package/dist/operations/catalogue/voxelize.js +148 -0
  403. package/dist/operations/catalogue/warmup.d.ts +22 -0
  404. package/dist/operations/catalogue/warmup.d.ts.map +1 -0
  405. package/dist/operations/catalogue/warmup.js +106 -0
  406. package/dist/operations/catalogue/zoom.d.ts.map +1 -1
  407. package/dist/operations/catalogue/zoom.js +1 -0
  408. package/dist/operations/index.d.ts +4 -2
  409. package/dist/operations/index.d.ts.map +1 -1
  410. package/dist/operations/index.js +4 -2
  411. package/dist/operations/objectEffects.d.ts +46 -0
  412. package/dist/operations/objectEffects.d.ts.map +1 -0
  413. package/dist/operations/objectEffects.js +136 -0
  414. package/dist/operations/registry.d.ts +7 -2
  415. package/dist/operations/registry.d.ts.map +1 -1
  416. package/dist/operations/registry.js +45 -3
  417. package/dist/operations/runtime.d.ts +40 -2
  418. package/dist/operations/runtime.d.ts.map +1 -1
  419. package/dist/operations/runtime.js +164 -8
  420. package/dist/operations/types.d.ts +29 -3
  421. package/dist/operations/types.d.ts.map +1 -1
  422. package/dist/operations/types.js +6 -0
  423. package/dist/operations/useObjectEffectLayers.d.ts +4 -0
  424. package/dist/operations/useObjectEffectLayers.d.ts.map +1 -0
  425. package/dist/operations/useObjectEffectLayers.js +42 -0
  426. package/dist/operations/useOperationsRuntime.d.ts.map +1 -1
  427. package/dist/operations/useOperationsRuntime.js +42 -4
  428. package/dist/presets/landscapePresets.d.ts +1 -1
  429. package/dist/presets/landscapePresets.d.ts.map +1 -1
  430. package/dist/presets/landscapePresets.js +1 -1
  431. package/dist/presets/landscapeTypes.d.ts +1 -1
  432. package/dist/presets/landscapeTypes.d.ts.map +1 -1
  433. package/dist/presets/landscapeTypes.js +1 -1
  434. package/dist/presets/oceanSurfacePresets.d.ts +1 -1
  435. package/dist/presets/terrainPresets.d.ts +1 -1
  436. package/dist/presets/terrainPresets.d.ts.map +1 -1
  437. package/dist/presets/volumetricCloudPresets.d.ts +1 -1
  438. package/dist/types/cloudConfigs.d.ts +2 -309
  439. package/dist/types/cloudConfigs.d.ts.map +1 -1
  440. package/dist/types/cloudConfigs.js +2 -339
  441. package/dist/types/gridConfigs.d.ts +103 -0
  442. package/dist/types/gridConfigs.d.ts.map +1 -1
  443. package/dist/types/index.d.ts +9 -9
  444. package/dist/types/index.d.ts.map +1 -1
  445. package/dist/types/index.js +4 -4
  446. package/dist/types/landscapeConfigs.d.ts +2 -217
  447. package/dist/types/landscapeConfigs.d.ts.map +1 -1
  448. package/dist/types/landscapeConfigs.js +2 -256
  449. package/dist/types/oceanConfigs.d.ts +2 -289
  450. package/dist/types/oceanConfigs.d.ts.map +1 -1
  451. package/dist/types/oceanConfigs.js +2 -380
  452. package/dist/types/terrainConfigs.d.ts +2 -250
  453. package/dist/types/terrainConfigs.d.ts.map +1 -1
  454. package/dist/types/terrainConfigs.js +2 -292
  455. package/dist/utils/cloudUniforms.d.ts +1 -1
  456. package/dist/utils/configAnimations.d.ts +6 -0
  457. package/dist/utils/configAnimations.d.ts.map +1 -1
  458. package/dist/utils/configAnimations.js +14 -0
  459. package/dist/utils/gridConfig.d.ts +19 -0
  460. package/dist/utils/gridConfig.d.ts.map +1 -0
  461. package/dist/utils/gridConfig.js +52 -0
  462. package/dist/utils/handleCloudsAnimations.d.ts +1 -1
  463. package/dist/utils/handleCloudsAnimations.js +1 -1
  464. package/dist/utils/hasHoverAnimation.d.ts.map +1 -1
  465. package/dist/utils/hasHoverAnimation.js +0 -2
  466. package/dist/utils/landscapeUniforms.d.ts +1 -1
  467. package/dist/utils/landscapeUniforms.d.ts.map +1 -1
  468. package/dist/utils/oceanUniforms.d.ts +1 -1
  469. package/dist/utils/particleShape.d.ts +33 -0
  470. package/dist/utils/particleShape.d.ts.map +1 -0
  471. package/dist/utils/particleShape.js +207 -0
  472. package/dist/utils/particleTrails.d.ts.map +1 -1
  473. package/dist/utils/particleTrails.js +29 -14
  474. package/dist/utils/terrainUniforms.d.ts +1 -1
  475. package/dist/utils/terrainUniforms.d.ts.map +1 -1
  476. package/package.json +2 -2
@@ -0,0 +1,148 @@
1
+ // Voxelise — the surface is digitised into small cubes, then the cubes peel off
2
+ // and float away. Each cube is a real lit voxel (one instanced mesh, casting
3
+ // shadows) holding the average colour of the surface it replaced. As the front
4
+ // passes, the surface goes and its voxel pops in with a brief flash; a moment
5
+ // later the voxel lifts off along the surface normal and upward, tumbling and
6
+ // shrinking. Reverting flies every cube back and the surface re-forms.
7
+ import { BoxGeometry } from 'three';
8
+ import { defineOperation } from '../types.js';
9
+ import { GLSL_ROT, addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
10
+ import { DIRECTION_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, hideMeshes, runProgress, setFieldParams, surfaceLayer, } from './transitionField.js';
11
+ import { sampleSurfaceCached, mulberry32 } from './surfaceSample.js';
12
+ import { createFxInstances, disposeFxInstances } from './fxInstances.js';
13
+ const P = 'Vox';
14
+ const KEY = 'voxelize';
15
+ const STATE = '__opVoxelize';
16
+ const LIFE = 0.75;
17
+ /** Quantise surface samples to a grid: one voxel per occupied cell, averaged. */
18
+ function buildVoxels(target, resolution) {
19
+ const sample = sampleSurfaceCached(target, 40000, 37);
20
+ let min = [Infinity, Infinity, Infinity], max = [-Infinity, -Infinity, -Infinity];
21
+ for (let i = 0; i < sample.count; i++)
22
+ for (let a = 0; a < 3; a++) {
23
+ min[a] = Math.min(min[a], sample.position[i * 3 + a]);
24
+ max[a] = Math.max(max[a], sample.position[i * 3 + a]);
25
+ }
26
+ const cell = Math.max(max[0] - min[0], max[1] - min[1], max[2] - min[2], 1e-3) / Math.max(4, resolution);
27
+ const cells = new Map();
28
+ for (let i = 0; i < sample.count; i++) {
29
+ const ix = Math.floor((sample.position[i * 3] - min[0]) / cell);
30
+ const iy = Math.floor((sample.position[i * 3 + 1] - min[1]) / cell);
31
+ const iz = Math.floor((sample.position[i * 3 + 2] - min[2]) / cell);
32
+ const key = `${ix},${iy},${iz}`;
33
+ let v = cells.get(key);
34
+ if (!v) {
35
+ v = { p: [min[0] + (ix + 0.5) * cell, min[1] + (iy + 0.5) * cell, min[2] + (iz + 0.5) * cell], n: [0, 0, 0], c: [0, 0, 0], k: 0 };
36
+ cells.set(key, v);
37
+ }
38
+ for (let a = 0; a < 3; a++) {
39
+ v.n[a] += sample.normal[i * 3 + a];
40
+ v.c[a] += sample.color[i * 3 + a];
41
+ }
42
+ v.k++;
43
+ }
44
+ const n = cells.size;
45
+ const positions = new Float32Array(n * 3), normals = new Float32Array(n * 3), colors = new Float32Array(n * 3), rand = new Float32Array(n * 4);
46
+ const rnd = mulberry32(41);
47
+ let i = 0;
48
+ for (const v of cells.values()) {
49
+ const len = Math.hypot(v.n[0], v.n[1], v.n[2]) || 1;
50
+ for (let a = 0; a < 3; a++) {
51
+ positions[i * 3 + a] = v.p[a];
52
+ normals[i * 3 + a] = v.n[a] / len;
53
+ colors[i * 3 + a] = v.c[a] / v.k;
54
+ }
55
+ for (let a = 0; a < 4; a++)
56
+ rand[i * 4 + a] = rnd();
57
+ i++;
58
+ }
59
+ return { n, cell, positions, normals, colors, rand };
60
+ }
61
+ export default defineOperation({
62
+ value: 'voxelize',
63
+ label: 'Voxelise',
64
+ description: 'Digitise the targets into cubes that peel off and float away — reverting clicks them back',
65
+ channel: 'visual',
66
+ multi: true,
67
+ toggles: true,
68
+ usableIn: ['interaction', 'action'],
69
+ params: {
70
+ direction: { type: 'select', label: 'Direction', default: 'up', options: DIRECTION_OPTIONS },
71
+ resolution: { type: 'number', label: 'Resolution', default: 26, min: 6, max: 70, step: 1, hint: 'Cubes across the object’s largest side' },
72
+ lift: { type: 'number', label: 'Float', default: 1, min: 0, max: 4, step: 0.05, unit: '×' },
73
+ edgeColor: { type: 'color', label: 'Scan colour', default: '#7fe3ff' },
74
+ scale: { type: 'number', label: 'Pattern', default: 2, min: 0.5, max: 12, step: 0.1 },
75
+ duration: { type: 'number', label: 'Duration', default: 3, min: 0.3, max: 12, step: 0.1, unit: 's' },
76
+ },
77
+ apply(target, p, ctx) {
78
+ let st = target.userData[STATE];
79
+ if (!st) {
80
+ const field = createFieldState(target);
81
+ field.edgeWidth.value = 0.04;
82
+ const life = { value: LIFE }, lift = { value: 1 };
83
+ const vox = buildVoxels(target, Math.round(Number(p.resolution)));
84
+ const s = vox.cell * 0.94;
85
+ const mesh = createFxInstances(target, {
86
+ geometry: new BoxGeometry(s, s, s),
87
+ count: vox.n, positions: vox.positions, colors: vox.colors,
88
+ attributes: { aVoxP: [vox.positions, 3], aVoxN: [vox.normals, 3], aVoxR: [vox.rand, 4] },
89
+ layerKey: 'voxelInstances', roughness: 0.55, metalness: 0.05,
90
+ layer: {
91
+ uniforms: { ...fieldUniforms(P, field), uVoxLife: life, uVoxLift: lift },
92
+ common: `varying float vVoxFlash;\n${fieldGlsl(P)}\n${GLSL_ROT}`,
93
+ vertexPars: /* glsl */ `
94
+ attribute vec3 aVoxP; attribute vec3 aVoxN; attribute vec4 aVoxR;
95
+ float voxAge() { return (uVoxProgress - VoxBirthOf(VoxField(VoxNorm(aVoxP)))) / uVoxLife; }
96
+ mat3 voxSpin(float a) { float fly = smoothstep(0.3, 1.0, a); return fxRot(normalize(aVoxR.xyz - 0.5 + vec3(1e-3)), fly * fly * (2.0 + 3.0 * aVoxR.w)); }`,
97
+ normal: `{ objectNormal = voxSpin(voxAge()) * objectNormal; }`,
98
+ vertex: /* glsl */ `
99
+ {
100
+ float a = voxAge();
101
+ float pop = smoothstep(0.0, 0.14, a);
102
+ float fly = smoothstep(0.3, 1.0, a);
103
+ float sc = pop * (1.0 - smoothstep(0.72, 1.0, a));
104
+ float E = uVoxExtent;
105
+ vec3 off = (aVoxN * 0.3 + vec3(0.0, 1.0, 0.0) * (0.6 + 0.8 * aVoxR.y)) * E * 0.55 * uVoxLift * fly * fly
106
+ + (aVoxR.xyz - 0.5) * E * 0.25 * fly;
107
+ transformed = voxSpin(a) * (transformed * sc) + off;
108
+ vVoxFlash = pop * (1.0 - smoothstep(0.1, 0.24, a));
109
+ }`,
110
+ emissive: `totalEmissiveRadiance += uVoxEdgeColor * vVoxFlash * 0.7;`,
111
+ },
112
+ });
113
+ st = { field, life, lift, mesh, mats: new Set() };
114
+ const own = st;
115
+ const layer = surfaceLayer(P, field, 'tint');
116
+ forEachMeshMaterial(target, (mat, m) => {
117
+ if (m.userData?.__opFxHelper)
118
+ return;
119
+ if (addLayer(mat, KEY, layer))
120
+ own.mats.add(mat);
121
+ });
122
+ target.userData[STATE] = st;
123
+ }
124
+ const s = st;
125
+ setFieldParams(s.field, p, target, ctx);
126
+ s.lift.value = Number(p.lift);
127
+ s.mesh.visible = true;
128
+ return runProgress(target, s.field, 1 + LIFE, {
129
+ duration: Number(p.duration), ease: 'none',
130
+ onComplete: () => { hideMeshes(target, KEY, true); s.mesh.visible = false; },
131
+ });
132
+ },
133
+ revert(target, p) {
134
+ const s = target.userData[STATE];
135
+ if (!s)
136
+ return;
137
+ hideMeshes(target, KEY, false);
138
+ s.mesh.visible = true;
139
+ return runProgress(target, s.field, 0, {
140
+ duration: Number(p.duration), ease: 'none',
141
+ onComplete: () => {
142
+ s.mats.forEach(m => removeLayer(m, KEY));
143
+ disposeFxInstances(s.mesh);
144
+ delete target.userData[STATE];
145
+ },
146
+ });
147
+ },
148
+ });
@@ -0,0 +1,22 @@
1
+ import type { Object3D } from 'three';
2
+ export interface WarmContext {
3
+ gl: any;
4
+ scene: any;
5
+ cam: any;
6
+ }
7
+ export declare function warmContext(): WarmContext | null;
8
+ /** compileAsync with a safety timeout (a driver that never reports ready must not hang an effect). */
9
+ export declare function compileInBackground(root: Object3D, timeoutMs?: number): Promise<void>;
10
+ /** Keep a freshly created helper off screen until its shaders are compiled (see warmHelpers). */
11
+ export declare function hideUntilWarm(obj: Object3D): void;
12
+ /** Compile every helper under `root` that is waiting, in the background, then show it. */
13
+ export declare function warmHelpers(root: Object3D): Promise<void>;
14
+ /**
15
+ * Warm-only runs (pre-warming): while this is on, an effect's runProgress compiles
16
+ * everything it needs and then stops — nothing animates. See runtime.prewarmEffect.
17
+ */
18
+ export declare const warmMode: {
19
+ on: boolean;
20
+ };
21
+ export declare function retainPrograms(root: Object3D): void;
22
+ //# sourceMappingURL=warmup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warmup.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/warmup.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGhD,MAAM,WAAW,WAAW;IAAG,EAAE,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC;IAAC,GAAG,EAAE,GAAG,CAAA;CAAE;AAE9D,wBAAgB,WAAW,IAAI,WAAW,GAAG,IAAI,CAGhD;AAED,sGAAsG;AACtG,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAQnF;AAUD,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,QAI1C;AAED,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAQzD;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ;;CAAgB,CAAC;AAStC,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,QAmB5C"}
@@ -0,0 +1,106 @@
1
+ // =============================================================================
2
+ // Shader warm-up — effects never freeze the scene.
3
+ // =============================================================================
4
+ //
5
+ // WebGL compiles a shader program the first time a material is drawn with new
6
+ // code, and three.js does that synchronously inside the frame: the whole scene
7
+ // stops until it is done (worst on Windows, where ANGLE translates to Direct3D).
8
+ // three's compileAsync avoids that — with KHR_parallel_shader_compile it issues
9
+ // the compile and polls for completion without blocking — but only for objects
10
+ // that are NOT being drawn yet: a visible material with new code still compiles
11
+ // synchronously on the next frame.
12
+ //
13
+ // So effects compile before anything changes on screen:
14
+ // • layered materials: the layer is staged, a hidden clone with the same code
15
+ // is compiled in the background, then the layer is committed to the live
16
+ // material — three finds the finished program in its cache (same cache key)
17
+ // and reuses it, no compile (see shaderLayers.commitPendingLayers);
18
+ // • effect helpers (particles, threads, rings, beams, instances): their
19
+ // materials start hidden (material.visible = false; three still compiles
20
+ // hidden materials) and are shown once their program is ready.
21
+ // Without a renderer / camera (SSR, tests) everything happens immediately.
22
+ //
23
+ import { SceneStore } from '@3driseai/3drise-core';
24
+ import { InstancedMesh, LineSegments, Mesh, Points } from 'three';
25
+ import cameraManager from '../../utils/CameraSingleton.js';
26
+ export function warmContext() {
27
+ const gl = SceneStore.gl, scene = SceneStore.scene, cam = cameraManager.getCamera?.();
28
+ return gl && scene && cam && typeof gl.compileAsync === 'function' ? { gl, scene, cam } : null;
29
+ }
30
+ /** compileAsync with a safety timeout (a driver that never reports ready must not hang an effect). */
31
+ export function compileInBackground(root, timeoutMs = 8000) {
32
+ const ctx = warmContext();
33
+ if (!ctx)
34
+ return Promise.resolve();
35
+ let timer;
36
+ return Promise.race([
37
+ Promise.resolve(ctx.gl.compileAsync(root, ctx.cam, ctx.scene)).then(() => undefined, () => undefined),
38
+ new Promise(r => { timer = setTimeout(r, timeoutMs); }),
39
+ ]).finally(() => clearTimeout(timer));
40
+ }
41
+ const FLAG = '__opFxWarm';
42
+ const materialsOf = (obj) => {
43
+ const out = [];
44
+ obj.traverse((c) => { if (c.material)
45
+ out.push(...(Array.isArray(c.material) ? c.material : [c.material])); });
46
+ return out;
47
+ };
48
+ /** Keep a freshly created helper off screen until its shaders are compiled (see warmHelpers). */
49
+ export function hideUntilWarm(obj) {
50
+ if (!warmContext())
51
+ return;
52
+ for (const m of materialsOf(obj))
53
+ m.visible = false;
54
+ obj.userData[FLAG] = true;
55
+ }
56
+ /** Compile every helper under `root` that is waiting, in the background, then show it. */
57
+ export function warmHelpers(root) {
58
+ const waiting = [];
59
+ root.traverse((c) => { if (c.userData?.[FLAG])
60
+ waiting.push(c); });
61
+ return Promise.all(waiting.map(h => compileInBackground(h).then(() => {
62
+ for (const m of materialsOf(h))
63
+ m.visible = true;
64
+ delete h.userData[FLAG];
65
+ retainPrograms(h);
66
+ }))).then(() => undefined);
67
+ }
68
+ /**
69
+ * Warm-only runs (pre-warming): while this is on, an effect's runProgress compiles
70
+ * everything it needs and then stops — nothing animates. See runtime.prewarmEffect.
71
+ */
72
+ export const warmMode = { on: false };
73
+ /**
74
+ * Effect helpers are disposed when an effect ends, and three destroys a program
75
+ * when its last material goes — so the next play would compile again. Keep one
76
+ * tiny, never-drawn clone per helper material so its program stays cached.
77
+ */
78
+ const retained = [];
79
+ const retainedKeys = new Set();
80
+ export function retainPrograms(root) {
81
+ const ctx = warmContext();
82
+ if (!ctx)
83
+ return;
84
+ root.traverse((c) => {
85
+ const mats = c.material ? (Array.isArray(c.material) ? c.material : [c.material]) : [];
86
+ for (const m of mats) {
87
+ const key = `${c.type}|${m.type}|${m.vertexShader?.length ?? ''}|${m.fragmentShader?.length ?? ''}|${m.customProgramCacheKey?.() ?? ''}`;
88
+ if (retainedKeys.has(key))
89
+ continue;
90
+ retainedKeys.add(key);
91
+ const keep = m.clone();
92
+ keep.onBeforeCompile = m.onBeforeCompile;
93
+ keep.customProgramCacheKey = m.customProgramCacheKey;
94
+ keep.visible = true;
95
+ const stand = c.isInstancedMesh ? new InstancedMesh(c.geometry, keep, 1) : c.isPoints ? new Points(c.geometry, keep)
96
+ : c.isLineSegments ? new LineSegments(c.geometry, keep) : c.isMesh ? new Mesh(c.geometry, keep) : null;
97
+ if (!stand)
98
+ continue;
99
+ try {
100
+ ctx.gl.compile(stand, ctx.cam, ctx.scene);
101
+ retained.push(keep);
102
+ }
103
+ catch { /* ignore */ }
104
+ }
105
+ });
106
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/zoom.ts"],"names":[],"mappings":";AAGA,wBA2BG"}
1
+ {"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/zoom.ts"],"names":[],"mappings":";AAGA,wBA4BG"}
@@ -4,6 +4,7 @@ export default defineOperation({
4
4
  value: 'zoom',
5
5
  label: 'Zoom to',
6
6
  description: 'Fly the camera close to the target, facing it',
7
+ channel: 'camera',
7
8
  multi: false,
8
9
  toggles: true,
9
10
  usableIn: ['interaction', 'action'],
@@ -1,5 +1,7 @@
1
1
  export * from './types';
2
- export { OPERATIONS, getOperation, operationsFor, resolveParams } from './registry';
3
- export { runEffect, applyOperation, revertOperation, isOperationOn, resolveEffectTargets, runActionEffects, areActionEffectsOn, subscribeActionEffects, registerOperationTools, } from './runtime';
2
+ export { OPERATIONS, getOperation, operationsFor, resolveParams, channelOf } from './registry';
3
+ export { runEffect, applyOperation, revertOperation, runOf, isOperationOn, resolveEffectTargets, runActionEffects, previewEffect, previewEffects, isPreviewing, prewarmEffect, areActionEffectsOn, subscribeActionEffects, registerOperationTools, } from './runtime';
4
4
  export { useOperationsRuntime } from './useOperationsRuntime';
5
+ export { ObjectEffectsController, runningObjectEffects, objectEffectParams, isObjectOperation, surfaceSignature } from './objectEffects';
6
+ export { useObjectEffectLayers } from './useObjectEffectLayers';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EACH,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,oBAAoB,EAC/E,gBAAgB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,GACvF,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EACH,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,oBAAoB,EACtF,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,GACnJ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACzI,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './types.js';
2
- export { OPERATIONS, getOperation, operationsFor, resolveParams } from './registry.js';
3
- export { runEffect, applyOperation, revertOperation, isOperationOn, resolveEffectTargets, runActionEffects, areActionEffectsOn, subscribeActionEffects, registerOperationTools, } from './runtime.js';
2
+ export { OPERATIONS, getOperation, operationsFor, resolveParams, channelOf } from './registry.js';
3
+ export { runEffect, applyOperation, revertOperation, runOf, isOperationOn, resolveEffectTargets, runActionEffects, previewEffect, previewEffects, isPreviewing, prewarmEffect, areActionEffectsOn, subscribeActionEffects, registerOperationTools, } from './runtime.js';
4
4
  export { useOperationsRuntime } from './useOperationsRuntime.js';
5
+ export { ObjectEffectsController, runningObjectEffects, objectEffectParams, isObjectOperation, surfaceSignature } from './objectEffects.js';
6
+ export { useObjectEffectLayers } from './useObjectEffectLayers.js';
@@ -0,0 +1,46 @@
1
+ import type { Object3D } from 'three';
2
+ import type { ObjectEffect } from '@3driseai/3drise-core';
3
+ import type { OperationDefinition, OperationParams } from './types';
4
+ /** An operation can be an object effect. */
5
+ export declare const isObjectOperation: (def: OperationDefinition | undefined) => def is OperationDefinition;
6
+ /**
7
+ * The effects that actually run: on, known, usable on objects, one per operation,
8
+ * and one of each stack (the first wins).
9
+ */
10
+ export declare function runningObjectEffects(effects: ObjectEffect[] | undefined): ObjectEffect[];
11
+ /** An object effect's parameters: defaults, its overrides, then what object effects force. */
12
+ export declare const objectEffectParams: (def: OperationDefinition, effect: Pick<ObjectEffect, "params">) => OperationParams;
13
+ export declare class ObjectEffectsController {
14
+ private root;
15
+ private running;
16
+ private effects;
17
+ private refreshing;
18
+ private disposed;
19
+ constructor(root: Object3D);
20
+ /** The object's targets for an effect: the object, or its named nodes. */
21
+ private targetsOf;
22
+ private on;
23
+ private off;
24
+ /**
25
+ * Bring what runs in line with `effects`.
26
+ * animate switching an effect on / off plays its transition (studio, actions)
27
+ * instant everything lands in its end state at once (scene load)
28
+ * A changed parameter always lands at once.
29
+ */
30
+ sync(effects: ObjectEffect[] | undefined, mode: 'animate' | 'instant'): void;
31
+ /**
32
+ * The object's meshes or materials were replaced: take every effect off the
33
+ * old ones and put it straight back on the new ones (no transition).
34
+ */
35
+ refresh(): Promise<void>;
36
+ /** Take everything off at once (the object is going away). */
37
+ dispose(): void;
38
+ /** Ids of the effects running now (tests / studio). */
39
+ get runningIds(): string[];
40
+ }
41
+ /**
42
+ * What identifies the object's own drawable surface: its meshes and their
43
+ * materials (effect helpers left out). A change means effects must move over.
44
+ */
45
+ export declare function surfaceSignature(root: Object3D): string;
46
+ //# sourceMappingURL=objectEffects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectEffects.d.ts","sourceRoot":"","sources":["../../src/operations/objectEffects.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,uBAAuB,CAAC;AAGzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEpE,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB,GAAI,KAAK,mBAAmB,GAAG,SAAS,KAAG,GAAG,IAAI,mBACpB,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,GAAG,YAAY,EAAE,CAgBxF;AAED,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,GAAI,KAAK,mBAAmB,EAAE,QAAQ,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAG,eACzB,CAAC;AAY5E,qBAAa,uBAAuB;IAMpB,OAAO,CAAC,IAAI;IALxB,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,QAAQ,CAAS;gBAEL,IAAI,EAAE,QAAQ;IAElC,0EAA0E;IAC1E,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,EAAE;IAIV,OAAO,CAAC,GAAG;IAQX;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS;IAwBrE;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAaxB,8DAA8D;IAC9D,OAAO;IAMP,uDAAuD;IACvD,IAAI,UAAU,IAAI,MAAM,EAAE,CAAqC;CAClE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAQvD"}
@@ -0,0 +1,136 @@
1
+ import { findNodesByName } from '@3driseai/3drise-core';
2
+ import { getOperation, resolveParams } from './registry.js';
3
+ import { applyOperation, forceRevert, runOf } from './runtime.js';
4
+ /** An operation can be an object effect. */
5
+ export const isObjectOperation = (def) => !!def && def.usableIn.includes('object') && !!def.revert;
6
+ /**
7
+ * The effects that actually run: on, known, usable on objects, one per operation,
8
+ * and one of each stack (the first wins).
9
+ */
10
+ export function runningObjectEffects(effects) {
11
+ const out = [];
12
+ const ops = new Set();
13
+ const stacks = new Set();
14
+ for (const e of effects ?? []) {
15
+ if (!e?.enabled)
16
+ continue;
17
+ const def = getOperation(e.operation);
18
+ if (!isObjectOperation(def) || ops.has(def.value))
19
+ continue;
20
+ if (def.stack) {
21
+ if (stacks.has(def.stack))
22
+ continue;
23
+ stacks.add(def.stack);
24
+ }
25
+ ops.add(def.value);
26
+ out.push(e);
27
+ }
28
+ return out;
29
+ }
30
+ /** An object effect's parameters: defaults, its overrides, then what object effects force. */
31
+ export const objectEffectParams = (def, effect) => ({ ...resolveParams(def, effect.params), ...(def.objectParams ?? {}) });
32
+ const namesKey = (e) => (e.meshNames ?? []).join('|');
33
+ export class ObjectEffectsController {
34
+ root;
35
+ running = new Map(); // effect id →
36
+ effects = [];
37
+ refreshing = null;
38
+ disposed = false;
39
+ constructor(root) {
40
+ this.root = root;
41
+ }
42
+ /** The object's targets for an effect: the object, or its named nodes. */
43
+ targetsOf(e) {
44
+ if (!e.meshNames?.length)
45
+ return [this.root];
46
+ const out = [];
47
+ for (const name of e.meshNames)
48
+ out.push(...findNodesByName(this.root, name).filter(n => n !== this.root));
49
+ return out;
50
+ }
51
+ on(def, targets, params) {
52
+ for (const t of targets)
53
+ applyOperation(def, t, params, this.root, { bare: true });
54
+ }
55
+ off(r, instant) {
56
+ const def = getOperation(r.op);
57
+ if (!def)
58
+ return;
59
+ // with its own parameters — it may have gone on at once (load / edit), but goes off with its transition
60
+ const params = instant ? { ...r.params, duration: 0 } : r.params;
61
+ for (const t of r.targets)
62
+ forceRevert(def, t, params);
63
+ }
64
+ /**
65
+ * Bring what runs in line with `effects`.
66
+ * animate switching an effect on / off plays its transition (studio, actions)
67
+ * instant everything lands in its end state at once (scene load)
68
+ * A changed parameter always lands at once.
69
+ */
70
+ sync(effects, mode) {
71
+ if (this.disposed)
72
+ return;
73
+ this.effects = effects ?? [];
74
+ if (this.refreshing)
75
+ return; // the refresh puts the latest list back when it is done
76
+ const next = runningObjectEffects(effects);
77
+ const byId = new Map(next.map(e => [e.id, e]));
78
+ for (const [id, r] of this.running) {
79
+ const e = byId.get(id);
80
+ if (e && e.operation === r.op && namesKey(e) === r.targetsKey)
81
+ continue;
82
+ this.off(r, mode === 'instant');
83
+ this.running.delete(id);
84
+ }
85
+ for (const e of next) {
86
+ const def = getOperation(e.operation);
87
+ const params = objectEffectParams(def, e);
88
+ const paramsKey = JSON.stringify(params);
89
+ const r = this.running.get(e.id);
90
+ if (r && r.paramsKey === paramsKey)
91
+ continue;
92
+ const targets = r?.targets ?? this.targetsOf(e);
93
+ this.on(def, targets, r || mode === 'instant' ? { ...params, duration: 0 } : params);
94
+ this.running.set(e.id, { op: def.value, targets, targetsKey: namesKey(e), params, paramsKey });
95
+ }
96
+ }
97
+ /**
98
+ * The object's meshes or materials were replaced: take every effect off the
99
+ * old ones and put it straight back on the new ones (no transition).
100
+ */
101
+ refresh() {
102
+ if (this.refreshing || !this.running.size)
103
+ return this.refreshing ?? Promise.resolve();
104
+ const list = [...this.running.values()];
105
+ this.running.clear();
106
+ list.forEach(r => this.off(r, true));
107
+ const done = Promise.all(list.flatMap(r => r.targets.map(t => runOf(r.op, t))));
108
+ this.refreshing = done.then(() => {
109
+ this.refreshing = null;
110
+ this.sync(this.effects, 'instant');
111
+ });
112
+ return this.refreshing;
113
+ }
114
+ /** Take everything off at once (the object is going away). */
115
+ dispose() {
116
+ this.running.forEach(r => this.off(r, true));
117
+ this.running.clear();
118
+ this.disposed = true;
119
+ }
120
+ /** Ids of the effects running now (tests / studio). */
121
+ get runningIds() { return [...this.running.keys()]; }
122
+ }
123
+ /**
124
+ * What identifies the object's own drawable surface: its meshes and their
125
+ * materials (effect helpers left out). A change means effects must move over.
126
+ */
127
+ export function surfaceSignature(root) {
128
+ const parts = [];
129
+ root.traverse((c) => {
130
+ if (!c.isMesh || c.userData?.__opFxHelper)
131
+ return;
132
+ const mats = Array.isArray(c.material) ? c.material : [c.material];
133
+ parts.push(c.uuid + ':' + mats.map((m) => m?.uuid ?? '').join(','));
134
+ });
135
+ return parts.join(';');
136
+ }
@@ -1,11 +1,16 @@
1
- import type { OperationName } from '@3driseai/3drise-core';
1
+ import type { OperationChannel, OperationEffect, OperationName } from '@3driseai/3drise-core';
2
2
  import type { OperationDefinition, OperationParams, OperationSource } from './types';
3
3
  export declare const OPERATIONS: OperationDefinition[];
4
4
  export declare const getOperation: (name: OperationName) => OperationDefinition | undefined;
5
- /** Operations offered in a context (gallery-only ones only on gallery objects). */
5
+ /** Operations offered in a context (gallery-only ones only on gallery objects), optionally one channel. */
6
6
  export declare const operationsFor: (source: OperationSource, opts?: {
7
7
  gallery?: boolean;
8
+ channel?: OperationChannel;
8
9
  }) => OperationDefinition[];
10
+ /** An effect's channel — the stored one, else its operation's (effects saved before channels). */
11
+ export declare const channelOf: (effect: Pick<OperationEffect, "operation"> & {
12
+ channel?: OperationChannel;
13
+ }) => OperationChannel;
9
14
  /** Defaults overlaid with the effect's own values (unknown keys dropped). */
10
15
  export declare function resolveParams(def: OperationDefinition, overrides?: OperationParams): OperationParams;
11
16
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/operations/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AASrF,eAAO,MAAM,UAAU,EAAE,mBAAmB,EAAqE,CAAC;AAIlH,eAAO,MAAM,YAAY,GAAI,MAAM,aAAa,KAAG,mBAAmB,GAAG,SAA6B,CAAC;AAEvG,mFAAmF;AACnF,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,EAAE,OAAM;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,KAAG,mBAAmB,EAClB,CAAC;AAE5F,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,GAAG,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,eAAe,GAAG,eAAe,CAOpG"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/operations/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0CrF,eAAO,MAAM,UAAU,EAAE,mBAAmB,EAO3C,CAAC;AAIF,eAAO,MAAM,YAAY,GAAI,MAAM,aAAa,KAAG,mBAAmB,GAAG,SAA6B,CAAC;AAEvG,2GAA2G;AAC3G,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,EAAE,OAAM;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAO,KAAG,mBAAmB,EACG,CAAC;AAE7I,kGAAkG;AAClG,eAAO,MAAM,SAAS,GAAI,QAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,KAAG,gBAC/B,CAAC;AAE1E,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,GAAG,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,eAAe,GAAG,eAAe,CAOpG"}
@@ -5,11 +5,53 @@ import zoom from './catalogue/zoom.js';
5
5
  import focus from './catalogue/focus.js';
6
6
  import moveToFront from './catalogue/moveToFront.js';
7
7
  import displayImage from './catalogue/displayImage.js';
8
- export const OPERATIONS = [glow, fade, visibility, zoom, focus, moveToFront, displayImage];
8
+ import rimLight from './catalogue/rimLight.js';
9
+ import dissolve from './catalogue/dissolve.js';
10
+ import spin from './catalogue/spin.js';
11
+ import jelly from './catalogue/jelly.js';
12
+ import flip from './catalogue/flip.js';
13
+ import swirl from './catalogue/swirl.js';
14
+ import emberAsh from './catalogue/emberAsh.js';
15
+ import particleSwarm from './catalogue/particleSwarm.js';
16
+ import hologram from './catalogue/hologram.js';
17
+ import shatter from './catalogue/shatter.js';
18
+ import sandErosion from './catalogue/sandErosion.js';
19
+ import teleport from './catalogue/teleport.js';
20
+ import inkBloom from './catalogue/inkBloom.js';
21
+ import flock from './catalogue/flock.js';
22
+ import metalize from './catalogue/metalize.js';
23
+ import liquidMetal from './catalogue/liquidMetal.js';
24
+ import frost from './catalogue/frost.js';
25
+ import heatCracks from './catalogue/heatCracks.js';
26
+ import petrify from './catalogue/petrify.js';
27
+ import portal from './catalogue/portal.js';
28
+ import voxelize from './catalogue/voxelize.js';
29
+ import unweave from './catalogue/unweave.js';
30
+ import petalPeel from './catalogue/petalPeel.js';
31
+ import frame from './catalogue/frame.js';
32
+ import orbit from './catalogue/orbit.js';
33
+ import kintsugi from './catalogue/kintsugi.js';
34
+ import rainBeads from './catalogue/rainBeads.js';
35
+ import ivy from './catalogue/ivy.js';
36
+ import curlSmoke from './catalogue/curlSmoke.js';
37
+ import lidarScan from './catalogue/lidarScan.js';
38
+ import print3d from './catalogue/print3d.js';
39
+ import silkDrape from './catalogue/silkDrape.js';
40
+ // Grouped by channel (picker order): transform · visual · camera.
41
+ export const OPERATIONS = [
42
+ jelly, flip, spin, swirl, moveToFront,
43
+ glow, rimLight, dissolve, emberAsh, particleSwarm, hologram, shatter,
44
+ sandErosion, teleport, inkBloom, flock, liquidMetal, metalize, frost, heatCracks, petrify, kintsugi, rainBeads, ivy,
45
+ portal, voxelize, unweave, petalPeel, curlSmoke, lidarScan, print3d, silkDrape,
46
+ fade, visibility, displayImage,
47
+ zoom, frame, focus, orbit,
48
+ ];
9
49
  const byName = new Map(OPERATIONS.map(o => [o.value, o]));
10
50
  export const getOperation = (name) => byName.get(name);
11
- /** Operations offered in a context (gallery-only ones only on gallery objects). */
12
- export const operationsFor = (source, opts = {}) => OPERATIONS.filter(o => o.usableIn.includes(source) && (!o.galleryOnly || opts.gallery));
51
+ /** Operations offered in a context (gallery-only ones only on gallery objects), optionally one channel. */
52
+ export const operationsFor = (source, opts = {}) => OPERATIONS.filter(o => o.usableIn.includes(source) && (!o.galleryOnly || opts.gallery) && (!opts.channel || o.channel === opts.channel));
53
+ /** An effect's channel — the stored one, else its operation's (effects saved before channels). */
54
+ export const channelOf = (effect) => effect.channel ?? getOperation(effect.operation)?.channel ?? 'visual';
13
55
  /** Defaults overlaid with the effect's own values (unknown keys dropped). */
14
56
  export function resolveParams(def, overrides) {
15
57
  const out = {};
@@ -4,8 +4,25 @@ import type { OperationDefinition, OperationParams, OperationTools } from './typ
4
4
  /** Register the mounted scene's tools. Returns the unregister. */
5
5
  export declare function registerOperationTools(t: OperationTools): () => void;
6
6
  export declare function isOperationOn(op: OperationName, target: Object3D): boolean;
7
- export declare function applyOperation(def: OperationDefinition, target: Object3D, params: OperationParams, self?: Object3D | null): boolean;
8
- export declare function revertOperation(def: OperationDefinition, target: Object3D): boolean;
7
+ export declare function applyOperation(def: OperationDefinition, target: Object3D, params: OperationParams, self?: Object3D | null, opts?: {
8
+ bare?: boolean;
9
+ }): boolean;
10
+ /** The last run (apply or revert) of an op on a target — resolves when it has really finished. */
11
+ export declare const runOf: (op: OperationName, target: Object3D) => Promise<void>;
12
+ /**
13
+ * Undo an operation that is on. `params` overrides the ones it was applied with
14
+ * (e.g. a zero duration to take it off at once); `bare` runs it with no scene tools.
15
+ */
16
+ export declare function revertOperation(def: OperationDefinition, target: Object3D, opts?: {
17
+ params?: Partial<OperationParams>;
18
+ bare?: boolean;
19
+ }): boolean;
20
+ /**
21
+ * Undo an operation's effect on a target even when the runtime no longer tracks
22
+ * it as on (its scene tools were unregistered first, on unmount). Reverts of
23
+ * operations that are not on do nothing.
24
+ */
25
+ export declare function forceRevert(def: OperationDefinition, target: Object3D, params: OperationParams): void;
9
26
  /** The objects an effect acts on: 'self', object ids, narrowed to model nodes. */
10
27
  export declare function resolveEffectTargets(effect: OperationEffect, self?: Object3D | null): Object3D[];
11
28
  /**
@@ -14,6 +31,27 @@ export declare function resolveEffectTargets(effect: OperationEffect, self?: Obj
14
31
  * apply / revert / toggle explicit
15
32
  */
16
33
  export declare function runEffect(effect: OperationEffect, mode: 'trigger' | 'apply' | 'revert' | 'toggle', self?: Object3D | null): void;
34
+ /**
35
+ * Play an effect for the studio and put everything back: apply, wait for the run
36
+ * to REALLY finish (it may first compile its shaders in the background), hold a
37
+ * moment, revert and wait for that too. One-shot operations (spin, jelly, flip)
38
+ * just play; orbit plays and flies home. An effect that is already on is replayed
39
+ * (revert, then apply) so the scene ends as it was.
40
+ * Pressing play again on the same row — also after switching its operation —
41
+ * replaces the running preview: the old one is put back and the new one plays.
42
+ */
43
+ export declare function previewEffect(effect: OperationEffect, self?: Object3D | null): Promise<boolean>;
44
+ /** Preview several effects together (an interaction's "Try it"). */
45
+ export declare function previewEffects(effects: OperationEffect[], self?: Object3D | null): Promise<boolean>;
46
+ export declare const isPreviewing: (effectId: string) => boolean;
47
+ /**
48
+ * Compile an effect's shaders ahead of time, without showing anything, so its
49
+ * first real play starts instantly. Visual effects only (the others have no
50
+ * shaders). Runs one at a time, in the background; each (effect, target) once.
51
+ * Used when an effect is picked in the editor and, for every effect a scene's
52
+ * interactions and actions use, when the scene loads.
53
+ */
54
+ export declare function prewarmEffect(effect: OperationEffect, self?: Object3D | null): Promise<void>;
17
55
  /** Apply or undo an action's effects directly (the editor's "Try it"). */
18
56
  export declare function runActionEffects(action: ActionSequence, mode: 'apply' | 'revert'): void;
19
57
  export declare const areActionEffectsOn: (actionId: string) => boolean;