@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,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SmokePlumeConfig, AnimationOptions } from "@3driseai/3drise-core";
|
|
3
|
+
interface SmokePlumeEffectProps {
|
|
4
|
+
boundingRadius: number;
|
|
5
|
+
config: SmokePlumeConfig;
|
|
6
|
+
animations?: AnimationOptions[];
|
|
7
|
+
}
|
|
8
|
+
declare const SmokePlumeEffect: React.FC<SmokePlumeEffectProps>;
|
|
9
|
+
export default SmokePlumeEffect;
|
|
10
|
+
//# sourceMappingURL=SmokePlumeEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmokePlumeEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokePlumeEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChF,UAAU,qBAAqB;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AA6ED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA4DrD,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useMemo } from 'react';
|
|
3
|
+
import { useFrame } from '@react-three/fiber';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { applyGenerativeAnimations } from '../../utils/handleGenerativeEffectsAnimations.js';
|
|
6
|
+
// ── Fully GPU-animated smoke puff vertex shader ───────────────────────────────
|
|
7
|
+
// Each particle has a lifetime t ∈ [0,1). It rises, expands, and billows.
|
|
8
|
+
// All motion driven by u_time — zero CPU writes per frame.
|
|
9
|
+
const smokeVert = /* glsl */ `
|
|
10
|
+
attribute float aT; // birth offset 0..1 → staggered spawn
|
|
11
|
+
attribute vec2 aBase; // (x,z) spawn footprint
|
|
12
|
+
attribute float aPhase; // per-particle noise phase
|
|
13
|
+
attribute float aRotOff; // per-particle billboard rotation offset
|
|
14
|
+
attribute float aSize; // per-particle max size
|
|
15
|
+
|
|
16
|
+
uniform float u_time;
|
|
17
|
+
uniform float u_speed;
|
|
18
|
+
uniform float uHeight;
|
|
19
|
+
uniform float uSpread;
|
|
20
|
+
uniform float uTurb;
|
|
21
|
+
uniform float uSizeScale;
|
|
22
|
+
|
|
23
|
+
varying float vLife; // 0=just born, 1=about to die
|
|
24
|
+
varying float vAlpha;
|
|
25
|
+
|
|
26
|
+
void main() {
|
|
27
|
+
// Age loops continuously
|
|
28
|
+
float life = fract(aT + u_time * u_speed * 0.22);
|
|
29
|
+
vLife = life;
|
|
30
|
+
|
|
31
|
+
// Footprint expands as smoke rises and dissipates
|
|
32
|
+
float expand = 1.0 + life * 2.5;
|
|
33
|
+
float x = aBase.x * expand * uSpread;
|
|
34
|
+
float z = aBase.y * expand * uSpread;
|
|
35
|
+
|
|
36
|
+
// Turbulent horizontal drift — two layers of sine turbulence
|
|
37
|
+
float t1 = sin(life * 4.2 + aPhase) * uTurb * uSpread * life * 0.9;
|
|
38
|
+
float t2 = sin(life * 7.1 + aPhase * 1.7 + 1.3) * uTurb * uSpread * life * 0.4;
|
|
39
|
+
float t3 = cos(life * 3.5 - aPhase * 0.8) * uTurb * uSpread * life * 0.3;
|
|
40
|
+
x += t1 + t2;
|
|
41
|
+
z += t3 + t2 * 0.5;
|
|
42
|
+
|
|
43
|
+
float y = life * uHeight - uHeight * 0.45;
|
|
44
|
+
|
|
45
|
+
// Particle grows from tiny to large, then fades to nothing
|
|
46
|
+
float growFade = smoothstep(0.0, 0.15, life) * smoothstep(1.0, 0.6, life);
|
|
47
|
+
float sz = aSize * uSizeScale * growFade;
|
|
48
|
+
|
|
49
|
+
// Alpha: ramp in quickly, stay opaque, fade out
|
|
50
|
+
vAlpha = growFade * growFade;
|
|
51
|
+
|
|
52
|
+
vec4 mv = modelViewMatrix * vec4(x, y, z, 1.0);
|
|
53
|
+
gl_PointSize = sz * (200.0 / -mv.z);
|
|
54
|
+
gl_Position = projectionMatrix * mv;
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const smokeFrag = /* glsl */ `
|
|
58
|
+
uniform vec3 uSmokeColor;
|
|
59
|
+
uniform float uOpacity;
|
|
60
|
+
varying float vLife;
|
|
61
|
+
varying float vAlpha;
|
|
62
|
+
|
|
63
|
+
void main() {
|
|
64
|
+
if (vAlpha < 0.01) discard;
|
|
65
|
+
|
|
66
|
+
vec2 c = gl_PointCoord - 0.5;
|
|
67
|
+
float d = length(c);
|
|
68
|
+
if (d > 0.5) discard;
|
|
69
|
+
|
|
70
|
+
// Soft gaussian puff — not a crisp disc
|
|
71
|
+
float g = exp(-d * d * 3.8);
|
|
72
|
+
|
|
73
|
+
// Slightly darken as smoke ages (hot white → grey → dark)
|
|
74
|
+
float darkening = 1.0 - vLife * 0.45;
|
|
75
|
+
vec3 col = uSmokeColor * darkening;
|
|
76
|
+
|
|
77
|
+
gl_FragColor = vec4(col, g * vAlpha * uOpacity);
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
const SmokePlumeEffect = ({ boundingRadius, config, animations }) => {
|
|
81
|
+
const { particleCount, height, spread, smokeColor, turbulence, opacity, speed, intensity } = config;
|
|
82
|
+
const startValuesCacheRef = useRef({});
|
|
83
|
+
const h = boundingRadius * height;
|
|
84
|
+
const s = boundingRadius * spread;
|
|
85
|
+
const { geo, mat } = useMemo(() => {
|
|
86
|
+
const N = Math.max(40, particleCount);
|
|
87
|
+
const aT = new Float32Array(N);
|
|
88
|
+
const aBase = new Float32Array(N * 2);
|
|
89
|
+
const aPhase = new Float32Array(N);
|
|
90
|
+
const aRotOff = new Float32Array(N);
|
|
91
|
+
const aSize = new Float32Array(N);
|
|
92
|
+
for (let i = 0; i < N; i++) {
|
|
93
|
+
aT[i] = i / N;
|
|
94
|
+
// Concentrate spawns near center, sparse toward edges
|
|
95
|
+
const r = Math.pow(Math.random(), 0.6) * s;
|
|
96
|
+
const a = Math.random() * Math.PI * 2;
|
|
97
|
+
aBase[i * 2] = Math.cos(a) * r;
|
|
98
|
+
aBase[i * 2 + 1] = Math.sin(a) * r;
|
|
99
|
+
aPhase[i] = Math.random() * Math.PI * 2;
|
|
100
|
+
aRotOff[i] = Math.random() * Math.PI * 2;
|
|
101
|
+
aSize[i] = 35 + Math.random() * 45; // puff screen size
|
|
102
|
+
}
|
|
103
|
+
const g = new THREE.BufferGeometry();
|
|
104
|
+
g.setAttribute('position', new THREE.BufferAttribute(new Float32Array(N * 3), 3));
|
|
105
|
+
g.setAttribute('aT', new THREE.BufferAttribute(aT, 1));
|
|
106
|
+
g.setAttribute('aBase', new THREE.BufferAttribute(aBase, 2));
|
|
107
|
+
g.setAttribute('aPhase', new THREE.BufferAttribute(aPhase, 1));
|
|
108
|
+
g.setAttribute('aRotOff', new THREE.BufferAttribute(aRotOff, 1));
|
|
109
|
+
g.setAttribute('aSize', new THREE.BufferAttribute(aSize, 1));
|
|
110
|
+
g.frustumCulled = false;
|
|
111
|
+
const sc = new THREE.Color(smokeColor);
|
|
112
|
+
const m = new THREE.ShaderMaterial({
|
|
113
|
+
vertexShader: smokeVert,
|
|
114
|
+
fragmentShader: smokeFrag,
|
|
115
|
+
uniforms: {
|
|
116
|
+
u_time: { value: 0 },
|
|
117
|
+
u_speed: { value: speed },
|
|
118
|
+
uHeight: { value: h },
|
|
119
|
+
uSpread: { value: s },
|
|
120
|
+
uTurb: { value: turbulence },
|
|
121
|
+
uSizeScale: { value: intensity },
|
|
122
|
+
uSmokeColor: { value: new THREE.Vector3(sc.r, sc.g, sc.b) },
|
|
123
|
+
uOpacity: { value: opacity },
|
|
124
|
+
},
|
|
125
|
+
transparent: true,
|
|
126
|
+
depthWrite: false,
|
|
127
|
+
// Normal blending (not additive) — smoke should look opaque/grey, not glowy
|
|
128
|
+
blending: THREE.NormalBlending,
|
|
129
|
+
});
|
|
130
|
+
return { geo: g, mat: m };
|
|
131
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
132
|
+
}, [particleCount, h, s, smokeColor, turbulence, opacity, speed, intensity]);
|
|
133
|
+
useFrame((state) => {
|
|
134
|
+
mat.uniforms.u_time.value = state.clock.getElapsedTime();
|
|
135
|
+
if (animations?.length) {
|
|
136
|
+
applyGenerativeAnimations([mat], animations, startValuesCacheRef.current, Date.now(), false);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
return _jsx("points", { geometry: geo, material: mat });
|
|
140
|
+
};
|
|
141
|
+
export default SmokePlumeEffect;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SmokeRibbonConfig } from '@3driseai/3drise-core';
|
|
2
|
+
export interface SmokeRibbonProps {
|
|
3
|
+
config?: SmokeRibbonConfig;
|
|
4
|
+
boundingRadius?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Place where you want the smoke to rise from — it climbs the parent's local +Y:
|
|
8
|
+
*
|
|
9
|
+
* <SmokeRibbon position={[0, 0, 0]} config={{ planes: 2, twistStart: 0.2 }} />
|
|
10
|
+
*/
|
|
11
|
+
declare const SmokeRibbon: ({ config, boundingRadius, ...groupProps }: SmokeRibbonProps) => import("react").JSX.Element;
|
|
12
|
+
export default SmokeRibbon;
|
|
13
|
+
//# sourceMappingURL=SmokeRibbon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmokeRibbon.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokeRibbon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,WAAW,GAAI,2CAAoD,gBAAgB,gCAyDxF,CAAC;AACF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PlaneGeometry } from 'three';
|
|
3
|
+
import { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
|
|
4
|
+
import { useFrame, useThree } from '@react-three/fiber';
|
|
5
|
+
import { SmokeRibbonMaterial } from '@3driseai/3drise-core';
|
|
6
|
+
/**
|
|
7
|
+
* Place where you want the smoke to rise from — it climbs the parent's local +Y:
|
|
8
|
+
*
|
|
9
|
+
* <SmokeRibbon position={[0, 0, 0]} config={{ planes: 2, twistStart: 0.2 }} />
|
|
10
|
+
*/
|
|
11
|
+
const SmokeRibbon = ({ config = {}, boundingRadius = 1, ...groupProps }) => {
|
|
12
|
+
const { width = 1.5, height = 5, segmentsPerLength = 12, planes = 2, color = '#f2f2f7', colorTop = '#b3b8c7', speed = 0.18, detail = 1.4, remapLow = 0.38, remapHigh = 1.0, edgeX = 0.4, edgeY = 0.32, density = 1.0, twistStrength = 9, twistSpeed = 0.4, twistScale = 0.9, twistStart = 0.18, wind = [0.15, 0], animate = true, interactive = false, } = config;
|
|
13
|
+
// One material instance shared across the crossed planes -> one set of uniforms.
|
|
14
|
+
const material = useMemo(() => new SmokeRibbonMaterial(), []);
|
|
15
|
+
// One subdivided plane, bottom at the origin; reused per crossed copy.
|
|
16
|
+
const geometry = useMemo(() => {
|
|
17
|
+
const g = new PlaneGeometry(boundingRadius ? boundingRadius : width, height, Math.max(1, Math.round((boundingRadius ? boundingRadius : width) * segmentsPerLength)), Math.max(1, Math.round(height * segmentsPerLength)));
|
|
18
|
+
g.translate(0, height / 2, 0);
|
|
19
|
+
return g;
|
|
20
|
+
}, [boundingRadius, width, height, segmentsPerLength]);
|
|
21
|
+
useEffect(() => () => geometry.dispose(), [geometry]);
|
|
22
|
+
useEffect(() => () => material.dispose(), [material]);
|
|
23
|
+
// Crossed-plane angles about Y.
|
|
24
|
+
const angles = useMemo(() => {
|
|
25
|
+
if (planes <= 1)
|
|
26
|
+
return [0];
|
|
27
|
+
if (planes === 2)
|
|
28
|
+
return [0, Math.PI / 2];
|
|
29
|
+
return [0, Math.PI / 3, (2 * Math.PI) / 3];
|
|
30
|
+
}, [planes]);
|
|
31
|
+
// Push the look config onto the shared uniforms whenever it changes.
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
material.u_color.set(color);
|
|
34
|
+
material.u_colorTop.set(colorTop);
|
|
35
|
+
material.u_speed = speed;
|
|
36
|
+
material.u_detail = detail;
|
|
37
|
+
material.u_remapLow = remapLow;
|
|
38
|
+
material.u_remapHigh = remapHigh;
|
|
39
|
+
material.u_edgeX = edgeX;
|
|
40
|
+
material.u_edgeY = edgeY;
|
|
41
|
+
material.u_density = density;
|
|
42
|
+
material.u_twistStrength = twistStrength;
|
|
43
|
+
material.u_twistSpeed = twistSpeed;
|
|
44
|
+
material.u_twistScale = twistScale;
|
|
45
|
+
material.u_twistStart = twistStart;
|
|
46
|
+
material.u_windDir.set(wind[0], wind[1]);
|
|
47
|
+
}, [
|
|
48
|
+
material, color, colorTop, speed, detail, remapLow, remapHigh, edgeX, edgeY,
|
|
49
|
+
density, twistStrength, twistSpeed, twistScale, twistStart, wind,
|
|
50
|
+
]);
|
|
51
|
+
const { pointer } = useThree();
|
|
52
|
+
const hovering = useRef(false);
|
|
53
|
+
useFrame(({ clock }) => {
|
|
54
|
+
if (animate)
|
|
55
|
+
material.u_time = clock.getElapsedTime();
|
|
56
|
+
if (interactive) {
|
|
57
|
+
// u_mouse is the normalized pointer (NDC); .x leans the ribbon.
|
|
58
|
+
material.u_mouse.set(pointer.x, pointer.y);
|
|
59
|
+
const target = hovering.current ? 1 : 0;
|
|
60
|
+
material.u_mouseStrength += (target - material.u_mouseStrength) * 0.1;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
material.u_mouseStrength = 0;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
console.log('SmokeRibbon render with config:', config, 'and groupProps:', groupProps);
|
|
67
|
+
return (_jsx("group", { ...groupProps, onPointerOver: interactive ? () => (hovering.current = true) : undefined, onPointerOut: interactive ? () => (hovering.current = false) : undefined, children: angles.map((a, i) => (_jsx("mesh", { geometry: geometry, material: material, "rotation-y": a }, i))) }));
|
|
68
|
+
};
|
|
69
|
+
export default SmokeRibbon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SmokeRingConfig, AnimationOptions } from "@3driseai/3drise-core";
|
|
3
|
+
interface SmokeRingEffectProps {
|
|
4
|
+
boundingRadius: number;
|
|
5
|
+
config: SmokeRingConfig;
|
|
6
|
+
animations?: AnimationOptions[];
|
|
7
|
+
}
|
|
8
|
+
declare const SmokeRingEffect: React.FC<SmokeRingEffectProps>;
|
|
9
|
+
export default SmokeRingEffect;
|
|
10
|
+
//# sourceMappingURL=SmokeRingEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmokeRingEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokeRingEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,UAAU,oBAAoB;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AAiED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyFnD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useMemo } from 'react';
|
|
3
|
+
import { useFrame } from '@react-three/fiber';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { applyGenerativeAnimations } from '../../utils/handleGenerativeEffectsAnimations.js';
|
|
6
|
+
// ── Per-ring puff shader (one Points per ring — GPU computes torus positions) ──
|
|
7
|
+
const ringVert = /* glsl */ `
|
|
8
|
+
attribute float aAngle; // 0..TAU position around torus
|
|
9
|
+
attribute float aPuff; // sub-angle within tube cross-section 0..TAU
|
|
10
|
+
attribute float aPhase;
|
|
11
|
+
|
|
12
|
+
uniform float uProgress; // 0=born, 1=dead
|
|
13
|
+
uniform float uMaxRadius;
|
|
14
|
+
uniform float uThickness; // tube radius
|
|
15
|
+
uniform float uRiseSpeed; // Y lift per unit progress
|
|
16
|
+
uniform float uBaseY;
|
|
17
|
+
uniform float u_time;
|
|
18
|
+
|
|
19
|
+
varying float vAlpha;
|
|
20
|
+
|
|
21
|
+
void main() {
|
|
22
|
+
if (uProgress < 0.0 || uProgress > 1.0) {
|
|
23
|
+
gl_PointSize = 0.0;
|
|
24
|
+
gl_Position = vec4(0.0);
|
|
25
|
+
vAlpha = 0.0;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
float ringR = uMaxRadius * uProgress;
|
|
30
|
+
|
|
31
|
+
// Tube cross-section wiggles outward slightly as ring expands
|
|
32
|
+
float tubeR = uThickness * (0.8 + 0.4 * uProgress);
|
|
33
|
+
float tubePhi = aPuff + u_time * 0.4 + aPhase;
|
|
34
|
+
float offR = tubeR * cos(tubePhi);
|
|
35
|
+
float offY = tubeR * sin(tubePhi);
|
|
36
|
+
|
|
37
|
+
float r = ringR + offR;
|
|
38
|
+
float x = cos(aAngle) * r;
|
|
39
|
+
float z = sin(aAngle) * r;
|
|
40
|
+
float y = uBaseY + uProgress * uRiseSpeed + offY;
|
|
41
|
+
|
|
42
|
+
// Puff grows then fades
|
|
43
|
+
float lifeAlpha = smoothstep(0.0, 0.12, uProgress) * smoothstep(1.0, 0.65, uProgress);
|
|
44
|
+
vAlpha = lifeAlpha;
|
|
45
|
+
|
|
46
|
+
float puffSize = uThickness * 50.0 * lifeAlpha;
|
|
47
|
+
|
|
48
|
+
vec4 mv = modelViewMatrix * vec4(x, y, z, 1.0);
|
|
49
|
+
gl_PointSize = puffSize * (200.0 / -mv.z);
|
|
50
|
+
gl_Position = projectionMatrix * mv;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
const ringFrag = /* glsl */ `
|
|
54
|
+
uniform vec3 uSmokeColor;
|
|
55
|
+
uniform float uOpacity;
|
|
56
|
+
varying float vAlpha;
|
|
57
|
+
|
|
58
|
+
void main() {
|
|
59
|
+
if (vAlpha < 0.01) discard;
|
|
60
|
+
vec2 c = gl_PointCoord - 0.5;
|
|
61
|
+
float d = length(c);
|
|
62
|
+
if (d > 0.5) discard;
|
|
63
|
+
float g = exp(-d * d * 3.0);
|
|
64
|
+
gl_FragColor = vec4(uSmokeColor, g * vAlpha * uOpacity);
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const PUFFS_PER_RING = 120;
|
|
68
|
+
const SmokeRingEffect = ({ boundingRadius, config, animations }) => {
|
|
69
|
+
const { ringCount, expansionRadius, riseSpeed, intervalSeconds, smokeColor, thickness, opacity, speed, intensity } = config;
|
|
70
|
+
const startValuesCacheRef = useRef({});
|
|
71
|
+
const N = Math.max(1, Math.min(ringCount, 4));
|
|
72
|
+
// Ring states — one per slot
|
|
73
|
+
const ringStates = useRef([]);
|
|
74
|
+
const { geos, mats } = useMemo(() => {
|
|
75
|
+
const maxR = boundingRadius * expansionRadius;
|
|
76
|
+
const tubeR = boundingRadius * thickness;
|
|
77
|
+
const riseH = boundingRadius * riseSpeed;
|
|
78
|
+
const sc = new THREE.Color(smokeColor);
|
|
79
|
+
const scv = new THREE.Vector3(sc.r, sc.g, sc.b);
|
|
80
|
+
// Stagger initial timers so rings don't all fire together
|
|
81
|
+
ringStates.current = Array.from({ length: N }, (_, i) => ({
|
|
82
|
+
progress: 0,
|
|
83
|
+
timer: (i / N) * intervalSeconds,
|
|
84
|
+
active: false,
|
|
85
|
+
}));
|
|
86
|
+
const geos = [];
|
|
87
|
+
const mats = [];
|
|
88
|
+
for (let ri = 0; ri < N; ri++) {
|
|
89
|
+
const aAngle = new Float32Array(PUFFS_PER_RING);
|
|
90
|
+
const aPuff = new Float32Array(PUFFS_PER_RING);
|
|
91
|
+
const aPhase = new Float32Array(PUFFS_PER_RING);
|
|
92
|
+
for (let i = 0; i < PUFFS_PER_RING; i++) {
|
|
93
|
+
aAngle[i] = (i / PUFFS_PER_RING) * Math.PI * 2;
|
|
94
|
+
aPuff[i] = Math.random() * Math.PI * 2;
|
|
95
|
+
aPhase[i] = Math.random() * Math.PI * 2;
|
|
96
|
+
}
|
|
97
|
+
const geo = new THREE.BufferGeometry();
|
|
98
|
+
geo.setAttribute('position', new THREE.BufferAttribute(new Float32Array(PUFFS_PER_RING * 3), 3));
|
|
99
|
+
geo.setAttribute('aAngle', new THREE.BufferAttribute(aAngle, 1));
|
|
100
|
+
geo.setAttribute('aPuff', new THREE.BufferAttribute(aPuff, 1));
|
|
101
|
+
geo.setAttribute('aPhase', new THREE.BufferAttribute(aPhase, 1));
|
|
102
|
+
geo.frustumCulled = false;
|
|
103
|
+
const mat = new THREE.ShaderMaterial({
|
|
104
|
+
vertexShader: ringVert,
|
|
105
|
+
fragmentShader: ringFrag,
|
|
106
|
+
uniforms: {
|
|
107
|
+
uProgress: { value: -1 }, // -1 = hidden
|
|
108
|
+
uMaxRadius: { value: maxR },
|
|
109
|
+
uThickness: { value: tubeR * intensity },
|
|
110
|
+
uRiseSpeed: { value: riseH },
|
|
111
|
+
uBaseY: { value: -boundingRadius * 0.2 },
|
|
112
|
+
u_time: { value: 0 },
|
|
113
|
+
uSmokeColor: { value: scv },
|
|
114
|
+
uOpacity: { value: opacity },
|
|
115
|
+
},
|
|
116
|
+
transparent: true,
|
|
117
|
+
depthWrite: false,
|
|
118
|
+
blending: THREE.NormalBlending,
|
|
119
|
+
});
|
|
120
|
+
geos.push(geo);
|
|
121
|
+
mats.push(mat);
|
|
122
|
+
}
|
|
123
|
+
return { geos, mats };
|
|
124
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125
|
+
}, [N, boundingRadius, expansionRadius, riseSpeed, intervalSeconds, smokeColor, thickness, opacity, intensity]);
|
|
126
|
+
useFrame((state, delta) => {
|
|
127
|
+
const t = state.clock.getElapsedTime();
|
|
128
|
+
const dt = delta * speed;
|
|
129
|
+
ringStates.current.forEach((ring, ri) => {
|
|
130
|
+
const mat = mats[ri];
|
|
131
|
+
mat.uniforms.u_time.value = t;
|
|
132
|
+
if (ring.active) {
|
|
133
|
+
ring.progress += dt * 0.32;
|
|
134
|
+
if (ring.progress >= 1) {
|
|
135
|
+
ring.active = false;
|
|
136
|
+
ring.progress = 0;
|
|
137
|
+
ring.timer = intervalSeconds / speed;
|
|
138
|
+
mat.uniforms.uProgress.value = -1;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
mat.uniforms.uProgress.value = ring.progress;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
ring.timer -= delta;
|
|
146
|
+
if (ring.timer <= 0) {
|
|
147
|
+
ring.active = true;
|
|
148
|
+
ring.progress = 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
if (animations?.length) {
|
|
153
|
+
applyGenerativeAnimations(mats, animations, startValuesCacheRef.current, Date.now(), false);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
return (_jsx("group", { children: geos.map((geo, i) => (_jsx("points", { geometry: geo, material: mats[i] }, i))) }));
|
|
157
|
+
};
|
|
158
|
+
export default SmokeRingEffect;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { VolumetricFogConfig, AnimationOptions } from "@3driseai/3drise-core";
|
|
3
|
+
interface VolumetricFogEffectProps {
|
|
4
|
+
boundingRadius: number;
|
|
5
|
+
config: VolumetricFogConfig;
|
|
6
|
+
animations?: AnimationOptions[];
|
|
7
|
+
}
|
|
8
|
+
declare const VolumetricFogEffect: React.FC<VolumetricFogEffectProps>;
|
|
9
|
+
export default VolumetricFogEffect;
|
|
10
|
+
//# sourceMappingURL=VolumetricFogEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VolumetricFogEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/VolumetricFogEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnF,UAAU,wBAAwB;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AAoDD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAuD3D,CAAC;AACF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useMemo } from 'react';
|
|
3
|
+
import { useFrame } from '@react-three/fiber';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { applyGenerativeAnimations } from '../../utils/handleGenerativeEffectsAnimations.js';
|
|
6
|
+
// ── Billboard fog puff — drifts slowly, never rises far ───────────────────────
|
|
7
|
+
const fogVert = /* glsl */ `
|
|
8
|
+
attribute float aT; // stagger offset 0..1
|
|
9
|
+
attribute vec3 aCenter; // resting (x,y,z) position in fog layer
|
|
10
|
+
attribute float aPhase;
|
|
11
|
+
attribute float aSize;
|
|
12
|
+
|
|
13
|
+
uniform float u_time;
|
|
14
|
+
uniform float uDrift; // horizontal drift speed
|
|
15
|
+
uniform float uFogRadius;
|
|
16
|
+
|
|
17
|
+
varying float vAlpha;
|
|
18
|
+
|
|
19
|
+
void main() {
|
|
20
|
+
float t = fract(aT + u_time * 0.05); // very slow life cycle — fog is persistent
|
|
21
|
+
|
|
22
|
+
// Gentle horizontal drift — fog rolls around the base
|
|
23
|
+
float dx = sin(u_time * uDrift + aPhase) * uFogRadius * 0.18;
|
|
24
|
+
float dz = cos(u_time * uDrift * 0.7 + aPhase * 1.3) * uFogRadius * 0.14;
|
|
25
|
+
// Slow vertical bob
|
|
26
|
+
float dy = sin(u_time * 0.25 + aPhase) * uFogRadius * 0.06;
|
|
27
|
+
|
|
28
|
+
vec3 pos = aCenter + vec3(dx, dy, dz);
|
|
29
|
+
|
|
30
|
+
// Puff fades in/out with its own phase to prevent popping
|
|
31
|
+
float pulse = 0.55 + 0.45 * sin(u_time * 0.35 + aPhase * 2.1);
|
|
32
|
+
vAlpha = pulse;
|
|
33
|
+
|
|
34
|
+
vec4 mv = modelViewMatrix * vec4(pos, 1.0);
|
|
35
|
+
gl_PointSize = aSize * (220.0 / -mv.z);
|
|
36
|
+
gl_Position = projectionMatrix * mv;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
const fogFrag = /* glsl */ `
|
|
40
|
+
uniform vec3 uFogColor;
|
|
41
|
+
uniform float uDensity;
|
|
42
|
+
varying float vAlpha;
|
|
43
|
+
|
|
44
|
+
void main() {
|
|
45
|
+
vec2 c = gl_PointCoord - 0.5;
|
|
46
|
+
float d = length(c);
|
|
47
|
+
if (d > 0.5) discard;
|
|
48
|
+
|
|
49
|
+
// Very soft — almost no hard edge at all
|
|
50
|
+
float g = exp(-d * d * 2.2);
|
|
51
|
+
|
|
52
|
+
gl_FragColor = vec4(uFogColor, g * vAlpha * uDensity);
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
const VolumetricFogEffect = ({ boundingRadius, config, animations }) => {
|
|
56
|
+
const { particleCount, fogRadius, driftSpeed, fogColor, density, opacity, intensity } = config;
|
|
57
|
+
const startValuesCacheRef = useRef({});
|
|
58
|
+
const r = boundingRadius * fogRadius;
|
|
59
|
+
const { geo, mat } = useMemo(() => {
|
|
60
|
+
const N = Math.max(20, Math.min(particleCount, 200));
|
|
61
|
+
const aT = new Float32Array(N);
|
|
62
|
+
const aCenter = new Float32Array(N * 3);
|
|
63
|
+
const aPhase = new Float32Array(N);
|
|
64
|
+
const aSize = new Float32Array(N);
|
|
65
|
+
for (let i = 0; i < N; i++) {
|
|
66
|
+
aT[i] = i / N;
|
|
67
|
+
// Distribute puffs in a disc with vertical variation at base level
|
|
68
|
+
const angle = Math.random() * Math.PI * 2;
|
|
69
|
+
const rad = Math.sqrt(Math.random()) * r;
|
|
70
|
+
const yOff = (Math.random() - 0.3) * boundingRadius * 0.35; // mostly at base, slight spread
|
|
71
|
+
aCenter[i * 3] = Math.cos(angle) * rad;
|
|
72
|
+
aCenter[i * 3 + 1] = yOff - boundingRadius * 0.3; // sit at/below object base
|
|
73
|
+
aCenter[i * 3 + 2] = Math.sin(angle) * rad;
|
|
74
|
+
aPhase[i] = Math.random() * Math.PI * 2;
|
|
75
|
+
// Large puffs — fog is billowy
|
|
76
|
+
aSize[i] = (50 + Math.random() * 70) * intensity;
|
|
77
|
+
}
|
|
78
|
+
const g = new THREE.BufferGeometry();
|
|
79
|
+
g.setAttribute('position', new THREE.BufferAttribute(new Float32Array(N * 3), 3));
|
|
80
|
+
g.setAttribute('aT', new THREE.BufferAttribute(aT, 1));
|
|
81
|
+
g.setAttribute('aCenter', new THREE.BufferAttribute(aCenter, 3));
|
|
82
|
+
g.setAttribute('aPhase', new THREE.BufferAttribute(aPhase, 1));
|
|
83
|
+
g.setAttribute('aSize', new THREE.BufferAttribute(aSize, 1));
|
|
84
|
+
g.frustumCulled = false;
|
|
85
|
+
const fc = new THREE.Color(fogColor);
|
|
86
|
+
const m = new THREE.ShaderMaterial({
|
|
87
|
+
vertexShader: fogVert,
|
|
88
|
+
fragmentShader: fogFrag,
|
|
89
|
+
uniforms: {
|
|
90
|
+
u_time: { value: 0 },
|
|
91
|
+
uDrift: { value: driftSpeed },
|
|
92
|
+
uFogRadius: { value: r },
|
|
93
|
+
uFogColor: { value: new THREE.Vector3(fc.r, fc.g, fc.b) },
|
|
94
|
+
uDensity: { value: density * opacity },
|
|
95
|
+
},
|
|
96
|
+
transparent: true,
|
|
97
|
+
depthWrite: false,
|
|
98
|
+
blending: THREE.NormalBlending,
|
|
99
|
+
});
|
|
100
|
+
return { geo: g, mat: m };
|
|
101
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
102
|
+
}, [particleCount, r, fogColor, density, driftSpeed, opacity, intensity, boundingRadius]);
|
|
103
|
+
useFrame((state) => {
|
|
104
|
+
mat.uniforms.u_time.value = state.clock.getElapsedTime();
|
|
105
|
+
if (animations?.length) {
|
|
106
|
+
applyGenerativeAnimations([mat], animations, startValuesCacheRef.current, Date.now(), false);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return _jsx("points", { geometry: geo, material: mat });
|
|
110
|
+
};
|
|
111
|
+
export default VolumetricFogEffect;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BufferGeometry } from 'three';
|
|
2
|
+
export type OutlineMode = '2d' | '3d';
|
|
3
|
+
export type Point3 = [number, number, number];
|
|
4
|
+
/**
|
|
5
|
+
* 3D feature edges: every edge whose dihedral angle exceeds `angle` (degrees).
|
|
6
|
+
* Returns endpoints in segment order (pairs form independent segments).
|
|
7
|
+
*/
|
|
8
|
+
export declare function edges3D(geometry: BufferGeometry, angle: number): Point3[];
|
|
9
|
+
/**
|
|
10
|
+
* 2D profile: the hard edges lying on the front (max-Z) plane, flattened to
|
|
11
|
+
* z = 0. For a Z-extruded solid this equals the projected silhouette, so the
|
|
12
|
+
* heart yields its bezier contour and the box yields a square.
|
|
13
|
+
*
|
|
14
|
+
* For a general (non-extruded) mesh the true 2D outline is a projected
|
|
15
|
+
* silhouette boolean — swap this implementation when generalizing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function contour2D(geometry: BufferGeometry): Point3[];
|
|
18
|
+
//# sourceMappingURL=extractOutline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractOutline.d.ts","sourceRoot":"","sources":["../../src/components/extractOutline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAKzE;AACD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,EAAE,CAoB5D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EdgesGeometry } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* 3D feature edges: every edge whose dihedral angle exceeds `angle` (degrees).
|
|
4
|
+
* Returns endpoints in segment order (pairs form independent segments).
|
|
5
|
+
*/
|
|
6
|
+
export function edges3D(geometry, angle) {
|
|
7
|
+
const edges = new EdgesGeometry(geometry, angle);
|
|
8
|
+
const pts = toPairs(edges.attributes.position.array);
|
|
9
|
+
edges.dispose();
|
|
10
|
+
return pts;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 2D profile: the hard edges lying on the front (max-Z) plane, flattened to
|
|
14
|
+
* z = 0. For a Z-extruded solid this equals the projected silhouette, so the
|
|
15
|
+
* heart yields its bezier contour and the box yields a square.
|
|
16
|
+
*
|
|
17
|
+
* For a general (non-extruded) mesh the true 2D outline is a projected
|
|
18
|
+
* silhouette boolean — swap this implementation when generalizing.
|
|
19
|
+
*/
|
|
20
|
+
export function contour2D(geometry) {
|
|
21
|
+
const edges = new EdgesGeometry(geometry, 1);
|
|
22
|
+
const a = edges.attributes.position.array;
|
|
23
|
+
let maxZ = -Infinity;
|
|
24
|
+
let minZ = Infinity;
|
|
25
|
+
for (let i = 2; i < a.length; i += 3) {
|
|
26
|
+
if (a[i] > maxZ)
|
|
27
|
+
maxZ = a[i];
|
|
28
|
+
if (a[i] < minZ)
|
|
29
|
+
minZ = a[i];
|
|
30
|
+
}
|
|
31
|
+
const eps = Math.max((maxZ - minZ) * 1e-3, 1e-4);
|
|
32
|
+
const out = [];
|
|
33
|
+
for (let i = 0; i < a.length; i += 6) {
|
|
34
|
+
if (Math.abs(a[i + 2] - maxZ) < eps && Math.abs(a[i + 5] - maxZ) < eps) {
|
|
35
|
+
out.push([a[i], a[i + 1], 0], [a[i + 3], a[i + 4], 0]);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
edges.dispose();
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
function toPairs(arr) {
|
|
42
|
+
const out = [];
|
|
43
|
+
for (let i = 0; i < arr.length; i += 3) {
|
|
44
|
+
out.push([arr[i], arr[i + 1], arr[i + 2]]);
|
|
45
|
+
}
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const LOCAL_DATA_CENTER_SERVER = 'http://localhost:3001/api/data/';
|
|
2
|
+
const PRODUCTION_DATA_CENTER_SERVER = 'https://3drise.ai/api/data/';
|
|
3
|
+
const isLocalHostRuntime = typeof window !== 'undefined' &&
|
|
4
|
+
(window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1');
|
|
5
|
+
export const dataCenterServer = PRODUCTION_DATA_CENTER_SERVER;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ShaderEffect } from '@3driseai/3drise-core';
|
|
2
|
+
export interface Update3driseShaderOptions {
|
|
3
|
+
pointerRadius?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function update3driseShaderUniforms(uniforms: Record<string, {
|
|
6
|
+
value: unknown;
|
|
7
|
+
}> | undefined | null, effects: ShaderEffect[] | undefined | null, time: number, pointer: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}, options?: Update3driseShaderOptions): void;
|
|
11
|
+
export declare function use3driseShader(effects: ShaderEffect[]): (uniforms: Record<string, {
|
|
12
|
+
value: unknown;
|
|
13
|
+
}>, time: number, pointer: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}) => void;
|
|
17
|
+
//# sourceMappingURL=use3driseShader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use3driseShader.d.ts","sourceRoot":"","sources":["../../src/hooks/use3driseShader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,MAAM,WAAW,yBAAyB;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAuDD,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;IACxD,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,GAAG,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IACtF,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAuCpD;AACD,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;IAC5E,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,KAAK,IAAI,CAIb"}
|