@3driseai/3drise-viewer 0.1.1 → 0.1.3

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 (331) hide show
  1. package/dist/components/AnimatedObject.d.ts +2 -1
  2. package/dist/components/AnimatedObject.d.ts.map +1 -1
  3. package/dist/components/AnimatedObject.js +11 -3
  4. package/dist/components/Bubbles.d.ts +2 -1
  5. package/dist/components/Bubbles.d.ts.map +1 -1
  6. package/dist/components/Bubbles.js +5 -2
  7. package/dist/components/CameraController.d.ts +9 -1
  8. package/dist/components/CameraController.d.ts.map +1 -1
  9. package/dist/components/CameraController.js +12 -1
  10. package/dist/components/Clouds.d.ts +2 -1
  11. package/dist/components/Clouds.d.ts.map +1 -1
  12. package/dist/components/Clouds.js +3 -1
  13. package/dist/components/CreatedObject.d.ts +2 -2
  14. package/dist/components/CreatedObject.d.ts.map +1 -1
  15. package/dist/components/CreatedObject.js +5 -6
  16. package/dist/components/CustomPrimitive.d.ts +2 -2
  17. package/dist/components/CustomPrimitive.d.ts.map +1 -1
  18. package/dist/components/CustomPrimitive.js +6 -2
  19. package/dist/components/Earth.d.ts +2 -4
  20. package/dist/components/Earth.d.ts.map +1 -1
  21. package/dist/components/Earth.js +6 -4
  22. package/dist/components/EffectsGenerator.d.ts +2 -1
  23. package/dist/components/EffectsGenerator.d.ts.map +1 -1
  24. package/dist/components/EffectsGenerator.js +26 -25
  25. package/dist/components/EffectsGroup.d.ts +2 -1
  26. package/dist/components/EffectsGroup.d.ts.map +1 -1
  27. package/dist/components/EffectsGroup.js +7 -2
  28. package/dist/components/EnvironmentManager.js +2 -2
  29. package/dist/components/EnvironmentObject.d.ts +2 -1
  30. package/dist/components/EnvironmentObject.d.ts.map +1 -1
  31. package/dist/components/EnvironmentObject.js +2 -2
  32. package/dist/components/Frame.d.ts +3 -2
  33. package/dist/components/Frame.d.ts.map +1 -1
  34. package/dist/components/Frame.js +3 -1
  35. package/dist/components/Galaxy.d.ts +2 -3
  36. package/dist/components/Galaxy.d.ts.map +1 -1
  37. package/dist/components/Galaxy.js +10 -10
  38. package/dist/components/GalleryLayout.d.ts +2 -1
  39. package/dist/components/GalleryLayout.d.ts.map +1 -1
  40. package/dist/components/GalleryLayout.js +3 -1
  41. package/dist/components/GeometryShape.d.ts +4 -6
  42. package/dist/components/GeometryShape.d.ts.map +1 -1
  43. package/dist/components/GeometryShape.js +50 -31
  44. package/dist/components/Glyphs.d.ts +2 -1
  45. package/dist/components/Glyphs.d.ts.map +1 -1
  46. package/dist/components/Glyphs.js +6 -2
  47. package/dist/components/GridHelper.d.ts +2 -1
  48. package/dist/components/GridHelper.d.ts.map +1 -1
  49. package/dist/components/GridHelper.js +3 -1
  50. package/dist/components/GridsGenerator.d.ts +2 -1
  51. package/dist/components/GridsGenerator.d.ts.map +1 -1
  52. package/dist/components/GridsGenerator.js +12 -4
  53. package/dist/components/HdrPlaylistRenderer.d.ts +2 -1
  54. package/dist/components/HdrPlaylistRenderer.d.ts.map +1 -1
  55. package/dist/components/HdrPlaylistRenderer.js +3 -1
  56. package/dist/components/Lensflare.d.ts +2 -1
  57. package/dist/components/Lensflare.d.ts.map +1 -1
  58. package/dist/components/Lensflare.js +3 -1
  59. package/dist/components/Letter.d.ts +3 -2
  60. package/dist/components/Letter.d.ts.map +1 -1
  61. package/dist/components/Letter.js +3 -1
  62. package/dist/components/Letters.d.ts +3 -2
  63. package/dist/components/Letters.d.ts.map +1 -1
  64. package/dist/components/Letters.js +3 -1
  65. package/dist/components/LightObject.d.ts +2 -1
  66. package/dist/components/LightObject.d.ts.map +1 -1
  67. package/dist/components/LightObject.js +11 -7
  68. package/dist/components/LightsManager.d.ts +2 -1
  69. package/dist/components/LightsManager.d.ts.map +1 -1
  70. package/dist/components/LightsManager.js +6 -3
  71. package/dist/components/Lines.d.ts +2 -1
  72. package/dist/components/Lines.d.ts.map +1 -1
  73. package/dist/components/Lines.js +2 -2
  74. package/dist/components/Moon.d.ts +2 -3
  75. package/dist/components/Moon.d.ts.map +1 -1
  76. package/dist/components/Moon.js +6 -4
  77. package/dist/components/MyGrid.d.ts +3 -2
  78. package/dist/components/MyGrid.d.ts.map +1 -1
  79. package/dist/components/MyGrid.js +5 -2
  80. package/dist/components/ObjectNode.d.ts +2 -2
  81. package/dist/components/ObjectNode.d.ts.map +1 -1
  82. package/dist/components/ObjectNode.js +29 -24
  83. package/dist/components/ObjectNodeApi.d.ts +2 -2
  84. package/dist/components/ObjectNodeApi.d.ts.map +1 -1
  85. package/dist/components/ObjectNodeApi.js +2 -2
  86. package/dist/components/ObjectsRenderer.d.ts +2 -1
  87. package/dist/components/ObjectsRenderer.d.ts.map +1 -1
  88. package/dist/components/ObjectsRenderer.js +15 -4
  89. package/dist/components/ObjectsRendererApi.d.ts +2 -1
  90. package/dist/components/ObjectsRendererApi.d.ts.map +1 -1
  91. package/dist/components/ObjectsRendererApi.js +2 -2
  92. package/dist/components/Ocean.d.ts +2 -1
  93. package/dist/components/Ocean.d.ts.map +1 -1
  94. package/dist/components/Ocean.js +3 -1
  95. package/dist/components/Outline.d.ts +3 -2
  96. package/dist/components/Outline.d.ts.map +1 -1
  97. package/dist/components/Outline.js +6 -2
  98. package/dist/components/ParticlesR3f.d.ts +2 -1
  99. package/dist/components/ParticlesR3f.d.ts.map +1 -1
  100. package/dist/components/ParticlesR3f.js +3 -1
  101. package/dist/components/Path.d.ts +2 -1
  102. package/dist/components/Path.d.ts.map +1 -1
  103. package/dist/components/Path.js +14 -3
  104. package/dist/components/PathGeometry.d.ts +2 -1
  105. package/dist/components/PathGeometry.d.ts.map +1 -1
  106. package/dist/components/PathGeometry.js +6 -2
  107. package/dist/components/PathRenderer.d.ts +2 -1
  108. package/dist/components/PathRenderer.d.ts.map +1 -1
  109. package/dist/components/PathRenderer.js +6 -2
  110. package/dist/components/Planet.d.ts +2 -3
  111. package/dist/components/Planet.d.ts.map +1 -1
  112. package/dist/components/Planet.js +6 -4
  113. package/dist/components/PointCloud.d.ts +2 -1
  114. package/dist/components/PointCloud.d.ts.map +1 -1
  115. package/dist/components/PointCloud.js +3 -1
  116. package/dist/components/ProjectLoader.d.ts +2 -1
  117. package/dist/components/ProjectLoader.d.ts.map +1 -1
  118. package/dist/components/ProjectLoader.js +6 -3
  119. package/dist/components/Rain.d.ts +2 -1
  120. package/dist/components/Rain.d.ts.map +1 -1
  121. package/dist/components/Rain.js +7 -1
  122. package/dist/components/SceneBuilder.d.ts +2 -1
  123. package/dist/components/SceneBuilder.d.ts.map +1 -1
  124. package/dist/components/SceneBuilder.js +2 -2
  125. package/dist/components/ShootingStar.d.ts +2 -1
  126. package/dist/components/ShootingStar.d.ts.map +1 -1
  127. package/dist/components/ShootingStar.js +5 -2
  128. package/dist/components/ShootingStars.d.ts +2 -1
  129. package/dist/components/ShootingStars.d.ts.map +1 -1
  130. package/dist/components/ShootingStars.js +2 -2
  131. package/dist/components/SkyController.d.ts +3 -2
  132. package/dist/components/SkyController.d.ts.map +1 -1
  133. package/dist/components/SkyController.js +9 -6
  134. package/dist/components/SkyMesh.d.ts +2 -3
  135. package/dist/components/SkyMesh.d.ts.map +1 -1
  136. package/dist/components/SkyMesh.js +3 -5
  137. package/dist/components/SkySystem.d.ts +2 -1
  138. package/dist/components/SkySystem.d.ts.map +1 -1
  139. package/dist/components/SkySystem.js +6 -2
  140. package/dist/components/Skybox.d.ts +2 -1
  141. package/dist/components/Skybox.d.ts.map +1 -1
  142. package/dist/components/Skybox.js +5 -2
  143. package/dist/components/SolarSystem.d.ts +2 -4
  144. package/dist/components/SolarSystem.d.ts.map +1 -1
  145. package/dist/components/SolarSystem.js +3 -1
  146. package/dist/components/SparklesBurst.d.ts +2 -1
  147. package/dist/components/SparklesBurst.d.ts.map +1 -1
  148. package/dist/components/SparklesBurst.js +5 -2
  149. package/dist/components/Stars.d.ts +2 -3
  150. package/dist/components/Stars.d.ts.map +1 -1
  151. package/dist/components/Stars.js +3 -2
  152. package/dist/components/Sun.d.ts +3 -2
  153. package/dist/components/Sun.d.ts.map +1 -1
  154. package/dist/components/Sun.js +7 -3
  155. package/dist/components/SunCore.d.ts +3 -2
  156. package/dist/components/SunCore.d.ts.map +1 -1
  157. package/dist/components/SunCore.js +3 -1
  158. package/dist/components/SunLight.d.ts +2 -1
  159. package/dist/components/SunLight.d.ts.map +1 -1
  160. package/dist/components/SunLight.js +3 -1
  161. package/dist/components/Text2D.d.ts +2 -1
  162. package/dist/components/Text2D.d.ts.map +1 -1
  163. package/dist/components/Text2D.js +3 -1
  164. package/dist/components/Text3D.d.ts +2 -1
  165. package/dist/components/Text3D.d.ts.map +1 -1
  166. package/dist/components/Text3D.js +2 -2
  167. package/dist/components/VolumePoints.d.ts +3 -2
  168. package/dist/components/VolumePoints.d.ts.map +1 -1
  169. package/dist/components/VolumePoints.js +6 -2
  170. package/dist/components/cursor/AuraCursor.d.ts.map +1 -1
  171. package/dist/components/cursor/AuraCursor.js +3 -1
  172. package/dist/components/cursor/AuroraCursor.d.ts.map +1 -1
  173. package/dist/components/cursor/AuroraCursor.js +5 -2
  174. package/dist/components/cursor/BubblesCursor.d.ts.map +1 -1
  175. package/dist/components/cursor/BubblesCursor.js +5 -2
  176. package/dist/components/cursor/CometCursor.d.ts.map +1 -1
  177. package/dist/components/cursor/CometCursor.js +6 -3
  178. package/dist/components/cursor/CrosshairCursor.d.ts.map +1 -1
  179. package/dist/components/cursor/CrosshairCursor.js +6 -3
  180. package/dist/components/cursor/CursorActions.d.ts +2 -1
  181. package/dist/components/cursor/CursorActions.d.ts.map +1 -1
  182. package/dist/components/cursor/CursorActions.js +12 -10
  183. package/dist/components/cursor/CursorController.d.ts +2 -1
  184. package/dist/components/cursor/CursorController.d.ts.map +1 -1
  185. package/dist/components/cursor/CursorController.js +1 -1
  186. package/dist/components/cursor/CursorEffects.d.ts +3 -2
  187. package/dist/components/cursor/CursorEffects.d.ts.map +1 -1
  188. package/dist/components/cursor/CursorEffects.js +3 -1
  189. package/dist/components/cursor/FerrofluidCursor.d.ts.map +1 -1
  190. package/dist/components/cursor/FerrofluidCursor.js +3 -1
  191. package/dist/components/cursor/GlyphRingCursor.d.ts.map +1 -1
  192. package/dist/components/cursor/GlyphRingCursor.js +3 -1
  193. package/dist/components/cursor/LightningCursor.d.ts.map +1 -1
  194. package/dist/components/cursor/LightningCursor.js +3 -1
  195. package/dist/components/cursor/LiquidMetalCursor.d.ts.map +1 -1
  196. package/dist/components/cursor/LiquidMetalCursor.js +3 -1
  197. package/dist/components/cursor/OrbCursor.d.ts.map +1 -1
  198. package/dist/components/cursor/OrbCursor.js +3 -1
  199. package/dist/components/cursor/PlasmaWhipCursor.d.ts.map +1 -1
  200. package/dist/components/cursor/PlasmaWhipCursor.js +3 -1
  201. package/dist/components/cursor/SparklesCursor.d.ts.map +1 -1
  202. package/dist/components/cursor/SparklesCursor.js +5 -2
  203. package/dist/components/cursor/TeslaCursor.d.ts.map +1 -1
  204. package/dist/components/cursor/TeslaCursor.js +6 -9
  205. package/dist/components/cursor/clickActions/BoltFlashAction.d.ts +2 -1
  206. package/dist/components/cursor/clickActions/BoltFlashAction.d.ts.map +1 -1
  207. package/dist/components/cursor/clickActions/BoltFlashAction.js +5 -2
  208. package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts +2 -1
  209. package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts.map +1 -1
  210. package/dist/components/cursor/clickActions/GlyphInscriptionAction.js +3 -1
  211. package/dist/components/cursor/clickActions/ImplosionAction.d.ts +2 -1
  212. package/dist/components/cursor/clickActions/ImplosionAction.d.ts.map +1 -1
  213. package/dist/components/cursor/clickActions/ImplosionAction.js +3 -1
  214. package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts +2 -1
  215. package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts.map +1 -1
  216. package/dist/components/cursor/clickActions/PhaseShiftAction.js +5 -2
  217. package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts +2 -1
  218. package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts.map +1 -1
  219. package/dist/components/cursor/clickActions/PlasmaBombAction.js +5 -2
  220. package/dist/components/cursor/clickActions/RealityTearAction.d.ts +2 -1
  221. package/dist/components/cursor/clickActions/RealityTearAction.d.ts.map +1 -1
  222. package/dist/components/cursor/clickActions/RealityTearAction.js +3 -1
  223. package/dist/components/cursor/clickActions/ShockwaveAction.d.ts +2 -1
  224. package/dist/components/cursor/clickActions/ShockwaveAction.d.ts.map +1 -1
  225. package/dist/components/cursor/clickActions/ShockwaveAction.js +5 -2
  226. package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts +2 -1
  227. package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts.map +1 -1
  228. package/dist/components/cursor/clickActions/SparklesBurstAction.js +3 -1
  229. package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts +2 -1
  230. package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts.map +1 -1
  231. package/dist/components/cursor/clickActions/VoronoiFractureAction.js +3 -1
  232. package/dist/components/cursor/clickActions/index.d.ts +11 -0
  233. package/dist/components/cursor/clickActions/index.d.ts.map +1 -0
  234. package/dist/components/cursor/clickActions/index.js +10 -0
  235. package/dist/components/cursor/index.d.ts +21 -0
  236. package/dist/components/cursor/index.d.ts.map +1 -0
  237. package/dist/components/cursor/index.js +19 -0
  238. package/dist/components/effects/AuraEffect.d.ts +2 -1
  239. package/dist/components/effects/AuraEffect.d.ts.map +1 -1
  240. package/dist/components/effects/AuraEffect.js +5 -2
  241. package/dist/components/effects/AuroraEffect.d.ts +2 -1
  242. package/dist/components/effects/AuroraEffect.d.ts.map +1 -1
  243. package/dist/components/effects/AuroraEffect.js +3 -1
  244. package/dist/components/effects/BlackHoleEffect.d.ts +2 -1
  245. package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -1
  246. package/dist/components/effects/BlackHoleEffect.js +3 -1
  247. package/dist/components/effects/ConstellationEffect.d.ts +2 -1
  248. package/dist/components/effects/ConstellationEffect.d.ts.map +1 -1
  249. package/dist/components/effects/ConstellationEffect.js +3 -1
  250. package/dist/components/effects/Corona.d.ts +19 -0
  251. package/dist/components/effects/Corona.d.ts.map +1 -0
  252. package/dist/components/effects/Corona.js +15 -0
  253. package/dist/components/effects/DataStreamEffect.d.ts +2 -1
  254. package/dist/components/effects/DataStreamEffect.d.ts.map +1 -1
  255. package/dist/components/effects/DataStreamEffect.js +5 -2
  256. package/dist/components/effects/DnaHelixEffect.d.ts +2 -1
  257. package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -1
  258. package/dist/components/effects/DnaHelixEffect.js +3 -1
  259. package/dist/components/effects/Fire.d.ts +3 -2
  260. package/dist/components/effects/Fire.d.ts.map +1 -1
  261. package/dist/components/effects/Fire.js +3 -1
  262. package/dist/components/effects/FireEffect.d.ts +2 -1
  263. package/dist/components/effects/FireEffect.d.ts.map +1 -1
  264. package/dist/components/effects/FireEffect.js +5 -2
  265. package/dist/components/effects/Flares.d.ts +25 -0
  266. package/dist/components/effects/Flares.d.ts.map +1 -0
  267. package/dist/components/effects/Flares.js +136 -0
  268. package/dist/components/effects/ForcefieldEffect.d.ts +2 -1
  269. package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -1
  270. package/dist/components/effects/ForcefieldEffect.js +3 -1
  271. package/dist/components/effects/HologramEffect.d.ts +2 -1
  272. package/dist/components/effects/HologramEffect.d.ts.map +1 -1
  273. package/dist/components/effects/HologramEffect.js +5 -2
  274. package/dist/components/effects/IceCrystalsEffect.d.ts +2 -1
  275. package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -1
  276. package/dist/components/effects/IceCrystalsEffect.js +3 -1
  277. package/dist/components/effects/LightningEffect.d.ts +2 -1
  278. package/dist/components/effects/LightningEffect.d.ts.map +1 -1
  279. package/dist/components/effects/LightningEffect.js +5 -2
  280. package/dist/components/effects/MoleculesEffect.d.ts +2 -1
  281. package/dist/components/effects/MoleculesEffect.d.ts.map +1 -1
  282. package/dist/components/effects/MoleculesEffect.js +5 -2
  283. package/dist/components/effects/NeuralNetworkEffect.d.ts +2 -1
  284. package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -1
  285. package/dist/components/effects/NeuralNetworkEffect.js +3 -1
  286. package/dist/components/effects/OrbEffect.d.ts +2 -1
  287. package/dist/components/effects/OrbEffect.d.ts.map +1 -1
  288. package/dist/components/effects/OrbEffect.js +5 -2
  289. package/dist/components/effects/PortalEffect.d.ts +2 -1
  290. package/dist/components/effects/PortalEffect.d.ts.map +1 -1
  291. package/dist/components/effects/PortalEffect.js +5 -2
  292. package/dist/components/effects/ShockwaveEffect.d.ts +2 -1
  293. package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
  294. package/dist/components/effects/ShockwaveEffect.js +5 -2
  295. package/dist/components/effects/SmokePlumeEffect.d.ts +2 -1
  296. package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -1
  297. package/dist/components/effects/SmokePlumeEffect.js +5 -2
  298. package/dist/components/effects/SmokeRibbon.d.ts +3 -2
  299. package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
  300. package/dist/components/effects/SmokeRibbon.js +5 -2
  301. package/dist/components/effects/SmokeRingEffect.d.ts +2 -1
  302. package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -1
  303. package/dist/components/effects/SmokeRingEffect.js +5 -2
  304. package/dist/components/effects/VolumetricFogEffect.d.ts +2 -1
  305. package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -1
  306. package/dist/components/effects/VolumetricFogEffect.js +5 -2
  307. package/dist/components/effects/index.d.ts +28 -0
  308. package/dist/components/effects/index.d.ts.map +1 -0
  309. package/dist/components/effects/index.js +24 -0
  310. package/dist/components/index.d.ts +112 -0
  311. package/dist/components/index.d.ts.map +1 -0
  312. package/dist/components/index.js +77 -0
  313. package/dist/constants.d.ts +1 -1
  314. package/dist/constants.d.ts.map +1 -1
  315. package/dist/constants.js +1 -1
  316. package/dist/hooks/index.d.ts +55 -0
  317. package/dist/hooks/index.d.ts.map +1 -1
  318. package/dist/hooks/index.js +46 -1
  319. package/dist/hooks/useObjectReady.d.ts +29 -0
  320. package/dist/hooks/useObjectReady.d.ts.map +1 -0
  321. package/dist/hooks/useObjectReady.js +59 -0
  322. package/dist/index.d.ts +4 -135
  323. package/dist/index.d.ts.map +1 -1
  324. package/dist/index.js +6 -108
  325. package/dist/types/index.d.ts +2 -0
  326. package/dist/types/index.d.ts.map +1 -0
  327. package/dist/types/index.js +1 -0
  328. package/dist/types/objectReady.d.ts +24 -0
  329. package/dist/types/objectReady.d.ts.map +1 -0
  330. package/dist/types/objectReady.js +1 -0
  331. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SkySystem.d.ts","sourceRoot":"","sources":["../../src/components/SkySystem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAMnJ,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAC1C,qBAAqB,CAAC,EAAE,WAAW,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAGD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAiCjG,CAAC;AAEH,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SkySystem.d.ts","sourceRoot":"","sources":["../../src/components/SkySystem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAMnJ,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACpD,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAC1C,qBAAqB,CAAC,EAAE,WAAW,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAGD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAoCjG,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useEffect, useLayoutEffect, useRef, forwardRef, useImperativeHandle } from 'react';
3
4
  import * as THREE from 'three';
4
5
  import { useFrame } from '@react-three/fiber';
@@ -8,8 +9,11 @@ import Lensflare from './Lensflare.js';
8
9
  import SunLight from './SunLight.js';
9
10
  import SkyController from './SkyController.js';
10
11
  import SceneFog from './SceneFog.js';
11
- const SkySystem = forwardRef(({ timeSettings, visible = true, sunSystemVisible = false, sunSize = 1, moonSize = 1, skyboxScale = 1000, sunIntensity = 1, castShadow = true, shadowMapSize = 2048, playerPosition = new THREE.Vector3(0, 0, 0), starsSettings, cloudsSettings, cloudsMaterialSettings, skyControllerSettings, rainSettings, fogSettings, onTimeOfDayChange, onTimeUpdate, }, ref) => {
12
+ const SkySystem = forwardRef(({ timeSettings, visible = true, sunSystemVisible = false, sunSize = 1, moonSize = 1, skyboxScale = 1000, sunIntensity = 1, castShadow = true, shadowMapSize = 2048, playerPosition = new THREE.Vector3(0, 0, 0), starsSettings, cloudsSettings, cloudsMaterialSettings, skyControllerSettings, rainSettings, fogSettings, onTimeOfDayChange, onTimeUpdate, onObjectReady, onObjectDispose, }, ref) => {
12
13
  const previousTimeOfDayRef = useRef(null);
14
+ const rootRef = useRef(null);
15
+ const ready = { onObjectReady, onObjectDispose };
16
+ useObjectReady(rootRef, { timeSettings, sunSystemVisible, skyboxScale, sunIntensity, skyControllerSettings, fogSettings }, onObjectReady, onObjectDispose);
13
17
  useImperativeHandle(ref, () => ({
14
18
  setTime: (h, m) => skySystemManager.setTime(h, m),
15
19
  getTime: () => skySystemManager.getTime(),
@@ -40,7 +44,7 @@ const SkySystem = forwardRef(({ timeSettings, visible = true, sunSystemVisible =
40
44
  });
41
45
  if (!visible)
42
46
  return null;
43
- return (_jsxs("group", { children: [skyControllerSettings && !sunSystemVisible && (_jsx(SkyController, { settings: skyControllerSettings, timeSettings: timeSettings, scale: skyboxScale })), sunSystemVisible && (_jsxs(_Fragment, { children: [_jsx(Skybox, { visible: true, scale: skyboxScale, sunSize: sunSize, moonSize: moonSize, timeSettings: timeSettings }), _jsx(Lensflare, { visible: true, intensity: sunIntensity, timeSettings: timeSettings }), _jsx(SunLight, { visible: true, timeSettings: timeSettings, targetPosition: playerPosition, intensity: sunIntensity, castShadow: castShadow, shadowMapSize: shadowMapSize })] })), fogSettings && (_jsx(SceneFog, { fog: fogSettings }))] }));
47
+ return (_jsxs("group", { ref: rootRef, children: [skyControllerSettings && !sunSystemVisible && (_jsx(SkyController, { settings: skyControllerSettings, timeSettings: timeSettings, scale: skyboxScale, ...ready })), sunSystemVisible && (_jsxs(_Fragment, { children: [_jsx(Skybox, { visible: true, scale: skyboxScale, sunSize: sunSize, moonSize: moonSize, timeSettings: timeSettings, ...ready }), _jsx(Lensflare, { visible: true, intensity: sunIntensity, timeSettings: timeSettings, ...ready }), _jsx(SunLight, { visible: true, timeSettings: timeSettings, targetPosition: playerPosition, intensity: sunIntensity, castShadow: castShadow, shadowMapSize: shadowMapSize, ...ready })] })), fogSettings && (_jsx(SceneFog, { fog: fogSettings }))] }));
44
48
  });
45
49
  SkySystem.displayName = 'SkySystem';
46
50
  export default SkySystem;
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { TimeSettings } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
- export interface SkyboxProps {
4
+ export interface SkyboxProps extends ObjectReadyProps {
4
5
  visible?: boolean;
5
6
  scale?: number;
6
7
  sunSize?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Skybox.d.ts","sourceRoot":"","sources":["../../src/components/Skybox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAW;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;CAC9B;AAkDD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAoCjC,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Skybox.d.ts","sourceRoot":"","sources":["../../src/components/Skybox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;CAC9B;AAkDD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsCjC,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef, useCallback, useEffect } from 'react';
3
4
  import * as THREE from 'three';
4
5
  import { useSkySystem } from '../hooks/useSkySystem.js';
@@ -52,8 +53,10 @@ function sampleSkyKeyframes(timeInHours, outHorizon, outHigh, outSun) {
52
53
  outHigh.copy(last.high);
53
54
  outSun.copy(last.sun);
54
55
  }
55
- const Skybox = ({ visible = true, scale = 100000, sunSize = 1, moonSize = 1, timeSettings, }) => {
56
+ const Skybox = ({ visible = true, scale = 100000, sunSize = 1, moonSize = 1, timeSettings, onObjectReady, onObjectDispose, }) => {
56
57
  const materialRef = useRef(null);
58
+ const rootRef = useRef(null);
59
+ useObjectReady(rootRef, { visible, scale, sunSize, moonSize, timeSettings }, onObjectReady, onObjectDispose);
57
60
  const sunColorRef = useRef(new THREE.Color(0xffe5b0));
58
61
  const skyColorLowRef = useRef(new THREE.Color(0x6fa2ef));
59
62
  const skyColorHighRef = useRef(new THREE.Color(0x2053ff));
@@ -87,6 +90,6 @@ const Skybox = ({ visible = true, scale = 100000, sunSize = 1, moonSize = 1, tim
87
90
  if (!visible)
88
91
  return null;
89
92
  // console.log(sunSize)
90
- return (_jsxs("mesh", { scale: scale, children: [_jsx("boxGeometry", { args: [1, 1, 1] }), _jsx("skyboxMaterial", { ref: materialRef, side: THREE.BackSide, depthWrite: false, fog: false })] }));
93
+ return (_jsxs("mesh", { ref: rootRef, scale: scale, children: [_jsx("boxGeometry", { args: [1, 1, 1] }), _jsx("skyboxMaterial", { ref: materialRef, side: THREE.BackSide, depthWrite: false, fog: false })] }));
91
94
  };
92
95
  export default Skybox;
@@ -1,8 +1,6 @@
1
- import type { Group } from 'three';
1
+ import type { ObjectReadyProps } from '../types/objectReady';
2
2
  import React from "react";
3
3
  import { SolarSystemConfig } from "@3driseai/3drise-core";
4
- declare const SolarSystem: React.FC<SolarSystemConfig & {
5
- onObjectReady?: (ref: Group) => void;
6
- }>;
4
+ declare const SolarSystem: React.FC<SolarSystemConfig & ObjectReadyProps>;
7
5
  export default SolarSystem;
8
6
  //# sourceMappingURL=SolarSystem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolarSystem.d.ts","sourceRoot":"","sources":["../../src/components/SolarSystem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAKnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAiD1D,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG;IACpC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAoBR,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SolarSystem.d.ts","sourceRoot":"","sources":["../../src/components/SolarSystem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAiD1D,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG,gBAAgB,CAqB/D,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef, useMemo, useState, useCallback } from 'react';
3
4
  import { BufferGeometry, BufferAttribute, Vector3 } from 'three';
4
5
  import { useFrame } from '@react-three/fiber';
@@ -52,10 +53,11 @@ const OrbitedBody = ({ orbitRadius, orbitSpeed, spinSpeed, axialTilt, enableOrbi
52
53
  });
53
54
  return (_jsx("group", { ref: orbitRef, "rotation-y": initialPhase, children: _jsx("group", { position: [orbitRadius, 0, 0], "rotation-z": axialTilt, children: _jsx("group", { ref: spinRef, children: children }) }) }));
54
55
  };
55
- const SolarSystem = ({ enableOrbit = true, enableSelfRotation = true, showOrbitRings = true, orbitSpeedMultiplier = 1, sunColor = '#ffd27a', sunRadius = 8, sunIntensity = 3, orbitRingColor = '#444444', orbitRingOpacity = 0.35, }) => {
56
+ const SolarSystem = ({ enableOrbit = true, enableSelfRotation = true, showOrbitRings = true, orbitSpeedMultiplier = 1, sunColor = '#ffd27a', sunRadius = 8, sunIntensity = 3, orbitRingColor = '#444444', orbitRingOpacity = 0.35, onObjectReady, onObjectDispose, }) => {
56
57
  const [earthSunPos, setEarthSunPos] = useState([1, 0, 0]);
57
58
  const lastEarthSyncRef = useRef(0);
58
59
  const ref = useRef(null);
60
+ useObjectReady(ref, { enableOrbit, enableSelfRotation, showOrbitRings, orbitSpeedMultiplier, sunColor, sunRadius, sunIntensity, orbitRingColor, orbitRingOpacity }, onObjectReady, onObjectDispose);
59
61
  const handleEarthWorld = useCallback((p) => {
60
62
  const now = performance.now();
61
63
  if (now - lastEarthSyncRef.current < 100)
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { SparklesBurstConfig } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
- export interface SparklesBurstProps {
4
+ export interface SparklesBurstProps extends ObjectReadyProps {
4
5
  config: SparklesBurstConfig;
5
6
  boundingRadius?: number;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SparklesBurst.d.ts","sourceRoot":"","sources":["../../src/components/SparklesBurst.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuD/C,CAAC;AACF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"SparklesBurst.d.ts","sourceRoot":"","sources":["../../src/components/SparklesBurst.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyD/C,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useEffect, useMemo, useRef } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import * as THREE from 'three';
5
6
  import { SparklesBurstMaterial } from '@3driseai/3drise-core';
6
- const SparklesBurst = ({ config, boundingRadius }) => {
7
+ const SparklesBurst = ({ config, boundingRadius, onObjectReady, onObjectDispose }) => {
7
8
  // console.log("Rendering SparklesBurst with config:", config, "and boundingRadius:", boundingRadius);
8
9
  const planeSize = useMemo(() => Math.max(0.05, config.scale ?? 2.5), [config.scale]);
9
10
  const geometry = useMemo(() => new THREE.PlaneGeometry(planeSize, planeSize, 1, 1), [planeSize]);
@@ -40,6 +41,8 @@ const SparklesBurst = ({ config, boundingRadius }) => {
40
41
  // Track elapsed time JS-side so loop on/off toggles cleanly without
41
42
  // depending on the global clock for the progress phase.
42
43
  const startRef = useRef(null);
44
+ const rootRef = useRef(null);
45
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
43
46
  // Reset start when loop toggles so behaviour is predictable.
44
47
  useEffect(() => { startRef.current = null; }, [config.loop, config.durationMs]);
45
48
  useFrame((state) => {
@@ -57,6 +60,6 @@ const SparklesBurst = ({ config, boundingRadius }) => {
57
60
  });
58
61
  if (!config.enabled)
59
62
  return null;
60
- return _jsx("mesh", { geometry: geometry, material: material, frustumCulled: false });
63
+ return _jsx("mesh", { ref: rootRef, geometry: geometry, material: material, frustumCulled: false });
61
64
  };
62
65
  export default SparklesBurst;
@@ -1,13 +1,12 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import { BufferGeometry } from 'three';
2
- import type { Object3D } from 'three';
3
3
  import React from "react";
4
4
  import type { CreatedObjectSettings } from "@3driseai/3drise-core";
5
5
  import type { TimeSettings } from "@3driseai/3drise-core";
6
- export interface StarsProps {
6
+ export interface StarsProps extends ObjectReadyProps {
7
7
  settings: CreatedObjectSettings;
8
8
  timeSettings?: TimeSettings;
9
9
  sunSystemEnabled?: boolean;
10
- onObjectReady?: (object: CreatedObjectSettings, ref: Object3D) => void;
11
10
  }
12
11
  export declare function generateStarsGeometry(count: number): BufferGeometry;
13
12
  declare const Stars: React.FC<StarsProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Stars.d.ts","sourceRoot":"","sources":["../../src/components/Stars.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA4C,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,UAAU;IACvB,QAAQ,EAAE,qBAAqB,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC1E;AAOD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAuDnE;AAYD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwK/B,CAAC;AACF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Stars.d.ts","sourceRoot":"","sources":["../../src/components/Stars.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAA4C,MAAM,OAAO,CAAC;AAQjF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAChD,QAAQ,EAAE,qBAAqB,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAOD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAuDnE;AAYD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwK/B,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef, useMemo, useCallback, useState, useEffect } from 'react';
3
4
  import { BufferGeometry, BufferAttribute, AdditiveBlending, Color } from 'three';
4
5
  import { useFrame } from '@react-three/fiber';
@@ -78,8 +79,9 @@ const DEFAULT_TIME_SETTINGS = {
78
79
  autoAnimate: false,
79
80
  syncWithRealTime: false,
80
81
  };
81
- const Stars = ({ settings, timeSettings, sunSystemEnabled = false, onObjectReady }) => {
82
+ const Stars = ({ settings, timeSettings, sunSystemEnabled = false, onObjectReady, onObjectDispose }) => {
82
83
  const pointsRef = useRef(null);
84
+ useObjectReady(pointsRef, settings, onObjectReady, onObjectDispose);
83
85
  const materialRef = useRef(null);
84
86
  const { meshSettings, config, animations, mouseMove } = settings;
85
87
  const { position, rotation, scale, visible } = meshSettings;
@@ -102,7 +104,6 @@ const Stars = ({ settings, timeSettings, sunSystemEnabled = false, onObjectReady
102
104
  });
103
105
  const geometry = useMemo(() => generateStarsGeometry(count), [count]);
104
106
  useEffect(() => {
105
- onObjectReady && onObjectReady(settings, pointsRef.current);
106
107
  return () => { geometry.dispose(); };
107
108
  }, [geometry]);
108
109
  useEffect(() => {
@@ -1,4 +1,5 @@
1
- type SunProps = {
1
+ import type { ObjectReadyProps } from '../types/objectReady';
2
+ type SunProps = ObjectReadyProps & {
2
3
  /** Radius of the sun core. Default 1. */
3
4
  radius?: number;
4
5
  /** Corona shell size relative to the core. Default 1.25. */
@@ -10,6 +11,6 @@ type SunProps = {
10
11
  /** Uniform overrides for SunFlareMaterial. */
11
12
  flareUniforms?: Record<string, any>;
12
13
  };
13
- export default function Sun({ radius, coronaScale, coreUniforms, coronaUniforms, flareUniforms, }: SunProps): import("react").JSX.Element;
14
+ export default function Sun({ radius, coronaScale, coreUniforms, coronaUniforms, flareUniforms, onObjectReady, onObjectDispose, }: SunProps): import("react").JSX.Element;
14
15
  export {};
15
16
  //# sourceMappingURL=Sun.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sun.d.ts","sourceRoot":"","sources":["../../src/components/Sun.tsx"],"names":[],"mappings":"AAGA,KAAK,QAAQ,GAAG;IACZ,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,MAAU,EAAE,WAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,GAAG,EAAE,QAAQ,+BAErH"}
1
+ {"version":3,"file":"Sun.d.ts","sourceRoot":"","sources":["../../src/components/Sun.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI7D,KAAK,QAAQ,GAAG,gBAAgB,GAAG;IAC/B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,MAAU,EAAE,WAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,QAAQ,+BAIrJ"}
@@ -1,7 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
3
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
4
  // import { ReactNode } from "react";
3
5
  import SunCore from "./SunCore.js";
4
- import Corona from "./Corona.js";
5
- export default function Sun({ radius = 1, coronaScale = 1.25, coreUniforms, coronaUniforms, flareUniforms, }) {
6
- return (_jsxs("group", { children: [_jsx(SunCore, { radius: radius, uniforms: coreUniforms }), _jsx(Corona, { radius: radius, shellScale: coronaScale, uniforms: coronaUniforms }), _jsx("pointLight", { color: "#ffa544", intensity: 6, distance: 60, decay: 1.6 })] }));
6
+ import Corona from "./effects/Corona.js";
7
+ export default function Sun({ radius = 1, coronaScale = 1.25, coreUniforms, coronaUniforms, flareUniforms, onObjectReady, onObjectDispose, }) {
8
+ const rootRef = useRef(null);
9
+ useObjectReady(rootRef, { radius, coronaScale }, onObjectReady, onObjectDispose);
10
+ return (_jsxs("group", { ref: rootRef, children: [_jsx(SunCore, { radius: radius, uniforms: coreUniforms }), _jsx(Corona, { radius: radius, shellScale: coronaScale, uniforms: coronaUniforms }), _jsx("pointLight", { color: "#ffa544", intensity: 6, distance: 60, decay: 1.6 })] }));
7
11
  }
@@ -1,3 +1,4 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type * as THREE from "three";
2
3
  declare global {
3
4
  namespace JSX {
@@ -6,7 +7,7 @@ declare global {
6
7
  }
7
8
  }
8
9
  }
9
- export type SunCoreProps = {
10
+ export type SunCoreProps = ObjectReadyProps & {
10
11
  /** Radius of the core. Default 1. */
11
12
  radius?: number;
12
13
  /** Self-rotation speed in rad/s. Default 0.02. */
@@ -14,5 +15,5 @@ export type SunCoreProps = {
14
15
  /** Uniform overrides for SunCoreMaterial (u_speed, u_cellScale, u_color1..5, ...). */
15
16
  uniforms?: Record<string, number | THREE.Vector3 | number[]>;
16
17
  };
17
- export default function SunCore({ radius, rotationSpeed, uniforms }: SunCoreProps): import("react").JSX.Element;
18
+ export default function SunCore({ radius, rotationSpeed, uniforms, onObjectReady, onObjectDispose }: SunCoreProps): import("react").JSX.Element;
18
19
  //# sourceMappingURL=SunCore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SunCore.d.ts","sourceRoot":"","sources":["../../src/components/SunCore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,eAAe,EAAE,GAAG,CAAC;SACxB;KACJ;CACJ;AAED,MAAM,MAAM,YAAY,GAAG;IACvB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,MAAU,EAAE,aAAoB,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAU3F"}
1
+ {"version":3,"file":"SunCore.d.ts","sourceRoot":"","sources":["../../src/components/SunCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,eAAe,EAAE,GAAG,CAAC;SACxB;KACJ;CACJ;AAED,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG;IAC1C,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,MAAU,EAAE,aAAoB,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,YAAY,+BAW3H"}
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef } from "react";
3
4
  import { useFrame } from "@react-three/fiber";
4
- export default function SunCore({ radius = 1, rotationSpeed = 0.02, uniforms }) {
5
+ export default function SunCore({ radius = 1, rotationSpeed = 0.02, uniforms, onObjectReady, onObjectDispose }) {
5
6
  const meshRef = useRef(null);
7
+ useObjectReady(meshRef, { radius, rotationSpeed, uniforms }, onObjectReady, onObjectDispose);
6
8
  // drei's shaderMaterial exposes each uniform as a property on the instance.
7
9
  const matRef = useRef(null);
8
10
  useFrame((_, delta) => {
@@ -1,7 +1,8 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import * as THREE from 'three';
2
3
  import React from "react";
3
4
  import type { TimeSettings } from "@3driseai/3drise-core";
4
- export interface SunLightProps {
5
+ export interface SunLightProps extends ObjectReadyProps {
5
6
  visible?: boolean;
6
7
  timeSettings: TimeSettings;
7
8
  targetPosition?: THREE.Vector3;
@@ -1 +1 @@
1
- {"version":3,"file":"SunLight.d.ts","sourceRoot":"","sources":["../../src/components/SunLight.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAaD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyCrC,CAAC;AACF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"SunLight.d.ts","sourceRoot":"","sources":["../../src/components/SunLight.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAaD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0CrC,CAAC;AACF,eAAe,QAAQ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef, useCallback } from 'react';
3
4
  import * as THREE from 'three';
4
5
  import { useSkySystem } from '../hooks/useSkySystem.js';
@@ -12,8 +13,9 @@ const SUNRISE = 6;
12
13
  const SUNSET = 21;
13
14
  const DARKNESS_START = 20.42;
14
15
  const DARKNESS_END = 6.58;
15
- const SunLight = ({ visible = true, timeSettings, targetPosition = new THREE.Vector3(0, 0, 0), shadowDistance = 300, intensity: intensityMultiplier = 1, castShadow = true, shadowMapSize = 2048, }) => {
16
+ const SunLight = ({ visible = true, timeSettings, targetPosition = new THREE.Vector3(0, 0, 0), shadowDistance = 300, intensity: intensityMultiplier = 1, castShadow = true, shadowMapSize = 2048, onObjectReady, onObjectDispose, }) => {
16
17
  const lightRef = useRef(null);
18
+ useObjectReady(lightRef, { visible, timeSettings, intensity: intensityMultiplier, castShadow, shadowMapSize }, onObjectReady, onObjectDispose);
17
19
  const colorRef = useRef(new THREE.Color(0xffe5b0));
18
20
  const targetColorRef = useRef(new THREE.Color(0xffe5b0));
19
21
  const intensityRef = useRef(1);
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { TextSettings } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
- export interface Text2DProps {
4
+ export interface Text2DProps extends ObjectReadyProps {
4
5
  textSettings: TextSettings;
5
6
  onTextClick?: (textSettings: TextSettings) => void;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Text2D.d.ts","sourceRoot":"","sources":["../../src/components/Text2D.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAW;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;CACtD;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA+CjC,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Text2D.d.ts","sourceRoot":"","sources":["../../src/components/Text2D.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAM7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;CACtD;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgDjC,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -1,12 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef, useState, useCallback, useMemo } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import { Text, useCursor } from '@react-three/drei';
5
6
  import { createDefaultEffectState, applyTransformEffects } from '@3driseai/3drise-core';
6
7
  import { fontManager } from '@3driseai/3drise-core';
7
8
  import { getTextEffectProps } from '../utils/textEffects.js';
8
- const Text2D = ({ textSettings, onTextClick }) => {
9
+ const Text2D = ({ textSettings, onTextClick, onObjectReady, onObjectDispose }) => {
9
10
  const groupRef = useRef(null);
11
+ useObjectReady(groupRef, textSettings, onObjectReady, onObjectDispose);
10
12
  const textRef = useRef(null);
11
13
  const [hovered, setHovered] = useState(false);
12
14
  const [clicked, setClicked] = useState(false);
@@ -1,7 +1,8 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import React from "react";
2
3
  import type { TextSettings } from "@3driseai/3drise-core";
3
4
  import type { LetterData } from "./Letter";
4
- export interface Text3DProps {
5
+ export interface Text3DProps extends ObjectReadyProps {
5
6
  textSettings: TextSettings;
6
7
  onLetterClick?: (letterData: LetterData) => void;
7
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Text3D.d.ts","sourceRoot":"","sources":["../../src/components/Text3D.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,MAAM,WAAW,WAAW;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CACpD;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAIjC,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Text3D.d.ts","sourceRoot":"","sources":["../../src/components/Text3D.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CACpD;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAIjC,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Letters from './Letters.js';
3
- const Text3D = ({ textSettings, onLetterClick }) => {
3
+ const Text3D = ({ textSettings, onLetterClick, onObjectReady, onObjectDispose }) => {
4
4
  const { config, materialSettings } = textSettings;
5
5
  const { text } = config;
6
- return (_jsx(Letters, { text: text, config: config, materialSettings: materialSettings, hoverSettings: { sensitivity: 0.5, applyToChildren: false }, transformEffects: textSettings.animations?.transform?.effects || [], onLetterClick: onLetterClick }));
6
+ return (_jsx(Letters, { text: text, config: config, materialSettings: materialSettings, hoverSettings: { sensitivity: 0.5, applyToChildren: false }, transformEffects: textSettings.animations?.transform?.effects || [], onLetterClick: onLetterClick, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }));
7
7
  };
8
8
  export default Text3D;
@@ -1,7 +1,8 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { ReactNode } from "react";
2
3
  import type { BufferGeometry } from "three";
3
4
  import type { ThreeElements } from "@react-three/fiber";
4
- export interface VolumePointsProps extends Omit<ThreeElements['points'], 'geometry'> {
5
+ export interface VolumePointsProps extends Omit<ThreeElements['points'], 'geometry'>, ObjectReadyProps {
5
6
  /** Any closed host geometry to fill with interior points. */
6
7
  geometry: BufferGeometry;
7
8
  /** Target number of interior points. */
@@ -15,5 +16,5 @@ export interface VolumePointsProps extends Omit<ThreeElements['points'], 'geomet
15
16
  */
16
17
  children?: ReactNode;
17
18
  }
18
- export declare function VolumePoints({ geometry, count, oversample, children, ...props }: VolumePointsProps): import("react").JSX.Element;
19
+ export declare function VolumePoints({ geometry, count, oversample, children, onObjectReady, onObjectDispose, ...props }: VolumePointsProps): import("react").JSX.Element;
19
20
  //# sourceMappingURL=VolumePoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VolumePoints.d.ts","sourceRoot":"","sources":["../../src/components/VolumePoints.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAChF,6DAA6D;IAC7D,QAAQ,EAAE,cAAc,CAAC;IACzB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAGD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAKzG"}
1
+ {"version":3,"file":"VolumePoints.d.ts","sourceRoot":"","sources":["../../src/components/VolumePoints.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,EAAE,gBAAgB;IAClG,6DAA6D;IAC7D,QAAQ,EAAE,cAAc,CAAC;IACzB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAGD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAOzI"}
@@ -1,8 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
3
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
4
  import { useVolumePoints } from '../hooks/useVolumePoints.js';
3
- export function VolumePoints({ geometry, count = 8000, oversample, children, ...props }) {
5
+ export function VolumePoints({ geometry, count = 8000, oversample, children, onObjectReady, onObjectDispose, ...props }) {
6
+ const rootRef = useRef(null);
7
+ useObjectReady(rootRef, { count, oversample }, onObjectReady, onObjectDispose);
4
8
  const pointsGeometry = useVolumePoints(geometry, count, { oversample });
5
9
  if (!pointsGeometry)
6
10
  return null;
7
- return (_jsx("points", { geometry: pointsGeometry, ...props, children: children ?? _jsx("pointsMaterial", { size: 0.02, sizeAttenuation: true }) }));
11
+ return (_jsx("points", { ref: rootRef, geometry: pointsGeometry, ...props, children: children ?? _jsx("pointsMaterial", { size: 0.02, sizeAttenuation: true }) }));
8
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AuraCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/AuraCursor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAwB3D,CAAC;AACF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"AuraCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/AuraCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAyB3D,CAAC;AACF,eAAe,UAAU,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../../hooks/useObjectReady.js';
2
3
  import { useMemo, useRef } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import AuraEffect from '../effects/AuraEffect.js';
5
- const AuraCursor = ({ config, worldPosRef, idleMsRef, }) => {
6
+ const AuraCursor = ({ config, worldPosRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
6
7
  const groupRef = useRef(null);
8
+ useObjectReady(groupRef, config, onObjectReady, onObjectDispose);
7
9
  const auraConfig = useMemo(() => ({
8
10
  enabled: true,
9
11
  intensity: config.intensity,
@@ -1 +1 @@
1
- {"version":3,"file":"AuroraCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/AuroraCursor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAsE1D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAqI/D,CAAC;AACF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"AuroraCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/AuroraCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAsE1D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAuI/D,CAAC;AACF,eAAe,YAAY,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../../hooks/useObjectReady.js';
2
3
  import { useEffect, useMemo, useRef } from 'react';
3
4
  import { useFrame, useThree } from '@react-three/fiber';
4
5
  import * as THREE from 'three';
@@ -70,7 +71,7 @@ const fragmentShader = /* glsl */ `
70
71
  gl_FragColor = vec4(aurora, alpha);
71
72
  }
72
73
  `;
73
- const AuroraCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
74
+ const AuroraCursor = ({ config, worldPosRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
74
75
  const N = Math.min(MAX_TRAIL, Math.max(4, config.trailLength));
75
76
  const { camera } = useThree();
76
77
  // History positions (newest at index 0, oldest at N-1)
@@ -132,6 +133,8 @@ const AuroraCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
132
133
  }, [config.color, config.opacity, config.flowSpeed, material]);
133
134
  useEffect(() => () => { geometry.dispose(); material.dispose(); }, [geometry, material]);
134
135
  const firstFrame = useRef(true);
136
+ const rootRef = useRef(null);
137
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
135
138
  const tmpTangent = useMemo(() => new THREE.Vector3(), []);
136
139
  const tmpToCam = useMemo(() => new THREE.Vector3(), []);
137
140
  const tmpSide = useMemo(() => new THREE.Vector3(), []);
@@ -202,6 +205,6 @@ const AuroraCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
202
205
  geometry.attributes.aT.needsUpdate = true;
203
206
  geometry.setDrawRange(0, (N - 1) * 6);
204
207
  });
205
- return _jsx("mesh", { geometry: geometry, material: material, frustumCulled: false });
208
+ return _jsx("mesh", { ref: rootRef, geometry: geometry, material: material, frustumCulled: false });
206
209
  };
207
210
  export default AuroraCursor;
@@ -1 +1 @@
1
- {"version":3,"file":"BubblesCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/BubblesCursor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA6E1D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAuGjE,CAAC;AACF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"BubblesCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/BubblesCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA6E1D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAyGjE,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../../hooks/useObjectReady.js';
2
3
  import { useEffect, useMemo, useRef } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import * as THREE from 'three';
@@ -77,7 +78,7 @@ const pointsFragmentShader = /* glsl */ `
77
78
  gl_FragColor = vec4(col * (1.0 + spec + popFlash), alpha);
78
79
  }
79
80
  `;
80
- const BubblesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, }) => {
81
+ const BubblesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
81
82
  const positions = useMemo(() => new Float32Array(MAX_BUBBLES * 3), []);
82
83
  const velocities = useMemo(() => new Float32Array(MAX_BUBBLES * 3), []);
83
84
  const ages = useMemo(() => new Float32Array(MAX_BUBBLES), []);
@@ -119,6 +120,8 @@ const BubblesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef,
119
120
  }, [config.color, config.scale, config.opacity, config.iridescence, material]);
120
121
  useEffect(() => () => { geometry.dispose(); material.dispose(); }, [geometry, material]);
121
122
  const spawnAccum = useRef(0);
123
+ const rootRef = useRef(null);
124
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
122
125
  const startTime = useRef(0);
123
126
  useFrame((state, delta) => {
124
127
  material.uniforms.uTime.value = state.clock.getElapsedTime();
@@ -179,6 +182,6 @@ const BubblesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef,
179
182
  geometry.attributes.aBaseSize.needsUpdate = true;
180
183
  geometry.attributes.aPhase.needsUpdate = true;
181
184
  });
182
- return _jsx("points", { geometry: geometry, material: material, frustumCulled: false });
185
+ return _jsx("points", { ref: rootRef, geometry: geometry, material: material, frustumCulled: false });
183
186
  };
184
187
  export default BubblesCursor;
@@ -1 +1 @@
1
- {"version":3,"file":"CometCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/CometCursor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA2D1D,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAgI7D,CAAC;AACF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"CometCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/CometCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA2D1D,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAqI7D,CAAC;AACF,eAAe,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../../hooks/useObjectReady.js';
2
3
  import { useEffect, useMemo, useRef } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import * as THREE from 'three';
@@ -59,8 +60,10 @@ const impactVert = /* glsl */ `
59
60
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
60
61
  }
61
62
  `;
62
- const CometCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
63
+ const CometCursor = ({ config, worldPosRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
63
64
  // Packed newest-first layout: slot 0 = newest, slot count-1 = oldest.
65
+ const ref = useRef(null);
66
+ useObjectReady(ref, config, onObjectReady, onObjectDispose);
64
67
  const positions = useMemo(() => new Float32Array(MAX_TRAIL * 3), []);
65
68
  const indices = useMemo(() => {
66
69
  const arr = new Float32Array(MAX_TRAIL);
@@ -186,6 +189,6 @@ const CometCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
186
189
  impact.visible = impactOpacity.current > 0.005;
187
190
  }
188
191
  });
189
- return (_jsxs(_Fragment, { children: [_jsx("points", { geometry: geometry, material: material, frustumCulled: false }), _jsx("mesh", { ref: impactRef, geometry: impactGeom, material: impactMat, visible: false })] }));
192
+ return (_jsxs("group", { ref: ref, children: [_jsx("points", { geometry: geometry, material: material, frustumCulled: false }), _jsx("mesh", { ref: impactRef, geometry: impactGeom, material: impactMat, visible: false })] }));
190
193
  };
191
194
  export default CometCursor;
@@ -1 +1 @@
1
- {"version":3,"file":"CrosshairCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/CrosshairCursor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAe1D,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CA2HrE,CAAC;AACF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"CrosshairCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/CrosshairCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAe1D,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAqIrE,CAAC;AACF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../../hooks/useObjectReady.js';
2
3
  import { useEffect, useMemo, useRef } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import * as THREE from 'three';
@@ -15,8 +16,10 @@ function hasValidPositions(geo) {
15
16
  }
16
17
  return true;
17
18
  }
18
- const CrosshairCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
19
+ const CrosshairCursor = ({ config, worldPosRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
19
20
  // Billboarded reticle group (ring + ticks)
21
+ const ref = useRef(null);
22
+ useObjectReady(ref, config, onObjectReady, onObjectDispose);
20
23
  const reticleRef = useRef(null);
21
24
  const ringRef = useRef(null);
22
25
  // World-space outline group (NOT billboarded) for the hovered object outline
@@ -137,6 +140,6 @@ const CrosshairCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
137
140
  ringMat.opacity = config.opacity * (0.4 + 0.6 * idleFactor);
138
141
  tickMat.opacity = config.opacity * (0.4 + 0.6 * idleFactor);
139
142
  });
140
- return (_jsxs(_Fragment, { children: [_jsxs("group", { ref: reticleRef, children: [_jsx("mesh", { ref: ringRef, geometry: ringGeom, material: ringMat }), _jsx("lineSegments", { geometry: tickGeom, material: tickMat })] }), _jsx("group", { ref: outlineGroupRef, children: _jsx("lineSegments", { ref: outlineRef, material: outlineMat, visible: false }) })] }));
143
+ return (_jsxs("group", { ref: ref, children: [_jsxs("group", { ref: reticleRef, children: [_jsx("mesh", { ref: ringRef, geometry: ringGeom, material: ringMat }), _jsx("lineSegments", { geometry: tickGeom, material: tickMat })] }), _jsx("group", { ref: outlineGroupRef, children: _jsx("lineSegments", { ref: outlineRef, material: outlineMat, visible: false }) })] }));
141
144
  };
142
145
  export default CrosshairCursor;