@3driseai/3drise-viewer 0.1.28 → 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 (684) 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 +1 -1
  26. package/dist/components/ApollonianGrid.d.ts.map +1 -1
  27. package/dist/components/ApollonianGrid.js +3 -28
  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 +1 -1
  35. package/dist/components/ConformalGrid.d.ts.map +1 -1
  36. package/dist/components/ConformalGrid.js +3 -34
  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/HexGrid.d.ts +1 -5
  58. package/dist/components/HexGrid.d.ts.map +1 -1
  59. package/dist/components/HexGrid.js +6 -36
  60. package/dist/components/HilbertGrid.d.ts +1 -1
  61. package/dist/components/HilbertGrid.d.ts.map +1 -1
  62. package/dist/components/HilbertGrid.js +3 -30
  63. package/dist/components/HyperbolicGrid.d.ts +1 -1
  64. package/dist/components/HyperbolicGrid.d.ts.map +1 -1
  65. package/dist/components/HyperbolicGrid.js +6 -34
  66. package/dist/components/LandObject.d.ts +9 -0
  67. package/dist/components/LandObject.d.ts.map +1 -0
  68. package/dist/components/LandObject.js +15 -0
  69. package/dist/components/LensingGrid.d.ts +1 -1
  70. package/dist/components/LensingGrid.d.ts.map +1 -1
  71. package/dist/components/LensingGrid.js +3 -29
  72. package/dist/components/LightsManager.d.ts.map +1 -1
  73. package/dist/components/LightsManager.js +8 -0
  74. package/dist/components/ModelBoundary.d.ts +2 -0
  75. package/dist/components/ModelBoundary.d.ts.map +1 -1
  76. package/dist/components/ModelBoundary.js +3 -0
  77. package/dist/components/ModelPrimitive.d.ts.map +1 -1
  78. package/dist/components/ModelPrimitive.js +6 -0
  79. package/dist/components/MoireGrid.d.ts +1 -1
  80. package/dist/components/MoireGrid.d.ts.map +1 -1
  81. package/dist/components/MoireGrid.js +6 -35
  82. package/dist/components/MoonDisc.d.ts +11 -0
  83. package/dist/components/MoonDisc.d.ts.map +1 -0
  84. package/dist/components/MoonDisc.js +128 -0
  85. package/dist/components/ObjectNode.d.ts.map +1 -1
  86. package/dist/components/ObjectNode.js +15 -4
  87. package/dist/components/ObjectsRenderer.d.ts.map +1 -1
  88. package/dist/components/ObjectsRenderer.js +7 -5
  89. package/dist/components/OceanBuilder.d.ts.map +1 -1
  90. package/dist/components/OceanBuilder.js +2 -0
  91. package/dist/components/ParastichyGrid.d.ts +1 -1
  92. package/dist/components/ParastichyGrid.d.ts.map +1 -1
  93. package/dist/components/ParastichyGrid.js +3 -30
  94. package/dist/components/PhyllotaxisGrid.d.ts +1 -1
  95. package/dist/components/PhyllotaxisGrid.d.ts.map +1 -1
  96. package/dist/components/PhyllotaxisGrid.js +3 -32
  97. package/dist/components/ProjectLoader.d.ts +5 -3
  98. package/dist/components/ProjectLoader.d.ts.map +1 -1
  99. package/dist/components/ProjectLoader.js +6 -3
  100. package/dist/components/QuasiGrid.d.ts +1 -1
  101. package/dist/components/QuasiGrid.d.ts.map +1 -1
  102. package/dist/components/QuasiGrid.js +6 -33
  103. package/dist/components/RadarGrid.d.ts +1 -1
  104. package/dist/components/RadarGrid.d.ts.map +1 -1
  105. package/dist/components/RadarGrid.js +6 -34
  106. package/dist/components/ReactionDiffusionGrid.d.ts +1 -1
  107. package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
  108. package/dist/components/ReactionDiffusionGrid.js +6 -35
  109. package/dist/components/SceneBuilder.d.ts +25 -3
  110. package/dist/components/SceneBuilder.d.ts.map +1 -1
  111. package/dist/components/SceneBuilder.js +68 -38
  112. package/dist/components/SkyController.d.ts +25 -1
  113. package/dist/components/SkyController.d.ts.map +1 -1
  114. package/dist/components/SkyController.js +189 -130
  115. package/dist/components/SkyMesh.d.ts.map +1 -1
  116. package/dist/components/SkyMesh.js +26 -1
  117. package/dist/components/SkyStars.d.ts +11 -0
  118. package/dist/components/SkyStars.d.ts.map +1 -0
  119. package/dist/components/SkyStars.js +187 -0
  120. package/dist/components/SkySystem.d.ts +3 -3
  121. package/dist/components/SkySystem.d.ts.map +1 -1
  122. package/dist/components/SkySystem.js +8 -2
  123. package/dist/components/Sun.d.ts +15 -1
  124. package/dist/components/Sun.d.ts.map +1 -1
  125. package/dist/components/Sun.js +64 -3
  126. package/dist/components/SunLight.d.ts +6 -1
  127. package/dist/components/SunLight.d.ts.map +1 -1
  128. package/dist/components/SunLight.js +96 -44
  129. package/dist/components/TerrainBuilder.d.ts.map +1 -1
  130. package/dist/components/TerrainBuilder.js +2 -0
  131. package/dist/components/TextGenerator.d.ts +9 -0
  132. package/dist/components/TextGenerator.d.ts.map +1 -0
  133. package/dist/components/TextGenerator.js +29 -0
  134. package/dist/components/TruchetGrid.d.ts +1 -1
  135. package/dist/components/TruchetGrid.d.ts.map +1 -1
  136. package/dist/components/TruchetGrid.js +3 -30
  137. package/dist/components/VoronoiGrid.d.ts +1 -1
  138. package/dist/components/VoronoiGrid.d.ts.map +1 -1
  139. package/dist/components/VoronoiGrid.js +6 -33
  140. package/dist/components/WallpaperGrid.d.ts +1 -1
  141. package/dist/components/WallpaperGrid.d.ts.map +1 -1
  142. package/dist/components/WallpaperGrid.js +6 -35
  143. package/dist/components/environment/Rain.d.ts +15 -0
  144. package/dist/components/environment/Rain.d.ts.map +1 -0
  145. package/dist/components/environment/Rain.js +110 -0
  146. package/dist/components/environment/Rainbow.d.ts +20 -0
  147. package/dist/components/environment/Rainbow.d.ts.map +1 -0
  148. package/dist/components/environment/Rainbow.js +974 -0
  149. package/dist/components/environment/Sandstorm.d.ts +20 -0
  150. package/dist/components/environment/Sandstorm.d.ts.map +1 -0
  151. package/dist/components/environment/Sandstorm.js +776 -0
  152. package/dist/components/environment/Snow.d.ts +20 -0
  153. package/dist/components/environment/Snow.d.ts.map +1 -0
  154. package/dist/components/environment/Snow.js +609 -0
  155. package/dist/components/environment/Thunderstorm.d.ts +20 -0
  156. package/dist/components/environment/Thunderstorm.d.ts.map +1 -0
  157. package/dist/components/environment/Thunderstorm.js +731 -0
  158. package/dist/components/environment/Tornado.d.ts +20 -0
  159. package/dist/components/environment/Tornado.d.ts.map +1 -0
  160. package/dist/components/environment/Tornado.js +762 -0
  161. package/dist/components/environment/index.d.ts +13 -0
  162. package/dist/components/environment/index.d.ts.map +1 -0
  163. package/dist/components/environment/index.js +7 -0
  164. package/dist/components/index.d.ts +10 -10
  165. package/dist/components/index.d.ts.map +1 -1
  166. package/dist/components/index.js +8 -6
  167. package/dist/components/land/LandPatch.d.ts +15 -0
  168. package/dist/components/land/LandPatch.d.ts.map +1 -0
  169. package/dist/components/land/LandPatch.js +170 -0
  170. package/dist/components/land/index.d.ts +3 -0
  171. package/dist/components/land/index.d.ts.map +1 -0
  172. package/dist/components/land/index.js +1 -0
  173. package/dist/components/space/Earth.d.ts +16 -0
  174. package/dist/components/space/Earth.d.ts.map +1 -0
  175. package/dist/components/space/Earth.js +75 -0
  176. package/dist/components/space/ShootingStar.d.ts +21 -0
  177. package/dist/components/space/ShootingStar.d.ts.map +1 -0
  178. package/dist/components/space/ShootingStar.js +101 -0
  179. package/dist/components/space/ShootingStars.d.ts +16 -0
  180. package/dist/components/space/ShootingStars.d.ts.map +1 -0
  181. package/dist/components/space/ShootingStars.js +71 -0
  182. package/dist/components/space/SolarSystem.d.ts +16 -0
  183. package/dist/components/space/SolarSystem.d.ts.map +1 -0
  184. package/dist/components/space/SolarSystem.js +141 -0
  185. package/dist/components/space/Stars.d.ts +20 -0
  186. package/dist/components/space/Stars.d.ts.map +1 -0
  187. package/dist/components/space/Stars.js +160 -0
  188. package/dist/components/space/index.d.ts +11 -0
  189. package/dist/components/space/index.d.ts.map +1 -0
  190. package/dist/components/space/index.js +8 -0
  191. package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
  192. package/dist/components/terrain/TerrainSurface.js +27 -3
  193. package/dist/components/terrain/types.d.ts +5 -1
  194. package/dist/components/terrain/types.d.ts.map +1 -1
  195. package/dist/components/text/BurnAwayText.d.ts +15 -0
  196. package/dist/components/text/BurnAwayText.d.ts.map +1 -0
  197. package/dist/components/text/BurnAwayText.js +4 -0
  198. package/dist/components/text/ChalkboardText.d.ts +15 -0
  199. package/dist/components/text/ChalkboardText.d.ts.map +1 -0
  200. package/dist/components/text/ChalkboardText.js +4 -0
  201. package/dist/components/text/ConstellationText.d.ts +15 -0
  202. package/dist/components/text/ConstellationText.d.ts.map +1 -0
  203. package/dist/components/text/ConstellationText.js +4 -0
  204. package/dist/components/text/EmbroideryText.d.ts +15 -0
  205. package/dist/components/text/EmbroideryText.d.ts.map +1 -0
  206. package/dist/components/text/EmbroideryText.js +4 -0
  207. package/dist/components/text/FourierSketchText.d.ts +15 -0
  208. package/dist/components/text/FourierSketchText.d.ts.map +1 -0
  209. package/dist/components/text/FourierSketchText.js +4 -0
  210. package/dist/components/text/FrostGrowthText.d.ts +15 -0
  211. package/dist/components/text/FrostGrowthText.d.ts.map +1 -0
  212. package/dist/components/text/FrostGrowthText.js +4 -0
  213. package/dist/components/text/HandwritingText.d.ts +15 -0
  214. package/dist/components/text/HandwritingText.d.ts.map +1 -0
  215. package/dist/components/text/HandwritingText.js +4 -0
  216. package/dist/components/text/InkBleedText.d.ts +15 -0
  217. package/dist/components/text/InkBleedText.d.ts.map +1 -0
  218. package/dist/components/text/InkBleedText.js +4 -0
  219. package/dist/components/text/LightPaintingText.d.ts +15 -0
  220. package/dist/components/text/LightPaintingText.d.ts.map +1 -0
  221. package/dist/components/text/LightPaintingText.js +4 -0
  222. package/dist/components/text/LiquidMetalText.d.ts +15 -0
  223. package/dist/components/text/LiquidMetalText.d.ts.map +1 -0
  224. package/dist/components/text/LiquidMetalText.js +4 -0
  225. package/dist/components/text/NeonTubeText.d.ts +15 -0
  226. package/dist/components/text/NeonTubeText.d.ts.map +1 -0
  227. package/dist/components/text/NeonTubeText.js +4 -0
  228. package/dist/components/text/PlasmaDischargeText.d.ts +15 -0
  229. package/dist/components/text/PlasmaDischargeText.d.ts.map +1 -0
  230. package/dist/components/text/PlasmaDischargeText.js +4 -0
  231. package/dist/components/text/TextObjectView.d.ts +12 -0
  232. package/dist/components/text/TextObjectView.d.ts.map +1 -0
  233. package/dist/components/text/TextObjectView.js +11 -0
  234. package/dist/components/text/engine/fieldkit.d.ts +24 -0
  235. package/dist/components/text/engine/fieldkit.d.ts.map +1 -0
  236. package/dist/components/text/engine/fieldkit.js +201 -0
  237. package/dist/components/text/engine/glyphs.d.ts +19 -0
  238. package/dist/components/text/engine/glyphs.d.ts.map +1 -0
  239. package/dist/components/text/engine/glyphs.js +269 -0
  240. package/dist/components/text/engine/looks/burnAway.d.ts +144 -0
  241. package/dist/components/text/engine/looks/burnAway.d.ts.map +1 -0
  242. package/dist/components/text/engine/looks/burnAway.js +593 -0
  243. package/dist/components/text/engine/looks/chalkboard.d.ts +135 -0
  244. package/dist/components/text/engine/looks/chalkboard.d.ts.map +1 -0
  245. package/dist/components/text/engine/looks/chalkboard.js +426 -0
  246. package/dist/components/text/engine/looks/constellation.d.ts +111 -0
  247. package/dist/components/text/engine/looks/constellation.d.ts.map +1 -0
  248. package/dist/components/text/engine/looks/constellation.js +496 -0
  249. package/dist/components/text/engine/looks/embroidery.d.ts +165 -0
  250. package/dist/components/text/engine/looks/embroidery.d.ts.map +1 -0
  251. package/dist/components/text/engine/looks/embroidery.js +645 -0
  252. package/dist/components/text/engine/looks/frostGrowth.d.ts +109 -0
  253. package/dist/components/text/engine/looks/frostGrowth.d.ts.map +1 -0
  254. package/dist/components/text/engine/looks/frostGrowth.js +727 -0
  255. package/dist/components/text/engine/looks/index.d.ts +2 -0
  256. package/dist/components/text/engine/looks/index.d.ts.map +1 -0
  257. package/dist/components/text/engine/looks/index.js +48 -0
  258. package/dist/components/text/engine/looks/inkBleed.d.ts +103 -0
  259. package/dist/components/text/engine/looks/inkBleed.d.ts.map +1 -0
  260. package/dist/components/text/engine/looks/inkBleed.js +590 -0
  261. package/dist/components/text/engine/looks/lightPainting.d.ts +132 -0
  262. package/dist/components/text/engine/looks/lightPainting.d.ts.map +1 -0
  263. package/dist/components/text/engine/looks/lightPainting.js +567 -0
  264. package/dist/components/text/engine/looks/liquidMetal.d.ts +135 -0
  265. package/dist/components/text/engine/looks/liquidMetal.d.ts.map +1 -0
  266. package/dist/components/text/engine/looks/liquidMetal.js +655 -0
  267. package/dist/components/text/engine/looks/plasmaDischarge.d.ts +126 -0
  268. package/dist/components/text/engine/looks/plasmaDischarge.d.ts.map +1 -0
  269. package/dist/components/text/engine/looks/plasmaDischarge.js +763 -0
  270. package/dist/components/text/engine/methods.d.ts +19 -0
  271. package/dist/components/text/engine/methods.d.ts.map +1 -0
  272. package/dist/components/text/engine/methods.js +126 -0
  273. package/dist/components/text/engine/playback.d.ts +40 -0
  274. package/dist/components/text/engine/playback.d.ts.map +1 -0
  275. package/dist/components/text/engine/playback.js +114 -0
  276. package/dist/components/text/engine/ribbon.d.ts +58 -0
  277. package/dist/components/text/engine/ribbon.d.ts.map +1 -0
  278. package/dist/components/text/engine/ribbon.js +250 -0
  279. package/dist/components/text/engine/variants.d.ts +159 -0
  280. package/dist/components/text/engine/variants.d.ts.map +1 -0
  281. package/dist/components/text/engine/variants.js +378 -0
  282. package/dist/components/text/fonts/architects-daughter.outline.d.ts +3 -0
  283. package/dist/components/text/fonts/architects-daughter.outline.d.ts.map +1 -0
  284. package/dist/components/text/fonts/architects-daughter.outline.js +4 -0
  285. package/dist/components/text/fonts/architects-daughter.strokes.d.ts +3 -0
  286. package/dist/components/text/fonts/architects-daughter.strokes.d.ts.map +1 -0
  287. package/dist/components/text/fonts/architects-daughter.strokes.js +4 -0
  288. package/dist/components/text/fonts/caveat.outline.d.ts +3 -0
  289. package/dist/components/text/fonts/caveat.outline.d.ts.map +1 -0
  290. package/dist/components/text/fonts/caveat.outline.js +4 -0
  291. package/dist/components/text/fonts/caveat.strokes.d.ts +3 -0
  292. package/dist/components/text/fonts/caveat.strokes.d.ts.map +1 -0
  293. package/dist/components/text/fonts/caveat.strokes.js +4 -0
  294. package/dist/components/text/fonts/courgette.outline.d.ts +3 -0
  295. package/dist/components/text/fonts/courgette.outline.d.ts.map +1 -0
  296. package/dist/components/text/fonts/courgette.outline.js +4 -0
  297. package/dist/components/text/fonts/courgette.strokes.d.ts +3 -0
  298. package/dist/components/text/fonts/courgette.strokes.d.ts.map +1 -0
  299. package/dist/components/text/fonts/courgette.strokes.js +4 -0
  300. package/dist/components/text/fonts/dancing-script.outline.d.ts +3 -0
  301. package/dist/components/text/fonts/dancing-script.outline.d.ts.map +1 -0
  302. package/dist/components/text/fonts/dancing-script.outline.js +4 -0
  303. package/dist/components/text/fonts/dancing-script.strokes.d.ts +3 -0
  304. package/dist/components/text/fonts/dancing-script.strokes.d.ts.map +1 -0
  305. package/dist/components/text/fonts/dancing-script.strokes.js +4 -0
  306. package/dist/components/text/fonts/gochi-hand.outline.d.ts +3 -0
  307. package/dist/components/text/fonts/gochi-hand.outline.d.ts.map +1 -0
  308. package/dist/components/text/fonts/gochi-hand.outline.js +4 -0
  309. package/dist/components/text/fonts/gochi-hand.strokes.d.ts +3 -0
  310. package/dist/components/text/fonts/gochi-hand.strokes.d.ts.map +1 -0
  311. package/dist/components/text/fonts/gochi-hand.strokes.js +4 -0
  312. package/dist/components/text/fonts/handlee.outline.d.ts +3 -0
  313. package/dist/components/text/fonts/handlee.outline.d.ts.map +1 -0
  314. package/dist/components/text/fonts/handlee.outline.js +4 -0
  315. package/dist/components/text/fonts/handlee.strokes.d.ts +3 -0
  316. package/dist/components/text/fonts/handlee.strokes.d.ts.map +1 -0
  317. package/dist/components/text/fonts/handlee.strokes.js +4 -0
  318. package/dist/components/text/fonts/index.d.ts +5 -0
  319. package/dist/components/text/fonts/index.d.ts.map +1 -0
  320. package/dist/components/text/fonts/index.js +44 -0
  321. package/dist/components/text/fonts/indie-flower.outline.d.ts +3 -0
  322. package/dist/components/text/fonts/indie-flower.outline.d.ts.map +1 -0
  323. package/dist/components/text/fonts/indie-flower.outline.js +4 -0
  324. package/dist/components/text/fonts/indie-flower.strokes.d.ts +3 -0
  325. package/dist/components/text/fonts/indie-flower.strokes.d.ts.map +1 -0
  326. package/dist/components/text/fonts/indie-flower.strokes.js +4 -0
  327. package/dist/components/text/fonts/kalam.outline.d.ts +3 -0
  328. package/dist/components/text/fonts/kalam.outline.d.ts.map +1 -0
  329. package/dist/components/text/fonts/kalam.outline.js +4 -0
  330. package/dist/components/text/fonts/kalam.strokes.d.ts +3 -0
  331. package/dist/components/text/fonts/kalam.strokes.d.ts.map +1 -0
  332. package/dist/components/text/fonts/kalam.strokes.js +4 -0
  333. package/dist/components/text/fonts/kaushan-script.outline.d.ts +3 -0
  334. package/dist/components/text/fonts/kaushan-script.outline.d.ts.map +1 -0
  335. package/dist/components/text/fonts/kaushan-script.outline.js +4 -0
  336. package/dist/components/text/fonts/kaushan-script.strokes.d.ts +3 -0
  337. package/dist/components/text/fonts/kaushan-script.strokes.d.ts.map +1 -0
  338. package/dist/components/text/fonts/kaushan-script.strokes.js +4 -0
  339. package/dist/components/text/fonts/mynerve.outline.d.ts +3 -0
  340. package/dist/components/text/fonts/mynerve.outline.d.ts.map +1 -0
  341. package/dist/components/text/fonts/mynerve.outline.js +4 -0
  342. package/dist/components/text/fonts/mynerve.strokes.d.ts +3 -0
  343. package/dist/components/text/fonts/mynerve.strokes.d.ts.map +1 -0
  344. package/dist/components/text/fonts/mynerve.strokes.js +4 -0
  345. package/dist/components/text/fonts/nanum-pen-script.outline.d.ts +3 -0
  346. package/dist/components/text/fonts/nanum-pen-script.outline.d.ts.map +1 -0
  347. package/dist/components/text/fonts/nanum-pen-script.outline.js +4 -0
  348. package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts +3 -0
  349. package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts.map +1 -0
  350. package/dist/components/text/fonts/nanum-pen-script.strokes.js +4 -0
  351. package/dist/components/text/fonts/pacifico.outline.d.ts +3 -0
  352. package/dist/components/text/fonts/pacifico.outline.d.ts.map +1 -0
  353. package/dist/components/text/fonts/pacifico.outline.js +4 -0
  354. package/dist/components/text/fonts/pacifico.strokes.d.ts +3 -0
  355. package/dist/components/text/fonts/pacifico.strokes.d.ts.map +1 -0
  356. package/dist/components/text/fonts/pacifico.strokes.js +4 -0
  357. package/dist/components/text/fonts/patrick-hand.outline.d.ts +3 -0
  358. package/dist/components/text/fonts/patrick-hand.outline.d.ts.map +1 -0
  359. package/dist/components/text/fonts/patrick-hand.outline.js +4 -0
  360. package/dist/components/text/fonts/patrick-hand.strokes.d.ts +3 -0
  361. package/dist/components/text/fonts/patrick-hand.strokes.d.ts.map +1 -0
  362. package/dist/components/text/fonts/patrick-hand.strokes.js +4 -0
  363. package/dist/components/text/fonts/poppins.outline.d.ts +3 -0
  364. package/dist/components/text/fonts/poppins.outline.d.ts.map +1 -0
  365. package/dist/components/text/fonts/poppins.outline.js +4 -0
  366. package/dist/components/text/fonts/poppins.strokes.d.ts +3 -0
  367. package/dist/components/text/fonts/poppins.strokes.d.ts.map +1 -0
  368. package/dist/components/text/fonts/poppins.strokes.js +4 -0
  369. package/dist/components/text/fonts/satisfy.outline.d.ts +3 -0
  370. package/dist/components/text/fonts/satisfy.outline.d.ts.map +1 -0
  371. package/dist/components/text/fonts/satisfy.outline.js +4 -0
  372. package/dist/components/text/fonts/satisfy.strokes.d.ts +3 -0
  373. package/dist/components/text/fonts/satisfy.strokes.d.ts.map +1 -0
  374. package/dist/components/text/fonts/satisfy.strokes.js +4 -0
  375. package/dist/components/text/fonts/sriracha.outline.d.ts +3 -0
  376. package/dist/components/text/fonts/sriracha.outline.d.ts.map +1 -0
  377. package/dist/components/text/fonts/sriracha.outline.js +4 -0
  378. package/dist/components/text/fonts/sriracha.strokes.d.ts +3 -0
  379. package/dist/components/text/fonts/sriracha.strokes.d.ts.map +1 -0
  380. package/dist/components/text/fonts/sriracha.strokes.js +4 -0
  381. package/dist/components/text/index.d.ts +27 -0
  382. package/dist/components/text/index.d.ts.map +1 -0
  383. package/dist/components/text/index.js +13 -0
  384. package/dist/components/text/useTextObject.d.ts +21 -0
  385. package/dist/components/text/useTextObject.d.ts.map +1 -0
  386. package/dist/components/text/useTextObject.js +118 -0
  387. package/dist/components/water/OceanSurface.d.ts.map +1 -1
  388. package/dist/components/water/OceanSurface.js +3 -1
  389. package/dist/components/water/WaterBody.d.ts.map +1 -1
  390. package/dist/components/water/WaterBody.js +3 -1
  391. package/dist/components/water/types.d.ts +5 -1
  392. package/dist/components/water/types.d.ts.map +1 -1
  393. package/dist/constants.d.ts.map +1 -1
  394. package/dist/constants.js +4 -0
  395. package/dist/hooks/index.d.ts +2 -0
  396. package/dist/hooks/index.d.ts.map +1 -1
  397. package/dist/hooks/index.js +1 -0
  398. package/dist/hooks/useCloudSun.d.ts +9 -4
  399. package/dist/hooks/useCloudSun.d.ts.map +1 -1
  400. package/dist/hooks/useCloudSun.js +17 -7
  401. package/dist/hooks/useConfigLive.d.ts +3 -2
  402. package/dist/hooks/useConfigLive.d.ts.map +1 -1
  403. package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
  404. package/dist/hooks/useContinuousEffects.js +4 -10
  405. package/dist/hooks/useEnvironmentProbe.d.ts +3 -22
  406. package/dist/hooks/useEnvironmentProbe.d.ts.map +1 -1
  407. package/dist/hooks/useEnvironmentProbe.js +47 -8
  408. package/dist/hooks/useGridSurface.d.ts +3 -10
  409. package/dist/hooks/useGridSurface.d.ts.map +1 -1
  410. package/dist/hooks/useGridSurface.js +5 -31
  411. package/dist/hooks/useInteraction.d.ts.map +1 -1
  412. package/dist/hooks/useInteraction.js +19 -72
  413. package/dist/hooks/useLightConfig.d.ts +2 -1
  414. package/dist/hooks/useLightConfig.d.ts.map +1 -1
  415. package/dist/hooks/useOceanMaterial.d.ts +6 -2
  416. package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
  417. package/dist/hooks/useOceanMaterial.js +37 -2
  418. package/dist/hooks/useSkyLive.d.ts +23 -0
  419. package/dist/hooks/useSkyLive.d.ts.map +1 -0
  420. package/dist/hooks/useSkyLive.js +30 -0
  421. package/dist/hooks/useSkyUniforms.d.ts.map +1 -1
  422. package/dist/hooks/useSkyUniforms.js +2 -10
  423. package/dist/hooks/useTerrainLive.d.ts +3 -1
  424. package/dist/hooks/useTerrainLive.d.ts.map +1 -1
  425. package/dist/hooks/useTerrainTextures.d.ts +38 -0
  426. package/dist/hooks/useTerrainTextures.d.ts.map +1 -0
  427. package/dist/hooks/useTerrainTextures.js +149 -0
  428. package/dist/index.d.ts +11 -2
  429. package/dist/index.d.ts.map +1 -1
  430. package/dist/index.js +8 -1
  431. package/dist/operations/catalogue/blastOff.d.ts +3 -0
  432. package/dist/operations/catalogue/blastOff.d.ts.map +1 -0
  433. package/dist/operations/catalogue/blastOff.js +118 -0
  434. package/dist/operations/catalogue/bounce.d.ts +3 -0
  435. package/dist/operations/catalogue/bounce.d.ts.map +1 -0
  436. package/dist/operations/catalogue/bounce.js +34 -0
  437. package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -1
  438. package/dist/operations/catalogue/curlSmoke.js +3 -1
  439. package/dist/operations/catalogue/dissolve.d.ts.map +1 -1
  440. package/dist/operations/catalogue/dissolve.js +2 -1
  441. package/dist/operations/catalogue/driftUp.d.ts +3 -0
  442. package/dist/operations/catalogue/driftUp.d.ts.map +1 -0
  443. package/dist/operations/catalogue/driftUp.js +57 -0
  444. package/dist/operations/catalogue/emberAsh.d.ts.map +1 -1
  445. package/dist/operations/catalogue/emberAsh.js +2 -1
  446. package/dist/operations/catalogue/flip.d.ts.map +1 -1
  447. package/dist/operations/catalogue/flip.js +19 -9
  448. package/dist/operations/catalogue/float.d.ts +3 -0
  449. package/dist/operations/catalogue/float.d.ts.map +1 -0
  450. package/dist/operations/catalogue/float.js +39 -0
  451. package/dist/operations/catalogue/flyBy.d.ts +3 -0
  452. package/dist/operations/catalogue/flyBy.d.ts.map +1 -0
  453. package/dist/operations/catalogue/flyBy.js +79 -0
  454. package/dist/operations/catalogue/frost.d.ts.map +1 -1
  455. package/dist/operations/catalogue/frost.js +10 -3
  456. package/dist/operations/catalogue/grow.d.ts +3 -0
  457. package/dist/operations/catalogue/grow.d.ts.map +1 -0
  458. package/dist/operations/catalogue/grow.js +19 -0
  459. package/dist/operations/catalogue/hologram.d.ts.map +1 -1
  460. package/dist/operations/catalogue/hologram.js +11 -5
  461. package/dist/operations/catalogue/jelly.d.ts.map +1 -1
  462. package/dist/operations/catalogue/jelly.js +18 -8
  463. package/dist/operations/catalogue/knockAway.d.ts +3 -0
  464. package/dist/operations/catalogue/knockAway.d.ts.map +1 -0
  465. package/dist/operations/catalogue/knockAway.js +74 -0
  466. package/dist/operations/catalogue/leafFall.d.ts +3 -0
  467. package/dist/operations/catalogue/leafFall.d.ts.map +1 -0
  468. package/dist/operations/catalogue/leafFall.js +74 -0
  469. package/dist/operations/catalogue/lidarScan.d.ts.map +1 -1
  470. package/dist/operations/catalogue/lidarScan.js +4 -1
  471. package/dist/operations/catalogue/metalize.d.ts.map +1 -1
  472. package/dist/operations/catalogue/metalize.js +8 -2
  473. package/dist/operations/catalogue/motionTrail.d.ts +6 -0
  474. package/dist/operations/catalogue/motionTrail.d.ts.map +1 -0
  475. package/dist/operations/catalogue/motionTrail.js +221 -0
  476. package/dist/operations/catalogue/petrify.d.ts.map +1 -1
  477. package/dist/operations/catalogue/petrify.js +9 -3
  478. package/dist/operations/catalogue/physicalExit.d.ts +55 -0
  479. package/dist/operations/catalogue/physicalExit.d.ts.map +1 -0
  480. package/dist/operations/catalogue/physicalExit.js +165 -0
  481. package/dist/operations/catalogue/physicalHeld.d.ts +41 -0
  482. package/dist/operations/catalogue/physicalHeld.d.ts.map +1 -0
  483. package/dist/operations/catalogue/physicalHeld.js +78 -0
  484. package/dist/operations/catalogue/physicalMix.d.ts +45 -0
  485. package/dist/operations/catalogue/physicalMix.d.ts.map +1 -0
  486. package/dist/operations/catalogue/physicalMix.js +144 -0
  487. package/dist/operations/catalogue/pop.d.ts +3 -0
  488. package/dist/operations/catalogue/pop.d.ts.map +1 -0
  489. package/dist/operations/catalogue/pop.js +44 -0
  490. package/dist/operations/catalogue/print3d.d.ts.map +1 -1
  491. package/dist/operations/catalogue/print3d.js +5 -1
  492. package/dist/operations/catalogue/pulse.d.ts +3 -0
  493. package/dist/operations/catalogue/pulse.d.ts.map +1 -0
  494. package/dist/operations/catalogue/pulse.js +29 -0
  495. package/dist/operations/catalogue/restPose.d.ts +5 -7
  496. package/dist/operations/catalogue/restPose.d.ts.map +1 -1
  497. package/dist/operations/catalogue/restPose.js +18 -48
  498. package/dist/operations/catalogue/rotate.d.ts +3 -0
  499. package/dist/operations/catalogue/rotate.d.ts.map +1 -0
  500. package/dist/operations/catalogue/rotate.js +49 -0
  501. package/dist/operations/catalogue/shake.d.ts +3 -0
  502. package/dist/operations/catalogue/shake.d.ts.map +1 -0
  503. package/dist/operations/catalogue/shake.js +31 -0
  504. package/dist/operations/catalogue/shatter.d.ts.map +1 -1
  505. package/dist/operations/catalogue/shatter.js +5 -1
  506. package/dist/operations/catalogue/slam.d.ts +3 -0
  507. package/dist/operations/catalogue/slam.d.ts.map +1 -0
  508. package/dist/operations/catalogue/slam.js +89 -0
  509. package/dist/operations/catalogue/slingshot.d.ts +3 -0
  510. package/dist/operations/catalogue/slingshot.d.ts.map +1 -0
  511. package/dist/operations/catalogue/slingshot.js +88 -0
  512. package/dist/operations/catalogue/spin.d.ts.map +1 -1
  513. package/dist/operations/catalogue/spin.js +24 -13
  514. package/dist/operations/catalogue/sway.d.ts +3 -0
  515. package/dist/operations/catalogue/sway.d.ts.map +1 -0
  516. package/dist/operations/catalogue/sway.js +23 -0
  517. package/dist/operations/catalogue/swirl.d.ts.map +1 -1
  518. package/dist/operations/catalogue/swirl.js +6 -5
  519. package/dist/operations/catalogue/trailCore.d.ts +89 -0
  520. package/dist/operations/catalogue/trailCore.d.ts.map +1 -0
  521. package/dist/operations/catalogue/trailCore.js +190 -0
  522. package/dist/operations/catalogue/trailGhosts.d.ts +5 -0
  523. package/dist/operations/catalogue/trailGhosts.d.ts.map +1 -0
  524. package/dist/operations/catalogue/trailGhosts.js +179 -0
  525. package/dist/operations/catalogue/trailStampStyles.d.ts +11 -0
  526. package/dist/operations/catalogue/trailStampStyles.d.ts.map +1 -0
  527. package/dist/operations/catalogue/trailStampStyles.js +479 -0
  528. package/dist/operations/catalogue/trailStamps.d.ts +57 -0
  529. package/dist/operations/catalogue/trailStamps.d.ts.map +1 -0
  530. package/dist/operations/catalogue/trailStamps.js +349 -0
  531. package/dist/operations/catalogue/trailStreaks.d.ts +3 -0
  532. package/dist/operations/catalogue/trailStreaks.d.ts.map +1 -0
  533. package/dist/operations/catalogue/trailStreaks.js +147 -0
  534. package/dist/operations/catalogue/transitionField.d.ts +30 -0
  535. package/dist/operations/catalogue/transitionField.d.ts.map +1 -1
  536. package/dist/operations/catalogue/transitionField.js +21 -0
  537. package/dist/operations/catalogue/turnAway.d.ts +3 -0
  538. package/dist/operations/catalogue/turnAway.d.ts.map +1 -0
  539. package/dist/operations/catalogue/turnAway.js +54 -0
  540. package/dist/operations/catalogue/vortexDrain.d.ts +3 -0
  541. package/dist/operations/catalogue/vortexDrain.d.ts.map +1 -0
  542. package/dist/operations/catalogue/vortexDrain.js +68 -0
  543. package/dist/operations/catalogue/warp.d.ts +3 -0
  544. package/dist/operations/catalogue/warp.d.ts.map +1 -0
  545. package/dist/operations/catalogue/warp.js +73 -0
  546. package/dist/operations/catalogue/whoosh.d.ts +3 -0
  547. package/dist/operations/catalogue/whoosh.d.ts.map +1 -0
  548. package/dist/operations/catalogue/whoosh.js +84 -0
  549. package/dist/operations/catalogue/wobble.d.ts +3 -0
  550. package/dist/operations/catalogue/wobble.d.ts.map +1 -0
  551. package/dist/operations/catalogue/wobble.js +23 -0
  552. package/dist/operations/clipPreview.d.ts +3 -0
  553. package/dist/operations/clipPreview.d.ts.map +1 -0
  554. package/dist/operations/clipPreview.js +20 -0
  555. package/dist/operations/groupFanout.d.ts +96 -0
  556. package/dist/operations/groupFanout.d.ts.map +1 -0
  557. package/dist/operations/groupFanout.js +365 -0
  558. package/dist/operations/groups.d.ts +20 -0
  559. package/dist/operations/groups.d.ts.map +1 -0
  560. package/dist/operations/groups.js +66 -0
  561. package/dist/operations/index.d.ts +5 -2
  562. package/dist/operations/index.d.ts.map +1 -1
  563. package/dist/operations/index.js +5 -2
  564. package/dist/operations/objectEffects.d.ts +161 -6
  565. package/dist/operations/objectEffects.d.ts.map +1 -1
  566. package/dist/operations/objectEffects.js +1091 -17
  567. package/dist/operations/registry.d.ts.map +1 -1
  568. package/dist/operations/registry.js +24 -2
  569. package/dist/operations/runtime.d.ts +57 -2
  570. package/dist/operations/runtime.d.ts.map +1 -1
  571. package/dist/operations/runtime.js +161 -18
  572. package/dist/operations/types.d.ts +60 -3
  573. package/dist/operations/types.d.ts.map +1 -1
  574. package/dist/operations/types.js +5 -1
  575. package/dist/operations/useObjectEffectLayers.d.ts +2 -2
  576. package/dist/operations/useObjectEffectLayers.d.ts.map +1 -1
  577. package/dist/operations/useObjectEffectLayers.js +31 -10
  578. package/dist/operations/usePresentedVisibility.d.ts +10 -0
  579. package/dist/operations/usePresentedVisibility.d.ts.map +1 -0
  580. package/dist/operations/usePresentedVisibility.js +53 -0
  581. package/dist/presets/terrainBiomes.d.ts +67 -0
  582. package/dist/presets/terrainBiomes.d.ts.map +1 -0
  583. package/dist/presets/terrainBiomes.js +294 -0
  584. package/dist/presets/terrainPresets.d.ts +6 -0
  585. package/dist/presets/terrainPresets.d.ts.map +1 -1
  586. package/dist/presets/terrainPresets.js +26 -38
  587. package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
  588. package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
  589. package/dist/shaders/glsl/oceanCore.glsl.js +17 -0
  590. package/dist/shaders/glsl/surfaceCore.glsl.d.ts +21 -0
  591. package/dist/shaders/glsl/surfaceCore.glsl.d.ts.map +1 -0
  592. package/dist/shaders/glsl/surfaceCore.glsl.js +120 -0
  593. package/dist/shaders/glsl/terrainCore.glsl.d.ts +16 -3
  594. package/dist/shaders/glsl/terrainCore.glsl.d.ts.map +1 -1
  595. package/dist/shaders/glsl/terrainCore.glsl.js +266 -20
  596. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +2 -0
  597. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
  598. package/dist/shaders/ocean/OceanSurfaceMaterial.js +3 -0
  599. package/dist/shaders/terrain/TerrainMaterial.d.ts +17 -0
  600. package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
  601. package/dist/shaders/terrain/TerrainMaterial.js +107 -8
  602. package/dist/triggers/engine.d.ts +44 -0
  603. package/dist/triggers/engine.d.ts.map +1 -0
  604. package/dist/triggers/engine.js +165 -0
  605. package/dist/triggers/hosts/actions.d.ts +8 -0
  606. package/dist/triggers/hosts/actions.d.ts.map +1 -0
  607. package/dist/triggers/hosts/actions.js +22 -0
  608. package/dist/triggers/hosts/interactions.d.ts +6 -0
  609. package/dist/triggers/hosts/interactions.d.ts.map +1 -0
  610. package/dist/triggers/hosts/interactions.js +4 -0
  611. package/dist/triggers/hosts/timelineCues.d.ts +2 -0
  612. package/dist/triggers/hosts/timelineCues.d.ts.map +1 -0
  613. package/dist/triggers/hosts/timelineCues.js +22 -0
  614. package/dist/triggers/index.d.ts +13 -0
  615. package/dist/triggers/index.d.ts.map +1 -0
  616. package/dist/triggers/index.js +9 -0
  617. package/dist/triggers/kinds/action.d.ts +2 -0
  618. package/dist/triggers/kinds/action.d.ts.map +1 -0
  619. package/dist/triggers/kinds/action.js +31 -0
  620. package/dist/triggers/kinds/animations.d.ts +2 -0
  621. package/dist/triggers/kinds/animations.d.ts.map +1 -0
  622. package/dist/triggers/kinds/animations.js +75 -0
  623. package/dist/triggers/kinds/effects.d.ts +2 -0
  624. package/dist/triggers/kinds/effects.d.ts.map +1 -0
  625. package/dist/triggers/kinds/effects.js +27 -0
  626. package/dist/triggers/kinds/index.d.ts +4 -0
  627. package/dist/triggers/kinds/index.d.ts.map +1 -0
  628. package/dist/triggers/kinds/index.js +4 -0
  629. package/dist/triggers/log.d.ts +21 -0
  630. package/dist/triggers/log.d.ts.map +1 -0
  631. package/dist/triggers/log.js +43 -0
  632. package/dist/triggers/readiness.d.ts +40 -0
  633. package/dist/triggers/readiness.d.ts.map +1 -0
  634. package/dist/triggers/readiness.js +158 -0
  635. package/dist/triggers/registry.d.ts +41 -0
  636. package/dist/triggers/registry.d.ts.map +1 -0
  637. package/dist/triggers/registry.js +7 -0
  638. package/dist/types/gridConfigs.d.ts +18 -23
  639. package/dist/types/gridConfigs.d.ts.map +1 -1
  640. package/dist/ui/UiAnchorUpdater.d.ts +10 -0
  641. package/dist/ui/UiAnchorUpdater.d.ts.map +1 -0
  642. package/dist/ui/UiAnchorUpdater.js +111 -0
  643. package/dist/ui/UiLayers.d.ts +20 -0
  644. package/dist/ui/UiLayers.d.ts.map +1 -0
  645. package/dist/ui/UiLayers.js +57 -0
  646. package/dist/ui/index.d.ts +9 -0
  647. package/dist/ui/index.d.ts.map +1 -0
  648. package/dist/ui/index.js +6 -0
  649. package/dist/ui/uiAnchors.d.ts +21 -0
  650. package/dist/ui/uiAnchors.d.ts.map +1 -0
  651. package/dist/ui/uiAnchors.js +22 -0
  652. package/dist/ui/uiBaseStyles.d.ts +2 -0
  653. package/dist/ui/uiBaseStyles.d.ts.map +1 -0
  654. package/dist/ui/uiBaseStyles.js +100 -0
  655. package/dist/ui/uiBinder.d.ts +30 -0
  656. package/dist/ui/uiBinder.d.ts.map +1 -0
  657. package/dist/ui/uiBinder.js +344 -0
  658. package/dist/utils/configAnimations.d.ts.map +1 -1
  659. package/dist/utils/configAnimations.js +5 -1
  660. package/dist/utils/gridConfig.d.ts +1 -1
  661. package/dist/utils/gridConfig.d.ts.map +1 -1
  662. package/dist/utils/gridConfig.js +1 -1
  663. package/dist/utils/landPatch.d.ts +33 -0
  664. package/dist/utils/landPatch.d.ts.map +1 -0
  665. package/dist/utils/landPatch.js +114 -0
  666. package/dist/utils/renderedSky.d.ts +32 -0
  667. package/dist/utils/renderedSky.d.ts.map +1 -0
  668. package/dist/utils/renderedSky.js +57 -0
  669. package/dist/utils/skyMoon.d.ts +35 -0
  670. package/dist/utils/skyMoon.d.ts.map +1 -0
  671. package/dist/utils/skyMoon.js +41 -0
  672. package/dist/utils/terrainHeight.d.ts +4 -0
  673. package/dist/utils/terrainHeight.d.ts.map +1 -0
  674. package/dist/utils/terrainHeight.js +150 -0
  675. package/dist/utils/terrainTextureResolver.d.ts +18 -0
  676. package/dist/utils/terrainTextureResolver.d.ts.map +1 -0
  677. package/dist/utils/terrainTextureResolver.js +17 -0
  678. package/dist/utils/terrainUniforms.d.ts +17 -0
  679. package/dist/utils/terrainUniforms.d.ts.map +1 -1
  680. package/dist/utils/terrainUniforms.js +84 -0
  681. package/dist/utils/textureArrays.d.ts +29 -0
  682. package/dist/utils/textureArrays.d.ts.map +1 -0
  683. package/dist/utils/textureArrays.js +140 -0
  684. package/package.json +2 -2
@@ -16,7 +16,7 @@
16
16
  import { BackSide, Color, Mesh, MeshStandardMaterial } from 'three';
17
17
  import { defineOperation } from '../types.js';
18
18
  import { addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
19
- import { createFieldState, fieldGlsl, fieldUniforms, hideMeshes, runProgress } from './transitionField.js';
19
+ import { createFieldState, fieldGlsl, fieldUniforms, hideMeshes, runProgress, setReveal } from './transitionField.js';
20
20
  import { hideUntilWarm } from './warmup.js';
21
21
  const P = 'Prt';
22
22
  const KEY = 'print3d';
@@ -60,6 +60,7 @@ function mainLayer(st) {
60
60
  diffuse: /* glsl */ `
61
61
  if (uPrtKeep > 0.5) {
62
62
  prtPreview(diffuseColor.rgb);
63
+ if (uPrtReveal > 0.5 && prtConv < 0.5) discard; // revealed by the print: nothing above the nozzle
63
64
  if (prtConv > 0.5) diffuseColor.rgb = prtCol * mix(0.22, 1.0, prtGap);
64
65
  } else {
65
66
  if (prtAge(vPrtR, vPrtQ) < 0.0) discard;
@@ -206,6 +207,7 @@ export default defineOperation({
206
207
  disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the object turns into its slicer preview and stays' },
207
208
  },
208
209
  objectParams: { disappear: false },
210
+ presence: 'paint',
209
211
  apply(target, p) {
210
212
  let st = target.userData[STATE];
211
213
  if (!st) {
@@ -247,6 +249,7 @@ export default defineOperation({
247
249
  s.lines.value = Number(p.lines);
248
250
  s.palette.value = Math.max(0, PALETTES.findIndex(o => o.value === p.preview));
249
251
  s.keep.value = p.disappear === false ? 1 : 0;
252
+ setReveal(s.field, p);
250
253
  // the preview never cuts the object open: the inside is only for the un-print
251
254
  s.caps.forEach(c => { c.visible = !s.keep.value; });
252
255
  if (s.keep.value) {
@@ -262,6 +265,7 @@ export default defineOperation({
262
265
  if (!s)
263
266
  return;
264
267
  hideMeshes(target, KEY, false);
268
+ setReveal(s.field, p);
265
269
  s.caps.forEach(c => { c.visible = !s.keep.value; });
266
270
  return runProgress(target, s.field, 0, {
267
271
  duration: Number(p.duration), ease: 'none',
@@ -0,0 +1,3 @@
1
+ declare const _default: import("..").OperationDefinition;
2
+ export default _default;
3
+ //# sourceMappingURL=pulse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/pulse.ts"],"names":[],"mappings":";AAMA,wBAuBG"}
@@ -0,0 +1,29 @@
1
+ // Pulse — the object swells and settles about its centre. "Breathe" is a slow
2
+ // rise with a longer fall; "Heartbeat" is the double beat (lub-dub) and a rest.
3
+ import { DURATION, heldPhysical } from './physicalHeld.js';
4
+ const bump = (x, at, width) => Math.exp(-(((x - at) / width) ** 2));
5
+ export default heldPhysical({
6
+ value: 'pulse', label: 'Pulse',
7
+ description: 'Swell and settle — a slow breath, or a double heartbeat',
8
+ params: {
9
+ style: { type: 'select', label: 'Style', default: 'breathe', options: [{ value: 'breathe', label: 'Breathe' }, { value: 'heartbeat', label: 'Heartbeat' }] },
10
+ amount: { type: 'number', label: 'Amount', default: 0.06, min: 0.005, max: 0.6, step: 0.005, hint: 'How much bigger it gets' },
11
+ speed: { type: 'number', label: 'Beats', default: 0.5, min: 0.05, max: 4, step: 0.05, unit: '/s' },
12
+ duration: { ...DURATION, default: 4 },
13
+ },
14
+ memory: () => null,
15
+ move(part, st, time) {
16
+ const p = st.p;
17
+ const ph = (time * Number(p.speed)) % 1;
18
+ let k;
19
+ if (p.style === 'heartbeat')
20
+ k = bump(ph, 0.12, 0.05) + 0.62 * bump(ph, 0.34, 0.065);
21
+ else {
22
+ // in over 40% of the breath, out over the rest
23
+ const u = ph < 0.4 ? ph / 0.4 : 1 - (ph - 0.4) / 0.6;
24
+ k = u * u * (3 - 2 * u);
25
+ }
26
+ part.s.setScalar(1 + Number(p.amount) * k * st.amp.v);
27
+ part.pivot.copy(st.body.centerLocal);
28
+ },
29
+ });
@@ -1,21 +1,19 @@
1
1
  import { Quaternion, Vector3 } from 'three';
2
2
  import type { Object3D } from 'three';
3
3
  export interface RestPose {
4
- position: Vector3;
5
- quaternion: Quaternion;
6
- scale: Vector3;
7
4
  /** Bounds centre and bottom in the object's own local space (unscaled). */
8
5
  centerLocal: Vector3;
9
6
  bottomLocal: Vector3;
10
7
  /** World-space size at rest. */
11
8
  size: Vector3;
12
- users: number;
13
9
  }
14
- export declare function acquireRest(target: Object3D): RestPose;
15
- export declare function releaseRest(target: Object3D): void;
10
+ /** Start posing the object. `key`: the operation's own, so two operations stack instead of overwriting. */
11
+ export declare function acquireRest(target: Object3D, key?: string): RestPose;
12
+ /** Stop posing: this operation's part goes, the object returns to rest (or to what the others hold). */
13
+ export declare function releaseRest(target: Object3D, key?: string): void;
16
14
  /**
17
15
  * Pose the object as rest ∘ (rotation `q` and non-uniform scale `s` about the local
18
16
  * `pivot`), then offset by `worldOffset`. The pivot stays where it is at rest.
19
17
  */
20
- export declare function poseAbout(target: Object3D, r: RestPose, pivot: Vector3, q: Quaternion, s: Vector3, worldOffset?: Vector3): void;
18
+ export declare function poseAbout(target: Object3D, _r: RestPose, pivot: Vector3, q: Quaternion, s: Vector3, worldOffset?: Vector3, key?: string): void;
21
19
  //# sourceMappingURL=restPose.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"restPose.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/restPose.ts"],"names":[],"mappings":"AAGA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,WAAW,QAAQ;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAID,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAgBtD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,QAQ3C;AAGD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,QAaxH"}
1
+ {"version":3,"file":"restPose.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/restPose.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,QAAQ;IACrB,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;CACjB;AAID,2GAA2G;AAC3G,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAU,GAAG,QAAQ,CAErE;AAED,wGAAwG;AACxG,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAU,QAE1D;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,SAAU,QAKxI"}
@@ -1,55 +1,25 @@
1
- // Rest pose for transform operations: captured once when the first transform
2
- // effect starts on an object, released when the last one ends, so effects that
3
- // overlap (a jelly during a flip) always return to the authored pose.
4
- import { Box3, Vector3 } from 'three';
5
- const KEY = '__opRestPose';
6
- export function acquireRest(target) {
7
- let r = target.userData[KEY];
8
- if (!r) {
9
- target.updateWorldMatrix(true, true);
10
- const box = new Box3().setFromObject(target);
11
- const c = box.getCenter(new Vector3());
12
- const bottom = new Vector3(c.x, box.min.y, c.z);
13
- r = {
14
- position: target.position.clone(), quaternion: target.quaternion.clone(), scale: target.scale.clone(),
15
- centerLocal: target.worldToLocal(c.clone()), bottomLocal: target.worldToLocal(bottom),
16
- size: box.getSize(new Vector3()), users: 0,
17
- };
18
- target.userData[KEY] = r;
19
- }
20
- r.users++;
21
- return r;
1
+ import { composeMix, joinMix, leaveMix } from './physicalMix.js';
2
+ const DEFAULT = 'rest';
3
+ /** Start posing the object. `key`: the operation's own, so two operations stack instead of overwriting. */
4
+ export function acquireRest(target, key = DEFAULT) {
5
+ return joinMix(target, key).body;
22
6
  }
23
- export function releaseRest(target) {
24
- const r = target.userData[KEY];
25
- if (!r)
26
- return;
27
- r.users--;
28
- if (r.users <= 0) {
29
- target.position.copy(r.position);
30
- target.quaternion.copy(r.quaternion);
31
- target.scale.copy(r.scale);
32
- delete target.userData[KEY];
33
- }
7
+ /** Stop posing: this operation's part goes, the object returns to rest (or to what the others hold). */
8
+ export function releaseRest(target, key = DEFAULT) {
9
+ leaveMix(target, key);
34
10
  }
35
- const _v = new Vector3();
36
11
  /**
37
12
  * Pose the object as rest ∘ (rotation `q` and non-uniform scale `s` about the local
38
13
  * `pivot`), then offset by `worldOffset`. The pivot stays where it is at rest.
39
14
  */
40
- export function poseAbout(target, r, pivot, q, s, worldOffset) {
41
- // local pivot → parent space at rest, and under the new rotation/scale
42
- const restP = _v.copy(pivot).multiply(r.scale).applyQuaternion(r.quaternion);
43
- const newQ = r.quaternion.clone().multiply(q);
44
- const newS = r.scale.clone().multiply(s);
45
- const nowP = pivot.clone().multiply(newS).applyQuaternion(newQ);
46
- target.quaternion.copy(newQ);
47
- target.scale.copy(newS);
48
- target.position.copy(r.position).add(restP).sub(nowP);
49
- if (worldOffset && target.parent) {
50
- const w = target.parent.localToWorld(target.position.clone()).add(worldOffset);
51
- target.position.copy(target.parent.worldToLocal(w));
52
- }
53
- else if (worldOffset)
54
- target.position.add(worldOffset);
15
+ export function poseAbout(target, _r, pivot, q, s, worldOffset, key = DEFAULT) {
16
+ const { part } = joinMix(target, key);
17
+ part.pivot.copy(pivot);
18
+ part.q.copy(q);
19
+ part.s.copy(s);
20
+ if (worldOffset)
21
+ part.off.copy(worldOffset);
22
+ else
23
+ part.off.set(0, 0, 0);
24
+ composeMix(target);
55
25
  }
@@ -0,0 +1,3 @@
1
+ declare const _default: import("..").OperationDefinition;
2
+ export default _default;
3
+ //# sourceMappingURL=rotate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/rotate.ts"],"names":[],"mappings":";AAmBA,wBA4BG"}
@@ -0,0 +1,49 @@
1
+ // Rotate — the object turns steadily about its own axes, through its centre.
2
+ // One axis is a plain turn; two or three together is a turn about their diagonal
3
+ // (a tumble). Switching on spins it up; switching off lets it coast to the nearest
4
+ // whole turn, so it always stops facing the way it started. The other way round
5
+ // is the playback's Reverse.
6
+ import { Vector3 } from 'three';
7
+ import { multiValues } from '../types.js';
8
+ import { DURATION, heldPhysical, periodicEase } from './physicalHeld.js';
9
+ const AXES = { x: new Vector3(1, 0, 0), y: new Vector3(0, 1, 0), z: new Vector3(0, 0, 1) };
10
+ const TAU = Math.PI * 2;
11
+ const _axis = new Vector3();
12
+ /** The axis to turn about: the chosen ones together (their diagonal). */
13
+ function axisOf(value) {
14
+ _axis.set(0, 0, 0);
15
+ for (const k of multiValues(value))
16
+ if (AXES[k])
17
+ _axis.add(AXES[k]);
18
+ return _axis.lengthSq() > 0 ? _axis.normalize() : _axis.copy(AXES.y);
19
+ }
20
+ export default heldPhysical({
21
+ value: 'rotate', label: 'Rotate',
22
+ description: 'Turn steadily about its own axes — spins up, and coasts to a stop facing the way it started',
23
+ ease: 'none',
24
+ params: {
25
+ axis: { type: 'multi', label: 'Axes', default: 'y', options: [{ value: 'x', label: 'X' }, { value: 'y', label: 'Y' }, { value: 'z', label: 'Z' }], hint: 'Pick one, or several to tumble about them together' },
26
+ speed: { type: 'number', label: 'Speed', default: 0.2, min: 0.01, max: 4, step: 0.01, unit: 'turns/s' },
27
+ duration: { ...DURATION, default: 5 },
28
+ },
29
+ memory: () => ({ angle: 0, from: 0, to: 0 }),
30
+ onOut(st) {
31
+ // land on a whole turn ahead: at least what the current speed would cover while slowing
32
+ const m = st.mem, dir = st.p.__backward === true ? -1 : 1;
33
+ const coast = TAU * Number(st.p.speed) * periodicEase(Number(st.p.duration)) * 0.5 * st.amp.v;
34
+ m.from = m.angle;
35
+ m.to = dir * Math.ceil((dir * m.angle + coast - 1e-6) / TAU) * TAU;
36
+ },
37
+ move(part, st, _time, dt) {
38
+ const p = st.p, m = st.mem, a = st.amp.v;
39
+ if (st.out) {
40
+ const u = 1 - a; // 0 → 1 over the stop
41
+ m.angle = m.from + (m.to - m.from) * (1 - (1 - u) * (1 - u));
42
+ }
43
+ else {
44
+ m.angle += TAU * Number(p.speed) * a * a * dt; // spins up (dt is negative when played backwards)
45
+ }
46
+ part.q.setFromAxisAngle(axisOf(p.axis), m.angle);
47
+ part.pivot.copy(st.body.centerLocal);
48
+ },
49
+ });
@@ -0,0 +1,3 @@
1
+ declare const _default: import("..").OperationDefinition;
2
+ export default _default;
3
+ //# sourceMappingURL=shake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shake.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/shake.ts"],"names":[],"mappings":";AAcA,wBAkBG"}
@@ -0,0 +1,31 @@
1
+ // Shake — a tremble made of smooth noise (not a new random spot every frame, which
2
+ // reads as flicker): position and a little roll, each on its own noise track.
3
+ import { Vector3 } from 'three';
4
+ import { DURATION, heldPhysical } from './physicalHeld.js';
5
+ const Z = new Vector3(0, 0, 1);
6
+ const hash = (i, seed) => { const x = Math.sin(i * 127.1 + seed * 311.7) * 43758.5453; return (x - Math.floor(x)) * 2 - 1; };
7
+ /** Smooth 1D noise, −1..1. */
8
+ function noise(x, seed) {
9
+ const i = Math.floor(x), f = x - i;
10
+ const u = f * f * (3 - 2 * f);
11
+ return hash(i, seed) * (1 - u) + hash(i + 1, seed) * u;
12
+ }
13
+ export default heldPhysical({
14
+ value: 'shake', label: 'Shake',
15
+ description: 'Tremble on the spot — smooth, nervous noise in position and roll',
16
+ params: {
17
+ strength: { type: 'number', label: 'Strength', default: 0.02, min: 0.002, max: 0.3, step: 0.002, hint: 'As a fraction of the object’s height' },
18
+ frequency: { type: 'number', label: 'Rate', default: 14, min: 1, max: 40, step: 0.5, unit: '/s' },
19
+ roll: { type: 'number', label: 'Roll', default: 1.5, min: 0, max: 15, step: 0.25, unit: '°' },
20
+ duration: { ...DURATION, default: 1.2 },
21
+ },
22
+ memory: () => null,
23
+ move(part, st, time) {
24
+ const p = st.p, a = st.amp.v;
25
+ const x = time * Number(p.frequency);
26
+ const A = st.body.size.y * Number(p.strength) * a;
27
+ part.off.set(noise(x, 1) * A, noise(x, 2) * A, noise(x, 3) * A * 0.5);
28
+ part.q.setFromAxisAngle(Z, noise(x * 0.8, 4) * (Number(p.roll) * Math.PI / 180) * a);
29
+ part.pivot.copy(st.body.centerLocal);
30
+ },
31
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"shatter.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/shatter.ts"],"names":[],"mappings":";AAqKA,wBA4FG"}
1
+ {"version":3,"file":"shatter.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/shatter.ts"],"names":[],"mappings":";AAqKA,wBA+FG"}
@@ -162,7 +162,8 @@ export default defineOperation({
162
162
  channel: 'visual',
163
163
  multi: true,
164
164
  toggles: true,
165
- usableIn: ['interaction', 'action'],
165
+ usableIn: ['interaction', 'action', 'object'],
166
+ presence: 'vanish',
166
167
  params: {
167
168
  direction: { type: 'select', label: 'Direction', default: 'outward', options: DIRECTION_OPTIONS },
168
169
  edgeColor: { type: 'color', label: 'Crack colour', default: '#8fe3ff' },
@@ -210,8 +211,10 @@ export default defineOperation({
210
211
  retainPrograms(stage);
211
212
  if (target.userData[STATE] !== own)
212
213
  return; // reverted meanwhile
214
+ // (__opFxOwnMaterial: the mesh's real material, so the swap is not taken for a replaced surface — see surfaceSignature)
213
215
  for (const sw of own.swaps)
214
216
  if (sw.split) {
217
+ sw.mesh.userData.__opFxOwnMaterial = sw.material;
215
218
  sw.mesh.geometry = sw.splitGeo;
216
219
  sw.mesh.material = sw.splitMat;
217
220
  }
@@ -253,6 +256,7 @@ export default defineOperation({
253
256
  }
254
257
  sw.mesh.geometry = sw.geometry;
255
258
  sw.mesh.material = sw.material;
259
+ delete sw.mesh.userData.__opFxOwnMaterial;
256
260
  (Array.isArray(sw.splitMat) ? sw.splitMat : [sw.splitMat]).forEach(m => m.dispose());
257
261
  }
258
262
  delete target.userData[STATE];
@@ -0,0 +1,3 @@
1
+ declare const _default: import("..").OperationDefinition;
2
+ export default _default;
3
+ //# sourceMappingURL=slam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slam.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/slam.ts"],"names":[],"mappings":";AA4BA,wBAgEG"}
@@ -0,0 +1,89 @@
1
+ // Slam — weight and impact. Coming in, the object hangs above its spot, winds up
2
+ // (rises a little, slowing to a stop), then slams down, accelerating hard
3
+ // (height ∝ (1−t)³ … the speed is greatest at the floor), stretched by the speed.
4
+ // The impact squashes it flat at its base, it rebounds in a small hop and rattles
5
+ // (a fast, damped shake) until it is exactly at rest. Leaving: it lifts and winds
6
+ // up, slams down into the floor and is driven through it, rattling, and is gone.
7
+ import { Quaternion } from 'three';
8
+ import { clamp01, physicalExit, ring, smooth } from './physicalExit.js';
9
+ const _a = new Quaternion(), _b = new Quaternion();
10
+ const HANG = 0.32, HIT = 0.5; // entrance: hang + wind-up, then the drop, then the impact
11
+ /** A fast damped rattle about two screen axes, `amount` 0…1. */
12
+ function rattle(out, a, amount, secs) {
13
+ const rad = (Number(a.p.rattle) * Math.PI / 180) * amount;
14
+ const w = 2 * Math.PI * secs;
15
+ _a.setFromAxisAngle(a.frame.right, rad * Math.sin(19 * w));
16
+ _b.setFromAxisAngle(a.frame.toward, rad * 0.8 * Math.sin(23 * w + 1.3));
17
+ out.q.copy(a.local(_a.multiply(_b)));
18
+ }
19
+ /** Volume-keeping vertical scale about the base. */
20
+ function vert(out, sy, size = 1) {
21
+ const sxz = 1 / Math.sqrt(Math.max(sy, 0.05));
22
+ out.s.set(sxz * size, sy * size, sxz * size);
23
+ out.pivot = 'bottom';
24
+ }
25
+ export default physicalExit({
26
+ value: 'slam',
27
+ label: 'Slam',
28
+ description: 'Hangs above its spot, winds up and slams down — squash, hop and rattle; it leaves by slamming down through the floor',
29
+ params: {
30
+ height: { type: 'number', label: 'Height', default: 1.6, min: 0.5, max: 12, step: 0.1, hint: 'How high it hangs before the slam, × its height' },
31
+ squash: { type: 'number', label: 'Squash', default: 0.38, min: 0, max: 0.7, step: 0.01, hint: 'How flat the impact squashes it' },
32
+ rattle: { type: 'number', label: 'Rattle', default: 2.5, min: 0, max: 10, step: 0.25, unit: '°' },
33
+ duration: { type: 'number', label: 'Duration', default: 1.5, min: 0.4, max: 6, step: 0.05, unit: 's' },
34
+ },
35
+ enter(v, out, a) {
36
+ const p = a.p, H = a.size.y, D = Number(p.duration), up = a.frame.up;
37
+ const top = Number(p.height) * H;
38
+ const sq = Number(p.squash);
39
+ if (v < HANG) {
40
+ // appears and winds up: rises a little higher, slowing to a stop
41
+ const t = v / HANG;
42
+ const y = top + 0.12 * top * (1 - Math.pow(1 - t, 2));
43
+ out.off.copy(up).multiplyScalar(y);
44
+ vert(out, 1 - 0.08 * smooth(0.6, 1, t), smooth(0, 0.3, t)); // gathers itself
45
+ return;
46
+ }
47
+ if (v < HIT) {
48
+ // the slam: accelerating all the way to the floor
49
+ const t = (v - HANG) / (HIT - HANG);
50
+ const y = 1.12 * top * (1 - t * t * t);
51
+ out.off.copy(up).multiplyScalar(y);
52
+ vert(out, 0.92 + (0.08 + 0.35 * sq) * smooth(0, 0.7, t));
53
+ return;
54
+ }
55
+ // impact: flat at once, then a hop and a rattle that die out exactly at rest
56
+ const sg = clamp01((v - HIT) / (1 - HIT));
57
+ const r = ring(sg, 2.2, 4.2);
58
+ const flat = sq * Math.exp(-14 * sg) * (1 - smooth(0, 0.5, sg)); // the hit itself
59
+ vert(out, 1 - flat - 0.35 * sq * r);
60
+ const hop = 0.1 * H * Math.max(0, Math.sin(Math.PI * clamp01((sg - 0.06) / 0.3))) * (1 - sg);
61
+ out.off.copy(up).multiplyScalar(hop);
62
+ rattle(out, a, Math.exp(-5 * sg) * (1 - sg) * smooth(0, 0.04, sg), v * D);
63
+ },
64
+ exit(u, out, a) {
65
+ const p = a.p, H = a.size.y, D = Number(p.duration), up = a.frame.up;
66
+ const sq = Number(p.squash);
67
+ const W = 0.35, HITX = 0.47;
68
+ if (u < W) {
69
+ // lifts and winds up
70
+ const t = u / W;
71
+ out.off.copy(up).multiplyScalar(0.45 * H * (1 - Math.pow(1 - t, 2)));
72
+ vert(out, 1 + 0.06 * smooth(0, 1, t));
73
+ return;
74
+ }
75
+ if (u < HITX) {
76
+ const t = (u - W) / (HITX - W);
77
+ out.off.copy(up).multiplyScalar(0.45 * H * (1 - t * t * t));
78
+ vert(out, 1.06 + 0.25 * sq * t);
79
+ return;
80
+ }
81
+ // into the floor: flattened by the hit, then driven down through it, rattling
82
+ const sg = (u - HITX) / (1 - HITX);
83
+ const flat = sq * Math.exp(-10 * sg) * smooth(0, 0.03, sg);
84
+ const sink = 1.15 * H * Math.pow(smooth(0.08, 1, sg), 1.3);
85
+ out.off.copy(up).multiplyScalar(-sink);
86
+ vert(out, 1 - flat, 1 - smooth(0.6, 1, sg));
87
+ rattle(out, a, smooth(0, 0.05, sg) * (1 - 0.4 * sg), u * D);
88
+ },
89
+ });
@@ -0,0 +1,3 @@
1
+ declare const _default: import("..").OperationDefinition;
2
+ export default _default;
3
+ //# sourceMappingURL=slingshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slingshot.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/slingshot.ts"],"names":[],"mappings":";AAoBA,wBA2DG"}
@@ -0,0 +1,88 @@
1
+ // Slingshot — the object is pulled back on an elastic, stretching against the
2
+ // pull (Hooke tension builds, the band quivers at full draw), then released:
3
+ // it snaps forward through rest and flies off still stretched, gone in the
4
+ // distance. Launched upwards the draw is a crouch into the ground instead.
5
+ // The way back: it flies in from where it went, fast, and is caught by a damped
6
+ // spring — overshooting past rest and ringing in until it is exactly there.
7
+ import { Vector3 } from 'three';
8
+ import { clamp01, physicalExit, ring, smooth, stretchAxis } from './physicalExit.js';
9
+ const DRAW_END = 0.42;
10
+ const CATCH = 0.45;
11
+ const _d = new Vector3(), _n = new Vector3();
12
+ function dirOf(f, d) {
13
+ if (d === 'left')
14
+ return _d.copy(f.right).negate();
15
+ if (d === 'up')
16
+ return _d.copy(f.up);
17
+ if (d === 'away')
18
+ return _d.copy(f.toward).negate();
19
+ return _d.copy(f.right);
20
+ }
21
+ export default physicalExit({
22
+ value: 'slingshot',
23
+ label: 'Slingshot',
24
+ description: 'Pulled back on an elastic, then let go — it snaps forward and flies off stretched; it flies back in and is caught by a spring',
25
+ params: {
26
+ direction: {
27
+ type: 'select', label: 'Direction', default: 'right', options: [
28
+ { value: 'right', label: 'Right' }, { value: 'left', label: 'Left' }, { value: 'up', label: 'Up' }, { value: 'away', label: 'Away' },
29
+ ], hint: 'Screen-relative when it starts',
30
+ },
31
+ pull: { type: 'number', label: 'Draw', default: 0.6, min: 0, max: 2, step: 0.05, hint: 'How far it is pulled back, × its size' },
32
+ stretch: { type: 'number', label: 'Stretch', default: 0.35, min: 0, max: 1.2, step: 0.01 },
33
+ distance: { type: 'number', label: 'Distance', default: 10, min: 3, max: 40, step: 0.5, hint: 'How far it flies before it is gone, × its size' },
34
+ duration: { type: 'number', label: 'Duration', default: 1.5, min: 0.3, max: 6, step: 0.05, unit: 's' },
35
+ },
36
+ exit(u, out, a) {
37
+ const p = a.p, f = a.frame, D = Number(p.duration);
38
+ const d = dirOf(f, p.direction);
39
+ const up = p.direction === 'up';
40
+ const axis = a.axis(d), st = Number(p.stretch);
41
+ const P = Number(p.pull) * a.span * (up ? 0 : 1);
42
+ const F = Number(p.distance) * a.span;
43
+ if (u < DRAW_END) {
44
+ const t = u / DRAW_END;
45
+ const draw = 1 - Math.pow(1 - t, 3);
46
+ // quivers at full draw, across the pull
47
+ _n.crossVectors(d, f.up);
48
+ if (_n.lengthSq() < 1e-6)
49
+ _n.copy(f.right);
50
+ _n.normalize();
51
+ const quiver = 0.012 * a.span * smooth(0.6, 1, t) * Math.sin(2 * Math.PI * 13 * u * D);
52
+ out.off.copy(d).multiplyScalar(-P * draw).addScaledVector(_n, quiver);
53
+ if (up) {
54
+ out.pivot = 'bottom';
55
+ stretchAxis(out.s, axis, 1 - 0.5 * st * draw);
56
+ }
57
+ else
58
+ stretchAxis(out.s, axis, 1 + st * draw);
59
+ return;
60
+ }
61
+ const tau = (u - DRAW_END) / (1 - DRAW_END);
62
+ out.off.copy(d).multiplyScalar(-P + (P + F) * (1 - Math.pow(1 - tau, 2.2)));
63
+ // the band lets go: the stretch peaks just after release and relaxes in flight
64
+ const k = up
65
+ ? 1 - 0.5 * st * (1 - smooth(0, 0.06, tau)) + 1.4 * st * smooth(0, 0.06, tau) * Math.pow(1 - tau, 1.2)
66
+ : 1 + st * (1 + 0.8 * smooth(0, 0.08, tau)) * Math.pow(1 - tau, 1.2);
67
+ if (up)
68
+ out.pivot = 'bottom';
69
+ stretchAxis(out.s, axis, k, 1 - smooth(0.55, 1, tau));
70
+ },
71
+ enter(v, out, a) {
72
+ const p = a.p, f = a.frame;
73
+ const d = dirOf(f, p.direction);
74
+ const axis = a.axis(d), st = Number(p.stretch);
75
+ const F = Number(p.distance) * a.span;
76
+ if (v < CATCH) {
77
+ const tau = v / CATCH;
78
+ out.off.copy(d).multiplyScalar(F * Math.pow(1 - tau, 1.6));
79
+ stretchAxis(out.s, axis, 1 + st * (1 - tau), smooth(0, 0.3, tau));
80
+ return;
81
+ }
82
+ // caught: past rest the other way, then rings in
83
+ const sg = clamp01((v - CATCH) / (1 - CATCH));
84
+ const r = ring(sg, 1.25, 3.2);
85
+ out.off.copy(d).multiplyScalar(-0.22 * a.span * r);
86
+ stretchAxis(out.s, axis, 1 - 0.55 * st * Math.abs(r));
87
+ },
88
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"spin.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/spin.ts"],"names":[],"mappings":";AAWA,wBAkCG"}
1
+ {"version":3,"file":"spin.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/spin.ts"],"names":[],"mappings":";AAYA,wBA0CG"}
@@ -1,8 +1,9 @@
1
1
  // Spin — the target turns a whole number of times about one of its own local
2
2
  // axes and lands exactly where it started. One-shot: triggering again spins again.
3
3
  import { gsap } from 'gsap';
4
- import { Quaternion, Vector3 } from 'three';
4
+ import { Vector3 } from 'three';
5
5
  import { defineOperation } from '../types.js';
6
+ import { composeMix, joinMix, leaveMix } from './physicalMix.js';
6
7
  const KEY = '__opSpin';
7
8
  const AXES = { x: new Vector3(1, 0, 0), y: new Vector3(0, 1, 0), z: new Vector3(0, 0, 1) };
8
9
  export default defineOperation({
@@ -12,7 +13,7 @@ export default defineOperation({
12
13
  channel: 'transform',
13
14
  multi: true,
14
15
  toggles: false,
15
- usableIn: ['interaction', 'action'],
16
+ usableIn: ['interaction', 'action', 'object'],
16
17
  params: {
17
18
  axis: { type: 'select', label: 'Axis', default: 'y', options: [{ value: 'y', label: 'Up (Y)' }, { value: 'x', label: 'Side (X)' }, { value: 'z', label: 'Front (Z)' }] },
18
19
  turns: { type: 'number', label: 'Turns', default: 1, min: 1, max: 10, step: 1 },
@@ -20,23 +21,33 @@ export default defineOperation({
20
21
  duration: { type: 'number', label: 'Duration', default: 1.2, min: 0.1, max: 20, step: 0.05, unit: 's' },
21
22
  },
22
23
  apply(target, p) {
23
- // A spin already running is finished first, so the rest pose is never lost.
24
+ // A spin already running is replaced (its part is reset below), so the rest pose is never lost.
24
25
  const running = target.userData[KEY];
25
- if (running) {
26
+ if (running)
26
27
  gsap.killTweensOf(running.proxy);
27
- target.quaternion.copy(running.rest);
28
- }
29
28
  const axis = AXES[String(p.axis)] ?? AXES.y;
30
- const st = { rest: target.quaternion.clone(), proxy: { angle: 0 } };
31
- target.userData[KEY] = st;
32
- const turn = new Quaternion();
33
29
  const turns = Math.max(1, Math.round(Number(p.turns)));
30
+ const full = (p.reverse ? -1 : 1) * turns * Math.PI * 2;
31
+ // p.__backward (playback: reverse / yoyo) plays the same move backwards in time.
32
+ const back = p.__backward === true;
33
+ const st = { proxy: { angle: back ? full : 0 } };
34
+ target.userData[KEY] = st;
35
+ // a turn about the object's own axis and origin, laid over its transform by the physical mix
36
+ const { part } = joinMix(target, KEY);
37
+ part.pivot.set(0, 0, 0);
34
38
  gsap.to(st.proxy, {
35
- angle: (p.reverse ? -1 : 1) * turns * Math.PI * 2,
39
+ angle: back ? 0 : full,
36
40
  duration: Number(p.duration), ease: 'power2.inOut',
37
- // rest · turn(axis, a) = a turn about the object's own axis
38
- onUpdate: () => { target.quaternion.copy(st.rest).multiply(turn.setFromAxisAngle(axis, st.proxy.angle)); },
39
- onComplete: () => { target.quaternion.copy(st.rest); delete target.userData[KEY]; },
41
+ onUpdate: () => { part.q.setFromAxisAngle(axis, st.proxy.angle); composeMix(target); },
42
+ onComplete: () => { leaveMix(target, KEY); delete target.userData[KEY]; },
40
43
  });
41
44
  },
45
+ cancel(target) {
46
+ const running = target.userData[KEY];
47
+ if (!running)
48
+ return;
49
+ gsap.killTweensOf(running.proxy);
50
+ delete target.userData[KEY];
51
+ leaveMix(target, KEY);
52
+ },
42
53
  });
@@ -0,0 +1,3 @@
1
+ declare const _default: import("..").OperationDefinition;
2
+ export default _default;
3
+ //# sourceMappingURL=sway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sway.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/sway.ts"],"names":[],"mappings":";AAOA,wBAiBG"}
@@ -0,0 +1,23 @@
1
+ // Sway — the object rocks about its base like something tall in a light wind:
2
+ // a pendulum swing with a touch of second harmonic, so it lingers at the ends.
3
+ import { Vector3 } from 'three';
4
+ import { DURATION, heldPhysical } from './physicalHeld.js';
5
+ const AXES = { side: new Vector3(0, 0, 1), front: new Vector3(1, 0, 0) };
6
+ export default heldPhysical({
7
+ value: 'sway', label: 'Sway',
8
+ description: 'Rock gently about its base, like something tall in a light wind',
9
+ params: {
10
+ direction: { type: 'select', label: 'Direction', default: 'side', options: [{ value: 'side', label: 'Side to side' }, { value: 'front', label: 'Front to back' }] },
11
+ angle: { type: 'number', label: 'Angle', default: 7, min: 0.5, max: 45, step: 0.5, unit: '°' },
12
+ speed: { type: 'number', label: 'Speed', default: 1, min: 0.1, max: 5, step: 0.05, unit: '×' },
13
+ duration: { ...DURATION, default: 3 },
14
+ },
15
+ memory: () => null,
16
+ move(part, st, time) {
17
+ const p = st.p;
18
+ const w = 2 * Math.PI * 0.4 * Number(p.speed) * time;
19
+ const swing = (Math.sin(w) + 0.14 * Math.sin(3 * w)) / 0.86; // flatter at the ends
20
+ part.q.setFromAxisAngle(AXES[String(p.direction)] ?? AXES.side, swing * (Number(p.angle) * Math.PI / 180) * st.amp.v);
21
+ part.pivot.copy(st.body.bottomLocal);
22
+ },
23
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"swirl.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/swirl.ts"],"names":[],"mappings":";AAgCA,wBAwCG"}
1
+ {"version":3,"file":"swirl.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/swirl.ts"],"names":[],"mappings":";AAgCA,wBAyCG"}