@3driseai/3drise-viewer 0.1.1

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 (547) hide show
  1. package/dist/components/AnimatedObject.d.ts +22 -0
  2. package/dist/components/AnimatedObject.d.ts.map +1 -0
  3. package/dist/components/AnimatedObject.js +65 -0
  4. package/dist/components/Bubbles.d.ts +9 -0
  5. package/dist/components/Bubbles.d.ts.map +1 -0
  6. package/dist/components/Bubbles.js +105 -0
  7. package/dist/components/CameraController.d.ts +10 -0
  8. package/dist/components/CameraController.d.ts.map +1 -0
  9. package/dist/components/CameraController.js +158 -0
  10. package/dist/components/Clouds.d.ts +9 -0
  11. package/dist/components/Clouds.d.ts.map +1 -0
  12. package/dist/components/Clouds.js +278 -0
  13. package/dist/components/Corona.d.ts +18 -0
  14. package/dist/components/Corona.d.ts.map +1 -0
  15. package/dist/components/Corona.js +12 -0
  16. package/dist/components/CreatedObject.d.ts +14 -0
  17. package/dist/components/CreatedObject.d.ts.map +1 -0
  18. package/dist/components/CreatedObject.js +103 -0
  19. package/dist/components/CustomPrimitive.d.ts +12 -0
  20. package/dist/components/CustomPrimitive.d.ts.map +1 -0
  21. package/dist/components/CustomPrimitive.js +87 -0
  22. package/dist/components/Earth.d.ts +8 -0
  23. package/dist/components/Earth.d.ts.map +1 -0
  24. package/dist/components/Earth.js +38 -0
  25. package/dist/components/EffectsGenerator.d.ts +10 -0
  26. package/dist/components/EffectsGenerator.d.ts.map +1 -0
  27. package/dist/components/EffectsGenerator.js +71 -0
  28. package/dist/components/EffectsGroup.d.ts +8 -0
  29. package/dist/components/EffectsGroup.d.ts.map +1 -0
  30. package/dist/components/EffectsGroup.js +11 -0
  31. package/dist/components/EnvironmentManager.d.ts +9 -0
  32. package/dist/components/EnvironmentManager.d.ts.map +1 -0
  33. package/dist/components/EnvironmentManager.js +74 -0
  34. package/dist/components/EnvironmentObject.d.ts +8 -0
  35. package/dist/components/EnvironmentObject.d.ts.map +1 -0
  36. package/dist/components/EnvironmentObject.js +14 -0
  37. package/dist/components/Flares.d.ts +24 -0
  38. package/dist/components/Flares.d.ts.map +1 -0
  39. package/dist/components/Flares.js +134 -0
  40. package/dist/components/Frame.d.ts +23 -0
  41. package/dist/components/Frame.d.ts.map +1 -0
  42. package/dist/components/Frame.js +55 -0
  43. package/dist/components/FrameGeometry.d.ts +10 -0
  44. package/dist/components/FrameGeometry.d.ts.map +1 -0
  45. package/dist/components/FrameGeometry.js +17 -0
  46. package/dist/components/FrameImage.d.ts +2 -0
  47. package/dist/components/FrameImage.d.ts.map +1 -0
  48. package/dist/components/FrameImage.js +15 -0
  49. package/dist/components/Galaxy.d.ts +10 -0
  50. package/dist/components/Galaxy.d.ts.map +1 -0
  51. package/dist/components/Galaxy.js +29 -0
  52. package/dist/components/GalleryLayout.d.ts +12 -0
  53. package/dist/components/GalleryLayout.d.ts.map +1 -0
  54. package/dist/components/GalleryLayout.js +20 -0
  55. package/dist/components/GeometryShape.d.ts +54 -0
  56. package/dist/components/GeometryShape.d.ts.map +1 -0
  57. package/dist/components/GeometryShape.js +318 -0
  58. package/dist/components/Glyphs.d.ts +9 -0
  59. package/dist/components/Glyphs.d.ts.map +1 -0
  60. package/dist/components/Glyphs.js +58 -0
  61. package/dist/components/GridHelper.d.ts +23 -0
  62. package/dist/components/GridHelper.d.ts.map +1 -0
  63. package/dist/components/GridHelper.js +36 -0
  64. package/dist/components/GridsGenerator.d.ts +10 -0
  65. package/dist/components/GridsGenerator.d.ts.map +1 -0
  66. package/dist/components/GridsGenerator.js +14 -0
  67. package/dist/components/HdrPlaylistRenderer.d.ts +10 -0
  68. package/dist/components/HdrPlaylistRenderer.d.ts.map +1 -0
  69. package/dist/components/HdrPlaylistRenderer.js +364 -0
  70. package/dist/components/ImageGeometry.d.ts +13 -0
  71. package/dist/components/ImageGeometry.d.ts.map +1 -0
  72. package/dist/components/ImageGeometry.js +62 -0
  73. package/dist/components/Lensflare.d.ts +12 -0
  74. package/dist/components/Lensflare.d.ts.map +1 -0
  75. package/dist/components/Lensflare.js +66 -0
  76. package/dist/components/Letter.d.ts +19 -0
  77. package/dist/components/Letter.d.ts.map +1 -0
  78. package/dist/components/Letter.js +83 -0
  79. package/dist/components/Letters.d.ts +16 -0
  80. package/dist/components/Letters.d.ts.map +1 -0
  81. package/dist/components/Letters.js +18 -0
  82. package/dist/components/LightObject.d.ts +8 -0
  83. package/dist/components/LightObject.d.ts.map +1 -0
  84. package/dist/components/LightObject.js +65 -0
  85. package/dist/components/LightsManager.d.ts +8 -0
  86. package/dist/components/LightsManager.d.ts.map +1 -0
  87. package/dist/components/LightsManager.js +104 -0
  88. package/dist/components/Lines.d.ts +9 -0
  89. package/dist/components/Lines.d.ts.map +1 -0
  90. package/dist/components/Lines.js +19 -0
  91. package/dist/components/LoadingIndicator.d.ts +10 -0
  92. package/dist/components/LoadingIndicator.d.ts.map +1 -0
  93. package/dist/components/LoadingIndicator.js +6 -0
  94. package/dist/components/MaterialLibrary.d.ts +9 -0
  95. package/dist/components/MaterialLibrary.d.ts.map +1 -0
  96. package/dist/components/MaterialLibrary.js +57 -0
  97. package/dist/components/Moon.d.ts +13 -0
  98. package/dist/components/Moon.d.ts.map +1 -0
  99. package/dist/components/Moon.js +66 -0
  100. package/dist/components/MyGrid.d.ts +15 -0
  101. package/dist/components/MyGrid.d.ts.map +1 -0
  102. package/dist/components/MyGrid.js +72 -0
  103. package/dist/components/ObjectNode.d.ts +13 -0
  104. package/dist/components/ObjectNode.d.ts.map +1 -0
  105. package/dist/components/ObjectNode.js +139 -0
  106. package/dist/components/ObjectNodeApi.d.ts +13 -0
  107. package/dist/components/ObjectNodeApi.d.ts.map +1 -0
  108. package/dist/components/ObjectNodeApi.js +18 -0
  109. package/dist/components/ObjectsRenderer.d.ts +15 -0
  110. package/dist/components/ObjectsRenderer.d.ts.map +1 -0
  111. package/dist/components/ObjectsRenderer.js +40 -0
  112. package/dist/components/ObjectsRendererApi.d.ts +31 -0
  113. package/dist/components/ObjectsRendererApi.d.ts.map +1 -0
  114. package/dist/components/ObjectsRendererApi.js +76 -0
  115. package/dist/components/Ocean.d.ts +8 -0
  116. package/dist/components/Ocean.d.ts.map +1 -0
  117. package/dist/components/Ocean.js +169 -0
  118. package/dist/components/Outline.d.ts +21 -0
  119. package/dist/components/Outline.d.ts.map +1 -0
  120. package/dist/components/Outline.js +14 -0
  121. package/dist/components/ParticlesR3f.d.ts +11 -0
  122. package/dist/components/ParticlesR3f.d.ts.map +1 -0
  123. package/dist/components/ParticlesR3f.js +110 -0
  124. package/dist/components/Path.d.ts +13 -0
  125. package/dist/components/Path.d.ts.map +1 -0
  126. package/dist/components/Path.js +41 -0
  127. package/dist/components/PathGeometry.d.ts +11 -0
  128. package/dist/components/PathGeometry.d.ts.map +1 -0
  129. package/dist/components/PathGeometry.js +109 -0
  130. package/dist/components/PathRenderer.d.ts +12 -0
  131. package/dist/components/PathRenderer.d.ts.map +1 -0
  132. package/dist/components/PathRenderer.js +36 -0
  133. package/dist/components/Planet.d.ts +16 -0
  134. package/dist/components/Planet.d.ts.map +1 -0
  135. package/dist/components/Planet.js +60 -0
  136. package/dist/components/PointCloud.d.ts +10 -0
  137. package/dist/components/PointCloud.d.ts.map +1 -0
  138. package/dist/components/PointCloud.js +113 -0
  139. package/dist/components/ProductionScene.d.ts +5 -0
  140. package/dist/components/ProductionScene.d.ts.map +1 -0
  141. package/dist/components/ProductionScene.js +7 -0
  142. package/dist/components/ProjectLoader.d.ts +16 -0
  143. package/dist/components/ProjectLoader.d.ts.map +1 -0
  144. package/dist/components/ProjectLoader.js +85 -0
  145. package/dist/components/Rain.d.ts +8 -0
  146. package/dist/components/Rain.d.ts.map +1 -0
  147. package/dist/components/Rain.js +259 -0
  148. package/dist/components/RiseLogo.d.ts +19 -0
  149. package/dist/components/RiseLogo.d.ts.map +1 -0
  150. package/dist/components/RiseLogo.js +75 -0
  151. package/dist/components/SceneBuilder.d.ts +5 -0
  152. package/dist/components/SceneBuilder.d.ts.map +1 -0
  153. package/dist/components/SceneBuilder.js +133 -0
  154. package/dist/components/SceneFog.d.ts +8 -0
  155. package/dist/components/SceneFog.d.ts.map +1 -0
  156. package/dist/components/SceneFog.js +19 -0
  157. package/dist/components/Shape.d.ts +5 -0
  158. package/dist/components/Shape.d.ts.map +1 -0
  159. package/dist/components/Shape.js +11 -0
  160. package/dist/components/ShootingStar.d.ts +16 -0
  161. package/dist/components/ShootingStar.d.ts.map +1 -0
  162. package/dist/components/ShootingStar.js +92 -0
  163. package/dist/components/ShootingStars.d.ts +8 -0
  164. package/dist/components/ShootingStars.d.ts.map +1 -0
  165. package/dist/components/ShootingStars.js +41 -0
  166. package/dist/components/SkyController.d.ts +10 -0
  167. package/dist/components/SkyController.d.ts.map +1 -0
  168. package/dist/components/SkyController.js +208 -0
  169. package/dist/components/SkyMesh.d.ts +10 -0
  170. package/dist/components/SkyMesh.d.ts.map +1 -0
  171. package/dist/components/SkyMesh.js +36 -0
  172. package/dist/components/SkySystem.d.ts +32 -0
  173. package/dist/components/SkySystem.d.ts.map +1 -0
  174. package/dist/components/SkySystem.js +46 -0
  175. package/dist/components/Skybox.d.ts +12 -0
  176. package/dist/components/Skybox.d.ts.map +1 -0
  177. package/dist/components/Skybox.js +92 -0
  178. package/dist/components/SolarSystem.d.ts +8 -0
  179. package/dist/components/SolarSystem.d.ts.map +1 -0
  180. package/dist/components/SolarSystem.js +77 -0
  181. package/dist/components/SparklesBurst.d.ts +9 -0
  182. package/dist/components/SparklesBurst.d.ts.map +1 -0
  183. package/dist/components/SparklesBurst.js +62 -0
  184. package/dist/components/Stars.d.ts +15 -0
  185. package/dist/components/Stars.d.ts.map +1 -0
  186. package/dist/components/Stars.js +250 -0
  187. package/dist/components/Sun.d.ts +15 -0
  188. package/dist/components/Sun.d.ts.map +1 -0
  189. package/dist/components/Sun.js +7 -0
  190. package/dist/components/SunCore.d.ts +18 -0
  191. package/dist/components/SunCore.d.ts.map +1 -0
  192. package/dist/components/SunCore.js +14 -0
  193. package/dist/components/SunLight.d.ts +15 -0
  194. package/dist/components/SunLight.d.ts.map +1 -0
  195. package/dist/components/SunLight.js +57 -0
  196. package/dist/components/Text2D.d.ts +9 -0
  197. package/dist/components/Text2D.d.ts.map +1 -0
  198. package/dist/components/Text2D.js +56 -0
  199. package/dist/components/Text3D.d.ts +10 -0
  200. package/dist/components/Text3D.d.ts.map +1 -0
  201. package/dist/components/Text3D.js +8 -0
  202. package/dist/components/VolumePoints.d.ts +19 -0
  203. package/dist/components/VolumePoints.d.ts.map +1 -0
  204. package/dist/components/VolumePoints.js +8 -0
  205. package/dist/components/cursor/AuraCursor.d.ts +6 -0
  206. package/dist/components/cursor/AuraCursor.d.ts.map +1 -0
  207. package/dist/components/cursor/AuraCursor.js +30 -0
  208. package/dist/components/cursor/AuroraCursor.d.ts +6 -0
  209. package/dist/components/cursor/AuroraCursor.d.ts.map +1 -0
  210. package/dist/components/cursor/AuroraCursor.js +207 -0
  211. package/dist/components/cursor/BubblesCursor.d.ts +6 -0
  212. package/dist/components/cursor/BubblesCursor.d.ts.map +1 -0
  213. package/dist/components/cursor/BubblesCursor.js +184 -0
  214. package/dist/components/cursor/CometCursor.d.ts +6 -0
  215. package/dist/components/cursor/CometCursor.d.ts.map +1 -0
  216. package/dist/components/cursor/CometCursor.js +191 -0
  217. package/dist/components/cursor/CrosshairCursor.d.ts +6 -0
  218. package/dist/components/cursor/CrosshairCursor.d.ts.map +1 -0
  219. package/dist/components/cursor/CrosshairCursor.js +142 -0
  220. package/dist/components/cursor/CursorActions.d.ts +8 -0
  221. package/dist/components/cursor/CursorActions.d.ts.map +1 -0
  222. package/dist/components/cursor/CursorActions.js +124 -0
  223. package/dist/components/cursor/CursorController.d.ts +10 -0
  224. package/dist/components/cursor/CursorController.d.ts.map +1 -0
  225. package/dist/components/cursor/CursorController.js +5 -0
  226. package/dist/components/cursor/CursorEffects.d.ts +16 -0
  227. package/dist/components/cursor/CursorEffects.d.ts.map +1 -0
  228. package/dist/components/cursor/CursorEffects.js +110 -0
  229. package/dist/components/cursor/FerrofluidCursor.d.ts +6 -0
  230. package/dist/components/cursor/FerrofluidCursor.d.ts.map +1 -0
  231. package/dist/components/cursor/FerrofluidCursor.js +102 -0
  232. package/dist/components/cursor/GlyphRingCursor.d.ts +6 -0
  233. package/dist/components/cursor/GlyphRingCursor.d.ts.map +1 -0
  234. package/dist/components/cursor/GlyphRingCursor.js +123 -0
  235. package/dist/components/cursor/LightningCursor.d.ts +6 -0
  236. package/dist/components/cursor/LightningCursor.d.ts.map +1 -0
  237. package/dist/components/cursor/LightningCursor.js +28 -0
  238. package/dist/components/cursor/LiquidMetalCursor.d.ts +6 -0
  239. package/dist/components/cursor/LiquidMetalCursor.d.ts.map +1 -0
  240. package/dist/components/cursor/LiquidMetalCursor.js +61 -0
  241. package/dist/components/cursor/OrbCursor.d.ts +6 -0
  242. package/dist/components/cursor/OrbCursor.d.ts.map +1 -0
  243. package/dist/components/cursor/OrbCursor.js +32 -0
  244. package/dist/components/cursor/PlasmaWhipCursor.d.ts +6 -0
  245. package/dist/components/cursor/PlasmaWhipCursor.d.ts.map +1 -0
  246. package/dist/components/cursor/PlasmaWhipCursor.js +134 -0
  247. package/dist/components/cursor/SparklesCursor.d.ts +6 -0
  248. package/dist/components/cursor/SparklesCursor.d.ts.map +1 -0
  249. package/dist/components/cursor/SparklesCursor.js +151 -0
  250. package/dist/components/cursor/TeslaCursor.d.ts +6 -0
  251. package/dist/components/cursor/TeslaCursor.d.ts.map +1 -0
  252. package/dist/components/cursor/TeslaCursor.js +223 -0
  253. package/dist/components/cursor/clickActions/BoltFlashAction.d.ts +11 -0
  254. package/dist/components/cursor/clickActions/BoltFlashAction.d.ts.map +1 -0
  255. package/dist/components/cursor/clickActions/BoltFlashAction.js +62 -0
  256. package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts +11 -0
  257. package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts.map +1 -0
  258. package/dist/components/cursor/clickActions/GlyphInscriptionAction.js +114 -0
  259. package/dist/components/cursor/clickActions/ImplosionAction.d.ts +11 -0
  260. package/dist/components/cursor/clickActions/ImplosionAction.d.ts.map +1 -0
  261. package/dist/components/cursor/clickActions/ImplosionAction.js +93 -0
  262. package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts +11 -0
  263. package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts.map +1 -0
  264. package/dist/components/cursor/clickActions/PhaseShiftAction.js +71 -0
  265. package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts +11 -0
  266. package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts.map +1 -0
  267. package/dist/components/cursor/clickActions/PlasmaBombAction.js +98 -0
  268. package/dist/components/cursor/clickActions/RealityTearAction.d.ts +11 -0
  269. package/dist/components/cursor/clickActions/RealityTearAction.d.ts.map +1 -0
  270. package/dist/components/cursor/clickActions/RealityTearAction.js +92 -0
  271. package/dist/components/cursor/clickActions/ShockwaveAction.d.ts +11 -0
  272. package/dist/components/cursor/clickActions/ShockwaveAction.d.ts.map +1 -0
  273. package/dist/components/cursor/clickActions/ShockwaveAction.js +55 -0
  274. package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts +11 -0
  275. package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts.map +1 -0
  276. package/dist/components/cursor/clickActions/SparklesBurstAction.js +99 -0
  277. package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts +11 -0
  278. package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts.map +1 -0
  279. package/dist/components/cursor/clickActions/VoronoiFractureAction.js +149 -0
  280. package/dist/components/effects/AuraEffect.d.ts +10 -0
  281. package/dist/components/effects/AuraEffect.d.ts.map +1 -0
  282. package/dist/components/effects/AuraEffect.js +127 -0
  283. package/dist/components/effects/AuroraEffect.d.ts +10 -0
  284. package/dist/components/effects/AuroraEffect.d.ts.map +1 -0
  285. package/dist/components/effects/AuroraEffect.js +112 -0
  286. package/dist/components/effects/BlackHoleEffect.d.ts +10 -0
  287. package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -0
  288. package/dist/components/effects/BlackHoleEffect.js +193 -0
  289. package/dist/components/effects/ConstellationEffect.d.ts +10 -0
  290. package/dist/components/effects/ConstellationEffect.d.ts.map +1 -0
  291. package/dist/components/effects/ConstellationEffect.js +189 -0
  292. package/dist/components/effects/DataStreamEffect.d.ts +10 -0
  293. package/dist/components/effects/DataStreamEffect.d.ts.map +1 -0
  294. package/dist/components/effects/DataStreamEffect.js +138 -0
  295. package/dist/components/effects/DnaHelixEffect.d.ts +10 -0
  296. package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -0
  297. package/dist/components/effects/DnaHelixEffect.js +311 -0
  298. package/dist/components/effects/Fire.d.ts +20 -0
  299. package/dist/components/effects/Fire.d.ts.map +1 -0
  300. package/dist/components/effects/Fire.js +208 -0
  301. package/dist/components/effects/FireEffect.d.ts +10 -0
  302. package/dist/components/effects/FireEffect.d.ts.map +1 -0
  303. package/dist/components/effects/FireEffect.js +194 -0
  304. package/dist/components/effects/ForcefieldEffect.d.ts +10 -0
  305. package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -0
  306. package/dist/components/effects/ForcefieldEffect.js +132 -0
  307. package/dist/components/effects/HologramEffect.d.ts +10 -0
  308. package/dist/components/effects/HologramEffect.d.ts.map +1 -0
  309. package/dist/components/effects/HologramEffect.js +143 -0
  310. package/dist/components/effects/IceCrystalsEffect.d.ts +10 -0
  311. package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -0
  312. package/dist/components/effects/IceCrystalsEffect.js +190 -0
  313. package/dist/components/effects/LightningEffect.d.ts +10 -0
  314. package/dist/components/effects/LightningEffect.d.ts.map +1 -0
  315. package/dist/components/effects/LightningEffect.js +240 -0
  316. package/dist/components/effects/MoleculesEffect.d.ts +10 -0
  317. package/dist/components/effects/MoleculesEffect.d.ts.map +1 -0
  318. package/dist/components/effects/MoleculesEffect.js +173 -0
  319. package/dist/components/effects/NeuralNetworkEffect.d.ts +10 -0
  320. package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -0
  321. package/dist/components/effects/NeuralNetworkEffect.js +188 -0
  322. package/dist/components/effects/OrbEffect.d.ts +10 -0
  323. package/dist/components/effects/OrbEffect.d.ts.map +1 -0
  324. package/dist/components/effects/OrbEffect.js +291 -0
  325. package/dist/components/effects/PortalEffect.d.ts +10 -0
  326. package/dist/components/effects/PortalEffect.d.ts.map +1 -0
  327. package/dist/components/effects/PortalEffect.js +191 -0
  328. package/dist/components/effects/ShockwaveEffect.d.ts +10 -0
  329. package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -0
  330. package/dist/components/effects/ShockwaveEffect.js +160 -0
  331. package/dist/components/effects/SmokePlumeEffect.d.ts +10 -0
  332. package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -0
  333. package/dist/components/effects/SmokePlumeEffect.js +141 -0
  334. package/dist/components/effects/SmokeRibbon.d.ts +13 -0
  335. package/dist/components/effects/SmokeRibbon.d.ts.map +1 -0
  336. package/dist/components/effects/SmokeRibbon.js +69 -0
  337. package/dist/components/effects/SmokeRingEffect.d.ts +10 -0
  338. package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -0
  339. package/dist/components/effects/SmokeRingEffect.js +158 -0
  340. package/dist/components/effects/VolumetricFogEffect.d.ts +10 -0
  341. package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -0
  342. package/dist/components/effects/VolumetricFogEffect.js +111 -0
  343. package/dist/components/extractOutline.d.ts +18 -0
  344. package/dist/components/extractOutline.d.ts.map +1 -0
  345. package/dist/components/extractOutline.js +47 -0
  346. package/dist/constants.d.ts +2 -0
  347. package/dist/constants.d.ts.map +1 -0
  348. package/dist/constants.js +5 -0
  349. package/dist/hooks/index.d.ts +1 -0
  350. package/dist/hooks/index.d.ts.map +1 -0
  351. package/dist/hooks/index.js +1 -0
  352. package/dist/hooks/use3driseShader.d.ts +17 -0
  353. package/dist/hooks/use3driseShader.d.ts.map +1 -0
  354. package/dist/hooks/use3driseShader.js +100 -0
  355. package/dist/hooks/useAnimationEvents.d.ts +10 -0
  356. package/dist/hooks/useAnimationEvents.d.ts.map +1 -0
  357. package/dist/hooks/useAnimationEvents.js +49 -0
  358. package/dist/hooks/useCameraAnimation.d.ts +35 -0
  359. package/dist/hooks/useCameraAnimation.d.ts.map +1 -0
  360. package/dist/hooks/useCameraAnimation.js +277 -0
  361. package/dist/hooks/useContinuousEffects.d.ts +15 -0
  362. package/dist/hooks/useContinuousEffects.d.ts.map +1 -0
  363. package/dist/hooks/useContinuousEffects.js +177 -0
  364. package/dist/hooks/useCubeCamera.d.ts +18 -0
  365. package/dist/hooks/useCubeCamera.d.ts.map +1 -0
  366. package/dist/hooks/useCubeCamera.js +73 -0
  367. package/dist/hooks/useEnvironmentEffects.d.ts +12 -0
  368. package/dist/hooks/useEnvironmentEffects.d.ts.map +1 -0
  369. package/dist/hooks/useEnvironmentEffects.js +22 -0
  370. package/dist/hooks/useFrameAnimations.d.ts +24 -0
  371. package/dist/hooks/useFrameAnimations.d.ts.map +1 -0
  372. package/dist/hooks/useFrameAnimations.js +217 -0
  373. package/dist/hooks/useFrameEffects.d.ts +6 -0
  374. package/dist/hooks/useFrameEffects.d.ts.map +1 -0
  375. package/dist/hooks/useFrameEffects.js +19 -0
  376. package/dist/hooks/useGsapAnimation.d.ts +122 -0
  377. package/dist/hooks/useGsapAnimation.d.ts.map +1 -0
  378. package/dist/hooks/useGsapAnimation.js +316 -0
  379. package/dist/hooks/useInteraction.d.ts +12 -0
  380. package/dist/hooks/useInteraction.d.ts.map +1 -0
  381. package/dist/hooks/useInteraction.js +273 -0
  382. package/dist/hooks/useInteractionEffects.d.ts +11 -0
  383. package/dist/hooks/useInteractionEffects.d.ts.map +1 -0
  384. package/dist/hooks/useInteractionEffects.js +74 -0
  385. package/dist/hooks/useKey.d.ts +26 -0
  386. package/dist/hooks/useKey.d.ts.map +1 -0
  387. package/dist/hooks/useKey.js +73 -0
  388. package/dist/hooks/useLightAnimation.d.ts +10 -0
  389. package/dist/hooks/useLightAnimation.d.ts.map +1 -0
  390. package/dist/hooks/useLightAnimation.js +34 -0
  391. package/dist/hooks/useLightHandlers.d.ts +14 -0
  392. package/dist/hooks/useLightHandlers.d.ts.map +1 -0
  393. package/dist/hooks/useLightHandlers.js +116 -0
  394. package/dist/hooks/useLightMouseMove.d.ts +11 -0
  395. package/dist/hooks/useLightMouseMove.d.ts.map +1 -0
  396. package/dist/hooks/useLightMouseMove.js +27 -0
  397. package/dist/hooks/useLightShadow.d.ts +6 -0
  398. package/dist/hooks/useLightShadow.d.ts.map +1 -0
  399. package/dist/hooks/useLightShadow.js +63 -0
  400. package/dist/hooks/useMaterialApplication.d.ts +4 -0
  401. package/dist/hooks/useMaterialApplication.d.ts.map +1 -0
  402. package/dist/hooks/useMaterialApplication.js +157 -0
  403. package/dist/hooks/useMaterialOptions.d.ts +14 -0
  404. package/dist/hooks/useMaterialOptions.d.ts.map +1 -0
  405. package/dist/hooks/useMaterialOptions.js +118 -0
  406. package/dist/hooks/useMaterialUniforms.d.ts +18 -0
  407. package/dist/hooks/useMaterialUniforms.d.ts.map +1 -0
  408. package/dist/hooks/useMaterialUniforms.js +96 -0
  409. package/dist/hooks/useMeshController.d.ts +3 -0
  410. package/dist/hooks/useMeshController.d.ts.map +1 -0
  411. package/dist/hooks/useMeshController.js +168 -0
  412. package/dist/hooks/useMouseHandlers.d.ts +8 -0
  413. package/dist/hooks/useMouseHandlers.d.ts.map +1 -0
  414. package/dist/hooks/useMouseHandlers.js +47 -0
  415. package/dist/hooks/useNumericAnimation.d.ts +5 -0
  416. package/dist/hooks/useNumericAnimation.d.ts.map +1 -0
  417. package/dist/hooks/useNumericAnimation.js +42 -0
  418. package/dist/hooks/useObjectAnimation.d.ts +13 -0
  419. package/dist/hooks/useObjectAnimation.d.ts.map +1 -0
  420. package/dist/hooks/useObjectAnimation.js +35 -0
  421. package/dist/hooks/useObjectEdges.d.ts +3 -0
  422. package/dist/hooks/useObjectEdges.d.ts.map +1 -0
  423. package/dist/hooks/useObjectEdges.js +199 -0
  424. package/dist/hooks/useObjectEffects.d.ts +23 -0
  425. package/dist/hooks/useObjectEffects.d.ts.map +1 -0
  426. package/dist/hooks/useObjectEffects.js +162 -0
  427. package/dist/hooks/useOrbitControls.d.ts +7 -0
  428. package/dist/hooks/useOrbitControls.d.ts.map +1 -0
  429. package/dist/hooks/useOrbitControls.js +9 -0
  430. package/dist/hooks/useOutline.d.ts +9 -0
  431. package/dist/hooks/useOutline.d.ts.map +1 -0
  432. package/dist/hooks/useOutline.js +14 -0
  433. package/dist/hooks/useParticlePositions.d.ts +19 -0
  434. package/dist/hooks/useParticlePositions.d.ts.map +1 -0
  435. package/dist/hooks/useParticlePositions.js +56 -0
  436. package/dist/hooks/useParticlesColors.d.ts +14 -0
  437. package/dist/hooks/useParticlesColors.d.ts.map +1 -0
  438. package/dist/hooks/useParticlesColors.js +27 -0
  439. package/dist/hooks/useParticlesTextures.d.ts +10 -0
  440. package/dist/hooks/useParticlesTextures.d.ts.map +1 -0
  441. package/dist/hooks/useParticlesTextures.js +23 -0
  442. package/dist/hooks/usePathAnimation.d.ts +26 -0
  443. package/dist/hooks/usePathAnimation.d.ts.map +1 -0
  444. package/dist/hooks/usePathAnimation.js +130 -0
  445. package/dist/hooks/useSequenceAnimation.d.ts +14 -0
  446. package/dist/hooks/useSequenceAnimation.d.ts.map +1 -0
  447. package/dist/hooks/useSequenceAnimation.js +260 -0
  448. package/dist/hooks/useShadowApplication.d.ts +3 -0
  449. package/dist/hooks/useShadowApplication.d.ts.map +1 -0
  450. package/dist/hooks/useShadowApplication.js +31 -0
  451. package/dist/hooks/useShapeGeometry.d.ts +8 -0
  452. package/dist/hooks/useShapeGeometry.d.ts.map +1 -0
  453. package/dist/hooks/useShapeGeometry.js +12 -0
  454. package/dist/hooks/useSkyAnimation.d.ts +13 -0
  455. package/dist/hooks/useSkyAnimation.d.ts.map +1 -0
  456. package/dist/hooks/useSkyAnimation.js +36 -0
  457. package/dist/hooks/useSkySystem.d.ts +25 -0
  458. package/dist/hooks/useSkySystem.d.ts.map +1 -0
  459. package/dist/hooks/useSkySystem.js +59 -0
  460. package/dist/hooks/useSkyUniforms.d.ts +18 -0
  461. package/dist/hooks/useSkyUniforms.d.ts.map +1 -0
  462. package/dist/hooks/useSkyUniforms.js +71 -0
  463. package/dist/hooks/useTransformControls.d.ts +6 -0
  464. package/dist/hooks/useTransformControls.d.ts.map +1 -0
  465. package/dist/hooks/useTransformControls.js +111 -0
  466. package/dist/hooks/useVolumePoints.d.ts +9 -0
  467. package/dist/hooks/useVolumePoints.d.ts.map +1 -0
  468. package/dist/hooks/useVolumePoints.js +22 -0
  469. package/dist/hooks/useWaterEnvironment.d.ts +5 -0
  470. package/dist/hooks/useWaterEnvironment.d.ts.map +1 -0
  471. package/dist/hooks/useWaterEnvironment.js +27 -0
  472. package/dist/hooks/useWaterReflections.d.ts +18 -0
  473. package/dist/hooks/useWaterReflections.d.ts.map +1 -0
  474. package/dist/hooks/useWaterReflections.js +84 -0
  475. package/dist/index.d.ts +146 -0
  476. package/dist/index.d.ts.map +1 -0
  477. package/dist/index.js +119 -0
  478. package/dist/services/AnimationsManager.d.ts +33 -0
  479. package/dist/services/AnimationsManager.d.ts.map +1 -0
  480. package/dist/services/AnimationsManager.js +58 -0
  481. package/dist/services/FontManager.d.ts +32 -0
  482. package/dist/services/FontManager.d.ts.map +1 -0
  483. package/dist/services/FontManager.js +76 -0
  484. package/dist/services/TexturesManager.d.ts +17 -0
  485. package/dist/services/TexturesManager.d.ts.map +1 -0
  486. package/dist/services/TexturesManager.js +48 -0
  487. package/dist/shaders/RainMaterial.d.ts +34 -0
  488. package/dist/shaders/RainMaterial.d.ts.map +1 -0
  489. package/dist/shaders/RainMaterial.js +56 -0
  490. package/dist/shaders/ShaderEffectsMaterial.d.ts +228 -0
  491. package/dist/shaders/ShaderEffectsMaterial.d.ts.map +1 -0
  492. package/dist/shaders/ShaderEffectsMaterial.js +233 -0
  493. package/dist/shaders/ShootingStarMaterial.d.ts +14 -0
  494. package/dist/shaders/ShootingStarMaterial.d.ts.map +1 -0
  495. package/dist/shaders/ShootingStarMaterial.js +33 -0
  496. package/dist/shaders/SkyboxMaterial.d.ts +38 -0
  497. package/dist/shaders/SkyboxMaterial.d.ts.map +1 -0
  498. package/dist/shaders/SkyboxMaterial.js +57 -0
  499. package/dist/shaders/effects/EffectsVertexFunctions.glsl.d.ts +2 -0
  500. package/dist/shaders/effects/EffectsVertexFunctions.glsl.d.ts.map +1 -0
  501. package/dist/shaders/effects/EffectsVertexFunctions.glsl.js +115 -0
  502. package/dist/utils/CameraSingleton.d.ts +43 -0
  503. package/dist/utils/CameraSingleton.d.ts.map +1 -0
  504. package/dist/utils/CameraSingleton.js +199 -0
  505. package/dist/utils/anchorUtils.d.ts +10 -0
  506. package/dist/utils/anchorUtils.d.ts.map +1 -0
  507. package/dist/utils/anchorUtils.js +13 -0
  508. package/dist/utils/cursorPicking.d.ts +8 -0
  509. package/dist/utils/cursorPicking.d.ts.map +1 -0
  510. package/dist/utils/cursorPicking.js +35 -0
  511. package/dist/utils/extractOutline.d.ts +18 -0
  512. package/dist/utils/extractOutline.d.ts.map +1 -0
  513. package/dist/utils/extractOutline.js +47 -0
  514. package/dist/utils/frameAnimations.d.ts +49 -0
  515. package/dist/utils/frameAnimations.d.ts.map +1 -0
  516. package/dist/utils/frameAnimations.js +213 -0
  517. package/dist/utils/handleGenerativeEffectsAnimations.d.ts +5 -0
  518. package/dist/utils/handleGenerativeEffectsAnimations.d.ts.map +1 -0
  519. package/dist/utils/handleGenerativeEffectsAnimations.js +268 -0
  520. package/dist/utils/hasHoverAnimation.d.ts +3 -0
  521. package/dist/utils/hasHoverAnimation.d.ts.map +1 -0
  522. package/dist/utils/hasHoverAnimation.js +15 -0
  523. package/dist/utils/materialUtils.d.ts +23 -0
  524. package/dist/utils/materialUtils.d.ts.map +1 -0
  525. package/dist/utils/materialUtils.js +81 -0
  526. package/dist/utils/particleAnimations.d.ts +3 -0
  527. package/dist/utils/particleAnimations.d.ts.map +1 -0
  528. package/dist/utils/particleAnimations.js +17 -0
  529. package/dist/utils/sampleVolume.d.ts +21 -0
  530. package/dist/utils/sampleVolume.d.ts.map +1 -0
  531. package/dist/utils/sampleVolume.js +44 -0
  532. package/dist/utils/sceneQuery.d.ts +9 -0
  533. package/dist/utils/sceneQuery.d.ts.map +1 -0
  534. package/dist/utils/sceneQuery.js +22 -0
  535. package/dist/utils/shaderUtils.d.ts +6 -0
  536. package/dist/utils/shaderUtils.d.ts.map +1 -0
  537. package/dist/utils/shaderUtils.js +151 -0
  538. package/dist/utils/shapes.d.ts +74 -0
  539. package/dist/utils/shapes.d.ts.map +1 -0
  540. package/dist/utils/shapes.js +443 -0
  541. package/dist/utils/textEffects.d.ts +31 -0
  542. package/dist/utils/textEffects.d.ts.map +1 -0
  543. package/dist/utils/textEffects.js +61 -0
  544. package/dist/utils/utils3d.d.ts +7 -0
  545. package/dist/utils/utils3d.d.ts.map +1 -0
  546. package/dist/utils/utils3d.js +34 -0
  547. package/package.json +44 -0
@@ -0,0 +1,177 @@
1
+ import { useRef, useEffect } from "react";
2
+ import { useFrame } from "@react-three/fiber";
3
+ import { animateUniforms, cacheChildrenWithMaterials, handleEdgesAnimations, handleMaterialAnimations, handleMaterialEffects, handleTransformAnimations, handleTransformEffect } from "@3driseai/3drise-core";
4
+ import usePathAnimation from "./usePathAnimation.js";
5
+ // ═══════════════════════════════════════════════════════════════════════════════
6
+ // DEBUG LOGGING
7
+ // ═══════════════════════════════════════════════════════════════════════════════
8
+ export const DEBUG_CONTINUOUS_EFFECTS = false;
9
+ const log = (message, ...args) => {
10
+ if (DEBUG_CONTINUOUS_EFFECTS) {
11
+ console.log(`[ObjectAnimations] ${message}`, ...args);
12
+ }
13
+ };
14
+ export const useContinuousEffects = (
15
+ // object: Object3D | null,
16
+ objectSettings, options = {}, object) => {
17
+ const { enabled = true, animateMaterial = true, hovered = false } = options;
18
+ // console.log("useObjectAnimation called with:", {
19
+ // object
20
+ // });
21
+ // const { object } = ref || {};
22
+ // Path animation hook for animations with pathId
23
+ const { startPathAnimation, updatePathAnimation, isAnimating: isPathAnimating, stopPathAnimation, } = usePathAnimation();
24
+ // ─────────────────────────────────────────────────────────────────────────────
25
+ // REFS
26
+ // ─────────────────────────────────────────────────────────────────────────────
27
+ // Track which path animation is currently active
28
+ const activePathIdRef = useRef(null);
29
+ const effectStateRef = useRef(null);
30
+ // Cache children with materials to avoid traverse() every frame
31
+ const childrenWithMaterialsRef = useRef([]);
32
+ const lastObjectRef = useRef(null);
33
+ // Cache start values for material animations
34
+ const startValuesRef = useRef({});
35
+ // Cache start values for edges animations
36
+ const edgesStartValuesRef = useRef({});
37
+ // ─────────────────────────────────────────────────────────────────────────────
38
+ // DERIVED STATE (read from new continuous structure)
39
+ // ─────────────────────────────────────────────────────────────────────────────
40
+ // Transform domain - now supports multiple effects (one per category)
41
+ const transformAnimations = objectSettings?.animations?.transform?.animations || [];
42
+ const transformEffects = objectSettings?.animations?.transform?.effects || [];
43
+ const enabledTransformEffects = transformEffects.filter(effect => effect.enabled);
44
+ const hasTransformEffects = enabledTransformEffects.length > 0;
45
+ const speed = objectSettings?.config?.speed ?? 1;
46
+ // Skip transform animations if any effect is enabled (effects take precedence)
47
+ const activeTransformAnimations = hasTransformEffects ? [] : transformAnimations;
48
+ const hasTransformAnimations = activeTransformAnimations.length > 0;
49
+ // Edges domain
50
+ const edgesAnimations = objectSettings?.animations?.edges?.animations || [];
51
+ const hasEdgesAnimations = edgesAnimations.length > 0;
52
+ // const effectsAnimations = objectSettings?.effects?.animations || [];
53
+ // const hasEffectsAnimations = effectsAnimations.length > 0;
54
+ // Material domain
55
+ const materialAnimations = objectSettings?.animations?.material?.animations || [];
56
+ const materialEffects = objectSettings?.animations?.material?.effects || [];
57
+ const enabledMaterialEffects = materialEffects.filter(effect => effect.enabled);
58
+ const hasMaterialEffects = enabledMaterialEffects.length > 0;
59
+ // Skip material animations if any effect is enabled (effects take precedence)
60
+ const activeMaterialAnimations = hasMaterialEffects ? [] : materialAnimations;
61
+ const hasMaterialAnimations = activeMaterialAnimations.length > 0;
62
+ // Combined check for any animations
63
+ const hasAnimations = hasTransformAnimations || hasMaterialAnimations;
64
+ // Continuous effects config
65
+ const applyToChildren = false;
66
+ // ─────────────────────────────────────────────────────────────────────────────
67
+ // CACHE CHILDREN WITH MATERIALS
68
+ // ─────────────────────────────────────────────────────────────────────────────
69
+ useEffect(() => {
70
+ if (!object || object === lastObjectRef.current)
71
+ return;
72
+ lastObjectRef.current = object;
73
+ childrenWithMaterialsRef.current = cacheChildrenWithMaterials(object);
74
+ log('cached children with materials', {
75
+ count: childrenWithMaterialsRef.current.length,
76
+ objectName: object.name
77
+ });
78
+ // Reset start values cache when object changes
79
+ startValuesRef.current = {};
80
+ edgesStartValuesRef.current = {};
81
+ }, [object]);
82
+ // ─────────────────────────────────────────────────────────────────────────────
83
+ // PATH ANIMATION LIFECYCLE
84
+ // ─────────────────────────────────────────────────────────────────────────────
85
+ useEffect(() => {
86
+ if (!enabled || !object)
87
+ return;
88
+ // Path animations come from transform.animations
89
+ const animations = objectSettings?.animations?.transform?.animations || [];
90
+ const pathAnimation = animations.find(anim => anim.pathId && anim.active);
91
+ if (pathAnimation?.pathId) {
92
+ // Start path animation if not already active or if pathId changed
93
+ if (activePathIdRef.current !== pathAnimation.pathId) {
94
+ activePathIdRef.current = pathAnimation.pathId;
95
+ log('starting path animation', { pathId: pathAnimation.pathId, duration: pathAnimation.duration });
96
+ startPathAnimation(pathAnimation.pathId, pathAnimation.duration / 1000, {
97
+ ease: pathAnimation.ease,
98
+ loop: pathAnimation.loop,
99
+ yoyo: pathAnimation.yoyo,
100
+ applyRotation: pathAnimation.applyRotation,
101
+ offset: pathAnimation.offset,
102
+ keepOriginalTransform: pathAnimation.keepOriginalTransform,
103
+ });
104
+ }
105
+ }
106
+ else if (activePathIdRef.current) {
107
+ // Stop path animation if no longer active
108
+ // log('stopping path animation', { pathId: activePathIdRef.current });
109
+ stopPathAnimation();
110
+ activePathIdRef.current = null;
111
+ }
112
+ }, [enabled, objectSettings?.animations?.transform?.animations, object, startPathAnimation, stopPathAnimation]);
113
+ // console.log(objectSettings?.meshSettings.name, hovered)
114
+ useFrame((state, delta) => {
115
+ // console.log({
116
+ // enabled,
117
+ // object,
118
+ // objectSettings,
119
+ // })
120
+ if (!enabled || !object || !objectSettings)
121
+ return;
122
+ const time = state.clock.getElapsedTime();
123
+ const mouse = state.pointer;
124
+ const currentTime = Date.now();
125
+ // Update path animation if active
126
+ const pathIsActive = isPathAnimating();
127
+ if (pathIsActive) {
128
+ updatePathAnimation(delta, object);
129
+ }
130
+ // ─────────────────────────────────────────────────────────────────────────
131
+ // TRANSFORM DOMAIN
132
+ // ─────────────────────────────────────────────────────────────────────────
133
+ if (hasTransformAnimations) {
134
+ handleTransformAnimations({
135
+ object,
136
+ meshSettings: objectSettings.meshSettings || {},
137
+ pathIsActive,
138
+ }, activeTransformAnimations, currentTime, hovered);
139
+ }
140
+ // Handle transform effect (wave, float, spin, etc.) - now supports multiple effects
141
+ if (hasTransformEffects) {
142
+ handleTransformEffect(object, enabledTransformEffects, time, delta, effectStateRef, hovered);
143
+ }
144
+ if (hasEdgesAnimations) {
145
+ handleEdgesAnimations({ object, startValuesCache: edgesStartValuesRef.current }, edgesAnimations, currentTime, hovered);
146
+ }
147
+ // ─────────────────────────────────────────────────────────────────────────
148
+ // MATERIAL DOMAIN
149
+ // ─────────────────────────────────────────────────────────────────────────
150
+ if (animateMaterial) {
151
+ // Handle material animations (any material property)
152
+ if (hasMaterialAnimations) {
153
+ handleMaterialAnimations({
154
+ object,
155
+ materialSettings: objectSettings.materialSettings || {},
156
+ startValuesCache: startValuesRef.current,
157
+ }, activeMaterialAnimations, currentTime, hovered);
158
+ }
159
+ // Handle material effects (color effects)
160
+ if (enabledMaterialEffects.length > 0) {
161
+ handleMaterialEffects(object, enabledMaterialEffects, time, delta, effectStateRef, applyToChildren);
162
+ }
163
+ // ─────────────────────────────────────────────────────────────────────────
164
+ // EDGES DOMAIN
165
+ // ─────────────────────────────────────────────────────────────────────────
166
+ // Animate uniforms (u_time, u_mouse, u_camera_position)
167
+ // console.log(time)
168
+ }
169
+ // console.log(enabled)
170
+ animateUniforms(childrenWithMaterialsRef.current, time * speed, mouse, state.camera.position);
171
+ });
172
+ return {
173
+ isPathAnimating,
174
+ effectStateRef,
175
+ };
176
+ };
177
+ export default useContinuousEffects;
@@ -0,0 +1,18 @@
1
+ import * as THREE from 'three';
2
+ import type { TimeSettings, HdrSettings } from '@3driseai/3drise-core';
3
+ export interface UseCubeCameraOptions {
4
+ hdrSettings: HdrSettings;
5
+ skyVisible: boolean;
6
+ sunSystemVisible: boolean;
7
+ timeSettings: TimeSettings;
8
+ resolution?: number;
9
+ position?: THREE.Vector3;
10
+ onEnvironmentUpdate?: (texture: THREE.Texture) => void;
11
+ }
12
+ export declare const useCubeCamera: (options: UseCubeCameraOptions) => {
13
+ cubeCamera: THREE.CubeCamera | null;
14
+ updateEnvironment: () => THREE.Texture | null;
15
+ initializeCubeCamera: () => THREE.CubeCamera | null;
16
+ dispose: () => void;
17
+ };
18
+ //# sourceMappingURL=useCubeCamera.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCubeCamera.d.ts","sourceRoot":"","sources":["../../src/hooks/useCubeCamera.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,oBAAoB,KAAG;IACtD,UAAU,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IAC9C,oBAAoB,EAAE,MAAM,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IACpD,OAAO,EAAE,MAAM,IAAI,CAAC;CAqE3B,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { useRef, useCallback, useEffect } from 'react';
2
+ import { useThree, useFrame } from '@react-three/fiber';
3
+ import * as THREE from 'three';
4
+ import { createCubeCamera, updateCubeCamera, disposeCubeCamera, setSceneEnvironment, clearSceneEnvironment, } from '@3driseai/3drise-core';
5
+ export const useCubeCamera = (options) => {
6
+ const { hdrSettings, skyVisible, sunSystemVisible, timeSettings, resolution = 512, position = new THREE.Vector3(0, 50, 0), onEnvironmentUpdate } = options;
7
+ const { scene, gl: renderer } = useThree();
8
+ const cubeCameraRef = useRef(null);
9
+ const isUpdatingRef = useRef(false);
10
+ const hdrActive = hdrSettings.visible && (hdrSettings.name || (hdrSettings.urls && hdrSettings.urls.length > 0)) ? true : false;
11
+ const initializeCubeCamera = useCallback(() => {
12
+ if (!renderer || !scene)
13
+ return null;
14
+ if (cubeCameraRef.current)
15
+ disposeCubeCamera(cubeCameraRef.current, scene);
16
+ cubeCameraRef.current = createCubeCamera(scene, resolution, position);
17
+ return cubeCameraRef.current;
18
+ }, [scene, renderer, resolution, position]);
19
+ const updateEnvironment = useCallback(() => {
20
+ if (!cubeCameraRef.current || !renderer || !scene)
21
+ return null;
22
+ if (isUpdatingRef.current)
23
+ return null;
24
+ try {
25
+ isUpdatingRef.current = true;
26
+ const texture = updateCubeCamera(cubeCameraRef.current, renderer, scene);
27
+ setSceneEnvironment(scene, texture);
28
+ onEnvironmentUpdate?.(texture);
29
+ return texture;
30
+ }
31
+ catch {
32
+ return null;
33
+ }
34
+ finally {
35
+ isUpdatingRef.current = false;
36
+ }
37
+ }, [scene, renderer, onEnvironmentUpdate]);
38
+ const dispose = useCallback(() => {
39
+ if (cubeCameraRef.current && scene) {
40
+ disposeCubeCamera(cubeCameraRef.current, scene);
41
+ cubeCameraRef.current = null;
42
+ }
43
+ }, [scene]);
44
+ // Create or dispose cube camera based on active sky / HDR state
45
+ useEffect(() => {
46
+ if (hdrActive) {
47
+ dispose();
48
+ return;
49
+ }
50
+ if (skyVisible || sunSystemVisible) {
51
+ initializeCubeCamera();
52
+ updateEnvironment();
53
+ }
54
+ else {
55
+ dispose();
56
+ clearSceneEnvironment(scene);
57
+ }
58
+ }, [hdrActive, skyVisible, sunSystemVisible]);
59
+ // Live update when auto-animating (sky moves, environment changes)
60
+ const UPDATE_INTERVAL_MS = 300;
61
+ useFrame((state) => {
62
+ if (hdrActive || !(skyVisible || sunSystemVisible))
63
+ return;
64
+ if (!timeSettings.autoAnimate)
65
+ return;
66
+ if (state.clock.getElapsedTime() * 1000 > UPDATE_INTERVAL_MS) {
67
+ updateEnvironment();
68
+ }
69
+ });
70
+ // Cleanup on unmount
71
+ useEffect(() => () => dispose(), [dispose]);
72
+ return { cubeCamera: cubeCameraRef.current, updateEnvironment, initializeCubeCamera, dispose };
73
+ };
@@ -0,0 +1,12 @@
1
+ import type { TimeSettings } from '@3driseai/3drise-core';
2
+ export interface UseEnvironmentEffectsOptions {
3
+ updateEnvironment: () => void;
4
+ skyVisible: boolean;
5
+ sunSystemVisible: boolean;
6
+ timeSettings: TimeSettings;
7
+ updateDelay?: number;
8
+ }
9
+ export declare const useEnvironmentEffects: (options: UseEnvironmentEffectsOptions) => {
10
+ triggerUpdate: () => void;
11
+ };
12
+ //# sourceMappingURL=useEnvironmentEffects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEnvironmentEffects.d.ts","sourceRoot":"","sources":["../../src/hooks/useEnvironmentEffects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,4BAA4B;IACzC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,GAAI,SAAS,4BAA4B,KAAG;IACtE,aAAa,EAAE,MAAM,IAAI,CAAC;CAoBjC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { useRef, useCallback, useEffect } from 'react';
2
+ import { createDebouncedUpdate } from '@3driseai/3drise-core';
3
+ export const useEnvironmentEffects = (options) => {
4
+ const { updateEnvironment, skyVisible, sunSystemVisible, timeSettings, updateDelay = 50 } = options;
5
+ const debouncedUpdate = useRef(createDebouncedUpdate(updateEnvironment, updateDelay));
6
+ useEffect(() => {
7
+ debouncedUpdate.current = createDebouncedUpdate(updateEnvironment, updateDelay);
8
+ }, [updateEnvironment, updateDelay]);
9
+ // Trigger debounced update when sky visibility changes
10
+ useEffect(() => {
11
+ debouncedUpdate.current();
12
+ }, [skyVisible, sunSystemVisible]);
13
+ // Trigger update when time settings change
14
+ useEffect(() => {
15
+ if (timeSettings.enabled)
16
+ updateEnvironment();
17
+ }, [timeSettings, updateEnvironment]);
18
+ const triggerUpdate = useCallback(() => {
19
+ updateEnvironment();
20
+ }, [updateEnvironment]);
21
+ return { triggerUpdate };
22
+ };
@@ -0,0 +1,24 @@
1
+ import * as THREE from "three";
2
+ import type { CameraState, Vector2Array } from "@3driseai/3drise-core";
3
+ interface FrameAnimationOptions {
4
+ distance?: number;
5
+ scale?: Vector2Array;
6
+ duration?: number;
7
+ ease?: string;
8
+ onComplete?: () => void;
9
+ onStart?: () => void;
10
+ }
11
+ /**
12
+ * Custom hook for frame animations (moveToFront and zoom)
13
+ * Can be used in any component that needs to animate frames
14
+ */
15
+ export declare const useFrameAnimations: (cameraSettings: CameraState) => {
16
+ moveToFront: (object: THREE.Object3D, options?: FrameAnimationOptions) => void;
17
+ zoomToFrame: (object: THREE.Object3D, options?: FrameAnimationOptions) => void;
18
+ restoreOriginalTransform: (object: THREE.Object3D, options?: FrameAnimationOptions) => void;
19
+ storeOriginalTransform: (object: THREE.Object3D) => void;
20
+ restoreCamera: (options?: FrameAnimationOptions) => void;
21
+ storeOriginalCameraState: () => void;
22
+ };
23
+ export default useFrameAnimations;
24
+ //# sourceMappingURL=useFrameAnimations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFrameAnimations.d.ts","sourceRoot":"","sources":["../../src/hooks/useFrameAnimations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvE,UAAU,qBAAqB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AASD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,gBAAgB,WAAW,KAAG;IACzD,WAAW,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC/E,WAAW,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC/E,wBAAwB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5F,sBAAsB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACzD,wBAAwB,EAAE,MAAM,IAAI,CAAC;CAyM5C,CAAC;AACF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,217 @@
1
+ import * as THREE from "three";
2
+ import { useRef } from "react";
3
+ import cameraManager from "../utils/CameraSingleton.js";
4
+ import { useGsapAnimation } from "../hooks/useGsapAnimation.js";
5
+ import useCameraAnimation from "./useCameraAnimation.js";
6
+ const DEFAULT_OPTIONS = {
7
+ distance: 5,
8
+ scale: [2, 2],
9
+ duration: 1.0,
10
+ ease: "power2.out"
11
+ };
12
+ /**
13
+ * Custom hook for frame animations (moveToFront and zoom)
14
+ * Can be used in any component that needs to animate frames
15
+ */
16
+ export const useFrameAnimations = (cameraSettings) => {
17
+ const { animateObjects } = useGsapAnimation();
18
+ const { animateCamera } = useCameraAnimation({
19
+ autoAnimate: false,
20
+ defaultDuration: 1.0,
21
+ defaultEase: "power2.out"
22
+ });
23
+ // Store original transforms for each object by its UUID - use useRef to persist across renders
24
+ const originalTransformsRef = useRef(new Map());
25
+ const originalTransforms = originalTransformsRef.current;
26
+ // Store original camera state - use useRef to persist across renders
27
+ const originalCameraStateRef = useRef(null);
28
+ /**
29
+ * Stores the current camera position and controls target before animation
30
+ */
31
+ const storeOriginalCameraState = () => {
32
+ if (!originalCameraStateRef.current) {
33
+ const cameraPos = cameraManager.getPosition();
34
+ const currentTarget = cameraSettings.controls.target;
35
+ if (cameraPos && currentTarget) {
36
+ originalCameraStateRef.current = {
37
+ position: cameraPos.clone(),
38
+ target: new THREE.Vector3(currentTarget[0], currentTarget[1], currentTarget[2])
39
+ };
40
+ }
41
+ }
42
+ };
43
+ /**
44
+ * Restores the camera to its original position and controls target
45
+ * @param options - Configuration options for the animation
46
+ */
47
+ const restoreCamera = (options = {}) => {
48
+ const opts = { ...DEFAULT_OPTIONS, ...options };
49
+ const original = originalCameraStateRef.current;
50
+ if (!original) {
51
+ console.warn("No original camera state found");
52
+ return;
53
+ }
54
+ // Animate camera back to original position
55
+ animateCamera({
56
+ position: [original.position.x, original.position.y, original.position.z]
57
+ }, opts.duration, opts.ease, [original.target.x, original.target.y, original.target.z]).then(() => {
58
+ // Clear stored camera state after restoring
59
+ originalCameraStateRef.current = null;
60
+ opts.onComplete?.();
61
+ });
62
+ // Call onStart callback if provided
63
+ opts.onStart?.();
64
+ };
65
+ /**
66
+ * Stores the current transform of an object before animation
67
+ * @param object - The THREE.Group object to store transforms for
68
+ */
69
+ const storeOriginalTransform = (object) => {
70
+ if (!originalTransforms.has(object.uuid)) {
71
+ originalTransforms.set(object.uuid, {
72
+ position: object.position.clone(),
73
+ rotation: object.rotation.clone(),
74
+ scale: object.scale.clone()
75
+ });
76
+ }
77
+ };
78
+ /**
79
+ * Restores an object to its original transform
80
+ * @param object - The THREE.Group object to restore
81
+ * @param options - Configuration options for the animation
82
+ */
83
+ const restoreOriginalTransform = (object, options = {}) => {
84
+ const opts = { ...DEFAULT_OPTIONS, ...options };
85
+ const original = originalTransforms.get(object.uuid);
86
+ if (!original) {
87
+ console.warn("No original transform found for object", object.uuid);
88
+ return;
89
+ }
90
+ // Animate back to original transform
91
+ animateObjects([object], {
92
+ duration: opts.duration,
93
+ ease: opts.ease,
94
+ position: [original.position.x, original.position.y, original.position.z],
95
+ rotation: [original.rotation.x, original.rotation.y, original.rotation.z],
96
+ scale: [original.scale.x, original.scale.y, original.scale.z],
97
+ onComplete: () => {
98
+ // Remove from stored transforms after restoring
99
+ originalTransforms.delete(object.uuid);
100
+ opts.onComplete?.();
101
+ },
102
+ onStart: opts.onStart
103
+ });
104
+ };
105
+ /**
106
+ * Moves a frame to appear in front of the camera
107
+ * The frame will be positioned relative to the camera's current position and direction
108
+ * @param object - The THREE.Group object representing the frame
109
+ * @param options - Configuration options for the animation
110
+ */
111
+ const moveToFront = (object, options = {}) => {
112
+ const opts = { ...DEFAULT_OPTIONS, ...options };
113
+ // Store original transform before animating
114
+ storeOriginalTransform(object);
115
+ // Get camera information from singleton
116
+ const cameraPos = cameraManager.getPosition();
117
+ const cameraDirection = cameraManager.getWorldDirection();
118
+ if (!cameraPos || !cameraDirection) {
119
+ console.warn("Camera not available for moveToFront animation");
120
+ return;
121
+ }
122
+ // Calculate target position in world space (in front of camera)
123
+ const targetWorldPosition = cameraPos.clone()
124
+ .add(cameraDirection.multiplyScalar(opts.distance));
125
+ // Convert world position to local position relative to parent
126
+ const parent = object.parent;
127
+ const targetLocalPosition = targetWorldPosition.clone();
128
+ if (parent) {
129
+ parent.worldToLocal(targetLocalPosition);
130
+ }
131
+ // Calculate rotation to face camera in world space
132
+ const directionToCamera = new THREE.Vector3()
133
+ .subVectors(cameraPos, targetWorldPosition)
134
+ .normalize();
135
+ // Create world quaternion that faces the camera
136
+ const frameDefaultForward = new THREE.Vector3(0, 0, 1);
137
+ const worldQuaternion = new THREE.Quaternion().setFromUnitVectors(frameDefaultForward, directionToCamera);
138
+ // Convert world quaternion to local quaternion relative to parent
139
+ const localQuaternion = worldQuaternion.clone();
140
+ if (parent) {
141
+ const parentWorldQuaternion = new THREE.Quaternion();
142
+ parent.getWorldQuaternion(parentWorldQuaternion);
143
+ const parentWorldQuaternionInverse = parentWorldQuaternion.clone().invert();
144
+ localQuaternion.premultiply(parentWorldQuaternionInverse);
145
+ }
146
+ // Convert local quaternion to Euler angles for GSAP animation
147
+ const targetRotation = new THREE.Euler().setFromQuaternion(localQuaternion);
148
+ // Animate the frame using GSAP
149
+ animateObjects([object], {
150
+ duration: opts.duration,
151
+ ease: opts.ease,
152
+ position: [targetLocalPosition.x, targetLocalPosition.y, targetLocalPosition.z],
153
+ rotation: [targetRotation.x, targetRotation.y, targetRotation.z],
154
+ scale: [opts.scale[0], opts.scale[1], 1],
155
+ onComplete: opts.onComplete,
156
+ onStart: opts.onStart
157
+ });
158
+ };
159
+ /**
160
+ * Zooms the camera to focus on a specific frame
161
+ * The camera will move to a position in front of the frame from the current camera direction
162
+ * @param object - The THREE.Group object representing the frame
163
+ * @param options - Configuration options for the animation
164
+ */
165
+ const zoomToFrame = (object, options = {}) => {
166
+ const opts = { ...DEFAULT_OPTIONS, ...options };
167
+ // Store original camera state before animating
168
+ storeOriginalCameraState();
169
+ // Get current camera position
170
+ const cameraPos = cameraManager.getPosition();
171
+ if (!cameraPos) {
172
+ console.warn("Camera not available for zoomToFrame animation");
173
+ return;
174
+ }
175
+ // Get frame's world position
176
+ const frameWorldPos = new THREE.Vector3();
177
+ object.getWorldPosition(frameWorldPos);
178
+ // Get frame's forward direction in world space (positive Z axis by default)
179
+ const frameForward = new THREE.Vector3(0, 0, 1);
180
+ const frameWorldQuaternion = new THREE.Quaternion();
181
+ object.getWorldQuaternion(frameWorldQuaternion);
182
+ frameForward.applyQuaternion(frameWorldQuaternion);
183
+ // Calculate the direction from frame to current camera position
184
+ const frameToCameraDirection = new THREE.Vector3()
185
+ .subVectors(cameraPos, frameWorldPos)
186
+ .normalize();
187
+ // Determine which side of the frame the camera is on
188
+ // by checking the dot product of the frame's forward vector and the frame-to-camera direction
189
+ const dotProduct = frameForward.dot(frameToCameraDirection);
190
+ // If dot product is negative, camera is on the back side, so flip the forward direction
191
+ const adjustedForward = frameForward.clone();
192
+ if (dotProduct < 0) {
193
+ adjustedForward.negate();
194
+ }
195
+ // Position camera in front of the frame on the same side as current camera position
196
+ const targetCameraPos = frameWorldPos.clone()
197
+ .add(adjustedForward.multiplyScalar(opts.distance));
198
+ // Animate camera to new position
199
+ animateCamera({
200
+ position: [targetCameraPos.x, targetCameraPos.y, targetCameraPos.z]
201
+ }, opts.duration, opts.ease, [frameWorldPos.x, frameWorldPos.y, frameWorldPos.z]).then(() => {
202
+ // Call onComplete callback if provided
203
+ opts.onComplete?.();
204
+ });
205
+ // Call onStart callback if provided
206
+ opts.onStart?.();
207
+ };
208
+ return {
209
+ moveToFront,
210
+ zoomToFrame,
211
+ restoreOriginalTransform,
212
+ storeOriginalTransform,
213
+ restoreCamera,
214
+ storeOriginalCameraState
215
+ };
216
+ };
217
+ export default useFrameAnimations;
@@ -0,0 +1,6 @@
1
+ export declare function useFrameEffects(isActive: boolean): {
2
+ handlePointerEnter: (e: any) => void;
3
+ handlePointerLeave: () => void;
4
+ hovered: boolean;
5
+ };
6
+ //# sourceMappingURL=useFrameEffects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFrameEffects.d.ts","sourceRoot":"","sources":["../../src/hooks/useFrameEffects.ts"],"names":[],"mappings":"AACA,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG;IAC5C,kBAAkB,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;CACpB,CAiBJ"}
@@ -0,0 +1,19 @@
1
+ import { useCallback, useState, useRef } from "react";
2
+ export function useFrameEffects(isActive) {
3
+ const [hovered, setHovered] = useState(false);
4
+ const hoveredRef = useRef(false);
5
+ const handlePointerEnter = useCallback((e) => {
6
+ e.stopPropagation();
7
+ if (!isActive && !hoveredRef.current) {
8
+ hoveredRef.current = true;
9
+ setHovered(true);
10
+ }
11
+ }, [isActive]);
12
+ const handlePointerLeave = useCallback(() => {
13
+ if (!isActive && hoveredRef.current) {
14
+ hoveredRef.current = false;
15
+ setHovered(false);
16
+ }
17
+ }, [isActive]);
18
+ return { handlePointerEnter, handlePointerLeave, hovered };
19
+ }