@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,268 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// HANDLE GENERATIVE EFFECTS ANIMATIONS — per-effect utility
|
|
3
|
+
// =============================================================================
|
|
4
|
+
//
|
|
5
|
+
// Called from inside each generative effect component's own useFrame loop.
|
|
6
|
+
// Each effect component holds direct refs to its ShaderMaterials and passes
|
|
7
|
+
// them here, avoiding fragile scene-graph traversal.
|
|
8
|
+
//
|
|
9
|
+
// Usage (inside an effect component's useFrame):
|
|
10
|
+
//
|
|
11
|
+
// useFrame((state) => {
|
|
12
|
+
// const t = state.clock.getElapsedTime();
|
|
13
|
+
// mat.uniforms.u_time.value = t;
|
|
14
|
+
//
|
|
15
|
+
// if (animations?.length) {
|
|
16
|
+
// applyGenerativeAnimations([mat], animations, startValuesCacheRef.current, Date.now(), hovered ?? false);
|
|
17
|
+
// }
|
|
18
|
+
// });
|
|
19
|
+
//
|
|
20
|
+
import * as THREE from 'three';
|
|
21
|
+
import { MathUtils } from 'three';
|
|
22
|
+
// =============================================================================
|
|
23
|
+
// INLINED HELPERS (from client/app/utils/materialUtils.ts and hooks/useAnimations.ts)
|
|
24
|
+
// =============================================================================
|
|
25
|
+
const calculateTimeProgress = (currentTime, duration, yoyo, loop) => {
|
|
26
|
+
const animationSpeed = 1000 / duration;
|
|
27
|
+
const rawProgress = currentTime * animationSpeed * 0.001;
|
|
28
|
+
if (yoyo) {
|
|
29
|
+
const cycleProgress = rawProgress % 1;
|
|
30
|
+
return Math.sin(cycleProgress * Math.PI * 2) * 0.5 + 0.5;
|
|
31
|
+
}
|
|
32
|
+
if (loop)
|
|
33
|
+
return rawProgress % 1;
|
|
34
|
+
return Math.min(rawProgress, 1);
|
|
35
|
+
};
|
|
36
|
+
const easingFunctions = {
|
|
37
|
+
linear: (t) => t,
|
|
38
|
+
easeInQuad: (t) => t * t,
|
|
39
|
+
easeOutQuad: (t) => t * (2 - t),
|
|
40
|
+
easeInOutQuad: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t,
|
|
41
|
+
easeInCubic: (t) => t * t * t,
|
|
42
|
+
easeOutCubic: (t) => (--t) * t * t + 1,
|
|
43
|
+
easeInOutCubic: (t) => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
44
|
+
easeInQuart: (t) => t * t * t * t,
|
|
45
|
+
easeOutQuart: (t) => 1 - (--t) * t * t * t,
|
|
46
|
+
easeInOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t,
|
|
47
|
+
easeInQuint: (t) => t * t * t * t * t,
|
|
48
|
+
easeOutQuint: (t) => 1 + (--t) * t * t * t * t,
|
|
49
|
+
easeInOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t,
|
|
50
|
+
easeInSine: (t) => 1 - Math.cos(t * Math.PI / 2),
|
|
51
|
+
easeOutSine: (t) => Math.sin(t * Math.PI / 2),
|
|
52
|
+
easeInOutSine: (t) => -(Math.cos(Math.PI * t) - 1) / 2,
|
|
53
|
+
easeInExpo: (t) => t === 0 ? 0 : Math.pow(2, 10 * (t - 1)),
|
|
54
|
+
easeOutExpo: (t) => t === 1 ? 1 : 1 - Math.pow(2, -10 * t),
|
|
55
|
+
easeInOutExpo: (t) => {
|
|
56
|
+
if (t === 0)
|
|
57
|
+
return 0;
|
|
58
|
+
if (t === 1)
|
|
59
|
+
return 1;
|
|
60
|
+
if (t < 0.5)
|
|
61
|
+
return Math.pow(2, 20 * t - 10) / 2;
|
|
62
|
+
return (2 - Math.pow(2, -20 * t + 10)) / 2;
|
|
63
|
+
},
|
|
64
|
+
easeInCirc: (t) => 1 - Math.sqrt(1 - t * t),
|
|
65
|
+
easeOutCirc: (t) => Math.sqrt(1 - (t - 1) * (t - 1)),
|
|
66
|
+
easeInOutCirc: (t) => {
|
|
67
|
+
if (t < 0.5)
|
|
68
|
+
return (1 - Math.sqrt(1 - 4 * t * t)) / 2;
|
|
69
|
+
return (Math.sqrt(1 - (-2 * t + 2) * (-2 * t + 2)) + 1) / 2;
|
|
70
|
+
},
|
|
71
|
+
easeInBack: (t) => { const c1 = 1.70158; const c3 = c1 + 1; return c3 * t * t * t - c1 * t * t; },
|
|
72
|
+
easeOutBack: (t) => { const c1 = 1.70158; const c3 = c1 + 1; return 1 + c3 * Math.pow(t - 1, 3) + c1 * Math.pow(t - 1, 2); },
|
|
73
|
+
easeInOutBack: (t) => {
|
|
74
|
+
const c1 = 1.70158;
|
|
75
|
+
const c2 = c1 * 1.525;
|
|
76
|
+
return t < 0.5 ? (Math.pow(2 * t, 2) * ((c2 + 1) * 2 * t - c2)) / 2 : (Math.pow(2 * t - 2, 2) * ((c2 + 1) * (t * 2 - 2) + c2) + 2) / 2;
|
|
77
|
+
},
|
|
78
|
+
easeInElastic: (t) => { const c4 = (2 * Math.PI) / 3; return t === 0 ? 0 : t === 1 ? 1 : -Math.pow(2, 10 * t - 10) * Math.sin((t * 10 - 10.75) * c4); },
|
|
79
|
+
easeOutElastic: (t) => { const c4 = (2 * Math.PI) / 3; return t === 0 ? 0 : t === 1 ? 1 : Math.pow(2, -10 * t) * Math.sin((t * 10 - 0.75) * c4) + 1; },
|
|
80
|
+
easeInOutElastic: (t) => {
|
|
81
|
+
const c5 = (2 * Math.PI) / 4.5;
|
|
82
|
+
return t === 0 ? 0 : t === 1 ? 1 : t < 0.5
|
|
83
|
+
? -(Math.pow(2, 20 * t - 10) * Math.sin((20 * t - 11.125) * c5)) / 2
|
|
84
|
+
: (Math.pow(2, -20 * t + 10) * Math.sin((20 * t - 11.125) * c5)) / 2 + 1;
|
|
85
|
+
},
|
|
86
|
+
easeInBounce: (t) => 1 - easingFunctions.easeOutBounce(1 - t),
|
|
87
|
+
easeOutBounce: (t) => {
|
|
88
|
+
const n1 = 7.5625;
|
|
89
|
+
const d1 = 2.75;
|
|
90
|
+
if (t < 1 / d1)
|
|
91
|
+
return n1 * t * t;
|
|
92
|
+
else if (t < 2 / d1)
|
|
93
|
+
return n1 * (t -= 1.5 / d1) * t + 0.75;
|
|
94
|
+
else if (t < 2.5 / d1)
|
|
95
|
+
return n1 * (t -= 2.25 / d1) * t + 0.9375;
|
|
96
|
+
else
|
|
97
|
+
return n1 * (t -= 2.625 / d1) * t + 0.984375;
|
|
98
|
+
},
|
|
99
|
+
easeInOutBounce: (t) => t < 0.5
|
|
100
|
+
? (1 - easingFunctions.easeOutBounce(1 - 2 * t)) / 2
|
|
101
|
+
: (1 + easingFunctions.easeOutBounce(2 * t - 1)) / 2,
|
|
102
|
+
};
|
|
103
|
+
const gsapEasingMap = {
|
|
104
|
+
'power1.in': 'easeInQuad', 'power1.out': 'easeOutQuad', 'power1.inOut': 'easeInOutQuad',
|
|
105
|
+
'power2.in': 'easeInCubic', 'power2.out': 'easeOutCubic', 'power2.inOut': 'easeInOutCubic',
|
|
106
|
+
'power3.in': 'easeInQuart', 'power3.out': 'easeOutQuart', 'power3.inOut': 'easeInOutQuart',
|
|
107
|
+
'power4.in': 'easeInQuint', 'power4.out': 'easeOutQuint', 'power4.inOut': 'easeInOutQuint',
|
|
108
|
+
'sine.in': 'easeInSine', 'sine.out': 'easeOutSine', 'sine.inOut': 'easeInOutSine',
|
|
109
|
+
'expo.in': 'easeInExpo', 'expo.out': 'easeOutExpo', 'expo.inOut': 'easeInOutExpo',
|
|
110
|
+
'circ.in': 'easeInCirc', 'circ.out': 'easeOutCirc', 'circ.inOut': 'easeInOutCirc',
|
|
111
|
+
'back.in': 'easeInBack', 'back.out': 'easeOutBack', 'back.inOut': 'easeInOutBack',
|
|
112
|
+
'elastic.in': 'easeInElastic', 'elastic.out': 'easeOutElastic', 'elastic.inOut': 'easeInOutElastic',
|
|
113
|
+
'bounce.in': 'easeInBounce', 'bounce.out': 'easeOutBounce', 'bounce.inOut': 'easeInOutBounce',
|
|
114
|
+
'none': 'linear', 'linear': 'linear',
|
|
115
|
+
};
|
|
116
|
+
const applyEasing = (easingName, progress) => {
|
|
117
|
+
const fn = easingFunctions[easingName];
|
|
118
|
+
return fn ? fn(progress) : progress;
|
|
119
|
+
};
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// DEBUG
|
|
122
|
+
// =============================================================================
|
|
123
|
+
export const DEBUG_GENERATIVE_EFFECTS = false;
|
|
124
|
+
const log = (message, ...args) => {
|
|
125
|
+
if (DEBUG_GENERATIVE_EFFECTS)
|
|
126
|
+
console.log(`[GenerativeEffectsAnimations] ${message}`, ...args);
|
|
127
|
+
};
|
|
128
|
+
const _loggedOnce = new Set();
|
|
129
|
+
const logOnce = (key, message, ...args) => {
|
|
130
|
+
if (_loggedOnce.has(key))
|
|
131
|
+
return;
|
|
132
|
+
_loggedOnce.add(key);
|
|
133
|
+
console.log(`[GenerativeEffectsAnimations] ${message}`, ...args);
|
|
134
|
+
};
|
|
135
|
+
const warnOnce = (key, message, ...args) => {
|
|
136
|
+
if (_loggedOnce.has(key))
|
|
137
|
+
return;
|
|
138
|
+
_loggedOnce.add(key);
|
|
139
|
+
console.warn(`[GenerativeEffectsAnimations] ${message}`, ...args);
|
|
140
|
+
};
|
|
141
|
+
// =============================================================================
|
|
142
|
+
// HELPERS
|
|
143
|
+
// =============================================================================
|
|
144
|
+
function candidateUniformNames(property) {
|
|
145
|
+
const capitalized = property.charAt(0).toUpperCase() + property.slice(1);
|
|
146
|
+
return [`u${capitalized}`, `u_${property}`];
|
|
147
|
+
}
|
|
148
|
+
function findUniformName(materials, property) {
|
|
149
|
+
const candidates = candidateUniformNames(property);
|
|
150
|
+
for (const candidate of candidates) {
|
|
151
|
+
for (const mat of materials) {
|
|
152
|
+
if (mat.uniforms[candidate] !== undefined)
|
|
153
|
+
return candidate;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const _colorFrom = new THREE.Color();
|
|
159
|
+
const _colorTo = new THREE.Color();
|
|
160
|
+
function readUniformValue(materials, uniformName) {
|
|
161
|
+
for (const mat of materials) {
|
|
162
|
+
const u = mat.uniforms[uniformName];
|
|
163
|
+
if (u !== undefined) {
|
|
164
|
+
if (u.value instanceof THREE.Color)
|
|
165
|
+
return '#' + u.value.getHexString();
|
|
166
|
+
if (u.value instanceof THREE.Vector3) {
|
|
167
|
+
_colorFrom.setRGB(u.value.x, u.value.y, u.value.z);
|
|
168
|
+
return '#' + _colorFrom.getHexString();
|
|
169
|
+
}
|
|
170
|
+
return u.value;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
function applyNumericToMaterials(materials, uniformName, value) {
|
|
176
|
+
for (const mat of materials) {
|
|
177
|
+
const u = mat.uniforms[uniformName];
|
|
178
|
+
if (u !== undefined)
|
|
179
|
+
u.value = value;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function applyColorToMaterials(materials, uniformName, from, to, t) {
|
|
183
|
+
_colorFrom.set(from);
|
|
184
|
+
_colorTo.set(to);
|
|
185
|
+
const r = MathUtils.lerp(_colorFrom.r, _colorTo.r, t);
|
|
186
|
+
const g = MathUtils.lerp(_colorFrom.g, _colorTo.g, t);
|
|
187
|
+
const b = MathUtils.lerp(_colorFrom.b, _colorTo.b, t);
|
|
188
|
+
for (const mat of materials) {
|
|
189
|
+
const u = mat.uniforms[uniformName];
|
|
190
|
+
if (u !== undefined) {
|
|
191
|
+
const val = u.value;
|
|
192
|
+
if (val instanceof THREE.Color)
|
|
193
|
+
val.setRGB(r, g, b);
|
|
194
|
+
else if (val && typeof val === 'object' && 'x' in val)
|
|
195
|
+
val.set(r, g, b);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function isColorValue(value) {
|
|
200
|
+
return typeof value === 'string' && (value.startsWith('#') || value.startsWith('rgb'));
|
|
201
|
+
}
|
|
202
|
+
// =============================================================================
|
|
203
|
+
// MAIN EXPORT
|
|
204
|
+
// =============================================================================
|
|
205
|
+
export function applyGenerativeAnimations(materials, animations, startValuesCache, currentTime, hovered) {
|
|
206
|
+
if (!animations || animations.length === 0)
|
|
207
|
+
return;
|
|
208
|
+
if (materials.length === 0)
|
|
209
|
+
return;
|
|
210
|
+
logOnce('called', `Processing ${animations.length} animation(s) across ${materials.length} material(s)`);
|
|
211
|
+
for (const animation of animations) {
|
|
212
|
+
try {
|
|
213
|
+
const { property, to, duration, ease, loop = false, yoyo = false, active, triggerMode = 'always', } = animation;
|
|
214
|
+
if (active === false) {
|
|
215
|
+
log(`Skipping "${property}": active=false`);
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
if (triggerMode === 'hover' && !hovered) {
|
|
219
|
+
log(`Skipping "${property}": triggerMode=hover but not hovered`);
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
if (to === undefined) {
|
|
223
|
+
warnOnce(`no-to-${property}`, `Skipping "${property}": no 'to' value defined`);
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
const uniformName = findUniformName(materials, property);
|
|
227
|
+
if (!uniformName) {
|
|
228
|
+
warnOnce(`no-uniform-${property}`, `No uniform found for property "${property}" (tried: ${candidateUniformNames(property).join(', ')}) — available uniforms on mat[0]: ${Object.keys(materials[0]?.uniforms ?? {}).join(', ')}`);
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (!(property in startValuesCache)) {
|
|
232
|
+
const currentVal = readUniformValue(materials, uniformName);
|
|
233
|
+
startValuesCache[property] = animation.from !== undefined ? animation.from : currentVal;
|
|
234
|
+
log('cached start value', { property, uniformName, startValue: startValuesCache[property] });
|
|
235
|
+
}
|
|
236
|
+
const from = startValuesCache[property];
|
|
237
|
+
if (from === undefined || from === null)
|
|
238
|
+
continue;
|
|
239
|
+
let timeProgress = calculateTimeProgress(currentTime, duration, yoyo, loop);
|
|
240
|
+
if (ease) {
|
|
241
|
+
const easingFunctionName = gsapEasingMap[ease] || ease;
|
|
242
|
+
timeProgress = applyEasing(easingFunctionName, timeProgress);
|
|
243
|
+
}
|
|
244
|
+
if (isColorValue(from)) {
|
|
245
|
+
if (typeof to !== 'string') {
|
|
246
|
+
warnOnce(`bad-to-${property}`, `Color property "${property}" has non-string 'to' value:`, to);
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
applyColorToMaterials(materials, uniformName, from, to, timeProgress);
|
|
250
|
+
}
|
|
251
|
+
else if (typeof from === 'number') {
|
|
252
|
+
if (typeof to !== 'number') {
|
|
253
|
+
warnOnce(`bad-to-num-${property}`, `Numeric property "${property}" has non-numeric 'to' value:`, to);
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
applyNumericToMaterials(materials, uniformName, MathUtils.lerp(from, to, timeProgress));
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
warnOnce(`bad-from-${property}`, `Unhandled 'from' type for property "${property}":`, typeof from, from);
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
log('animated', { property, uniformName, from, to, timeProgress });
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
console.error(`[GenerativeEffectsAnimations] Error animating property "${animation.property}":`, err);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasHoverAnimation.d.ts","sourceRoot":"","sources":["../../src/utils/hasHoverAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAcnF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function hasHoverAnimation(animations) {
|
|
2
|
+
if (!animations)
|
|
3
|
+
return false;
|
|
4
|
+
if (animations.transform?.animations?.some(a => a.triggerMode === 'hover'))
|
|
5
|
+
return true;
|
|
6
|
+
if (animations.transform?.effects?.some(e => e.triggerMode === 'hover'))
|
|
7
|
+
return true;
|
|
8
|
+
if (animations.material?.animations?.some(a => a.triggerMode === 'hover'))
|
|
9
|
+
return true;
|
|
10
|
+
if (animations.edges?.animations?.some(a => a.triggerMode === 'hover'))
|
|
11
|
+
return true;
|
|
12
|
+
if (animations.effects?.animations?.some(a => a.triggerMode === 'hover'))
|
|
13
|
+
return true;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MaterialSettings, MaterialInstance } from '@3driseai/3drise-core';
|
|
2
|
+
import type { Object3D } from "three";
|
|
3
|
+
/**
|
|
4
|
+
* Read the current live material values for the given keys from a Three.js object.
|
|
5
|
+
* Used at step-start time to populate missing `from` values so interpolation always
|
|
6
|
+
* has a defined baseline rather than snapping.
|
|
7
|
+
*/
|
|
8
|
+
export declare function snapshotMaterialValues(object: Object3D, keys: string[]): Record<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
* Interpolate all material properties from `materialFrom` → `materialTo` at the
|
|
11
|
+
* given progress (0-1) and apply them to every material on the object.
|
|
12
|
+
*
|
|
13
|
+
* Uses `interpolateValue` from core (type-aware: color, vector2, vector3, number).
|
|
14
|
+
* Always call `snapshotMaterialValues` at step-start so `materialFrom` is fully
|
|
15
|
+
* populated — avoids the silent-snap bug caused by `undefined ?? toVal` fallback.
|
|
16
|
+
*/
|
|
17
|
+
export declare function interpolateMaterialProps(object: Object3D, materialFrom: Record<string, any>, materialTo: Record<string, any>, progress: number): void;
|
|
18
|
+
/**
|
|
19
|
+
* Standalone utility: Apply material to a single object (for use outside hooks).
|
|
20
|
+
* Uses shared utilities for texture resolution and material creation.
|
|
21
|
+
*/
|
|
22
|
+
export declare const applyMaterialToObject: (object: any, materialSettings: MaterialSettings) => Promise<MaterialInstance | undefined>;
|
|
23
|
+
//# sourceMappingURL=materialUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialUtils.d.ts","sourceRoot":"","sources":["../../src/utils/materialUtils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKtC;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS5F;AAID;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAyBrJ;AAID;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAU,QAAQ,GAAG,EAAE,kBAAkB,gBAAgB,KAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CASjI,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// materialUtils — Material interpolation utilities for viewer hooks
|
|
3
|
+
// =============================================================================
|
|
4
|
+
//
|
|
5
|
+
// Shared utilities for sequence animation material application.
|
|
6
|
+
// Snapshots live material values for smooth interpolation when `from` is
|
|
7
|
+
// omitted in a transition, and applies type-aware interpolation using core utils.
|
|
8
|
+
//
|
|
9
|
+
import { getMaterialPropertyValue, interpolateValue, applySingleProperty, createAndApplyMaterial, MATERIAL_INSTANCE_KEY, resolveTextures, } from '@3driseai/3drise-core';
|
|
10
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
+
// Snapshot
|
|
12
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
/**
|
|
14
|
+
* Read the current live material values for the given keys from a Three.js object.
|
|
15
|
+
* Used at step-start time to populate missing `from` values so interpolation always
|
|
16
|
+
* has a defined baseline rather than snapping.
|
|
17
|
+
*/
|
|
18
|
+
export function snapshotMaterialValues(object, keys) {
|
|
19
|
+
const snapshot = {};
|
|
20
|
+
for (const key of keys) {
|
|
21
|
+
const value = getMaterialPropertyValue(object, key);
|
|
22
|
+
if (value !== null && value !== undefined) {
|
|
23
|
+
snapshot[key] = value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return snapshot;
|
|
27
|
+
}
|
|
28
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
29
|
+
// Per-frame interpolation
|
|
30
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
31
|
+
/**
|
|
32
|
+
* Interpolate all material properties from `materialFrom` → `materialTo` at the
|
|
33
|
+
* given progress (0-1) and apply them to every material on the object.
|
|
34
|
+
*
|
|
35
|
+
* Uses `interpolateValue` from core (type-aware: color, vector2, vector3, number).
|
|
36
|
+
* Always call `snapshotMaterialValues` at step-start so `materialFrom` is fully
|
|
37
|
+
* populated — avoids the silent-snap bug caused by `undefined ?? toVal` fallback.
|
|
38
|
+
*/
|
|
39
|
+
export function interpolateMaterialProps(object, materialFrom, materialTo, progress) {
|
|
40
|
+
const keys = Object.keys(materialTo);
|
|
41
|
+
if (keys.length === 0)
|
|
42
|
+
return;
|
|
43
|
+
for (const key of keys) {
|
|
44
|
+
const fromVal = materialFrom[key];
|
|
45
|
+
const toVal = materialTo[key];
|
|
46
|
+
if (fromVal === undefined && toVal === undefined)
|
|
47
|
+
continue;
|
|
48
|
+
// fromVal is guaranteed to be defined after snapshotMaterialValues at step-start.
|
|
49
|
+
// Fall back to toVal only as a last resort (e.g. the snapshot found nothing).
|
|
50
|
+
const interpolated = interpolateValue(key, fromVal ?? toVal, toVal, progress);
|
|
51
|
+
object.traverse((child) => {
|
|
52
|
+
if (!child.material)
|
|
53
|
+
return;
|
|
54
|
+
const mats = Array.isArray(child.material) ? child.material : [child.material];
|
|
55
|
+
for (const mat of mats) {
|
|
56
|
+
// Handle opacity: ensure transparency mode is enabled
|
|
57
|
+
if (key === 'opacity' && typeof interpolated === 'number' && 'transparent' in mat) {
|
|
58
|
+
mat.transparent = interpolated < 1;
|
|
59
|
+
}
|
|
60
|
+
applySingleProperty(mat, key, interpolated);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
66
|
+
// Standalone material application
|
|
67
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
68
|
+
/**
|
|
69
|
+
* Standalone utility: Apply material to a single object (for use outside hooks).
|
|
70
|
+
* Uses shared utilities for texture resolution and material creation.
|
|
71
|
+
*/
|
|
72
|
+
export const applyMaterialToObject = async (object, materialSettings) => {
|
|
73
|
+
if (!object || !materialSettings)
|
|
74
|
+
return;
|
|
75
|
+
const variant = materialSettings.materialVariant || 'Standard';
|
|
76
|
+
const resolvedSettings = await resolveTextures(variant, materialSettings);
|
|
77
|
+
const materialInstance = createAndApplyMaterial(variant, resolvedSettings);
|
|
78
|
+
object.material = materialInstance.material;
|
|
79
|
+
object.userData[MATERIAL_INSTANCE_KEY] = materialInstance;
|
|
80
|
+
return materialInstance;
|
|
81
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Points } from "three";
|
|
2
|
+
export declare const handleShapeAnimation: (delta: number, speed: number, animationProgress: React.RefObject<number>, pointsRef: React.RefObject<Points | null>, basePositions: React.RefObject<Float32Array | null>, targetPositions: React.RefObject<Float32Array | null>) => void;
|
|
3
|
+
//# sourceMappingURL=particleAnimations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particleAnimations.d.ts","sourceRoot":"","sources":["../../src/utils/particleAnimations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpC,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,mBAAmB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,eAAe,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,iBAAiB,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,KAAG,IAgBtQ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const handleShapeAnimation = (delta, speed, animationProgress, pointsRef, basePositions, targetPositions) => {
|
|
2
|
+
if (!pointsRef.current || !basePositions.current)
|
|
3
|
+
return;
|
|
4
|
+
const progress = Math.min(animationProgress.current + delta * speed, 1);
|
|
5
|
+
const geometry = pointsRef.current.geometry;
|
|
6
|
+
const posAttr = geometry.attributes.position;
|
|
7
|
+
if (targetPositions.current) {
|
|
8
|
+
const galPos = targetPositions.current;
|
|
9
|
+
for (let i = 0; i < basePositions.current.length; i += 3) {
|
|
10
|
+
posAttr.array[i] = basePositions.current[i] + (galPos[i] - basePositions.current[i]) * progress;
|
|
11
|
+
posAttr.array[i + 1] = basePositions.current[i + 1] + (galPos[i + 1] - basePositions.current[i + 1]) * progress;
|
|
12
|
+
posAttr.array[i + 2] = basePositions.current[i + 2] + (galPos[i + 2] - basePositions.current[i + 2]) * progress;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
animationProgress.current = progress;
|
|
16
|
+
posAttr.needsUpdate = true;
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BufferGeometry } from 'three';
|
|
2
|
+
export interface SampleVolumeOptions {
|
|
3
|
+
/** Safety cap on candidate attempts, expressed as a multiple of `count`. */
|
|
4
|
+
oversample?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Fill the solid interior of a closed mesh with uniformly distributed points.
|
|
8
|
+
*
|
|
9
|
+
* Uses point-in-mesh rejection sampling: a ray cast from a candidate crosses
|
|
10
|
+
* the (double-sided) surface an odd number of times iff the candidate lies
|
|
11
|
+
* inside the solid. Works on any watertight geometry — heart, box, or an
|
|
12
|
+
* arbitrary imported host mesh.
|
|
13
|
+
*
|
|
14
|
+
* Returns a flat XYZ Float32Array. May fall short of `count` on very sparse
|
|
15
|
+
* bounding boxes (the cap prevents runaway loops).
|
|
16
|
+
*
|
|
17
|
+
* Note: brute-force raycast is fine for preview-scale counts. For heavy host
|
|
18
|
+
* meshes or large counts, swap `intersectObject` for a BVH-accelerated query.
|
|
19
|
+
*/
|
|
20
|
+
export declare function sampleVolume(geometry: BufferGeometry, count: number, { oversample }?: SampleVolumeOptions): Float32Array;
|
|
21
|
+
//# sourceMappingURL=sampleVolume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampleVolume.d.ts","sourceRoot":"","sources":["../../src/utils/sampleVolume.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,MAAM,WAAW,mBAAmB;IAChC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,UAAe,EAAE,GAAE,mBAAwB,GAAG,YAAY,CA4BjI"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DoubleSide, Mesh, MeshBasicMaterial, Raycaster, Vector3, } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Fill the solid interior of a closed mesh with uniformly distributed points.
|
|
4
|
+
*
|
|
5
|
+
* Uses point-in-mesh rejection sampling: a ray cast from a candidate crosses
|
|
6
|
+
* the (double-sided) surface an odd number of times iff the candidate lies
|
|
7
|
+
* inside the solid. Works on any watertight geometry — heart, box, or an
|
|
8
|
+
* arbitrary imported host mesh.
|
|
9
|
+
*
|
|
10
|
+
* Returns a flat XYZ Float32Array. May fall short of `count` on very sparse
|
|
11
|
+
* bounding boxes (the cap prevents runaway loops).
|
|
12
|
+
*
|
|
13
|
+
* Note: brute-force raycast is fine for preview-scale counts. For heavy host
|
|
14
|
+
* meshes or large counts, swap `intersectObject` for a BVH-accelerated query.
|
|
15
|
+
*/
|
|
16
|
+
export function sampleVolume(geometry, count, { oversample = 80 } = {}) {
|
|
17
|
+
const probe = new Mesh(geometry, new MeshBasicMaterial({ side: DoubleSide }));
|
|
18
|
+
probe.updateMatrixWorld(true);
|
|
19
|
+
geometry.computeBoundingBox();
|
|
20
|
+
const bb = geometry.boundingBox;
|
|
21
|
+
const sx = bb.max.x - bb.min.x;
|
|
22
|
+
const sy = bb.max.y - bb.min.y;
|
|
23
|
+
const sz = bb.max.z - bb.min.z;
|
|
24
|
+
const ray = new Raycaster();
|
|
25
|
+
const dir = new Vector3(0, 0, 1);
|
|
26
|
+
const p = new Vector3();
|
|
27
|
+
const out = new Float32Array(count * 3);
|
|
28
|
+
let i = 0;
|
|
29
|
+
let tries = 0;
|
|
30
|
+
const maxTries = count * oversample;
|
|
31
|
+
while (i < count && tries < maxTries) {
|
|
32
|
+
tries++;
|
|
33
|
+
p.set(bb.min.x + Math.random() * sx, bb.min.y + Math.random() * sy, bb.min.z + Math.random() * sz);
|
|
34
|
+
ray.set(p, dir);
|
|
35
|
+
if (ray.intersectObject(probe, false).length % 2 === 1) {
|
|
36
|
+
out[i * 3] = p.x;
|
|
37
|
+
out[i * 3 + 1] = p.y;
|
|
38
|
+
out[i * 3 + 2] = p.z;
|
|
39
|
+
i++;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
probe.material.dispose();
|
|
43
|
+
return i === count ? out : out.slice(0, i * 3);
|
|
44
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Object3D } from "three";
|
|
2
|
+
export declare function findById(id: string): Object3D | null;
|
|
3
|
+
/**
|
|
4
|
+
* Find a Three.js object in the live scene by its Three.js name (object.name).
|
|
5
|
+
* Uses the native Three.js getObjectByName for efficiency.
|
|
6
|
+
* Returns null if the scene is not yet initialised or the object is not found.
|
|
7
|
+
*/
|
|
8
|
+
export declare function findByName(name: string): Object3D | null;
|
|
9
|
+
//# sourceMappingURL=sceneQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sceneQuery.d.ts","sourceRoot":"","sources":["../../src/utils/sceneQuery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAUpD;AACD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAIxD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SceneStore } from '@3driseai/3drise-core';
|
|
2
|
+
export function findById(id) {
|
|
3
|
+
if (!id || !SceneStore.scene)
|
|
4
|
+
return null;
|
|
5
|
+
let found = null;
|
|
6
|
+
SceneStore.scene.traverse((obj) => {
|
|
7
|
+
if (!found && obj.userData.id === id) {
|
|
8
|
+
found = obj;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return found;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Find a Three.js object in the live scene by its Three.js name (object.name).
|
|
15
|
+
* Uses the native Three.js getObjectByName for efficiency.
|
|
16
|
+
* Returns null if the scene is not yet initialised or the object is not found.
|
|
17
|
+
*/
|
|
18
|
+
export function findByName(name) {
|
|
19
|
+
if (!SceneStore.scene)
|
|
20
|
+
return null;
|
|
21
|
+
return SceneStore.scene.getObjectByName(name) ?? null;
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Use3driseShaderEffects } from "@3driseai/3drise-core";
|
|
2
|
+
export declare function update3driseShaderUniforms(uniforms: any, effects: Use3driseShaderEffects, u_time: number, pointer: {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}): void;
|
|
6
|
+
//# sourceMappingURL=shaderUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shaderUtils.d.ts","sourceRoot":"","sources":["../../src/utils/shaderUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;IACxG,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,GAAG,IAAI,CAqJf"}
|