@3driseai/3drise-viewer 0.1.2 → 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 +3 -2
  42. package/dist/components/GeometryShape.d.ts.map +1 -1
  43. package/dist/components/GeometryShape.js +17 -6
  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,9 +1,8 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import React from "react";
2
3
  import type { CreatedObjectSettings } from "@3driseai/3drise-core";
3
- import { Object3D } from "three";
4
- export interface GalaxyProps {
4
+ export interface GalaxyProps extends ObjectReadyProps {
5
5
  createdObject: CreatedObjectSettings;
6
- onObjectReady?: (object: CreatedObjectSettings, ref: Object3D) => void;
7
6
  }
8
7
  declare const Galaxy: React.FC<GalaxyProps>;
9
8
  export default Galaxy;
@@ -1 +1 @@
1
- {"version":3,"file":"Galaxy.d.ts","sourceRoot":"","sources":["../../src/components/Galaxy.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,MAAM,WAAW,WAAW;IACxB,aAAa,EAAE,qBAAqB,CAAC;IACrC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC1E;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsBjC,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Galaxy.d.ts","sourceRoot":"","sources":["../../src/components/Galaxy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,aAAa,EAAE,qBAAqB,CAAC;CACxC;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwBjC,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -3,25 +3,25 @@ import Stars from './Stars.js';
3
3
  import Earth from './Earth.js';
4
4
  import SolarSystem from './SolarSystem.js';
5
5
  import ShootingStars from './ShootingStars.js';
6
- const Galaxy = ({ createdObject, onObjectReady }) => {
6
+ const Galaxy = ({ createdObject, onObjectReady, onObjectDispose }) => {
7
7
  const config = createdObject.config;
8
- console.log('Galaxy config:', config);
8
+ // Whatever Galaxy renders, the scene above it knows this object by its
9
+ // createdObject — so relabel each child's report rather than letting the
10
+ // child's own settings surface.
11
+ const reportReady = (_object, ref) => onObjectReady && onObjectReady(createdObject, ref);
12
+ const reportDispose = (_object, ref) => onObjectDispose && onObjectDispose(createdObject, ref);
9
13
  if (!config)
10
14
  return null;
11
- const starsSettings = config.stars;
12
- const earthSettings = config.earth;
13
- const solarSystemSettings = config.solarSystem;
14
- const shootingStarsSettings = config.shootingStars;
15
15
  // const timeSettings = config.time as TimeSettings | undefined;
16
16
  switch (config.type) {
17
17
  case 'stars':
18
- return _jsx(Stars, { settings: createdObject, onObjectReady: onObjectReady });
18
+ return _jsx(Stars, { settings: createdObject, onObjectReady: reportReady, onObjectDispose: reportDispose });
19
19
  case 'earth':
20
- return _jsx(Earth, { ...config, onMeshReady: (mesh) => onObjectReady && onObjectReady(createdObject, mesh) });
20
+ return _jsx(Earth, { ...config, onObjectReady: reportReady, onObjectDispose: reportDispose });
21
21
  case 'solarSystem':
22
- return _jsx(SolarSystem, { ...config, onObjectReady: group => onObjectReady && onObjectReady(createdObject, group) });
22
+ return _jsx(SolarSystem, { ...config, onObjectReady: reportReady, onObjectDispose: reportDispose });
23
23
  case 'shootingStars':
24
- return _jsx(ShootingStars, { settings: config });
24
+ return _jsx(ShootingStars, { settings: config, onObjectReady: reportReady, onObjectDispose: reportDispose });
25
25
  default:
26
26
  return null;
27
27
  }
@@ -1,8 +1,9 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { CreatedObjectSettings } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
4
  import { Object3D } from "three";
4
5
  import { type ThreeEvent } from "@react-three/fiber";
5
- export interface GalleryLayoutProps {
6
+ export interface GalleryLayoutProps extends ObjectReadyProps {
6
7
  createdObject: CreatedObjectSettings;
7
8
  selectedFrameUrl?: string;
8
9
  handleObjectClick?: (createdObject: CreatedObjectSettings, ref: Object3D, event: ThreeEvent<MouseEvent>) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"GalleryLayout.d.ts","sourceRoot":"","sources":["../../src/components/GalleryLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,MAAM,WAAW,kBAAkB;IAC/B,aAAa,EAAE,qBAAqB,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACpH;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAa/C,CAAC;AACF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"GalleryLayout.d.ts","sourceRoot":"","sources":["../../src/components/GalleryLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,aAAa,EAAE,qBAAqB,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACpH;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAc/C,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -1,10 +1,12 @@
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 { updateCurrentLayoutSettings } from '@3driseai/3drise-core';
4
5
  import Frame from './Frame.js';
5
6
  import { ImageGeometry } from './ImageGeometry.js';
6
- const GalleryLayout = ({ createdObject, selectedFrameUrl, handleObjectClick, }) => {
7
+ const GalleryLayout = ({ createdObject, selectedFrameUrl, handleObjectClick, onObjectReady, onObjectDispose, }) => {
7
8
  const groupRef = useRef(null);
9
+ useObjectReady(groupRef, createdObject, onObjectReady, onObjectDispose);
8
10
  console.log('GalleryLayout - createdObject:', createdObject);
9
11
  const { config, materialSettings, animations } = createdObject;
10
12
  const galleryLayout = config || {
@@ -1,3 +1,4 @@
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 { GeometryShapeConfig, MaterialSettings, ModeConfig, ObjectAnimations } from "@3driseai/3drise-core";
@@ -15,7 +16,7 @@ type ModeData = {
15
16
  positions: Float32Array;
16
17
  segments: Pt[];
17
18
  };
18
- export interface GeometryMeshProps {
19
+ export interface GeometryMeshProps extends ObjectReadyProps {
19
20
  config: GeometryShapeConfig;
20
21
  modeConfig?: ModeConfig;
21
22
  materialSettings: MaterialSettings;
@@ -41,7 +42,7 @@ export declare function plexus(geo: BufferGeometry, count: number, radiusMul: nu
41
42
  segments: Pt[];
42
43
  };
43
44
  export declare function computeMode(geo: BufferGeometry, c: ModeConfig): ModeData;
44
- export declare function GeometryMesh({ config, materialSettings, animations, modeConfig, color, children }: GeometryMeshProps): import("react").JSX.Element;
45
+ export declare function GeometryMesh({ config, materialSettings, animations, modeConfig, color, children, onObjectReady, onObjectDispose }: GeometryMeshProps): import("react").JSX.Element;
45
46
  export declare function FitGroup({ geometry, radius, children }: {
46
47
  geometry: BufferGeometry;
47
48
  radius?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryShape.d.ts","sourceRoot":"","sources":["../../src/components/GeometryShape.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACjH,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnC,KAAK,QAAQ,GAAG;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB,GAAG;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,YAAY,CAAC;CAC3B,GAAG;IACA,IAAI,EA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AG,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,CAKnE;AACD,wBAAgB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,EAAE,EAAE,CAkBnD;AACD,wBAAgB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,EAAE,EAAE,CAKnD;AACD,+FAA+F;AAC/F,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,MAAU,GAAG,EAAE,EAAE,CAuBzF;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG;IAC7F,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,EAAE,EAAE,CAAC;CAClB,CAoCJ;AACD,wBAAgB,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,CAAC,EAAE,UAAU,GAAG,QAAQ,CAkBxE;AAMD,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAA8B,EAAE,KAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,iBAAiB,+BAsBpL;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,MAAY,EAAE,QAAQ,EAAE,EAAE;IACnD,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,GAQ2E,GAAG,CACtF"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useMemo } from 'react';
2
+ import { useEffect, useMemo, useRef } from 'react';
3
+ import { useObjectReady } from '../hooks/useObjectReady.js';
3
4
  import { EdgesGeometry, WireframeGeometry, Mesh, MeshBasicMaterial, Raycaster, Vector3, DoubleSide, } from 'three';
4
5
  import { Line } from '@react-three/drei';
5
6
  import { shapeGenerators } from '../utils/shapes.js';
@@ -301,18 +302,28 @@ function useModeData(geometry, config) {
301
302
  const key = [safeConfig.mode, safeConfig.count, safeConfig.symmetry, safeConfig.spacing, safeConfig.slices, safeConfig.linkRadius, safeConfig.angle].join('|');
302
303
  return useMemo(() => computeMode(geometry, safeConfig), [geometry, key]); // eslint-disable-line react-hooks/exhaustive-deps
303
304
  }
304
- export function GeometryMesh({ config, materialSettings, animations, modeConfig = defaultModeConfig, color = '#ffffff', children }) {
305
+ export function GeometryMesh({ config, materialSettings, animations, modeConfig = defaultModeConfig, color = '#ffffff', children, onObjectReady, onObjectDispose }) {
306
+ const rootRef = useRef(null);
307
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
308
+ // The points branch delegates to PointCloud, which owns and reports its own
309
+ // <points>; relabel so it still surfaces as this geometry's config.
310
+ const reportReady = (_object, ref) => onObjectReady && onObjectReady(config, ref);
311
+ const reportDispose = (_object, ref) => onObjectDispose && onObjectDispose(config, ref);
312
+ console.log({
313
+ config,
314
+ modeConfig,
315
+ });
305
316
  const geometry = useShapeGeometry(config);
306
317
  const safeModeConfig = normalizeModeConfig(modeConfig);
307
318
  const data = useModeData(geometry, safeModeConfig);
308
319
  // if (data.kind === 'points') return <PointCloud positions={data.positions} color={color} size={modeConfig.mode === 'vertices' ? 0.035 : 0.02} />;
309
320
  if (data.kind === 'points')
310
- return _jsx(PointCloud, { positions: data.positions, animations: animations, materialSettings: materialSettings });
321
+ return _jsx(PointCloud, { positions: data.positions, animations: animations, materialSettings: materialSettings, onObjectReady: reportReady, onObjectDispose: reportDispose });
311
322
  if (data.kind === 'lines')
312
- return data.points.length ? _jsx(Line, { points: data.points, segments: true, color: color, lineWidth: safeModeConfig.lineWidth }) : null;
323
+ return data.points.length ? _jsx(Line, { ref: rootRef, points: data.points, segments: true, color: color, lineWidth: safeModeConfig.lineWidth }) : null;
313
324
  if (data.kind === 'plexus')
314
- return (_jsxs("group", { children: [_jsx(PointCloud, { positions: data.positions, animations: animations, materialSettings: materialSettings }), data.segments.length > 0 && _jsx(Line, { points: data.segments, segments: true, color: color, lineWidth: safeModeConfig.lineWidth, transparent: true, opacity: 0.45 })] }));
315
- return (_jsx("mesh", { geometry: geometry, children: children ?? _jsx("meshPhongMaterial", { color: color, side: DoubleSide }) }));
325
+ return (_jsxs("group", { ref: rootRef, children: [_jsx(PointCloud, { positions: data.positions, animations: animations, materialSettings: materialSettings }), data.segments.length > 0 && _jsx(Line, { points: data.segments, segments: true, color: color, lineWidth: safeModeConfig.lineWidth, transparent: true, opacity: 0.45 })] }));
326
+ return (_jsx("mesh", { ref: rootRef, geometry: geometry, children: children ?? _jsx("meshPhongMaterial", { color: color, side: DoubleSide }) }));
316
327
  }
317
328
  export function FitGroup({ geometry, radius = 1.7, children }) {
318
329
  const { scale, position } = useMemo(() => {
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { GlyphsConfig } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
- export interface GlyphsProps {
4
+ export interface GlyphsProps extends ObjectReadyProps {
4
5
  config: GlyphsConfig;
5
6
  boundingRadius?: number;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Glyphs.d.ts","sourceRoot":"","sources":["../../src/components/Glyphs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmDjC,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Glyphs.d.ts","sourceRoot":"","sources":["../../src/components/Glyphs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqDjC,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -1,9 +1,13 @@
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 { useEffect, useMemo } from 'react';
3
5
  import { useFrame } from '@react-three/fiber';
4
6
  import * as THREE from 'three';
5
7
  import { GlyphRingMaterial } from '@3driseai/3drise-core';
6
- const Glyphs = ({ config, boundingRadius }) => {
8
+ const Glyphs = ({ config, boundingRadius, onObjectReady, onObjectDispose }) => {
9
+ const rootRef = useRef(null);
10
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
7
11
  // The ring sits at r=0.55 within UV space, so the plane must span 2 * ringRadius / 0.55
8
12
  // for the ring's outer edge to land at the configured `ringRadius` in world units.
9
13
  const planeSize = useMemo(() => {
@@ -53,6 +57,6 @@ const Glyphs = ({ config, boundingRadius }) => {
53
57
  });
54
58
  if (!config.enabled)
55
59
  return null;
56
- return _jsx("mesh", { geometry: geometry, material: material, frustumCulled: false });
60
+ return _jsx("mesh", { ref: rootRef, geometry: geometry, material: material, frustumCulled: false });
57
61
  };
58
62
  export default Glyphs;
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import * as THREE from 'three';
2
3
  import React from "react";
3
- export interface GridHelperProps {
4
+ export interface GridHelperProps extends ObjectReadyProps {
4
5
  cellSize?: number;
5
6
  cellThickness?: number;
6
7
  cellColor?: THREE.ColorRepresentation;
@@ -1 +1 @@
1
- {"version":3,"file":"GridHelper.d.ts","sourceRoot":"","sources":["../../src/components/GridHelper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAC5C;AAcD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmBzC,CAAC;AACF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"GridHelper.d.ts","sourceRoot":"","sources":["../../src/components/GridHelper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAC5C;AAcD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoBzC,CAAC;AACF,eAAe,UAAU,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 } from 'react';
3
4
  import { Grid } from '@react-three/drei';
4
5
  import * as THREE from 'three';
@@ -13,8 +14,9 @@ const cleanColor = (color) => {
13
14
  }
14
15
  return color;
15
16
  };
16
- const GridHelper = ({ cellSize = 1, cellThickness = 1, cellColor = '#000000', sectionSize = 10, sectionThickness = 1.5, sectionColor = '#000000', followCamera = false, infiniteGrid = true, fadeDistance = 30, fadeStrength = 1, fadeFrom = 0, side = THREE.DoubleSide, position = [0, 0, 0], rotation = [0, 0, 0], visible = true, device = 'desktop', }) => {
17
+ const GridHelper = ({ cellSize = 1, cellThickness = 1, cellColor = '#000000', sectionSize = 10, sectionThickness = 1.5, sectionColor = '#000000', followCamera = false, infiniteGrid = true, fadeDistance = 30, fadeStrength = 1, fadeFrom = 0, side = THREE.DoubleSide, position = [0, 0, 0], rotation = [0, 0, 0], visible = true, device = 'desktop', onObjectReady, onObjectDispose, }) => {
17
18
  const gridRef = useRef(null);
19
+ useObjectReady(gridRef, { cellSize, sectionSize, position, rotation, visible, device }, onObjectReady, onObjectDispose);
18
20
  const targetY = useRef(position[1]);
19
21
  const responsiveScale = useMemo(() => {
20
22
  if (device === 'mobile')
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import React from "react";
2
3
  import type { GridConfig, MyGridConfig } from "@3driseai/3drise-core";
3
- type GridGeneratorProps = {
4
+ type GridGeneratorProps = ObjectReadyProps & {
4
5
  config: (GridConfig | MyGridConfig) & {
5
6
  type: string;
6
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"GridsGenerator.d.ts","sourceRoot":"","sources":["../../src/components/GridsGenerator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACtE,KAAK,kBAAkB,GAAG;IACtB,MAAM,EAAE,CAAC,UAAU,GAAG,YAAY,CAAC,GAAG;QAClC,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;CACL,CAAC;AAGF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAS/C,CAAC;AACF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"GridsGenerator.d.ts","sourceRoot":"","sources":["../../src/components/GridsGenerator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACtE,KAAK,kBAAkB,GAAG,gBAAgB,GAAG;IACzC,MAAM,EAAE,CAAC,UAAU,GAAG,YAAY,CAAC,GAAG;QAClC,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;CACL,CAAC;AAGF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAe/C,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -1,14 +1,22 @@
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 GridHelper from "./GridHelper.js";
3
5
  import { MyGrid } from "./MyGrid.js";
4
- const GridGenerator = ({ config }) => {
6
+ const GridGenerator = ({ config, onObjectReady, onObjectDispose }) => {
7
+ // The other two branches render components that report themselves; the
8
+ // native <gridHelper> is a plain three object, so this component holds its
9
+ // ref and reports on its behalf. The ref stays null on the other branches,
10
+ // which the hook treats as nothing to report.
11
+ const nativeGridRef = useRef(null);
12
+ useObjectReady(nativeGridRef, config, onObjectReady, onObjectDispose);
5
13
  switch (config.type) {
6
14
  case "basic":
7
- return _jsx(GridHelper, { ...config, side: 2 });
15
+ return _jsx(GridHelper, { ...config, side: 2, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
8
16
  case "superGrid":
9
- return _jsx(MyGrid, { config: config });
17
+ return _jsx(MyGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
10
18
  default:
11
- return _jsx("gridHelper", { ...config });
19
+ return _jsx("gridHelper", { ...config, ref: nativeGridRef });
12
20
  }
13
21
  };
14
22
  export default GridGenerator;
@@ -1,5 +1,6 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { HdrTransitionSettings } from "@3driseai/3drise-core";
2
- export interface HdrPlaylistRendererProps {
3
+ export interface HdrPlaylistRendererProps extends ObjectReadyProps {
3
4
  /** Two or more equirect HDR URLs to cycle through. Caller ensures length >= 2. */
4
5
  urls: string[];
5
6
  /** Fully resolved transition settings (defaults already merged). */
@@ -1 +1 @@
1
- {"version":3,"file":"HdrPlaylistRenderer.d.ts","sourceRoot":"","sources":["../../src/components/HdrPlaylistRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,MAAM,WAAW,wBAAwB;IACrC,kFAAkF;IAClF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,oEAAoE;IACpE,UAAU,EAAE,qBAAqB,CAAC;CACrC;AAwJD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA+M3D,CAAC;AACF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"HdrPlaylistRenderer.d.ts","sourceRoot":"","sources":["../../src/components/HdrPlaylistRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAM7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAC9D,kFAAkF;IAClF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,oEAAoE;IACpE,UAAU,EAAE,qBAAqB,CAAC;CACrC;AAwJD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgN3D,CAAC;AACF,eAAe,mBAAmB,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 { useEffect, useMemo, useRef, useState } from 'react';
3
4
  import { useFrame, useThree } from '@react-three/fiber';
4
5
  import * as THREE from 'three';
@@ -153,7 +154,7 @@ const pickNext = (order, current, length, directionRef) => {
153
154
  return next;
154
155
  };
155
156
  // ── Component ───────────────────────────────────────────────────────────────
156
- const HdrPlaylistRenderer = ({ urls, transition }) => {
157
+ const HdrPlaylistRenderer = ({ urls, transition, onObjectReady, onObjectDispose }) => {
157
158
  const { scene, gl: renderer, camera } = useThree();
158
159
  const mixRef = useRef(0);
159
160
  const tlRef = useRef(null);
@@ -169,6 +170,7 @@ const HdrPlaylistRenderer = ({ urls, transition }) => {
169
170
  transitionRef.current = transition;
170
171
  }, [transition]);
171
172
  const bgMeshRef = useRef(null);
173
+ useObjectReady(bgMeshRef, { urls, transition }, onObjectReady, onObjectDispose);
172
174
  // Gates the timeline-build effect on the cube-RT pipeline being ready.
173
175
  // Replaces a previous rAF poll — flips false → true once HDRs load and
174
176
  // stateRef.current is populated, and back to false on URL/teardown changes.
@@ -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 LensflareProps {
5
+ export interface LensflareProps extends ObjectReadyProps {
5
6
  visible?: boolean;
6
7
  intensity?: number;
7
8
  timeSettings?: TimeSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"Lensflare.d.ts","sourceRoot":"","sources":["../../src/components/Lensflare.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CA4BpE;AACD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA8BvC,CAAC;AACF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Lensflare.d.ts","sourceRoot":"","sources":["../../src/components/Lensflare.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CA4BpE;AACD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA+BvC,CAAC;AACF,eAAe,SAAS,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 } from 'react';
3
4
  import * as THREE from 'three';
4
5
  import { useThree } from '@react-three/fiber';
@@ -32,8 +33,9 @@ export function createFlareTexture(type) {
32
33
  texture.magFilter = THREE.LinearFilter;
33
34
  return texture;
34
35
  }
35
- const Lensflare = ({ visible = true, intensity = 1, timeSettings = { enabled: false, timeOfDay: 12, timescale: 1, autoAnimate: true, syncWithRealTime: false }, }) => {
36
+ const Lensflare = ({ visible = true, intensity = 1, timeSettings = { enabled: false, timeOfDay: 12, timescale: 1, autoAnimate: true, syncWithRealTime: false }, onObjectReady, onObjectDispose, }) => {
36
37
  const spriteRef = useRef(null);
38
+ useObjectReady(spriteRef, { visible, intensity, timeSettings }, onObjectReady, onObjectDispose);
37
39
  const { camera } = useThree();
38
40
  const texture = useMemo(() => createFlareTexture(0), []);
39
41
  const material = useMemo(() => new THREE.SpriteMaterial({
@@ -1,3 +1,4 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { HoverSettings, Vector3Array, TransformEffect, MaterialSettings, ColorEffect, TextConfig } from '@3driseai/3drise-core';
2
3
  import { Object3D } from "three";
3
4
  export interface LetterData {
@@ -5,7 +6,7 @@ export interface LetterData {
5
6
  position: Vector3Array;
6
7
  index: number;
7
8
  }
8
- export interface LetterProps {
9
+ export interface LetterProps extends ObjectReadyProps {
9
10
  letterData: LetterData;
10
11
  config: TextConfig;
11
12
  materialSettings: MaterialSettings;
@@ -15,5 +16,5 @@ export interface LetterProps {
15
16
  isActive: boolean;
16
17
  onClick?: (object: Object3D) => void;
17
18
  }
18
- export default function Letter({ letterData, config, materialSettings, hoverSettings, transformEffects, colorEffects, isActive, onClick, }: LetterProps): import("react").JSX.Element;
19
+ export default function Letter({ letterData, config, materialSettings, hoverSettings, transformEffects, colorEffects, isActive, onClick, onObjectReady, onObjectDispose, }: LetterProps): import("react").JSX.Element;
19
20
  //# sourceMappingURL=Letter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Letter.d.ts","sourceRoot":"","sources":["../../src/components/Letter.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrI,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,UAAU,CAAC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AI,CAAC;CACxC;AA6BD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAqB,EAAE,YAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,WAAW,+BAiDhM"}
@@ -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, useState, useEffect } from 'react';
3
4
  import { useFrame } from '@react-three/fiber';
4
5
  import { useCursor, Text, Text3D, Center } from '@react-three/drei';
@@ -32,8 +33,9 @@ const getText2DConfig = (config) => {
32
33
  anchorY: c.anchorY ?? 'middle',
33
34
  };
34
35
  };
35
- export default function Letter({ letterData, config, materialSettings, hoverSettings, transformEffects = [], colorEffects = [], isActive, onClick, }) {
36
+ export default function Letter({ letterData, config, materialSettings, hoverSettings, transformEffects = [], colorEffects = [], isActive, onClick, onObjectReady, onObjectDispose, }) {
36
37
  const groupRef = useRef(null);
38
+ useObjectReady(groupRef, letterData, onObjectReady, onObjectDispose);
37
39
  const letterRef = useRef(null);
38
40
  const hitboxRef = useRef(null);
39
41
  const effectStateRef = useRef(null);
@@ -1,9 +1,10 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import { LetterData } from './Letter';
2
3
  import type { HoverSettings } from "@3driseai/3drise-core";
3
4
  import type { TextConfig } from "@3driseai/3drise-core";
4
5
  import type { MaterialSettings } from "@3driseai/3drise-core";
5
6
  import type { ColorEffect, TransformEffect } from "@3driseai/3drise-core";
6
- export interface LettersProps {
7
+ export interface LettersProps extends ObjectReadyProps {
7
8
  text: string;
8
9
  config: TextConfig;
9
10
  materialSettings: MaterialSettings;
@@ -12,5 +13,5 @@ export interface LettersProps {
12
13
  colorEffects?: ColorEffect[];
13
14
  onLetterClick?: (letterData: LetterData) => void;
14
15
  }
15
- export default function Letters({ text, config, materialSettings, hoverSettings, transformEffects, colorEffects, onLetterClick, }: LettersProps): import("react").JSX.Element;
16
+ export default function Letters({ text, config, materialSettings, hoverSettings, transformEffects, colorEffects, onLetterClick, onObjectReady, onObjectDispose, }: LettersProps): import("react").JSX.Element;
16
17
  //# sourceMappingURL=Letters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Letters.d.ts","sourceRoot":"","sources":["../../src/components/Letters.tsx"],"names":[],"mappings":"AACA,OAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CACpD;AAGD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAqB,EAAE,YAAiB,EAAE,aAAa,GAAG,EAAE,YAAY,+BAcxJ"}
1
+ {"version":3,"file":"Letters.d.ts","sourceRoot":"","sources":["../../src/components/Letters.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CACpD;AAGD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAqB,EAAE,YAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,YAAY,+BAexL"}
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useRef } from 'react';
3
4
  import Letter from './Letter.js';
4
- export default function Letters({ text, config, materialSettings, hoverSettings, transformEffects = [], colorEffects = [], onLetterClick, }) {
5
+ export default function Letters({ text, config, materialSettings, hoverSettings, transformEffects = [], colorEffects = [], onLetterClick, onObjectReady, onObjectDispose, }) {
5
6
  const ref = useRef(null);
7
+ useObjectReady(ref, config, onObjectReady, onObjectDispose);
6
8
  const characters = text.split('');
7
9
  const letterSpacing = config.letterSpacing || 0;
8
10
  const spacing = 0.6 + letterSpacing;
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import React from "react";
2
3
  import type { CreatedObjectSettings } from "@3driseai/3drise-core";
3
- type LightObjectProps = {
4
+ type LightObjectProps = ObjectReadyProps & {
4
5
  createdObject: CreatedObjectSettings;
5
6
  };
6
7
  declare const LightObject: React.FC<LightObjectProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"LightObject.d.ts","sourceRoot":"","sources":["../../src/components/LightObject.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,KAAK,gBAAgB,GAAG;IACpB,aAAa,EAAE,qBAAqB,CAAC;CACxC,CAAC;AA4CF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgB3C,CAAC;AACF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"LightObject.d.ts","sourceRoot":"","sources":["../../src/components/LightObject.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAM7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,KAAK,gBAAgB,GAAG,gBAAgB,GAAG;IACvC,aAAa,EAAE,qBAAqB,CAAC;CACxC,CAAC;AA+CF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgB3C,CAAC;AACF,eAAe,WAAW,CAAC"}
@@ -1,19 +1,22 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useObjectReady } from '../hooks/useObjectReady.js';
2
3
  import { useEffect, useRef } from 'react';
3
4
  import { useThree } from '@react-three/fiber';
4
5
  import { useLightShadow } from '../hooks/useLightShadow.js';
5
6
  import { useLightAnimation } from '../hooks/useLightAnimation.js';
6
7
  import { useLightMouseMove } from '../hooks/useLightMouseMove.js';
7
- const DirectionalLightR3F = ({ config, animations, mouseMove }) => {
8
+ const DirectionalLightR3F = ({ config, animations, mouseMove, settings, onObjectReady, onObjectDispose }) => {
8
9
  const lightRef = useRef(null);
10
+ useObjectReady(lightRef, settings, onObjectReady, onObjectDispose);
9
11
  useLightShadow(lightRef, config.shadow);
10
12
  useLightAnimation(lightRef, animations);
11
13
  useLightMouseMove(lightRef, mouseMove, { lightConfig: config });
12
14
  return (_jsx("directionalLight", { ref: lightRef, color: config.color || '#ffffff', intensity: config.intensity ?? 1 }));
13
15
  };
14
- const SpotLightR3F = ({ config, animations, mouseMove }) => {
16
+ const SpotLightR3F = ({ config, animations, mouseMove, settings, onObjectReady, onObjectDispose }) => {
15
17
  const { scene } = useThree();
16
18
  const lightRef = useRef(null);
19
+ useObjectReady(lightRef, settings, onObjectReady, onObjectDispose);
17
20
  const targetRef = useRef(null);
18
21
  const [tx, ty, tz] = config.targetPosition ?? [0, 0, 0];
19
22
  useEffect(() => {
@@ -38,14 +41,15 @@ const SpotLightR3F = ({ config, animations, mouseMove }) => {
38
41
  useLightMouseMove(lightRef, mouseMove, { lightConfig: config });
39
42
  return (_jsx("spotLight", { ref: lightRef, color: config.color || '#ffffff', intensity: config.intensity ?? 1, angle: config.angle ?? Math.PI / 4, penumbra: config.penumbra ?? 0.1, decay: config.decay ?? 1, distance: config.distance ?? 0 }));
40
43
  };
41
- const PointLightR3F = ({ config, animations, mouseMove }) => {
44
+ const PointLightR3F = ({ config, animations, mouseMove, settings, onObjectReady, onObjectDispose }) => {
42
45
  const lightRef = useRef(null);
46
+ useObjectReady(lightRef, settings, onObjectReady, onObjectDispose);
43
47
  useLightShadow(lightRef, config.shadow);
44
48
  useLightAnimation(lightRef, animations);
45
49
  useLightMouseMove(lightRef, mouseMove, { lightConfig: config });
46
50
  return (_jsx("pointLight", { ref: lightRef, color: config.color || '#ffffff', intensity: config.intensity ?? 1, decay: config.decay ?? 1, distance: config.distance ?? 0 }));
47
51
  };
48
- const LightObject = ({ createdObject }) => {
52
+ const LightObject = ({ createdObject, onObjectReady, onObjectDispose }) => {
49
53
  const config = createdObject.config;
50
54
  if (!config || config.enabled === false)
51
55
  return null;
@@ -53,11 +57,11 @@ const LightObject = ({ createdObject }) => {
53
57
  const mouseMove = createdObject.mouseMove?.light;
54
58
  switch (config.type) {
55
59
  case 'directional':
56
- return _jsx(DirectionalLightR3F, { config: config, animations: animations, mouseMove: mouseMove });
60
+ return _jsx(DirectionalLightR3F, { config: config, animations: animations, mouseMove: mouseMove, settings: createdObject, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
57
61
  case 'spot':
58
- return _jsx(SpotLightR3F, { config: config, animations: animations, mouseMove: mouseMove });
62
+ return _jsx(SpotLightR3F, { config: config, animations: animations, mouseMove: mouseMove, settings: createdObject, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
59
63
  case 'point':
60
- return _jsx(PointLightR3F, { config: config, animations: animations, mouseMove: mouseMove });
64
+ return _jsx(PointLightR3F, { config: config, animations: animations, mouseMove: mouseMove, settings: createdObject, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
61
65
  default:
62
66
  return null;
63
67
  }
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { SceneLightConfig } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
- export interface LightsManagerProps {
4
+ export interface LightsManagerProps extends ObjectReadyProps {
4
5
  config: SceneLightConfig;
5
6
  }
6
7
  declare const LightsManager: React.FC<LightsManagerProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"LightsManager.d.ts","sourceRoot":"","sources":["../../src/components/LightsManager.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAID,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+F/C,CAAC;AACF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"LightsManager.d.ts","sourceRoot":"","sources":["../../src/components/LightsManager.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAID,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmG/C,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -1,13 +1,16 @@
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 { useRef, useEffect } from 'react';
3
4
  import { useFrame, useThree } from '@react-three/fiber';
4
5
  import { createSunPosition } from '@3driseai/3drise-core';
5
6
  import { Color, } from 'three';
6
7
  import { useLightAnimation } from '../hooks/useLightAnimation.js';
7
8
  const SUN_DISTANCE = 100;
8
- const LightsManager = ({ config }) => {
9
+ const LightsManager = ({ config, onObjectReady, onObjectDispose }) => {
9
10
  const { scene } = useThree();
10
11
  const ambientLightRef = useRef(null);
12
+ const rootRef = useRef(null);
13
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
11
14
  const sunLightRef = useRef(null);
12
15
  const ambientConfig = config.ambient;
13
16
  const sunConfig = config.sun;
@@ -99,6 +102,6 @@ const LightsManager = ({ config }) => {
99
102
  sunLightRef.current.position.set(sunPosition.x * SUN_DISTANCE, sunPosition.y * SUN_DISTANCE, sunPosition.z * SUN_DISTANCE);
100
103
  }
101
104
  });
102
- return (_jsxs(_Fragment, { children: [_jsx("ambientLight", { ref: ambientLightRef, color: ambientConfig?.color, intensity: ambientConfig?.intensity, visible: ambientConfig?.enabled }), _jsx("directionalLight", { visible: sunConfig?.enabled, ref: sunLightRef, color: sunConfig?.color || '#ffffff', intensity: sunConfig?.intensity ?? 1, castShadow: config.enableShadows ?? true })] }));
105
+ return (_jsxs("group", { ref: rootRef, children: [_jsx("ambientLight", { ref: ambientLightRef, color: ambientConfig?.color, intensity: ambientConfig?.intensity, visible: ambientConfig?.enabled }), _jsx("directionalLight", { visible: sunConfig?.enabled, ref: sunLightRef, color: sunConfig?.color || '#ffffff', intensity: sunConfig?.intensity ?? 1, castShadow: config.enableShadows ?? true })] }));
103
106
  };
104
107
  export default LightsManager;
@@ -1,6 +1,7 @@
1
+ import type { ObjectReadyProps } from '../types/objectReady';
1
2
  import type { ParticlesSettings } from '@3driseai/3drise-core';
2
3
  import React from "react";
3
- interface LinesProps {
4
+ interface LinesProps extends ObjectReadyProps {
4
5
  createdObject: ParticlesSettings;
5
6
  transitionSettings?: Record<string, any>;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../src/components/Lines.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,UAAU,UAAU;IAChB,aAAa,EAAE,iBAAiB,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5C;AAGD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAa/B,CAAC;AACF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../src/components/Lines.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,UAAU,UAAW,SAAQ,gBAAgB;IACzC,aAAa,EAAE,iBAAiB,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5C;AAGD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAa/B,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { PositionsCreator } from '@3driseai/3drise-core';
4
4
  import Path from './Path.js';
5
- const Lines = ({ createdObject, transitionSettings }) => {
5
+ const Lines = ({ createdObject, transitionSettings, onObjectReady, onObjectDispose }) => {
6
6
  if (!createdObject)
7
7
  return null;
8
8
  const { config } = createdObject;
@@ -14,6 +14,6 @@ const Lines = ({ createdObject, transitionSettings }) => {
14
14
  : config.shapeType;
15
15
  const curves = useMemo(() => PositionsCreator.generatePaths(config.shapeType), [config.shapeType]);
16
16
  const targetCurves = useMemo(() => PositionsCreator.generatePaths(targetShape), [targetShape]);
17
- return (_jsx(_Fragment, { children: curves.map((currentCurve, index) => (_jsx(Path, { curve: currentCurve, targetCurve: targetCurves[index % targetCurves.length], duration: 1, color: color }, `path-${index}`))) }));
17
+ return (_jsx(_Fragment, { children: curves.map((currentCurve, index) => (_jsx(Path, { curve: currentCurve, targetCurve: targetCurves[index % targetCurves.length], duration: 1, color: color, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }, `path-${index}`))) }));
18
18
  };
19
19
  export default Lines;