@3driseai/3drise-viewer 0.1.1
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 +65 -0
- package/dist/components/Bubbles.d.ts +9 -0
- package/dist/components/Bubbles.d.ts.map +1 -0
- package/dist/components/Bubbles.js +105 -0
- package/dist/components/CameraController.d.ts +10 -0
- package/dist/components/CameraController.d.ts.map +1 -0
- package/dist/components/CameraController.js +158 -0
- package/dist/components/Clouds.d.ts +9 -0
- package/dist/components/Clouds.d.ts.map +1 -0
- package/dist/components/Clouds.js +278 -0
- package/dist/components/Corona.d.ts +18 -0
- package/dist/components/Corona.d.ts.map +1 -0
- package/dist/components/Corona.js +12 -0
- package/dist/components/CreatedObject.d.ts +14 -0
- package/dist/components/CreatedObject.d.ts.map +1 -0
- package/dist/components/CreatedObject.js +103 -0
- package/dist/components/CustomPrimitive.d.ts +12 -0
- package/dist/components/CustomPrimitive.d.ts.map +1 -0
- package/dist/components/CustomPrimitive.js +87 -0
- package/dist/components/Earth.d.ts +8 -0
- package/dist/components/Earth.d.ts.map +1 -0
- package/dist/components/Earth.js +38 -0
- package/dist/components/EffectsGenerator.d.ts +10 -0
- package/dist/components/EffectsGenerator.d.ts.map +1 -0
- package/dist/components/EffectsGenerator.js +71 -0
- package/dist/components/EffectsGroup.d.ts +8 -0
- package/dist/components/EffectsGroup.d.ts.map +1 -0
- package/dist/components/EffectsGroup.js +11 -0
- package/dist/components/EnvironmentManager.d.ts +9 -0
- package/dist/components/EnvironmentManager.d.ts.map +1 -0
- package/dist/components/EnvironmentManager.js +74 -0
- package/dist/components/EnvironmentObject.d.ts +8 -0
- package/dist/components/EnvironmentObject.d.ts.map +1 -0
- package/dist/components/EnvironmentObject.js +14 -0
- package/dist/components/Flares.d.ts +24 -0
- package/dist/components/Flares.d.ts.map +1 -0
- package/dist/components/Flares.js +134 -0
- package/dist/components/Frame.d.ts +23 -0
- package/dist/components/Frame.d.ts.map +1 -0
- package/dist/components/Frame.js +55 -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 +2 -0
- package/dist/components/FrameImage.d.ts.map +1 -0
- package/dist/components/FrameImage.js +15 -0
- package/dist/components/Galaxy.d.ts +10 -0
- package/dist/components/Galaxy.d.ts.map +1 -0
- package/dist/components/Galaxy.js +29 -0
- package/dist/components/GalleryLayout.d.ts +12 -0
- package/dist/components/GalleryLayout.d.ts.map +1 -0
- package/dist/components/GalleryLayout.js +20 -0
- package/dist/components/GeometryShape.d.ts +54 -0
- package/dist/components/GeometryShape.d.ts.map +1 -0
- package/dist/components/GeometryShape.js +318 -0
- package/dist/components/Glyphs.d.ts +9 -0
- package/dist/components/Glyphs.d.ts.map +1 -0
- package/dist/components/Glyphs.js +58 -0
- package/dist/components/GridHelper.d.ts +23 -0
- package/dist/components/GridHelper.d.ts.map +1 -0
- package/dist/components/GridHelper.js +36 -0
- package/dist/components/GridsGenerator.d.ts +10 -0
- package/dist/components/GridsGenerator.d.ts.map +1 -0
- package/dist/components/GridsGenerator.js +14 -0
- package/dist/components/HdrPlaylistRenderer.d.ts +10 -0
- package/dist/components/HdrPlaylistRenderer.d.ts.map +1 -0
- package/dist/components/HdrPlaylistRenderer.js +364 -0
- package/dist/components/ImageGeometry.d.ts +13 -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 +19 -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/LightObject.d.ts +8 -0
- package/dist/components/LightObject.d.ts.map +1 -0
- package/dist/components/LightObject.js +65 -0
- package/dist/components/LightsManager.d.ts +8 -0
- package/dist/components/LightsManager.d.ts.map +1 -0
- package/dist/components/LightsManager.js +104 -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 +6 -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 +66 -0
- package/dist/components/MyGrid.d.ts +15 -0
- package/dist/components/MyGrid.d.ts.map +1 -0
- package/dist/components/MyGrid.js +72 -0
- package/dist/components/ObjectNode.d.ts +13 -0
- package/dist/components/ObjectNode.d.ts.map +1 -0
- package/dist/components/ObjectNode.js +139 -0
- package/dist/components/ObjectNodeApi.d.ts +13 -0
- package/dist/components/ObjectNodeApi.d.ts.map +1 -0
- package/dist/components/ObjectNodeApi.js +18 -0
- package/dist/components/ObjectsRenderer.d.ts +15 -0
- package/dist/components/ObjectsRenderer.d.ts.map +1 -0
- package/dist/components/ObjectsRenderer.js +40 -0
- package/dist/components/ObjectsRendererApi.d.ts +31 -0
- package/dist/components/ObjectsRendererApi.d.ts.map +1 -0
- package/dist/components/ObjectsRendererApi.js +76 -0
- package/dist/components/Ocean.d.ts +8 -0
- package/dist/components/Ocean.d.ts.map +1 -0
- package/dist/components/Ocean.js +169 -0
- package/dist/components/Outline.d.ts +21 -0
- package/dist/components/Outline.d.ts.map +1 -0
- package/dist/components/Outline.js +14 -0
- package/dist/components/ParticlesR3f.d.ts +11 -0
- package/dist/components/ParticlesR3f.d.ts.map +1 -0
- package/dist/components/ParticlesR3f.js +110 -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 +12 -0
- package/dist/components/PathRenderer.d.ts.map +1 -0
- package/dist/components/PathRenderer.js +36 -0
- package/dist/components/Planet.d.ts +16 -0
- package/dist/components/Planet.d.ts.map +1 -0
- package/dist/components/Planet.js +60 -0
- package/dist/components/PointCloud.d.ts +10 -0
- package/dist/components/PointCloud.d.ts.map +1 -0
- package/dist/components/PointCloud.js +113 -0
- package/dist/components/ProductionScene.d.ts +5 -0
- package/dist/components/ProductionScene.d.ts.map +1 -0
- package/dist/components/ProductionScene.js +7 -0
- package/dist/components/ProjectLoader.d.ts +16 -0
- package/dist/components/ProjectLoader.d.ts.map +1 -0
- package/dist/components/ProjectLoader.js +85 -0
- package/dist/components/Rain.d.ts +8 -0
- package/dist/components/Rain.d.ts.map +1 -0
- package/dist/components/Rain.js +259 -0
- package/dist/components/RiseLogo.d.ts +19 -0
- package/dist/components/RiseLogo.d.ts.map +1 -0
- package/dist/components/RiseLogo.js +75 -0
- package/dist/components/SceneBuilder.d.ts +5 -0
- package/dist/components/SceneBuilder.d.ts.map +1 -0
- package/dist/components/SceneBuilder.js +133 -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/Shape.d.ts +5 -0
- package/dist/components/Shape.d.ts.map +1 -0
- package/dist/components/Shape.js +11 -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 +41 -0
- package/dist/components/SkyController.d.ts +10 -0
- package/dist/components/SkyController.d.ts.map +1 -0
- package/dist/components/SkyController.js +208 -0
- package/dist/components/SkyMesh.d.ts +10 -0
- package/dist/components/SkyMesh.d.ts.map +1 -0
- package/dist/components/SkyMesh.js +36 -0
- package/dist/components/SkySystem.d.ts +32 -0
- package/dist/components/SkySystem.d.ts.map +1 -0
- package/dist/components/SkySystem.js +46 -0
- package/dist/components/Skybox.d.ts +12 -0
- package/dist/components/Skybox.d.ts.map +1 -0
- package/dist/components/Skybox.js +92 -0
- package/dist/components/SolarSystem.d.ts +8 -0
- package/dist/components/SolarSystem.d.ts.map +1 -0
- package/dist/components/SolarSystem.js +77 -0
- package/dist/components/SparklesBurst.d.ts +9 -0
- package/dist/components/SparklesBurst.d.ts.map +1 -0
- package/dist/components/SparklesBurst.js +62 -0
- package/dist/components/Stars.d.ts +15 -0
- package/dist/components/Stars.d.ts.map +1 -0
- package/dist/components/Stars.js +250 -0
- package/dist/components/Sun.d.ts +15 -0
- package/dist/components/Sun.d.ts.map +1 -0
- package/dist/components/Sun.js +7 -0
- package/dist/components/SunCore.d.ts +18 -0
- package/dist/components/SunCore.d.ts.map +1 -0
- package/dist/components/SunCore.js +14 -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/VolumePoints.d.ts +19 -0
- package/dist/components/VolumePoints.d.ts.map +1 -0
- package/dist/components/VolumePoints.js +8 -0
- package/dist/components/cursor/AuraCursor.d.ts +6 -0
- package/dist/components/cursor/AuraCursor.d.ts.map +1 -0
- package/dist/components/cursor/AuraCursor.js +30 -0
- package/dist/components/cursor/AuroraCursor.d.ts +6 -0
- package/dist/components/cursor/AuroraCursor.d.ts.map +1 -0
- package/dist/components/cursor/AuroraCursor.js +207 -0
- package/dist/components/cursor/BubblesCursor.d.ts +6 -0
- package/dist/components/cursor/BubblesCursor.d.ts.map +1 -0
- package/dist/components/cursor/BubblesCursor.js +184 -0
- package/dist/components/cursor/CometCursor.d.ts +6 -0
- package/dist/components/cursor/CometCursor.d.ts.map +1 -0
- package/dist/components/cursor/CometCursor.js +191 -0
- package/dist/components/cursor/CrosshairCursor.d.ts +6 -0
- package/dist/components/cursor/CrosshairCursor.d.ts.map +1 -0
- package/dist/components/cursor/CrosshairCursor.js +142 -0
- package/dist/components/cursor/CursorActions.d.ts +8 -0
- package/dist/components/cursor/CursorActions.d.ts.map +1 -0
- package/dist/components/cursor/CursorActions.js +124 -0
- package/dist/components/cursor/CursorController.d.ts +10 -0
- package/dist/components/cursor/CursorController.d.ts.map +1 -0
- package/dist/components/cursor/CursorController.js +5 -0
- package/dist/components/cursor/CursorEffects.d.ts +16 -0
- package/dist/components/cursor/CursorEffects.d.ts.map +1 -0
- package/dist/components/cursor/CursorEffects.js +110 -0
- package/dist/components/cursor/FerrofluidCursor.d.ts +6 -0
- package/dist/components/cursor/FerrofluidCursor.d.ts.map +1 -0
- package/dist/components/cursor/FerrofluidCursor.js +102 -0
- package/dist/components/cursor/GlyphRingCursor.d.ts +6 -0
- package/dist/components/cursor/GlyphRingCursor.d.ts.map +1 -0
- package/dist/components/cursor/GlyphRingCursor.js +123 -0
- package/dist/components/cursor/LightningCursor.d.ts +6 -0
- package/dist/components/cursor/LightningCursor.d.ts.map +1 -0
- package/dist/components/cursor/LightningCursor.js +28 -0
- package/dist/components/cursor/LiquidMetalCursor.d.ts +6 -0
- package/dist/components/cursor/LiquidMetalCursor.d.ts.map +1 -0
- package/dist/components/cursor/LiquidMetalCursor.js +61 -0
- package/dist/components/cursor/OrbCursor.d.ts +6 -0
- package/dist/components/cursor/OrbCursor.d.ts.map +1 -0
- package/dist/components/cursor/OrbCursor.js +32 -0
- package/dist/components/cursor/PlasmaWhipCursor.d.ts +6 -0
- package/dist/components/cursor/PlasmaWhipCursor.d.ts.map +1 -0
- package/dist/components/cursor/PlasmaWhipCursor.js +134 -0
- package/dist/components/cursor/SparklesCursor.d.ts +6 -0
- package/dist/components/cursor/SparklesCursor.d.ts.map +1 -0
- package/dist/components/cursor/SparklesCursor.js +151 -0
- package/dist/components/cursor/TeslaCursor.d.ts +6 -0
- package/dist/components/cursor/TeslaCursor.d.ts.map +1 -0
- package/dist/components/cursor/TeslaCursor.js +223 -0
- package/dist/components/cursor/clickActions/BoltFlashAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/BoltFlashAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/BoltFlashAction.js +62 -0
- package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/GlyphInscriptionAction.js +114 -0
- package/dist/components/cursor/clickActions/ImplosionAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/ImplosionAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/ImplosionAction.js +93 -0
- package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/PhaseShiftAction.js +71 -0
- package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/PlasmaBombAction.js +98 -0
- package/dist/components/cursor/clickActions/RealityTearAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/RealityTearAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/RealityTearAction.js +92 -0
- package/dist/components/cursor/clickActions/ShockwaveAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/ShockwaveAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/ShockwaveAction.js +55 -0
- package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/SparklesBurstAction.js +99 -0
- package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts +11 -0
- package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/VoronoiFractureAction.js +149 -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/Fire.d.ts +20 -0
- package/dist/components/effects/Fire.d.ts.map +1 -0
- package/dist/components/effects/Fire.js +208 -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 +173 -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 +160 -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/SmokeRibbon.d.ts +13 -0
- package/dist/components/effects/SmokeRibbon.d.ts.map +1 -0
- package/dist/components/effects/SmokeRibbon.js +69 -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/components/extractOutline.d.ts +18 -0
- package/dist/components/extractOutline.d.ts.map +1 -0
- package/dist/components/extractOutline.js +47 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +5 -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/use3driseShader.d.ts +17 -0
- package/dist/hooks/use3driseShader.d.ts.map +1 -0
- package/dist/hooks/use3driseShader.js +100 -0
- package/dist/hooks/useAnimationEvents.d.ts +10 -0
- package/dist/hooks/useAnimationEvents.d.ts.map +1 -0
- package/dist/hooks/useAnimationEvents.js +49 -0
- package/dist/hooks/useCameraAnimation.d.ts +35 -0
- package/dist/hooks/useCameraAnimation.d.ts.map +1 -0
- package/dist/hooks/useCameraAnimation.js +277 -0
- package/dist/hooks/useContinuousEffects.d.ts +15 -0
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -0
- package/dist/hooks/useContinuousEffects.js +177 -0
- package/dist/hooks/useCubeCamera.d.ts +18 -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/useFrameAnimations.d.ts +24 -0
- package/dist/hooks/useFrameAnimations.d.ts.map +1 -0
- package/dist/hooks/useFrameAnimations.js +217 -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/useGsapAnimation.d.ts +122 -0
- package/dist/hooks/useGsapAnimation.d.ts.map +1 -0
- package/dist/hooks/useGsapAnimation.js +316 -0
- package/dist/hooks/useInteraction.d.ts +12 -0
- package/dist/hooks/useInteraction.d.ts.map +1 -0
- package/dist/hooks/useInteraction.js +273 -0
- package/dist/hooks/useInteractionEffects.d.ts +11 -0
- package/dist/hooks/useInteractionEffects.d.ts.map +1 -0
- package/dist/hooks/useInteractionEffects.js +74 -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/useLightAnimation.d.ts +10 -0
- package/dist/hooks/useLightAnimation.d.ts.map +1 -0
- package/dist/hooks/useLightAnimation.js +34 -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/useLightMouseMove.d.ts +11 -0
- package/dist/hooks/useLightMouseMove.d.ts.map +1 -0
- package/dist/hooks/useLightMouseMove.js +27 -0
- package/dist/hooks/useLightShadow.d.ts +6 -0
- package/dist/hooks/useLightShadow.d.ts.map +1 -0
- package/dist/hooks/useLightShadow.js +63 -0
- package/dist/hooks/useMaterialApplication.d.ts +4 -0
- package/dist/hooks/useMaterialApplication.d.ts.map +1 -0
- package/dist/hooks/useMaterialApplication.js +157 -0
- package/dist/hooks/useMaterialOptions.d.ts +14 -0
- package/dist/hooks/useMaterialOptions.d.ts.map +1 -0
- package/dist/hooks/useMaterialOptions.js +118 -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 +168 -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/useNumericAnimation.d.ts +5 -0
- package/dist/hooks/useNumericAnimation.d.ts.map +1 -0
- package/dist/hooks/useNumericAnimation.js +42 -0
- package/dist/hooks/useObjectAnimation.d.ts +13 -0
- package/dist/hooks/useObjectAnimation.d.ts.map +1 -0
- package/dist/hooks/useObjectAnimation.js +35 -0
- package/dist/hooks/useObjectEdges.d.ts +3 -0
- package/dist/hooks/useObjectEdges.d.ts.map +1 -0
- package/dist/hooks/useObjectEdges.js +199 -0
- package/dist/hooks/useObjectEffects.d.ts +23 -0
- package/dist/hooks/useObjectEffects.d.ts.map +1 -0
- package/dist/hooks/useObjectEffects.js +162 -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/useOutline.d.ts +9 -0
- package/dist/hooks/useOutline.d.ts.map +1 -0
- package/dist/hooks/useOutline.js +14 -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 +130 -0
- package/dist/hooks/useSequenceAnimation.d.ts +14 -0
- package/dist/hooks/useSequenceAnimation.d.ts.map +1 -0
- package/dist/hooks/useSequenceAnimation.js +260 -0
- package/dist/hooks/useShadowApplication.d.ts +3 -0
- package/dist/hooks/useShadowApplication.d.ts.map +1 -0
- package/dist/hooks/useShadowApplication.js +31 -0
- package/dist/hooks/useShapeGeometry.d.ts +8 -0
- package/dist/hooks/useShapeGeometry.d.ts.map +1 -0
- package/dist/hooks/useShapeGeometry.js +12 -0
- package/dist/hooks/useSkyAnimation.d.ts +13 -0
- package/dist/hooks/useSkyAnimation.d.ts.map +1 -0
- package/dist/hooks/useSkyAnimation.js +36 -0
- package/dist/hooks/useSkySystem.d.ts +25 -0
- package/dist/hooks/useSkySystem.d.ts.map +1 -0
- package/dist/hooks/useSkySystem.js +59 -0
- package/dist/hooks/useSkyUniforms.d.ts +18 -0
- package/dist/hooks/useSkyUniforms.d.ts.map +1 -0
- package/dist/hooks/useSkyUniforms.js +71 -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/useVolumePoints.d.ts +9 -0
- package/dist/hooks/useVolumePoints.d.ts.map +1 -0
- package/dist/hooks/useVolumePoints.js +22 -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 +18 -0
- package/dist/hooks/useWaterReflections.d.ts.map +1 -0
- package/dist/hooks/useWaterReflections.js +84 -0
- package/dist/index.d.ts +146 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -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 +228 -0
- package/dist/shaders/ShaderEffectsMaterial.d.ts.map +1 -0
- package/dist/shaders/ShaderEffectsMaterial.js +233 -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 +115 -0
- package/dist/utils/CameraSingleton.d.ts +43 -0
- package/dist/utils/CameraSingleton.d.ts.map +1 -0
- package/dist/utils/CameraSingleton.js +199 -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/cursorPicking.d.ts +8 -0
- package/dist/utils/cursorPicking.d.ts.map +1 -0
- package/dist/utils/cursorPicking.js +35 -0
- package/dist/utils/extractOutline.d.ts +18 -0
- package/dist/utils/extractOutline.d.ts.map +1 -0
- package/dist/utils/extractOutline.js +47 -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/materialUtils.d.ts +23 -0
- package/dist/utils/materialUtils.d.ts.map +1 -0
- package/dist/utils/materialUtils.js +81 -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/sampleVolume.d.ts +21 -0
- package/dist/utils/sampleVolume.d.ts.map +1 -0
- package/dist/utils/sampleVolume.js +44 -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 +151 -0
- package/dist/utils/shapes.d.ts +74 -0
- package/dist/utils/shapes.d.ts.map +1 -0
- package/dist/utils/shapes.js +443 -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 +44 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation presets for common 3D animations
|
|
3
|
+
*/
|
|
4
|
+
export declare const ANIMATION_PRESETS: {
|
|
5
|
+
fadeIn: {
|
|
6
|
+
duration: number;
|
|
7
|
+
ease: string;
|
|
8
|
+
scale: number[];
|
|
9
|
+
delay: number;
|
|
10
|
+
};
|
|
11
|
+
fadeOut: {
|
|
12
|
+
duration: number;
|
|
13
|
+
ease: string;
|
|
14
|
+
scale: number[];
|
|
15
|
+
delay: number;
|
|
16
|
+
};
|
|
17
|
+
slideUp: {
|
|
18
|
+
duration: number;
|
|
19
|
+
ease: string;
|
|
20
|
+
position: number[];
|
|
21
|
+
delay: number;
|
|
22
|
+
};
|
|
23
|
+
slideDown: {
|
|
24
|
+
duration: number;
|
|
25
|
+
ease: string;
|
|
26
|
+
position: number[];
|
|
27
|
+
delay: number;
|
|
28
|
+
};
|
|
29
|
+
spin: {
|
|
30
|
+
duration: number;
|
|
31
|
+
ease: string;
|
|
32
|
+
rotation: number[];
|
|
33
|
+
delay: number;
|
|
34
|
+
};
|
|
35
|
+
bounce: {
|
|
36
|
+
duration: number;
|
|
37
|
+
ease: string;
|
|
38
|
+
scale: number[];
|
|
39
|
+
delay: number;
|
|
40
|
+
};
|
|
41
|
+
elastic: {
|
|
42
|
+
duration: number;
|
|
43
|
+
ease: string;
|
|
44
|
+
scale: number[];
|
|
45
|
+
delay: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Custom hook for GSAP animations in 3D scenes
|
|
50
|
+
* Provides context-safe animation functions for Three.js objects
|
|
51
|
+
*/
|
|
52
|
+
export declare const useGsapAnimation: (dependencies?: any[]) => {
|
|
53
|
+
containerRef: import("react").RefObject<any>;
|
|
54
|
+
contextSafe: import("@gsap/react").ContextSafeFunc;
|
|
55
|
+
animateObjects: (objects: any, settings?: {
|
|
56
|
+
duration: number;
|
|
57
|
+
ease: string;
|
|
58
|
+
position: number[];
|
|
59
|
+
rotation: number[];
|
|
60
|
+
scale: number[];
|
|
61
|
+
delay: number;
|
|
62
|
+
}) => void;
|
|
63
|
+
animateWithPreset: (objects: any, preset: any, overrides?: {}) => void;
|
|
64
|
+
animateEntrance: (objects: any, settings?: {}) => void;
|
|
65
|
+
animateExit: (objects: any, settings?: {}) => void;
|
|
66
|
+
animatePulse: (objects: any, settings?: {}) => void;
|
|
67
|
+
animateRotation: (objects: any, settings?: {}) => void;
|
|
68
|
+
animateWave: (objects: any, amplitude?: number, frequency?: number, settings?: {}) => void;
|
|
69
|
+
createTimeline: () => () => any;
|
|
70
|
+
stopAnimations: (objects: any) => void;
|
|
71
|
+
pauseTimeline: () => void;
|
|
72
|
+
resumeTimeline: () => void;
|
|
73
|
+
killTimeline: () => void;
|
|
74
|
+
animateSettings: (currentValues: any, endValues: any, duration: any, onComplete: any, onUpdate: any) => void;
|
|
75
|
+
timeline: any;
|
|
76
|
+
presets: {
|
|
77
|
+
fadeIn: {
|
|
78
|
+
duration: number;
|
|
79
|
+
ease: string;
|
|
80
|
+
scale: number[];
|
|
81
|
+
delay: number;
|
|
82
|
+
};
|
|
83
|
+
fadeOut: {
|
|
84
|
+
duration: number;
|
|
85
|
+
ease: string;
|
|
86
|
+
scale: number[];
|
|
87
|
+
delay: number;
|
|
88
|
+
};
|
|
89
|
+
slideUp: {
|
|
90
|
+
duration: number;
|
|
91
|
+
ease: string;
|
|
92
|
+
position: number[];
|
|
93
|
+
delay: number;
|
|
94
|
+
};
|
|
95
|
+
slideDown: {
|
|
96
|
+
duration: number;
|
|
97
|
+
ease: string;
|
|
98
|
+
position: number[];
|
|
99
|
+
delay: number;
|
|
100
|
+
};
|
|
101
|
+
spin: {
|
|
102
|
+
duration: number;
|
|
103
|
+
ease: string;
|
|
104
|
+
rotation: number[];
|
|
105
|
+
delay: number;
|
|
106
|
+
};
|
|
107
|
+
bounce: {
|
|
108
|
+
duration: number;
|
|
109
|
+
ease: string;
|
|
110
|
+
scale: number[];
|
|
111
|
+
delay: number;
|
|
112
|
+
};
|
|
113
|
+
elastic: {
|
|
114
|
+
duration: number;
|
|
115
|
+
ease: string;
|
|
116
|
+
scale: number[];
|
|
117
|
+
delay: number;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export default useGsapAnimation;
|
|
122
|
+
//# sourceMappingURL=useGsapAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGsapAnimation.d.ts","sourceRoot":"","sources":["../../src/hooks/useGsapAnimation.ts"],"names":[],"mappings":"AA2BA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C7B,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,eAAc,GAAG,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwPxD,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { useRef, useCallback } from 'react';
|
|
2
|
+
import { gsap } from 'gsap';
|
|
3
|
+
import { useGSAP } from '@gsap/react';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
/**
|
|
6
|
+
* Default animation settings
|
|
7
|
+
*/
|
|
8
|
+
const DEFAULT_SETTINGS = {
|
|
9
|
+
duration: 1,
|
|
10
|
+
ease: "power2.out",
|
|
11
|
+
position: [0, 0, 0],
|
|
12
|
+
rotation: [0, 0, 0],
|
|
13
|
+
scale: [1, 1, 1],
|
|
14
|
+
delay: 0
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Animation presets for common 3D animations
|
|
18
|
+
*/
|
|
19
|
+
export const ANIMATION_PRESETS = {
|
|
20
|
+
fadeIn: {
|
|
21
|
+
duration: 0.8,
|
|
22
|
+
ease: "power2.out",
|
|
23
|
+
scale: [1, 1, 1],
|
|
24
|
+
delay: 0
|
|
25
|
+
},
|
|
26
|
+
fadeOut: {
|
|
27
|
+
duration: 0.5,
|
|
28
|
+
ease: "power2.in",
|
|
29
|
+
scale: [0, 0, 0],
|
|
30
|
+
delay: 0
|
|
31
|
+
},
|
|
32
|
+
slideUp: {
|
|
33
|
+
duration: 1,
|
|
34
|
+
ease: "back.out(1.7)",
|
|
35
|
+
position: [0, 2, 0],
|
|
36
|
+
delay: 0
|
|
37
|
+
},
|
|
38
|
+
slideDown: {
|
|
39
|
+
duration: 1,
|
|
40
|
+
ease: "power2.out",
|
|
41
|
+
position: [0, -2, 0],
|
|
42
|
+
delay: 0
|
|
43
|
+
},
|
|
44
|
+
spin: {
|
|
45
|
+
duration: 2,
|
|
46
|
+
ease: "power1.inOut",
|
|
47
|
+
rotation: [0, Math.PI * 2, 0],
|
|
48
|
+
delay: 0
|
|
49
|
+
},
|
|
50
|
+
bounce: {
|
|
51
|
+
duration: 0.6,
|
|
52
|
+
ease: "bounce.out",
|
|
53
|
+
scale: [1.2, 1.2, 1.2],
|
|
54
|
+
delay: 0
|
|
55
|
+
},
|
|
56
|
+
elastic: {
|
|
57
|
+
duration: 1.5,
|
|
58
|
+
ease: "elastic.out(1, 0.3)",
|
|
59
|
+
scale: [1, 1, 1],
|
|
60
|
+
delay: 0
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Custom hook for GSAP animations in 3D scenes
|
|
65
|
+
* Provides context-safe animation functions for Three.js objects
|
|
66
|
+
*/
|
|
67
|
+
export const useGsapAnimation = (dependencies = []) => {
|
|
68
|
+
const containerRef = useRef(null);
|
|
69
|
+
const timelineRef = useRef(null);
|
|
70
|
+
const { contextSafe } = useGSAP({
|
|
71
|
+
scope: containerRef,
|
|
72
|
+
dependencies
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* Animates multiple 3D objects with the given settings
|
|
76
|
+
*/
|
|
77
|
+
const animateObjects = (objects, settings = DEFAULT_SETTINGS) => {
|
|
78
|
+
console.log("Animating objects with settings:", settings, objects);
|
|
79
|
+
const finalSettings = { ...DEFAULT_SETTINGS, ...settings };
|
|
80
|
+
objects.forEach((object, index) => {
|
|
81
|
+
const targetPosition = new THREE.Vector3(...(finalSettings.position || [0, 0, 0]));
|
|
82
|
+
const targetRotation = new THREE.Euler(...(finalSettings.rotation || [0, 0, 0]), "XYZ");
|
|
83
|
+
const targetScale = new THREE.Vector3(...(finalSettings.scale || [1, 1, 1]));
|
|
84
|
+
const delay = (finalSettings.delay || 0) + (index * 0.1); // Stagger effect
|
|
85
|
+
if (finalSettings.position) {
|
|
86
|
+
gsap.to(object.position, {
|
|
87
|
+
x: targetPosition.x,
|
|
88
|
+
y: targetPosition.y,
|
|
89
|
+
z: targetPosition.z,
|
|
90
|
+
duration: finalSettings.duration,
|
|
91
|
+
ease: finalSettings.ease,
|
|
92
|
+
delay,
|
|
93
|
+
onStart: index === 0 ? finalSettings.onStart : undefined,
|
|
94
|
+
onUpdate: finalSettings.onUpdate,
|
|
95
|
+
onComplete: index === objects.length - 1 ? finalSettings.onComplete : undefined
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
// Animate rotation
|
|
99
|
+
if (finalSettings.rotation) {
|
|
100
|
+
gsap.to(object.rotation, {
|
|
101
|
+
x: targetRotation.x,
|
|
102
|
+
y: targetRotation.y,
|
|
103
|
+
z: targetRotation.z,
|
|
104
|
+
duration: finalSettings.duration,
|
|
105
|
+
ease: finalSettings.ease,
|
|
106
|
+
delay
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
// Animate scale
|
|
110
|
+
if (finalSettings.scale) {
|
|
111
|
+
gsap.to(object.scale, {
|
|
112
|
+
x: targetScale.x,
|
|
113
|
+
y: targetScale.y,
|
|
114
|
+
z: targetScale.z,
|
|
115
|
+
duration: finalSettings.duration,
|
|
116
|
+
ease: finalSettings.ease,
|
|
117
|
+
delay
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
const animateSettings = (currentValues, endValues, duration, onComplete, onUpdate) => {
|
|
123
|
+
// Create a proxy object that will hold all values during animation
|
|
124
|
+
const proxy = { ...currentValues };
|
|
125
|
+
// Create the animation object with all the end values as direct properties
|
|
126
|
+
const animationProps = {
|
|
127
|
+
duration,
|
|
128
|
+
ease: "power2.out",
|
|
129
|
+
onUpdate: () => {
|
|
130
|
+
// Create a fresh object with current values to avoid reference issues
|
|
131
|
+
const updatedSettings = { ...currentValues };
|
|
132
|
+
// Copy all animated values from proxy to updatedSettings
|
|
133
|
+
Object.keys(endValues).forEach(key => {
|
|
134
|
+
updatedSettings[key] = proxy[key];
|
|
135
|
+
});
|
|
136
|
+
onUpdate && onUpdate(updatedSettings);
|
|
137
|
+
},
|
|
138
|
+
onComplete: () => {
|
|
139
|
+
// Create a clean object with final values for the callback
|
|
140
|
+
const finalSettings = { ...endValues };
|
|
141
|
+
onComplete && onComplete(finalSettings);
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
// Add all the end values as properties to animate
|
|
145
|
+
Object.keys(endValues).forEach(key => {
|
|
146
|
+
animationProps[key] = endValues[key];
|
|
147
|
+
});
|
|
148
|
+
// Run the animation on our proxy object
|
|
149
|
+
gsap.to(proxy, animationProps);
|
|
150
|
+
};
|
|
151
|
+
// const animateColorCycle = () => {
|
|
152
|
+
// const colors = ['#ff6b6b', '#4ecdc4', '#45b7d1', '#96ceb4', '#ffa726'];
|
|
153
|
+
// objectsIds.forEach((objectId, index) => {
|
|
154
|
+
// const color = colors[index % colors.length];
|
|
155
|
+
// animateObject(objectId, {
|
|
156
|
+
// color: new Color(color)
|
|
157
|
+
// }, 1000, {
|
|
158
|
+
// animationName: 'colorCycle',
|
|
159
|
+
// delay: index * 150,
|
|
160
|
+
// yoyo: true,
|
|
161
|
+
// loop: true,
|
|
162
|
+
// ease: 'power2.inOut'
|
|
163
|
+
// });
|
|
164
|
+
// });
|
|
165
|
+
// };
|
|
166
|
+
/**
|
|
167
|
+
* Animates a single object with preset animations
|
|
168
|
+
*/
|
|
169
|
+
const animateWithPreset = useCallback((objects, preset, overrides = {}) => {
|
|
170
|
+
const presetSettings = ANIMATION_PRESETS[preset];
|
|
171
|
+
const finalSettings = { ...presetSettings, ...overrides };
|
|
172
|
+
animateObjects(objects, finalSettings);
|
|
173
|
+
}, [animateObjects]);
|
|
174
|
+
/**
|
|
175
|
+
* Creates a timeline for complex sequential animations
|
|
176
|
+
*/
|
|
177
|
+
const createTimeline = useCallback(() => {
|
|
178
|
+
return contextSafe(() => {
|
|
179
|
+
timelineRef.current = gsap.timeline();
|
|
180
|
+
return timelineRef.current;
|
|
181
|
+
});
|
|
182
|
+
}, [contextSafe]);
|
|
183
|
+
/**
|
|
184
|
+
* Animates object entrance (fade in from below)
|
|
185
|
+
*/
|
|
186
|
+
const animateEntrance = useCallback((objects, settings = {}) => {
|
|
187
|
+
objects.forEach((object) => {
|
|
188
|
+
// Set initial state
|
|
189
|
+
const originalY = object.position.y;
|
|
190
|
+
object.position.y -= 2;
|
|
191
|
+
object.scale.setScalar(0);
|
|
192
|
+
// Animate to final state
|
|
193
|
+
animateObjects([object], {
|
|
194
|
+
duration: 0.8,
|
|
195
|
+
ease: "back.out(1.7)",
|
|
196
|
+
position: [object.position.x, originalY, object.position.z],
|
|
197
|
+
scale: [1, 1, 1],
|
|
198
|
+
...settings
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
}, [animateObjects]);
|
|
202
|
+
/**
|
|
203
|
+
* Animates object exit (fade out and scale down)
|
|
204
|
+
*/
|
|
205
|
+
const animateExit = useCallback((objects, settings = {}) => {
|
|
206
|
+
objects.forEach((object) => {
|
|
207
|
+
animateObjects([object], {
|
|
208
|
+
duration: 0.5,
|
|
209
|
+
ease: "power2.in",
|
|
210
|
+
scale: [0, 0, 0],
|
|
211
|
+
position: [object.position.x, object.position.y - 1, object.position.z],
|
|
212
|
+
...settings
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
}, [animateObjects]);
|
|
216
|
+
/**
|
|
217
|
+
* Pulses objects (scale up and down)
|
|
218
|
+
*/
|
|
219
|
+
const animatePulse = useCallback((objects, settings = {}) => {
|
|
220
|
+
console.log("Animating pulse for objects", objects, "with settings", settings);
|
|
221
|
+
objects.forEach((object, index) => {
|
|
222
|
+
const delay = (settings.delay || 0) + (index * 0.1);
|
|
223
|
+
console.log("Animating pulse for object", object, "with delay", delay);
|
|
224
|
+
gsap.to(object.scale, {
|
|
225
|
+
x: 2.2,
|
|
226
|
+
y: 2.2,
|
|
227
|
+
z: 2.2,
|
|
228
|
+
duration: 0.3,
|
|
229
|
+
ease: "power2.out",
|
|
230
|
+
delay,
|
|
231
|
+
yoyo: true,
|
|
232
|
+
repeat: 1,
|
|
233
|
+
onComplete: settings.onComplete
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
}, []);
|
|
237
|
+
/**
|
|
238
|
+
* Rotates objects continuously
|
|
239
|
+
*/
|
|
240
|
+
const animateRotation = useCallback((objects, settings = {}) => {
|
|
241
|
+
objects.forEach((object) => {
|
|
242
|
+
gsap.to(object.rotation, {
|
|
243
|
+
y: object.rotation.y + Math.PI * 2,
|
|
244
|
+
duration: settings.duration || 2,
|
|
245
|
+
ease: settings.ease || "none",
|
|
246
|
+
repeat: -1,
|
|
247
|
+
delay: settings.delay || 0
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
}, []);
|
|
251
|
+
/**
|
|
252
|
+
* Animates objects in a wave pattern
|
|
253
|
+
*/
|
|
254
|
+
const animateWave = useCallback((objects, amplitude = 1, frequency = 1, settings = {}) => {
|
|
255
|
+
objects.forEach((object, index) => {
|
|
256
|
+
const delay = index * 0.1;
|
|
257
|
+
gsap.to(object.position, {
|
|
258
|
+
y: object.position.y + amplitude * Math.sin(frequency * index),
|
|
259
|
+
duration: settings.duration || 1,
|
|
260
|
+
ease: settings.ease || "sine.inOut",
|
|
261
|
+
delay,
|
|
262
|
+
yoyo: true,
|
|
263
|
+
repeat: -1
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
}, []);
|
|
267
|
+
/**
|
|
268
|
+
* Stops all animations on the given objects
|
|
269
|
+
*/
|
|
270
|
+
const stopAnimations = useCallback((objects) => {
|
|
271
|
+
objects.forEach((object) => {
|
|
272
|
+
gsap.killTweensOf(object.position);
|
|
273
|
+
gsap.killTweensOf(object.rotation);
|
|
274
|
+
gsap.killTweensOf(object.scale);
|
|
275
|
+
});
|
|
276
|
+
}, []);
|
|
277
|
+
/**
|
|
278
|
+
* Pauses the current timeline
|
|
279
|
+
*/
|
|
280
|
+
const pauseTimeline = useCallback(() => {
|
|
281
|
+
timelineRef.current?.pause();
|
|
282
|
+
}, []);
|
|
283
|
+
/**
|
|
284
|
+
* Resumes the current timeline
|
|
285
|
+
*/
|
|
286
|
+
const resumeTimeline = useCallback(() => {
|
|
287
|
+
timelineRef.current?.resume();
|
|
288
|
+
}, []);
|
|
289
|
+
/**
|
|
290
|
+
* Kills the current timeline
|
|
291
|
+
*/
|
|
292
|
+
const killTimeline = useCallback(() => {
|
|
293
|
+
timelineRef.current?.kill();
|
|
294
|
+
timelineRef.current = null;
|
|
295
|
+
}, []);
|
|
296
|
+
return {
|
|
297
|
+
containerRef,
|
|
298
|
+
contextSafe,
|
|
299
|
+
animateObjects,
|
|
300
|
+
animateWithPreset,
|
|
301
|
+
animateEntrance,
|
|
302
|
+
animateExit,
|
|
303
|
+
animatePulse,
|
|
304
|
+
animateRotation,
|
|
305
|
+
animateWave,
|
|
306
|
+
createTimeline,
|
|
307
|
+
stopAnimations,
|
|
308
|
+
pauseTimeline,
|
|
309
|
+
resumeTimeline,
|
|
310
|
+
killTimeline,
|
|
311
|
+
animateSettings,
|
|
312
|
+
timeline: timelineRef.current,
|
|
313
|
+
presets: ANIMATION_PRESETS
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
export default useGsapAnimation;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AnimationSequence, CameraState } from '@3driseai/3drise-core';
|
|
2
|
+
export declare function useInteraction({ cameraSettings, sequences, }: {
|
|
3
|
+
cameraSettings: CameraState;
|
|
4
|
+
sequences: AnimationSequence[];
|
|
5
|
+
}): {
|
|
6
|
+
executeInteraction: (params: any) => void;
|
|
7
|
+
currentAnimatedRef: import("react").RefObject<any>;
|
|
8
|
+
glowingObjects: import("react").MutableRefObject<Set<string>>;
|
|
9
|
+
vanishedObjects: import("react").MutableRefObject<Set<string>>;
|
|
10
|
+
};
|
|
11
|
+
export default useInteraction;
|
|
12
|
+
//# sourceMappingURL=useInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInteraction.d.ts","sourceRoot":"","sources":["../../src/hooks/useInteraction.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAA4B,MAAM,uBAAuB,CAAC;AAatG,wBAAgB,cAAc,CAAC,EAE/B,cAAc,EAAE,SAAS,GAAG,EAAE;IAClB,cAAc,EAAE,WAAW,CAAC;IAC5B,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAClC;;;;;EAwPR;AACD,eAAe,cAAc,CAAC"}
|