@3driseai/3drise-viewer 0.1.4 → 0.1.6

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 (196) hide show
  1. package/README.md +225 -0
  2. package/dist/components/AdvancedGrid.d.ts +16 -0
  3. package/dist/components/AdvancedGrid.d.ts.map +1 -0
  4. package/dist/components/AdvancedGrid.js +63 -0
  5. package/dist/components/AnimatedObject.d.ts.map +1 -1
  6. package/dist/components/AnimatedObject.js +6 -4
  7. package/dist/components/CameraController.d.ts.map +1 -1
  8. package/dist/components/CameraController.js +0 -6
  9. package/dist/components/CircuitGrid.d.ts +22 -0
  10. package/dist/components/CircuitGrid.d.ts.map +1 -0
  11. package/dist/components/CircuitGrid.js +69 -0
  12. package/dist/components/Clouds.d.ts.map +1 -1
  13. package/dist/components/Clouds.js +0 -5
  14. package/dist/components/ContourGrid.d.ts +25 -0
  15. package/dist/components/ContourGrid.d.ts.map +1 -0
  16. package/dist/components/ContourGrid.js +74 -0
  17. package/dist/components/CreatedObject.d.ts.map +1 -1
  18. package/dist/components/CreatedObject.js +3 -6
  19. package/dist/components/CustomPrimitive.d.ts.map +1 -1
  20. package/dist/components/CustomPrimitive.js +0 -5
  21. package/dist/components/EffectsGenerator.d.ts.map +1 -1
  22. package/dist/components/EffectsGenerator.js +0 -2
  23. package/dist/components/EffectsGroup.d.ts +6 -0
  24. package/dist/components/EffectsGroup.d.ts.map +1 -1
  25. package/dist/components/EffectsGroup.js +14 -4
  26. package/dist/components/FractalGrid.d.ts +23 -0
  27. package/dist/components/FractalGrid.d.ts.map +1 -0
  28. package/dist/components/FractalGrid.js +72 -0
  29. package/dist/components/Frame.d.ts.map +1 -1
  30. package/dist/components/Frame.js +2 -3
  31. package/dist/components/GalleryLayout.d.ts.map +1 -1
  32. package/dist/components/GalleryLayout.js +0 -3
  33. package/dist/components/GeometryShape.d.ts.map +1 -1
  34. package/dist/components/GeometryShape.js +0 -4
  35. package/dist/components/Glyphs.d.ts.map +1 -1
  36. package/dist/components/Glyphs.js +0 -1
  37. package/dist/components/GridsGenerator.d.ts +4 -1
  38. package/dist/components/GridsGenerator.d.ts.map +1 -1
  39. package/dist/components/GridsGenerator.js +28 -4
  40. package/dist/components/HdrPlaylistRenderer.d.ts.map +1 -1
  41. package/dist/components/HdrPlaylistRenderer.js +0 -1
  42. package/dist/components/HexGrid.d.ts +25 -0
  43. package/dist/components/HexGrid.d.ts.map +1 -0
  44. package/dist/components/HexGrid.js +72 -0
  45. package/dist/components/ImageGeometry.js +1 -1
  46. package/dist/components/Letter.d.ts.map +1 -1
  47. package/dist/components/Letter.js +1 -6
  48. package/dist/components/MoireGrid.d.ts +23 -0
  49. package/dist/components/MoireGrid.d.ts.map +1 -0
  50. package/dist/components/MoireGrid.js +76 -0
  51. package/dist/components/Moon.d.ts.map +1 -1
  52. package/dist/components/Moon.js +0 -1
  53. package/dist/components/ObjectNode.d.ts +1 -2
  54. package/dist/components/ObjectNode.d.ts.map +1 -1
  55. package/dist/components/ObjectNode.js +17 -20
  56. package/dist/components/ObjectNodeApi.d.ts +1 -2
  57. package/dist/components/ObjectNodeApi.d.ts.map +1 -1
  58. package/dist/components/ObjectNodeApi.js +7 -3
  59. package/dist/components/ObjectsRenderer.d.ts.map +1 -1
  60. package/dist/components/ObjectsRenderer.js +1 -4
  61. package/dist/components/ObjectsRendererApi.d.ts.map +1 -1
  62. package/dist/components/ObjectsRendererApi.js +4 -2
  63. package/dist/components/Ocean.d.ts.map +1 -1
  64. package/dist/components/Ocean.js +1 -4
  65. package/dist/components/ParticlesR3f.d.ts +0 -1
  66. package/dist/components/ParticlesR3f.d.ts.map +1 -1
  67. package/dist/components/PathRenderer.d.ts.map +1 -1
  68. package/dist/components/PathRenderer.js +0 -1
  69. package/dist/components/ProjectLoader.d.ts.map +1 -1
  70. package/dist/components/ProjectLoader.js +0 -28
  71. package/dist/components/QuasiGrid.d.ts +22 -0
  72. package/dist/components/QuasiGrid.d.ts.map +1 -0
  73. package/dist/components/QuasiGrid.js +68 -0
  74. package/dist/components/RadarGrid.d.ts +24 -0
  75. package/dist/components/RadarGrid.d.ts.map +1 -0
  76. package/dist/components/RadarGrid.js +71 -0
  77. package/dist/components/SceneBuilder.d.ts.map +1 -1
  78. package/dist/components/SceneBuilder.js +0 -1
  79. package/dist/components/ShootingStar.js +2 -2
  80. package/dist/components/ShootingStars.d.ts.map +1 -1
  81. package/dist/components/ShootingStars.js +0 -1
  82. package/dist/components/SkyController.d.ts.map +1 -1
  83. package/dist/components/SkyController.js +0 -3
  84. package/dist/components/Skybox.d.ts +5 -0
  85. package/dist/components/Skybox.d.ts.map +1 -1
  86. package/dist/components/Skybox.js +0 -1
  87. package/dist/components/SparklesBurst.d.ts.map +1 -1
  88. package/dist/components/SparklesBurst.js +0 -1
  89. package/dist/components/VoronoiGrid.d.ts +21 -0
  90. package/dist/components/VoronoiGrid.d.ts.map +1 -0
  91. package/dist/components/VoronoiGrid.js +67 -0
  92. package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
  93. package/dist/components/effects/ShockwaveEffect.js +0 -1
  94. package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
  95. package/dist/components/effects/SmokeRibbon.js +0 -1
  96. package/dist/components/index.d.ts +19 -2
  97. package/dist/components/index.d.ts.map +1 -1
  98. package/dist/components/index.js +9 -1
  99. package/dist/constants.d.ts +1 -1
  100. package/dist/constants.d.ts.map +1 -1
  101. package/dist/constants.js +2 -1
  102. package/dist/hooks/index.d.ts +4 -1
  103. package/dist/hooks/index.d.ts.map +1 -1
  104. package/dist/hooks/index.js +3 -1
  105. package/dist/hooks/use3driseShader.d.ts.map +1 -1
  106. package/dist/hooks/use3driseShader.js +0 -9
  107. package/dist/hooks/useAnimationEvents.d.ts.map +1 -1
  108. package/dist/hooks/useAnimationEvents.js +0 -19
  109. package/dist/hooks/useCameraAnimation.d.ts.map +1 -1
  110. package/dist/hooks/useCameraAnimation.js +0 -5
  111. package/dist/hooks/useContinuousEffects.d.ts +2 -3
  112. package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
  113. package/dist/hooks/useContinuousEffects.js +16 -61
  114. package/dist/hooks/useFrameAnimations.d.ts.map +1 -1
  115. package/dist/hooks/useFrameAnimations.js +0 -4
  116. package/dist/hooks/useGridSurface.d.ts +46 -0
  117. package/dist/hooks/useGridSurface.d.ts.map +1 -0
  118. package/dist/hooks/useGridSurface.js +66 -0
  119. package/dist/hooks/useGsapAnimation.d.ts.map +1 -1
  120. package/dist/hooks/useGsapAnimation.js +0 -3
  121. package/dist/hooks/useInteraction.d.ts.map +1 -1
  122. package/dist/hooks/useInteraction.js +0 -25
  123. package/dist/hooks/useInteractionEffects.d.ts +2 -2
  124. package/dist/hooks/useInteractionEffects.d.ts.map +1 -1
  125. package/dist/hooks/useInteractionEffects.js +3 -1
  126. package/dist/hooks/useMaterialApplication.d.ts +2 -2
  127. package/dist/hooks/useMaterialApplication.d.ts.map +1 -1
  128. package/dist/hooks/useMaterialApplication.js +7 -18
  129. package/dist/hooks/useMaterialOptions.d.ts.map +1 -1
  130. package/dist/hooks/useMaterialOptions.js +0 -6
  131. package/dist/hooks/useMeshController.d.ts.map +1 -1
  132. package/dist/hooks/useMeshController.js +0 -16
  133. package/dist/hooks/useObjectAnimation.d.ts +13 -2
  134. package/dist/hooks/useObjectAnimation.d.ts.map +1 -1
  135. package/dist/hooks/useObjectAnimation.js +26 -28
  136. package/dist/hooks/useObjectEdges.d.ts +2 -1
  137. package/dist/hooks/useObjectEdges.d.ts.map +1 -1
  138. package/dist/hooks/useObjectEdges.js +15 -3
  139. package/dist/hooks/useObjectEffects.d.ts.map +1 -1
  140. package/dist/hooks/useObjectEffects.js +0 -4
  141. package/dist/hooks/useRegisterScene.d.ts +17 -0
  142. package/dist/hooks/useRegisterScene.d.ts.map +1 -0
  143. package/dist/hooks/useRegisterScene.js +33 -0
  144. package/dist/hooks/useSequenceAnimation.d.ts +2 -2
  145. package/dist/hooks/useSequenceAnimation.d.ts.map +1 -1
  146. package/dist/hooks/useSequenceAnimation.js +5 -70
  147. package/dist/hooks/useShadowApplication.d.ts +2 -2
  148. package/dist/hooks/useShadowApplication.d.ts.map +1 -1
  149. package/dist/hooks/useShadowApplication.js +6 -2
  150. package/dist/hooks/useSkyAnimation.d.ts.map +1 -1
  151. package/dist/hooks/useSkyAnimation.js +0 -1
  152. package/dist/hooks/useSkySystem.d.ts.map +1 -1
  153. package/dist/hooks/useSkySystem.js +0 -1
  154. package/dist/index.d.ts +3 -1
  155. package/dist/index.d.ts.map +1 -1
  156. package/dist/index.js +2 -1
  157. package/dist/services/AnimationsManager.d.ts.map +1 -1
  158. package/dist/services/AnimationsManager.js +0 -1
  159. package/dist/shaders/CircuitGridMaterial.d.ts +76 -0
  160. package/dist/shaders/CircuitGridMaterial.d.ts.map +1 -0
  161. package/dist/shaders/CircuitGridMaterial.js +298 -0
  162. package/dist/shaders/ContourGridMaterial.d.ts +80 -0
  163. package/dist/shaders/ContourGridMaterial.d.ts.map +1 -0
  164. package/dist/shaders/ContourGridMaterial.js +259 -0
  165. package/dist/shaders/FractalGridMaterial.d.ts +76 -0
  166. package/dist/shaders/FractalGridMaterial.d.ts.map +1 -0
  167. package/dist/shaders/FractalGridMaterial.js +247 -0
  168. package/dist/shaders/HexGridMaterial.d.ts +73 -0
  169. package/dist/shaders/HexGridMaterial.d.ts.map +1 -0
  170. package/dist/shaders/HexGridMaterial.js +265 -0
  171. package/dist/shaders/MoireGridMaterial.d.ts +79 -0
  172. package/dist/shaders/MoireGridMaterial.d.ts.map +1 -0
  173. package/dist/shaders/MoireGridMaterial.js +271 -0
  174. package/dist/shaders/QuasiGridMaterial.d.ts +76 -0
  175. package/dist/shaders/QuasiGridMaterial.d.ts.map +1 -0
  176. package/dist/shaders/QuasiGridMaterial.js +238 -0
  177. package/dist/shaders/RadarGridMaterial.d.ts +77 -0
  178. package/dist/shaders/RadarGridMaterial.d.ts.map +1 -0
  179. package/dist/shaders/RadarGridMaterial.js +291 -0
  180. package/dist/shaders/VoronoiGridMaterial.d.ts +73 -0
  181. package/dist/shaders/VoronoiGridMaterial.d.ts.map +1 -0
  182. package/dist/shaders/VoronoiGridMaterial.js +266 -0
  183. package/dist/types/gridConfigs.d.ts +202 -0
  184. package/dist/types/gridConfigs.d.ts.map +1 -0
  185. package/dist/types/gridConfigs.js +11 -0
  186. package/dist/types/index.d.ts +1 -0
  187. package/dist/types/index.d.ts.map +1 -1
  188. package/dist/utils/handleGenerativeEffectsAnimations.d.ts +0 -1
  189. package/dist/utils/handleGenerativeEffectsAnimations.d.ts.map +1 -1
  190. package/dist/utils/handleGenerativeEffectsAnimations.js +0 -29
  191. package/dist/utils/resolveObject3D.d.ts +20 -0
  192. package/dist/utils/resolveObject3D.d.ts.map +1 -0
  193. package/dist/utils/resolveObject3D.js +9 -0
  194. package/dist/utils/shapes.d.ts.map +1 -1
  195. package/dist/utils/shapes.js +0 -1
  196. package/package.json +4 -4
@@ -27,10 +27,10 @@ const CreatedObject = memo(({ createdObject, children, shouldApply3driseMaterial
27
27
  const { controllersRef } = useTransformControls();
28
28
  const { handlePointerEnter, handlePointerLeave, hovered } = useFrameEffects(isSelected);
29
29
  const [mountedObject, setMountedObject] = useState(null);
30
- useObjectEdges(createdObject.id, createdObject.edgesSettings ?? DEFAULT_EDGES_SETTINGS);
30
+ useObjectEdges(createdObject.id, createdObject.edgesSettings ?? DEFAULT_EDGES_SETTINGS, meshRef);
31
31
  // useObjectGenerativeEffects(mountedObject, createdObject.effects);
32
- useMaterialApplication(meshRef.current, createdObject.materialSettings, shouldApply3driseMaterial);
33
- useShadowApplication(meshRef.current, createdObject.meshSettings.castShadow, createdObject.meshSettings.receiveShadow);
32
+ useMaterialApplication(meshRef, createdObject.materialSettings, shouldApply3driseMaterial);
33
+ useShadowApplication(meshRef, createdObject.meshSettings.castShadow, createdObject.meshSettings.receiveShadow);
34
34
  const anchoredPosition = cameraManager.getAnchorPosition(createdObject.meshSettings.anchor?.anchor || 'center', 0, createdObject.meshSettings.anchor?.offset || { y: 0, x: 0, z: 0 }, createdObject.meshSettings.anchor?.padding || 0);
35
35
  useEffect(() => {
36
36
  if (meshRef.current) {
@@ -41,11 +41,9 @@ const CreatedObject = memo(({ createdObject, children, shouldApply3driseMaterial
41
41
  useEffect(() => {
42
42
  if (transformRef.current && isSelected) {
43
43
  controllersRef.current.set(createdObject.id.toString(), transformRef.current);
44
- // console.log('Transform controls registered for object:', createdObject.id, createdObject.name);
45
44
  }
46
45
  return () => {
47
46
  controllersRef.current.delete(createdObject.id.toString());
48
- // console.log('Transform controls unregistered for object:', createdObject.id, createdObject.name);
49
47
  };
50
48
  }, [createdObject.id, isSelected]);
51
49
  useEffect(() => {
@@ -57,7 +55,6 @@ const CreatedObject = memo(({ createdObject, children, shouldApply3driseMaterial
57
55
  }, [createdObject.meshSettings.position, createdObject.meshSettings.rotation, createdObject.meshSettings.scale]);
58
56
  // const [noiseTexture, setNoiseTexture] = useState<Texture | null>(null);
59
57
  const handleObjectEnter = (e) => {
60
- // console.log(e)
61
58
  // Only handle if this is the actual mesh group, not a child
62
59
  if (e.eventObject !== meshRef.current)
63
60
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomPrimitive.d.ts","sourceRoot":"","sources":["../../src/components/CustomPrimitive.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,aAAa,EAAE,qBAAqB,CAAC;IACrC,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,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgFlD,CAAC;AAEH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"CustomPrimitive.d.ts","sourceRoot":"","sources":["../../src/components/CustomPrimitive.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,aAAa,EAAE,qBAAqB,CAAC;IACrC,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,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2ElD,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -11,12 +11,10 @@ const CustomPrimitive = memo(({ createdObject, onObjectReady, onObjectDispose, h
11
11
  // CustomPrimitive accepted onObjectReady but never fired it; this is the fix.
12
12
  useObjectReady(meshRef, createdObject, onObjectReady, onObjectDispose);
13
13
  const resolvedObject = useMemo(() => {
14
- // console.log(`Resolving object for ${createdObject.name}`, createdObject);
15
14
  if (!createdObject)
16
15
  return null;
17
16
  const obj = ObjectManager.getObject(createdObject.id);
18
17
  if (!obj) {
19
- console.warn(`CustomPrimitive - Object with ID ${createdObject.id} not found.`);
20
18
  return null;
21
19
  }
22
20
  return obj.object;
@@ -61,7 +59,6 @@ const CustomPrimitive = memo(({ createdObject, onObjectReady, onObjectDispose, h
61
59
  // createdObject.config,
62
60
  // ]);
63
61
  const isWaterMaterial = createdObject.materialSettings.materialVariant === 'water' || createdObject.materialSettings.materialType === 'water';
64
- // console.log({isWaterMaterial, materialVariant: createdObject.materialSettings.materialVariant, materialType: createdObject.materialSettings.materialType})
65
62
  useWaterReflections(createdObject.meshSettings.visible && isWaterMaterial ? meshRef : { current: null }, {
66
63
  waterPosition: new Vector3(...createdObject.meshSettings.position),
67
64
  resolution: 256,
@@ -78,11 +75,9 @@ const CustomPrimitive = memo(({ createdObject, onObjectReady, onObjectDispose, h
78
75
  // else if (materialType === 'line') {
79
76
  // mode = 'outline';
80
77
  // }
81
- // console.log({createdObject});
82
78
  if (createdObject.type === 'mesh')
83
79
  return _jsx("mesh", { ref: meshRef, name: createdObject.name, children: _jsx(GeometryMesh, { config: createdObject.config, materialSettings: createdObject.materialSettings, animations: createdObject.animations, onObjectReady: (_object, ref) => onObjectReady && onObjectReady(createdObject, ref), onObjectDispose: (_object, ref) => onObjectDispose && onObjectDispose(createdObject, ref), modeConfig: createdObject.modeConfig || { mode: 'solid', count: 1000, symmetry: 3, spacing: 0.1, slices: 8, linkRadius: 0.05, angle: 18, lineWidth: 1 } }) }, createdObject.id);
84
80
  if (!resolvedObject) {
85
- console.warn(`no resolved object for ${createdObject.name} (${createdObject.id})`);
86
81
  return null;
87
82
  }
88
83
  return (_jsx("primitive", { ref: meshRef, name: createdObject.name, object: resolvedObject, children: useDreiMaterials && createdObject.meshSettings.visible && (_jsx(MaterialLibrary, { materialSettings: createdObject.materialSettings })) }, createdObject.id));
@@ -1 +1 @@
1
- {"version":3,"file":"EffectsGenerator.d.ts","sourceRoot":"","sources":["../../src/components/EffectsGenerator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyBtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC3D,QAAQ,EAAE,wBAAwB,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B;AAGD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA4CrD,CAAC;AACF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"EffectsGenerator.d.ts","sourceRoot":"","sources":["../../src/components/EffectsGenerator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyBtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC3D,QAAQ,EAAE,wBAAwB,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B;AAGD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0CrD,CAAC;AACF,eAAe,gBAAgB,CAAC"}
@@ -26,9 +26,7 @@ import Glyphs from './Glyphs.js';
26
26
  import Fire from './effects/Fire.js';
27
27
  import SmokeRibbon from './effects/SmokeRibbon.js';
28
28
  const EffectsGenerator = ({ settings, object, onObjectReady, onObjectDispose }) => {
29
- console.log('EffectsGenerator render with settings:', settings, 'and object:', object);
30
29
  const { config } = settings;
31
- // console.log('Effect config:', config);
32
30
  const boundingRadius = useMemo(() => {
33
31
  if (!object)
34
32
  return 1;
@@ -1,8 +1,14 @@
1
1
  import type { ObjectReadyProps } from '../types/objectReady';
2
2
  import type { CreatedObjectSettings } from '@3driseai/3drise-core';
3
+ import type { Object3DSource } from '../utils/resolveObject3D';
3
4
  import React from "react";
4
5
  interface EffectsGroupProps extends ObjectReadyProps {
5
6
  createdObject: CreatedObjectSettings;
7
+ /**
8
+ * The object the effects are sized against — normally the parent group.
9
+ * Pass the ref itself, not its current value.
10
+ */
11
+ objectRef?: Object3DSource;
6
12
  }
7
13
  declare const EffectsGroup: React.FC<EffectsGroupProps>;
8
14
  export default EffectsGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"EffectsGroup.d.ts","sourceRoot":"","sources":["../../src/components/EffectsGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,UAAU,iBAAkB,SAAQ,gBAAgB;IAChD,aAAa,EAAE,qBAAqB,CAAC;CACxC;AAGD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAQ7C,CAAC;AACF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"EffectsGroup.d.ts","sourceRoot":"","sources":["../../src/components/EffectsGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,UAAU,iBAAkB,SAAQ,gBAAgB;IAChD,aAAa,EAAE,qBAAqB,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;CAC9B;AAGD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiB7C,CAAC;AACF,eAAe,YAAY,CAAC"}
@@ -1,16 +1,26 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useRef } from 'react';
2
+ import { useEffect, useRef, useState } from 'react';
3
3
  import { useObjectReady } from '../hooks/useObjectReady.js';
4
4
  import { GEREATIVE_EFFECTS_KEY } from '@3driseai/3drise-core';
5
5
  import EffectsGenerator from './EffectsGenerator.js';
6
6
  import { findById } from '../utils/sceneQuery.js';
7
- const EffectsGroup = ({ createdObject, onObjectReady, onObjectDispose }) => {
7
+ import { resolveObject3D } from '../utils/resolveObject3D.js';
8
+ const EffectsGroup = ({ createdObject, objectRef, onObjectReady, onObjectDispose }) => {
8
9
  // Hooks must run before the early return below.
9
10
  const groupRef = useRef(null);
10
11
  useObjectReady(groupRef, createdObject, onObjectReady, onObjectDispose);
11
- if (!createdObject.effects || createdObject.effects.length === 0)
12
+ const hasEffects = !!createdObject.effects?.length;
13
+ // Resolved in an effect rather than during render: the parent's ref only
14
+ // attaches after the render that mounts it, and EffectsGenerator sizes every
15
+ // effect off this object — resolving too early silently yields radius 1.
16
+ const [object, setObject] = useState(null);
17
+ useEffect(() => {
18
+ if (!hasEffects)
19
+ return;
20
+ setObject(resolveObject3D(objectRef) ?? findById(createdObject.id));
21
+ }, [hasEffects, objectRef, createdObject.id]);
22
+ if (!hasEffects)
12
23
  return null;
13
- const object = findById(createdObject.id);
14
24
  return (_jsx("group", { ref: groupRef, name: `${createdObject.id}-effects`, userData: { [GEREATIVE_EFFECTS_KEY]: true }, children: createdObject.effects.map((effect, index) => (_jsx(EffectsGenerator, { settings: effect, object: object, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }, index))) }));
15
25
  };
16
26
  export default EffectsGroup;
@@ -0,0 +1,23 @@
1
+ import type { ThreeElements } from '@react-three/fiber';
2
+ import type { ObjectReadyProps } from '../types/objectReady';
3
+ import type { FractalGridConfig } from '../types/gridConfigs';
4
+ export interface FractalGridProps extends ObjectReadyProps {
5
+ config?: FractalGridConfig;
6
+ groupProps?: ThreeElements['group'];
7
+ }
8
+ /** FractalGridConfig — the single source of truth for a fractal grid instance. */
9
+ export declare const defaultFractalGridConfig: FractalGridConfig;
10
+ /**
11
+ * A quadtree that subdivides toward the focus point — fine where you are
12
+ * pointing, coarse at the edges, with `depth` levels between the two.
13
+ *
14
+ * The split radius halves at every level, which is what makes the refinement
15
+ * self-similar instead of one blurred blob around the focus. `splitJitter`
16
+ * wobbles that radius per cell so the boundary is ragged rather than a circle,
17
+ * and deeper cells lean toward `sectionColor` so the depth reads at a glance.
18
+ *
19
+ * `followMouse` defaults to on here, unlike the other grids.
20
+ */
21
+ export declare function FractalGrid({ config, groupProps, onObjectReady, onObjectDispose }: FractalGridProps): import("react").JSX.Element;
22
+ export default FractalGrid;
23
+ //# sourceMappingURL=FractalGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FractalGrid.d.ts","sourceRoot":"","sources":["../../src/components/FractalGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACtD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACvC;AAKD,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,EAAE,iBA8BtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAiC,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,gBAAgB,+BAiE9H;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useRef } from 'react';
3
+ import * as THREE from 'three';
4
+ import { useObjectReady } from '../hooks/useObjectReady.js';
5
+ import { useGridSurface } from '../hooks/useGridSurface.js';
6
+ import { FractalGridMaterial } from '@3driseai/3drise-core';
7
+ // Side-effect import registers <fractalGridMaterial> via extend().
8
+ void FractalGridMaterial;
9
+ /** FractalGridConfig — the single source of truth for a fractal grid instance. */
10
+ export const defaultFractalGridConfig = {
11
+ cellSize: 4,
12
+ size: 50,
13
+ segments: undefined,
14
+ flat: true,
15
+ lineMode: 0,
16
+ cellMode: 2, // twinkle, per leaf cell
17
+ lineWidth: 1.6,
18
+ sectionSize: 4,
19
+ sectionWidth: 2.2,
20
+ animSpeed: 1,
21
+ animScale: 0.5,
22
+ animIntensity: 1,
23
+ fadeDistance: undefined,
24
+ fadeStrength: 0.7,
25
+ displace: 0,
26
+ depth: 5,
27
+ splitRadius: 3.5,
28
+ splitJitter: 0.5,
29
+ lineColor: '#59bfff',
30
+ sectionColor: '#99e6ff',
31
+ cellColor: '#1f61a3',
32
+ glowColor: '#66e6ff',
33
+ bgColor: '#020810',
34
+ bgOpacity: 0,
35
+ // On by default: the refinement following the pointer is the whole point of
36
+ // this grid, and it looks inert without it.
37
+ followMouse: true,
38
+ reveal: 1,
39
+ revealDuration: 0,
40
+ };
41
+ /**
42
+ * A quadtree that subdivides toward the focus point — fine where you are
43
+ * pointing, coarse at the edges, with `depth` levels between the two.
44
+ *
45
+ * The split radius halves at every level, which is what makes the refinement
46
+ * self-similar instead of one blurred blob around the focus. `splitJitter`
47
+ * wobbles that radius per cell so the boundary is ragged rather than a circle,
48
+ * and deeper cells lean toward `sectionColor` so the depth reads at a glance.
49
+ *
50
+ * `followMouse` defaults to on here, unlike the other grids.
51
+ */
52
+ export function FractalGrid({ config = defaultFractalGridConfig, groupProps, onObjectReady, onObjectDispose }) {
53
+ const matRef = useRef(null);
54
+ const rootRef = useRef(null);
55
+ const meshRef = useRef(null);
56
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
57
+ const { cellSize, size, segments, flat, lineMode, cellMode, lineWidth, sectionSize, sectionWidth, animSpeed, animScale, animIntensity, fadeDistance, fadeStrength, displace, depth, splitRadius, splitJitter, lineColor, sectionColor, cellColor, glowColor, bgColor, bgOpacity, followMouse, reveal, revealDuration, } = config;
58
+ const segs = segments ?? (displace > 0
59
+ ? Math.min(256, Math.max(64, Math.ceil(size / Math.max(cellSize, 1e-4)) * 2))
60
+ : 1);
61
+ const fade = fadeDistance ?? size * 0.5;
62
+ const colors = useMemo(() => ({
63
+ line: new THREE.Color(lineColor),
64
+ section: new THREE.Color(sectionColor),
65
+ cell: new THREE.Color(cellColor),
66
+ glow: new THREE.Color(glowColor),
67
+ bg: new THREE.Color(bgColor),
68
+ }), [lineColor, sectionColor, cellColor, glowColor, bgColor]);
69
+ useGridSurface(matRef, meshRef, { followMouse, reveal, revealDuration });
70
+ return (_jsx("group", { ref: rootRef, ...groupProps, children: _jsxs("mesh", { ref: meshRef, rotation: flat ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: [_jsx("planeGeometry", { args: [size, size, segs, segs] }), _jsx("fractalGridMaterial", { ref: matRef, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, side: THREE.DoubleSide, u_cellSize: cellSize, u_lineWidth: lineWidth, u_sectionSize: sectionSize, u_sectionWidth: sectionWidth, u_lineMode: lineMode, u_cellMode: cellMode, u_animSpeed: animSpeed, u_animScale: animScale, u_animIntensity: animIntensity, u_fadeDistance: fade, u_fadeStrength: fadeStrength, u_displace: displace, u_depth: Math.max(1, Math.min(6, depth)), u_splitRadius: splitRadius, u_splitJitter: splitJitter, u_lineColor: colors.line, u_sectionColor: colors.section, u_cellColor: colors.cell, u_glowColor: colors.glow, u_bgColor: colors.bg, u_bgOpacity: bgOpacity }, FractalGridMaterial.key)] }) }));
71
+ }
72
+ export default FractalGrid;
@@ -1 +1 @@
1
- {"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../src/components/Frame.tsx"],"names":[],"mappings":"AACA,OA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,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACpH;AAGD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAoB,EAAE,aAAa,EAAE,gBAAqB,EAAE,YAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,UAAU,+BA2ClR"}
@@ -25,7 +25,7 @@ export default function Frame({ url, isActive, createdObject, position, rotation
25
25
  texturesManager.loadTexture(name, url, 'images')
26
26
  .then((loaded) => { if (mounted)
27
27
  setTexture(loaded); })
28
- .catch((err) => console.error('Failed to load texture:', err));
28
+ .catch(() => { });
29
29
  }
30
30
  return () => { mounted = false; };
31
31
  }, [url]);
@@ -33,7 +33,7 @@ export default function Frame({ url, isActive, createdObject, position, rotation
33
33
  useCursor(hovered);
34
34
  const enabledEffects = transformEffects.filter(e => e.enabled !== false);
35
35
  const animateMaterial = enabledEffects.length > 0 || colorEffects.some(e => e.enabled !== false);
36
- useObjectAnimation(createdObject, animateMaterial, { enabled: true, hovered }, frameRef.current);
36
+ useObjectAnimation(createdObject, animateMaterial, { enabled: true, hovered }, frameRef);
37
37
  const scale = [
38
38
  0.9 * (layoutSettings.width || 1),
39
39
  0.9 * (layoutSettings.height || 1),
@@ -50,7 +50,6 @@ export default function Frame({ url, isActive, createdObject, position, rotation
50
50
  };
51
51
  if (!texture)
52
52
  return null;
53
- // console.log('Rendering Frame - url:', url);
54
53
  return (_jsx("mesh", { name: url, ref: frameRef, position: position, rotation: rotation, scale: scale, raycast: () => null, onPointerEnter: handlePointerEnter, onPointerLeave: handlePointerLeave, onClick: onClick, userData: {
55
54
  url,
56
55
  }, children: children ? children : (_jsxs(_Fragment, { children: [_jsx(FrameGeometry, { shapeType: 'rectangle', layoutSettings: layoutSettings, scale: layoutSettings.outerFrameScale }), _jsx(MaterialLibrary, { materialSettings: materialSettings }), showFront && (_jsx(FrameImage, { ref: imageRef, texture: texture, shapeType: 'rectangle', position: [0, 0, 0.02] })), showBack && (_jsx(FrameImage, { texture: texture, shapeType: 'rectangle', position: [0, 0, -0.02], rotation: [0, Math.PI, 0], isBack: true }))] })) }));
@@ -1 +1 @@
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
+ {"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,CAW/C,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -7,7 +7,6 @@ import { ImageGeometry } from './ImageGeometry.js';
7
7
  const GalleryLayout = ({ createdObject, selectedFrameUrl, handleObjectClick, onObjectReady, onObjectDispose, }) => {
8
8
  const groupRef = useRef(null);
9
9
  useObjectReady(groupRef, createdObject, onObjectReady, onObjectDispose);
10
- console.log('GalleryLayout - createdObject:', createdObject);
11
10
  const { config, materialSettings, animations } = createdObject;
12
11
  const galleryLayout = config || {
13
12
  frames: [],
@@ -15,8 +14,6 @@ const GalleryLayout = ({ createdObject, selectedFrameUrl, handleObjectClick, onO
15
14
  outerFrameScale: 1,
16
15
  };
17
16
  const { frames, layoutSettings } = useMemo(() => updateCurrentLayoutSettings(galleryLayout), [galleryLayout]);
18
- console.log('GalleryLayout - frames:', frames);
19
- console.log('GalleryLayout - layoutSettings:', layoutSettings);
20
17
  return (_jsx("group", { ref: groupRef, scale: [1, 1, 1], position: [0, 0, 0], rotation: [0, 0, 0], children: frames.map((frame, index) => (_jsx(Frame, { url: frame.url, isActive: selectedFrameUrl === frame.url, createdObject: createdObject, position: frame.position, rotation: frame.rotation, hoverSettings: { sensitivity: 0.5, applyToChildren: false }, transformEffects: animations?.transform?.effects || [], layoutSettings: layoutSettings, side: galleryLayout?.side || 2, materialSettings: materialSettings, handleObjectClick: handleObjectClick, children: layoutSettings.geometryType !== 'none' && (_jsx(ImageGeometry, { url: frame.url, geometryType: layoutSettings.geometryType, outerFrameScale: layoutSettings.outerFrameScale })) }, index))) }));
21
18
  };
22
19
  export default GalleryLayout;
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryShape.d.ts","sourceRoot":"","sources":["../../src/components/GeometryShape.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,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,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,EAAE,EAAE,CAAC;CAChB,GAAG;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,EAAE,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACvD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AA4BD,wBAAgB,gB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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,+BAkBpL;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"}
@@ -309,10 +309,6 @@ export function GeometryMesh({ config, materialSettings, animations, modeConfig
309
309
  // <points>; relabel so it still surfaces as this geometry's config.
310
310
  const reportReady = (_object, ref) => onObjectReady && onObjectReady(config, ref);
311
311
  const reportDispose = (_object, ref) => onObjectDispose && onObjectDispose(config, ref);
312
- console.log({
313
- config,
314
- modeConfig,
315
- });
316
312
  const geometry = useShapeGeometry(config);
317
313
  const safeModeConfig = normalizeModeConfig(modeConfig);
318
314
  const data = useModeData(geometry, safeModeConfig);
@@ -1 +1 @@
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
+ {"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,CAoDjC,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -14,7 +14,6 @@ const Glyphs = ({ config, boundingRadius, onObjectReady, onObjectDispose }) => {
14
14
  const r = Math.max(0.05, (boundingRadius ?? config.ringRadius ?? 1) * 2);
15
15
  return (2 * r) / 0.55;
16
16
  }, [boundingRadius, config.ringRadius]);
17
- console.log("Rendering Glyphs with config:", config, "and boundingRadius:", boundingRadius, "resulting in planeSize:", planeSize);
18
17
  const geometry = useMemo(() => new THREE.PlaneGeometry(planeSize, planeSize, 1, 1), [planeSize]);
19
18
  const material = useMemo(() => {
20
19
  const m = new GlyphRingMaterial();
@@ -1,8 +1,11 @@
1
1
  import type { ObjectReadyProps } from '../types/objectReady';
2
+ import type { CircuitGridConfig, ContourGridConfig, FractalGridConfig, HexGridConfig, MoireGridConfig, QuasiGridConfig, RadarGridConfig, VoronoiGridConfig } from '../types/gridConfigs';
2
3
  import React from "react";
3
4
  import type { GridConfig, MyGridConfig } from "@3driseai/3drise-core";
5
+ /** Every grid config this generator knows how to render. */
6
+ export type GridGeneratorConfig = GridConfig | MyGridConfig | HexGridConfig | CircuitGridConfig | VoronoiGridConfig | RadarGridConfig | MoireGridConfig | FractalGridConfig | ContourGridConfig | QuasiGridConfig;
4
7
  type GridGeneratorProps = ObjectReadyProps & {
5
- config: (GridConfig | MyGridConfig) & {
8
+ config: GridGeneratorConfig & {
6
9
  type: string;
7
10
  };
8
11
  };
@@ -1 +1 @@
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
+ {"version":3,"file":"GridsGenerator.d.ts","sourceRoot":"","sources":["../../src/components/GridsGenerator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EACR,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACpB,MAAM,sBAAsB,CAAC;AAW9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEtE,4DAA4D;AAC5D,MAAM,MAAM,mBAAmB,GACzB,UAAU,GACV,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,CAAC;AAEtB,KAAK,kBAAkB,GAAG,gBAAgB,GAAG;IACzC,MAAM,EAAE,mBAAmB,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;CACL,CAAC;AAGF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+B/C,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -2,9 +2,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useRef } from 'react';
3
3
  import { useObjectReady } from '../hooks/useObjectReady.js';
4
4
  import GridHelper from "./GridHelper.js";
5
- import { MyGrid } from "./MyGrid.js";
5
+ import AdvanvcedGrid from "./AdvancedGrid.js";
6
+ import CircuitGrid from "./CircuitGrid.js";
7
+ import ContourGrid from "./ContourGrid.js";
8
+ import FractalGrid from "./FractalGrid.js";
9
+ import HexGrid from "./HexGrid.js";
10
+ import MoireGrid from "./MoireGrid.js";
11
+ import QuasiGrid from "./QuasiGrid.js";
12
+ import RadarGrid from "./RadarGrid.js";
13
+ import VoronoiGrid from "./VoronoiGrid.js";
6
14
  const GridGenerator = ({ config, onObjectReady, onObjectDispose }) => {
7
- // The other two branches render components that report themselves; the
15
+ // The other branches render components that report themselves; the
8
16
  // native <gridHelper> is a plain three object, so this component holds its
9
17
  // ref and reports on its behalf. The ref stays null on the other branches,
10
18
  // which the hook treats as nothing to report.
@@ -13,8 +21,24 @@ const GridGenerator = ({ config, onObjectReady, onObjectDispose }) => {
13
21
  switch (config.type) {
14
22
  case "basic":
15
23
  return _jsx(GridHelper, { ...config, side: 2, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
16
- case "superGrid":
17
- return _jsx(MyGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
24
+ case "advancedGrid":
25
+ return _jsx(AdvanvcedGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
26
+ case "hexGrid":
27
+ return _jsx(HexGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
28
+ case "circuitGrid":
29
+ return _jsx(CircuitGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
30
+ case "voronoiGrid":
31
+ return _jsx(VoronoiGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
32
+ case "radarGrid":
33
+ return _jsx(RadarGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
34
+ case "moireGrid":
35
+ return _jsx(MoireGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
36
+ case "fractalGrid":
37
+ return _jsx(FractalGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
38
+ case "contourGrid":
39
+ return _jsx(ContourGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
40
+ case "quasiGrid":
41
+ return _jsx(QuasiGrid, { config: config, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose });
18
42
  default:
19
43
  return _jsx("gridHelper", { ...config, ref: nativeGridRef });
20
44
  }
@@ -1 +1 @@
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
+ {"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,CA+M3D,CAAC;AACF,eAAe,mBAAmB,CAAC"}
@@ -199,7 +199,6 @@ const HdrPlaylistRenderer = ({ urls, transition, onObjectReady, onObjectDispose
199
199
  equirects = await Promise.all(urls.map(loadEquirectHdr));
200
200
  }
201
201
  catch (err) {
202
- console.error('[HdrPlaylistRenderer] HDR load failed', err);
203
202
  return;
204
203
  }
205
204
  if (disposed) {
@@ -0,0 +1,25 @@
1
+ import type { ThreeElements } from '@react-three/fiber';
2
+ import type { ObjectReadyProps } from '../types/objectReady';
3
+ import type { HexGridConfig } from '../types/gridConfigs';
4
+ export interface HexGridProps extends ObjectReadyProps {
5
+ config?: HexGridConfig;
6
+ groupProps?: ThreeElements['group'];
7
+ }
8
+ /**
9
+ * HexGridConfig — the single source of truth for a honeycomb grid instance.
10
+ * Colours are hex strings so they round-trip cleanly through the controller and
11
+ * any preset/serialisation layer, matching `defaultMyGridConfig`.
12
+ */
13
+ export declare const defaultHexGridConfig: HexGridConfig;
14
+ /**
15
+ * A honeycomb grid on a shader plane.
16
+ *
17
+ * Same knobs as `AdvancedGrid` — `lineMode` / `cellMode` run 0..4 through
18
+ * static, ripple, flow, scan and pulse — applied to a hex lattice instead of a
19
+ * square one, so ripples propagate as hexagons rather than circles. With
20
+ * `displace > 0` and `plateau` on, every hex lifts to its own height and the
21
+ * surface breaks into plates.
22
+ */
23
+ export declare function HexGrid({ config, groupProps, onObjectReady, onObjectDispose }: HexGridProps): import("react").JSX.Element;
24
+ export default HexGrid;
25
+ //# sourceMappingURL=HexGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HexGrid.d.ts","sourceRoot":"","sources":["../../src/components/HexGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IAClD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACvC;AAKD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,aA0BlC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,EAAE,MAA6B,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,YAAY,+BAiElH;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useRef } from 'react';
3
+ import * as THREE from 'three';
4
+ import { useObjectReady } from '../hooks/useObjectReady.js';
5
+ import { useGridSurface } from '../hooks/useGridSurface.js';
6
+ import { HexGridMaterial } from '@3driseai/3drise-core';
7
+ // Side-effect import registers <hexGridMaterial> via extend() in HexGridMaterial.ts.
8
+ void HexGridMaterial;
9
+ /**
10
+ * HexGridConfig — the single source of truth for a honeycomb grid instance.
11
+ * Colours are hex strings so they round-trip cleanly through the controller and
12
+ * any preset/serialisation layer, matching `defaultMyGridConfig`.
13
+ */
14
+ export const defaultHexGridConfig = {
15
+ cellSize: 1.4,
16
+ size: 50,
17
+ segments: undefined,
18
+ flat: true,
19
+ lineMode: 1, // ripple out from the focus point
20
+ cellMode: 2, // twinkle
21
+ lineWidth: 1.2,
22
+ sectionSize: 4,
23
+ sectionWidth: 2,
24
+ animSpeed: 1,
25
+ animScale: 0.6,
26
+ animIntensity: 1,
27
+ fadeDistance: undefined,
28
+ fadeStrength: 0.7,
29
+ displace: 0,
30
+ plateau: true,
31
+ lineColor: '#2a9ec7',
32
+ sectionColor: '#73eaff',
33
+ cellColor: '#0f4869',
34
+ glowColor: '#4df3ff',
35
+ bgColor: '#030809',
36
+ bgOpacity: 0,
37
+ followMouse: false,
38
+ reveal: 1,
39
+ revealDuration: 0,
40
+ };
41
+ /**
42
+ * A honeycomb grid on a shader plane.
43
+ *
44
+ * Same knobs as `AdvancedGrid` — `lineMode` / `cellMode` run 0..4 through
45
+ * static, ripple, flow, scan and pulse — applied to a hex lattice instead of a
46
+ * square one, so ripples propagate as hexagons rather than circles. With
47
+ * `displace > 0` and `plateau` on, every hex lifts to its own height and the
48
+ * surface breaks into plates.
49
+ */
50
+ export function HexGrid({ config = defaultHexGridConfig, groupProps, onObjectReady, onObjectDispose }) {
51
+ const matRef = useRef(null);
52
+ const rootRef = useRef(null);
53
+ const meshRef = useRef(null);
54
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
55
+ const { cellSize, size, segments, flat, lineMode, cellMode, lineWidth, sectionSize, sectionWidth, animSpeed, animScale, animIntensity, fadeDistance, fadeStrength, displace, plateau, lineColor, sectionColor, cellColor, glowColor, bgColor, bgOpacity, followMouse, reveal, revealDuration, } = config;
56
+ // Plateaus need a dense mesh: the vertical walls between hexes are only as
57
+ // crisp as the tessellation that has to fake them.
58
+ const segs = segments ?? (displace > 0
59
+ ? Math.min(512, Math.max(96, Math.ceil(size / Math.max(cellSize, 1e-4)) * 4))
60
+ : 1);
61
+ const fade = fadeDistance ?? size * 0.5;
62
+ const colors = useMemo(() => ({
63
+ line: new THREE.Color(lineColor),
64
+ section: new THREE.Color(sectionColor),
65
+ cell: new THREE.Color(cellColor),
66
+ glow: new THREE.Color(glowColor),
67
+ bg: new THREE.Color(bgColor),
68
+ }), [lineColor, sectionColor, cellColor, glowColor, bgColor]);
69
+ useGridSurface(matRef, meshRef, { followMouse, reveal, revealDuration });
70
+ return (_jsx("group", { ref: rootRef, ...groupProps, children: _jsxs("mesh", { ref: meshRef, rotation: flat ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: [_jsx("planeGeometry", { args: [size, size, segs, segs] }), _jsx("hexGridMaterial", { ref: matRef, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, side: THREE.DoubleSide, u_cellSize: cellSize, u_lineWidth: lineWidth, u_sectionSize: sectionSize, u_sectionWidth: sectionWidth, u_lineMode: lineMode, u_cellMode: cellMode, u_animSpeed: animSpeed, u_animScale: animScale, u_animIntensity: animIntensity, u_fadeDistance: fade, u_fadeStrength: fadeStrength, u_displace: displace, u_plateau: plateau ? 1 : 0, u_lineColor: colors.line, u_sectionColor: colors.section, u_cellColor: colors.cell, u_glowColor: colors.glow, u_bgColor: colors.bg, u_bgOpacity: bgOpacity }, HexGridMaterial.key)] }) }));
71
+ }
72
+ export default HexGrid;
@@ -9,7 +9,7 @@ export const ImageGeometry = forwardRef(({ geometryType, url, position = [0, 0,
9
9
  const textureName = url.split('/').pop()?.split('.')[0] || `texture-${Date.now()}`;
10
10
  texturesManager.loadTexture(textureName, url, 'images')
11
11
  .then(setTexture)
12
- .catch((err) => console.error('Failed to load texture:', err));
12
+ .catch(() => { });
13
13
  }, [url]);
14
14
  const meshConfig = useMemo(() => {
15
15
  const base = {
@@ -1 +1 @@
1
- {"version":3,"file":"Letter.d.ts","sourceRoot":"","sources":["../../src/components/Letter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,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,CAA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CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,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,+BA4ChM"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useObjectReady } from '../hooks/useObjectReady.js';
3
- import { useRef, useState, useEffect } from 'react';
3
+ import { useRef, useState } from 'react';
4
4
  import { useFrame } from '@react-three/fiber';
5
5
  import { useCursor, Text, Text3D, Center } from '@react-three/drei';
6
6
  import MaterialLibrary from './MaterialLibrary.js';
@@ -49,11 +49,6 @@ export default function Letter({ letterData, config, materialSettings, hoverSett
49
49
  const color = 'color' in materialSettings ? materialSettings.color : '#ffffff';
50
50
  const opacity = 'opacity' in materialSettings ? materialSettings.opacity : 1;
51
51
  const useDreiMaterials = materialSettings.materialType === 'advanced';
52
- useEffect(() => {
53
- if (useDreiMaterials && renderMode === 'bitmap') {
54
- console.warn('[Letter] Advanced materials not supported with bitmap text. Switch to text3d render mode.');
55
- }
56
- }, [useDreiMaterials, renderMode]);
57
52
  useCursor(hovered);
58
53
  const fontInfo = font ? fontManager.getFont(font) : null;
59
54
  const bitmapFontUrl = fontInfo?.googleFont;
@@ -0,0 +1,23 @@
1
+ import type { ThreeElements } from '@react-three/fiber';
2
+ import type { ObjectReadyProps } from '../types/objectReady';
3
+ import type { MoireGridConfig } from '../types/gridConfigs';
4
+ export interface MoireGridProps extends ObjectReadyProps {
5
+ config?: MoireGridConfig;
6
+ groupProps?: ThreeElements['group'];
7
+ }
8
+ /** MoireGridConfig — the single source of truth for a moire grid instance. */
9
+ export declare const defaultMoireGridConfig: MoireGridConfig;
10
+ /**
11
+ * Two overlaid lattices, counter-rotating.
12
+ *
13
+ * Nothing draws the moire pattern — it emerges from where the two line sets
14
+ * nearly coincide, which is why it moves the way real interference does. Small
15
+ * `layerAngle` and `layerScale` values near 1 give the long, slow beats; larger
16
+ * ones break up into fine cross-hatch. `spin` 0 freezes it at `layerAngle`.
17
+ *
18
+ * `shape` picks what the two layers are made of. Rings have no orientation, so
19
+ * for that shape the layers are offset from each other rather than rotated.
20
+ */
21
+ export declare function MoireGrid({ config, groupProps, onObjectReady, onObjectDispose }: MoireGridProps): import("react").JSX.Element;
22
+ export default MoireGrid;
23
+ //# sourceMappingURL=MoireGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MoireGrid.d.ts","sourceRoot":"","sources":["../../src/components/MoireGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACpD,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACvC;AAWD,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB,EAAE,eA6BpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAA+B,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,cAAc,+BAkExH;AAED,eAAe,SAAS,CAAC"}