@3driseai/3drise-viewer 0.1.5 → 0.1.7
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.
- package/README.md +225 -0
- package/dist/components/AdvancedGrid.d.ts +16 -0
- package/dist/components/AdvancedGrid.d.ts.map +1 -0
- package/dist/components/AdvancedGrid.js +63 -0
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +6 -4
- package/dist/components/CameraController.d.ts.map +1 -1
- package/dist/components/CameraController.js +0 -6
- package/dist/components/CircuitGrid.d.ts +22 -0
- package/dist/components/CircuitGrid.d.ts.map +1 -0
- package/dist/components/CircuitGrid.js +69 -0
- package/dist/components/Clouds.d.ts.map +1 -1
- package/dist/components/Clouds.js +0 -5
- package/dist/components/ContourGrid.d.ts +25 -0
- package/dist/components/ContourGrid.d.ts.map +1 -0
- package/dist/components/ContourGrid.js +74 -0
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +3 -6
- package/dist/components/CustomPrimitive.d.ts.map +1 -1
- package/dist/components/CustomPrimitive.js +1 -6
- package/dist/components/EffectsGenerator.d.ts.map +1 -1
- package/dist/components/EffectsGenerator.js +0 -2
- package/dist/components/EffectsGroup.d.ts +6 -0
- package/dist/components/EffectsGroup.d.ts.map +1 -1
- package/dist/components/EffectsGroup.js +14 -4
- package/dist/components/FractalGrid.d.ts +23 -0
- package/dist/components/FractalGrid.d.ts.map +1 -0
- package/dist/components/FractalGrid.js +72 -0
- package/dist/components/Frame.d.ts.map +1 -1
- package/dist/components/Frame.js +2 -3
- package/dist/components/GalleryLayout.d.ts.map +1 -1
- package/dist/components/GalleryLayout.js +0 -3
- package/dist/components/GeometryShape.d.ts.map +1 -1
- package/dist/components/GeometryShape.js +19 -7
- package/dist/components/Glyphs.d.ts.map +1 -1
- package/dist/components/Glyphs.js +0 -1
- package/dist/components/GridsGenerator.d.ts +4 -1
- package/dist/components/GridsGenerator.d.ts.map +1 -1
- package/dist/components/GridsGenerator.js +28 -4
- package/dist/components/HdrPlaylistRenderer.d.ts.map +1 -1
- package/dist/components/HdrPlaylistRenderer.js +0 -1
- package/dist/components/HexGrid.d.ts +25 -0
- package/dist/components/HexGrid.d.ts.map +1 -0
- package/dist/components/HexGrid.js +72 -0
- package/dist/components/ImageGeometry.js +1 -1
- package/dist/components/Letter.d.ts.map +1 -1
- package/dist/components/Letter.js +1 -6
- package/dist/components/MoireGrid.d.ts +23 -0
- package/dist/components/MoireGrid.d.ts.map +1 -0
- package/dist/components/MoireGrid.js +76 -0
- package/dist/components/Moon.d.ts.map +1 -1
- package/dist/components/Moon.js +0 -1
- package/dist/components/ObjectNode.d.ts +1 -2
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +18 -29
- package/dist/components/ObjectNodeApi.d.ts +1 -2
- package/dist/components/ObjectNodeApi.d.ts.map +1 -1
- package/dist/components/ObjectNodeApi.js +7 -3
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +1 -4
- package/dist/components/ObjectsRendererApi.d.ts.map +1 -1
- package/dist/components/ObjectsRendererApi.js +4 -2
- package/dist/components/Ocean.d.ts.map +1 -1
- package/dist/components/Ocean.js +1 -4
- package/dist/components/ParticlesR3f.d.ts +0 -1
- package/dist/components/ParticlesR3f.d.ts.map +1 -1
- package/dist/components/ParticlesR3f.js +63 -12
- package/dist/components/PathRenderer.d.ts.map +1 -1
- package/dist/components/PathRenderer.js +0 -1
- package/dist/components/PointCloud.d.ts.map +1 -1
- package/dist/components/PointCloud.js +50 -10
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +0 -28
- package/dist/components/QuasiGrid.d.ts +22 -0
- package/dist/components/QuasiGrid.d.ts.map +1 -0
- package/dist/components/QuasiGrid.js +68 -0
- package/dist/components/RadarGrid.d.ts +24 -0
- package/dist/components/RadarGrid.d.ts.map +1 -0
- package/dist/components/RadarGrid.js +71 -0
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +0 -1
- package/dist/components/ShootingStar.js +2 -2
- package/dist/components/ShootingStars.d.ts.map +1 -1
- package/dist/components/ShootingStars.js +0 -1
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +0 -3
- package/dist/components/Skybox.d.ts +5 -0
- package/dist/components/Skybox.d.ts.map +1 -1
- package/dist/components/Skybox.js +0 -1
- package/dist/components/SparklesBurst.d.ts.map +1 -1
- package/dist/components/SparklesBurst.js +0 -1
- package/dist/components/VoronoiGrid.d.ts +21 -0
- package/dist/components/VoronoiGrid.d.ts.map +1 -0
- package/dist/components/VoronoiGrid.js +67 -0
- package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
- package/dist/components/effects/ShockwaveEffect.js +0 -1
- package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
- package/dist/components/effects/SmokeRibbon.js +0 -1
- package/dist/components/index.d.ts +19 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +9 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -0
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/use3driseShader.d.ts.map +1 -1
- package/dist/hooks/use3driseShader.js +0 -9
- package/dist/hooks/useAnimationEvents.d.ts.map +1 -1
- package/dist/hooks/useAnimationEvents.js +0 -19
- package/dist/hooks/useCameraAnimation.d.ts.map +1 -1
- package/dist/hooks/useCameraAnimation.js +0 -5
- package/dist/hooks/useContinuousEffects.d.ts +2 -3
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.js +16 -61
- package/dist/hooks/useFrameAnimations.d.ts.map +1 -1
- package/dist/hooks/useFrameAnimations.js +0 -4
- package/dist/hooks/useGridSurface.d.ts +46 -0
- package/dist/hooks/useGridSurface.d.ts.map +1 -0
- package/dist/hooks/useGridSurface.js +66 -0
- package/dist/hooks/useGsapAnimation.d.ts.map +1 -1
- package/dist/hooks/useGsapAnimation.js +0 -3
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +0 -25
- package/dist/hooks/useInteractionEffects.d.ts +2 -2
- package/dist/hooks/useInteractionEffects.d.ts.map +1 -1
- package/dist/hooks/useInteractionEffects.js +3 -1
- package/dist/hooks/useMaterialApplication.d.ts +2 -2
- package/dist/hooks/useMaterialApplication.d.ts.map +1 -1
- package/dist/hooks/useMaterialApplication.js +9 -21
- package/dist/hooks/useMaterialOptions.d.ts +2 -2
- package/dist/hooks/useMaterialOptions.d.ts.map +1 -1
- package/dist/hooks/useMaterialOptions.js +13 -37
- package/dist/hooks/useMeshController.d.ts.map +1 -1
- package/dist/hooks/useMeshController.js +0 -16
- package/dist/hooks/useObjectAnimation.d.ts +13 -2
- package/dist/hooks/useObjectAnimation.d.ts.map +1 -1
- package/dist/hooks/useObjectAnimation.js +26 -28
- package/dist/hooks/useObjectEdges.d.ts +2 -1
- package/dist/hooks/useObjectEdges.d.ts.map +1 -1
- package/dist/hooks/useObjectEdges.js +18 -52
- package/dist/hooks/useObjectEffects.d.ts.map +1 -1
- package/dist/hooks/useObjectEffects.js +0 -4
- package/dist/hooks/useRegisterScene.d.ts +17 -0
- package/dist/hooks/useRegisterScene.d.ts.map +1 -0
- package/dist/hooks/useRegisterScene.js +33 -0
- package/dist/hooks/useSequenceAnimation.d.ts +2 -2
- package/dist/hooks/useSequenceAnimation.d.ts.map +1 -1
- package/dist/hooks/useSequenceAnimation.js +5 -70
- package/dist/hooks/useShadowApplication.d.ts +2 -2
- package/dist/hooks/useShadowApplication.d.ts.map +1 -1
- package/dist/hooks/useShadowApplication.js +6 -2
- package/dist/hooks/useSkyAnimation.d.ts.map +1 -1
- package/dist/hooks/useSkyAnimation.js +0 -1
- package/dist/hooks/useSkySystem.d.ts.map +1 -1
- package/dist/hooks/useSkySystem.js +0 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/services/AnimationsManager.d.ts.map +1 -1
- package/dist/services/AnimationsManager.js +0 -1
- package/dist/shaders/CircuitGridMaterial.d.ts +76 -0
- package/dist/shaders/CircuitGridMaterial.d.ts.map +1 -0
- package/dist/shaders/CircuitGridMaterial.js +298 -0
- package/dist/shaders/ContourGridMaterial.d.ts +80 -0
- package/dist/shaders/ContourGridMaterial.d.ts.map +1 -0
- package/dist/shaders/ContourGridMaterial.js +259 -0
- package/dist/shaders/FractalGridMaterial.d.ts +76 -0
- package/dist/shaders/FractalGridMaterial.d.ts.map +1 -0
- package/dist/shaders/FractalGridMaterial.js +247 -0
- package/dist/shaders/HexGridMaterial.d.ts +73 -0
- package/dist/shaders/HexGridMaterial.d.ts.map +1 -0
- package/dist/shaders/HexGridMaterial.js +265 -0
- package/dist/shaders/MoireGridMaterial.d.ts +79 -0
- package/dist/shaders/MoireGridMaterial.d.ts.map +1 -0
- package/dist/shaders/MoireGridMaterial.js +271 -0
- package/dist/shaders/QuasiGridMaterial.d.ts +76 -0
- package/dist/shaders/QuasiGridMaterial.d.ts.map +1 -0
- package/dist/shaders/QuasiGridMaterial.js +238 -0
- package/dist/shaders/RadarGridMaterial.d.ts +77 -0
- package/dist/shaders/RadarGridMaterial.d.ts.map +1 -0
- package/dist/shaders/RadarGridMaterial.js +291 -0
- package/dist/shaders/VoronoiGridMaterial.d.ts +73 -0
- package/dist/shaders/VoronoiGridMaterial.d.ts.map +1 -0
- package/dist/shaders/VoronoiGridMaterial.js +266 -0
- package/dist/types/gridConfigs.d.ts +202 -0
- package/dist/types/gridConfigs.d.ts.map +1 -0
- package/dist/types/gridConfigs.js +11 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/handleGenerativeEffectsAnimations.d.ts +0 -1
- package/dist/utils/handleGenerativeEffectsAnimations.d.ts.map +1 -1
- package/dist/utils/handleGenerativeEffectsAnimations.js +0 -29
- package/dist/utils/pointsMaterialOwnership.d.ts +9 -0
- package/dist/utils/pointsMaterialOwnership.d.ts.map +1 -0
- package/dist/utils/pointsMaterialOwnership.js +14 -0
- package/dist/utils/resolveObject3D.d.ts +20 -0
- package/dist/utils/resolveObject3D.d.ts.map +1 -0
- package/dist/utils/resolveObject3D.js +9 -0
- package/dist/utils/shapes.d.ts.map +1 -1
- package/dist/utils/shapes.js +0 -1
- package/package.json +4 -4
|
@@ -4,7 +4,8 @@ import { useEffect, useMemo, useRef } from 'react';
|
|
|
4
4
|
import { useFrame } from '@react-three/fiber';
|
|
5
5
|
import { useParticlesColors } from '../hooks/useParticlesColors.js';
|
|
6
6
|
import { useParticlesTextures } from '../hooks/useParticlesTextures.js';
|
|
7
|
-
import { buildShaderEffectsMaterial, structureKey } from '@3driseai/3drise-core';
|
|
7
|
+
import { buildShaderEffectsMaterial, structureKey, SELF_OWNED_MATERIAL_KEY, applyVertexEffects, partitionShaderEffects, LOCAL_POINTER_SCALE } from '@3driseai/3drise-core';
|
|
8
|
+
import { ownsShaderEffectsMaterial } from '../utils/pointsMaterialOwnership.js';
|
|
8
9
|
import { update3driseShaderUniforms } from '../hooks/use3driseShader.js';
|
|
9
10
|
function normalizeEffects(raw) {
|
|
10
11
|
return Array.isArray(raw) ? raw : [];
|
|
@@ -77,27 +78,66 @@ const PointCloud = ({ positions, materialSettings, animations, onObjectReady, on
|
|
|
77
78
|
const activeEffects = useMemo(() => normalizeEffects(animations?.material?.shaderEffects), [animations?.material?.shaderEffects]);
|
|
78
79
|
const pointerRadius = animations?.material
|
|
79
80
|
?.shaderEffectsPointerRadius ?? 0.4;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
// Position effects displace the geometry from the CPU and leave `.material`
|
|
82
|
+
// alone, so they compose with any material. Only the rest still need the
|
|
83
|
+
// shader shell — and only the shell takes ownership of `.material`.
|
|
84
|
+
const { position: positionEffects, shell: shellEffects } = useMemo(() => partitionShaderEffects(activeEffects), [activeEffects]);
|
|
85
|
+
const hasPositionEffects = positionEffects.some(effect => effect.enabled);
|
|
86
|
+
const effectsKey = useMemo(() => structureKey(shellEffects), [shellEffects]);
|
|
87
|
+
const ownsMaterial = ownsShaderEffectsMaterial(materialSettings, shellEffects);
|
|
88
|
+
// A separate buffer to displace into, so `positions` stays the authored
|
|
89
|
+
// baseline and effects never accumulate frame over frame.
|
|
90
|
+
const displayPositions = useMemo(() => (hasPositionEffects && positions ? new Float32Array(positions) : positions), [positions, hasPositionEffects]);
|
|
91
|
+
const material = useMemo(() => ownsMaterial ? buildShaderEffectsMaterial({
|
|
92
|
+
effects: shellEffects,
|
|
83
93
|
initialColor: color,
|
|
84
94
|
initialOpacity: opacity,
|
|
85
95
|
initialPointSize: pointSize,
|
|
86
96
|
initialParticleUVScale: particleUVScale,
|
|
87
97
|
initialPointerEffectRadius: pointerRadius,
|
|
88
|
-
}),
|
|
98
|
+
}) : null,
|
|
89
99
|
// Rebuild when the structural set of effects changes; not on parameter tweaks.
|
|
90
100
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
91
|
-
[effectsKey]);
|
|
101
|
+
[effectsKey, ownsMaterial]);
|
|
92
102
|
useEffect(() => {
|
|
93
103
|
materialRef.current = material;
|
|
94
104
|
return () => {
|
|
95
|
-
material
|
|
105
|
+
material?.dispose();
|
|
96
106
|
};
|
|
97
107
|
}, [material]);
|
|
108
|
+
// Tell useMaterialApplication's traversal to leave this object alone while we
|
|
109
|
+
// own its material. Set imperatively rather than through a `userData` prop:
|
|
110
|
+
// R3F replaces the whole object on every render, which would wipe the
|
|
111
|
+
// applyTexture handle stashed above.
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
const points = pointsRef.current;
|
|
114
|
+
if (!points)
|
|
115
|
+
return;
|
|
116
|
+
points.userData[SELF_OWNED_MATERIAL_KEY] = ownsMaterial;
|
|
117
|
+
return () => {
|
|
118
|
+
if (points.userData)
|
|
119
|
+
delete points.userData[SELF_OWNED_MATERIAL_KEY];
|
|
120
|
+
};
|
|
121
|
+
}, [ownsMaterial]);
|
|
98
122
|
useFrame((state, delta) => {
|
|
123
|
+
const points = pointsRef.current;
|
|
124
|
+
if (!points)
|
|
125
|
+
return;
|
|
126
|
+
if (hasPositionEffects && displayPositions !== positions) {
|
|
127
|
+
const moved = applyVertexEffects(positions, displayPositions, positionEffects, {
|
|
128
|
+
time: state.clock.getElapsedTime(),
|
|
129
|
+
pointerX: state.pointer.x * LOCAL_POINTER_SCALE,
|
|
130
|
+
pointerY: state.pointer.y * LOCAL_POINTER_SCALE,
|
|
131
|
+
pointerRadius: pointerRadius * LOCAL_POINTER_SCALE,
|
|
132
|
+
});
|
|
133
|
+
if (moved) {
|
|
134
|
+
const attribute = points.geometry?.attributes?.position;
|
|
135
|
+
if (attribute)
|
|
136
|
+
attribute.needsUpdate = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
99
139
|
const mat = materialRef.current;
|
|
100
|
-
if (!mat
|
|
140
|
+
if (!mat)
|
|
101
141
|
return;
|
|
102
142
|
handleColorsAnimation(materialRef, delta, speed);
|
|
103
143
|
if (prevTexture.current)
|
|
@@ -106,10 +146,10 @@ const PointCloud = ({ positions, materialSettings, animations, onObjectReady, on
|
|
|
106
146
|
mat.uniforms.uTargetTexture.value = currentTexture.current;
|
|
107
147
|
mat.uniforms.uHasTexture.value = !!currentTexture.current;
|
|
108
148
|
handleTextureAnimation(materialRef, delta, speed);
|
|
109
|
-
update3driseShaderUniforms(mat.uniforms,
|
|
149
|
+
update3driseShaderUniforms(mat.uniforms, shellEffects, state.clock.getElapsedTime(), { x: state.pointer.x, y: state.pointer.y }, { pointerRadius });
|
|
110
150
|
});
|
|
111
151
|
if (!positions)
|
|
112
152
|
return null;
|
|
113
|
-
return (_jsxs("points", { ref: pointsRef, raycast: () => null, position: [0, 0, 0], rotation: [0, 0, 0], scale: [1, 1, 1], children: [_jsxs("bufferGeometry", { children: [_jsx("bufferAttribute", { attach: "attributes-position", count:
|
|
153
|
+
return (_jsxs("points", { ref: pointsRef, raycast: () => null, position: [0, 0, 0], rotation: [0, 0, 0], scale: [1, 1, 1], children: [_jsxs("bufferGeometry", { children: [_jsx("bufferAttribute", { attach: "attributes-position", count: displayPositions.length / 3, array: displayPositions, itemSize: 3, args: [displayPositions, 3] }), uvs && (_jsx("bufferAttribute", { attach: "attributes-aUV", count: uvs.length / 2, array: uvs, itemSize: 2, args: [uvs, 2] }))] }), material && _jsx("primitive", { object: material, attach: "material" })] }));
|
|
114
154
|
};
|
|
115
155
|
export default PointCloud;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectLoader.d.ts","sourceRoot":"","sources":["../../src/components/ProjectLoader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,KAAK,YAAY,GAAG,gBAAgB,GAAG;IACnC,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;
|
|
1
|
+
{"version":3,"file":"ProjectLoader.d.ts","sourceRoot":"","sources":["../../src/components/ProjectLoader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,KAAK,YAAY,GAAG,gBAAgB,GAAG;IACnC,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;AAGF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAqDzC,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -5,7 +5,6 @@ import SceneBuilder from "./SceneBuilder.js";
|
|
|
5
5
|
import { loadAssets, } from "@3driseai/3drise-core";
|
|
6
6
|
import LoadingIndicator from "./LoadingIndicator.js";
|
|
7
7
|
import { useMeshController } from "../hooks/useMeshController.js";
|
|
8
|
-
const PROJECT_LOADER_DEBUG_PREFIX = '[ProjectLoaderDebug]';
|
|
9
8
|
const ProjectLoader = ({ projectId, onObjectClick, onObjectHover, onElementClick, onElementHover, onSceneInitialized, onObjectReady, onObjectDispose, loadingIndicator = _jsx(LoadingIndicator, { text: "Loading project...", fullScreen: true, animate: true }) }) => {
|
|
10
9
|
const [project, setProject] = useState(null);
|
|
11
10
|
const meshController = useMeshController();
|
|
@@ -17,22 +16,12 @@ const ProjectLoader = ({ projectId, onObjectClick, onObjectHover, onElementClick
|
|
|
17
16
|
const loadProject = async (projectId) => {
|
|
18
17
|
try {
|
|
19
18
|
const url = `${dataCenterServer}projects/${projectId}/view`;
|
|
20
|
-
console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Fetching project', {
|
|
21
|
-
projectId,
|
|
22
|
-
url,
|
|
23
|
-
});
|
|
24
19
|
const response = await fetch(url, {
|
|
25
20
|
method: "GET",
|
|
26
21
|
headers: {
|
|
27
22
|
"Content-Type": "application/json",
|
|
28
23
|
},
|
|
29
24
|
});
|
|
30
|
-
console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Received project response', {
|
|
31
|
-
projectId,
|
|
32
|
-
status: response.status,
|
|
33
|
-
ok: response.ok,
|
|
34
|
-
url,
|
|
35
|
-
});
|
|
36
25
|
if (!response.ok) {
|
|
37
26
|
if (response.status === 404) {
|
|
38
27
|
throw new Error("Project not found");
|
|
@@ -40,36 +29,22 @@ const ProjectLoader = ({ projectId, onObjectClick, onObjectHover, onElementClick
|
|
|
40
29
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
41
30
|
}
|
|
42
31
|
const responseData = await response.json();
|
|
43
|
-
// console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Parsed project payload', {
|
|
44
|
-
// projectId,
|
|
45
|
-
// sceneObjectsCount: responseData.sceneObjects?.length || 0,
|
|
46
|
-
// projectName: responseData.name,
|
|
47
|
-
// });
|
|
48
|
-
console.log("Loaded project:", responseData);
|
|
49
32
|
const sceneObjects = responseData.sceneObjects || [];
|
|
50
33
|
const modelObjects = sceneObjects.filter(obj => obj.type === 'model');
|
|
51
34
|
const meshObjects = sceneObjects.filter(obj => obj.type === 'mesh');
|
|
52
|
-
console.log('Model objects in loaded project:', modelObjects);
|
|
53
35
|
try {
|
|
54
36
|
const models = modelObjects.map(obj => ({
|
|
55
37
|
...obj.userData,
|
|
56
38
|
id: obj.id,
|
|
57
39
|
}));
|
|
58
40
|
await loadAssets(models);
|
|
59
|
-
console.log('[useLoadProject] Assets loaded for model objects');
|
|
60
41
|
}
|
|
61
42
|
catch (assetError) {
|
|
62
|
-
console.error('[useLoadProject] Failed to load model assets, continuing with project load:', assetError);
|
|
63
43
|
}
|
|
64
44
|
// meshController.createObjects(meshObjects);
|
|
65
|
-
console.log("PROJECT LOAD COMPLETE");
|
|
66
45
|
setProject(responseData);
|
|
67
46
|
}
|
|
68
47
|
catch (error) {
|
|
69
|
-
console.error(PROJECT_LOADER_DEBUG_PREFIX, 'Error fetching project', {
|
|
70
|
-
projectId,
|
|
71
|
-
error,
|
|
72
|
-
});
|
|
73
48
|
}
|
|
74
49
|
};
|
|
75
50
|
if (!project) {
|
|
@@ -80,9 +55,6 @@ const ProjectLoader = ({ projectId, onObjectClick, onObjectHover, onElementClick
|
|
|
80
55
|
flexDirection: 'column', gap: '1rem'
|
|
81
56
|
}, children: loadingIndicator });
|
|
82
57
|
}
|
|
83
|
-
console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Rendering SceneBuilder with project', {
|
|
84
|
-
project
|
|
85
|
-
});
|
|
86
58
|
return _jsx(_Fragment, { children: _jsx(SceneBuilder, { project: project, onSceneInitialized: onSceneInitialized, onUiElementClick: onElementClick, onUiElementHover: onElementHover, onObjectClick: onObjectClick, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }) });
|
|
87
59
|
};
|
|
88
60
|
export default ProjectLoader;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ThreeElements } from '@react-three/fiber';
|
|
2
|
+
import type { ObjectReadyProps } from '../types/objectReady';
|
|
3
|
+
import type { QuasiGridConfig } from '../types/gridConfigs';
|
|
4
|
+
export interface QuasiGridProps extends ObjectReadyProps {
|
|
5
|
+
config?: QuasiGridConfig;
|
|
6
|
+
groupProps?: ThreeElements['group'];
|
|
7
|
+
}
|
|
8
|
+
/** QuasiGridConfig — the single source of truth for a quasicrystal grid instance. */
|
|
9
|
+
export declare const defaultQuasiGridConfig: QuasiGridConfig;
|
|
10
|
+
/**
|
|
11
|
+
* An aperiodic quasicrystal lattice, built as a de Bruijn multigrid: `symmetry`
|
|
12
|
+
* families of evenly spaced parallel lines spread over a half turn.
|
|
13
|
+
*
|
|
14
|
+
* Where the angles do not divide the half turn evenly the intersections never
|
|
15
|
+
* repeat, so unlike every other grid in this package the pattern is genuinely
|
|
16
|
+
* non-periodic — pan as far as you like and it never comes back around. 5 is
|
|
17
|
+
* Penrose. 4 and 6 do divide evenly and so come out periodic, which makes them
|
|
18
|
+
* a useful sanity check rather than a bug.
|
|
19
|
+
*/
|
|
20
|
+
export declare function QuasiGrid({ config, groupProps, onObjectReady, onObjectDispose }: QuasiGridProps): import("react").JSX.Element;
|
|
21
|
+
export default QuasiGrid;
|
|
22
|
+
//# sourceMappingURL=QuasiGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuasiGrid.d.ts","sourceRoot":"","sources":["../../src/components/QuasiGrid.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;AAKD,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,EAAE,eA2BpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAA+B,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,cAAc,+BAgExH;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { QuasiGridMaterial } from '@3driseai/3drise-core';
|
|
7
|
+
// Side-effect import registers <quasiGridMaterial> via extend().
|
|
8
|
+
void QuasiGridMaterial;
|
|
9
|
+
/** QuasiGridConfig — the single source of truth for a quasicrystal grid instance. */
|
|
10
|
+
export const defaultQuasiGridConfig = {
|
|
11
|
+
cellSize: 3,
|
|
12
|
+
size: 50,
|
|
13
|
+
segments: undefined,
|
|
14
|
+
flat: true,
|
|
15
|
+
lineMode: 1, // ripple out from the focus point
|
|
16
|
+
cellMode: 2, // twinkle
|
|
17
|
+
lineWidth: 1.2,
|
|
18
|
+
sectionSize: 5,
|
|
19
|
+
sectionWidth: 2,
|
|
20
|
+
animSpeed: 1,
|
|
21
|
+
animScale: 0.5,
|
|
22
|
+
animIntensity: 1,
|
|
23
|
+
fadeDistance: undefined,
|
|
24
|
+
fadeStrength: 0.7,
|
|
25
|
+
displace: 0,
|
|
26
|
+
symmetry: 5, // Penrose
|
|
27
|
+
phase: 0.2,
|
|
28
|
+
lineColor: '#8c4d1f',
|
|
29
|
+
sectionColor: '#ffc759',
|
|
30
|
+
cellColor: '#381a08',
|
|
31
|
+
glowColor: '#ffa640',
|
|
32
|
+
bgColor: '#0d0503',
|
|
33
|
+
bgOpacity: 0,
|
|
34
|
+
followMouse: false,
|
|
35
|
+
reveal: 1,
|
|
36
|
+
revealDuration: 0,
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* An aperiodic quasicrystal lattice, built as a de Bruijn multigrid: `symmetry`
|
|
40
|
+
* families of evenly spaced parallel lines spread over a half turn.
|
|
41
|
+
*
|
|
42
|
+
* Where the angles do not divide the half turn evenly the intersections never
|
|
43
|
+
* repeat, so unlike every other grid in this package the pattern is genuinely
|
|
44
|
+
* non-periodic — pan as far as you like and it never comes back around. 5 is
|
|
45
|
+
* Penrose. 4 and 6 do divide evenly and so come out periodic, which makes them
|
|
46
|
+
* a useful sanity check rather than a bug.
|
|
47
|
+
*/
|
|
48
|
+
export function QuasiGrid({ config = defaultQuasiGridConfig, groupProps, onObjectReady, onObjectDispose }) {
|
|
49
|
+
const matRef = useRef(null);
|
|
50
|
+
const rootRef = useRef(null);
|
|
51
|
+
const meshRef = useRef(null);
|
|
52
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
53
|
+
const { cellSize, size, segments, flat, lineMode, cellMode, lineWidth, sectionSize, sectionWidth, animSpeed, animScale, animIntensity, fadeDistance, fadeStrength, displace, symmetry, phase, lineColor, sectionColor, cellColor, glowColor, bgColor, bgOpacity, followMouse, reveal, revealDuration, } = config;
|
|
54
|
+
const segs = segments ?? (displace > 0
|
|
55
|
+
? Math.min(256, Math.max(64, Math.ceil(size / Math.max(cellSize, 1e-4)) * 2))
|
|
56
|
+
: 1);
|
|
57
|
+
const fade = fadeDistance ?? size * 0.5;
|
|
58
|
+
const colors = useMemo(() => ({
|
|
59
|
+
line: new THREE.Color(lineColor),
|
|
60
|
+
section: new THREE.Color(sectionColor),
|
|
61
|
+
cell: new THREE.Color(cellColor),
|
|
62
|
+
glow: new THREE.Color(glowColor),
|
|
63
|
+
bg: new THREE.Color(bgColor),
|
|
64
|
+
}), [lineColor, sectionColor, cellColor, glowColor, bgColor]);
|
|
65
|
+
useGridSurface(matRef, meshRef, { followMouse, reveal, revealDuration });
|
|
66
|
+
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("quasiGridMaterial", { 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_symmetry: Math.max(3, Math.min(9, symmetry)), u_phase: phase, u_lineColor: colors.line, u_sectionColor: colors.section, u_cellColor: colors.cell, u_glowColor: colors.glow, u_bgColor: colors.bg, u_bgOpacity: bgOpacity }, QuasiGridMaterial.key)] }) }));
|
|
67
|
+
}
|
|
68
|
+
export default QuasiGrid;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ThreeElements } from '@react-three/fiber';
|
|
2
|
+
import type { ObjectReadyProps } from '../types/objectReady';
|
|
3
|
+
import type { RadarGridConfig } from '../types/gridConfigs';
|
|
4
|
+
export interface RadarGridProps extends ObjectReadyProps {
|
|
5
|
+
config?: RadarGridConfig;
|
|
6
|
+
groupProps?: ThreeElements['group'];
|
|
7
|
+
}
|
|
8
|
+
/** RadarGridConfig — the single source of truth for a radar grid instance. */
|
|
9
|
+
export declare const defaultRadarGridConfig: RadarGridConfig;
|
|
10
|
+
/**
|
|
11
|
+
* A polar HUD — concentric rings and radial spokes instead of an X/Y lattice,
|
|
12
|
+
* masked to a disc of `fadeDistance` rather than filling its square plane.
|
|
13
|
+
*
|
|
14
|
+
* A sweep arm rotates with a decaying trail, contacts light as it crosses them
|
|
15
|
+
* and fade until it comes back around, and `lineMode` 1 sends ping rings out
|
|
16
|
+
* from the focus point. Set `sweepWidth` to 0 for a static instrument face,
|
|
17
|
+
* `spokes` to 0 for rings only.
|
|
18
|
+
*
|
|
19
|
+
* Note that `fadeDistance` is the disc radius here, so keep `size` at least
|
|
20
|
+
* twice it or the disc gets clipped by its own plane.
|
|
21
|
+
*/
|
|
22
|
+
export declare function RadarGrid({ config, groupProps, onObjectReady, onObjectDispose }: RadarGridProps): import("react").JSX.Element;
|
|
23
|
+
export default RadarGrid;
|
|
24
|
+
//# sourceMappingURL=RadarGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadarGrid.d.ts","sourceRoot":"","sources":["../../src/components/RadarGrid.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;AAKD,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB,EAAE,eA4BpC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAA+B,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,cAAc,+BAiExH;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { RadarGridMaterial } from '@3driseai/3drise-core';
|
|
7
|
+
// Side-effect import registers <radarGridMaterial> via extend().
|
|
8
|
+
void RadarGridMaterial;
|
|
9
|
+
/** RadarGridConfig — the single source of truth for a radar grid instance. */
|
|
10
|
+
export const defaultRadarGridConfig = {
|
|
11
|
+
cellSize: 2.5,
|
|
12
|
+
size: 50,
|
|
13
|
+
segments: undefined,
|
|
14
|
+
flat: true,
|
|
15
|
+
lineMode: 1, // ping rings expanding from the focus point
|
|
16
|
+
cellMode: 0,
|
|
17
|
+
lineWidth: 1,
|
|
18
|
+
sectionSize: 4,
|
|
19
|
+
sectionWidth: 1.8,
|
|
20
|
+
animSpeed: 1,
|
|
21
|
+
animScale: 0.5,
|
|
22
|
+
animIntensity: 1,
|
|
23
|
+
fadeDistance: 24,
|
|
24
|
+
fadeStrength: 0.25,
|
|
25
|
+
displace: 0,
|
|
26
|
+
spokes: 24,
|
|
27
|
+
sweepWidth: 0.13,
|
|
28
|
+
blipDensity: 0.08,
|
|
29
|
+
lineColor: '#1a805a',
|
|
30
|
+
sectionColor: '#80ffb8',
|
|
31
|
+
cellColor: '#0d3324',
|
|
32
|
+
glowColor: '#59ff99',
|
|
33
|
+
bgColor: '#020d08',
|
|
34
|
+
bgOpacity: 0.25,
|
|
35
|
+
followMouse: false,
|
|
36
|
+
reveal: 1,
|
|
37
|
+
revealDuration: 0,
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A polar HUD — concentric rings and radial spokes instead of an X/Y lattice,
|
|
41
|
+
* masked to a disc of `fadeDistance` rather than filling its square plane.
|
|
42
|
+
*
|
|
43
|
+
* A sweep arm rotates with a decaying trail, contacts light as it crosses them
|
|
44
|
+
* and fade until it comes back around, and `lineMode` 1 sends ping rings out
|
|
45
|
+
* from the focus point. Set `sweepWidth` to 0 for a static instrument face,
|
|
46
|
+
* `spokes` to 0 for rings only.
|
|
47
|
+
*
|
|
48
|
+
* Note that `fadeDistance` is the disc radius here, so keep `size` at least
|
|
49
|
+
* twice it or the disc gets clipped by its own plane.
|
|
50
|
+
*/
|
|
51
|
+
export function RadarGrid({ config = defaultRadarGridConfig, groupProps, onObjectReady, onObjectDispose }) {
|
|
52
|
+
const matRef = useRef(null);
|
|
53
|
+
const rootRef = useRef(null);
|
|
54
|
+
const meshRef = useRef(null);
|
|
55
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
56
|
+
const { cellSize, size, segments, flat, lineMode, cellMode, lineWidth, sectionSize, sectionWidth, animSpeed, animScale, animIntensity, fadeDistance, fadeStrength, displace, spokes, sweepWidth, blipDensity, lineColor, sectionColor, cellColor, glowColor, bgColor, bgOpacity, followMouse, reveal, revealDuration, } = config;
|
|
57
|
+
const segs = segments ?? (displace > 0
|
|
58
|
+
? Math.min(256, Math.max(64, Math.ceil(size / Math.max(cellSize, 1e-4)) * 4))
|
|
59
|
+
: 1);
|
|
60
|
+
const fade = fadeDistance ?? size * 0.5;
|
|
61
|
+
const colors = useMemo(() => ({
|
|
62
|
+
line: new THREE.Color(lineColor),
|
|
63
|
+
section: new THREE.Color(sectionColor),
|
|
64
|
+
cell: new THREE.Color(cellColor),
|
|
65
|
+
glow: new THREE.Color(glowColor),
|
|
66
|
+
bg: new THREE.Color(bgColor),
|
|
67
|
+
}), [lineColor, sectionColor, cellColor, glowColor, bgColor]);
|
|
68
|
+
useGridSurface(matRef, meshRef, { followMouse, reveal, revealDuration });
|
|
69
|
+
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("radarGridMaterial", { 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_spokes: spokes, u_sweepWidth: sweepWidth, u_blipDensity: blipDensity, u_lineColor: colors.line, u_sectionColor: colors.section, u_cellColor: colors.cell, u_glowColor: colors.glow, u_bgColor: colors.bg, u_bgOpacity: bgOpacity }, RadarGridMaterial.key)] }) }));
|
|
70
|
+
}
|
|
71
|
+
export default RadarGrid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneBuilder.d.ts","sourceRoot":"","sources":["../../src/components/SceneBuilder.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SceneBuilder.d.ts","sourceRoot":"","sources":["../../src/components/SceneBuilder.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG,gBAAgB,CA+HhE,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -102,7 +102,6 @@ const SceneBuilder = ({ project, width = "100%", height = "100vh", style = {}, c
|
|
|
102
102
|
// initializeSceneAssets();
|
|
103
103
|
// }, [meshController, modelObjects, meshObjects]);
|
|
104
104
|
const handleElementClick = (element) => {
|
|
105
|
-
console.log("Element clicked in scene:", element);
|
|
106
105
|
if (element && onUiElementClick) {
|
|
107
106
|
onUiElementClick(element);
|
|
108
107
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useObjectReady } from '../hooks/useObjectReady.js';
|
|
3
3
|
import { useRef, useMemo, useEffect } from 'react';
|
|
4
4
|
import { useFrame } from '@react-three/fiber';
|
|
5
|
-
import { Vector3, BufferGeometry, BufferAttribute, AdditiveBlending
|
|
5
|
+
import { Vector3, BufferGeometry, BufferAttribute, AdditiveBlending } from 'three';
|
|
6
6
|
import { ShootingStarMaterial } from '@3driseai/3drise-core';
|
|
7
7
|
const ShootingStar = ({ position = [0, 0, 0], direction = [1, -1, 0], speed = 0.05, color = '#ffffff', trailLength = 30, size = 0.1, opacity = 1.0, onComplete, maxDistance = 50, followMouse = true, onObjectReady, onObjectDispose, }) => {
|
|
8
8
|
const starRef = useRef(null);
|
|
@@ -90,6 +90,6 @@ const ShootingStar = ({ position = [0, 0, 0], direction = [1, -1, 0], speed = 0.
|
|
|
90
90
|
if (distanceTraveled.current > maxDistance)
|
|
91
91
|
onComplete?.();
|
|
92
92
|
});
|
|
93
|
-
return (_jsxs("group", { ref: rootRef, children: [_jsx("lineSegments", { ref: trailRef, geometry: trailGeometry, children: _jsx("
|
|
93
|
+
return (_jsxs("group", { ref: rootRef, children: [_jsx("lineSegments", { ref: trailRef, geometry: trailGeometry, children: _jsx("primitive", { object: materialRef.current || new ShootingStarMaterial(), attach: "material", transparent: true, blending: AdditiveBlending, depthWrite: false }) }), _jsxs("mesh", { ref: starRef, children: [_jsx("sphereGeometry", { args: [size, 8, 8] }), _jsx("meshBasicMaterial", { ref: starMaterialRef, color: color, transparent: true, opacity: opacity, blending: AdditiveBlending, depthWrite: false }), _jsxs("mesh", { ref: glowRef, children: [_jsx("sphereGeometry", { args: [size * 2, 8, 8] }), _jsx("meshBasicMaterial", { ref: glowMaterialRef, color: color, transparent: true, opacity: opacity * 0.3, blending: AdditiveBlending, depthWrite: false })] })] })] }));
|
|
94
94
|
};
|
|
95
95
|
export default ShootingStar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShootingStars.d.ts","sourceRoot":"","sources":["../../src/components/ShootingStars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,qBAAqB,CAAC;CACnC;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ShootingStars.d.ts","sourceRoot":"","sources":["../../src/components/ShootingStars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,qBAAqB,CAAC;CACnC;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkC/C,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -35,7 +35,6 @@ const ShootingStars = ({ settings, onObjectReady, onObjectDispose }) => {
|
|
|
35
35
|
}, []);
|
|
36
36
|
if (!settings?.enabled)
|
|
37
37
|
return null;
|
|
38
|
-
console.log("Rendering ShootingStars with settings:", settings, "and shootingStars:", shootingStars);
|
|
39
38
|
return (_jsx(_Fragment, { children: shootingStars.map(star => (_jsx(ShootingStar, { position: star.position, direction: star.direction, speed: star.speed, color: star.color, trailLength: star.trailLength, size: 0.08, opacity: 0.9, maxDistance: star.length, onComplete: () => handleComplete(star.id), followMouse: settings.followMouse, onObjectReady: onObjectReady, onObjectDispose: onObjectDispose }, star.id))) }));
|
|
40
39
|
};
|
|
41
40
|
export default ShootingStars;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkyController.d.ts","sourceRoot":"","sources":["../../src/components/SkyController.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAS7D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACtD;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SkyController.d.ts","sourceRoot":"","sources":["../../src/components/SkyController.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAS7D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACtD;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,GAAG,EAAE,kBAAkB,GAwK8H,GAAG,CACtQ;AA6BD,eAAe,aAAa,CAAC"}
|
|
@@ -33,7 +33,6 @@ function SkyController({ settings, timeSettings, scale = 1000, onSettingsChange,
|
|
|
33
33
|
return;
|
|
34
34
|
event.step.transitions.forEach((transition) => {
|
|
35
35
|
if (transition.state === 'sky' && skyRef.current) {
|
|
36
|
-
console.log('Starting sky transition animation', { transition }, skyRef.current.visible);
|
|
37
36
|
const toProps = transition.properties.to || {};
|
|
38
37
|
const fromProps = transition.properties.from || {};
|
|
39
38
|
// Handle `visible` as an immediate boolean switch — not animated
|
|
@@ -68,7 +67,6 @@ function SkyController({ settings, timeSettings, scale = 1000, onSettingsChange,
|
|
|
68
67
|
});
|
|
69
68
|
const handleTimeUpdate = useCallback((state) => {
|
|
70
69
|
const { sunAzimuth, sunElevation, timeInHours } = state;
|
|
71
|
-
// console.log('SkyController - Time update:', { sunAzimuth, sunElevation, timeInHours });
|
|
72
70
|
const atmosphericParams = calculateSkyParamsForTime(timeInHours);
|
|
73
71
|
const newSettings = {
|
|
74
72
|
...settings,
|
|
@@ -152,7 +150,6 @@ function SkyController({ settings, timeSettings, scale = 1000, onSettingsChange,
|
|
|
152
150
|
previousSettings.current = { ...newSettings };
|
|
153
151
|
};
|
|
154
152
|
const handleMouseMove = (mouse) => {
|
|
155
|
-
// console.log(skyRef.current.visible)
|
|
156
153
|
const handlers = settings.handlers;
|
|
157
154
|
if (!handlers || isAnimatingRef.current || !skyRef.current)
|
|
158
155
|
return;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { ObjectReadyProps } from '../types/objectReady';
|
|
2
2
|
import type { TimeSettings } from '@3driseai/3drise-core';
|
|
3
3
|
import React from "react";
|
|
4
|
+
declare module '@react-three/fiber' {
|
|
5
|
+
interface ThreeElements {
|
|
6
|
+
skyboxMaterial: any;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
4
9
|
export interface SkyboxProps extends ObjectReadyProps {
|
|
5
10
|
visible?: boolean;
|
|
6
11
|
scale?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skybox.d.ts","sourceRoot":"","sources":["../../src/components/Skybox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Skybox.d.ts","sourceRoot":"","sources":["../../src/components/Skybox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,QAAQ,oBAAoB,CAAC;IAChC,UAAU,aAAa;QACnB,cAAc,EAAE,GAAG,CAAC;KACvB;CACJ;AAED,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;CAC9B;AAkDD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqCjC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -89,7 +89,6 @@ const Skybox = ({ visible = true, scale = 100000, sunSize = 1, moonSize = 1, tim
|
|
|
89
89
|
});
|
|
90
90
|
if (!visible)
|
|
91
91
|
return null;
|
|
92
|
-
// console.log(sunSize)
|
|
93
92
|
return (_jsxs("mesh", { ref: rootRef, scale: scale, children: [_jsx("boxGeometry", { args: [1, 1, 1] }), _jsx("skyboxMaterial", { ref: materialRef, side: THREE.BackSide, depthWrite: false, fog: false })] }));
|
|
94
93
|
};
|
|
95
94
|
export default Skybox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklesBurst.d.ts","sourceRoot":"","sources":["../../src/components/SparklesBurst.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SparklesBurst.d.ts","sourceRoot":"","sources":["../../src/components/SparklesBurst.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwD/C,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -5,7 +5,6 @@ import { useFrame } from '@react-three/fiber';
|
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { SparklesBurstMaterial } from '@3driseai/3drise-core';
|
|
7
7
|
const SparklesBurst = ({ config, boundingRadius, onObjectReady, onObjectDispose }) => {
|
|
8
|
-
// console.log("Rendering SparklesBurst with config:", config, "and boundingRadius:", boundingRadius);
|
|
9
8
|
const planeSize = useMemo(() => Math.max(0.05, config.scale ?? 2.5), [config.scale]);
|
|
10
9
|
const geometry = useMemo(() => new THREE.PlaneGeometry(planeSize, planeSize, 1, 1), [planeSize]);
|
|
11
10
|
const material = useMemo(() => {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ThreeElements } from '@react-three/fiber';
|
|
2
|
+
import type { ObjectReadyProps } from '../types/objectReady';
|
|
3
|
+
import type { VoronoiGridConfig } from '../types/gridConfigs';
|
|
4
|
+
export interface VoronoiGridProps extends ObjectReadyProps {
|
|
5
|
+
config?: VoronoiGridConfig;
|
|
6
|
+
groupProps?: ThreeElements['group'];
|
|
7
|
+
}
|
|
8
|
+
/** VoronoiGridConfig — the single source of truth for a Voronoi grid instance. */
|
|
9
|
+
export declare const defaultVoronoiGridConfig: VoronoiGridConfig;
|
|
10
|
+
/**
|
|
11
|
+
* An irregular cellular lattice on a shader plane.
|
|
12
|
+
*
|
|
13
|
+
* Seeds drift over time, so the whole lattice slowly morphs rather than
|
|
14
|
+
* animating in place. `jitter` runs from a regular square lattice (0) to fully
|
|
15
|
+
* scattered (1); `drift` sets how far the seeds wander. `sectionWidth` draws
|
|
16
|
+
* the cell nuclei, `sectionSize` groups cells into clusters that share an
|
|
17
|
+
* accent colour. With `displace > 0` the surface breaks into irregular plates.
|
|
18
|
+
*/
|
|
19
|
+
export declare function VoronoiGrid({ config, groupProps, onObjectReady, onObjectDispose }: VoronoiGridProps): import("react").JSX.Element;
|
|
20
|
+
export default VoronoiGrid;
|
|
21
|
+
//# sourceMappingURL=VoronoiGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoronoiGrid.d.ts","sourceRoot":"","sources":["../../src/components/VoronoiGrid.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,iBA2BtC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAiC,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,gBAAgB,+BAgE9H;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { VoronoiGridMaterial } from '@3driseai/3drise-core';
|
|
7
|
+
// Side-effect import registers <voronoiGridMaterial> via extend().
|
|
8
|
+
void VoronoiGridMaterial;
|
|
9
|
+
/** VoronoiGridConfig — the single source of truth for a Voronoi grid instance. */
|
|
10
|
+
export const defaultVoronoiGridConfig = {
|
|
11
|
+
cellSize: 3,
|
|
12
|
+
size: 50,
|
|
13
|
+
segments: undefined,
|
|
14
|
+
flat: true,
|
|
15
|
+
lineMode: 1, // ripple out from the focus point
|
|
16
|
+
cellMode: 2, // twinkle
|
|
17
|
+
lineWidth: 1.4,
|
|
18
|
+
sectionSize: 4,
|
|
19
|
+
sectionWidth: 1,
|
|
20
|
+
animSpeed: 1,
|
|
21
|
+
animScale: 0.5,
|
|
22
|
+
animIntensity: 1,
|
|
23
|
+
fadeDistance: undefined,
|
|
24
|
+
fadeStrength: 0.7,
|
|
25
|
+
displace: 0,
|
|
26
|
+
jitter: 0.9,
|
|
27
|
+
drift: 0.5,
|
|
28
|
+
lineColor: '#5a339e',
|
|
29
|
+
sectionColor: '#d999ff',
|
|
30
|
+
cellColor: '#1f0d47',
|
|
31
|
+
glowColor: '#b366ff',
|
|
32
|
+
bgColor: '#05030d',
|
|
33
|
+
bgOpacity: 0,
|
|
34
|
+
followMouse: false,
|
|
35
|
+
reveal: 1,
|
|
36
|
+
revealDuration: 0,
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* An irregular cellular lattice on a shader plane.
|
|
40
|
+
*
|
|
41
|
+
* Seeds drift over time, so the whole lattice slowly morphs rather than
|
|
42
|
+
* animating in place. `jitter` runs from a regular square lattice (0) to fully
|
|
43
|
+
* scattered (1); `drift` sets how far the seeds wander. `sectionWidth` draws
|
|
44
|
+
* the cell nuclei, `sectionSize` groups cells into clusters that share an
|
|
45
|
+
* accent colour. With `displace > 0` the surface breaks into irregular plates.
|
|
46
|
+
*/
|
|
47
|
+
export function VoronoiGrid({ config = defaultVoronoiGridConfig, groupProps, onObjectReady, onObjectDispose }) {
|
|
48
|
+
const matRef = useRef(null);
|
|
49
|
+
const rootRef = useRef(null);
|
|
50
|
+
const meshRef = useRef(null);
|
|
51
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
52
|
+
const { cellSize, size, segments, flat, lineMode, cellMode, lineWidth, sectionSize, sectionWidth, animSpeed, animScale, animIntensity, fadeDistance, fadeStrength, displace, jitter, drift, lineColor, sectionColor, cellColor, glowColor, bgColor, bgOpacity, followMouse, reveal, revealDuration, } = config;
|
|
53
|
+
const segs = segments ?? (displace > 0
|
|
54
|
+
? Math.min(384, Math.max(96, Math.ceil(size / Math.max(cellSize, 1e-4)) * 6))
|
|
55
|
+
: 1);
|
|
56
|
+
const fade = fadeDistance ?? size * 0.5;
|
|
57
|
+
const colors = useMemo(() => ({
|
|
58
|
+
line: new THREE.Color(lineColor),
|
|
59
|
+
section: new THREE.Color(sectionColor),
|
|
60
|
+
cell: new THREE.Color(cellColor),
|
|
61
|
+
glow: new THREE.Color(glowColor),
|
|
62
|
+
bg: new THREE.Color(bgColor),
|
|
63
|
+
}), [lineColor, sectionColor, cellColor, glowColor, bgColor]);
|
|
64
|
+
useGridSurface(matRef, meshRef, { followMouse, reveal, revealDuration });
|
|
65
|
+
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("voronoiGridMaterial", { 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_jitter: jitter, u_drift: drift, u_lineColor: colors.line, u_sectionColor: colors.section, u_cellColor: colors.cell, u_glowColor: colors.glow, u_bgColor: colors.bg, u_bgOpacity: bgOpacity }, VoronoiGridMaterial.key)] }) }));
|
|
66
|
+
}
|
|
67
|
+
export default VoronoiGrid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShockwaveEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/ShockwaveEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AAkFD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ShockwaveEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/ShockwaveEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AAkFD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2EnD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -130,7 +130,6 @@ const ShockwaveEffect = ({ boundingRadius, config, animations, onObjectReady, on
|
|
|
130
130
|
side: THREE.DoubleSide,
|
|
131
131
|
})), [ringCount, colorVec, opacity]);
|
|
132
132
|
const radius = boundingRadius;
|
|
133
|
-
console.log('ShockwaveEffect render with boundingRadius:', boundingRadius, 'and config:', config);
|
|
134
133
|
useFrame((state, delta) => {
|
|
135
134
|
const t = state.clock.getElapsedTime();
|
|
136
135
|
for (let i = 0; i < ringCount; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmokeRibbon.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokeRibbon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACtD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,WAAW,GAAI,2EAAoF,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SmokeRibbon.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokeRibbon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACtD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,WAAW,GAAI,2EAAoF,gBAAgB,gCA0DxH,CAAC;AACF,eAAe,WAAW,CAAC"}
|