@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,100 @@
|
|
|
1
|
+
import { Color, Vector2 } from 'three';
|
|
2
|
+
import { EFFECT_REGISTRY, buildUniformPrefix, } from '@3driseai/3drise-core';
|
|
3
|
+
const warnedKeys = new Set();
|
|
4
|
+
function warnOnce(key, message) {
|
|
5
|
+
if (warnedKeys.has(key))
|
|
6
|
+
return;
|
|
7
|
+
warnedKeys.add(key);
|
|
8
|
+
console.warn(message);
|
|
9
|
+
}
|
|
10
|
+
function writeUniformValue(uniformObj, def, raw) {
|
|
11
|
+
const value = raw === undefined ? def.default : raw;
|
|
12
|
+
switch (def.glslType) {
|
|
13
|
+
case 'float':
|
|
14
|
+
case 'int':
|
|
15
|
+
uniformObj.value = typeof value === 'number' ? value : Number(value) || 0;
|
|
16
|
+
return;
|
|
17
|
+
case 'bool':
|
|
18
|
+
uniformObj.value = Boolean(value);
|
|
19
|
+
return;
|
|
20
|
+
case 'vec2': {
|
|
21
|
+
const v = Array.isArray(value) ? value : [0, 0];
|
|
22
|
+
if (uniformObj.value instanceof Vector2) {
|
|
23
|
+
uniformObj.value.set(v[0] ?? 0, v[1] ?? 0);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
uniformObj.value = new Vector2(v[0] ?? 0, v[1] ?? 0);
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
case 'vec3': {
|
|
31
|
+
if (def.control.kind === 'color') {
|
|
32
|
+
if (uniformObj.value instanceof Color) {
|
|
33
|
+
if (typeof value === 'string')
|
|
34
|
+
uniformObj.value.set(value);
|
|
35
|
+
else if (Array.isArray(value))
|
|
36
|
+
uniformObj.value.setRGB(value[0] ?? 1, value[1] ?? 1, value[2] ?? 1);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
uniformObj.value = typeof value === 'string' ? new Color(value) : new Color(1, 1, 1);
|
|
40
|
+
}
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const v = Array.isArray(value) ? value : [0, 0, 0];
|
|
44
|
+
uniformObj.value = [v[0] ?? 0, v[1] ?? 0, v[2] ?? 0];
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
case 'vec4': {
|
|
48
|
+
const v = Array.isArray(value) ? value : [0, 0, 0, 0];
|
|
49
|
+
uniformObj.value = [v[0] ?? 0, v[1] ?? 0, v[2] ?? 0, v[3] ?? 0];
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
uniformObj.value = value;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function update3driseShaderUniforms(uniforms, effects, time, pointer, options) {
|
|
57
|
+
if (!uniforms)
|
|
58
|
+
return;
|
|
59
|
+
const tu = uniforms.u_time;
|
|
60
|
+
if (tu)
|
|
61
|
+
tu.value = time;
|
|
62
|
+
const pu = uniforms.u_pointer;
|
|
63
|
+
if (pu) {
|
|
64
|
+
if (pu.value instanceof Vector2)
|
|
65
|
+
pu.value.set(pointer.x, pointer.y);
|
|
66
|
+
else
|
|
67
|
+
pu.value = new Vector2(pointer.x, pointer.y);
|
|
68
|
+
}
|
|
69
|
+
if (options?.pointerRadius !== undefined) {
|
|
70
|
+
const ru = uniforms.uPointerEffectRadius;
|
|
71
|
+
if (ru)
|
|
72
|
+
ru.value = options.pointerRadius;
|
|
73
|
+
}
|
|
74
|
+
if (!effects || !Array.isArray(effects))
|
|
75
|
+
return;
|
|
76
|
+
for (const eff of effects) {
|
|
77
|
+
if (!eff || !eff.enabled)
|
|
78
|
+
continue;
|
|
79
|
+
const desc = EFFECT_REGISTRY[eff.type];
|
|
80
|
+
if (!desc) {
|
|
81
|
+
warnOnce(`unknown:${eff.type}`, `[3drise] unknown effect type "${eff.type}"; skipping uniform writes`);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const prefix = buildUniformPrefix(eff.instanceId);
|
|
85
|
+
for (const [key, def] of Object.entries(desc.uniforms)) {
|
|
86
|
+
const uniformName = `${prefix}${key}`;
|
|
87
|
+
const u = uniforms[uniformName];
|
|
88
|
+
if (!u) {
|
|
89
|
+
warnOnce(`missing:${uniformName}`, `[3drise] uniform "${uniformName}" not found on material; skipping`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
writeUniformValue(u, def, eff.values?.[key]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export function use3driseShader(effects) {
|
|
97
|
+
return (uniforms, time, pointer) => {
|
|
98
|
+
update3driseShaderUniforms(uniforms, effects, time, pointer);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AnimationEvent } from '@3driseai/3drise-core';
|
|
2
|
+
interface AnimationEventHandlers {
|
|
3
|
+
onSequenceStart?: (event: AnimationEvent) => void;
|
|
4
|
+
onSequenceEnd?: (event: AnimationEvent) => void;
|
|
5
|
+
onStepStart?: (event: AnimationEvent) => void;
|
|
6
|
+
onStepEnd?: (event: AnimationEvent) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useAnimationEvents: (handlers: AnimationEventHandlers) => void;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useAnimationEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimationEvents.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnimationEvents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,UAAU,sBAAsB;IAC5B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAClD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAChD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C;AAQD,eAAO,MAAM,kBAAkB,GAAI,UAAU,sBAAsB,KAAG,IAwCrE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { AnimationsManager } from '@3driseai/3drise-core';
|
|
3
|
+
const DEBUG_ANIMATION_EVENTS = false;
|
|
4
|
+
const debugLog = (...args) => {
|
|
5
|
+
if (DEBUG_ANIMATION_EVENTS) {
|
|
6
|
+
console.log('[useAnimationEvents]', ...args);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export const useAnimationEvents = (handlers) => {
|
|
10
|
+
const ref = useRef(handlers);
|
|
11
|
+
ref.current = handlers;
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
debugLog('subscribing', {
|
|
14
|
+
sequenceStart: !!handlers.onSequenceStart,
|
|
15
|
+
sequenceEnd: !!handlers.onSequenceEnd,
|
|
16
|
+
stepStart: !!handlers.onStepStart,
|
|
17
|
+
stepEnd: !!handlers.onStepEnd,
|
|
18
|
+
});
|
|
19
|
+
const wrap = (key) => (event) => {
|
|
20
|
+
debugLog('event received', {
|
|
21
|
+
key,
|
|
22
|
+
sequenceId: event.sequenceId,
|
|
23
|
+
stepIndex: event.stepIndex,
|
|
24
|
+
transitionCount: event.step?.transitions?.length ?? 0,
|
|
25
|
+
});
|
|
26
|
+
ref.current[key]?.(event);
|
|
27
|
+
};
|
|
28
|
+
const ss = wrap('onSequenceStart');
|
|
29
|
+
const se = wrap('onSequenceEnd');
|
|
30
|
+
const ts = wrap('onStepStart');
|
|
31
|
+
const te = wrap('onStepEnd');
|
|
32
|
+
if (handlers.onSequenceStart)
|
|
33
|
+
AnimationsManager.on('sequenceStart', ss);
|
|
34
|
+
if (handlers.onSequenceEnd)
|
|
35
|
+
AnimationsManager.on('sequenceEnd', se);
|
|
36
|
+
if (handlers.onStepStart)
|
|
37
|
+
AnimationsManager.on('stepStart', ts);
|
|
38
|
+
if (handlers.onStepEnd)
|
|
39
|
+
AnimationsManager.on('stepEnd', te);
|
|
40
|
+
return () => {
|
|
41
|
+
debugLog('unsubscribing');
|
|
42
|
+
AnimationsManager.off('sequenceStart', ss);
|
|
43
|
+
AnimationsManager.off('sequenceEnd', se);
|
|
44
|
+
AnimationsManager.off('stepStart', ts);
|
|
45
|
+
AnimationsManager.off('stepEnd', te);
|
|
46
|
+
};
|
|
47
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
|
+
}, []);
|
|
49
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PerspectiveCamera } from 'three';
|
|
2
|
+
import { type CameraState, type QuaternionArray, type Vector3Array } from "@3driseai/3drise-core";
|
|
3
|
+
interface UseCameraAnimationOptions {
|
|
4
|
+
autoAnimate?: boolean;
|
|
5
|
+
defaultDuration?: number;
|
|
6
|
+
defaultEase?: string;
|
|
7
|
+
onAnimationStart?: () => void;
|
|
8
|
+
onAnimationComplete?: () => void;
|
|
9
|
+
onAnimationUpdate?: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface CameraAnimationTarget {
|
|
12
|
+
position?: Vector3Array;
|
|
13
|
+
orientation?: QuaternionArray | Vector3Array;
|
|
14
|
+
fov?: number;
|
|
15
|
+
near?: number;
|
|
16
|
+
far?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const useCameraAnimation: (options?: UseCameraAnimationOptions, cameraState?: CameraState) => {
|
|
19
|
+
cameraState: CameraState;
|
|
20
|
+
isAnimating: () => boolean;
|
|
21
|
+
animateHandlers: (pointer: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}) => void;
|
|
25
|
+
animateCamera: (target: CameraAnimationTarget, duration?: number, ease?: string, lookAtTarget?: Vector3Array) => Promise<void>;
|
|
26
|
+
animateToPosition: (position: Vector3Array, duration?: number, ease?: string) => Promise<void>;
|
|
27
|
+
animateToOrientation: (orientation: QuaternionArray, duration?: number, ease?: string) => Promise<void>;
|
|
28
|
+
animateToFov: (fov: number, duration?: number, ease?: string) => Promise<void>;
|
|
29
|
+
lookAt: (target: Vector3Array, animated?: boolean, duration?: number, ease?: string) => Promise<void>;
|
|
30
|
+
orbitAroundTarget: (target: Vector3Array, radius: number, startAngle?: number, endAngle?: number, duration?: number, ease?: string) => Promise<void>;
|
|
31
|
+
killAnimation: () => void;
|
|
32
|
+
camera: PerspectiveCamera | null;
|
|
33
|
+
};
|
|
34
|
+
export default useCameraAnimation;
|
|
35
|
+
//# sourceMappingURL=useCameraAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCameraAnimation.d.ts","sourceRoot":"","sources":["../../src/hooks/useCameraAnimation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAClG,UAAU,yBAAyB;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,UAAU,qBAAqB;IAC3B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,eAAO,MAAM,kBAAkB,GAAI,UAAS,yBAA8B,EAAE,cAAa,WAAuB,KAAG;IAC3G,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,eAAe,EAAE,CAAC,OAAO,EAAE;QACvB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACb,KAAK,IAAI,CAAC;IACX,aAAa,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/H,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,oBAAoB,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxG,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/E,MAAM,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtG,iBAAiB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrJ,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;CA8QxC,CAAC;AACF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { useRef, useEffect } from 'react';
|
|
2
|
+
import { Quaternion } from 'three';
|
|
3
|
+
import gsap from 'gsap';
|
|
4
|
+
import { useMouseHandlers } from './useMouseHandlers.js';
|
|
5
|
+
import { useOrbitControls } from './useOrbitControls.js';
|
|
6
|
+
import cameraManager from '../utils/CameraSingleton.js';
|
|
7
|
+
export const useCameraAnimation = (options = {}, cameraState = {}) => {
|
|
8
|
+
const { autoAnimate = true, defaultDuration = 2, defaultEase = "power2.out", onAnimationStart, onAnimationComplete, onAnimationUpdate } = options;
|
|
9
|
+
// const cameraState = useAppSelector(selectCamera);
|
|
10
|
+
const { interpolateProperty } = useMouseHandlers();
|
|
11
|
+
const orbitControls = useOrbitControls();
|
|
12
|
+
const cameraRef = useRef(null);
|
|
13
|
+
const animationRef = useRef(null);
|
|
14
|
+
const isAnimatingRef = useRef(false);
|
|
15
|
+
const handlers = cameraState.mouseMove;
|
|
16
|
+
// Keep cameraRef synced with the singleton. The hook may be initialized
|
|
17
|
+
// before the host component's effect calls cameraManager.setCamera(...),
|
|
18
|
+
// so a one-shot backfill races and leaves the ref null in production.
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
cameraRef.current = cameraManager.getCamera();
|
|
21
|
+
return cameraManager.subscribe(() => {
|
|
22
|
+
cameraRef.current = cameraManager.getCamera();
|
|
23
|
+
});
|
|
24
|
+
}, []);
|
|
25
|
+
// Kill any running animation
|
|
26
|
+
const killAnimation = () => {
|
|
27
|
+
if (animationRef.current) {
|
|
28
|
+
animationRef.current.kill();
|
|
29
|
+
animationRef.current = null;
|
|
30
|
+
}
|
|
31
|
+
isAnimatingRef.current = false;
|
|
32
|
+
};
|
|
33
|
+
// Animate camera to target values
|
|
34
|
+
const animateCamera = (target, duration = defaultDuration, ease = defaultEase, lookAtTarget) => {
|
|
35
|
+
const cam = cameraRef.current;
|
|
36
|
+
// console.log("animateCamera called with cam:", cam);
|
|
37
|
+
if (!cam)
|
|
38
|
+
return Promise.resolve();
|
|
39
|
+
// Kill any existing animation
|
|
40
|
+
killAnimation();
|
|
41
|
+
// console.log('animateCamera', duration, ease)
|
|
42
|
+
return new Promise((resolve) => {
|
|
43
|
+
// console.log("Animating camera with target:", target, "duration:", duration, "ease:", ease);
|
|
44
|
+
const timeline = gsap.timeline({
|
|
45
|
+
onStart: () => {
|
|
46
|
+
isAnimatingRef.current = true;
|
|
47
|
+
onAnimationStart?.();
|
|
48
|
+
},
|
|
49
|
+
onUpdate: () => {
|
|
50
|
+
// Update projection matrix if FOV changed
|
|
51
|
+
if (target.fov !== undefined || target.near !== undefined || target.far !== undefined) {
|
|
52
|
+
cam.updateProjectionMatrix();
|
|
53
|
+
}
|
|
54
|
+
onAnimationUpdate?.();
|
|
55
|
+
},
|
|
56
|
+
onComplete: () => {
|
|
57
|
+
isAnimatingRef.current = false;
|
|
58
|
+
animationRef.current = null;
|
|
59
|
+
onAnimationComplete?.();
|
|
60
|
+
resolve();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
// Animate position
|
|
64
|
+
if (target.position) {
|
|
65
|
+
console.log("Animating camera to position:", target.position, duration, ease);
|
|
66
|
+
timeline.to(cam.position, {
|
|
67
|
+
x: target.position[0],
|
|
68
|
+
y: target.position[1],
|
|
69
|
+
z: target.position[2],
|
|
70
|
+
duration,
|
|
71
|
+
ease
|
|
72
|
+
}, 0);
|
|
73
|
+
}
|
|
74
|
+
// Animate orientation
|
|
75
|
+
if (target.orientation) {
|
|
76
|
+
if (target.orientation.length === 3) {
|
|
77
|
+
// Euler angles
|
|
78
|
+
timeline.to(cam.rotation, {
|
|
79
|
+
x: target.orientation[0],
|
|
80
|
+
y: target.orientation[1],
|
|
81
|
+
z: target.orientation[2],
|
|
82
|
+
duration,
|
|
83
|
+
ease
|
|
84
|
+
}, 0);
|
|
85
|
+
}
|
|
86
|
+
else if (target.orientation.length === 4) {
|
|
87
|
+
// Quaternion - convert to current quaternion and animate
|
|
88
|
+
const targetQuat = new Quaternion(target.orientation[0], target.orientation[1], target.orientation[2], target.orientation[3]);
|
|
89
|
+
const currentQuat = cam.quaternion.clone();
|
|
90
|
+
timeline.to({ t: 0 }, {
|
|
91
|
+
t: 1,
|
|
92
|
+
duration,
|
|
93
|
+
ease,
|
|
94
|
+
onUpdate: function () {
|
|
95
|
+
const t = this.targets()[0].t;
|
|
96
|
+
cam.quaternion.slerpQuaternions(currentQuat, targetQuat, t);
|
|
97
|
+
}
|
|
98
|
+
}, 0);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Animate FOV
|
|
102
|
+
if (target.fov !== undefined) {
|
|
103
|
+
timeline.to(cam, {
|
|
104
|
+
fov: target.fov,
|
|
105
|
+
duration,
|
|
106
|
+
ease
|
|
107
|
+
}, 0);
|
|
108
|
+
}
|
|
109
|
+
// Animate clipping planes
|
|
110
|
+
if (target.near !== undefined) {
|
|
111
|
+
timeline.to(cam, {
|
|
112
|
+
near: target.near,
|
|
113
|
+
duration,
|
|
114
|
+
ease
|
|
115
|
+
}, 0);
|
|
116
|
+
}
|
|
117
|
+
if (target.far !== undefined) {
|
|
118
|
+
timeline.to(cam, {
|
|
119
|
+
far: target.far,
|
|
120
|
+
duration,
|
|
121
|
+
ease
|
|
122
|
+
}, 0);
|
|
123
|
+
}
|
|
124
|
+
// If lookAt target provided, animate the controls.target
|
|
125
|
+
// console.log("Animating camera with lookAtTarget:", lookAtTarget, orbitControls);
|
|
126
|
+
if (lookAtTarget && orbitControls) {
|
|
127
|
+
timeline.to(orbitControls.target, {
|
|
128
|
+
x: lookAtTarget[0],
|
|
129
|
+
y: lookAtTarget[1],
|
|
130
|
+
z: lookAtTarget[2],
|
|
131
|
+
duration,
|
|
132
|
+
ease
|
|
133
|
+
}, 0);
|
|
134
|
+
}
|
|
135
|
+
animationRef.current = timeline;
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
// Animate to position
|
|
139
|
+
const animateToPosition = (position, duration, ease) => {
|
|
140
|
+
return animateCamera({ position }, duration, ease);
|
|
141
|
+
};
|
|
142
|
+
const applyInterpolatedValue = (property, interpolatedValue, valueType) => {
|
|
143
|
+
switch (valueType) {
|
|
144
|
+
case 'vector3':
|
|
145
|
+
if (Array.isArray(interpolatedValue)) {
|
|
146
|
+
cameraRef.current[property].set(interpolatedValue[0], interpolatedValue[1], interpolatedValue[2]);
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
case 'number':
|
|
150
|
+
cameraRef.current[property] = interpolatedValue;
|
|
151
|
+
break;
|
|
152
|
+
default:
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
// Animate to orientation
|
|
157
|
+
const animateToOrientation = (orientation, duration, ease) => {
|
|
158
|
+
return animateCamera({ orientation }, duration, ease);
|
|
159
|
+
};
|
|
160
|
+
const animateHandlers = (pointer) => {
|
|
161
|
+
// if (!handlers?.onMouseMove?.enabled || !handlers.onMouseMove.properties.length || !cameraRef.current) {
|
|
162
|
+
// return;
|
|
163
|
+
// }
|
|
164
|
+
// handlers.onMouseMove.properties.forEach((props) => {
|
|
165
|
+
// const { property, propertySettings } = props;
|
|
166
|
+
// const { min: minValue, max: maxValue, axis, sensitivity = 1, inverted = false } = propertySettings;
|
|
167
|
+
// // Determine base value and property type
|
|
168
|
+
// let baseValue = (cameraState as any)[property];
|
|
169
|
+
// if (!baseValue) return;
|
|
170
|
+
// const interpolatedValue = interpolateProperty(
|
|
171
|
+
// baseValue,
|
|
172
|
+
// minValue,
|
|
173
|
+
// maxValue,
|
|
174
|
+
// pointer,
|
|
175
|
+
// axis,
|
|
176
|
+
// sensitivity,
|
|
177
|
+
// inverted
|
|
178
|
+
// );
|
|
179
|
+
// const valueType = getType(property, interpolatedValue);
|
|
180
|
+
// // Update cam directly
|
|
181
|
+
// if ((cameraRef.current as any)[property] !== undefined) {
|
|
182
|
+
// applyInterpolatedValue(property, interpolatedValue, valueType);
|
|
183
|
+
// }
|
|
184
|
+
// });
|
|
185
|
+
};
|
|
186
|
+
// Animate FOV
|
|
187
|
+
const animateToFov = (fov, duration, ease) => {
|
|
188
|
+
return animateCamera({ fov }, duration, ease);
|
|
189
|
+
};
|
|
190
|
+
// Look at target
|
|
191
|
+
const lookAt = (target, animated = autoAnimate, duration, ease) => {
|
|
192
|
+
const cam = cameraRef.current;
|
|
193
|
+
if (!cam)
|
|
194
|
+
return Promise.resolve();
|
|
195
|
+
if (!animated && target.length >= 3) {
|
|
196
|
+
cam.lookAt(target[0], target[1], target[2]);
|
|
197
|
+
return Promise.resolve();
|
|
198
|
+
}
|
|
199
|
+
// Calculate target rotation for animation
|
|
200
|
+
if (target.length < 3)
|
|
201
|
+
return Promise.resolve();
|
|
202
|
+
const tempCamera = cam.clone();
|
|
203
|
+
tempCamera.lookAt(target[0], target[1], target[2]);
|
|
204
|
+
const targetOrientation = [
|
|
205
|
+
tempCamera.rotation.x,
|
|
206
|
+
tempCamera.rotation.y,
|
|
207
|
+
tempCamera.rotation.z,
|
|
208
|
+
1
|
|
209
|
+
];
|
|
210
|
+
return animateToOrientation(targetOrientation, duration, ease);
|
|
211
|
+
};
|
|
212
|
+
// Orbit around target
|
|
213
|
+
const orbitAroundTarget = (target, radius, startAngle = 0, endAngle = Math.PI * 2, duration, ease) => {
|
|
214
|
+
const cam = cameraRef.current;
|
|
215
|
+
if (!cam)
|
|
216
|
+
return Promise.resolve();
|
|
217
|
+
killAnimation();
|
|
218
|
+
return new Promise((resolve) => {
|
|
219
|
+
const timeline = gsap.timeline({
|
|
220
|
+
onStart: () => {
|
|
221
|
+
isAnimatingRef.current = true;
|
|
222
|
+
onAnimationStart?.();
|
|
223
|
+
},
|
|
224
|
+
onComplete: () => {
|
|
225
|
+
isAnimatingRef.current = false;
|
|
226
|
+
animationRef.current = null;
|
|
227
|
+
onAnimationComplete?.();
|
|
228
|
+
resolve();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
timeline.to({ angle: startAngle }, {
|
|
232
|
+
angle: endAngle,
|
|
233
|
+
duration: duration || defaultDuration,
|
|
234
|
+
ease: ease || defaultEase,
|
|
235
|
+
onUpdate: function () {
|
|
236
|
+
if (target.length < 3)
|
|
237
|
+
return;
|
|
238
|
+
const angle = this.targets()[0].angle;
|
|
239
|
+
const x = target[0] + Math.cos(angle) * radius;
|
|
240
|
+
const z = target[2] + Math.sin(angle) * radius;
|
|
241
|
+
cam.position.set(x, cam.position.y, z);
|
|
242
|
+
cam.lookAt(target[0], target[1], target[2]);
|
|
243
|
+
onAnimationUpdate?.();
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
animationRef.current = timeline;
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
// Check if camera is currently animating
|
|
250
|
+
const isAnimating = () => {
|
|
251
|
+
return isAnimatingRef.current;
|
|
252
|
+
};
|
|
253
|
+
// Cleanup on unmount
|
|
254
|
+
useEffect(() => {
|
|
255
|
+
return () => {
|
|
256
|
+
killAnimation();
|
|
257
|
+
};
|
|
258
|
+
}, []);
|
|
259
|
+
return {
|
|
260
|
+
// State
|
|
261
|
+
cameraState,
|
|
262
|
+
isAnimating,
|
|
263
|
+
animateHandlers,
|
|
264
|
+
// Animation methods
|
|
265
|
+
animateCamera,
|
|
266
|
+
animateToPosition,
|
|
267
|
+
animateToOrientation,
|
|
268
|
+
animateToFov,
|
|
269
|
+
lookAt,
|
|
270
|
+
orbitAroundTarget,
|
|
271
|
+
// Control methods
|
|
272
|
+
killAnimation,
|
|
273
|
+
// Camera reference
|
|
274
|
+
camera: cameraRef.current
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
export default useCameraAnimation;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CreatedObjectSettings, EffectState } from '@3driseai/3drise-core';
|
|
2
|
+
import { Object3D } from "three";
|
|
3
|
+
export interface UseContinuousEffectsOptions {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
animateMaterial?: boolean;
|
|
6
|
+
hovered?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface UseContinuousEffectsResult {
|
|
9
|
+
isPathAnimating: () => boolean;
|
|
10
|
+
effectStateRef: React.MutableRefObject<EffectState | null>;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEBUG_CONTINUOUS_EFFECTS = false;
|
|
13
|
+
export declare const useContinuousEffects: (objectSettings: CreatedObjectSettings | null, options: UseContinuousEffectsOptions, object: Object3D) => UseContinuousEffectsResult;
|
|
14
|
+
export default useContinuousEffects;
|
|
15
|
+
//# sourceMappingURL=useContinuousEffects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContinuousEffects.d.ts","sourceRoot":"","sources":["../../src/hooks/useContinuousEffects.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,MAAM,WAAW,2BAA2B;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACvC,eAAe,EAAE,MAAM,OAAO,CAAC;IAC/B,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC9D;AAMD,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAM9C,eAAO,MAAM,oBAAoB,GAEjC,gBAAgB,qBAAqB,GAAG,IAAI,EAAE,SAAS,2BAAgC,EAAE,QAAQ,QAAQ,KAAG,0BAgK3G,CAAC;AACF,eAAe,oBAAoB,CAAC"}
|