@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,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Object3D } from "three";
|
|
3
|
+
import type { ThreeEvent } from "@react-three/fiber";
|
|
4
|
+
import type { AnimatedTransform, AnchorSettings, CreatedObjectSettings } from "@3driseai/3drise-core";
|
|
5
|
+
export interface AnimatedObjectProps {
|
|
6
|
+
stateKey: string;
|
|
7
|
+
transitionSettings: AnimatedTransform;
|
|
8
|
+
createdObject: CreatedObjectSettings;
|
|
9
|
+
speed?: number;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
parentRef?: React.RefObject<Object3D>;
|
|
13
|
+
handleObjectClick?: (createdObject: CreatedObjectSettings, ref: Object3D, event: ThreeEvent<MouseEvent>) => void;
|
|
14
|
+
onPointerEnter?: (e: ThreeEvent<PointerEvent>) => void;
|
|
15
|
+
onPointerLeave?: (e: ThreeEvent<PointerEvent>) => void;
|
|
16
|
+
anchor?: AnchorSettings | null;
|
|
17
|
+
hovered?: boolean;
|
|
18
|
+
animateMaterial?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const AnimatedObject: React.FC<AnimatedObjectProps>;
|
|
21
|
+
export default AnimatedObject;
|
|
22
|
+
//# sourceMappingURL=AnimatedObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedObject.d.ts","sourceRoot":"","sources":["../../src/components/AnimatedObject.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACtG,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,aAAa,EAAE,qBAAqB,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACtC,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACjH,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IACvD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IACvD,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAGD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwDvD,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect, useCallback, memo } from 'react';
|
|
3
|
+
import { usePathAnimation } from '../hooks/usePathAnimation.js';
|
|
4
|
+
import EffectsGroup from './EffectsGroup.js';
|
|
5
|
+
import { useObjectAnimation } from '../hooks/useObjectAnimation.js';
|
|
6
|
+
import { hasHoverAnimation } from '../utils/hasHoverAnimation.js';
|
|
7
|
+
export const AnimatedObject = memo(({ stateKey, transitionSettings, createdObject,
|
|
8
|
+
// speed = 1,
|
|
9
|
+
visible = true, children, parentRef, handleObjectClick, onPointerEnter, onPointerLeave, anchor, hovered = false, animateMaterial = true,
|
|
10
|
+
// isActive = false,
|
|
11
|
+
}) => {
|
|
12
|
+
const internalRef = useRef(null);
|
|
13
|
+
const groupRef = parentRef ?? internalRef;
|
|
14
|
+
const { position, scale, rotation, targetPosition, targetScale, targetRotation } = transitionSettings;
|
|
15
|
+
const animationStartTime = useRef(null);
|
|
16
|
+
const stepDuration = useRef(1);
|
|
17
|
+
const stepEase = useRef('linear');
|
|
18
|
+
const animProgress = useRef(0);
|
|
19
|
+
const hasHoverFunctionalities = hasHoverAnimation(createdObject.animations);
|
|
20
|
+
const hasMouseInteraction = (createdObject.actions?.length ?? 0) > 0;
|
|
21
|
+
const baseRef = useRef({ position: [...position], scale: [...scale], rotation: [...rotation] });
|
|
22
|
+
const targetRef = useRef({
|
|
23
|
+
position: targetPosition ? [...targetPosition] : [...position],
|
|
24
|
+
scale: targetScale ? [...targetScale] : [...scale],
|
|
25
|
+
rotation: targetRotation ? [...targetRotation] : [...rotation],
|
|
26
|
+
});
|
|
27
|
+
useObjectAnimation(createdObject, animateMaterial, {
|
|
28
|
+
enabled: createdObject.type !== 'gallery', //
|
|
29
|
+
hovered,
|
|
30
|
+
});
|
|
31
|
+
const { startPathAnimation, updatePathAnimation, isAnimating: isPathAnimating } = usePathAnimation();
|
|
32
|
+
const syncTransform = useCallback(() => {
|
|
33
|
+
const obj = groupRef.current;
|
|
34
|
+
if (!obj)
|
|
35
|
+
return;
|
|
36
|
+
baseRef.current = { position: [...position], scale: [...scale], rotation: [...rotation] };
|
|
37
|
+
targetRef.current = {
|
|
38
|
+
position: targetPosition ? [...targetPosition] : [...position],
|
|
39
|
+
scale: targetScale ? [...targetScale] : [...scale],
|
|
40
|
+
rotation: targetRotation ? [...targetRotation] : [...rotation],
|
|
41
|
+
};
|
|
42
|
+
obj.position.set(...position);
|
|
43
|
+
obj.scale.set(...scale);
|
|
44
|
+
obj.rotation.set(...rotation);
|
|
45
|
+
if (targetPosition || targetScale || targetRotation)
|
|
46
|
+
animProgress.current = 0;
|
|
47
|
+
}, [position, scale, rotation, targetPosition, targetScale, targetRotation]);
|
|
48
|
+
useEffect(() => { syncTransform(); }, [position, scale, rotation, targetPosition, targetScale, targetRotation]);
|
|
49
|
+
const onClick = (e) => {
|
|
50
|
+
if (handleObjectClick && groupRef.current) {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
handleObjectClick(createdObject, groupRef.current, e);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
// console.log("AnimatedObject render", { name: createdObject.meshSettings.name, id: createdObject.id, hovered, hasHoverFunctionalities })
|
|
56
|
+
if (createdObject.type === 'particles' || createdObject.type === 'gallery' || (!hasHoverFunctionalities && !hasMouseInteraction)) {
|
|
57
|
+
return _jsx(_Fragment, { children: _jsxs("group", { ref: groupRef, position: position, scale: scale, rotation: rotation, visible: visible, onClick: onClick,
|
|
58
|
+
// onPointerEnter={onPointerEnter}
|
|
59
|
+
// onPointerLeave={onPointerLeave}
|
|
60
|
+
name: createdObject.meshSettings.name, userData: { id: createdObject.id }, children: [children, _jsx(EffectsGroup, { createdObject: createdObject })] }) });
|
|
61
|
+
}
|
|
62
|
+
return (_jsx(_Fragment, { children: _jsxs("group", { ref: groupRef, position: position, scale: scale, rotation: rotation, visible: visible, onClick: onClick, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, name: createdObject.meshSettings.name, userData: { id: createdObject.id }, children: [children, _jsx(EffectsGroup, { createdObject: createdObject })] }) }));
|
|
63
|
+
});
|
|
64
|
+
AnimatedObject.displayName = 'AnimatedObject';
|
|
65
|
+
export default AnimatedObject;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BubblesConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface BubblesProps {
|
|
4
|
+
config: BubblesConfig;
|
|
5
|
+
boundingRadius?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const Bubbles: React.FC<BubblesProps>;
|
|
8
|
+
export default Bubbles;
|
|
9
|
+
//# sourceMappingURL=Bubbles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bubbles.d.ts","sourceRoot":"","sources":["../../src/components/Bubbles.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAiGnC,CAAC;AACF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
3
|
+
import { useFrame } from '@react-three/fiber';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { BubblesPointsMaterial } from '@3driseai/3drise-core';
|
|
6
|
+
const MAX_BUBBLES = 256;
|
|
7
|
+
const Bubbles = ({ config }) => {
|
|
8
|
+
const positions = useMemo(() => new Float32Array(MAX_BUBBLES * 3), []);
|
|
9
|
+
const velocities = useMemo(() => new Float32Array(MAX_BUBBLES * 3), []);
|
|
10
|
+
const ages = useMemo(() => new Float32Array(MAX_BUBBLES), []);
|
|
11
|
+
const lives = useMemo(() => new Float32Array(MAX_BUBBLES), []);
|
|
12
|
+
const baseSizes = useMemo(() => new Float32Array(MAX_BUBBLES), []);
|
|
13
|
+
const phases = useMemo(() => new Float32Array(MAX_BUBBLES), []);
|
|
14
|
+
const alive = useMemo(() => new Uint8Array(MAX_BUBBLES), []);
|
|
15
|
+
const geometry = useMemo(() => {
|
|
16
|
+
const g = new THREE.BufferGeometry();
|
|
17
|
+
g.setAttribute('position', new THREE.BufferAttribute(positions, 3));
|
|
18
|
+
g.setAttribute('aAge', new THREE.BufferAttribute(ages, 1));
|
|
19
|
+
g.setAttribute('aLife', new THREE.BufferAttribute(lives, 1));
|
|
20
|
+
g.setAttribute('aBaseSize', new THREE.BufferAttribute(baseSizes, 1));
|
|
21
|
+
g.setAttribute('aPhase', new THREE.BufferAttribute(phases, 1));
|
|
22
|
+
for (let i = 0; i < MAX_BUBBLES; i++)
|
|
23
|
+
positions[i * 3 + 1] = -1e6;
|
|
24
|
+
return g;
|
|
25
|
+
}, [positions, ages, lives, baseSizes, phases]);
|
|
26
|
+
const material = useMemo(() => {
|
|
27
|
+
const m = new BubblesPointsMaterial();
|
|
28
|
+
m.transparent = true;
|
|
29
|
+
m.depthWrite = false;
|
|
30
|
+
m.blending = THREE.NormalBlending;
|
|
31
|
+
return m;
|
|
32
|
+
}, []);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const u = material.uniforms;
|
|
35
|
+
const [cA, cB, cC] = config.colors ?? ['#aaccff', '#ffaadd', '#aaffcc'];
|
|
36
|
+
u.uColorA.value.set(cA);
|
|
37
|
+
u.uColorB.value.set(cB);
|
|
38
|
+
u.uColorC.value.set(cC);
|
|
39
|
+
u.uScale.value = (config.scale ?? 1) / 10;
|
|
40
|
+
u.uOpacity.value = config.opacity ?? 0.6;
|
|
41
|
+
u.uIridescence.value = config.iridescence ?? 0.7;
|
|
42
|
+
u.uSpeed.value = config.speed ?? 1;
|
|
43
|
+
}, [config.colors, config.scale, config.opacity, config.iridescence, config.speed, material]);
|
|
44
|
+
useEffect(() => () => { geometry.dispose(); material.dispose(); }, [geometry, material]);
|
|
45
|
+
const spawnAccum = useRef(0);
|
|
46
|
+
useFrame((state, delta) => {
|
|
47
|
+
material.uniforms.uTime.value = state.clock.getElapsedTime();
|
|
48
|
+
const scale = config.scale ?? 1;
|
|
49
|
+
const spawnRate = config.spawnRate ?? 8;
|
|
50
|
+
const floatSpeed = (config.floatSpeed ?? 0.5) * (config.speed ?? 1);
|
|
51
|
+
const lifetimeMs = config.lifetimeMs ?? 4000;
|
|
52
|
+
const speed = config.speed ?? 1;
|
|
53
|
+
spawnAccum.current += spawnRate * delta;
|
|
54
|
+
let toSpawn = Math.floor(spawnAccum.current);
|
|
55
|
+
spawnAccum.current -= toSpawn;
|
|
56
|
+
const dtMs = delta * 1000 * speed;
|
|
57
|
+
let scan = 0;
|
|
58
|
+
while (toSpawn > 0 && scan < MAX_BUBBLES) {
|
|
59
|
+
if (alive[scan] === 0) {
|
|
60
|
+
const base = scan * 3;
|
|
61
|
+
// Spawn at local origin with small lateral jitter — parent group's
|
|
62
|
+
// transform places the system in world space.
|
|
63
|
+
positions[base + 0] = (Math.random() - 0.5) * 0.2 * scale;
|
|
64
|
+
positions[base + 1] = (Math.random() - 0.5) * 0.1 * scale;
|
|
65
|
+
positions[base + 2] = (Math.random() - 0.5) * 0.2 * scale;
|
|
66
|
+
velocities[base + 0] = (Math.random() - 0.5) * 0.4;
|
|
67
|
+
velocities[base + 1] = floatSpeed * (0.7 + Math.random() * 0.6);
|
|
68
|
+
velocities[base + 2] = (Math.random() - 0.5) * 0.4;
|
|
69
|
+
ages[scan] = 0;
|
|
70
|
+
lives[scan] = lifetimeMs * (0.7 + Math.random() * 0.6);
|
|
71
|
+
baseSizes[scan] = (16 + Math.random() * 28) * (scale / 10);
|
|
72
|
+
phases[scan] = Math.random() * 100;
|
|
73
|
+
alive[scan] = 1;
|
|
74
|
+
toSpawn--;
|
|
75
|
+
}
|
|
76
|
+
scan++;
|
|
77
|
+
}
|
|
78
|
+
for (let j = 0; j < MAX_BUBBLES; j++) {
|
|
79
|
+
if (alive[j] === 0)
|
|
80
|
+
continue;
|
|
81
|
+
const base = j * 3;
|
|
82
|
+
ages[j] += dtMs;
|
|
83
|
+
if (ages[j] >= lives[j]) {
|
|
84
|
+
alive[j] = 0;
|
|
85
|
+
positions[base + 1] = -1e6;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
velocities[base + 0] *= 0.99;
|
|
89
|
+
velocities[base + 2] *= 0.99;
|
|
90
|
+
const wobble = Math.sin(state.clock.getElapsedTime() * 1.3 * speed + phases[j]) * 0.05;
|
|
91
|
+
positions[base + 0] += velocities[base + 0] * delta + wobble * delta;
|
|
92
|
+
positions[base + 1] += velocities[base + 1] * delta;
|
|
93
|
+
positions[base + 2] += velocities[base + 2] * delta;
|
|
94
|
+
}
|
|
95
|
+
geometry.attributes.position.needsUpdate = true;
|
|
96
|
+
geometry.attributes.aAge.needsUpdate = true;
|
|
97
|
+
geometry.attributes.aLife.needsUpdate = true;
|
|
98
|
+
geometry.attributes.aBaseSize.needsUpdate = true;
|
|
99
|
+
geometry.attributes.aPhase.needsUpdate = true;
|
|
100
|
+
});
|
|
101
|
+
if (!config.enabled)
|
|
102
|
+
return null;
|
|
103
|
+
return _jsx("points", { geometry: geometry, material: material, frustumCulled: false });
|
|
104
|
+
};
|
|
105
|
+
export default Bubbles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CameraState } from "@3driseai/3drise-core";
|
|
2
|
+
interface CameraControllerProps {
|
|
3
|
+
settings: CameraState;
|
|
4
|
+
enableAutoAnimation?: boolean;
|
|
5
|
+
animationDuration?: number;
|
|
6
|
+
animationEase?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CameraController: React.FC<CameraControllerProps>;
|
|
9
|
+
export default CameraController;
|
|
10
|
+
//# sourceMappingURL=CameraController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraController.d.ts","sourceRoot":"","sources":["../../src/components/CameraController.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,UAAU,qBAAqB;IAC3B,QAAQ,EAAE,WAAW,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAGD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAoJ5D,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
|
+
import { useCameraAnimation } from '../hooks/useCameraAnimation.js';
|
|
5
|
+
import { cameraManager } from '../utils/CameraSingleton.js';
|
|
6
|
+
import { useAnimationEvents } from '../hooks/useAnimationEvents.js';
|
|
7
|
+
import { usePathAnimation } from '../hooks/usePathAnimation.js';
|
|
8
|
+
import { OrbitControls } from "@react-three/drei";
|
|
9
|
+
export const CameraController = ({ enableAutoAnimation = true, animationDuration = 1, animationEase = "power2.out", settings, }) => {
|
|
10
|
+
const { camera, set } = useThree();
|
|
11
|
+
const cameraRef = useRef(camera);
|
|
12
|
+
const transformAnimationProgress = useRef(0);
|
|
13
|
+
const controlsRef = useRef(null);
|
|
14
|
+
const { position, orientation, fov, near, far, controls } = settings;
|
|
15
|
+
const initialControls = useRef(controls);
|
|
16
|
+
const { startPathAnimation, updatePathAnimation, isAnimating: isPathAnimating, } = usePathAnimation();
|
|
17
|
+
// Use camera animation hook for animated transitions (via events)
|
|
18
|
+
const { animateCamera, animateHandlers, isAnimating } = useCameraAnimation({
|
|
19
|
+
autoAnimate: false,
|
|
20
|
+
defaultDuration: animationDuration,
|
|
21
|
+
defaultEase: animationEase
|
|
22
|
+
});
|
|
23
|
+
// Track if currently in an animated transition
|
|
24
|
+
const isInAnimatedTransition = useRef(false);
|
|
25
|
+
// Register camera with singleton on mount and when camera changes
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
cameraRef.current = camera;
|
|
28
|
+
set({ camera: cameraRef.current });
|
|
29
|
+
cameraManager.setCamera(cameraRef.current);
|
|
30
|
+
}, [camera, set]);
|
|
31
|
+
// Sync camera position and orientation from state (only when not animating)
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (isInAnimatedTransition.current || isAnimating())
|
|
34
|
+
return;
|
|
35
|
+
const cam = cameraRef.current;
|
|
36
|
+
if (!cam)
|
|
37
|
+
return;
|
|
38
|
+
// Check if camera is already synced
|
|
39
|
+
if (!cameraManager.isSynced(position, orientation)) {
|
|
40
|
+
cam.position.set(...position);
|
|
41
|
+
if (orientation.length === 4) {
|
|
42
|
+
cam.quaternion.set(...orientation);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
cam.rotation.set(orientation[0], orientation[1], orientation[2]);
|
|
46
|
+
}
|
|
47
|
+
console.log("CameraController: Synced position/orientation", position, orientation);
|
|
48
|
+
}
|
|
49
|
+
}, [position, orientation]);
|
|
50
|
+
// Sync controls config changes imperatively via ref (after initial mount)
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const orbitControls = controlsRef.current;
|
|
53
|
+
if (!orbitControls)
|
|
54
|
+
return;
|
|
55
|
+
orbitControls.enabled = controls.enabled;
|
|
56
|
+
orbitControls.target.set(controls.target[0], controls.target[1], controls.target[2]);
|
|
57
|
+
orbitControls.enablePan = controls.enablePan;
|
|
58
|
+
orbitControls.enableRotate = controls.enableRotate;
|
|
59
|
+
orbitControls.autoRotate = controls.autoRotate;
|
|
60
|
+
orbitControls.autoRotateSpeed = controls.autoRotateSpeed;
|
|
61
|
+
orbitControls.zoomSpeed = controls.zoomSpeed;
|
|
62
|
+
orbitControls.panSpeed = controls.panSpeed;
|
|
63
|
+
orbitControls.rotateSpeed = controls.rotateSpeed;
|
|
64
|
+
orbitControls.minDistance = controls.minDistance;
|
|
65
|
+
orbitControls.maxDistance = controls.maxDistance;
|
|
66
|
+
orbitControls.minPolarAngle = controls.minPolarAngle ?? -Infinity;
|
|
67
|
+
orbitControls.maxPolarAngle = controls.maxPolarAngle ?? Infinity;
|
|
68
|
+
orbitControls.minAzimuthAngle = controls.minAzimuthAngle ?? -Infinity;
|
|
69
|
+
orbitControls.maxAzimuthAngle = controls.maxAzimuthAngle ?? Infinity;
|
|
70
|
+
}, [controls]);
|
|
71
|
+
// Sync camera projection settings from state
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
const cam = cameraRef.current;
|
|
74
|
+
if (!cam)
|
|
75
|
+
return;
|
|
76
|
+
let needsUpdate = false;
|
|
77
|
+
if (cam.fov !== fov) {
|
|
78
|
+
cam.fov = fov;
|
|
79
|
+
needsUpdate = true;
|
|
80
|
+
}
|
|
81
|
+
if (cam.near !== near) {
|
|
82
|
+
cam.near = near;
|
|
83
|
+
needsUpdate = true;
|
|
84
|
+
}
|
|
85
|
+
if (cam.far !== far) {
|
|
86
|
+
cam.far = far;
|
|
87
|
+
needsUpdate = true;
|
|
88
|
+
}
|
|
89
|
+
if (needsUpdate) {
|
|
90
|
+
cam.updateProjectionMatrix();
|
|
91
|
+
}
|
|
92
|
+
}, [fov, near, far]);
|
|
93
|
+
// Handle animation events (step-based animations)
|
|
94
|
+
useAnimationEvents({
|
|
95
|
+
onStepStart: (event) => {
|
|
96
|
+
// console.log('Camera controller - Step started:', event.step);
|
|
97
|
+
if (event.step?.transitions) {
|
|
98
|
+
const stepDuration = event.step.duration || 1;
|
|
99
|
+
event.step.transitions.forEach((transition) => {
|
|
100
|
+
const { state, properties, pathId } = transition;
|
|
101
|
+
if (state === 'camera') {
|
|
102
|
+
console.log('Camera transition detected. Starting animation to new camera state:', properties);
|
|
103
|
+
isInAnimatedTransition.current = true;
|
|
104
|
+
if (pathId) {
|
|
105
|
+
const offset = camera
|
|
106
|
+
? [camera.position.x, camera.position.y, camera.position.z]
|
|
107
|
+
: [0, 0, 0];
|
|
108
|
+
console.log(`Starting path animation with ID ${pathId} and offset`, offset);
|
|
109
|
+
startPathAnimation(pathId, stepDuration, {
|
|
110
|
+
offset,
|
|
111
|
+
applyRotation: false
|
|
112
|
+
});
|
|
113
|
+
transformAnimationProgress.current = 0;
|
|
114
|
+
}
|
|
115
|
+
// console.log("Animating camera to:", targetSettings, "over duration:", stepDuration);
|
|
116
|
+
const startSettings = properties.from ?
|
|
117
|
+
{
|
|
118
|
+
position: properties.from.position,
|
|
119
|
+
// orientation: properties.from.orientation,
|
|
120
|
+
} : {
|
|
121
|
+
position: camera.position,
|
|
122
|
+
// orientation: camera.rotation,
|
|
123
|
+
};
|
|
124
|
+
const targetSettings = properties.to;
|
|
125
|
+
// console.log("Starting camera animation from:", startSettings);
|
|
126
|
+
// startSettings.position && camera.position.set(startSettings.position[0], startSettings.position[1], startSettings.position[2]);
|
|
127
|
+
// camera.rotation.set(startSettings.orientation[0], startSettings.orientation[1], startSettings.orientation[2]);
|
|
128
|
+
animateCamera(targetSettings, stepDuration, event.step?.ease, properties.to.target)
|
|
129
|
+
.then(() => {
|
|
130
|
+
isInAnimatedTransition.current = false;
|
|
131
|
+
if (properties.to.target) {
|
|
132
|
+
controlsRef.current?.target.set(properties.to.target[0], properties.to.target[1], properties.to.target[2]);
|
|
133
|
+
}
|
|
134
|
+
;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
// Frame loop for path animations and mouse handlers
|
|
142
|
+
useFrame((state, delta) => {
|
|
143
|
+
if (isPathAnimating()) {
|
|
144
|
+
const stillAnimating = updatePathAnimation(delta, camera);
|
|
145
|
+
if (!stillAnimating) {
|
|
146
|
+
transformAnimationProgress.current = 1;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
animateHandlers(state.pointer);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
const ic = initialControls.current;
|
|
154
|
+
return _jsx(OrbitControls, { ref: controlsRef, makeDefault: true, enabled: ic.enabled,
|
|
155
|
+
// target={new Vector3(...ic.target)}
|
|
156
|
+
enablePan: ic.enablePan, enableRotate: ic.enableRotate, autoRotate: ic.autoRotate, autoRotateSpeed: ic.autoRotateSpeed, zoomSpeed: ic.zoomSpeed, panSpeed: ic.panSpeed, rotateSpeed: ic.rotateSpeed, minDistance: ic.minDistance, maxDistance: ic.maxDistance, minPolarAngle: ic.minPolarAngle ?? -Infinity, maxPolarAngle: ic.maxPolarAngle ?? Infinity, minAzimuthAngle: ic.minAzimuthAngle ?? -Infinity, maxAzimuthAngle: ic.maxAzimuthAngle ?? Infinity });
|
|
157
|
+
};
|
|
158
|
+
export default CameraController;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TimeSettings, CreatedObjectSettings } from '@3driseai/3drise-core';
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface CloudsProps {
|
|
4
|
+
settings: CreatedObjectSettings;
|
|
5
|
+
timeSettings?: TimeSettings;
|
|
6
|
+
}
|
|
7
|
+
declare const Clouds: React.FC<CloudsProps>;
|
|
8
|
+
export default Clouds;
|
|
9
|
+
//# sourceMappingURL=Clouds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Clouds.d.ts","sourceRoot":"","sources":["../../src/components/Clouds.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,qBAAqB,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAmFD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4LjC,CAAC;AACF,eAAe,MAAM,CAAC"}
|