@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,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from "react";
2
+ import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
3
+ import { EFFECT_CLIP_ASSET, effectClipFromAsset, setEffectClipTemplates } from "../operations/runtime.js";
3
4
  import { createSceneHandle } from "../api/sceneHandle.js";
4
5
  import { Canvas } from "@react-three/fiber";
5
6
  import { LIGHTING_PRESETS, SceneStore } from "@3driseai/3drise-core";
@@ -13,7 +14,10 @@ import ClipPlayer from "../animationsV2/ClipPlayer.js";
13
14
  import { normalizeClip, normalizeSequence } from "../animationsV2/normalize.js";
14
15
  import { resolveElementSettings } from "../animationsV2/elementSettings.js";
15
16
  import { Physics } from "@react-three/rapier";
16
- const SceneBuilder = forwardRef(({ project, width = "100%", height = "100vh", style = {}, className = "", onSceneInitialized, onSceneReady, onUiElementClick, onObjectClick, onObjectReady, onObjectDispose, }, ref) => {
17
+ import UiLayers from "../ui/UiLayers.js";
18
+ import { sceneReadiness, useSceneReady } from "../triggers/readiness.js";
19
+ import UiAnchorUpdater from "../ui/UiAnchorUpdater.js";
20
+ const SceneBuilder = forwardRef(({ project, width = "100%", height = "100vh", style = {}, className = "", onSceneInitialized, onSceneReady, loadingIndicator, ui = true, uiLayers, uiStyles, onObjectClick, onObjectReady, onObjectDispose, }, ref) => {
17
21
  const sceneSettings = (project.sceneSettingsData || {});
18
22
  // const meshController = useMeshController();
19
23
  const [isThreeJsMounted, setIsThreeJsMounted] = useState(false);
@@ -50,14 +54,42 @@ const SceneBuilder = forwardRef(({ project, width = "100%", height = "100vh", st
50
54
  const animationClips = useMemo(() => (rawClips || []).map(normalizeClip), [rawClips]);
51
55
  const animationSequences = useMemo(() => (rawSequences || []).map(normalizeSequence), [rawSequences]);
52
56
  const actionSequences = project.actionSequences || [];
57
+ // Effect clip templates the project links (its interactions and actions point at them).
58
+ const rawAssets = project.assets;
59
+ useEffect(() => {
60
+ setEffectClipTemplates((rawAssets ?? []).filter(a => a?.type === EFFECT_CLIP_ASSET).map(a => effectClipFromAsset(a)).filter(Boolean), 'project');
61
+ }, [rawAssets]);
53
62
  const clipAutoplay = useMemo(() => ({ sequences: animationSequences, clips: animationClips }), [animationSequences, animationClips]);
54
63
  // The external control handle (see api/sceneHandle). Built once; reads the
55
64
  // current project lists through a ref, so it never goes stale.
56
65
  const handleSource = useRef({ actions: actionSequences, clips: animationClips, sequences: animationSequences });
57
- handleSource.current = { actions: actionSequences, clips: animationClips, sequences: animationSequences };
66
+ handleSource.current = { actions: actionSequences, clips: animationClips, sequences: animationSequences, objects: project.sceneObjects || sceneSettings.scene?.objectSettings || [] };
58
67
  const sceneHandle = useMemo(() => createSceneHandle(() => handleSource.current), []);
59
68
  useImperativeHandle(ref, () => sceneHandle, [sceneHandle]);
60
69
  const sceneObjects = project.sceneObjects || sceneSettings.scene?.objectSettings || [];
70
+ // Readiness: nothing runs (autoplay, object effects, onSceneReady) and the cover stays on until
71
+ // the canvas exists, every model has loaded or failed, shaders are compiled and a frame rendered.
72
+ const ready = useSceneReady();
73
+ const threeRef = useRef(null);
74
+ const onSceneReadyRef = useRef(onSceneReady);
75
+ onSceneReadyRef.current = onSceneReady;
76
+ const modelKey = sceneObjects.filter(o => o?.type === 'model').map(o => o.id).join(',');
77
+ // A layout effect: the gate must close before the canvas renders its children (R3F renders
78
+ // them after it has measured itself), or their effects would start ungated.
79
+ const [started, setStarted] = useState(false);
80
+ useLayoutEffect(() => {
81
+ sceneReadiness.begin([CANVAS_READY, ...(modelKey ? modelKey.split(',') : [])], {
82
+ compile: () => {
83
+ const t = threeRef.current;
84
+ return t?.gl?.compileAsync ? t.gl.compileAsync(t.scene, t.camera) : Promise.resolve();
85
+ },
86
+ });
87
+ if (threeRef.current)
88
+ sceneReadiness.report(CANVAS_READY); // remount with the canvas already there
89
+ const cancel = sceneReadiness.whenReady(() => onSceneReadyRef.current?.(sceneHandle));
90
+ setStarted(true);
91
+ return () => { cancel(); sceneReadiness.reset(); };
92
+ }, [modelKey, sceneHandle]);
61
93
  const modelObjects = sceneObjects.filter((obj) => obj.type === "model");
62
94
  const meshObjects = sceneObjects.filter((obj) => obj.type === "mesh");
63
95
  const sceneCanvas = sceneSettings.canvas || sceneSettings.scene?.canvas || {};
@@ -121,41 +153,39 @@ const SceneBuilder = forwardRef(({ project, width = "100%", height = "100vh", st
121
153
  // };
122
154
  // initializeSceneAssets();
123
155
  // }, [meshController, modelObjects, meshObjects]);
124
- const handleElementClick = (element) => {
125
- if (element && onUiElementClick) {
126
- onUiElementClick(element);
127
- }
128
- };
129
- return (_jsx("div", { className: className, style: containerStyle, children: _jsx(Canvas, { style: {
130
- backgroundColor: backgroundColor,
131
- }, shadows: shadows, dpr: dpr, gl: {
132
- antialias,
133
- alpha: true,
134
- powerPreference: "high-performance",
135
- ...gl,
136
- }, camera: {
137
- fov,
138
- near,
139
- far,
140
- position: [position[0], position[1], position[2]],
141
- rotation: [orientation[0], orientation[1], orientation[2]],
142
- }, onCreated: (state) => {
143
- state.gl.toneMapping = NoToneMapping;
144
- setIsThreeJsMounted(true);
145
- SceneStore.scene = state.scene;
146
- SceneStore.gl = state.gl;
147
- if (onSceneInitialized) {
148
- onSceneInitialized();
149
- }
150
- onSceneReady?.(sceneHandle);
151
- }, children: _jsxs(Physics, { gravity: physicsSettings.gravity, paused: !physicsSettings.enabled, debug: physicsSettings.debug, children: [_jsx(LightsManager, { config: lighting[0], onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), environment && _jsx(EnvironmentManager, { environment: environment, timeSettings: timeSettings, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), _jsx(CameraController, { settings: camera, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), _jsx(ObjectsRenderer, { cameraSettings: camera, generalObjectSettings: generalObjectSettings, createdObjects: sceneObjects, onObjectsReady: undefined, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose, sequences: animationSequences, clips: animationClips, actionSequences: actionSequences, handleObjectClick: onObjectClick ? (object, ref, event) => onObjectClick(object, ref, event) : undefined }), _jsx(ClipPlayer, { autoplay: clipAutoplay, getAction: (id) => actionSequences?.find((a) => a.id === id), getSettings: (state) => resolveElementSettings(state, {
152
- objects: sceneObjects,
153
- camera,
154
- sky: environment?.sky,
155
- clouds: environment?.clouds,
156
- ocean: environment?.ocean,
157
- terrain: environment?.terrain,
158
- }) }), _jsx(CursorController, { effects: project.cursor?.effects, clickActions: project.cursor?.clickActions, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose })] }) }) }));
156
+ return (_jsxs("div", { className: className, style: containerStyle, children: [_jsx(Canvas, { style: {
157
+ backgroundColor: backgroundColor,
158
+ }, shadows: shadows, dpr: dpr, gl: {
159
+ antialias,
160
+ alpha: true,
161
+ powerPreference: "high-performance",
162
+ ...gl,
163
+ }, camera: {
164
+ fov,
165
+ near,
166
+ far,
167
+ position: [position[0], position[1], position[2]],
168
+ rotation: [orientation[0], orientation[1], orientation[2]],
169
+ }, onCreated: (state) => {
170
+ state.gl.toneMapping = NoToneMapping;
171
+ setIsThreeJsMounted(true);
172
+ SceneStore.scene = state.scene;
173
+ SceneStore.gl = state.gl;
174
+ if (onSceneInitialized) {
175
+ onSceneInitialized();
176
+ }
177
+ threeRef.current = { gl: state.gl, scene: state.scene, camera: state.camera };
178
+ sceneReadiness.report(CANVAS_READY);
179
+ }, children: _jsxs(Physics, { gravity: physicsSettings.gravity, paused: !physicsSettings.enabled, debug: physicsSettings.debug, children: [_jsx(LightsManager, { config: lighting[0], onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), environment && _jsx(EnvironmentManager, { environment: environment, timeSettings: timeSettings, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), _jsx(CameraController, { settings: camera, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), _jsx(ObjectsRenderer, { cameraSettings: camera, generalObjectSettings: generalObjectSettings, createdObjects: sceneObjects, onObjectsReady: undefined, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose, sequences: animationSequences, clips: animationClips, actionSequences: actionSequences, handleObjectClick: onObjectClick ? (object, ref, event) => onObjectClick(object, ref, event) : undefined }), _jsx(ClipPlayer, { autoplay: clipAutoplay, getAction: (id) => actionSequences?.find((a) => a.id === id), getSettings: (state) => resolveElementSettings(state, {
180
+ objects: sceneObjects,
181
+ camera,
182
+ sky: environment?.sky,
183
+ clouds: environment?.clouds,
184
+ ocean: environment?.ocean,
185
+ terrain: environment?.terrain,
186
+ }) }), _jsx(CursorController, { effects: project.cursor?.effects, clickActions: project.cursor?.clickActions, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }), _jsx(UiAnchorUpdater, {})] }) }), ui && _jsx(UiLayers, { layers: uiLayers ?? project.uiLayers, scene: sceneHandle, extraCss: uiStyles }), (!started || !ready) && (_jsx("div", { style: { position: 'absolute', inset: 0, zIndex: 1000, backgroundColor, display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: loadingIndicator }))] }));
159
187
  });
160
188
  SceneBuilder.displayName = 'SceneBuilder';
189
+ /** Readiness entry for "the canvas exists" (its renderer is what compiles the shaders). */
190
+ const CANVAS_READY = '__canvas__';
161
191
  export default SceneBuilder;
@@ -4,8 +4,32 @@ export interface SkyControllerProps extends ObjectReadyProps {
4
4
  settings: SkySettings;
5
5
  timeSettings: TimeSettings;
6
6
  scale?: number;
7
+ /** Unused since time of day stopped writing its values back into the
8
+ * settings (they are the day look now, not a mirror of the clock). Kept so
9
+ * existing hosts still type-check. */
7
10
  onSettingsChange?: (settings: SkySettings) => void;
8
11
  }
9
- declare function SkyController({ settings, timeSettings, scale, onSettingsChange, onObjectReady, onObjectDispose, }: SkyControllerProps): any;
12
+ /**
13
+ * The analytic (Preetham) sky.
14
+ *
15
+ * What it draws, each frame, in order:
16
+ * 1. the stored settings — or, while time of day is enabled, the time-driven
17
+ * sun and atmosphere (time owns all six knobs then);
18
+ * 2. the `sky` keyframe domain (settings.animations.sky)
19
+ * 3. the `sky` pointer domain on top (settings.mouseMove.sky)
20
+ * 4. a controller's live drag (SKY_LIVE_KEY handle on the mesh)
21
+ * With time of day on, the clock owns the sun's position (elevation/azimuth), and
22
+ * 1–4 above are the DAY look: atmosphereForSunElevation blends them into golden
23
+ * hour, twilight and night by the sun's height. Sliders, keyframes and pointer
24
+ * bindings on the atmosphere keep working with the clock running.
25
+ *
26
+ * Whatever it draws is published per scene (renderedSky) so the key light, the
27
+ * clouds, the water and the terrain are lit by the same sun and atmosphere.
28
+ *
29
+ * It draws only. The sun LIGHT is SkySystem's SunLight, which reads what this
30
+ * publishes; a second light here used to double the sun (always white, always
31
+ * on, lit from below the ground at night).
32
+ */
33
+ declare function SkyController({ settings, timeSettings, scale, onObjectReady, onObjectDispose }: SkyControllerProps): import("react").JSX.Element;
10
34
  export default SkyController;
11
35
  //# sourceMappingURL=SkyController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkyController.d.ts","sourceRoot":"","sources":["../../src/components/SkyController.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACtD;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,kBAAkB,GA+I8H,GAAG,CACtQ;AA6BD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"SkyController.d.ts","sourceRoot":"","sources":["../../src/components/SkyController.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAiB7D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGvE,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;2CAEuC;IACvC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACtD;AAsBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAY,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,kBAAkB,+BAyMlH;AAED,eAAe,aAAa,CAAC"}
@@ -1,91 +1,116 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useObjectReady } from '../hooks/useObjectReady.js';
3
- import { useRef, useEffect, useCallback } from 'react';
4
- import { useFrame } from '@react-three/fiber';
5
- import { useSkyUniforms } from '../hooks/useSkyUniforms.js';
6
- import { useSkyAnimation } from '../hooks/useSkyAnimation.js';
7
- import { useSkySystem } from '../hooks/useSkySystem.js';
8
- import { findById } from '../utils/sceneQuery.js';
9
- import { cubeCameraManager } from '@3driseai/3drise-core';
3
+ import { useRef, useEffect, useCallback, useMemo } from 'react';
4
+ import { useFrame, useThree } from '@react-three/fiber';
5
+ import { SKY_LIVE_KEY } from '../hooks/useSkyLive.js';
6
+ import { createSunPosition } from '../utils/utils3d.js';
7
+ import { applyConfigKeyframeAnimations, applyConfigMouseMove, hasConfigOverrides, resolveConfig, } from '../utils/configAnimations.js';
8
+ import { publishRenderedSky, clearRenderedSky } from '../utils/renderedSky.js';
9
+ import { cubeCameraManager, getAnimatableProperties, skySystemManager, atmosphereForSunElevation, skyBrightnessForSunElevation, nightAmount } from '@3driseai/3drise-core';
10
10
  import SkyMesh from './SkyMesh.js';
11
- function SkyController({ settings, timeSettings, scale = 1000, onSettingsChange, onObjectReady, onObjectDispose, }) {
11
+ /** The sky's animatable knobs, from the property registry — the same list the
12
+ * Animation and MouseMove panels offer, so a binding can never target a knob
13
+ * this loop does not push. */
14
+ const SKY_ANIMATABLE = new Set(getAnimatableProperties({ type: 'sky' }, 'sky').map(p => p.value));
15
+ /** While the sky is being driven, refresh the environment probe at most this often.
16
+ * Six cube faces per frame is the one thing an animated sky must never do. */
17
+ const ENV_REFRESH_MS = 500;
18
+ const renderedOf = (s) => ({
19
+ turbidity: s.turbidity ?? 2,
20
+ rayleigh: s.rayleigh ?? 1,
21
+ mieCoefficient: s.mieCoefficient ?? 0.005,
22
+ mieDirectionalG: s.mieDirectionalG ?? 0.7,
23
+ elevation: s.elevation ?? 0,
24
+ azimuth: s.azimuth ?? 0,
25
+ });
26
+ /**
27
+ * The analytic (Preetham) sky.
28
+ *
29
+ * What it draws, each frame, in order:
30
+ * 1. the stored settings — or, while time of day is enabled, the time-driven
31
+ * sun and atmosphere (time owns all six knobs then);
32
+ * 2. the `sky` keyframe domain (settings.animations.sky)
33
+ * 3. the `sky` pointer domain on top (settings.mouseMove.sky)
34
+ * 4. a controller's live drag (SKY_LIVE_KEY handle on the mesh)
35
+ * With time of day on, the clock owns the sun's position (elevation/azimuth), and
36
+ * 1–4 above are the DAY look: atmosphereForSunElevation blends them into golden
37
+ * hour, twilight and night by the sun's height. Sliders, keyframes and pointer
38
+ * bindings on the atmosphere keep working with the clock running.
39
+ *
40
+ * Whatever it draws is published per scene (renderedSky) so the key light, the
41
+ * clouds, the water and the terrain are lit by the same sun and atmosphere.
42
+ *
43
+ * It draws only. The sun LIGHT is SkySystem's SunLight, which reads what this
44
+ * publishes; a second light here used to double the sun (always white, always
45
+ * on, lit from below the ground at night).
46
+ */
47
+ function SkyController({ settings, timeSettings, scale = 1000, onObjectReady, onObjectDispose }) {
12
48
  const skyRef = useRef(null);
13
49
  const rootRef = useRef(null);
14
50
  useObjectReady(rootRef, settings, onObjectReady, onObjectDispose);
15
- const sunLightRef = useRef(null);
16
- const isAnimatingRef = useRef(false);
17
51
  const previousSettings = useRef(null);
18
- // const cubeCameraManager = CubeCameraManager.getInstance();
19
- const { updateUniforms, getCurrentValues } = useSkyUniforms();
20
- const { animateSkyTransition } = useSkyAnimation();
52
+ const scene = useThree(s => s.scene);
53
+ const timeOwns = !!(settings.visible && timeSettings?.enabled);
54
+ // Frame scratch, kept in refs so a keyframed turbidity does not re-render React.
55
+ const override = useRef({});
56
+ const startValues = useRef({});
57
+ const liveRef = useRef({});
58
+ const animStart = useRef(0);
59
+ const driving = useRef(false);
60
+ const lastEnvRefresh = useRef(0);
61
+ const envDirty = useRef(false);
62
+ const timeAtmos = useRef({ turbidity: 0, rayleigh: 0, mieCoefficient: 0, mieDirectionalG: 0 });
63
+ const timeApplied = useRef(null);
64
+ // Restart the keyframes from their beginning whenever they are edited.
21
65
  useEffect(() => {
22
- return () => {
23
- sunLightRef.current?.shadow?.map?.dispose();
24
- };
25
- }, []);
66
+ animStart.current = performance.now();
67
+ startValues.current = {};
68
+ }, [settings.animations]);
69
+ // A slider end commits the dragged value, which arrives here as new settings.
70
+ useEffect(() => { liveRef.current = {}; }, [settings]);
26
71
  useEffect(() => {
27
- handleSettings(settings);
28
- }, [settings]);
29
- const handleTimeUpdate = useCallback((state) => {
30
- const { sunAzimuth, sunElevation, timeInHours } = state;
31
- const atmosphericParams = calculateSkyParamsForTime(timeInHours);
32
- const newSettings = {
33
- ...settings,
34
- elevation: sunElevation,
35
- azimuth: sunAzimuth,
36
- ...atmosphericParams,
72
+ return () => {
73
+ clearRenderedSky(scene);
37
74
  };
38
- // While time is advancing, the environment probe is already re-capturing
39
- // the cube map on its own timer. Letting handleSettings capture as well
40
- // meant six faces rendered from two independent schedulers for the same
41
- // moving sun.
42
- const applied = handleSettings(newSettings, state.advancing);
43
- // Only on a real change, and only when time is not running: this runs
44
- // every frame now, and an unconditional call would dispatch a settings
45
- // write per frame in a host that supplies this callback.
46
- if (applied && !state.advancing) {
47
- onSettingsChange?.(newSettings);
75
+ }, [scene]);
76
+ /** Push the six knobs into the sky shader. Writes this mesh, never a findById
77
+ * result, so a second canvas cannot drive the editor's sky. */
78
+ const applyUniforms = useCallback((values) => {
79
+ const uniforms = skyRef.current?.material?.uniforms;
80
+ if (!uniforms)
81
+ return;
82
+ if (values.turbidity !== undefined)
83
+ uniforms.turbidity.value = values.turbidity;
84
+ if (values.rayleigh !== undefined)
85
+ uniforms.rayleigh.value = values.rayleigh;
86
+ if (values.mieCoefficient !== undefined)
87
+ uniforms.mieCoefficient.value = values.mieCoefficient;
88
+ if (values.mieDirectionalG !== undefined)
89
+ uniforms.mieDirectionalG.value = values.mieDirectionalG;
90
+ if (values.elevation !== undefined && values.azimuth !== undefined && uniforms.sunPosition) {
91
+ uniforms.sunPosition.value.copy(createSunPosition(values.elevation, values.azimuth));
48
92
  }
49
- }, [settings, onSettingsChange]);
50
- useSkySystem({
51
- timeSettings,
52
- onTimeUpdate: handleTimeUpdate,
53
- enabled: settings.visible && timeSettings.enabled,
54
- });
55
- const handleSkyMeshReady = useCallback((object, mesh) => {
56
- skyRef.current = mesh;
57
- updateUniforms(settings);
58
- previousSettings.current = { ...settings };
59
- onObjectReady && onObjectReady(object, mesh);
60
- }, [settings, updateUniforms, onObjectReady]);
93
+ // Darken the dome after sunset (see SkyMesh addNightDarkening). By the
94
+ // sun's height, so a hand-set sun below the horizon gets night too.
95
+ if (values.elevation !== undefined && uniforms.uSkyBrightness) {
96
+ uniforms.uSkyBrightness.value = skyBrightnessForSunElevation(values.elevation);
97
+ const n = nightAmount(values.elevation);
98
+ uniforms.uNightTint.value.set(0.0006 * n, 0.0016 * n, 0.0045 * n);
99
+ }
100
+ }, []);
61
101
  const toggleSky = useCallback((show) => {
62
102
  if (!skyRef.current)
63
103
  return;
64
104
  skyRef.current.visible = show;
65
- if (sunLightRef.current)
66
- sunLightRef.current.visible = show;
67
105
  if (!show) {
68
106
  cubeCameraManager.dispose();
107
+ clearRenderedSky(scene);
69
108
  }
70
109
  else {
71
110
  cubeCameraManager.updateEnvironment();
72
111
  }
73
- }, []);
74
- const updateSun = useCallback(() => {
75
- if (!skyRef.current?.material || !sunLightRef.current)
76
- return;
77
- const uniforms = skyRef.current.material.uniforms;
78
- if (!uniforms?.sunPosition)
79
- return;
80
- const distance = 100;
81
- const sp = uniforms.sunPosition.value;
82
- sunLightRef.current.position.set(sp.x * distance, sp.y * distance, sp.z * distance);
83
- sunLightRef.current.shadow.camera.updateProjectionMatrix();
84
- const moon = findById('3drise-moon');
85
- if (moon)
86
- moon.position.set(sp.x * scale, sp.y * scale, sp.z * scale);
87
- }, [scale]);
88
- const hasActualChanges = useCallback((next, prev) => {
112
+ }, [scene]);
113
+ const hasActualChanges = (next, prev) => {
89
114
  if (!prev)
90
115
  return true;
91
116
  return (next.visible !== prev.visible ||
@@ -95,16 +120,12 @@ function SkyController({ settings, timeSettings, scale = 1000, onSettingsChange,
95
120
  Math.abs(next.mieDirectionalG - prev.mieDirectionalG) > 0.001 ||
96
121
  Math.abs(next.elevation - prev.elevation) > 0.1 ||
97
122
  Math.abs(next.azimuth - prev.azimuth) > 0.1);
98
- }, []);
99
- const handleCompletedUniforms = (_finalValues) => {
100
- isAnimatingRef.current = false;
101
- cubeCameraManager.updateEnvironment();
102
123
  };
103
- /** Returns whether the settings were actually applied, so callers can tell a
104
- * real change from a no-op. `skipEnvUpdate` leaves the cube-camera capture
105
- * to whoever else is already scheduling it. */
124
+ /** Applies a settings object (stored or time-driven). Returns whether anything
125
+ * changed. `skipEnvUpdate` leaves the cube capture to whoever already
126
+ * schedules it (the probe re-captures on its own timer while time advances). */
106
127
  const handleSettings = (newSettings, skipEnvUpdate = false) => {
107
- if (!skyRef.current || isAnimatingRef.current || !newSettings)
128
+ if (!skyRef.current || !newSettings)
108
129
  return false;
109
130
  if (!hasActualChanges(newSettings, previousSettings.current))
110
131
  return false;
@@ -115,68 +136,106 @@ function SkyController({ settings, timeSettings, scale = 1000, onSettingsChange,
115
136
  previousSettings.current = { ...newSettings };
116
137
  return false;
117
138
  }
118
- updateUniforms(newSettings);
119
- updateSun();
120
- if (!skipEnvUpdate) {
139
+ applyUniforms(newSettings);
140
+ publishRenderedSky(scene, renderedOf(newSettings));
141
+ if (!skipEnvUpdate)
121
142
  cubeCameraManager.updateEnvironment();
122
- }
123
143
  previousSettings.current = { ...newSettings };
124
144
  return true;
125
145
  };
126
- const handleMouseMove = (mouse) => {
127
- const handlers = settings.handlers;
128
- if (!handlers || isAnimatingRef.current || !skyRef.current)
146
+ // With the clock on, the frame loop draws; applying stored elevation here would
147
+ // flash the authored sun for a frame. Re-runs when the clock is switched off so
148
+ // the stored sky comes back.
149
+ useEffect(() => {
150
+ if (timeOwns)
129
151
  return;
130
- if (!handlers.onMouseMove?.enabled)
152
+ handleSettings(settings);
153
+ }, [settings, timeOwns]);
154
+ const liveHandle = useMemo(() => ({
155
+ set: (key, value) => { liveRef.current[key] = value; },
156
+ }), []);
157
+ const attachLive = (mesh) => {
158
+ if (mesh)
159
+ mesh.userData[SKY_LIVE_KEY] = liveHandle;
160
+ };
161
+ useEffect(() => {
162
+ const mesh = skyRef.current;
163
+ attachLive(mesh);
164
+ return () => { if (mesh)
165
+ delete mesh.userData[SKY_LIVE_KEY]; };
166
+ }, [liveHandle]);
167
+ const handleSkyMeshReady = useCallback((object, mesh) => {
168
+ skyRef.current = mesh;
169
+ attachLive(mesh);
170
+ applyUniforms(settings);
171
+ if (settings.visible)
172
+ publishRenderedSky(scene, renderedOf(settings));
173
+ previousSettings.current = { ...settings };
174
+ onObjectReady && onObjectReady(object, mesh);
175
+ }, [settings, applyUniforms, onObjectReady, scene]);
176
+ /** Clock on: the clock's sun, the day look blended by the sun's height. Pushes
177
+ * only on a visible change, and leaves the cube capture to the probe while
178
+ * time is advancing (it refreshes on sun movement); a manual seek or a slider
179
+ * re-captures here, trailing-throttled so a scrub ends on a fresh capture. */
180
+ const drawTimeOfDay = (day) => {
181
+ const sky = skyRef.current;
182
+ if (!sky)
131
183
  return;
132
- let updated = { ...settings };
133
- handlers.onMouseMove.properties.forEach((propConfig) => {
134
- const { property } = propConfig;
135
- const { sensitivity, min: minVal, max: maxVal, axis } = propConfig.propertySettings;
136
- let movement = axis === 'x' ? mouse.x * sensitivity
137
- : axis === 'y' ? mouse.y * sensitivity
138
- : (mouse.x + mouse.y) * 0.5 * sensitivity;
139
- if (movement !== 0) {
140
- let newVal = updated[property] + movement;
141
- if (typeof minVal === 'number')
142
- newVal = Math.max(newVal, minVal);
143
- if (typeof maxVal === 'number')
144
- newVal = Math.min(newVal, maxVal);
145
- updated[property] = newVal;
146
- }
147
- });
148
- handleSettings(updated);
184
+ if (!sky.visible)
185
+ toggleSky(true);
186
+ const t = skySystemManager.getState();
187
+ const atmos = atmosphereForSunElevation(t.sunElevation, day, timeAtmos.current);
188
+ const next = { ...day, ...atmos, visible: true, elevation: t.sunElevation, azimuth: t.sunAzimuth };
189
+ if (hasActualChanges(next, timeApplied.current)) {
190
+ applyUniforms(next);
191
+ publishRenderedSky(scene, renderedOf(next));
192
+ timeApplied.current = next;
193
+ previousSettings.current = next;
194
+ if (!t.advancing)
195
+ envDirty.current = true;
196
+ }
197
+ const now = performance.now();
198
+ if (envDirty.current && now - lastEnvRefresh.current > ENV_REFRESH_MS) {
199
+ envDirty.current = false;
200
+ lastEnvRefresh.current = now;
201
+ cubeCameraManager.updateEnvironment();
202
+ }
149
203
  };
150
204
  useFrame((state) => {
151
- handleMouseMove({ x: state.pointer.x, y: state.pointer.y });
152
- });
153
- return (_jsxs("group", { ref: rootRef, children: [_jsx(SkyMesh, { ref: skyRef, settings: settings, scale: scale, onObjectReady: handleSkyMeshReady, onObjectDispose: onObjectDispose }), settings.visible && (_jsx("directionalLight", { ref: sunLightRef, color: "#ffffff", intensity: 1, castShadow: true }))] }));
154
- }
155
- function calculateSkyParamsForTime(timeInHours) {
156
- const nightParams = { turbidity: 0.5, rayleigh: 0.1, mieCoefficient: 0.001, mieDirectionalG: 0.8 };
157
- const sunriseParams = { turbidity: 4, rayleigh: 3, mieCoefficient: 0.01, mieDirectionalG: 0.9 };
158
- const dayParams = { turbidity: 0.7, rayleigh: 0.54, mieCoefficient: 0.005, mieDirectionalG: 0.7 };
159
- const sunsetParams = { turbidity: 4.5, rayleigh: 3.5, mieCoefficient: 0.012, mieDirectionalG: 0.92 };
160
- const lerp = (a, b, t) => a + (b - a) * Math.max(0, Math.min(1, t));
161
- const ss = (t) => t * t * (3 - 2 * t);
162
- const lerpP = (from, to, t) => ({
163
- turbidity: lerp(from.turbidity, to.turbidity, ss(t)),
164
- rayleigh: lerp(from.rayleigh, to.rayleigh, ss(t)),
165
- mieCoefficient: lerp(from.mieCoefficient, to.mieCoefficient, ss(t)),
166
- mieDirectionalG: lerp(from.mieDirectionalG, to.mieDirectionalG, ss(t)),
205
+ if (!skyRef.current || !settings.visible)
206
+ return;
207
+ const o = override.current;
208
+ const base = settings;
209
+ applyConfigKeyframeAnimations(settings.animations?.sky?.animations, startValues.current, base, o, performance.now() - animStart.current, SKY_ANIMATABLE);
210
+ const mm = settings.mouseMove;
211
+ if (mm?.enabled && mm.sky?.enabled) {
212
+ applyConfigMouseMove(mm.sky.properties, base, o, state.pointer, SKY_ANIMATABLE);
213
+ }
214
+ if (timeOwns) {
215
+ drawTimeOfDay(resolveConfig(settings, o, liveRef.current));
216
+ return;
217
+ }
218
+ timeApplied.current = null;
219
+ if (hasConfigOverrides(o) || hasConfigOverrides(liveRef.current)) {
220
+ const resolved = resolveConfig(settings, o, liveRef.current);
221
+ applyUniforms(resolved);
222
+ publishRenderedSky(scene, renderedOf(resolved));
223
+ driving.current = true;
224
+ const now = performance.now();
225
+ if (now - lastEnvRefresh.current > ENV_REFRESH_MS) {
226
+ lastEnvRefresh.current = now;
227
+ cubeCameraManager.updateEnvironment();
228
+ }
229
+ }
230
+ else if (driving.current) {
231
+ // A binding was removed or the pointer stopped mattering: go back to the
232
+ // stored sky once, including the probe.
233
+ driving.current = false;
234
+ applyUniforms(settings);
235
+ publishRenderedSky(scene, renderedOf(settings));
236
+ cubeCameraManager.updateEnvironment();
237
+ }
167
238
  });
168
- if (timeInHours < 5)
169
- return nightParams;
170
- if (timeInHours < 6.5)
171
- return lerpP(nightParams, sunriseParams, (timeInHours - 5) / 1.5);
172
- if (timeInHours < 8)
173
- return lerpP(sunriseParams, dayParams, (timeInHours - 6.5) / 1.5);
174
- if (timeInHours < 17)
175
- return dayParams;
176
- if (timeInHours < 19)
177
- return lerpP(dayParams, sunsetParams, (timeInHours - 17) / 2);
178
- if (timeInHours < 21)
179
- return lerpP(sunsetParams, nightParams, (timeInHours - 19) / 2);
180
- return nightParams;
239
+ return (_jsx("group", { ref: rootRef, children: _jsx(SkyMesh, { ref: skyRef, settings: settings, scale: scale, onObjectReady: handleSkyMeshReady, onObjectDispose: onObjectDispose }) }));
181
240
  }
182
241
  export default SkyController;
@@ -1 +1 @@
1
- {"version":3,"file":"SkyMesh.d.ts","sourceRoot":"","sources":["../../src/components/SkyMesh.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IAClD,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,QAAA,MAAM,OAAO,EA2BP,GAAI,CAAC;AAEX,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"SkyMesh.d.ts","sourceRoot":"","sources":["../../src/components/SkyMesh.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IAClD,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAqBD,QAAA,MAAM,OAAO,EAgCP,GAAI,CAAC;AAEX,eAAe,OAAO,CAAC"}
@@ -2,12 +2,37 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useObjectReady } from '../hooks/useObjectReady.js';
3
3
  import React, { useRef, useMemo, useEffect } from 'react';
4
4
  import { Sky } from 'three/examples/jsm/objects/Sky.js';
5
+ import { Vector3 } from "three";
6
+ import { SKY_ID } from "@3driseai/3drise-core";
7
+ /**
8
+ * Lets SkyController darken the dome after sunset. Preetham alone bottoms out at
9
+ * a flat grey (its constant 0.1 base term), which reads as overcast dusk, not
10
+ * night. `uSkyBrightness` scales the output (1 by day, core
11
+ * skyBrightnessForSunElevation), `uNightTint` adds a faint blue so the dark sky
12
+ * is not neutral grey. Patched by string: if a three upgrade changes the line,
13
+ * the sky simply stays undarkened rather than breaking.
14
+ */
15
+ const SKY_OUT = 'gl_FragColor = vec4( retColor, 1.0 );';
16
+ function addNightDarkening(material) {
17
+ material.uniforms.uSkyBrightness = { value: 1 };
18
+ material.uniforms.uNightTint = { value: new Vector3(0, 0, 0) };
19
+ if (!material.fragmentShader.includes(SKY_OUT))
20
+ return;
21
+ material.fragmentShader = material.fragmentShader
22
+ .replace('void main() {', 'uniform float uSkyBrightness;\nuniform vec3 uNightTint;\nvoid main() {')
23
+ .replace(SKY_OUT, 'gl_FragColor = vec4( retColor * uSkyBrightness + uNightTint, 1.0 );');
24
+ }
5
25
  const SkyMesh = React.forwardRef(({ settings, scale = 1000, onObjectReady, onObjectDispose }, ref) => {
6
26
  const meshRef = useRef(null);
7
27
  useObjectReady(meshRef, settings, onObjectReady, onObjectDispose);
8
28
  const skyObject = useMemo(() => {
9
29
  const sky = new Sky();
30
+ addNightDarkening(sky.material);
10
31
  sky.scale.setScalar(scale);
32
+ // Set once on the object, never as a userData JSX prop: R3F replaces the
33
+ // whole userData object on every render, which would drop the live handle
34
+ // SkyController hangs here.
35
+ sky.userData.id = SKY_ID;
11
36
  return sky;
12
37
  }, [scale]);
13
38
  useEffect(() => {
@@ -28,7 +53,7 @@ const SkyMesh = React.forwardRef(({ settings, scale = 1000, onObjectReady, onObj
28
53
  else if (ref)
29
54
  ref.current = node;
30
55
  };
31
- return (_jsx("primitive", { ref: combinedRef, object: skyObject, visible: settings.visible, scale: scale, userData: { id: '3drise-sky' } }));
56
+ return (_jsx("primitive", { ref: combinedRef, object: skyObject, visible: settings.visible, scale: scale }));
32
57
  });
33
58
  SkyMesh.displayName = 'SkyMesh';
34
59
  export default SkyMesh;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { SkySettings, SkyStarsSettings, TimeSettings } from '@3driseai/3drise-core';
3
+ export interface SkyStarsProps {
4
+ timeSettings: TimeSettings;
5
+ skySettings?: SkySettings;
6
+ /** The stars block of SkySettings; missing fields fill in from SKY_STARS_DEFAULTS. */
7
+ stars?: SkyStarsSettings | null;
8
+ }
9
+ declare const SkyStars: React.FC<SkyStarsProps>;
10
+ export default SkyStars;
11
+ //# sourceMappingURL=SkyStars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkyStars.d.ts","sourceRoot":"","sources":["../../src/components/SkyStars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGzF,MAAM,WAAW,aAAa;IAC1B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sFAAsF;IACtF,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACnC;AA4HD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA8DrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}