@ntalmagor/3drize-viewer 0.1.24 → 0.1.26

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 (154) hide show
  1. package/dist/components/Bubbles.d.ts +8 -0
  2. package/dist/components/Bubbles.d.ts.map +1 -0
  3. package/dist/components/Bubbles.js +106 -0
  4. package/dist/components/Clouds.d.ts +3 -3
  5. package/dist/components/Clouds.d.ts.map +1 -1
  6. package/dist/components/Clouds.js +162 -57
  7. package/dist/components/CreatedObject.d.ts.map +1 -1
  8. package/dist/components/CreatedObject.js +1 -5
  9. package/dist/components/Earth.d.ts +18 -0
  10. package/dist/components/Earth.d.ts.map +1 -0
  11. package/dist/components/Earth.js +43 -0
  12. package/dist/components/Frame.d.ts.map +1 -1
  13. package/dist/components/Frame.js +3 -1
  14. package/dist/components/Galaxy.js +2 -4
  15. package/dist/components/Glyphs.d.ts +8 -0
  16. package/dist/components/Glyphs.d.ts.map +1 -0
  17. package/dist/components/Glyphs.js +58 -0
  18. package/dist/components/GridHelper.js +1 -1
  19. package/dist/components/Moon.d.ts.map +1 -1
  20. package/dist/components/Moon.js +20 -6
  21. package/dist/components/ObjectNode.d.ts.map +1 -1
  22. package/dist/components/ObjectNode.js +53 -15
  23. package/dist/components/ObjectsRenderer.d.ts.map +1 -1
  24. package/dist/components/ObjectsRenderer.js +2 -0
  25. package/dist/components/Ocean.d.ts +2 -2
  26. package/dist/components/Ocean.d.ts.map +1 -1
  27. package/dist/components/Ocean.js +50 -36
  28. package/dist/components/ParticlesR3f.d.ts.map +1 -1
  29. package/dist/components/ParticlesR3f.js +15 -0
  30. package/dist/components/PathRenderer.d.ts +0 -2
  31. package/dist/components/PathRenderer.d.ts.map +1 -1
  32. package/dist/components/PathRenderer.js +4 -1
  33. package/dist/components/ProjectLoader.d.ts.map +1 -1
  34. package/dist/components/ProjectLoader.js +1 -7
  35. package/dist/components/Rain.d.ts +2 -2
  36. package/dist/components/Rain.d.ts.map +1 -1
  37. package/dist/components/Rain.js +155 -29
  38. package/dist/components/SceneBuilder.d.ts.map +1 -1
  39. package/dist/components/SceneBuilder.js +2 -2
  40. package/dist/components/ShootingStars.d.ts +2 -2
  41. package/dist/components/ShootingStars.d.ts.map +1 -1
  42. package/dist/components/SkySystem.d.ts.map +1 -1
  43. package/dist/components/SkySystem.js +2 -5
  44. package/dist/components/Skybox.d.ts.map +1 -1
  45. package/dist/components/Skybox.js +5 -1
  46. package/dist/components/SparklesBurst.d.ts +8 -0
  47. package/dist/components/SparklesBurst.d.ts.map +1 -0
  48. package/dist/components/SparklesBurst.js +62 -0
  49. package/dist/components/Stars.d.ts +2 -2
  50. package/dist/components/Stars.d.ts.map +1 -1
  51. package/dist/components/Stars.js +25 -26
  52. package/dist/components/cursor/AuraCursor.d.ts +6 -0
  53. package/dist/components/cursor/AuraCursor.d.ts.map +1 -0
  54. package/dist/components/cursor/AuraCursor.js +30 -0
  55. package/dist/components/cursor/AuroraCursor.d.ts +6 -0
  56. package/dist/components/cursor/AuroraCursor.d.ts.map +1 -0
  57. package/dist/components/cursor/AuroraCursor.js +207 -0
  58. package/dist/components/cursor/BubblesCursor.d.ts +6 -0
  59. package/dist/components/cursor/BubblesCursor.d.ts.map +1 -0
  60. package/dist/components/cursor/BubblesCursor.js +184 -0
  61. package/dist/components/cursor/CometCursor.d.ts +6 -0
  62. package/dist/components/cursor/CometCursor.d.ts.map +1 -0
  63. package/dist/components/cursor/CometCursor.js +191 -0
  64. package/dist/components/cursor/CrosshairCursor.d.ts +6 -0
  65. package/dist/components/cursor/CrosshairCursor.d.ts.map +1 -0
  66. package/dist/components/cursor/CrosshairCursor.js +142 -0
  67. package/dist/components/cursor/CursorActions.d.ts +8 -0
  68. package/dist/components/cursor/CursorActions.d.ts.map +1 -0
  69. package/dist/components/cursor/CursorActions.js +124 -0
  70. package/dist/components/cursor/CursorController.d.ts +10 -0
  71. package/dist/components/cursor/CursorController.d.ts.map +1 -0
  72. package/dist/components/cursor/CursorController.js +5 -0
  73. package/dist/components/cursor/CursorEffects.d.ts +16 -0
  74. package/dist/components/cursor/CursorEffects.d.ts.map +1 -0
  75. package/dist/components/cursor/CursorEffects.js +110 -0
  76. package/dist/components/cursor/FerrofluidCursor.d.ts +6 -0
  77. package/dist/components/cursor/FerrofluidCursor.d.ts.map +1 -0
  78. package/dist/components/cursor/FerrofluidCursor.js +102 -0
  79. package/dist/components/cursor/GlyphRingCursor.d.ts +6 -0
  80. package/dist/components/cursor/GlyphRingCursor.d.ts.map +1 -0
  81. package/dist/components/cursor/GlyphRingCursor.js +123 -0
  82. package/dist/components/cursor/LightningCursor.d.ts +6 -0
  83. package/dist/components/cursor/LightningCursor.d.ts.map +1 -0
  84. package/dist/components/cursor/LightningCursor.js +28 -0
  85. package/dist/components/cursor/LiquidMetalCursor.d.ts +6 -0
  86. package/dist/components/cursor/LiquidMetalCursor.d.ts.map +1 -0
  87. package/dist/components/cursor/LiquidMetalCursor.js +61 -0
  88. package/dist/components/cursor/OrbCursor.d.ts +6 -0
  89. package/dist/components/cursor/OrbCursor.d.ts.map +1 -0
  90. package/dist/components/cursor/OrbCursor.js +32 -0
  91. package/dist/components/cursor/PlasmaWhipCursor.d.ts +6 -0
  92. package/dist/components/cursor/PlasmaWhipCursor.d.ts.map +1 -0
  93. package/dist/components/cursor/PlasmaWhipCursor.js +134 -0
  94. package/dist/components/cursor/SparklesCursor.d.ts +6 -0
  95. package/dist/components/cursor/SparklesCursor.d.ts.map +1 -0
  96. package/dist/components/cursor/SparklesCursor.js +151 -0
  97. package/dist/components/cursor/TeslaCursor.d.ts +6 -0
  98. package/dist/components/cursor/TeslaCursor.d.ts.map +1 -0
  99. package/dist/components/cursor/TeslaCursor.js +223 -0
  100. package/dist/components/cursor/clickActions/BoltFlashAction.d.ts +11 -0
  101. package/dist/components/cursor/clickActions/BoltFlashAction.d.ts.map +1 -0
  102. package/dist/components/cursor/clickActions/BoltFlashAction.js +62 -0
  103. package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts +11 -0
  104. package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts.map +1 -0
  105. package/dist/components/cursor/clickActions/GlyphInscriptionAction.js +114 -0
  106. package/dist/components/cursor/clickActions/ImplosionAction.d.ts +11 -0
  107. package/dist/components/cursor/clickActions/ImplosionAction.d.ts.map +1 -0
  108. package/dist/components/cursor/clickActions/ImplosionAction.js +93 -0
  109. package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts +11 -0
  110. package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts.map +1 -0
  111. package/dist/components/cursor/clickActions/PhaseShiftAction.js +71 -0
  112. package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts +11 -0
  113. package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts.map +1 -0
  114. package/dist/components/cursor/clickActions/PlasmaBombAction.js +98 -0
  115. package/dist/components/cursor/clickActions/RealityTearAction.d.ts +11 -0
  116. package/dist/components/cursor/clickActions/RealityTearAction.d.ts.map +1 -0
  117. package/dist/components/cursor/clickActions/RealityTearAction.js +92 -0
  118. package/dist/components/cursor/clickActions/ShockwaveAction.d.ts +11 -0
  119. package/dist/components/cursor/clickActions/ShockwaveAction.d.ts.map +1 -0
  120. package/dist/components/cursor/clickActions/ShockwaveAction.js +55 -0
  121. package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts +11 -0
  122. package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts.map +1 -0
  123. package/dist/components/cursor/clickActions/SparklesBurstAction.js +99 -0
  124. package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts +11 -0
  125. package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts.map +1 -0
  126. package/dist/components/cursor/clickActions/VoronoiFractureAction.js +149 -0
  127. package/dist/constants.d.ts +1 -1
  128. package/dist/constants.d.ts.map +1 -1
  129. package/dist/constants.js +1 -1
  130. package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
  131. package/dist/hooks/useContinuousEffects.js +5 -4
  132. package/dist/hooks/useInteraction.d.ts.map +1 -1
  133. package/dist/hooks/useInteraction.js +43 -10
  134. package/dist/hooks/useMaterialApplication.js +1 -1
  135. package/dist/hooks/useMaterialOptions.d.ts.map +1 -1
  136. package/dist/hooks/useMaterialOptions.js +2 -0
  137. package/dist/hooks/useMeshController.d.ts.map +1 -1
  138. package/dist/hooks/useMeshController.js +78 -28
  139. package/dist/hooks/useParticlesTextures.js +1 -1
  140. package/dist/hooks/useSequenceAnimation.d.ts.map +1 -1
  141. package/dist/hooks/useSequenceAnimation.js +38 -17
  142. package/dist/hooks/useSkyUniforms.d.ts +1 -1
  143. package/dist/hooks/useSkyUniforms.d.ts.map +1 -1
  144. package/dist/hooks/useSkyUniforms.js +10 -11
  145. package/dist/index.d.ts +4 -0
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +3 -0
  148. package/dist/utils/CameraSingleton.d.ts +8 -1
  149. package/dist/utils/CameraSingleton.d.ts.map +1 -1
  150. package/dist/utils/CameraSingleton.js +22 -1
  151. package/dist/utils/cursorPicking.d.ts +8 -0
  152. package/dist/utils/cursorPicking.d.ts.map +1 -0
  153. package/dist/utils/cursorPicking.js +35 -0
  154. package/package.json +2 -4
@@ -1,18 +1,32 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef, useCallback } from 'react';
2
+ import { useRef, useEffect, useState, useCallback } from 'react';
3
3
  import * as THREE from 'three';
4
4
  import { useFrame } from '@react-three/fiber';
5
- import { useTexture } from '@react-three/drei';
6
5
  export { defaultMoonSettings } from '@ntalmagor/3drize-core';
7
- const MOON_TEXTURE_URL = 'https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/06a094a4-7bd7-4bb9-b998-6c1e17f66c08/dbcju0k-b9b333e1-dd8d-4657-90db-7d3e7e179843.png';
6
+ const MOON_TEXTURE_URL = "https://3d-rise.sfo3.cdn.digitaloceanspaces.com/app/images/moon_1024.jpg";
8
7
  const Moon = ({ settings, sunPosition, onMeshReady }) => {
9
8
  const meshRef = useRef(null);
10
9
  const lightRef = useRef(null);
11
10
  const targetRef = useRef(null);
12
- const texture = useTexture(MOON_TEXTURE_URL);
11
+ const [texture, setTexture] = useState(null);
12
+ useEffect(() => {
13
+ const loader = new THREE.TextureLoader();
14
+ loader.setCrossOrigin('anonymous');
15
+ let cancelled = false;
16
+ loader.load(MOON_TEXTURE_URL, (loaded) => {
17
+ console.log("Moon texture loaded:", loaded);
18
+ if (!cancelled)
19
+ setTexture(loaded);
20
+ }, undefined, () => {
21
+ // Silently ignore — moon renders as a plain lit sphere if the texture fails.
22
+ });
23
+ return () => {
24
+ cancelled = true;
25
+ };
26
+ }, []);
13
27
  const s = settings ?? {
14
28
  visible: true,
15
- position: [0, 5, 0],
29
+ position: [0, 0, 0],
16
30
  scale: 3,
17
31
  rotation: [0, 0, 0.5],
18
32
  emissiveIntensity: 0.3,
@@ -46,7 +60,7 @@ const Moon = ({ settings, sunPosition, onMeshReady }) => {
46
60
  }
47
61
  });
48
62
  const moonPos = sunPosition ?? s.position;
49
- return (_jsxs("group", { userData: { id: '3drise-moon' }, children: [_jsx("object3D", { ref: targetRef, position: moonPos }), _jsx("directionalLight", { ref: lightRef, intensity: 2, color: 0xffffff, target: targetRef.current ?? undefined }), _jsxs("mesh", { ref: handleMeshRef, position: moonPos, rotation: s.rotation, scale: s.scale, visible: s.visible, children: [_jsx("sphereGeometry", { args: [10, 22, 22] }), _jsx("meshPhongMaterial", { color: 0xb2b2b2, normalMap: texture, shininess: 0 })] })] }));
63
+ return (_jsxs("group", { userData: { id: '3drise-moon' }, children: [_jsx("object3D", { ref: targetRef, position: moonPos }), _jsx("directionalLight", { ref: lightRef, intensity: 2, color: 0xffffff, target: targetRef.current ?? undefined }), _jsxs("mesh", { ref: handleMeshRef, position: moonPos, rotation: s.rotation, scale: s.scale, visible: s.visible, children: [_jsx("sphereGeometry", { args: [1, 32, 32] }), _jsx("meshPhongMaterial", { color: 0xb2b2b2, normalMap: texture, shininess: 0 })] })] }));
50
64
  };
51
65
  Moon.displayName = 'Moon';
52
66
  export default Moon;
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectNode.d.ts","sourceRoot":"","sources":["../../src/components/ObjectNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAA6D,cAAc,EAA0B,MAAM,wBAAwB,CAAC;AAEpL,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAYrD,KAAK,eAAe,GAAG;IACnB,IAAI,EAAE,cAAc,CAAC;IACrB,cAAc,EAAE,WAAW,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvE,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CAC7G,CAAC;AA+CF,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiLzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ObjectNode.d.ts","sourceRoot":"","sources":["../../src/components/ObjectNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAA6D,cAAc,EAAuD,MAAM,wBAAwB,CAAC;AAEjN,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAqBrD,KAAK,eAAe,GAAG;IACnB,IAAI,EAAE,cAAc,CAAC;IACrB,cAAc,EAAE,WAAW,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvE,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CAC7G,CAAC;AA4DF,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2KzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo } from "react";
3
3
  import CustomPrimitive from "./CustomPrimitive.js";
4
4
  import CreatedObject from "./CreatedObject.js";
@@ -11,10 +11,36 @@ import ParticlesR3f from "./ParticlesR3f.js";
11
11
  import Lines from "./Lines.js";
12
12
  import GridHelper from "./GridHelper.js";
13
13
  import LightObject from "./LightObject.js";
14
- const EffectsLayer = ({ effects }) => effects?.length ? (_jsx(_Fragment, { children: effects.map((effect, index) => (_jsx(EffectsGenerator, { settings: effect }, index))) })) : null;
14
+ import Ocean from "./Ocean.js";
15
+ import Stars from "./Stars.js";
16
+ import Clouds from "./Clouds.js";
17
+ import Rain from "./Rain.js";
18
+ import Bubbles from "./Bubbles.js";
19
+ import Glyphs from "./Glyphs.js";
20
+ import SparklesBurst from "./SparklesBurst.js";
21
+ // Types whose React component instantiates and drives its own ShaderMaterial.
22
+ // useMaterialApplication would otherwise traverse the mesh tree and replace
23
+ // that material with a registry-default instance, breaking config-driven
24
+ // uniform updates (e.g. only ringRadius worked on glyphs because that drives
25
+ // geometry, not the material).
26
+ const SELF_MANAGED_MATERIAL = new Set([
27
+ 'bubbles',
28
+ 'glyphs',
29
+ 'sparklesBurst',
30
+ // 'moon'
31
+ ]);
32
+ // const EffectsLayer: React.FC<{ effects: CreatedObjectSettings['effects'] }> = ({ effects }) =>
33
+ // effects?.length ? (
34
+ // <>
35
+ // {effects.map((effect, index) => (
36
+ // <EffectsGenerator key={index} settings={effect} />
37
+ // ))}
38
+ // </>
39
+ // ) : null;
15
40
  const GroupWithChildren = ({ createdObject, children, cameraSettings, onObjectReady, handleObjectClick, renderObject }) => {
16
41
  const isGroup = createdObject.type === 'group';
17
- return (_jsxs(CreatedObject, { createdObject: createdObject, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, shouldApply3driseMaterial: !isGroup, children: [!isGroup && renderObject(createdObject, handleObjectClick), children.map(childNode => (_jsx(ObjectNode, { node: childNode, cameraSettings: cameraSettings, handleObjectClick: handleObjectClick, onObjectReady: onObjectReady }, childNode.objectId)))] }, createdObject.id));
42
+ const selfManagedMaterial = SELF_MANAGED_MATERIAL.has(createdObject.type);
43
+ return (_jsxs(CreatedObject, { createdObject: createdObject, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, shouldApply3driseMaterial: !isGroup && !selfManagedMaterial, children: [!isGroup && renderObject(createdObject, handleObjectClick), children.map(childNode => (_jsx(ObjectNode, { node: childNode, cameraSettings: cameraSettings, handleObjectClick: handleObjectClick, onObjectReady: onObjectReady }, childNode.objectId)))] }, createdObject.id));
18
44
  };
19
45
  const ObjectNode = ({ node, cameraSettings, onObjectReady, handleObjectClick }) => {
20
46
  const { children, createdObject } = node;
@@ -22,8 +48,11 @@ const ObjectNode = ({ node, cameraSettings, onObjectReady, handleObjectClick })
22
48
  // Specialized renderers for each object type
23
49
  const renderers = useMemo(() => ({
24
50
  group: () => null,
25
- mesh: (obj, cameraSettings, onObjectReady) => (_jsx(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, children: _jsx(CustomPrimitive, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick }, obj.id) }, obj.id)),
26
- model: (obj, cameraSettings, onObjectReady) => (_jsx(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, children: _jsx(CustomPrimitive, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick }, obj.id) }, obj.id)),
51
+ mesh: (obj, cameraSettings, onObjectReady) => (_jsx(CustomPrimitive, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick }, obj.id)),
52
+ water: (obj, cameraSettings, onObjectReady) => (_jsx(Ocean, { settings: obj })),
53
+ stars: (obj, cameraSettings, onObjectReady) => (_jsx(Stars, { settings: obj })),
54
+ clouds: (obj, cameraSettings, onObjectReady) => (_jsx(Clouds, { settings: obj })),
55
+ model: (obj, cameraSettings, onObjectReady) => (_jsx(CustomPrimitive, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick }, obj.id)),
27
56
  // custom_primitive: (obj: CreatedObjectSettings, cameraSettings: CameraState, onObjectReady?: (object: CreatedObjectSettings, ref: Object3D) => void) => (
28
57
  // <CustomPrimitive
29
58
  // key={obj.id}
@@ -34,22 +63,26 @@ const ObjectNode = ({ node, cameraSettings, onObjectReady, handleObjectClick })
34
63
  // ),
35
64
  text: (obj, cameraSettings, onObjectReady) => {
36
65
  const renderMode = obj.config?.renderMode ?? 'bitmap';
37
- return (_jsx(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, children: renderMode === 'text3d'
66
+ return (_jsx(_Fragment, { children: renderMode === 'text3d'
38
67
  ? _jsx(Text3D, { textSettings: obj })
39
- : _jsx(Text2D, { textSettings: obj }) }, obj.id));
68
+ : _jsx(Text2D, { textSettings: obj }) }));
40
69
  },
41
70
  particles: (obj, cameraSettings, onObjectReady) => {
42
71
  const particlesSettings = obj;
43
- return (_jsxs(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, children: [particlesSettings.config?.particles && (_jsx(ParticlesR3f, { particlesSettings: particlesSettings, cameraFov: cameraSettings.fov, duration: 1, transitionSettings: particlesSettings.meshSettings })), particlesSettings.config?.paths && (_jsx(Lines, { createdObject: particlesSettings }))] }, obj.id));
72
+ return (_jsxs(_Fragment, { children: [particlesSettings.config?.particles && (_jsx(ParticlesR3f, { particlesSettings: particlesSettings, cameraFov: cameraSettings.fov, duration: 1, transitionSettings: particlesSettings.meshSettings })), particlesSettings.config?.paths && (_jsx(Lines, { createdObject: particlesSettings }))] }));
44
73
  },
45
- path: (obj, cameraSettings, onObjectReady) => (_jsx(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, children: _jsx(PathRenderer, { pathSettings: obj.config, showCurve: false, showLine: false, showPoints: false }, obj.id) }, obj.id)),
46
- grid: (obj, cameraSettings, onObjectReady) => (_jsx(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, children: _jsx(GridHelper, { ...obj.config }) }, obj.id)),
74
+ path: (obj, cameraSettings, onObjectReady) => (_jsx(PathRenderer, { pathSettings: obj.config }, obj.id)),
75
+ grid: (obj, cameraSettings, onObjectReady) => (_jsx(GridHelper, { ...obj.config, side: 2 })),
47
76
  effect: (obj) => (_jsx(EffectsGenerator, { settings: {
48
77
  enabled: true,
49
78
  config: obj.config,
50
79
  } }, obj.id)),
51
- gallery: (obj, cameraSettings, onObjectReady) => (_jsx(CreatedObject, { createdObject: obj, shouldApply3driseMaterial: true, children: _jsx(GalleryLayout, { createdObject: obj, handleObjectClick: handleObjectClick }) }, obj.id)),
52
- light: (obj, cameraSettings, onObjectReady) => (_jsx(CreatedObject, { createdObject: obj, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, shouldApply3driseMaterial: false, children: _jsx(LightObject, { createdObject: obj }) }, obj.id)),
80
+ gallery: (obj, cameraSettings, onObjectReady) => (_jsx(GalleryLayout, { createdObject: obj, handleObjectClick: handleObjectClick })),
81
+ light: (obj, cameraSettings, onObjectReady) => (_jsx(LightObject, { createdObject: obj })),
82
+ rain: (obj, cameraSettings, onObjectReady) => (_jsx(Rain, { settings: obj })),
83
+ bubbles: (obj, cameraSettings, onObjectReady) => (_jsx(Bubbles, { settings: obj })),
84
+ glyphs: (obj, cameraSettings, onObjectReady) => (_jsx(Glyphs, { settings: obj })),
85
+ sparklesBurst: (obj, cameraSettings, onObjectReady) => (_jsx(SparklesBurst, { settings: obj })),
53
86
  }), [handleObjectClick]);
54
87
  if (!createdObject) {
55
88
  console.warn(`createdObject not found.`);
@@ -59,14 +92,19 @@ const ObjectNode = ({ node, cameraSettings, onObjectReady, handleObjectClick })
59
92
  const hasChildren = children.length > 0;
60
93
  const shouldRenderAsGroup = hasChildren || createdObject.type === 'group' || createdObject.type === 'effect';
61
94
  const renderObject = useCallback((obj, handleObjectClick) => {
95
+ // console.log('Rendering object:', obj);
62
96
  const renderer = renderers[obj.type];
63
97
  return renderer?.(obj, cameraSettings, onObjectReady) ?? null;
64
98
  }, [cameraSettings, onObjectReady, renderers]);
65
99
  const renderedObject = shouldRenderAsGroup
66
100
  ? _jsx(GroupWithChildren, { createdObject: createdObject, children: children, cameraSettings: cameraSettings, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, renderObject: renderObject })
67
- : createdObject.effects
68
- ? _jsx(_Fragment, { children: renderObject(createdObject) })
69
- : renderObject(createdObject);
101
+ : _jsx(CreatedObject, { createdObject: createdObject, onObjectReady: onObjectReady, handleObjectClick: handleObjectClick, shouldApply3driseMaterial: !SELF_MANAGED_MATERIAL.has(createdObject.type), children: renderObject(createdObject) }, createdObject.id);
102
+ // createdObject.effects
103
+ // ? <>
104
+ // {renderObject(createdObject)}
105
+ // {/* <EffectsLayer effects={createdObject.effects} /> */}
106
+ // </>
107
+ // : renderObject(createdObject);
70
108
  return renderedObject;
71
109
  };
72
110
  export default ObjectNode;
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectsRenderer.d.ts","sourceRoot":"","sources":["../../src/components/ObjectsRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAS,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAmB,qBAAqB,EAAe,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAQ9J,UAAU,oBAAoB;IAC5B,cAAc,EAAE,WAAW,CAAC;IAC5B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,cAAc,EAAE,qBAAqB,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAC1G,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4DlD,CAAC;AAIH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ObjectsRenderer.d.ts","sourceRoot":"","sources":["../../src/components/ObjectsRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAS,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAmB,qBAAqB,EAAe,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAQ9J,UAAU,oBAAoB;IAC5B,cAAc,EAAE,WAAW,CAAC;IAC5B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,cAAc,EAAE,qBAAqB,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAC1G,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8DlD,CAAC;AAIH,eAAe,eAAe,CAAC"}
@@ -24,6 +24,8 @@ const ObjectsRenderer = memo(({ cameraSettings, createdObjects, generalObjectSet
24
24
  sequences,
25
25
  });
26
26
  const handleObjectClickHandler = (createdObject, ref, event) => {
27
+ console.log('Object clicked:', createdObject.meshSettings.name);
28
+ console.log('Object ref:', ref);
27
29
  const clickInteractions = filterInteractionsByEvent(createdObject.actions, "click");
28
30
  clickInteractions.forEach((interaction) => {
29
31
  executeInteraction({ interaction, ref, createdObject });
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { OceanSettings } from '@ntalmagor/3drize-core';
2
+ import { CreatedObjectSettings } from '@ntalmagor/3drize-core';
3
3
  export interface OceanProps {
4
- settings: OceanSettings;
4
+ settings: CreatedObjectSettings;
5
5
  }
6
6
  declare const Ocean: React.FC<OceanProps>;
7
7
  export default Ocean;
@@ -1 +1 @@
1
- {"version":3,"file":"Ocean.d.ts","sourceRoot":"","sources":["../../src/components/Ocean.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAUhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA8J/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Ocean.d.ts","sourceRoot":"","sources":["../../src/components/Ocean.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAQhD,OAAO,EAQL,qBAAqB,EAEtB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAqL/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -5,28 +5,32 @@ import { useFrame } from '@react-three/fiber';
5
5
  import { useMaterialApplication } from '../hooks/useMaterialApplication.js';
6
6
  import { useWaterEnvironment } from '../hooks/useWaterEnvironment.js';
7
7
  import { useWaterReflections } from '../hooks/useWaterReflections.js';
8
- import { useMouseHandlers } from '../hooks/useMouseHandlers.js';
9
8
  import { useAnimationEvents } from '../hooks/useAnimationEvents.js';
10
9
  import { useNumericAnimation } from '../hooks/useNumericAnimation.js';
11
- import { applySingleProperty } from '@ntalmagor/3drize-core';
10
+ import { handleTransformAnimations, handleMaterialAnimations, handleTransformMouseMove, handleMaterialMouseMove, } from '@ntalmagor/3drize-core';
12
11
  const Ocean = ({ settings }) => {
13
12
  const meshRef = useRef(null);
14
13
  const uniformOverrideRef = useRef(null);
14
+ const matAnimCacheRef = useRef({});
15
15
  const [meshVisible, setMeshVisible] = useState(null);
16
+ const { meshSettings, materialSettings, animations, mouseMove } = settings;
16
17
  const { animateNumeric } = useNumericAnimation();
17
- const planeSize = settings.planeSize || [10000, 10000];
18
- const planeSegments = settings.planeSegments || 64;
19
- const position = settings.position || [0, -1, 0];
20
- const rotation = settings.rotation || [-Math.PI / 2, 0, 0];
21
- const handlers = settings.handlers || {};
22
- const { interpolateProperty } = useMouseHandlers();
23
- useMaterialApplication(settings.visible ? meshRef.current : null, settings.materialSettings);
24
- useWaterEnvironment(settings.visible ? meshRef : { current: null });
25
- useWaterReflections(settings.visible ? meshRef : { current: null }, {
18
+ const config = settings.config || {
19
+ planeSize: [10000, 10000],
20
+ planeSegments: 64,
21
+ };
22
+ const planeSize = config?.planeSize || [10000, 10000];
23
+ const planeSegments = config?.planeSegments || 64;
24
+ const position = meshSettings.position || [0, -1, 0];
25
+ const rotation = meshSettings.rotation || [-Math.PI / 2, 0, 0];
26
+ const scale = meshSettings.scale || 1;
27
+ useMaterialApplication(meshSettings.visible ? meshRef.current : null, materialSettings);
28
+ useWaterEnvironment(meshSettings.visible ? meshRef : { current: null });
29
+ useWaterReflections(meshSettings.visible ? meshRef : { current: null }, {
26
30
  waterPosition: new THREE.Vector3(...position),
27
31
  resolution: 256,
28
32
  updateFrequency: 1,
29
- enabled: settings.visible,
33
+ enabled: meshSettings.visible,
30
34
  });
31
35
  useAnimationEvents({
32
36
  onStepStart: (event) => {
@@ -90,26 +94,11 @@ const Ocean = ({ settings }) => {
90
94
  }
91
95
  },
92
96
  });
93
- const handleMouseMove = (mouse) => {
94
- // Mouse-move property handlers
95
- if (handlers?.onMouseMove?.enabled && handlers.onMouseMove.properties.length && meshRef.current) {
96
- handlers.onMouseMove.properties.forEach((props) => {
97
- const { property, propertySettings } = props;
98
- const { min: minValue, max: maxValue, axis, sensitivity = 1, inverted = false } = propertySettings;
99
- const baseValue = settings.materialSettings[property];
100
- if (!baseValue)
101
- return;
102
- const interpolatedValue = interpolateProperty(baseValue, minValue, maxValue, mouse, axis, sensitivity, inverted);
103
- if (meshRef.current) {
104
- applySingleProperty(meshRef.current.material, property, interpolatedValue);
105
- }
106
- });
107
- }
108
- };
109
97
  useFrame((state) => {
110
- if (!meshRef.current?.material || !(meshVisible ?? settings.visible))
98
+ const mesh = meshRef.current;
99
+ if (!mesh?.material || !(meshVisible ?? meshSettings.visible))
111
100
  return;
112
- const material = meshRef.current.material;
101
+ const material = mesh.material;
113
102
  const uniforms = material?.uniforms;
114
103
  if (!uniforms)
115
104
  return;
@@ -123,10 +112,7 @@ const Ocean = ({ settings }) => {
123
112
  uniforms.u_resolution.value.set(window.innerWidth, window.innerHeight);
124
113
  if (uniforms.u_mouse)
125
114
  uniforms.u_mouse.value.set(mouse.x, mouse.y);
126
- // if (settings.effects) {
127
- // update3driseShaderUniforms(uniforms, settings.effects, u_time, mouse);
128
- // }
129
- // Apply animated uniform overrides
115
+ // Sequence-driven uniform overrides
130
116
  if (uniformOverrideRef.current) {
131
117
  for (const [key, val] of Object.entries(uniformOverrideRef.current)) {
132
118
  if (!uniforms[key])
@@ -148,8 +134,36 @@ const Ocean = ({ settings }) => {
148
134
  }
149
135
  }
150
136
  }
151
- handleMouseMove(mouse);
137
+ // ── PER-DOMAIN ANIMATIONS ───────────────────────────────────────────────
138
+ const now = Date.now();
139
+ const transformAnims = animations?.transform?.animations;
140
+ if (transformAnims?.length) {
141
+ handleTransformAnimations({ object: mesh, meshSettings: meshSettings, pathIsActive: false }, transformAnims, now, false);
142
+ }
143
+ const materialAnims = animations?.material?.animations;
144
+ if (materialAnims?.length) {
145
+ handleMaterialAnimations({ object: mesh, materialSettings: materialSettings, startValuesCache: matAnimCacheRef.current }, materialAnims, now, false);
146
+ }
147
+ // ── PER-DOMAIN MOUSE-MOVE ───────────────────────────────────────────────
148
+ const mm = mouseMove;
149
+ const isPerDomain = mm && ('transform' in mm || 'material' in mm);
150
+ if (isPerDomain) {
151
+ const md = mm;
152
+ if (md.transform?.enabled && md.transform.properties?.length) {
153
+ handleTransformMouseMove({ object: mesh, meshSettings: meshSettings }, md.transform.properties, mouse);
154
+ }
155
+ if (md.material?.enabled && md.material.properties?.length) {
156
+ handleMaterialMouseMove({ object: mesh, materialSettings: materialSettings }, md.material.properties, mouse);
157
+ }
158
+ }
152
159
  });
153
- return (_jsx("mesh", { ref: meshRef, name: "Ocean", position: position, rotation: rotation, visible: meshVisible ?? settings.visible, userData: { id: '3drise-water' }, children: _jsx("planeGeometry", { args: [planeSize[0], planeSize[1], planeSegments, planeSegments] }) }));
160
+ console.log(rotation);
161
+ return (_jsx("mesh", { ref: meshRef,
162
+ // name={settings.meshSettings.name || 'Water'}
163
+ // position={position}
164
+ // rotation={rotation}
165
+ // scale={scale}
166
+ // visible={meshVisible ?? meshSettings.visible}
167
+ userData: { id: '3drise-water' }, children: _jsx("planeGeometry", { args: [planeSize[0], planeSize[1], planeSegments, planeSegments] }) }));
154
168
  };
155
169
  export default Ocean;
@@ -1 +1 @@
1
- {"version":3,"file":"ParticlesR3f.d.ts","sourceRoot":"","sources":["../../src/components/ParticlesR3f.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAA+B,MAAM,wBAAwB,CAAC;AAQ7F,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9C;AAMD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA4I7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ParticlesR3f.d.ts","sourceRoot":"","sources":["../../src/components/ParticlesR3f.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAA+B,MAAM,wBAAwB,CAAC;AAQ7F,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9C;AAMD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0J7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -50,6 +50,21 @@ const ParticlesR3f = ({ particlesSettings, duration = 1, transitionSettings, })
50
50
  loadTexture(texture);
51
51
  }
52
52
  }, [texture, loadTexture]);
53
+ useEffect(() => {
54
+ const points = pointsRef.current;
55
+ if (!points)
56
+ return;
57
+ const applyTexture = (url) => {
58
+ if (!url)
59
+ return;
60
+ textureProgress.current = 0;
61
+ loadTexture(url);
62
+ };
63
+ points.userData.applyTexture = applyTexture;
64
+ return () => {
65
+ delete points.userData.applyTexture;
66
+ };
67
+ }, [loadTexture, textureProgress]);
53
68
  const speed = 1 / duration;
54
69
  const activeEffects = useMemo(() => normalizeEffects(particlesSettings.animations?.material?.shaderEffects), [particlesSettings.animations?.material?.shaderEffects]);
55
70
  const pointerRadius = particlesSettings.animations?.material
@@ -6,8 +6,6 @@ export interface PathRendererProps {
6
6
  showPoints?: boolean;
7
7
  showLine?: boolean;
8
8
  showCurve?: boolean;
9
- pointSize?: number;
10
- lineWidth?: number;
11
9
  }
12
10
  declare const PathRenderer: React.FC<PathRendererProps>;
13
11
  export default PathRenderer;
@@ -1 +1 @@
1
- {"version":3,"file":"PathRenderer.d.ts","sourceRoot":"","sources":["../../src/components/PathRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,wBAAwB,CAAC;AAIvE,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,UAAU,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoE7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"PathRenderer.d.ts","sourceRoot":"","sources":["../../src/components/PathRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,wBAAwB,CAAC;AAIvE,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,UAAU,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqE7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -3,7 +3,10 @@ import { useMemo } from 'react';
3
3
  import { Sphere, Line } from '@react-three/drei';
4
4
  import { smoothPathCorners, createPathSpline, sampleSplinePoints } from '@ntalmagor/3drize-core';
5
5
  import PathGeometry from './PathGeometry.js';
6
- const PathRenderer = ({ pathSettings, color = '#ffa500', showPoints = true, showLine = true, showCurve = true, pointSize = 0.15, lineWidth = 2, }) => {
6
+ const PathRenderer = ({ pathSettings, color = '#ffa500', showPoints = true, showLine = true, showCurve = true, }) => {
7
+ console.log("Rendering Path with settings:", pathSettings);
8
+ const pointSize = pathSettings.pointSize ?? 0.1;
9
+ const lineWidth = pathSettings.lineWidth ?? 2;
7
10
  const points = pathSettings?.points || [];
8
11
  const curve = pathSettings?.curve ?? 1;
9
12
  const smoothCorners = pathSettings?.smoothCorners ?? 0;
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectLoader.d.ts","sourceRoot":"","sources":["../../src/components/ProjectLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAQ,EAAE,KAAK,qBAAqB,EAAkB,KAAK,WAAW,EAAwB,MAAM,wBAAwB,CAAC;AAG7H,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,KAAK,YAAY,GAAG;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAChD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8GzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ProjectLoader.d.ts","sourceRoot":"","sources":["../../src/components/ProjectLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAQ,EAAE,KAAK,qBAAqB,EAAkB,KAAK,WAAW,EAAwB,MAAM,wBAAwB,CAAC;AAG7H,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,KAAK,YAAY,GAAG;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAChD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwGzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -61,13 +61,7 @@ const ProjectLoader = ({ projectId, onObjectClick, onObjectHover, onElementClick
61
61
  catch (assetError) {
62
62
  console.error('[useLoadProject] Failed to load model assets, continuing with project load:', assetError);
63
63
  }
64
- const meshes = meshObjects.map(obj => {
65
- return {
66
- ...obj.userData,
67
- id: obj.id,
68
- };
69
- });
70
- meshController.createMeshes(meshes);
64
+ meshController.createObjects(meshObjects);
71
65
  console.log("PROJECT LOAD COMPLETE");
72
66
  setProject(responseData);
73
67
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { RainSettings } from '@ntalmagor/3drize-core';
2
+ import type { CreatedObjectSettings } from '@ntalmagor/3drize-core';
3
3
  export interface RainProps {
4
- settings: RainSettings;
4
+ settings: CreatedObjectSettings;
5
5
  }
6
6
  declare const Rain: React.FC<RainProps>;
7
7
  export default Rain;
@@ -1 +1 @@
1
- {"version":3,"file":"Rain.d.ts","sourceRoot":"","sources":["../../src/components/Rain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAK3D,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA2I7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Rain.d.ts","sourceRoot":"","sources":["../../src/components/Rain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAEV,qBAAqB,EAMtB,MAAM,wBAAwB,CAAC;AAmBhC,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AA+ED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA0N7B,CAAC;AAEF,eAAe,IAAI,CAAC"}