@3driseai/3drise-viewer 0.1.27 → 0.1.29

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 (690) hide show
  1. package/dist/animationsV2/ClipPlayer.d.ts.map +1 -1
  2. package/dist/animationsV2/ClipPlayer.js +13 -9
  3. package/dist/animationsV2/ClipsRuntime.d.ts +44 -3
  4. package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
  5. package/dist/animationsV2/ClipsRuntime.js +173 -55
  6. package/dist/animationsV2/appliers.d.ts.map +1 -1
  7. package/dist/animationsV2/appliers.js +21 -5
  8. package/dist/animationsV2/index.d.ts +1 -1
  9. package/dist/animationsV2/index.d.ts.map +1 -1
  10. package/dist/animationsV2/normalize.d.ts.map +1 -1
  11. package/dist/animationsV2/normalize.js +7 -3
  12. package/dist/animationsV2/sequenceUtils.d.ts +44 -6
  13. package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
  14. package/dist/animationsV2/sequenceUtils.js +58 -12
  15. package/dist/animationsV2/types.d.ts +22 -12
  16. package/dist/animationsV2/types.d.ts.map +1 -1
  17. package/dist/api/sceneHandle.d.ts +35 -1
  18. package/dist/api/sceneHandle.d.ts.map +1 -1
  19. package/dist/api/sceneHandle.js +88 -17
  20. package/dist/components/AdvancedGrid.d.ts +1 -5
  21. package/dist/components/AdvancedGrid.d.ts.map +1 -1
  22. package/dist/components/AdvancedGrid.js +6 -35
  23. package/dist/components/AnimatedObject.d.ts.map +1 -1
  24. package/dist/components/AnimatedObject.js +9 -4
  25. package/dist/components/ApollonianGrid.d.ts +25 -0
  26. package/dist/components/ApollonianGrid.d.ts.map +1 -0
  27. package/dist/components/ApollonianGrid.js +55 -0
  28. package/dist/components/ChladniGrid.d.ts +1 -1
  29. package/dist/components/ChladniGrid.d.ts.map +1 -1
  30. package/dist/components/ChladniGrid.js +6 -35
  31. package/dist/components/CircuitGrid.d.ts +1 -1
  32. package/dist/components/CircuitGrid.d.ts.map +1 -1
  33. package/dist/components/CircuitGrid.js +6 -34
  34. package/dist/components/ConformalGrid.d.ts +25 -0
  35. package/dist/components/ConformalGrid.d.ts.map +1 -0
  36. package/dist/components/ConformalGrid.js +66 -0
  37. package/dist/components/ContourGrid.d.ts +1 -1
  38. package/dist/components/ContourGrid.d.ts.map +1 -1
  39. package/dist/components/ContourGrid.js +6 -34
  40. package/dist/components/CustomPrimitive.js +1 -1
  41. package/dist/components/EnvironmentObject.d.ts.map +1 -1
  42. package/dist/components/EnvironmentObject.js +9 -7
  43. package/dist/components/FlowNetGrid.d.ts +1 -1
  44. package/dist/components/FlowNetGrid.d.ts.map +1 -1
  45. package/dist/components/FlowNetGrid.js +6 -34
  46. package/dist/components/FractalGrid.d.ts +1 -1
  47. package/dist/components/FractalGrid.d.ts.map +1 -1
  48. package/dist/components/FractalGrid.js +6 -37
  49. package/dist/components/Galaxy.d.ts.map +1 -1
  50. package/dist/components/Galaxy.js +9 -23
  51. package/dist/components/GirihGrid.d.ts +1 -1
  52. package/dist/components/GirihGrid.d.ts.map +1 -1
  53. package/dist/components/GirihGrid.js +6 -35
  54. package/dist/components/GravWaveGrid.d.ts +1 -1
  55. package/dist/components/GravWaveGrid.d.ts.map +1 -1
  56. package/dist/components/GravWaveGrid.js +6 -35
  57. package/dist/components/GridsGenerator.d.ts +2 -2
  58. package/dist/components/GridsGenerator.d.ts.map +1 -1
  59. package/dist/components/GridsGenerator.js +21 -0
  60. package/dist/components/HexGrid.d.ts +1 -5
  61. package/dist/components/HexGrid.d.ts.map +1 -1
  62. package/dist/components/HexGrid.js +6 -36
  63. package/dist/components/HilbertGrid.d.ts +25 -0
  64. package/dist/components/HilbertGrid.d.ts.map +1 -0
  65. package/dist/components/HilbertGrid.js +66 -0
  66. package/dist/components/HyperbolicGrid.d.ts +1 -1
  67. package/dist/components/HyperbolicGrid.d.ts.map +1 -1
  68. package/dist/components/HyperbolicGrid.js +6 -34
  69. package/dist/components/LandObject.d.ts +9 -0
  70. package/dist/components/LandObject.d.ts.map +1 -0
  71. package/dist/components/LandObject.js +15 -0
  72. package/dist/components/LensingGrid.d.ts +25 -0
  73. package/dist/components/LensingGrid.d.ts.map +1 -0
  74. package/dist/components/LensingGrid.js +55 -0
  75. package/dist/components/LightsManager.d.ts.map +1 -1
  76. package/dist/components/LightsManager.js +8 -0
  77. package/dist/components/ModelBoundary.d.ts +2 -0
  78. package/dist/components/ModelBoundary.d.ts.map +1 -1
  79. package/dist/components/ModelBoundary.js +3 -0
  80. package/dist/components/ModelPrimitive.d.ts.map +1 -1
  81. package/dist/components/ModelPrimitive.js +6 -0
  82. package/dist/components/MoireGrid.d.ts +1 -1
  83. package/dist/components/MoireGrid.d.ts.map +1 -1
  84. package/dist/components/MoireGrid.js +6 -35
  85. package/dist/components/MoonDisc.d.ts +11 -0
  86. package/dist/components/MoonDisc.d.ts.map +1 -0
  87. package/dist/components/MoonDisc.js +128 -0
  88. package/dist/components/ObjectNode.d.ts.map +1 -1
  89. package/dist/components/ObjectNode.js +15 -4
  90. package/dist/components/ObjectsRenderer.d.ts.map +1 -1
  91. package/dist/components/ObjectsRenderer.js +7 -5
  92. package/dist/components/OceanBuilder.d.ts.map +1 -1
  93. package/dist/components/OceanBuilder.js +2 -0
  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 +55 -0
  97. package/dist/components/PhyllotaxisGrid.d.ts +25 -0
  98. package/dist/components/PhyllotaxisGrid.d.ts.map +1 -0
  99. package/dist/components/PhyllotaxisGrid.js +66 -0
  100. package/dist/components/ProjectLoader.d.ts +5 -3
  101. package/dist/components/ProjectLoader.d.ts.map +1 -1
  102. package/dist/components/ProjectLoader.js +6 -3
  103. package/dist/components/QuasiGrid.d.ts +1 -1
  104. package/dist/components/QuasiGrid.d.ts.map +1 -1
  105. package/dist/components/QuasiGrid.js +6 -33
  106. package/dist/components/RadarGrid.d.ts +1 -1
  107. package/dist/components/RadarGrid.d.ts.map +1 -1
  108. package/dist/components/RadarGrid.js +6 -34
  109. package/dist/components/ReactionDiffusionGrid.d.ts +1 -1
  110. package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
  111. package/dist/components/ReactionDiffusionGrid.js +6 -35
  112. package/dist/components/SceneBuilder.d.ts +25 -3
  113. package/dist/components/SceneBuilder.d.ts.map +1 -1
  114. package/dist/components/SceneBuilder.js +68 -38
  115. package/dist/components/SkyController.d.ts +25 -1
  116. package/dist/components/SkyController.d.ts.map +1 -1
  117. package/dist/components/SkyController.js +189 -130
  118. package/dist/components/SkyMesh.d.ts.map +1 -1
  119. package/dist/components/SkyMesh.js +26 -1
  120. package/dist/components/SkyStars.d.ts +11 -0
  121. package/dist/components/SkyStars.d.ts.map +1 -0
  122. package/dist/components/SkyStars.js +187 -0
  123. package/dist/components/SkySystem.d.ts +3 -3
  124. package/dist/components/SkySystem.d.ts.map +1 -1
  125. package/dist/components/SkySystem.js +8 -2
  126. package/dist/components/Sun.d.ts +15 -1
  127. package/dist/components/Sun.d.ts.map +1 -1
  128. package/dist/components/Sun.js +64 -3
  129. package/dist/components/SunLight.d.ts +6 -1
  130. package/dist/components/SunLight.d.ts.map +1 -1
  131. package/dist/components/SunLight.js +96 -44
  132. package/dist/components/TerrainBuilder.d.ts.map +1 -1
  133. package/dist/components/TerrainBuilder.js +2 -0
  134. package/dist/components/TextGenerator.d.ts +9 -0
  135. package/dist/components/TextGenerator.d.ts.map +1 -0
  136. package/dist/components/TextGenerator.js +29 -0
  137. package/dist/components/TruchetGrid.d.ts +25 -0
  138. package/dist/components/TruchetGrid.d.ts.map +1 -0
  139. package/dist/components/TruchetGrid.js +55 -0
  140. package/dist/components/VoronoiGrid.d.ts +1 -1
  141. package/dist/components/VoronoiGrid.d.ts.map +1 -1
  142. package/dist/components/VoronoiGrid.js +6 -33
  143. package/dist/components/WallpaperGrid.d.ts +1 -1
  144. package/dist/components/WallpaperGrid.d.ts.map +1 -1
  145. package/dist/components/WallpaperGrid.js +6 -35
  146. package/dist/components/environment/Rain.d.ts +15 -0
  147. package/dist/components/environment/Rain.d.ts.map +1 -0
  148. package/dist/components/environment/Rain.js +110 -0
  149. package/dist/components/environment/Rainbow.d.ts +20 -0
  150. package/dist/components/environment/Rainbow.d.ts.map +1 -0
  151. package/dist/components/environment/Rainbow.js +974 -0
  152. package/dist/components/environment/Sandstorm.d.ts +20 -0
  153. package/dist/components/environment/Sandstorm.d.ts.map +1 -0
  154. package/dist/components/environment/Sandstorm.js +776 -0
  155. package/dist/components/environment/Snow.d.ts +20 -0
  156. package/dist/components/environment/Snow.d.ts.map +1 -0
  157. package/dist/components/environment/Snow.js +609 -0
  158. package/dist/components/environment/Thunderstorm.d.ts +20 -0
  159. package/dist/components/environment/Thunderstorm.d.ts.map +1 -0
  160. package/dist/components/environment/Thunderstorm.js +731 -0
  161. package/dist/components/environment/Tornado.d.ts +20 -0
  162. package/dist/components/environment/Tornado.d.ts.map +1 -0
  163. package/dist/components/environment/Tornado.js +762 -0
  164. package/dist/components/environment/index.d.ts +13 -0
  165. package/dist/components/environment/index.d.ts.map +1 -0
  166. package/dist/components/environment/index.js +7 -0
  167. package/dist/components/index.d.ts +24 -10
  168. package/dist/components/index.d.ts.map +1 -1
  169. package/dist/components/index.js +15 -6
  170. package/dist/components/land/LandPatch.d.ts +15 -0
  171. package/dist/components/land/LandPatch.d.ts.map +1 -0
  172. package/dist/components/land/LandPatch.js +170 -0
  173. package/dist/components/land/index.d.ts +3 -0
  174. package/dist/components/land/index.d.ts.map +1 -0
  175. package/dist/components/land/index.js +1 -0
  176. package/dist/components/space/Earth.d.ts +16 -0
  177. package/dist/components/space/Earth.d.ts.map +1 -0
  178. package/dist/components/space/Earth.js +75 -0
  179. package/dist/components/space/ShootingStar.d.ts +21 -0
  180. package/dist/components/space/ShootingStar.d.ts.map +1 -0
  181. package/dist/components/space/ShootingStar.js +101 -0
  182. package/dist/components/space/ShootingStars.d.ts +16 -0
  183. package/dist/components/space/ShootingStars.d.ts.map +1 -0
  184. package/dist/components/space/ShootingStars.js +71 -0
  185. package/dist/components/space/SolarSystem.d.ts +16 -0
  186. package/dist/components/space/SolarSystem.d.ts.map +1 -0
  187. package/dist/components/space/SolarSystem.js +141 -0
  188. package/dist/components/space/Stars.d.ts +20 -0
  189. package/dist/components/space/Stars.d.ts.map +1 -0
  190. package/dist/components/space/Stars.js +160 -0
  191. package/dist/components/space/index.d.ts +11 -0
  192. package/dist/components/space/index.d.ts.map +1 -0
  193. package/dist/components/space/index.js +8 -0
  194. package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
  195. package/dist/components/terrain/TerrainSurface.js +27 -3
  196. package/dist/components/terrain/types.d.ts +5 -1
  197. package/dist/components/terrain/types.d.ts.map +1 -1
  198. package/dist/components/text/BurnAwayText.d.ts +15 -0
  199. package/dist/components/text/BurnAwayText.d.ts.map +1 -0
  200. package/dist/components/text/BurnAwayText.js +4 -0
  201. package/dist/components/text/ChalkboardText.d.ts +15 -0
  202. package/dist/components/text/ChalkboardText.d.ts.map +1 -0
  203. package/dist/components/text/ChalkboardText.js +4 -0
  204. package/dist/components/text/ConstellationText.d.ts +15 -0
  205. package/dist/components/text/ConstellationText.d.ts.map +1 -0
  206. package/dist/components/text/ConstellationText.js +4 -0
  207. package/dist/components/text/EmbroideryText.d.ts +15 -0
  208. package/dist/components/text/EmbroideryText.d.ts.map +1 -0
  209. package/dist/components/text/EmbroideryText.js +4 -0
  210. package/dist/components/text/FourierSketchText.d.ts +15 -0
  211. package/dist/components/text/FourierSketchText.d.ts.map +1 -0
  212. package/dist/components/text/FourierSketchText.js +4 -0
  213. package/dist/components/text/FrostGrowthText.d.ts +15 -0
  214. package/dist/components/text/FrostGrowthText.d.ts.map +1 -0
  215. package/dist/components/text/FrostGrowthText.js +4 -0
  216. package/dist/components/text/HandwritingText.d.ts +15 -0
  217. package/dist/components/text/HandwritingText.d.ts.map +1 -0
  218. package/dist/components/text/HandwritingText.js +4 -0
  219. package/dist/components/text/InkBleedText.d.ts +15 -0
  220. package/dist/components/text/InkBleedText.d.ts.map +1 -0
  221. package/dist/components/text/InkBleedText.js +4 -0
  222. package/dist/components/text/LightPaintingText.d.ts +15 -0
  223. package/dist/components/text/LightPaintingText.d.ts.map +1 -0
  224. package/dist/components/text/LightPaintingText.js +4 -0
  225. package/dist/components/text/LiquidMetalText.d.ts +15 -0
  226. package/dist/components/text/LiquidMetalText.d.ts.map +1 -0
  227. package/dist/components/text/LiquidMetalText.js +4 -0
  228. package/dist/components/text/NeonTubeText.d.ts +15 -0
  229. package/dist/components/text/NeonTubeText.d.ts.map +1 -0
  230. package/dist/components/text/NeonTubeText.js +4 -0
  231. package/dist/components/text/PlasmaDischargeText.d.ts +15 -0
  232. package/dist/components/text/PlasmaDischargeText.d.ts.map +1 -0
  233. package/dist/components/text/PlasmaDischargeText.js +4 -0
  234. package/dist/components/text/TextObjectView.d.ts +12 -0
  235. package/dist/components/text/TextObjectView.d.ts.map +1 -0
  236. package/dist/components/text/TextObjectView.js +11 -0
  237. package/dist/components/text/engine/fieldkit.d.ts +24 -0
  238. package/dist/components/text/engine/fieldkit.d.ts.map +1 -0
  239. package/dist/components/text/engine/fieldkit.js +201 -0
  240. package/dist/components/text/engine/glyphs.d.ts +19 -0
  241. package/dist/components/text/engine/glyphs.d.ts.map +1 -0
  242. package/dist/components/text/engine/glyphs.js +269 -0
  243. package/dist/components/text/engine/looks/burnAway.d.ts +144 -0
  244. package/dist/components/text/engine/looks/burnAway.d.ts.map +1 -0
  245. package/dist/components/text/engine/looks/burnAway.js +593 -0
  246. package/dist/components/text/engine/looks/chalkboard.d.ts +135 -0
  247. package/dist/components/text/engine/looks/chalkboard.d.ts.map +1 -0
  248. package/dist/components/text/engine/looks/chalkboard.js +426 -0
  249. package/dist/components/text/engine/looks/constellation.d.ts +111 -0
  250. package/dist/components/text/engine/looks/constellation.d.ts.map +1 -0
  251. package/dist/components/text/engine/looks/constellation.js +496 -0
  252. package/dist/components/text/engine/looks/embroidery.d.ts +165 -0
  253. package/dist/components/text/engine/looks/embroidery.d.ts.map +1 -0
  254. package/dist/components/text/engine/looks/embroidery.js +645 -0
  255. package/dist/components/text/engine/looks/frostGrowth.d.ts +109 -0
  256. package/dist/components/text/engine/looks/frostGrowth.d.ts.map +1 -0
  257. package/dist/components/text/engine/looks/frostGrowth.js +727 -0
  258. package/dist/components/text/engine/looks/index.d.ts +2 -0
  259. package/dist/components/text/engine/looks/index.d.ts.map +1 -0
  260. package/dist/components/text/engine/looks/index.js +48 -0
  261. package/dist/components/text/engine/looks/inkBleed.d.ts +103 -0
  262. package/dist/components/text/engine/looks/inkBleed.d.ts.map +1 -0
  263. package/dist/components/text/engine/looks/inkBleed.js +590 -0
  264. package/dist/components/text/engine/looks/lightPainting.d.ts +132 -0
  265. package/dist/components/text/engine/looks/lightPainting.d.ts.map +1 -0
  266. package/dist/components/text/engine/looks/lightPainting.js +567 -0
  267. package/dist/components/text/engine/looks/liquidMetal.d.ts +135 -0
  268. package/dist/components/text/engine/looks/liquidMetal.d.ts.map +1 -0
  269. package/dist/components/text/engine/looks/liquidMetal.js +655 -0
  270. package/dist/components/text/engine/looks/plasmaDischarge.d.ts +126 -0
  271. package/dist/components/text/engine/looks/plasmaDischarge.d.ts.map +1 -0
  272. package/dist/components/text/engine/looks/plasmaDischarge.js +763 -0
  273. package/dist/components/text/engine/methods.d.ts +19 -0
  274. package/dist/components/text/engine/methods.d.ts.map +1 -0
  275. package/dist/components/text/engine/methods.js +126 -0
  276. package/dist/components/text/engine/playback.d.ts +40 -0
  277. package/dist/components/text/engine/playback.d.ts.map +1 -0
  278. package/dist/components/text/engine/playback.js +114 -0
  279. package/dist/components/text/engine/ribbon.d.ts +58 -0
  280. package/dist/components/text/engine/ribbon.d.ts.map +1 -0
  281. package/dist/components/text/engine/ribbon.js +250 -0
  282. package/dist/components/text/engine/variants.d.ts +159 -0
  283. package/dist/components/text/engine/variants.d.ts.map +1 -0
  284. package/dist/components/text/engine/variants.js +378 -0
  285. package/dist/components/text/fonts/architects-daughter.outline.d.ts +3 -0
  286. package/dist/components/text/fonts/architects-daughter.outline.d.ts.map +1 -0
  287. package/dist/components/text/fonts/architects-daughter.outline.js +4 -0
  288. package/dist/components/text/fonts/architects-daughter.strokes.d.ts +3 -0
  289. package/dist/components/text/fonts/architects-daughter.strokes.d.ts.map +1 -0
  290. package/dist/components/text/fonts/architects-daughter.strokes.js +4 -0
  291. package/dist/components/text/fonts/caveat.outline.d.ts +3 -0
  292. package/dist/components/text/fonts/caveat.outline.d.ts.map +1 -0
  293. package/dist/components/text/fonts/caveat.outline.js +4 -0
  294. package/dist/components/text/fonts/caveat.strokes.d.ts +3 -0
  295. package/dist/components/text/fonts/caveat.strokes.d.ts.map +1 -0
  296. package/dist/components/text/fonts/caveat.strokes.js +4 -0
  297. package/dist/components/text/fonts/courgette.outline.d.ts +3 -0
  298. package/dist/components/text/fonts/courgette.outline.d.ts.map +1 -0
  299. package/dist/components/text/fonts/courgette.outline.js +4 -0
  300. package/dist/components/text/fonts/courgette.strokes.d.ts +3 -0
  301. package/dist/components/text/fonts/courgette.strokes.d.ts.map +1 -0
  302. package/dist/components/text/fonts/courgette.strokes.js +4 -0
  303. package/dist/components/text/fonts/dancing-script.outline.d.ts +3 -0
  304. package/dist/components/text/fonts/dancing-script.outline.d.ts.map +1 -0
  305. package/dist/components/text/fonts/dancing-script.outline.js +4 -0
  306. package/dist/components/text/fonts/dancing-script.strokes.d.ts +3 -0
  307. package/dist/components/text/fonts/dancing-script.strokes.d.ts.map +1 -0
  308. package/dist/components/text/fonts/dancing-script.strokes.js +4 -0
  309. package/dist/components/text/fonts/gochi-hand.outline.d.ts +3 -0
  310. package/dist/components/text/fonts/gochi-hand.outline.d.ts.map +1 -0
  311. package/dist/components/text/fonts/gochi-hand.outline.js +4 -0
  312. package/dist/components/text/fonts/gochi-hand.strokes.d.ts +3 -0
  313. package/dist/components/text/fonts/gochi-hand.strokes.d.ts.map +1 -0
  314. package/dist/components/text/fonts/gochi-hand.strokes.js +4 -0
  315. package/dist/components/text/fonts/handlee.outline.d.ts +3 -0
  316. package/dist/components/text/fonts/handlee.outline.d.ts.map +1 -0
  317. package/dist/components/text/fonts/handlee.outline.js +4 -0
  318. package/dist/components/text/fonts/handlee.strokes.d.ts +3 -0
  319. package/dist/components/text/fonts/handlee.strokes.d.ts.map +1 -0
  320. package/dist/components/text/fonts/handlee.strokes.js +4 -0
  321. package/dist/components/text/fonts/index.d.ts +5 -0
  322. package/dist/components/text/fonts/index.d.ts.map +1 -0
  323. package/dist/components/text/fonts/index.js +44 -0
  324. package/dist/components/text/fonts/indie-flower.outline.d.ts +3 -0
  325. package/dist/components/text/fonts/indie-flower.outline.d.ts.map +1 -0
  326. package/dist/components/text/fonts/indie-flower.outline.js +4 -0
  327. package/dist/components/text/fonts/indie-flower.strokes.d.ts +3 -0
  328. package/dist/components/text/fonts/indie-flower.strokes.d.ts.map +1 -0
  329. package/dist/components/text/fonts/indie-flower.strokes.js +4 -0
  330. package/dist/components/text/fonts/kalam.outline.d.ts +3 -0
  331. package/dist/components/text/fonts/kalam.outline.d.ts.map +1 -0
  332. package/dist/components/text/fonts/kalam.outline.js +4 -0
  333. package/dist/components/text/fonts/kalam.strokes.d.ts +3 -0
  334. package/dist/components/text/fonts/kalam.strokes.d.ts.map +1 -0
  335. package/dist/components/text/fonts/kalam.strokes.js +4 -0
  336. package/dist/components/text/fonts/kaushan-script.outline.d.ts +3 -0
  337. package/dist/components/text/fonts/kaushan-script.outline.d.ts.map +1 -0
  338. package/dist/components/text/fonts/kaushan-script.outline.js +4 -0
  339. package/dist/components/text/fonts/kaushan-script.strokes.d.ts +3 -0
  340. package/dist/components/text/fonts/kaushan-script.strokes.d.ts.map +1 -0
  341. package/dist/components/text/fonts/kaushan-script.strokes.js +4 -0
  342. package/dist/components/text/fonts/mynerve.outline.d.ts +3 -0
  343. package/dist/components/text/fonts/mynerve.outline.d.ts.map +1 -0
  344. package/dist/components/text/fonts/mynerve.outline.js +4 -0
  345. package/dist/components/text/fonts/mynerve.strokes.d.ts +3 -0
  346. package/dist/components/text/fonts/mynerve.strokes.d.ts.map +1 -0
  347. package/dist/components/text/fonts/mynerve.strokes.js +4 -0
  348. package/dist/components/text/fonts/nanum-pen-script.outline.d.ts +3 -0
  349. package/dist/components/text/fonts/nanum-pen-script.outline.d.ts.map +1 -0
  350. package/dist/components/text/fonts/nanum-pen-script.outline.js +4 -0
  351. package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts +3 -0
  352. package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts.map +1 -0
  353. package/dist/components/text/fonts/nanum-pen-script.strokes.js +4 -0
  354. package/dist/components/text/fonts/pacifico.outline.d.ts +3 -0
  355. package/dist/components/text/fonts/pacifico.outline.d.ts.map +1 -0
  356. package/dist/components/text/fonts/pacifico.outline.js +4 -0
  357. package/dist/components/text/fonts/pacifico.strokes.d.ts +3 -0
  358. package/dist/components/text/fonts/pacifico.strokes.d.ts.map +1 -0
  359. package/dist/components/text/fonts/pacifico.strokes.js +4 -0
  360. package/dist/components/text/fonts/patrick-hand.outline.d.ts +3 -0
  361. package/dist/components/text/fonts/patrick-hand.outline.d.ts.map +1 -0
  362. package/dist/components/text/fonts/patrick-hand.outline.js +4 -0
  363. package/dist/components/text/fonts/patrick-hand.strokes.d.ts +3 -0
  364. package/dist/components/text/fonts/patrick-hand.strokes.d.ts.map +1 -0
  365. package/dist/components/text/fonts/patrick-hand.strokes.js +4 -0
  366. package/dist/components/text/fonts/poppins.outline.d.ts +3 -0
  367. package/dist/components/text/fonts/poppins.outline.d.ts.map +1 -0
  368. package/dist/components/text/fonts/poppins.outline.js +4 -0
  369. package/dist/components/text/fonts/poppins.strokes.d.ts +3 -0
  370. package/dist/components/text/fonts/poppins.strokes.d.ts.map +1 -0
  371. package/dist/components/text/fonts/poppins.strokes.js +4 -0
  372. package/dist/components/text/fonts/satisfy.outline.d.ts +3 -0
  373. package/dist/components/text/fonts/satisfy.outline.d.ts.map +1 -0
  374. package/dist/components/text/fonts/satisfy.outline.js +4 -0
  375. package/dist/components/text/fonts/satisfy.strokes.d.ts +3 -0
  376. package/dist/components/text/fonts/satisfy.strokes.d.ts.map +1 -0
  377. package/dist/components/text/fonts/satisfy.strokes.js +4 -0
  378. package/dist/components/text/fonts/sriracha.outline.d.ts +3 -0
  379. package/dist/components/text/fonts/sriracha.outline.d.ts.map +1 -0
  380. package/dist/components/text/fonts/sriracha.outline.js +4 -0
  381. package/dist/components/text/fonts/sriracha.strokes.d.ts +3 -0
  382. package/dist/components/text/fonts/sriracha.strokes.d.ts.map +1 -0
  383. package/dist/components/text/fonts/sriracha.strokes.js +4 -0
  384. package/dist/components/text/index.d.ts +27 -0
  385. package/dist/components/text/index.d.ts.map +1 -0
  386. package/dist/components/text/index.js +13 -0
  387. package/dist/components/text/useTextObject.d.ts +21 -0
  388. package/dist/components/text/useTextObject.d.ts.map +1 -0
  389. package/dist/components/text/useTextObject.js +118 -0
  390. package/dist/components/water/OceanSurface.d.ts.map +1 -1
  391. package/dist/components/water/OceanSurface.js +3 -1
  392. package/dist/components/water/WaterBody.d.ts.map +1 -1
  393. package/dist/components/water/WaterBody.js +3 -1
  394. package/dist/components/water/types.d.ts +5 -1
  395. package/dist/components/water/types.d.ts.map +1 -1
  396. package/dist/constants.d.ts +1 -1
  397. package/dist/constants.d.ts.map +1 -1
  398. package/dist/constants.js +5 -1
  399. package/dist/hooks/index.d.ts +2 -0
  400. package/dist/hooks/index.d.ts.map +1 -1
  401. package/dist/hooks/index.js +1 -0
  402. package/dist/hooks/useCloudSun.d.ts +9 -4
  403. package/dist/hooks/useCloudSun.d.ts.map +1 -1
  404. package/dist/hooks/useCloudSun.js +17 -7
  405. package/dist/hooks/useConfigLive.d.ts +3 -2
  406. package/dist/hooks/useConfigLive.d.ts.map +1 -1
  407. package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
  408. package/dist/hooks/useContinuousEffects.js +4 -10
  409. package/dist/hooks/useEnvironmentProbe.d.ts +3 -22
  410. package/dist/hooks/useEnvironmentProbe.d.ts.map +1 -1
  411. package/dist/hooks/useEnvironmentProbe.js +47 -8
  412. package/dist/hooks/useGridSurface.d.ts +3 -10
  413. package/dist/hooks/useGridSurface.d.ts.map +1 -1
  414. package/dist/hooks/useGridSurface.js +5 -31
  415. package/dist/hooks/useInteraction.d.ts.map +1 -1
  416. package/dist/hooks/useInteraction.js +19 -72
  417. package/dist/hooks/useLightConfig.d.ts +2 -1
  418. package/dist/hooks/useLightConfig.d.ts.map +1 -1
  419. package/dist/hooks/useOceanMaterial.d.ts +6 -2
  420. package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
  421. package/dist/hooks/useOceanMaterial.js +37 -2
  422. package/dist/hooks/useSkyLive.d.ts +23 -0
  423. package/dist/hooks/useSkyLive.d.ts.map +1 -0
  424. package/dist/hooks/useSkyLive.js +30 -0
  425. package/dist/hooks/useSkyUniforms.d.ts.map +1 -1
  426. package/dist/hooks/useSkyUniforms.js +2 -10
  427. package/dist/hooks/useTerrainLive.d.ts +3 -1
  428. package/dist/hooks/useTerrainLive.d.ts.map +1 -1
  429. package/dist/hooks/useTerrainTextures.d.ts +38 -0
  430. package/dist/hooks/useTerrainTextures.d.ts.map +1 -0
  431. package/dist/hooks/useTerrainTextures.js +149 -0
  432. package/dist/index.d.ts +11 -2
  433. package/dist/index.d.ts.map +1 -1
  434. package/dist/index.js +8 -1
  435. package/dist/operations/catalogue/blastOff.d.ts +3 -0
  436. package/dist/operations/catalogue/blastOff.d.ts.map +1 -0
  437. package/dist/operations/catalogue/blastOff.js +118 -0
  438. package/dist/operations/catalogue/bounce.d.ts +3 -0
  439. package/dist/operations/catalogue/bounce.d.ts.map +1 -0
  440. package/dist/operations/catalogue/bounce.js +34 -0
  441. package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -1
  442. package/dist/operations/catalogue/curlSmoke.js +3 -1
  443. package/dist/operations/catalogue/dissolve.d.ts.map +1 -1
  444. package/dist/operations/catalogue/dissolve.js +2 -1
  445. package/dist/operations/catalogue/driftUp.d.ts +3 -0
  446. package/dist/operations/catalogue/driftUp.d.ts.map +1 -0
  447. package/dist/operations/catalogue/driftUp.js +57 -0
  448. package/dist/operations/catalogue/emberAsh.d.ts.map +1 -1
  449. package/dist/operations/catalogue/emberAsh.js +2 -1
  450. package/dist/operations/catalogue/flip.d.ts.map +1 -1
  451. package/dist/operations/catalogue/flip.js +19 -9
  452. package/dist/operations/catalogue/float.d.ts +3 -0
  453. package/dist/operations/catalogue/float.d.ts.map +1 -0
  454. package/dist/operations/catalogue/float.js +39 -0
  455. package/dist/operations/catalogue/flyBy.d.ts +3 -0
  456. package/dist/operations/catalogue/flyBy.d.ts.map +1 -0
  457. package/dist/operations/catalogue/flyBy.js +79 -0
  458. package/dist/operations/catalogue/frost.d.ts.map +1 -1
  459. package/dist/operations/catalogue/frost.js +10 -3
  460. package/dist/operations/catalogue/grow.d.ts +3 -0
  461. package/dist/operations/catalogue/grow.d.ts.map +1 -0
  462. package/dist/operations/catalogue/grow.js +19 -0
  463. package/dist/operations/catalogue/hologram.d.ts.map +1 -1
  464. package/dist/operations/catalogue/hologram.js +11 -5
  465. package/dist/operations/catalogue/jelly.d.ts.map +1 -1
  466. package/dist/operations/catalogue/jelly.js +18 -8
  467. package/dist/operations/catalogue/knockAway.d.ts +3 -0
  468. package/dist/operations/catalogue/knockAway.d.ts.map +1 -0
  469. package/dist/operations/catalogue/knockAway.js +74 -0
  470. package/dist/operations/catalogue/leafFall.d.ts +3 -0
  471. package/dist/operations/catalogue/leafFall.d.ts.map +1 -0
  472. package/dist/operations/catalogue/leafFall.js +74 -0
  473. package/dist/operations/catalogue/lidarScan.d.ts.map +1 -1
  474. package/dist/operations/catalogue/lidarScan.js +4 -1
  475. package/dist/operations/catalogue/metalize.d.ts.map +1 -1
  476. package/dist/operations/catalogue/metalize.js +8 -2
  477. package/dist/operations/catalogue/motionTrail.d.ts +6 -0
  478. package/dist/operations/catalogue/motionTrail.d.ts.map +1 -0
  479. package/dist/operations/catalogue/motionTrail.js +221 -0
  480. package/dist/operations/catalogue/petrify.d.ts.map +1 -1
  481. package/dist/operations/catalogue/petrify.js +9 -3
  482. package/dist/operations/catalogue/physicalExit.d.ts +55 -0
  483. package/dist/operations/catalogue/physicalExit.d.ts.map +1 -0
  484. package/dist/operations/catalogue/physicalExit.js +165 -0
  485. package/dist/operations/catalogue/physicalHeld.d.ts +41 -0
  486. package/dist/operations/catalogue/physicalHeld.d.ts.map +1 -0
  487. package/dist/operations/catalogue/physicalHeld.js +78 -0
  488. package/dist/operations/catalogue/physicalMix.d.ts +45 -0
  489. package/dist/operations/catalogue/physicalMix.d.ts.map +1 -0
  490. package/dist/operations/catalogue/physicalMix.js +144 -0
  491. package/dist/operations/catalogue/pop.d.ts +3 -0
  492. package/dist/operations/catalogue/pop.d.ts.map +1 -0
  493. package/dist/operations/catalogue/pop.js +44 -0
  494. package/dist/operations/catalogue/print3d.d.ts.map +1 -1
  495. package/dist/operations/catalogue/print3d.js +5 -1
  496. package/dist/operations/catalogue/pulse.d.ts +3 -0
  497. package/dist/operations/catalogue/pulse.d.ts.map +1 -0
  498. package/dist/operations/catalogue/pulse.js +29 -0
  499. package/dist/operations/catalogue/restPose.d.ts +5 -7
  500. package/dist/operations/catalogue/restPose.d.ts.map +1 -1
  501. package/dist/operations/catalogue/restPose.js +18 -48
  502. package/dist/operations/catalogue/rotate.d.ts +3 -0
  503. package/dist/operations/catalogue/rotate.d.ts.map +1 -0
  504. package/dist/operations/catalogue/rotate.js +49 -0
  505. package/dist/operations/catalogue/shake.d.ts +3 -0
  506. package/dist/operations/catalogue/shake.d.ts.map +1 -0
  507. package/dist/operations/catalogue/shake.js +31 -0
  508. package/dist/operations/catalogue/shatter.d.ts.map +1 -1
  509. package/dist/operations/catalogue/shatter.js +5 -1
  510. package/dist/operations/catalogue/slam.d.ts +3 -0
  511. package/dist/operations/catalogue/slam.d.ts.map +1 -0
  512. package/dist/operations/catalogue/slam.js +89 -0
  513. package/dist/operations/catalogue/slingshot.d.ts +3 -0
  514. package/dist/operations/catalogue/slingshot.d.ts.map +1 -0
  515. package/dist/operations/catalogue/slingshot.js +88 -0
  516. package/dist/operations/catalogue/spin.d.ts.map +1 -1
  517. package/dist/operations/catalogue/spin.js +24 -13
  518. package/dist/operations/catalogue/sway.d.ts +3 -0
  519. package/dist/operations/catalogue/sway.d.ts.map +1 -0
  520. package/dist/operations/catalogue/sway.js +23 -0
  521. package/dist/operations/catalogue/swirl.d.ts.map +1 -1
  522. package/dist/operations/catalogue/swirl.js +6 -5
  523. package/dist/operations/catalogue/trailCore.d.ts +89 -0
  524. package/dist/operations/catalogue/trailCore.d.ts.map +1 -0
  525. package/dist/operations/catalogue/trailCore.js +190 -0
  526. package/dist/operations/catalogue/trailGhosts.d.ts +5 -0
  527. package/dist/operations/catalogue/trailGhosts.d.ts.map +1 -0
  528. package/dist/operations/catalogue/trailGhosts.js +179 -0
  529. package/dist/operations/catalogue/trailStampStyles.d.ts +11 -0
  530. package/dist/operations/catalogue/trailStampStyles.d.ts.map +1 -0
  531. package/dist/operations/catalogue/trailStampStyles.js +479 -0
  532. package/dist/operations/catalogue/trailStamps.d.ts +57 -0
  533. package/dist/operations/catalogue/trailStamps.d.ts.map +1 -0
  534. package/dist/operations/catalogue/trailStamps.js +349 -0
  535. package/dist/operations/catalogue/trailStreaks.d.ts +3 -0
  536. package/dist/operations/catalogue/trailStreaks.d.ts.map +1 -0
  537. package/dist/operations/catalogue/trailStreaks.js +147 -0
  538. package/dist/operations/catalogue/transitionField.d.ts +30 -0
  539. package/dist/operations/catalogue/transitionField.d.ts.map +1 -1
  540. package/dist/operations/catalogue/transitionField.js +21 -0
  541. package/dist/operations/catalogue/turnAway.d.ts +3 -0
  542. package/dist/operations/catalogue/turnAway.d.ts.map +1 -0
  543. package/dist/operations/catalogue/turnAway.js +54 -0
  544. package/dist/operations/catalogue/vortexDrain.d.ts +3 -0
  545. package/dist/operations/catalogue/vortexDrain.d.ts.map +1 -0
  546. package/dist/operations/catalogue/vortexDrain.js +68 -0
  547. package/dist/operations/catalogue/warp.d.ts +3 -0
  548. package/dist/operations/catalogue/warp.d.ts.map +1 -0
  549. package/dist/operations/catalogue/warp.js +73 -0
  550. package/dist/operations/catalogue/whoosh.d.ts +3 -0
  551. package/dist/operations/catalogue/whoosh.d.ts.map +1 -0
  552. package/dist/operations/catalogue/whoosh.js +84 -0
  553. package/dist/operations/catalogue/wobble.d.ts +3 -0
  554. package/dist/operations/catalogue/wobble.d.ts.map +1 -0
  555. package/dist/operations/catalogue/wobble.js +23 -0
  556. package/dist/operations/clipPreview.d.ts +3 -0
  557. package/dist/operations/clipPreview.d.ts.map +1 -0
  558. package/dist/operations/clipPreview.js +20 -0
  559. package/dist/operations/groupFanout.d.ts +96 -0
  560. package/dist/operations/groupFanout.d.ts.map +1 -0
  561. package/dist/operations/groupFanout.js +365 -0
  562. package/dist/operations/groups.d.ts +20 -0
  563. package/dist/operations/groups.d.ts.map +1 -0
  564. package/dist/operations/groups.js +66 -0
  565. package/dist/operations/index.d.ts +5 -2
  566. package/dist/operations/index.d.ts.map +1 -1
  567. package/dist/operations/index.js +5 -2
  568. package/dist/operations/objectEffects.d.ts +161 -6
  569. package/dist/operations/objectEffects.d.ts.map +1 -1
  570. package/dist/operations/objectEffects.js +1091 -17
  571. package/dist/operations/registry.d.ts.map +1 -1
  572. package/dist/operations/registry.js +24 -2
  573. package/dist/operations/runtime.d.ts +57 -2
  574. package/dist/operations/runtime.d.ts.map +1 -1
  575. package/dist/operations/runtime.js +161 -18
  576. package/dist/operations/types.d.ts +60 -3
  577. package/dist/operations/types.d.ts.map +1 -1
  578. package/dist/operations/types.js +5 -1
  579. package/dist/operations/useObjectEffectLayers.d.ts +2 -2
  580. package/dist/operations/useObjectEffectLayers.d.ts.map +1 -1
  581. package/dist/operations/useObjectEffectLayers.js +31 -10
  582. package/dist/operations/usePresentedVisibility.d.ts +10 -0
  583. package/dist/operations/usePresentedVisibility.d.ts.map +1 -0
  584. package/dist/operations/usePresentedVisibility.js +53 -0
  585. package/dist/presets/terrainBiomes.d.ts +67 -0
  586. package/dist/presets/terrainBiomes.d.ts.map +1 -0
  587. package/dist/presets/terrainBiomes.js +294 -0
  588. package/dist/presets/terrainPresets.d.ts +6 -0
  589. package/dist/presets/terrainPresets.d.ts.map +1 -1
  590. package/dist/presets/terrainPresets.js +26 -38
  591. package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
  592. package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
  593. package/dist/shaders/glsl/oceanCore.glsl.js +17 -0
  594. package/dist/shaders/glsl/surfaceCore.glsl.d.ts +21 -0
  595. package/dist/shaders/glsl/surfaceCore.glsl.d.ts.map +1 -0
  596. package/dist/shaders/glsl/surfaceCore.glsl.js +120 -0
  597. package/dist/shaders/glsl/terrainCore.glsl.d.ts +16 -3
  598. package/dist/shaders/glsl/terrainCore.glsl.d.ts.map +1 -1
  599. package/dist/shaders/glsl/terrainCore.glsl.js +266 -20
  600. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +2 -0
  601. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
  602. package/dist/shaders/ocean/OceanSurfaceMaterial.js +3 -0
  603. package/dist/shaders/terrain/TerrainMaterial.d.ts +17 -0
  604. package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
  605. package/dist/shaders/terrain/TerrainMaterial.js +107 -8
  606. package/dist/triggers/engine.d.ts +44 -0
  607. package/dist/triggers/engine.d.ts.map +1 -0
  608. package/dist/triggers/engine.js +165 -0
  609. package/dist/triggers/hosts/actions.d.ts +8 -0
  610. package/dist/triggers/hosts/actions.d.ts.map +1 -0
  611. package/dist/triggers/hosts/actions.js +22 -0
  612. package/dist/triggers/hosts/interactions.d.ts +6 -0
  613. package/dist/triggers/hosts/interactions.d.ts.map +1 -0
  614. package/dist/triggers/hosts/interactions.js +4 -0
  615. package/dist/triggers/hosts/timelineCues.d.ts +2 -0
  616. package/dist/triggers/hosts/timelineCues.d.ts.map +1 -0
  617. package/dist/triggers/hosts/timelineCues.js +22 -0
  618. package/dist/triggers/index.d.ts +13 -0
  619. package/dist/triggers/index.d.ts.map +1 -0
  620. package/dist/triggers/index.js +9 -0
  621. package/dist/triggers/kinds/action.d.ts +2 -0
  622. package/dist/triggers/kinds/action.d.ts.map +1 -0
  623. package/dist/triggers/kinds/action.js +31 -0
  624. package/dist/triggers/kinds/animations.d.ts +2 -0
  625. package/dist/triggers/kinds/animations.d.ts.map +1 -0
  626. package/dist/triggers/kinds/animations.js +75 -0
  627. package/dist/triggers/kinds/effects.d.ts +2 -0
  628. package/dist/triggers/kinds/effects.d.ts.map +1 -0
  629. package/dist/triggers/kinds/effects.js +27 -0
  630. package/dist/triggers/kinds/index.d.ts +4 -0
  631. package/dist/triggers/kinds/index.d.ts.map +1 -0
  632. package/dist/triggers/kinds/index.js +4 -0
  633. package/dist/triggers/log.d.ts +21 -0
  634. package/dist/triggers/log.d.ts.map +1 -0
  635. package/dist/triggers/log.js +43 -0
  636. package/dist/triggers/readiness.d.ts +40 -0
  637. package/dist/triggers/readiness.d.ts.map +1 -0
  638. package/dist/triggers/readiness.js +158 -0
  639. package/dist/triggers/registry.d.ts +41 -0
  640. package/dist/triggers/registry.d.ts.map +1 -0
  641. package/dist/triggers/registry.js +7 -0
  642. package/dist/types/gridConfigs.d.ts +117 -19
  643. package/dist/types/gridConfigs.d.ts.map +1 -1
  644. package/dist/types/index.d.ts +1 -1
  645. package/dist/types/index.d.ts.map +1 -1
  646. package/dist/ui/UiAnchorUpdater.d.ts +10 -0
  647. package/dist/ui/UiAnchorUpdater.d.ts.map +1 -0
  648. package/dist/ui/UiAnchorUpdater.js +111 -0
  649. package/dist/ui/UiLayers.d.ts +20 -0
  650. package/dist/ui/UiLayers.d.ts.map +1 -0
  651. package/dist/ui/UiLayers.js +57 -0
  652. package/dist/ui/index.d.ts +9 -0
  653. package/dist/ui/index.d.ts.map +1 -0
  654. package/dist/ui/index.js +6 -0
  655. package/dist/ui/uiAnchors.d.ts +21 -0
  656. package/dist/ui/uiAnchors.d.ts.map +1 -0
  657. package/dist/ui/uiAnchors.js +22 -0
  658. package/dist/ui/uiBaseStyles.d.ts +2 -0
  659. package/dist/ui/uiBaseStyles.d.ts.map +1 -0
  660. package/dist/ui/uiBaseStyles.js +100 -0
  661. package/dist/ui/uiBinder.d.ts +30 -0
  662. package/dist/ui/uiBinder.d.ts.map +1 -0
  663. package/dist/ui/uiBinder.js +344 -0
  664. package/dist/utils/configAnimations.d.ts.map +1 -1
  665. package/dist/utils/configAnimations.js +5 -1
  666. package/dist/utils/gridConfig.d.ts +1 -1
  667. package/dist/utils/gridConfig.d.ts.map +1 -1
  668. package/dist/utils/gridConfig.js +1 -1
  669. package/dist/utils/landPatch.d.ts +33 -0
  670. package/dist/utils/landPatch.d.ts.map +1 -0
  671. package/dist/utils/landPatch.js +114 -0
  672. package/dist/utils/renderedSky.d.ts +32 -0
  673. package/dist/utils/renderedSky.d.ts.map +1 -0
  674. package/dist/utils/renderedSky.js +57 -0
  675. package/dist/utils/skyMoon.d.ts +35 -0
  676. package/dist/utils/skyMoon.d.ts.map +1 -0
  677. package/dist/utils/skyMoon.js +41 -0
  678. package/dist/utils/terrainHeight.d.ts +4 -0
  679. package/dist/utils/terrainHeight.d.ts.map +1 -0
  680. package/dist/utils/terrainHeight.js +150 -0
  681. package/dist/utils/terrainTextureResolver.d.ts +18 -0
  682. package/dist/utils/terrainTextureResolver.d.ts.map +1 -0
  683. package/dist/utils/terrainTextureResolver.js +17 -0
  684. package/dist/utils/terrainUniforms.d.ts +17 -0
  685. package/dist/utils/terrainUniforms.d.ts.map +1 -1
  686. package/dist/utils/terrainUniforms.js +84 -0
  687. package/dist/utils/textureArrays.d.ts +29 -0
  688. package/dist/utils/textureArrays.d.ts.map +1 -0
  689. package/dist/utils/textureArrays.js +140 -0
  690. package/package.json +2 -2
@@ -1,7 +1,8 @@
1
1
  import * as THREE from 'three';
2
2
  import { extend } from '@react-three/fiber';
3
3
  import { skyLib } from '../glsl/cloudCore.glsl.js';
4
- import { terrainFull } from '../glsl/terrainCore.glsl.js';
4
+ import { terrainFull, terrainTextured } from '../glsl/terrainCore.glsl.js';
5
+ import { surfaceSampling } from '../glsl/surfaceCore.glsl.js';
5
6
  /**
6
7
  * The terrain surface material. Used by all four landforms — they are one height
7
8
  * field with different shaping operators, not four shaders.
@@ -57,6 +58,40 @@ varying float vCell;
57
58
  varying float vDist;
58
59
  varying float vShadow;
59
60
 
61
+ #ifdef TERRAIN_PATCH
62
+ // A land object. The mesh is a unit grid on XZ (-0.5..0.5) that the object's
63
+ // transform places, rotates and sizes. The field is sampled in terrain space —
64
+ // metres from the object's origin, plus the seed offset — so a wider footprint
65
+ // shows more land rather than stretching it, and the land rides with the object.
66
+ // Height comes back in terrain metres (elevation x scale.y) and is divided by
67
+ // scale.y on the way out, because the model matrix multiplies it back.
68
+ void main(){
69
+ vec2 tp = position.xz * u_patchSize + u_patchOffset;
70
+ float cellLod = u_patchCell;
71
+
72
+ vec2 grad;
73
+ float h = terrainSurfaceAt(tp, cellLod, grad);
74
+
75
+ vec3 wp = vec3(tp.x, h, tp.y);
76
+ float camDist = distance(wp, TERRAIN_CAM);
77
+ vShadow = terrainShadowAt(wp, terrainNormal(grad), cellLod, camDist);
78
+
79
+ vec3 transformed = vec3(position.x, (h - u_seaLevel) / max(u_scaleY, 1e-4), position.z);
80
+ vec3 objectNormal = vec3(0.0, 1.0, 0.0);
81
+ vec3 transformedNormal = normalMatrix * objectNormal;
82
+
83
+ vWorld = wp;
84
+ vCell = cellLod;
85
+ vDist = camDist;
86
+
87
+ vec4 mvPosition = modelViewMatrix * vec4(transformed, 1.0);
88
+ gl_Position = projectionMatrix * mvPosition;
89
+
90
+ #include <worldpos_vertex>
91
+ #include <shadowmap_vertex>
92
+ #include <fog_vertex>
93
+ }
94
+ #else
60
95
  void main(){
61
96
  // Geomorph. Across the outer band of each ring, odd vertices slide onto their
62
97
  // even neighbours, so by the ring boundary the edge polyline is EXACTLY the
@@ -118,6 +153,7 @@ void main(){
118
153
  #include <shadowmap_vertex>
119
154
  #include <fog_vertex>
120
155
  }
156
+ #endif
121
157
  `;
122
158
  const fragment = /* glsl */ `
123
159
  #include <common>
@@ -133,6 +169,10 @@ const fragment = /* glsl */ `
133
169
 
134
170
  ${skyLib}
135
171
  ${terrainFull}
172
+ #ifdef TERRAIN_TEXTURED
173
+ ${surfaceSampling}
174
+ #endif
175
+ ${terrainTextured}
136
176
 
137
177
  uniform float u_receiveShadows;
138
178
 
@@ -142,7 +182,7 @@ varying float vDist;
142
182
  varying float vShadow;
143
183
 
144
184
  void main(){
145
- vec3 viewDir = normalize(vWorld - cameraPosition);
185
+ vec3 viewDir = normalize(vWorld - TERRAIN_CAM);
146
186
 
147
187
  // The shading footprint. Finer than the mesh cell, because a ridge 5 km out
148
188
  // lands on a 256 m clipmap cell but still covers only a few pixels - clamping
@@ -159,9 +199,9 @@ void main(){
159
199
  // - a central difference would need four more, and this shader used to pay for
160
200
  // them on every pixel.
161
201
  vec2 grad;
162
- float shadeHeight = terrainSample(vWorld.xz, lod, grad);
163
- vec3 n = terrainNormal(grad);
164
- n = terrainDetailNormal(n, vWorld, vDist);
202
+ float shadeHeight = terrainSurfaceAt(vWorld.xz, lod, grad);
203
+ vec3 nBase = terrainNormal(grad);
204
+ vec3 n = terrainDetailNormal(nBase, vWorld, vDist);
165
205
 
166
206
  // Shade against the analytically evaluated surface, not the interpolated mesh
167
207
  // vertex. The mesh is a coarse approximation of this field and its height is
@@ -176,7 +216,39 @@ void main(){
176
216
  float slope = acos(clamp(n.y, -1.0, 1.0)) * 0.6366197724;
177
217
  float h01 = saturate((shadeHeight - u_seaLevel) / max(u_elevation, 1e-3));
178
218
 
179
- vec3 albedo = terrainAlbedo(surface, h01, slope);
219
+ vec4 layerW = terrainLayerWeights(h01, slope);
220
+ vec3 albedo = terrainAlbedo(surface, layerW);
221
+ float roughness = u_roughness;
222
+ float ao = 1.0;
223
+
224
+ #ifdef TERRAIN_TEXTURED
225
+ // World-position derivatives, taken HERE in uniform control flow: the layers a
226
+ // pixel samples are chosen per pixel, and dFdx inside that choice is undefined.
227
+ vec3 dpx = dFdx(vWorld);
228
+ vec3 dpy = dFdy(vWorld);
229
+ TerrainGrads grads = TerrainGrads(dpx.xz, dpy.xz, dpx.zy, dpy.zy, dpx.xy, dpy.xy);
230
+
231
+ // Textured near field, fading into the flat far colours past u_tDistance. Past
232
+ // the fade nothing is fetched, so the horizon costs what it always did.
233
+ float near = 1.0 - smoothstep(u_tDistance * 0.7, u_tDistance, vDist);
234
+ if (near > 0.001){
235
+ vec3 nearAlbedo;
236
+ vec3 nearN;
237
+ float nearRough;
238
+ float nearAo;
239
+ // Against the analytic normal WITHOUT the noise bump. The bump is the far
240
+ // field's stand-in for surface detail; up close the texture normals are the
241
+ // detail, and the two together read as bubble wrap under the grass.
242
+ terrainSurfaceNear(surface, nBase, layerW, grads, nearAlbedo, nearN, nearRough, nearAo);
243
+ albedo = mix(albedo, nearAlbedo * terrainMacro(surface), near);
244
+ n = normalize(mix(n, nearN, near));
245
+ // The scan's roughness only VARIES the terrain's own roughness. Taken raw,
246
+ // a granite or snow scan's low values put sharp highlights on every facet
247
+ // and the mountains read as wet plastic.
248
+ roughness = mix(roughness, clamp(u_roughness * (0.75 + 0.5 * nearRough), 0.35, 1.0), near);
249
+ ao = mix(1.0, nearAo, near);
250
+ }
251
+ #endif
180
252
 
181
253
  float selfShadow = mix(1.0, saturate(vShadow), saturate(u_sunShadow));
182
254
 
@@ -185,7 +257,7 @@ void main(){
185
257
  sceneShadow = mix(1.0, getShadowMask(), u_receiveShadows);
186
258
  #endif
187
259
 
188
- vec3 col = terrainLight(albedo, n, viewDir, selfShadow, sceneShadow);
260
+ vec3 col = terrainLight(albedo, n, viewDir, selfShadow, sceneShadow, roughness, ao);
189
261
  col = terrainAerial(col, viewDir, vDist, shadeHeight);
190
262
  col *= u_exposure;
191
263
 
@@ -220,6 +292,13 @@ export const terrainMaterialDefaults = {
220
292
  u_valleyWidth: 0.25,
221
293
  u_cellSize: 2,
222
294
  u_curvature: 1 / (2 * 6371000),
295
+ // Land objects only (TERRAIN_PATCH); set by applyLandPatchUniforms.
296
+ u_patchSize: new THREE.Vector2(1000, 1000),
297
+ u_patchOffset: new THREE.Vector2(0, 0),
298
+ u_edgeWidth: 100,
299
+ u_camTerrain: new THREE.Vector3(),
300
+ u_scaleY: 1,
301
+ u_patchCell: 4,
223
302
  u_lowColor: new THREE.Color('#3f5326'),
224
303
  u_midColor: new THREE.Color('#55663a'),
225
304
  u_rockColor: new THREE.Color('#7a7266'),
@@ -236,6 +315,19 @@ export const terrainMaterialDefaults = {
236
315
  u_detailFade: 1 / 900,
237
316
  u_roughness: 0.9,
238
317
  u_specular: 0.03,
318
+ // Ground textures. u_tFar is read with or without textures; the rest only
319
+ // when TERRAIN_TEXTURED is defined (see applyTerrainTextures).
320
+ u_tFar: [new THREE.Color('#3f5326'), new THREE.Color('#55663a'), new THREE.Color('#7a7266'), new THREE.Color('#8d9a6a')],
321
+ u_tColor: null,
322
+ u_tNormal: null,
323
+ u_tOrm: null,
324
+ u_tLayer: [0, 1, 2, 3].map(() => new THREE.Vector4(1 / 3, 1, 0, 0)),
325
+ u_tTint: [0, 1, 2, 3].map(() => new THREE.Color(1, 1, 1)),
326
+ u_tMeanC: [0, 1, 2, 3].map(() => new THREE.Vector4(0.5, 0.5, 0.5, 1)),
327
+ u_tMeanN: [0, 1, 2, 3].map(() => new THREE.Vector4(0.5, 0.5, 1, 0.5)),
328
+ u_tMeanO: [0, 1, 2, 3].map(() => new THREE.Vector4(1, 0.9, 0, 1)),
329
+ u_tDistance: 1500,
330
+ u_tHeightBlend: 0.7,
239
331
  u_ambient: 1,
240
332
  u_bounce: 0.35,
241
333
  u_sunShadow: 1,
@@ -263,11 +355,18 @@ function buildUniforms() {
263
355
  for (const [key, value] of Object.entries(terrainMaterialDefaults)) {
264
356
  own[key] = { value };
265
357
  }
266
- return THREE.UniformsUtils.merge([
358
+ const merged = THREE.UniformsUtils.merge([
267
359
  THREE.UniformsLib.lights,
268
360
  THREE.UniformsLib.fog,
269
361
  own,
270
362
  ]);
363
+ // cloneUniforms copies arrays with slice(), which keeps the SAME Color and
364
+ // Vector instances — every material would then write into the module-level
365
+ // defaults. The layer arrays are cloned element by element instead.
366
+ for (const key of ['u_tFar', 'u_tLayer', 'u_tTint', 'u_tMeanC', 'u_tMeanN', 'u_tMeanO']) {
367
+ merged[key].value = merged[key].value.map((v) => v.clone());
368
+ }
369
+ return merged;
271
370
  }
272
371
  /**
273
372
  * `UniformsUtils.merge` clones by `Uniform.clone()`, which deep-copies Colors and
@@ -0,0 +1,44 @@
1
+ import type { ActionSequence, SceneCommand, TriggerSource } from '@3driseai/3drise-core';
2
+ import type { AnimationClip, AnimationSequence } from '../animationsV2/types';
3
+ import type { ClipLookup } from '../animationsV2/sequenceUtils';
4
+ import { type TriggerContext } from './registry';
5
+ /** Where a command's refs (action / clip / sequence ids) are looked up. */
6
+ export interface TriggerCatalog {
7
+ action?(id: string): ActionSequence | undefined;
8
+ clip?(id: string): AnimationClip | undefined;
9
+ sequence?(id: string): AnimationSequence | undefined;
10
+ clips?(): ClipLookup;
11
+ }
12
+ export interface RunOptions {
13
+ source: TriggerSource;
14
+ self?: TriggerContext['self'];
15
+ /** Defaults to the chain of the command running now (a nested trigger), else none. */
16
+ chain?: TriggerSource[];
17
+ catalog?: TriggerCatalog;
18
+ effects?: boolean;
19
+ }
20
+ export type RunResult = 'ran' | 'queued' | 'waiting' | 'cycle' | 'refused' | 'unknown' | 'invalid';
21
+ export interface EngineContext extends TriggerContext {
22
+ catalog: TriggerCatalog;
23
+ }
24
+ export declare function registerTriggerCatalog(catalog: TriggerCatalog): () => void;
25
+ /**
26
+ * May a trigger of this host fire this kind at all? (The UI offers only what may run.)
27
+ * The full rule is checked on every run against the whole chain.
28
+ */
29
+ export declare function canTrigger(kind: string, host: TriggerSource['host']): boolean;
30
+ /** Is a stateful command's subject on now (an action applied, an effect clip / effect on)? */
31
+ export declare function isCommandOn(cmd: SceneCommand, self?: TriggerContext['self']): boolean;
32
+ /** Who switched this on (a kind's claim key), if the engine saw it. */
33
+ export declare const claimHolder: (key: string) => TriggerSource | undefined;
34
+ /** The chain a trigger fired from inside a running command gets. */
35
+ export declare function currentChain(): TriggerSource[];
36
+ export declare function runCommand(cmd: SceneCommand, opts: RunOptions): RunResult;
37
+ /**
38
+ * Record a clash the engine didn't run itself — e.g. a sequence cue that leaves an
39
+ * action alone because another source applied it.
40
+ */
41
+ export declare function noteClash(kind: SceneCommand['kind'], subject: string, source: TriggerSource, detail: string, claimKey?: string): void;
42
+ /** Forget every claim (the scene left the page). */
43
+ export declare function resetTriggerClaims(): void;
44
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/triggers/engine.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjE,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC3B,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IAChD,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;IACrD,KAAK,CAAC,IAAI,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,sFAAsF;IACtF,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnG,MAAM,WAAW,aAAc,SAAQ,cAAc;IACjD,OAAO,EAAE,cAAc,CAAC;CAC3B;AAmBD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,IAAI,CAG1E;AAYD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,CAI7E;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,OAAO,CAIrF;AAED,uEAAuE;AACvE,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,aAAa,GAAG,SAA4B,CAAC;AAEvF,oEAAoE;AACpE,wBAAgB,YAAY,IAAI,aAAa,EAAE,CAG9C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,CAiCzE;AA6CD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAGrI;AAED,oDAAoD;AACpD,wBAAgB,kBAAkB,IAAI,IAAI,CAAoB"}
@@ -0,0 +1,165 @@
1
+ import { findById } from '../utils/sceneQuery.js';
2
+ import { sceneReadiness } from './readiness.js';
3
+ import { getTriggerable } from './registry.js';
4
+ import { describeSource, logTrigger } from './log.js';
5
+ const TARGET_WAIT_MS = 8000;
6
+ const TARGET_POLL_MS = 100;
7
+ const same = (a, b) => a.host === b.host && a.id === b.id;
8
+ const isTimelineHost = (s) => s.host === 'sequence' || s.host === 'clip';
9
+ /** The commands running now, innermost last — nested triggers inherit their chain and catalog. */
10
+ const stack = [];
11
+ /** Stateful things that are on, and the source that switched them on. */
12
+ const claims = new Map();
13
+ const unknownLogged = new Set();
14
+ /**
15
+ * Catalogs the mounted scene registers (its actions, clips, sequences) — used when a command
16
+ * comes with none of its own (an action applied from a studio button, a nested trigger…).
17
+ */
18
+ const registered = [];
19
+ export function registerTriggerCatalog(catalog) {
20
+ registered.push(catalog);
21
+ return () => { const i = registered.lastIndexOf(catalog); if (i >= 0)
22
+ registered.splice(i, 1); };
23
+ }
24
+ const firstOf = (pick) => {
25
+ for (let i = registered.length - 1; i >= 0; i--) {
26
+ const v = pick(registered[i]);
27
+ if (v !== undefined)
28
+ return v;
29
+ }
30
+ return undefined;
31
+ };
32
+ const SCENE_CATALOG = {
33
+ action: (id) => firstOf(c => c.action?.(id)),
34
+ clip: (id) => firstOf(c => c.clip?.(id)),
35
+ sequence: (id) => firstOf(c => c.sequence?.(id)),
36
+ clips: () => firstOf(c => c.clips?.()) ?? new Map(),
37
+ };
38
+ /**
39
+ * May a trigger of this host fire this kind at all? (The UI offers only what may run.)
40
+ * The full rule is checked on every run against the whole chain.
41
+ */
42
+ export function canTrigger(kind, host) {
43
+ const def = getTriggerable(kind);
44
+ if (!def)
45
+ return false;
46
+ return !(def.isTimeline && (host === 'sequence' || host === 'clip'));
47
+ }
48
+ /** Is a stateful command's subject on now (an action applied, an effect clip / effect on)? */
49
+ export function isCommandOn(cmd, self) {
50
+ const def = getTriggerable(cmd?.kind);
51
+ if (!def?.isOn)
52
+ return false;
53
+ return safe(() => def.isOn(cmd, { source: { host: 'code', id: '' }, chain: [], self }), false);
54
+ }
55
+ /** Who switched this on (a kind's claim key), if the engine saw it. */
56
+ export const claimHolder = (key) => claims.get(key);
57
+ /** The chain a trigger fired from inside a running command gets. */
58
+ export function currentChain() {
59
+ const top = stack[stack.length - 1];
60
+ return top ? [...top.chain, top.source] : [];
61
+ }
62
+ export function runCommand(cmd, opts) {
63
+ if (!cmd || typeof cmd !== 'object' || !cmd.kind)
64
+ return 'invalid';
65
+ const top = stack[stack.length - 1];
66
+ const ctx = {
67
+ source: opts.source,
68
+ chain: opts.chain ?? currentChain(),
69
+ self: opts.self,
70
+ effects: opts.effects,
71
+ catalog: opts.catalog ?? top?.catalog ?? SCENE_CATALOG,
72
+ };
73
+ const def = getTriggerable(cmd.kind);
74
+ if (!def) {
75
+ if (!unknownLogged.has(cmd.kind)) {
76
+ unknownLogged.add(cmd.kind);
77
+ logTrigger({ type: 'unknown', kind: cmd.kind, source: ctx.source, chain: ctx.chain, detail: 'this viewer does not know this kind (a newer project?) — skipped' });
78
+ }
79
+ return 'unknown';
80
+ }
81
+ const subject = safe(() => def.subject(cmd), '');
82
+ if (ctx.chain.some(s => same(s, ctx.source))) {
83
+ logTrigger({ type: 'cycle', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain, detail: `${describeSource(ctx.source)} is already in the chain — stopped` });
84
+ return 'cycle';
85
+ }
86
+ if (def.isTimeline && [...ctx.chain, ctx.source].some(isTimelineHost)) {
87
+ logTrigger({ type: 'refused', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain, detail: 'a timeline cannot trigger a timeline' });
88
+ return 'refused';
89
+ }
90
+ if (!sceneReadiness.isReady()) {
91
+ logTrigger({ type: 'queued', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain });
92
+ sceneReadiness.whenReady(() => { startWhenMounted(cmd, def, ctx, subject); });
93
+ return 'queued';
94
+ }
95
+ return startWhenMounted(cmd, def, ctx, subject);
96
+ }
97
+ function startWhenMounted(cmd, def, ctx, subject) {
98
+ const missing = () => (def.targets ? safe(() => def.targets(cmd), []) : []).filter(id => id && id !== 'self' && !findById(id));
99
+ if (!missing().length) {
100
+ execute(cmd, def, ctx, subject);
101
+ return 'ran';
102
+ }
103
+ logTrigger({ type: 'waiting', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain, detail: `targets not in the scene yet: ${missing().join(', ')}` });
104
+ const until = Date.now() + TARGET_WAIT_MS;
105
+ const timer = setInterval(() => {
106
+ const still = missing();
107
+ if (still.length && Date.now() < until)
108
+ return;
109
+ clearInterval(timer);
110
+ if (still.length)
111
+ logTrigger({ type: 'timeout', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain, detail: `targets never mounted: ${still.join(', ')} — ran anyway` });
112
+ execute(cmd, def, ctx, subject);
113
+ }, TARGET_POLL_MS);
114
+ return 'waiting';
115
+ }
116
+ function execute(cmd, def, ctx, subject) {
117
+ const key = def.claimKey ? safe(() => def.claimKey(cmd), null) : null;
118
+ const wasOn = key && def.isOn ? safe(() => def.isOn(cmd, ctx), false) : false;
119
+ stack.push(ctx);
120
+ try {
121
+ def.run(cmd, ctx);
122
+ }
123
+ catch (e) {
124
+ console.error(`[3drise] triggers: ${cmd.kind} "${subject}" failed`, e);
125
+ }
126
+ finally {
127
+ stack.pop();
128
+ }
129
+ logTrigger({ type: 'run', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain, detail: cmd.command });
130
+ if (!key || !def.isOn)
131
+ return;
132
+ const nowOn = safe(() => def.isOn(cmd, ctx), false);
133
+ if (!wasOn && nowOn) {
134
+ claims.set(key, ctx.source);
135
+ logTrigger({ type: 'claim', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain });
136
+ }
137
+ else if (wasOn && !nowOn) {
138
+ const holder = claims.get(key);
139
+ claims.delete(key);
140
+ if (holder && !same(holder, ctx.source)) {
141
+ logTrigger({ type: 'clash', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain, detail: `switched off what ${describeSource(holder)} switched on` });
142
+ }
143
+ else {
144
+ logTrigger({ type: 'release', kind: cmd.kind, subject, source: ctx.source, chain: ctx.chain });
145
+ }
146
+ }
147
+ }
148
+ /**
149
+ * Record a clash the engine didn't run itself — e.g. a sequence cue that leaves an
150
+ * action alone because another source applied it.
151
+ */
152
+ export function noteClash(kind, subject, source, detail, claimKey) {
153
+ const holder = claimKey ? claims.get(claimKey) : undefined;
154
+ logTrigger({ type: 'clash', kind, subject, source, chain: currentChain(), detail: holder ? `${detail} (held by ${describeSource(holder)})` : detail });
155
+ }
156
+ /** Forget every claim (the scene left the page). */
157
+ export function resetTriggerClaims() { claims.clear(); }
158
+ function safe(fn, fallback) {
159
+ try {
160
+ return fn();
161
+ }
162
+ catch {
163
+ return fallback;
164
+ }
165
+ }
@@ -0,0 +1,8 @@
1
+ import type { ActionSequence, OperationEffect, SceneCommand } from '@3driseai/3drise-core';
2
+ /** An action's commands, in the order they run. */
3
+ export declare const actionCommandsOf: (action: Partial<ActionSequence> | null | undefined) => SceneCommand[];
4
+ /** The effects among an action's commands (to pre-warm their shaders). */
5
+ export declare const actionEffectsOf: (action: Partial<ActionSequence> | null | undefined) => OperationEffect[];
6
+ /** Switch an action's commands on (apply) or off (revert). */
7
+ export declare function runActionCommands(action: ActionSequence, mode: 'apply' | 'revert'): void;
8
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/triggers/hosts/actions.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG3F,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,EACrC,CAAC;AAE9D,0EAA0E;AAC1E,eAAO,MAAM,eAAe,GAAI,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,eAAe,EAClB,CAAC;AAEnF,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAUxF"}
@@ -0,0 +1,22 @@
1
+ import { runCommand } from '../engine.js';
2
+ /** An action's commands, in the order they run. */
3
+ export const actionCommandsOf = (action) => (Array.isArray(action?.commands) ? action.commands : []);
4
+ /** The effects among an action's commands (to pre-warm their shaders). */
5
+ export const actionEffectsOf = (action) => actionCommandsOf(action).flatMap(c => (c.kind === 'effect' ? [c.effect] : []));
6
+ /** Switch an action's commands on (apply) or off (revert). */
7
+ export function runActionCommands(action, mode) {
8
+ const source = { host: 'action', id: action.id };
9
+ const list = actionCommandsOf(action);
10
+ for (const c of mode === 'revert' ? [...list].reverse() : list) {
11
+ if (c.kind === 'effect')
12
+ runCommand({ ...c, command: mode }, { source });
13
+ else if (c.kind === 'effectClip')
14
+ runCommand({ ...c, command: mode }, { source });
15
+ else if (c.kind === 'action')
16
+ runCommand({ ...c, command: mode }, { source });
17
+ else if (mode === 'apply')
18
+ runCommand(c, { source });
19
+ else if (c.command === 'play' || c.command === 'toggle')
20
+ runCommand({ ...c, command: 'stop', options: undefined }, { source });
21
+ }
22
+ }
@@ -0,0 +1,6 @@
1
+ import type { Interaction, SceneCommand } from '@3driseai/3drise-core';
2
+ /** An interaction's commands, in the order they run. */
3
+ export declare const commandsOf: (interaction: Partial<Interaction> | null | undefined) => SceneCommand[];
4
+ /** The effects among an interaction's commands (to pre-warm their shaders). */
5
+ export declare const effectsOf: (interaction: Partial<Interaction> | null | undefined) => import("@3driseai/3drise-core").OperationEffect[];
6
+ //# sourceMappingURL=interactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["../../../src/triggers/hosts/interactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEvE,wDAAwD;AACxD,eAAO,MAAM,UAAU,GAAI,aAAa,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,EACvB,CAAC;AAExE,+EAA+E;AAC/E,eAAO,MAAM,SAAS,GAAI,aAAa,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,sDACG,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** An interaction's commands, in the order they run. */
2
+ export const commandsOf = (interaction) => (Array.isArray(interaction?.commands) ? interaction.commands : []);
3
+ /** The effects among an interaction's commands (to pre-warm their shaders). */
4
+ export const effectsOf = (interaction) => commandsOf(interaction).flatMap(c => (c.kind === 'effect' ? [c.effect] : []));
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=timelineCues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timelineCues.d.ts","sourceRoot":"","sources":["../../../src/triggers/hosts/timelineCues.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ // Trigger host: clip and sequence cues. ClipsRuntime decides WHEN (lane state at the
2
+ // playhead, or a forward crossing for fire cues); the switch itself runs through the
3
+ // engine with the timeline as its source. A timeline can't start a timeline — the engine
4
+ // refuses animation commands from here (and the UI doesn't offer them).
5
+ import ClipsRuntime from '../../animationsV2/ClipsRuntime.js';
6
+ import { isCommandOn, noteClash, runCommand } from '../engine.js';
7
+ import { getTriggerable } from '../registry.js';
8
+ ClipsRuntime.setCueRunner((cmd, mode, { effects, host, timelineId, getAction }) => {
9
+ const source = { host, id: timelineId };
10
+ const catalog = getAction ? { action: getAction } : undefined;
11
+ if (mode === 'apply' && isCommandOn(cmd)) {
12
+ const def = getTriggerable(cmd.kind);
13
+ noteClash(cmd.kind, def ? def.subject(cmd) : '', source, 'a cue wanted it on but it was already on — left alone (the timeline will not switch it off)', def?.claimKey ? (def.claimKey(cmd) ?? undefined) : undefined);
14
+ return false;
15
+ }
16
+ // fire: one-shot — an effect plays (apply), anything else runs its own command
17
+ const run = mode === 'fire'
18
+ ? (cmd.kind === 'effect' ? { ...cmd, command: 'apply' } : cmd)
19
+ : cmd.kind === 'effect' || cmd.kind === 'effectClip' || cmd.kind === 'action' ? { ...cmd, command: mode } : cmd;
20
+ runCommand(run, { source, chain: [], effects, ...(catalog ? { catalog } : {}) });
21
+ return true;
22
+ });
@@ -0,0 +1,13 @@
1
+ import './kinds';
2
+ import './hosts/timelineCues';
3
+ export { commandsOf, effectsOf } from './hosts/interactions';
4
+ export { actionCommandsOf, actionEffectsOf, runActionCommands } from './hosts/actions';
5
+ export { runCommand, canTrigger, isCommandOn, registerTriggerCatalog, currentChain, claimHolder, noteClash, resetTriggerClaims } from './engine';
6
+ export type { TriggerCatalog, RunOptions as RunCommandOptions, RunResult as RunCommandResult } from './engine';
7
+ export { defineTriggerable, getTriggerable, triggerableKinds } from './registry';
8
+ export type { Triggerable, TriggerContext } from './registry';
9
+ export { getTriggerLog, onTriggerLog, clearTriggerLog } from './log';
10
+ export type { TriggerLogEntry, TriggerLogType } from './log';
11
+ export { sceneReadiness, useSceneReady } from './readiness';
12
+ export type { SceneReadinessStatus } from './readiness';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/triggers/index.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,CAAC;AACjB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACjJ,YAAY,EAAE,cAAc,EAAE,UAAU,IAAI,iBAAiB,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ // The triggers engine (see engine.ts and the project doc claude/triggers-engine-plan.md).
2
+ import './kinds/index.js';
3
+ import './hosts/timelineCues.js';
4
+ export { commandsOf, effectsOf } from './hosts/interactions.js';
5
+ export { actionCommandsOf, actionEffectsOf, runActionCommands } from './hosts/actions.js';
6
+ export { runCommand, canTrigger, isCommandOn, registerTriggerCatalog, currentChain, claimHolder, noteClash, resetTriggerClaims } from './engine.js';
7
+ export { defineTriggerable, getTriggerable, triggerableKinds } from './registry.js';
8
+ export { getTriggerLog, onTriggerLog, clearTriggerLog } from './log.js';
9
+ export { sceneReadiness, useSceneReady } from './readiness.js';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/triggers/kinds/action.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ // Triggerable: an action (SceneActions). Its own effects then run through the engine
2
+ // too (operations/runtime runActionEffects), with this command's chain.
3
+ import { SceneActions } from '@3driseai/3drise-core';
4
+ import { defineTriggerable } from '../registry.js';
5
+ defineTriggerable({
6
+ kind: 'action',
7
+ commands: ['apply', 'revert', 'toggle'],
8
+ timeline: 'state',
9
+ subject: (c) => c.ref,
10
+ claimKey: (c) => `action:${c.ref}`,
11
+ isOn: (c) => SceneActions.isActionApplied(c.ref),
12
+ run: (c, ctx) => {
13
+ const action = ctx.catalog?.action?.(c.ref);
14
+ if (!action) {
15
+ // not in this scene's list: revert by id still works (it was applied with its definition)
16
+ if (c.command === 'revert' || (c.command === 'toggle' && SceneActions.isActionApplied(c.ref)))
17
+ SceneActions.revertAction(c.ref);
18
+ return;
19
+ }
20
+ if (c.command === 'revert')
21
+ SceneActions.revertAction(action);
22
+ else if (c.command === 'toggle') {
23
+ if (SceneActions.isActionApplied(action.id))
24
+ SceneActions.revertAction(action.id);
25
+ else
26
+ SceneActions.applyAction(action, { effects: ctx.effects !== false });
27
+ }
28
+ else
29
+ SceneActions.applyAction(action, { effects: ctx.effects !== false });
30
+ },
31
+ });
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=animations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../src/triggers/kinds/animations.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ // Triggerables: an animation clip and an animation sequence (ClipsRuntime).
2
+ // The interaction semantics moved here unchanged:
3
+ // play resume when paused part-way, else from the start (a sequence: from the start edge of its direction)
4
+ // toggle forward, then back, … (back = the opposite of a sequence's own reverse)
5
+ // pause / stop
6
+ // A command with `options` (code: from / speed / reverse) plays exactly with those.
7
+ import ClipsRuntime from '../../animationsV2/ClipsRuntime.js';
8
+ import { clipMap } from '../../animationsV2/sequenceUtils.js';
9
+ import { defineTriggerable } from '../registry.js';
10
+ /** Animation ids whose last toggle went forward. */
11
+ const toggled = new Set();
12
+ const nextIsBack = (key) => {
13
+ const back = toggled.has(key);
14
+ if (back)
15
+ toggled.delete(key);
16
+ else
17
+ toggled.add(key);
18
+ return back;
19
+ };
20
+ defineTriggerable({
21
+ kind: 'animationClip',
22
+ commands: ['play', 'pause', 'stop', 'toggle'],
23
+ timeline: 'event',
24
+ isTimeline: true,
25
+ subject: (c) => c.ref,
26
+ run: (c, ctx) => {
27
+ const clip = ctx.catalog?.clip?.(c.ref);
28
+ if (!clip)
29
+ return;
30
+ if (c.command === 'pause')
31
+ ClipsRuntime.pause(clip.id);
32
+ else if (c.command === 'stop')
33
+ ClipsRuntime.stop(clip.id);
34
+ else if (c.command === 'toggle')
35
+ ClipsRuntime.play(clip, { reverse: nextIsBack(`clip:${clip.id}`) });
36
+ else if (c.options)
37
+ ClipsRuntime.play(clip, c.options);
38
+ else if (ClipsRuntime.isActive(clip.id) && !ClipsRuntime.isPlaying(clip.id) && ClipsRuntime.getTime(clip.id) < clip.duration)
39
+ ClipsRuntime.resume(clip.id);
40
+ else
41
+ ClipsRuntime.play(clip, { from: 0 });
42
+ },
43
+ });
44
+ defineTriggerable({
45
+ kind: 'animationSequence',
46
+ commands: ['play', 'pause', 'stop', 'toggle'],
47
+ timeline: 'event',
48
+ isTimeline: true,
49
+ subject: (c) => c.ref,
50
+ run: (c, ctx) => {
51
+ const cat = ctx.catalog;
52
+ const seq = cat?.sequence?.(c.ref);
53
+ if (!seq)
54
+ return;
55
+ const clips = cat?.clips?.() ?? clipMap([]);
56
+ if (c.command === 'pause')
57
+ ClipsRuntime.pauseSequence(seq.id);
58
+ else if (c.command === 'stop')
59
+ ClipsRuntime.stopSequence(seq.id);
60
+ else if (c.command === 'toggle') {
61
+ const back = nextIsBack(`seq:${seq.id}`);
62
+ ClipsRuntime.playSequence(seq, clips, { reverse: back ? !seq.reverse : seq.reverse });
63
+ }
64
+ else if (c.options) {
65
+ ClipsRuntime.playSequence(seq, clips, c.options);
66
+ }
67
+ else if (ClipsRuntime.isSequenceActive(seq.id) && !ClipsRuntime.isSequencePlaying(seq.id) && ClipsRuntime.getSequenceProgress(seq.id) < 1) {
68
+ ClipsRuntime.resumeSequence(seq.id);
69
+ }
70
+ else {
71
+ const total = ClipsRuntime.getSequenceDuration(seq.id);
72
+ ClipsRuntime.playSequence(seq, clips, { from: seq.reverse && total > 0 ? total : 0 });
73
+ }
74
+ },
75
+ });
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=effects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../../src/triggers/kinds/effects.ts"],"names":[],"mappings":""}