@ntalmagor/3drize-viewer 0.1.2
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/dist/components/AnimatedObject.d.ts +22 -0
- package/dist/components/AnimatedObject.d.ts.map +1 -0
- package/dist/components/AnimatedObject.js +121 -0
- package/dist/components/CameraController.d.ts +16 -0
- package/dist/components/CameraController.d.ts.map +1 -0
- package/dist/components/CameraController.js +132 -0
- package/dist/components/Clouds.d.ts +14 -0
- package/dist/components/Clouds.d.ts.map +1 -0
- package/dist/components/Clouds.js +97 -0
- package/dist/components/CreatedObject.d.ts +12 -0
- package/dist/components/CreatedObject.d.ts.map +1 -0
- package/dist/components/CreatedObject.js +139 -0
- package/dist/components/CustomPrimitive.d.ts +12 -0
- package/dist/components/CustomPrimitive.d.ts.map +1 -0
- package/dist/components/CustomPrimitive.js +80 -0
- package/dist/components/EffectsGenerator.d.ts +10 -0
- package/dist/components/EffectsGenerator.d.ts.map +1 -0
- package/dist/components/EffectsGenerator.js +59 -0
- package/dist/components/EffectsGroup.d.ts +8 -0
- package/dist/components/EffectsGroup.d.ts.map +1 -0
- package/dist/components/EffectsGroup.js +8 -0
- package/dist/components/EnvironmentManager.d.ts +9 -0
- package/dist/components/EnvironmentManager.d.ts.map +1 -0
- package/dist/components/EnvironmentManager.js +47 -0
- package/dist/components/Frame.d.ts +26 -0
- package/dist/components/Frame.d.ts.map +1 -0
- package/dist/components/Frame.js +50 -0
- package/dist/components/FrameGeometry.d.ts +10 -0
- package/dist/components/FrameGeometry.d.ts.map +1 -0
- package/dist/components/FrameGeometry.js +17 -0
- package/dist/components/FrameImage.d.ts +14 -0
- package/dist/components/FrameImage.d.ts.map +1 -0
- package/dist/components/FrameImage.js +15 -0
- package/dist/components/Galaxy.d.ts +8 -0
- package/dist/components/Galaxy.d.ts.map +1 -0
- package/dist/components/Galaxy.js +9 -0
- package/dist/components/GalleryLayout.d.ts +10 -0
- package/dist/components/GalleryLayout.d.ts.map +1 -0
- package/dist/components/GalleryLayout.js +18 -0
- package/dist/components/GridHelper.d.ts +23 -0
- package/dist/components/GridHelper.d.ts.map +1 -0
- package/dist/components/GridHelper.js +38 -0
- package/dist/components/ImageGeometry.d.ts +14 -0
- package/dist/components/ImageGeometry.d.ts.map +1 -0
- package/dist/components/ImageGeometry.js +62 -0
- package/dist/components/Lensflare.d.ts +12 -0
- package/dist/components/Lensflare.d.ts.map +1 -0
- package/dist/components/Lensflare.js +66 -0
- package/dist/components/Letter.d.ts +20 -0
- package/dist/components/Letter.d.ts.map +1 -0
- package/dist/components/Letter.js +83 -0
- package/dist/components/Letters.d.ts +16 -0
- package/dist/components/Letters.d.ts.map +1 -0
- package/dist/components/Letters.js +18 -0
- package/dist/components/LightsManager.d.ts +9 -0
- package/dist/components/LightsManager.d.ts.map +1 -0
- package/dist/components/LightsManager.js +121 -0
- package/dist/components/Lines.d.ts +9 -0
- package/dist/components/Lines.d.ts.map +1 -0
- package/dist/components/Lines.js +19 -0
- package/dist/components/LoadingIndicator.d.ts +10 -0
- package/dist/components/LoadingIndicator.d.ts.map +1 -0
- package/dist/components/LoadingIndicator.js +143 -0
- package/dist/components/MaterialLibrary.d.ts +9 -0
- package/dist/components/MaterialLibrary.d.ts.map +1 -0
- package/dist/components/MaterialLibrary.js +57 -0
- package/dist/components/Moon.d.ts +13 -0
- package/dist/components/Moon.d.ts.map +1 -0
- package/dist/components/Moon.js +52 -0
- package/dist/components/ObjectNode.d.ts +11 -0
- package/dist/components/ObjectNode.d.ts.map +1 -0
- package/dist/components/ObjectNode.js +61 -0
- package/dist/components/ObjectsRenderer.d.ts +11 -0
- package/dist/components/ObjectsRenderer.d.ts.map +1 -0
- package/dist/components/ObjectsRenderer.js +19 -0
- package/dist/components/Ocean.d.ts +8 -0
- package/dist/components/Ocean.d.ts.map +1 -0
- package/dist/components/Ocean.js +111 -0
- package/dist/components/ParticlesR3f.d.ts +16 -0
- package/dist/components/ParticlesR3f.d.ts.map +1 -0
- package/dist/components/ParticlesR3f.js +66 -0
- package/dist/components/Path.d.ts +13 -0
- package/dist/components/Path.d.ts.map +1 -0
- package/dist/components/Path.js +41 -0
- package/dist/components/PathGeometry.d.ts +11 -0
- package/dist/components/PathGeometry.d.ts.map +1 -0
- package/dist/components/PathGeometry.js +109 -0
- package/dist/components/PathRenderer.d.ts +14 -0
- package/dist/components/PathRenderer.d.ts.map +1 -0
- package/dist/components/PathRenderer.js +33 -0
- package/dist/components/ProductionScene.d.ts +29 -0
- package/dist/components/ProductionScene.d.ts.map +1 -0
- package/dist/components/ProductionScene.js +18 -0
- package/dist/components/ProjectLoader.d.ts +14 -0
- package/dist/components/ProjectLoader.d.ts.map +1 -0
- package/dist/components/ProjectLoader.js +76 -0
- package/dist/components/Rain.d.ts +8 -0
- package/dist/components/Rain.d.ts.map +1 -0
- package/dist/components/Rain.js +133 -0
- package/dist/components/SceneBuilder.d.ts +5 -0
- package/dist/components/SceneBuilder.d.ts.map +1 -0
- package/dist/components/SceneBuilder.js +104 -0
- package/dist/components/SceneFog.d.ts +8 -0
- package/dist/components/SceneFog.d.ts.map +1 -0
- package/dist/components/SceneFog.js +19 -0
- package/dist/components/ShootingStar.d.ts +16 -0
- package/dist/components/ShootingStar.d.ts.map +1 -0
- package/dist/components/ShootingStar.js +92 -0
- package/dist/components/ShootingStars.d.ts +8 -0
- package/dist/components/ShootingStars.d.ts.map +1 -0
- package/dist/components/ShootingStars.js +40 -0
- package/dist/components/SkyController.d.ts +10 -0
- package/dist/components/SkyController.d.ts.map +1 -0
- package/dist/components/SkyController.js +159 -0
- package/dist/components/SkyMesh.d.ts +11 -0
- package/dist/components/SkyMesh.d.ts.map +1 -0
- package/dist/components/SkyMesh.js +36 -0
- package/dist/components/SkySystem.d.ts +34 -0
- package/dist/components/SkySystem.d.ts.map +1 -0
- package/dist/components/SkySystem.js +47 -0
- package/dist/components/Skybox.d.ts +12 -0
- package/dist/components/Skybox.d.ts.map +1 -0
- package/dist/components/Skybox.js +79 -0
- package/dist/components/Stars.d.ts +14 -0
- package/dist/components/Stars.d.ts.map +1 -0
- package/dist/components/Stars.js +165 -0
- package/dist/components/SunLight.d.ts +15 -0
- package/dist/components/SunLight.d.ts.map +1 -0
- package/dist/components/SunLight.js +57 -0
- package/dist/components/Text2D.d.ts +9 -0
- package/dist/components/Text2D.d.ts.map +1 -0
- package/dist/components/Text2D.js +56 -0
- package/dist/components/Text3D.d.ts +10 -0
- package/dist/components/Text3D.d.ts.map +1 -0
- package/dist/components/Text3D.js +8 -0
- package/dist/components/effects/AuraEffect.d.ts +10 -0
- package/dist/components/effects/AuraEffect.d.ts.map +1 -0
- package/dist/components/effects/AuraEffect.js +127 -0
- package/dist/components/effects/AuroraEffect.d.ts +10 -0
- package/dist/components/effects/AuroraEffect.d.ts.map +1 -0
- package/dist/components/effects/AuroraEffect.js +112 -0
- package/dist/components/effects/BlackHoleEffect.d.ts +10 -0
- package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -0
- package/dist/components/effects/BlackHoleEffect.js +193 -0
- package/dist/components/effects/ConstellationEffect.d.ts +10 -0
- package/dist/components/effects/ConstellationEffect.d.ts.map +1 -0
- package/dist/components/effects/ConstellationEffect.js +189 -0
- package/dist/components/effects/DataStreamEffect.d.ts +10 -0
- package/dist/components/effects/DataStreamEffect.d.ts.map +1 -0
- package/dist/components/effects/DataStreamEffect.js +138 -0
- package/dist/components/effects/DnaHelixEffect.d.ts +10 -0
- package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -0
- package/dist/components/effects/DnaHelixEffect.js +311 -0
- package/dist/components/effects/FireEffect.d.ts +10 -0
- package/dist/components/effects/FireEffect.d.ts.map +1 -0
- package/dist/components/effects/FireEffect.js +194 -0
- package/dist/components/effects/ForcefieldEffect.d.ts +10 -0
- package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -0
- package/dist/components/effects/ForcefieldEffect.js +132 -0
- package/dist/components/effects/HologramEffect.d.ts +10 -0
- package/dist/components/effects/HologramEffect.d.ts.map +1 -0
- package/dist/components/effects/HologramEffect.js +143 -0
- package/dist/components/effects/IceCrystalsEffect.d.ts +10 -0
- package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -0
- package/dist/components/effects/IceCrystalsEffect.js +190 -0
- package/dist/components/effects/LightningEffect.d.ts +10 -0
- package/dist/components/effects/LightningEffect.d.ts.map +1 -0
- package/dist/components/effects/LightningEffect.js +240 -0
- package/dist/components/effects/MoleculesEffect.d.ts +10 -0
- package/dist/components/effects/MoleculesEffect.d.ts.map +1 -0
- package/dist/components/effects/MoleculesEffect.js +179 -0
- package/dist/components/effects/NeuralNetworkEffect.d.ts +10 -0
- package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -0
- package/dist/components/effects/NeuralNetworkEffect.js +188 -0
- package/dist/components/effects/OrbEffect.d.ts +10 -0
- package/dist/components/effects/OrbEffect.d.ts.map +1 -0
- package/dist/components/effects/OrbEffect.js +291 -0
- package/dist/components/effects/PortalEffect.d.ts +10 -0
- package/dist/components/effects/PortalEffect.d.ts.map +1 -0
- package/dist/components/effects/PortalEffect.js +191 -0
- package/dist/components/effects/ShockwaveEffect.d.ts +10 -0
- package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -0
- package/dist/components/effects/ShockwaveEffect.js +159 -0
- package/dist/components/effects/SmokePlumeEffect.d.ts +10 -0
- package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -0
- package/dist/components/effects/SmokePlumeEffect.js +141 -0
- package/dist/components/effects/SmokeRingEffect.d.ts +10 -0
- package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -0
- package/dist/components/effects/SmokeRingEffect.js +158 -0
- package/dist/components/effects/VolumetricFogEffect.d.ts +10 -0
- package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -0
- package/dist/components/effects/VolumetricFogEffect.js +111 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useAnimationEvents.d.ts +10 -0
- package/dist/hooks/useAnimationEvents.d.ts.map +1 -0
- package/dist/hooks/useAnimationEvents.js +28 -0
- package/dist/hooks/useCameraAnimation.d.ts +35 -0
- package/dist/hooks/useCameraAnimation.d.ts.map +1 -0
- package/dist/hooks/useCameraAnimation.js +268 -0
- package/dist/hooks/useContinuousEffects.d.ts +15 -0
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -0
- package/dist/hooks/useContinuousEffects.js +173 -0
- package/dist/hooks/useCubeCamera.d.ts +19 -0
- package/dist/hooks/useCubeCamera.d.ts.map +1 -0
- package/dist/hooks/useCubeCamera.js +73 -0
- package/dist/hooks/useEnvironmentEffects.d.ts +12 -0
- package/dist/hooks/useEnvironmentEffects.d.ts.map +1 -0
- package/dist/hooks/useEnvironmentEffects.js +22 -0
- package/dist/hooks/useFrameEffects.d.ts +6 -0
- package/dist/hooks/useFrameEffects.d.ts.map +1 -0
- package/dist/hooks/useFrameEffects.js +19 -0
- package/dist/hooks/useInteractionEffects.d.ts +11 -0
- package/dist/hooks/useInteractionEffects.d.ts.map +1 -0
- package/dist/hooks/useInteractionEffects.js +35 -0
- package/dist/hooks/useKey.d.ts +26 -0
- package/dist/hooks/useKey.d.ts.map +1 -0
- package/dist/hooks/useKey.js +73 -0
- package/dist/hooks/useLightHandlers.d.ts +14 -0
- package/dist/hooks/useLightHandlers.d.ts.map +1 -0
- package/dist/hooks/useLightHandlers.js +116 -0
- package/dist/hooks/useMaterialApplication.d.ts +9 -0
- package/dist/hooks/useMaterialApplication.d.ts.map +1 -0
- package/dist/hooks/useMaterialApplication.js +113 -0
- package/dist/hooks/useMaterialOptions.d.ts +13 -0
- package/dist/hooks/useMaterialOptions.d.ts.map +1 -0
- package/dist/hooks/useMaterialOptions.js +110 -0
- package/dist/hooks/useMaterialUniforms.d.ts +18 -0
- package/dist/hooks/useMaterialUniforms.d.ts.map +1 -0
- package/dist/hooks/useMaterialUniforms.js +96 -0
- package/dist/hooks/useMeshController.d.ts +3 -0
- package/dist/hooks/useMeshController.d.ts.map +1 -0
- package/dist/hooks/useMeshController.js +152 -0
- package/dist/hooks/useMouseHandlers.d.ts +8 -0
- package/dist/hooks/useMouseHandlers.d.ts.map +1 -0
- package/dist/hooks/useMouseHandlers.js +47 -0
- package/dist/hooks/useObjectAnimation.d.ts +13 -0
- package/dist/hooks/useObjectAnimation.d.ts.map +1 -0
- package/dist/hooks/useObjectAnimation.js +11 -0
- package/dist/hooks/useObjectEdges.d.ts +4 -0
- package/dist/hooks/useObjectEdges.d.ts.map +1 -0
- package/dist/hooks/useObjectEdges.js +199 -0
- package/dist/hooks/useOrbitControls.d.ts +7 -0
- package/dist/hooks/useOrbitControls.d.ts.map +1 -0
- package/dist/hooks/useOrbitControls.js +9 -0
- package/dist/hooks/useParticlePositions.d.ts +19 -0
- package/dist/hooks/useParticlePositions.d.ts.map +1 -0
- package/dist/hooks/useParticlePositions.js +56 -0
- package/dist/hooks/useParticlesColors.d.ts +14 -0
- package/dist/hooks/useParticlesColors.d.ts.map +1 -0
- package/dist/hooks/useParticlesColors.js +27 -0
- package/dist/hooks/useParticlesTextures.d.ts +10 -0
- package/dist/hooks/useParticlesTextures.d.ts.map +1 -0
- package/dist/hooks/useParticlesTextures.js +23 -0
- package/dist/hooks/usePathAnimation.d.ts +26 -0
- package/dist/hooks/usePathAnimation.d.ts.map +1 -0
- package/dist/hooks/usePathAnimation.js +120 -0
- package/dist/hooks/useSkyAnimation.d.ts +14 -0
- package/dist/hooks/useSkyAnimation.d.ts.map +1 -0
- package/dist/hooks/useSkyAnimation.js +46 -0
- package/dist/hooks/useSkySystem.d.ts +26 -0
- package/dist/hooks/useSkySystem.d.ts.map +1 -0
- package/dist/hooks/useSkySystem.js +57 -0
- package/dist/hooks/useSkyUniforms.d.ts +18 -0
- package/dist/hooks/useSkyUniforms.d.ts.map +1 -0
- package/dist/hooks/useSkyUniforms.js +59 -0
- package/dist/hooks/useTransformControls.d.ts +6 -0
- package/dist/hooks/useTransformControls.d.ts.map +1 -0
- package/dist/hooks/useTransformControls.js +111 -0
- package/dist/hooks/useWaterEnvironment.d.ts +5 -0
- package/dist/hooks/useWaterEnvironment.d.ts.map +1 -0
- package/dist/hooks/useWaterEnvironment.js +27 -0
- package/dist/hooks/useWaterReflections.d.ts +17 -0
- package/dist/hooks/useWaterReflections.d.ts.map +1 -0
- package/dist/hooks/useWaterReflections.js +77 -0
- package/dist/index.d.ts +140 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/services/AnimationsManager.d.ts +33 -0
- package/dist/services/AnimationsManager.d.ts.map +1 -0
- package/dist/services/AnimationsManager.js +58 -0
- package/dist/services/FontManager.d.ts +32 -0
- package/dist/services/FontManager.d.ts.map +1 -0
- package/dist/services/FontManager.js +76 -0
- package/dist/services/TexturesManager.d.ts +17 -0
- package/dist/services/TexturesManager.d.ts.map +1 -0
- package/dist/services/TexturesManager.js +48 -0
- package/dist/shaders/RainMaterial.d.ts +34 -0
- package/dist/shaders/RainMaterial.d.ts.map +1 -0
- package/dist/shaders/RainMaterial.js +56 -0
- package/dist/shaders/ShaderEffectsMaterial.d.ts +279 -0
- package/dist/shaders/ShaderEffectsMaterial.d.ts.map +1 -0
- package/dist/shaders/ShaderEffectsMaterial.js +257 -0
- package/dist/shaders/ShootingStarMaterial.d.ts +14 -0
- package/dist/shaders/ShootingStarMaterial.d.ts.map +1 -0
- package/dist/shaders/ShootingStarMaterial.js +33 -0
- package/dist/shaders/SkyboxMaterial.d.ts +38 -0
- package/dist/shaders/SkyboxMaterial.d.ts.map +1 -0
- package/dist/shaders/SkyboxMaterial.js +57 -0
- package/dist/shaders/effects/EffectsVertexFunctions.glsl.d.ts +2 -0
- package/dist/shaders/effects/EffectsVertexFunctions.glsl.d.ts.map +1 -0
- package/dist/shaders/effects/EffectsVertexFunctions.glsl.js +167 -0
- package/dist/utils/CameraSingleton.d.ts +35 -0
- package/dist/utils/CameraSingleton.d.ts.map +1 -0
- package/dist/utils/CameraSingleton.js +178 -0
- package/dist/utils/anchorUtils.d.ts +10 -0
- package/dist/utils/anchorUtils.d.ts.map +1 -0
- package/dist/utils/anchorUtils.js +13 -0
- package/dist/utils/frameAnimations.d.ts +49 -0
- package/dist/utils/frameAnimations.d.ts.map +1 -0
- package/dist/utils/frameAnimations.js +213 -0
- package/dist/utils/handleGenerativeEffectsAnimations.d.ts +5 -0
- package/dist/utils/handleGenerativeEffectsAnimations.d.ts.map +1 -0
- package/dist/utils/handleGenerativeEffectsAnimations.js +268 -0
- package/dist/utils/hasHoverAnimation.d.ts +3 -0
- package/dist/utils/hasHoverAnimation.d.ts.map +1 -0
- package/dist/utils/hasHoverAnimation.js +15 -0
- package/dist/utils/particleAnimations.d.ts +3 -0
- package/dist/utils/particleAnimations.d.ts.map +1 -0
- package/dist/utils/particleAnimations.js +17 -0
- package/dist/utils/sceneQuery.d.ts +9 -0
- package/dist/utils/sceneQuery.d.ts.map +1 -0
- package/dist/utils/sceneQuery.js +22 -0
- package/dist/utils/shaderUtils.d.ts +6 -0
- package/dist/utils/shaderUtils.d.ts.map +1 -0
- package/dist/utils/shaderUtils.js +145 -0
- package/dist/utils/textEffects.d.ts +31 -0
- package/dist/utils/textEffects.d.ts.map +1 -0
- package/dist/utils/textEffects.js +61 -0
- package/dist/utils/utils3d.d.ts +7 -0
- package/dist/utils/utils3d.d.ts.map +1 -0
- package/dist/utils/utils3d.js +34 -0
- package/package.json +43 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
import { useFrame } from '@react-three/fiber';
|
|
3
|
+
import { skySystemManager } from '../../../core/src/services/SkySystemManager';
|
|
4
|
+
export function useSkySystem(options) {
|
|
5
|
+
const { timeSettings, onTimeUpdate, onTimeOfDayChange, enabled = true } = options;
|
|
6
|
+
const previousTimeOfDayRef = useRef(null);
|
|
7
|
+
// Sync time settings to the manager whenever they change.
|
|
8
|
+
// This makes standalone usage (without a parent SkySystem) work correctly.
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
skySystemManager.setTimeSettings(timeSettings);
|
|
11
|
+
}, [timeSettings]);
|
|
12
|
+
// Manual time mode: respond immediately when timeOfDay changes
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (!enabled || !timeSettings.enabled || timeSettings.autoAnimate)
|
|
15
|
+
return;
|
|
16
|
+
const state = skySystemManager.getStateByTime(timeSettings.timeOfDay);
|
|
17
|
+
if (previousTimeOfDayRef.current !== null &&
|
|
18
|
+
previousTimeOfDayRef.current !== state.timeOfDay) {
|
|
19
|
+
onTimeOfDayChange?.(state.timeOfDay, state.elapsedTime);
|
|
20
|
+
}
|
|
21
|
+
previousTimeOfDayRef.current = state.timeOfDay;
|
|
22
|
+
onTimeUpdate?.(state);
|
|
23
|
+
}, [timeSettings.timeOfDay, timeSettings.enabled, timeSettings.autoAnimate, enabled, onTimeUpdate, onTimeOfDayChange]);
|
|
24
|
+
// Auto-animate mode: read state every frame (SkySystem or user is responsible for ticking)
|
|
25
|
+
useFrame(() => {
|
|
26
|
+
if (!enabled || !timeSettings.enabled || !timeSettings.autoAnimate)
|
|
27
|
+
return;
|
|
28
|
+
const state = skySystemManager.getState();
|
|
29
|
+
if (previousTimeOfDayRef.current !== null &&
|
|
30
|
+
previousTimeOfDayRef.current !== state.timeOfDay) {
|
|
31
|
+
onTimeOfDayChange?.(state.timeOfDay, state.elapsedTime);
|
|
32
|
+
}
|
|
33
|
+
previousTimeOfDayRef.current = state.timeOfDay;
|
|
34
|
+
onTimeUpdate?.(state);
|
|
35
|
+
});
|
|
36
|
+
const setTime = useCallback((hours, minutes = 0) => {
|
|
37
|
+
skySystemManager.setTime(hours, minutes);
|
|
38
|
+
}, []);
|
|
39
|
+
const getTime = useCallback(() => skySystemManager.getTime(), []);
|
|
40
|
+
const getTimeOfDay = useCallback(() => skySystemManager.getTimeOfDay(), []);
|
|
41
|
+
const getSunDirection = useCallback(() => skySystemManager.getSunDirection(), []);
|
|
42
|
+
const state = skySystemManager.getState();
|
|
43
|
+
return {
|
|
44
|
+
timeInHours: state.timeInHours,
|
|
45
|
+
normalizedTime: state.normalizedTime,
|
|
46
|
+
isDaytime: state.isDaytime,
|
|
47
|
+
timeOfDay: state.timeOfDay,
|
|
48
|
+
sunElevation: state.sunElevation,
|
|
49
|
+
sunAzimuth: state.sunAzimuth,
|
|
50
|
+
sunDirection: state.sunDirection,
|
|
51
|
+
setTime,
|
|
52
|
+
getTime,
|
|
53
|
+
getTimeOfDay,
|
|
54
|
+
getSunDirection,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export default useSkySystem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
import type { SkySettings } from '@ntalmagor/3drize-core';
|
|
3
|
+
export declare function useSkyUniforms(): {
|
|
4
|
+
updateUniforms: (settings: SkySettings) => void;
|
|
5
|
+
getCurrentValues: () => {
|
|
6
|
+
elevation: number;
|
|
7
|
+
azimuth: number;
|
|
8
|
+
turbidity: any;
|
|
9
|
+
rayleigh: any;
|
|
10
|
+
mieCoefficient: any;
|
|
11
|
+
mieDirectionalG: any;
|
|
12
|
+
} | null;
|
|
13
|
+
getElevationAndAzimuth: (sunPosition: Vector3) => {
|
|
14
|
+
elevation: number;
|
|
15
|
+
azimuth: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useSkyUniforms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkyUniforms.d.ts","sourceRoot":"","sources":["../../src/hooks/useSkyUniforms.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,wBAAgB,cAAc;+BA2BkB,WAAW;;;;;;;;;0CAXA,OAAO;;;;EAyCjE"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useRef, useCallback } from 'react';
|
|
2
|
+
import { useThree } from '@react-three/fiber';
|
|
3
|
+
import { createSunPosition } from '../utils/utils3d';
|
|
4
|
+
export function useSkyUniforms() {
|
|
5
|
+
const { scene } = useThree();
|
|
6
|
+
const skyMeshRef = useRef(null);
|
|
7
|
+
const getSkyRef = useCallback(() => {
|
|
8
|
+
if (skyMeshRef.current)
|
|
9
|
+
return skyMeshRef.current;
|
|
10
|
+
let found = null;
|
|
11
|
+
scene.traverse((obj) => {
|
|
12
|
+
if (!found && obj.userData?.id === '3drise-sky') {
|
|
13
|
+
found = obj;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
skyMeshRef.current = found;
|
|
17
|
+
return found;
|
|
18
|
+
}, [scene]);
|
|
19
|
+
const getElevationAndAzimuth = useCallback((sunPosition) => {
|
|
20
|
+
const { x, y, z } = sunPosition;
|
|
21
|
+
const r = Math.sqrt(x * x + y * y + z * z);
|
|
22
|
+
const phi = Math.acos(y / r);
|
|
23
|
+
const theta = Math.atan2(z, x);
|
|
24
|
+
return {
|
|
25
|
+
elevation: 90 - phi * (180 / Math.PI),
|
|
26
|
+
azimuth: theta * (180 / Math.PI),
|
|
27
|
+
};
|
|
28
|
+
}, []);
|
|
29
|
+
const updateUniforms = useCallback((settings) => {
|
|
30
|
+
const skyRef = getSkyRef();
|
|
31
|
+
if (!skyRef?.material)
|
|
32
|
+
return;
|
|
33
|
+
const uniforms = skyRef.material.uniforms;
|
|
34
|
+
if (!uniforms)
|
|
35
|
+
return;
|
|
36
|
+
uniforms.turbidity.value = settings.turbidity;
|
|
37
|
+
uniforms.rayleigh.value = settings.rayleigh;
|
|
38
|
+
uniforms.mieCoefficient.value = settings.mieCoefficient;
|
|
39
|
+
uniforms.mieDirectionalG.value = settings.mieDirectionalG;
|
|
40
|
+
const sunPosition = createSunPosition(settings.elevation, settings.azimuth);
|
|
41
|
+
uniforms.sunPosition.value.copy(sunPosition);
|
|
42
|
+
}, [getSkyRef]);
|
|
43
|
+
const getCurrentValues = useCallback(() => {
|
|
44
|
+
const skyRef = getSkyRef();
|
|
45
|
+
if (!skyRef?.material)
|
|
46
|
+
return null;
|
|
47
|
+
const uniforms = skyRef.material.uniforms;
|
|
48
|
+
if (!uniforms)
|
|
49
|
+
return null;
|
|
50
|
+
return {
|
|
51
|
+
turbidity: uniforms.turbidity.value,
|
|
52
|
+
rayleigh: uniforms.rayleigh.value,
|
|
53
|
+
mieCoefficient: uniforms.mieCoefficient.value,
|
|
54
|
+
mieDirectionalG: uniforms.mieDirectionalG.value,
|
|
55
|
+
...getElevationAndAzimuth(uniforms.sunPosition.value),
|
|
56
|
+
};
|
|
57
|
+
}, [getSkyRef, getElevationAndAzimuth]);
|
|
58
|
+
return { updateUniforms, getCurrentValues, getElevationAndAzimuth };
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransformControls.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransformControls.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;oCASsB,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI;CAwG5E,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { useCallback, useRef } from "react";
|
|
2
|
+
import { MathUtils } from "three";
|
|
3
|
+
import { useKeyUpDown } from "./useKey";
|
|
4
|
+
export const useTransformControls = () => {
|
|
5
|
+
const controllersRef = useRef(new Map());
|
|
6
|
+
// Helper function to get all controllers
|
|
7
|
+
const getControllers = useCallback(() => {
|
|
8
|
+
return Array.from(controllersRef.current.values());
|
|
9
|
+
}, []);
|
|
10
|
+
// Helper function to apply action to all controllers
|
|
11
|
+
const applyToAllControllers = useCallback((action) => {
|
|
12
|
+
const controllers = getControllers();
|
|
13
|
+
controllers.forEach(control => {
|
|
14
|
+
if (control) {
|
|
15
|
+
action(control);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, [getControllers]);
|
|
19
|
+
// Key down handlers
|
|
20
|
+
const keyDownHandlers = {
|
|
21
|
+
'q': () => {
|
|
22
|
+
applyToAllControllers(control => {
|
|
23
|
+
control.setSpace(control.space === 'local' ? 'world' : 'local');
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
'Shift': () => {
|
|
27
|
+
applyToAllControllers(control => {
|
|
28
|
+
control.setTranslationSnap(1);
|
|
29
|
+
control.setRotationSnap(MathUtils.degToRad(15));
|
|
30
|
+
control.setScaleSnap(0.25);
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
'w': () => {
|
|
34
|
+
applyToAllControllers(control => {
|
|
35
|
+
control.setMode('translate');
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
'e': () => {
|
|
39
|
+
applyToAllControllers(control => {
|
|
40
|
+
control.setMode('rotate');
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
'r': () => {
|
|
44
|
+
applyToAllControllers(control => {
|
|
45
|
+
control.setMode('scale');
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
'+': () => {
|
|
49
|
+
applyToAllControllers(control => {
|
|
50
|
+
control.setSize(control.size + 0.1);
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
'=': () => {
|
|
54
|
+
applyToAllControllers(control => {
|
|
55
|
+
control.setSize(control.size + 0.1);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
'-': () => {
|
|
59
|
+
applyToAllControllers(control => {
|
|
60
|
+
control.setSize(Math.max(control.size - 0.1, 0.1));
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
'_': () => {
|
|
64
|
+
applyToAllControllers(control => {
|
|
65
|
+
control.setSize(Math.max(control.size - 0.1, 0.1));
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
'x': () => {
|
|
69
|
+
applyToAllControllers(control => {
|
|
70
|
+
control.showX = !control.showX;
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
'y': () => {
|
|
74
|
+
applyToAllControllers(control => {
|
|
75
|
+
control.showY = !control.showY;
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
'z': () => {
|
|
79
|
+
applyToAllControllers(control => {
|
|
80
|
+
control.showZ = !control.showZ;
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
' ': () => {
|
|
84
|
+
applyToAllControllers(control => {
|
|
85
|
+
control.enabled = !control.enabled;
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
'Escape': () => {
|
|
89
|
+
applyToAllControllers(control => {
|
|
90
|
+
control.reset();
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
// Key up handlers
|
|
95
|
+
const keyUpHandlers = {
|
|
96
|
+
'Shift': () => {
|
|
97
|
+
applyToAllControllers(control => {
|
|
98
|
+
control.setTranslationSnap(null);
|
|
99
|
+
control.setRotationSnap(null);
|
|
100
|
+
control.setScaleSnap(null);
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
// Use the custom hook for keyboard handling
|
|
105
|
+
useKeyUpDown(keyDownHandlers, keyUpHandlers);
|
|
106
|
+
return {
|
|
107
|
+
controllersRef,
|
|
108
|
+
getControllers,
|
|
109
|
+
applyToAllControllers
|
|
110
|
+
};
|
|
111
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWaterEnvironment.d.ts","sourceRoot":"","sources":["../../src/hooks/useWaterEnvironment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAElC,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;;EA6BzE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { useThree, useFrame } from '@react-three/fiber';
|
|
3
|
+
export function useWaterEnvironment(waterRef) {
|
|
4
|
+
const { scene } = useThree();
|
|
5
|
+
const previousEnvironment = useRef(null);
|
|
6
|
+
useFrame(() => {
|
|
7
|
+
if (!waterRef.current?.material || !scene)
|
|
8
|
+
return;
|
|
9
|
+
const material = waterRef.current.material;
|
|
10
|
+
if (scene.environment !== previousEnvironment.current) {
|
|
11
|
+
previousEnvironment.current = scene.environment;
|
|
12
|
+
if (material.uniforms) {
|
|
13
|
+
const currentIntensity = material.uniforms.envMapIntensity?.value || 0;
|
|
14
|
+
if (currentIntensity < 1.0) {
|
|
15
|
+
if (material.uniforms.envMap) {
|
|
16
|
+
material.uniforms.envMap.value = scene.environment;
|
|
17
|
+
}
|
|
18
|
+
if (material.uniforms.envMapIntensity) {
|
|
19
|
+
material.uniforms.envMapIntensity.value = scene.environment ? 0.5 : 0.0;
|
|
20
|
+
}
|
|
21
|
+
material.needsUpdate = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return { environment: scene.environment };
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
interface UseWaterReflectionsOptions {
|
|
3
|
+
waterPosition?: THREE.Vector3;
|
|
4
|
+
resolution?: number;
|
|
5
|
+
updateFrequency?: number;
|
|
6
|
+
near?: number;
|
|
7
|
+
far?: number;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const useWaterReflections: (waterRef: React.RefObject<THREE.Mesh | null>, options?: UseWaterReflectionsOptions) => {
|
|
11
|
+
cubeRenderTarget: THREE.WebGLCubeRenderTarget | null;
|
|
12
|
+
cubeCamera: THREE.CubeCamera | null;
|
|
13
|
+
updateReflections: () => void;
|
|
14
|
+
isInitialized: boolean;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useWaterReflections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWaterReflections.d.ts","sourceRoot":"","sources":["../../src/hooks/useWaterReflections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,UAAU,0BAA0B;IAClC,aAAa,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,GAC9B,UAAU,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,EAC5C,UAAS,0BAA+B;;;;;CAwFzC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
import { useThree, useFrame } from '@react-three/fiber';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
export const useWaterReflections = (waterRef, options = {}) => {
|
|
5
|
+
const { scene, gl: renderer } = useThree();
|
|
6
|
+
const { waterPosition = new THREE.Vector3(0, -1, 0), resolution = 512, updateFrequency = 1, near = 0.1, far = 1000, enabled = true, } = options;
|
|
7
|
+
const cubeRenderTargetRef = useRef(null);
|
|
8
|
+
const cubeCameraRef = useRef(null);
|
|
9
|
+
const frameCountRef = useRef(0);
|
|
10
|
+
const initializeReflectionSystem = useCallback(() => {
|
|
11
|
+
if (!renderer)
|
|
12
|
+
return;
|
|
13
|
+
cubeRenderTargetRef.current = new THREE.WebGLCubeRenderTarget(resolution, {
|
|
14
|
+
format: THREE.RGBAFormat,
|
|
15
|
+
generateMipmaps: true,
|
|
16
|
+
minFilter: THREE.LinearMipmapLinearFilter,
|
|
17
|
+
magFilter: THREE.LinearFilter,
|
|
18
|
+
type: THREE.UnsignedByteType,
|
|
19
|
+
});
|
|
20
|
+
cubeCameraRef.current = new THREE.CubeCamera(near, far, cubeRenderTargetRef.current);
|
|
21
|
+
cubeCameraRef.current.position.copy(waterPosition);
|
|
22
|
+
}, [renderer, resolution, waterPosition, near, far]);
|
|
23
|
+
const updateReflections = useCallback(() => {
|
|
24
|
+
if (!enabled || !cubeCameraRef.current || !cubeRenderTargetRef.current || !renderer || !scene)
|
|
25
|
+
return;
|
|
26
|
+
cubeCameraRef.current.position.copy(waterPosition);
|
|
27
|
+
const waterMesh = waterRef.current;
|
|
28
|
+
const originalVisible = waterMesh?.visible;
|
|
29
|
+
if (waterMesh)
|
|
30
|
+
waterMesh.visible = false;
|
|
31
|
+
try {
|
|
32
|
+
const originalClearColor = renderer.getClearColor(new THREE.Color());
|
|
33
|
+
const originalClearAlpha = renderer.getClearAlpha();
|
|
34
|
+
renderer.setClearColor(0x87ceeb, 1);
|
|
35
|
+
cubeCameraRef.current.update(renderer, scene);
|
|
36
|
+
renderer.setClearColor(originalClearColor, originalClearAlpha);
|
|
37
|
+
if (waterMesh?.material) {
|
|
38
|
+
const material = waterMesh.material;
|
|
39
|
+
if (material.uniforms?.envMap) {
|
|
40
|
+
material.uniforms.envMap.value = cubeRenderTargetRef.current.texture;
|
|
41
|
+
material.uniforms.envMapIntensity.value = 1.0;
|
|
42
|
+
material.needsUpdate = true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error('Error updating water reflections:', error);
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
if (waterMesh && typeof originalVisible === 'boolean') {
|
|
51
|
+
waterMesh.visible = originalVisible;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}, [waterPosition, waterRef, renderer, scene, enabled]);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (enabled)
|
|
57
|
+
initializeReflectionSystem();
|
|
58
|
+
return () => {
|
|
59
|
+
cubeRenderTargetRef.current?.dispose();
|
|
60
|
+
cubeCameraRef.current?.renderTarget?.dispose();
|
|
61
|
+
};
|
|
62
|
+
}, [initializeReflectionSystem, enabled]);
|
|
63
|
+
useFrame(() => {
|
|
64
|
+
if (!enabled)
|
|
65
|
+
return;
|
|
66
|
+
frameCountRef.current++;
|
|
67
|
+
if (frameCountRef.current % updateFrequency === 0) {
|
|
68
|
+
updateReflections();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
cubeRenderTarget: cubeRenderTargetRef.current,
|
|
73
|
+
cubeCamera: cubeCameraRef.current,
|
|
74
|
+
updateReflections,
|
|
75
|
+
isInitialized: !!cubeRenderTargetRef.current && !!cubeCameraRef.current,
|
|
76
|
+
};
|
|
77
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export { default as animationsManager } from '../../core/src/services/AnimationsManager';
|
|
2
|
+
export type { AnimationEvent, AnimationEventType } from '../../core/src/services/AnimationsManager';
|
|
3
|
+
export { fontManager } from '../../core/src/services/FontManager';
|
|
4
|
+
export type { FontInfo } from '../../core/src/services/FontManager';
|
|
5
|
+
export { AnimatedObject, default as AnimatedObjectDefault } from './components/AnimatedObject';
|
|
6
|
+
export type { AnimatedObjectProps } from './components/AnimatedObject';
|
|
7
|
+
export { CameraController, default as CameraControllerDefault } from './components/CameraController';
|
|
8
|
+
export { default as CreatedObject } from './components/CreatedObject';
|
|
9
|
+
export { default as CustomPrimitive } from './components/CustomPrimitive';
|
|
10
|
+
export { default as EffectsGenerator } from './components/EffectsGenerator';
|
|
11
|
+
export type { EffectsGeneratorProps } from './components/EffectsGenerator';
|
|
12
|
+
export { default as EffectsGroup } from './components/EffectsGroup';
|
|
13
|
+
export { default as Frame } from './components/Frame';
|
|
14
|
+
export type { FrameProps, FrameShapeType } from './components/Frame';
|
|
15
|
+
export { FrameGeometry } from './components/FrameGeometry';
|
|
16
|
+
export { FrameImage } from './components/FrameImage';
|
|
17
|
+
export { default as GalleryLayout } from './components/GalleryLayout';
|
|
18
|
+
export type { GalleryLayoutProps } from './components/GalleryLayout';
|
|
19
|
+
export { default as GridHelper } from './components/GridHelper';
|
|
20
|
+
export type { GridHelperProps } from './components/GridHelper';
|
|
21
|
+
export { ImageGeometry } from './components/ImageGeometry';
|
|
22
|
+
export type { ImageGeometryProps } from './components/ImageGeometry';
|
|
23
|
+
export { default as Letter } from './components/Letter';
|
|
24
|
+
export type { LetterData, LetterProps } from './components/Letter';
|
|
25
|
+
export { default as Letters } from './components/Letters';
|
|
26
|
+
export type { LettersProps } from './components/Letters';
|
|
27
|
+
export { default as LightsManager } from './components/LightsManager';
|
|
28
|
+
export type { LightsManagerProps } from './components/LightsManager';
|
|
29
|
+
export { default as Lines } from './components/Lines';
|
|
30
|
+
export { default as MaterialLibrary } from './components/MaterialLibrary';
|
|
31
|
+
export type { MaterialLibraryProps } from './components/MaterialLibrary';
|
|
32
|
+
export { default as ObjectNode } from './components/ObjectNode';
|
|
33
|
+
export { default as ObjectsRenderer } from './components/ObjectsRenderer';
|
|
34
|
+
export { default as ParticlesR3f } from './components/ParticlesR3f';
|
|
35
|
+
export { default as Skybox } from './components/Skybox';
|
|
36
|
+
export type { SkyboxProps } from './components/Skybox';
|
|
37
|
+
export { default as SkyMesh } from './components/SkyMesh';
|
|
38
|
+
export type { SkyMeshProps } from './components/SkyMesh';
|
|
39
|
+
export { default as Moon } from './components/Moon';
|
|
40
|
+
export type { MoonProps } from './components/Moon';
|
|
41
|
+
export { default as SkyController } from './components/SkyController';
|
|
42
|
+
export type { SkyControllerProps } from './components/SkyController';
|
|
43
|
+
export { default as Lensflare, createFlareTexture } from './components/Lensflare';
|
|
44
|
+
export type { LensflareProps } from './components/Lensflare';
|
|
45
|
+
export { default as SunLight } from './components/SunLight';
|
|
46
|
+
export type { SunLightProps } from './components/SunLight';
|
|
47
|
+
export { default as Clouds } from './components/Clouds';
|
|
48
|
+
export type { CloudsProps } from './components/Clouds';
|
|
49
|
+
export { default as Stars, generateStarsGeometry } from './components/Stars';
|
|
50
|
+
export type { StarsProps } from './components/Stars';
|
|
51
|
+
export { default as ShootingStar } from './components/ShootingStar';
|
|
52
|
+
export type { ShootingStarProps } from './components/ShootingStar';
|
|
53
|
+
export { default as ShootingStars } from './components/ShootingStars';
|
|
54
|
+
export type { ShootingStarsProps } from './components/ShootingStars';
|
|
55
|
+
export { default as Galaxy } from './components/Galaxy';
|
|
56
|
+
export type { GalaxyProps } from './components/Galaxy';
|
|
57
|
+
export { default as SkySystem } from './components/SkySystem';
|
|
58
|
+
export type { SkySystemProps, SkySystemRef } from './components/SkySystem';
|
|
59
|
+
export { default as Rain } from './components/Rain';
|
|
60
|
+
export type { RainProps } from './components/Rain';
|
|
61
|
+
export { default as SceneFog } from './components/SceneFog';
|
|
62
|
+
export type { SceneFogProps } from './components/SceneFog';
|
|
63
|
+
export { default as EnvironmentManager } from './components/EnvironmentManager';
|
|
64
|
+
export type { EnvironmentManagerProps } from './components/EnvironmentManager';
|
|
65
|
+
export { default as Ocean } from './components/Ocean';
|
|
66
|
+
export type { OceanProps } from './components/Ocean';
|
|
67
|
+
export { LoadingIndicator } from './components/LoadingIndicator';
|
|
68
|
+
export type { LoadingIndicatorProps } from './components/LoadingIndicator';
|
|
69
|
+
export { default as Path } from './components/Path';
|
|
70
|
+
export { default as PathGeometry } from './components/PathGeometry';
|
|
71
|
+
export { default as PathRenderer } from './components/PathRenderer';
|
|
72
|
+
export type { PathRendererProps } from './components/PathRenderer';
|
|
73
|
+
export { default as Text2D } from './components/Text2D';
|
|
74
|
+
export type { Text2DProps } from './components/Text2D';
|
|
75
|
+
export { default as Text3D } from './components/Text3D';
|
|
76
|
+
export type { Text3DProps } from './components/Text3D';
|
|
77
|
+
export { default as SceneBuilder } from './components/SceneBuilder';
|
|
78
|
+
export { default as ProjectLoader } from './components/ProjectLoader';
|
|
79
|
+
export { default as AuraEffect } from './components/effects/AuraEffect';
|
|
80
|
+
export { default as AuroraEffect } from './components/effects/AuroraEffect';
|
|
81
|
+
export { default as BlackHoleEffect } from './components/effects/BlackHoleEffect';
|
|
82
|
+
export { default as ConstellationEffect } from './components/effects/ConstellationEffect';
|
|
83
|
+
export { default as DataStreamEffect } from './components/effects/DataStreamEffect';
|
|
84
|
+
export { default as DnaHelixEffect } from './components/effects/DnaHelixEffect';
|
|
85
|
+
export { default as FireEffect } from './components/effects/FireEffect';
|
|
86
|
+
export { default as ForcefieldEffect } from './components/effects/ForcefieldEffect';
|
|
87
|
+
export { default as HologramEffect } from './components/effects/HologramEffect';
|
|
88
|
+
export { default as IceCrystalsEffect } from './components/effects/IceCrystalsEffect';
|
|
89
|
+
export { default as LightningEffect } from './components/effects/LightningEffect';
|
|
90
|
+
export { default as MoleculesEffect } from './components/effects/MoleculesEffect';
|
|
91
|
+
export { default as NeuralNetworkEffect } from './components/effects/NeuralNetworkEffect';
|
|
92
|
+
export { default as OrbEffect } from './components/effects/OrbEffect';
|
|
93
|
+
export { default as PortalEffect } from './components/effects/PortalEffect';
|
|
94
|
+
export { default as ShockwaveEffect } from './components/effects/ShockwaveEffect';
|
|
95
|
+
export { default as SmokePlumeEffect } from './components/effects/SmokePlumeEffect';
|
|
96
|
+
export { default as SmokeRingEffect } from './components/effects/SmokeRingEffect';
|
|
97
|
+
export { default as VolumetricFogEffect } from './components/effects/VolumetricFogEffect';
|
|
98
|
+
export * from './hooks/useAnimationEvents';
|
|
99
|
+
export * from './hooks/useCameraAnimation';
|
|
100
|
+
export * from './hooks/useContinuousEffects';
|
|
101
|
+
export * from './hooks/useFrameEffects';
|
|
102
|
+
export * from './hooks/useInteractionEffects';
|
|
103
|
+
export * from './hooks/useKey';
|
|
104
|
+
export * from './hooks/useLightHandlers';
|
|
105
|
+
export * from './hooks/useMaterialApplication';
|
|
106
|
+
export * from './hooks/useMaterialOptions';
|
|
107
|
+
export * from './hooks/useMaterialUniforms';
|
|
108
|
+
export * from './hooks/useMouseHandlers';
|
|
109
|
+
export * from './hooks/useObjectAnimation';
|
|
110
|
+
export * from './hooks/useObjectEdges';
|
|
111
|
+
export * from './hooks/useParticlePositions';
|
|
112
|
+
export * from './hooks/useParticlesColors';
|
|
113
|
+
export * from './hooks/useParticlesTextures';
|
|
114
|
+
export * from './hooks/usePathAnimation';
|
|
115
|
+
export type { PathAnimationOptions as PathAnimationHookOptions } from './hooks/usePathAnimation';
|
|
116
|
+
export * from './hooks/useTransformControls';
|
|
117
|
+
export * from './hooks/useSkySystem';
|
|
118
|
+
export * from './hooks/useCubeCamera';
|
|
119
|
+
export * from './hooks/useEnvironmentEffects';
|
|
120
|
+
export * from './hooks/useSkyUniforms';
|
|
121
|
+
export * from './hooks/useSkyAnimation';
|
|
122
|
+
export * from './hooks/useMeshController';
|
|
123
|
+
export { useWaterEnvironment } from './hooks/useWaterEnvironment';
|
|
124
|
+
export { useWaterReflections } from './hooks/useWaterReflections';
|
|
125
|
+
export { cameraManager } from './utils/CameraSingleton';
|
|
126
|
+
export { update3driseShaderUniforms } from './utils/shaderUtils';
|
|
127
|
+
export { applyAnchorSettings, createCurves, createSunPosition, randomRange, } from './utils/utils3d';
|
|
128
|
+
export { applyAnchorSettings as applyAnchorSettingsLegacy } from './utils/anchorUtils';
|
|
129
|
+
export { DEBUG_GENERATIVE_EFFECTS, applyGenerativeAnimations, } from './utils/handleGenerativeEffectsAnimations';
|
|
130
|
+
export { hasHoverAnimation } from './utils/hasHoverAnimation';
|
|
131
|
+
export { findById } from './utils/sceneQuery';
|
|
132
|
+
export * from './utils/textEffects';
|
|
133
|
+
export { ShaderEffectsMaterial } from './shaders/ShaderEffectsMaterial';
|
|
134
|
+
export type { ShaderEffectsMaterialUniforms } from './shaders/ShaderEffectsMaterial';
|
|
135
|
+
export { SkyboxMaterial } from './shaders/SkyboxMaterial';
|
|
136
|
+
export type { SkyboxMaterialUniforms } from './shaders/SkyboxMaterial';
|
|
137
|
+
export { ShootingStarMaterial } from './shaders/ShootingStarMaterial';
|
|
138
|
+
export { RainMaterial } from './shaders/RainMaterial';
|
|
139
|
+
export type { RainMaterialUniforms } from './shaders/RainMaterial';
|
|
140
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AACzF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,YAAY,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAGpE,OAAO,EAAE,cAAc,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EA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