@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,85 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { dataCenterServer } from '../constants.js';
|
|
4
|
+
import SceneBuilder from "./SceneBuilder.js";
|
|
5
|
+
import { loadAssets, } from "@3driseai/3drise-core";
|
|
6
|
+
import LoadingIndicator from "./LoadingIndicator.js";
|
|
7
|
+
import { useMeshController } from "../hooks/useMeshController.js";
|
|
8
|
+
const PROJECT_LOADER_DEBUG_PREFIX = '[ProjectLoaderDebug]';
|
|
9
|
+
const ProjectLoader = ({ projectId, onObjectClick, onObjectHover, onElementClick, onElementHover, onSceneInitialized, loadingIndicator = _jsx(LoadingIndicator, { text: "Loading project...", fullScreen: true, animate: true }) }) => {
|
|
10
|
+
const [project, setProject] = useState(null);
|
|
11
|
+
const meshController = useMeshController();
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (projectId) {
|
|
14
|
+
loadProject(projectId);
|
|
15
|
+
}
|
|
16
|
+
}, [projectId]);
|
|
17
|
+
const loadProject = async (projectId) => {
|
|
18
|
+
try {
|
|
19
|
+
const url = `${dataCenterServer}projects/${projectId}/view`;
|
|
20
|
+
console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Fetching project', {
|
|
21
|
+
projectId,
|
|
22
|
+
url,
|
|
23
|
+
});
|
|
24
|
+
const response = await fetch(url, {
|
|
25
|
+
method: "GET",
|
|
26
|
+
headers: {
|
|
27
|
+
"Content-Type": "application/json",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Received project response', {
|
|
31
|
+
projectId,
|
|
32
|
+
status: response.status,
|
|
33
|
+
ok: response.ok,
|
|
34
|
+
url,
|
|
35
|
+
});
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
if (response.status === 404) {
|
|
38
|
+
throw new Error("Project not found");
|
|
39
|
+
}
|
|
40
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
41
|
+
}
|
|
42
|
+
const responseData = await response.json();
|
|
43
|
+
// console.log(PROJECT_LOADER_DEBUG_PREFIX, 'Parsed project payload', {
|
|
44
|
+
// projectId,
|
|
45
|
+
// sceneObjectsCount: responseData.sceneObjects?.length || 0,
|
|
46
|
+
// projectName: responseData.name,
|
|
47
|
+
// });
|
|
48
|
+
console.log("Loaded project:", responseData);
|
|
49
|
+
const sceneObjects = responseData.sceneObjects || [];
|
|
50
|
+
const modelObjects = sceneObjects.filter(obj => obj.type === 'model');
|
|
51
|
+
const meshObjects = sceneObjects.filter(obj => obj.type === 'mesh');
|
|
52
|
+
console.log('Model objects in loaded project:', modelObjects);
|
|
53
|
+
try {
|
|
54
|
+
const models = modelObjects.map(obj => ({
|
|
55
|
+
...obj.userData,
|
|
56
|
+
id: obj.id,
|
|
57
|
+
}));
|
|
58
|
+
await loadAssets(models);
|
|
59
|
+
console.log('[useLoadProject] Assets loaded for model objects');
|
|
60
|
+
}
|
|
61
|
+
catch (assetError) {
|
|
62
|
+
console.error('[useLoadProject] Failed to load model assets, continuing with project load:', assetError);
|
|
63
|
+
}
|
|
64
|
+
meshController.createObjects(meshObjects);
|
|
65
|
+
console.log("PROJECT LOAD COMPLETE");
|
|
66
|
+
setProject(responseData);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
console.error(PROJECT_LOADER_DEBUG_PREFIX, 'Error fetching project', {
|
|
70
|
+
projectId,
|
|
71
|
+
error,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
if (!project) {
|
|
76
|
+
return _jsx("div", { style: {
|
|
77
|
+
width: '100%', height: '100%', display: 'flex',
|
|
78
|
+
alignItems: 'center', justifyContent: 'center',
|
|
79
|
+
backgroundColor: 'black',
|
|
80
|
+
flexDirection: 'column', gap: '1rem'
|
|
81
|
+
}, children: loadingIndicator });
|
|
82
|
+
}
|
|
83
|
+
return _jsx(_Fragment, { children: _jsx(SceneBuilder, { project: project, onSceneInitialized: onSceneInitialized, onUiElementClick: onElementClick, onUiElementHover: onElementHover, onObjectClick: onObjectClick }) });
|
|
84
|
+
};
|
|
85
|
+
export default ProjectLoader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CreatedObjectSettings } from '@3driseai/3drise-core';
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface RainProps {
|
|
4
|
+
settings: CreatedObjectSettings;
|
|
5
|
+
}
|
|
6
|
+
declare const Rain: React.FC<RainProps>;
|
|
7
|
+
export default Rain;
|
|
8
|
+
//# sourceMappingURL=Rain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rain.d.ts","sourceRoot":"","sources":["../../src/components/Rain.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,qBAAqB,CAAC;CACnC;AA+ED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAgL7B,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { useEffect, useRef, useMemo } from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { useThree, useFrame } from '@react-three/fiber';
|
|
4
|
+
import { RainMaterial } from '@3driseai/3drise-core';
|
|
5
|
+
import { applyEasing, calculateTimeProgress, gsapEasingMap, handleTransformAnimations, handleTransformMouseMove, interpolateMouseMoveProperty, interpolateValue, } from '@3driseai/3drise-core';
|
|
6
|
+
const MAX_PARTICLES = 20000;
|
|
7
|
+
const DEG_TO_RAD = Math.PI / 180;
|
|
8
|
+
// Properties on RainConfig that can be driven per-frame by animations / mouseMove.
|
|
9
|
+
const RAIN_ANIMATABLE = new Set([
|
|
10
|
+
'color', 'size', 'opacity', 'speed', 'windStrength', 'windDirection', 'turbulence',
|
|
11
|
+
]);
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Rain-domain helpers
|
|
14
|
+
// =============================================================================
|
|
15
|
+
function applyRainKeyframeAnimations(animations, startValuesCache, config, override, currentTime) {
|
|
16
|
+
// Reset overrides each pass so removed animations don't linger.
|
|
17
|
+
for (const k of Object.keys(override))
|
|
18
|
+
delete override[k];
|
|
19
|
+
if (!animations?.length)
|
|
20
|
+
return;
|
|
21
|
+
for (const anim of animations) {
|
|
22
|
+
const { property, to, duration, ease, loop = false, yoyo = false, active } = anim;
|
|
23
|
+
if (!active || to === undefined)
|
|
24
|
+
continue;
|
|
25
|
+
if (!RAIN_ANIMATABLE.has(property))
|
|
26
|
+
continue;
|
|
27
|
+
let from = anim.from;
|
|
28
|
+
if (from === undefined) {
|
|
29
|
+
from = startValuesCache[property] ??= config[property];
|
|
30
|
+
}
|
|
31
|
+
if (from === undefined || from === null)
|
|
32
|
+
continue;
|
|
33
|
+
let p = calculateTimeProgress(currentTime, duration, yoyo, loop);
|
|
34
|
+
if (ease) {
|
|
35
|
+
const fn = gsapEasingMap[ease] || ease;
|
|
36
|
+
p = applyEasing(fn, p);
|
|
37
|
+
}
|
|
38
|
+
override[property] = interpolateValue(property, from, to, p);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function applyRainMouseMove(properties, config, override, pointer) {
|
|
42
|
+
for (const k of Object.keys(override))
|
|
43
|
+
delete override[k];
|
|
44
|
+
if (!properties?.length)
|
|
45
|
+
return;
|
|
46
|
+
for (const { property, enabled, propertySettings } of properties) {
|
|
47
|
+
if (!enabled || !RAIN_ANIMATABLE.has(property))
|
|
48
|
+
continue;
|
|
49
|
+
const { axis = 'both', sensitivity = 1, inverted = false, min, max } = propertySettings || {};
|
|
50
|
+
const base = config[property];
|
|
51
|
+
if (base === undefined)
|
|
52
|
+
continue;
|
|
53
|
+
override[property] = interpolateMouseMoveProperty(base, min, max, pointer, axis, sensitivity, inverted);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function applyRainOverridesToUniforms(material, overrides) {
|
|
57
|
+
if (!material?.uniforms)
|
|
58
|
+
return;
|
|
59
|
+
const u = material.uniforms;
|
|
60
|
+
if (overrides.color !== undefined && u.uColor) {
|
|
61
|
+
const c = overrides.color;
|
|
62
|
+
if (c instanceof THREE.Color)
|
|
63
|
+
u.uColor.value.copy(c);
|
|
64
|
+
else if (typeof c === 'string')
|
|
65
|
+
u.uColor.value.set(c);
|
|
66
|
+
}
|
|
67
|
+
if (overrides.opacity !== undefined && u.opacity)
|
|
68
|
+
u.opacity.value = overrides.opacity;
|
|
69
|
+
if (overrides.size !== undefined && u.streakLength) {
|
|
70
|
+
u.streakLength.value = Math.max(overrides.size * 30, 1.0);
|
|
71
|
+
}
|
|
72
|
+
if (overrides.windDirection !== undefined && u.windAngle) {
|
|
73
|
+
u.windAngle.value = overrides.windDirection * DEG_TO_RAD;
|
|
74
|
+
}
|
|
75
|
+
if (overrides.windStrength !== undefined && u.windTilt) {
|
|
76
|
+
u.windTilt.value = overrides.windStrength;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// =============================================================================
|
|
80
|
+
// MAIN COMPONENT
|
|
81
|
+
// =============================================================================
|
|
82
|
+
const Rain = ({ settings }) => {
|
|
83
|
+
const { scene } = useThree();
|
|
84
|
+
const materialRef = useRef(null);
|
|
85
|
+
const geometryRef = useRef(null);
|
|
86
|
+
const pointsRef = useRef(null);
|
|
87
|
+
const velocitiesRef = useRef(null);
|
|
88
|
+
const { meshSettings, animations, mouseMove } = settings;
|
|
89
|
+
const areaSize = meshSettings.scale?.[0] ?? 200;
|
|
90
|
+
const config = settings.config;
|
|
91
|
+
const particleCount = useMemo(() => {
|
|
92
|
+
const density = config.density ?? 100;
|
|
93
|
+
return Math.min(Math.max(Math.round(density * 100), 100), MAX_PARTICLES);
|
|
94
|
+
}, [config.density]);
|
|
95
|
+
// Per-domain override refs + caches
|
|
96
|
+
const animatedRainOverrideRef = useRef({});
|
|
97
|
+
const mouseRainOverrideRef = useRef({});
|
|
98
|
+
const rainAnimCacheRef = useRef({});
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
const halfArea = areaSize / 2;
|
|
101
|
+
const height = areaSize * 1.25;
|
|
102
|
+
const positions = new Float32Array(particleCount * 3);
|
|
103
|
+
const speeds = new Float32Array(particleCount);
|
|
104
|
+
const velocities = new Float32Array(particleCount);
|
|
105
|
+
for (let i = 0; i < particleCount; i++) {
|
|
106
|
+
const i3 = i * 3;
|
|
107
|
+
positions[i3] = Math.random() * areaSize - halfArea;
|
|
108
|
+
positions[i3 + 1] = Math.random() * height - height / 4;
|
|
109
|
+
positions[i3 + 2] = Math.random() * areaSize - halfArea;
|
|
110
|
+
const v = 0.8 + Math.random() * 0.4;
|
|
111
|
+
speeds[i] = v;
|
|
112
|
+
velocities[i] = v;
|
|
113
|
+
}
|
|
114
|
+
const geometry = new THREE.BufferGeometry();
|
|
115
|
+
geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
|
|
116
|
+
geometry.setAttribute('speed', new THREE.BufferAttribute(speeds, 1));
|
|
117
|
+
const material = new RainMaterial();
|
|
118
|
+
material.transparent = true;
|
|
119
|
+
material.depthWrite = false;
|
|
120
|
+
material.blending = THREE.NormalBlending;
|
|
121
|
+
material.uniforms.uColor.value.set(config.color || '#ffffff');
|
|
122
|
+
material.uniforms.opacity.value = config.opacity ?? 0.5;
|
|
123
|
+
material.uniforms.streakLength.value = Math.max((config.size ?? 0.1) * 30, 1.0);
|
|
124
|
+
const points = new THREE.Points(geometry, material);
|
|
125
|
+
points.name = meshSettings.name;
|
|
126
|
+
points.userData.id = settings.id;
|
|
127
|
+
points.frustumCulled = false;
|
|
128
|
+
if (pointsRef.current) {
|
|
129
|
+
scene.remove(pointsRef.current);
|
|
130
|
+
geometryRef.current?.dispose();
|
|
131
|
+
materialRef.current?.dispose();
|
|
132
|
+
}
|
|
133
|
+
geometryRef.current = geometry;
|
|
134
|
+
materialRef.current = material;
|
|
135
|
+
pointsRef.current = points;
|
|
136
|
+
velocitiesRef.current = velocities;
|
|
137
|
+
if (meshSettings.visible)
|
|
138
|
+
scene.add(points);
|
|
139
|
+
return () => {
|
|
140
|
+
if (pointsRef.current)
|
|
141
|
+
scene.remove(pointsRef.current);
|
|
142
|
+
geometry.dispose();
|
|
143
|
+
material.dispose();
|
|
144
|
+
};
|
|
145
|
+
}, [particleCount, areaSize]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
if (!pointsRef.current)
|
|
148
|
+
return;
|
|
149
|
+
if (meshSettings.visible) {
|
|
150
|
+
if (!pointsRef.current.parent)
|
|
151
|
+
scene.add(pointsRef.current);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
scene.remove(pointsRef.current);
|
|
155
|
+
}
|
|
156
|
+
}, [meshSettings.visible, scene]);
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (!materialRef.current)
|
|
159
|
+
return;
|
|
160
|
+
const u = materialRef.current.uniforms;
|
|
161
|
+
u.uColor.value.set(config.color || '#ffffff');
|
|
162
|
+
u.opacity.value = config.opacity ?? 0.5;
|
|
163
|
+
u.streakLength.value = Math.max((config.size ?? 0.1) * 30, 1.0);
|
|
164
|
+
}, [config.color, config.size, config.opacity]);
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
if (!materialRef.current)
|
|
167
|
+
return;
|
|
168
|
+
const u = materialRef.current.uniforms;
|
|
169
|
+
u.windAngle.value = (config.windDirection ?? 0) * DEG_TO_RAD;
|
|
170
|
+
u.windTilt.value = config.windStrength ?? 0;
|
|
171
|
+
}, [config.windDirection, config.windStrength]);
|
|
172
|
+
useFrame((state, delta) => {
|
|
173
|
+
if (!geometryRef.current || !meshSettings.visible || !velocitiesRef.current)
|
|
174
|
+
return;
|
|
175
|
+
const points = pointsRef.current;
|
|
176
|
+
const material = materialRef.current;
|
|
177
|
+
const now = Date.now();
|
|
178
|
+
const pointer = state.pointer;
|
|
179
|
+
// ── PER-DOMAIN ANIMATIONS ───────────────────────────────────────────────
|
|
180
|
+
const transformAnims = animations?.transform?.animations;
|
|
181
|
+
if (points && transformAnims?.length) {
|
|
182
|
+
handleTransformAnimations({ object: points, meshSettings: meshSettings, pathIsActive: false }, transformAnims, now, false);
|
|
183
|
+
}
|
|
184
|
+
applyRainKeyframeAnimations(animations?.rain?.animations, rainAnimCacheRef.current, config, animatedRainOverrideRef.current, now);
|
|
185
|
+
// ── PER-DOMAIN MOUSE-MOVE ───────────────────────────────────────────────
|
|
186
|
+
const mm = mouseMove;
|
|
187
|
+
const isPerDomain = mm && ('transform' in mm || 'rain' in mm);
|
|
188
|
+
if (isPerDomain) {
|
|
189
|
+
const md = mm;
|
|
190
|
+
if (points && md.transform?.enabled && md.transform.properties?.length) {
|
|
191
|
+
handleTransformMouseMove({ object: points, meshSettings: meshSettings }, md.transform.properties, pointer);
|
|
192
|
+
}
|
|
193
|
+
applyRainMouseMove(md.rain?.enabled ? md.rain.properties : undefined, config, mouseRainOverrideRef.current, pointer);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
for (const k of Object.keys(mouseRainOverrideRef.current))
|
|
197
|
+
delete mouseRainOverrideRef.current[k];
|
|
198
|
+
}
|
|
199
|
+
// Push override-driven values to material uniforms (mouse first, animation wins).
|
|
200
|
+
applyRainOverridesToUniforms(material, mouseRainOverrideRef.current);
|
|
201
|
+
applyRainOverridesToUniforms(material, animatedRainOverrideRef.current);
|
|
202
|
+
// Effective values for the particle simulation (animation wins, then mouse, then config).
|
|
203
|
+
const effectiveSpeed = animatedRainOverrideRef.current.speed
|
|
204
|
+
?? mouseRainOverrideRef.current.speed
|
|
205
|
+
?? config.speed
|
|
206
|
+
?? 1;
|
|
207
|
+
const effectiveWindStrength = animatedRainOverrideRef.current.windStrength
|
|
208
|
+
?? mouseRainOverrideRef.current.windStrength
|
|
209
|
+
?? config.windStrength
|
|
210
|
+
?? 0;
|
|
211
|
+
const effectiveWindDirection = animatedRainOverrideRef.current.windDirection
|
|
212
|
+
?? mouseRainOverrideRef.current.windDirection
|
|
213
|
+
?? config.windDirection
|
|
214
|
+
?? 0;
|
|
215
|
+
const effectiveTurbulence = animatedRainOverrideRef.current.turbulence
|
|
216
|
+
?? mouseRainOverrideRef.current.turbulence
|
|
217
|
+
?? config.turbulence
|
|
218
|
+
?? 0;
|
|
219
|
+
// ── PARTICLE SIMULATION ─────────────────────────────────────────────────
|
|
220
|
+
const posAttr = geometryRef.current.attributes.position;
|
|
221
|
+
const positions = posAttr.array;
|
|
222
|
+
const velocities = velocitiesRef.current;
|
|
223
|
+
const fallSpeed = effectiveSpeed * 60;
|
|
224
|
+
const windMag = effectiveWindStrength * 30;
|
|
225
|
+
const windAngle = effectiveWindDirection * DEG_TO_RAD;
|
|
226
|
+
const windX = Math.sin(windAngle) * windMag;
|
|
227
|
+
const windZ = Math.cos(windAngle) * windMag;
|
|
228
|
+
const halfArea = areaSize / 2;
|
|
229
|
+
const height = areaSize * 1.25;
|
|
230
|
+
const groundY = -height / 4;
|
|
231
|
+
const dt = Math.min(delta, 0.05);
|
|
232
|
+
for (let i = 0; i < particleCount; i++) {
|
|
233
|
+
const i3 = i * 3;
|
|
234
|
+
const v = velocities[i];
|
|
235
|
+
const turbX = effectiveTurbulence > 0 ? (Math.random() - 0.5) * effectiveTurbulence * 10 * dt : 0;
|
|
236
|
+
const turbZ = effectiveTurbulence > 0 ? (Math.random() - 0.5) * effectiveTurbulence * 10 * dt : 0;
|
|
237
|
+
positions[i3] += (windX * v + turbX) * dt;
|
|
238
|
+
positions[i3 + 1] -= fallSpeed * v * dt;
|
|
239
|
+
positions[i3 + 2] += (windZ * v + turbZ) * dt;
|
|
240
|
+
if (positions[i3 + 1] < groundY) {
|
|
241
|
+
positions[i3] = Math.random() * areaSize - halfArea;
|
|
242
|
+
positions[i3 + 1] = height * 0.75;
|
|
243
|
+
positions[i3 + 2] = Math.random() * areaSize - halfArea;
|
|
244
|
+
velocities[i] = 0.8 + Math.random() * 0.4;
|
|
245
|
+
}
|
|
246
|
+
if (positions[i3] > halfArea)
|
|
247
|
+
positions[i3] -= areaSize;
|
|
248
|
+
if (positions[i3] < -halfArea)
|
|
249
|
+
positions[i3] += areaSize;
|
|
250
|
+
if (positions[i3 + 2] > halfArea)
|
|
251
|
+
positions[i3 + 2] -= areaSize;
|
|
252
|
+
if (positions[i3 + 2] < -halfArea)
|
|
253
|
+
positions[i3 + 2] += areaSize;
|
|
254
|
+
}
|
|
255
|
+
posAttr.needsUpdate = true;
|
|
256
|
+
});
|
|
257
|
+
return null;
|
|
258
|
+
};
|
|
259
|
+
export default Rain;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface RiseLogoProps {
|
|
2
|
+
/** Width/height in px @default 160 */
|
|
3
|
+
size?: number;
|
|
4
|
+
/** Play the staggered build-up animation @default true */
|
|
5
|
+
animated?: boolean;
|
|
6
|
+
/** Loop the center dot pulse @default true */
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
/** Animation speed multiplier @default 1 */
|
|
9
|
+
speed?: number;
|
|
10
|
+
/** Primary accent hex color @default "#00f5ff" */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** SVG background fill — use "transparent" for none @default "transparent" */
|
|
13
|
+
bgColor?: string;
|
|
14
|
+
/** Called once the build animation completes */
|
|
15
|
+
onComplete?: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const RiseLogo: ({ size, animated, loop, speed, color, bgColor, onComplete, }: RiseLogoProps) => import("react").JSX.Element;
|
|
18
|
+
export default RiseLogo;
|
|
19
|
+
//# sourceMappingURL=RiseLogo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RiseLogo.d.ts","sourceRoot":"","sources":["../../src/components/RiseLogo.tsx"],"names":[],"mappings":"AACA,UAAU,aAAa;IACnB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,QAAQ,GAAI,8DAAkH,aAAa,gCA6DhJ,CAAC;AAWF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useRef } from "react";
|
|
3
|
+
const RiseLogo = ({ size = 160, animated = true, loop = true, speed = 1, color = "#00f5ff", bgColor = "transparent", onComplete, }) => {
|
|
4
|
+
const [phase, setPhase] = useState(animated ? "idle" : "done");
|
|
5
|
+
const timers = useRef([]);
|
|
6
|
+
const colorDark = blendHex(color, "#000000", 0.55);
|
|
7
|
+
const colorMid = blendHex(color, "#000000", 0.72);
|
|
8
|
+
const colorDarker = blendHex(colorMid, "#000000", 0.15);
|
|
9
|
+
const baseDuration = 350 / speed;
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!animated) {
|
|
12
|
+
setPhase("done");
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
timers.current.forEach(clearTimeout);
|
|
16
|
+
timers.current = [];
|
|
17
|
+
setPhase("idle");
|
|
18
|
+
timers.current = [
|
|
19
|
+
setTimeout(() => setPhase("block1"), 80),
|
|
20
|
+
setTimeout(() => setPhase("block2"), 80 + baseDuration),
|
|
21
|
+
setTimeout(() => setPhase("block3"), 80 + baseDuration * 2),
|
|
22
|
+
setTimeout(() => { setPhase("done"); onComplete?.(); }, 80 + baseDuration * 3 + 120),
|
|
23
|
+
];
|
|
24
|
+
return () => timers.current.forEach(clearTimeout);
|
|
25
|
+
}, [animated, speed]);
|
|
26
|
+
const ease = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
27
|
+
const dur = `${baseDuration}ms`;
|
|
28
|
+
const b1 = ["block1", "block2", "block3", "done"].includes(phase);
|
|
29
|
+
const b2 = ["block2", "block3", "done"].includes(phase);
|
|
30
|
+
const b3 = ["block3", "done"].includes(phase);
|
|
31
|
+
const apex = phase === "done";
|
|
32
|
+
const blockStyle = (visible) => ({
|
|
33
|
+
opacity: visible ? 1 : 0,
|
|
34
|
+
transform: visible ? "translateY(0)" : "translateY(14px)",
|
|
35
|
+
transition: visible
|
|
36
|
+
? `opacity ${dur} ${ease}, transform ${dur} ${ease}`
|
|
37
|
+
: "none",
|
|
38
|
+
});
|
|
39
|
+
const apexStyle = {
|
|
40
|
+
opacity: apex ? 1 : 0,
|
|
41
|
+
transition: apex ? `opacity ${dur} ease` : "none",
|
|
42
|
+
};
|
|
43
|
+
// ViewBox: 170 × 175
|
|
44
|
+
// Top block face vertices: top(85,76) left(64,88) right(106,88) bottom(85,100)
|
|
45
|
+
// Center of top face = (85, 88)
|
|
46
|
+
const CX = 85;
|
|
47
|
+
const CY = 88;
|
|
48
|
+
const pulseDur = `${(1800 / speed).toFixed(0)}ms`;
|
|
49
|
+
const beamDur = `${(900 / speed).toFixed(0)}ms`;
|
|
50
|
+
const loopVal = loop ? "infinite" : "1";
|
|
51
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
|
|
52
|
+
@keyframes rl-pulse {
|
|
53
|
+
0% { r: 5; opacity: 0.9; }
|
|
54
|
+
70% { r: 17; opacity: 0.12; }
|
|
55
|
+
100% { r: 22; opacity: 0; }
|
|
56
|
+
}
|
|
57
|
+
@keyframes rl-beam {
|
|
58
|
+
0% { stroke-dashoffset: 0; }
|
|
59
|
+
100% { stroke-dashoffset: -28; }
|
|
60
|
+
}
|
|
61
|
+
.rl-pulse { animation: rl-pulse ${pulseDur} ease-out ${loopVal} forwards; }
|
|
62
|
+
.rl-beam { animation: rl-beam ${beamDur} linear ${loopVal}; }
|
|
63
|
+
` }), _jsxs("svg", { width: size, height: size, viewBox: "0 0 170 175", xmlns: "http://www.w3.org/2000/svg", "aria-label": "3D-Rise logo", role: "img", style: { background: bgColor, display: "block" }, children: [_jsxs("g", { style: blockStyle(b1), children: [_jsx("polygon", { points: "45,120 85,98 125,120 85,142", fill: colorDark, stroke: color, strokeWidth: "1" }), _jsx("polygon", { points: "45,120 45,132 85,154 85,142", fill: colorMid, stroke: color, strokeWidth: "1" }), _jsx("polygon", { points: "125,120 125,132 85,154 85,142", fill: colorDarker, stroke: color, strokeWidth: "1" })] }), _jsxs("g", { style: blockStyle(b2), children: [_jsx("polygon", { points: "55,103 85,85 115,103 85,121", fill: colorDark, stroke: color, strokeWidth: "1" }), _jsx("polygon", { points: "55,103 55,114 85,132 85,121", fill: colorMid, stroke: color, strokeWidth: "1" }), _jsx("polygon", { points: "115,103 115,114 85,132 85,121", fill: colorDarker, stroke: color, strokeWidth: "1" })] }), _jsxs("g", { style: blockStyle(b3), children: [_jsx("polygon", { points: "64,88 85,76 106,88 85,100", fill: colorDark, stroke: color, strokeWidth: "1" }), _jsx("polygon", { points: "64,88 64,97 85,109 85,100", fill: colorMid, stroke: color, strokeWidth: "1" }), _jsx("polygon", { points: "106,88 106,97 85,109 85,100", fill: colorDarker, stroke: color, strokeWidth: "1" })] }), _jsxs("g", { style: apexStyle, children: [_jsx("line", { x1: CX, y1: "44", x2: CX, y2: CY, stroke: color, strokeWidth: "1.4", strokeDasharray: "5 4", className: "rl-beam", opacity: "0.55" }), _jsx("circle", { cx: CX, cy: CY, r: "5", fill: "none", stroke: color, strokeWidth: "1", className: "rl-pulse" }), _jsx("circle", { cx: CX, cy: CY, r: "9", fill: "none", stroke: color, strokeWidth: "0.7", opacity: "0.3" }), _jsx("circle", { cx: CX, cy: CY, r: "4.5", fill: color }), _jsx("circle", { cx: CX, cy: CY, r: "2", fill: "#ffffff", opacity: "0.85" })] })] })] }));
|
|
64
|
+
};
|
|
65
|
+
/** Linearly blend two hex colors. ratio: 0 = all a, 1 = all b */
|
|
66
|
+
function blendHex(a, b, ratio) {
|
|
67
|
+
const parse = (h) => {
|
|
68
|
+
h = h.replace("#", "");
|
|
69
|
+
return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];
|
|
70
|
+
};
|
|
71
|
+
const [ar, ag, ab] = parse(a);
|
|
72
|
+
const [br, bg, bb] = parse(b);
|
|
73
|
+
return `rgb(${Math.round(ar + (br - ar) * ratio)},${Math.round(ag + (bg - ag) * ratio)},${Math.round(ab + (bb - ab) * ratio)})`;
|
|
74
|
+
}
|
|
75
|
+
export default RiseLogo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneBuilder.d.ts","sourceRoot":"","sources":["../../src/components/SceneBuilder.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwH7C,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Canvas } from "@react-three/fiber";
|
|
4
|
+
import { LIGHTING_PRESETS, SceneStore } from "@3driseai/3drise-core";
|
|
5
|
+
import { NoToneMapping } from "three";
|
|
6
|
+
import LightsManager from "./LightsManager.js";
|
|
7
|
+
import EnvironmentManager from "./EnvironmentManager.js";
|
|
8
|
+
import CameraController from "./CameraController.js";
|
|
9
|
+
import ObjectsRenderer from "./ObjectsRenderer.js";
|
|
10
|
+
import CursorController from "./cursor/CursorController.js";
|
|
11
|
+
import { Physics } from "@react-three/rapier";
|
|
12
|
+
const SceneBuilder = ({ project, width = "100%", height = "100vh", style = {}, className = "", onSceneInitialized, onUiElementClick, onObjectClick, }) => {
|
|
13
|
+
const sceneSettings = (project.sceneSettingsData || {});
|
|
14
|
+
// const meshController = useMeshController();
|
|
15
|
+
const [isThreeJsMounted, setIsThreeJsMounted] = useState(false);
|
|
16
|
+
const environment = (project.environments && project.environments.length > 0
|
|
17
|
+
? project.environments[0]
|
|
18
|
+
: null);
|
|
19
|
+
const camera = (project.camera || {
|
|
20
|
+
position: [0, 5, 10],
|
|
21
|
+
orientation: [0, 0, 0],
|
|
22
|
+
fov: 50,
|
|
23
|
+
near: 0.1,
|
|
24
|
+
far: 1000,
|
|
25
|
+
controls: {
|
|
26
|
+
enabled: true,
|
|
27
|
+
enablePan: true,
|
|
28
|
+
enableRotate: true,
|
|
29
|
+
autoRotate: false,
|
|
30
|
+
autoRotateSpeed: 2,
|
|
31
|
+
target: [0, 0, 0],
|
|
32
|
+
zoomSpeed: 1,
|
|
33
|
+
panSpeed: 1,
|
|
34
|
+
rotateSpeed: 1,
|
|
35
|
+
minDistance: 1,
|
|
36
|
+
maxDistance: 1000,
|
|
37
|
+
minPolarAngle: -Infinity,
|
|
38
|
+
maxPolarAngle: Infinity,
|
|
39
|
+
minAzimuthAngle: -Infinity,
|
|
40
|
+
maxAzimuthAngle: Infinity,
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const animationSequences = project.animationSequences || [];
|
|
44
|
+
const sceneObjects = project.sceneObjects || sceneSettings.scene?.objectSettings || [];
|
|
45
|
+
const modelObjects = sceneObjects.filter((obj) => obj.type === "model");
|
|
46
|
+
const meshObjects = sceneObjects.filter((obj) => obj.type === "mesh");
|
|
47
|
+
const sceneCanvas = sceneSettings.canvas || sceneSettings.scene?.canvas || {};
|
|
48
|
+
const physicsSettings = sceneSettings.physicsSettings || sceneSettings.scene?.physicsSettings || {
|
|
49
|
+
enabled: true,
|
|
50
|
+
debug: false,
|
|
51
|
+
gravity: [0, -3, 0],
|
|
52
|
+
};
|
|
53
|
+
const generalObjectSettings = sceneSettings.generalObjectSettings || sceneSettings.scene?.generalObjectSettings || {
|
|
54
|
+
meshSettings: {
|
|
55
|
+
id: 'scene-general-settings',
|
|
56
|
+
name: "All Objects",
|
|
57
|
+
visible: true,
|
|
58
|
+
position: [0, 0, 0],
|
|
59
|
+
rotation: [0, 0, 0],
|
|
60
|
+
scale: [1, 1, 1],
|
|
61
|
+
anchor: null,
|
|
62
|
+
},
|
|
63
|
+
materialSettings: {
|
|
64
|
+
color: '#ffffff',
|
|
65
|
+
opacity: 1,
|
|
66
|
+
transparent: true,
|
|
67
|
+
materialType: "basic",
|
|
68
|
+
materialName: "Standard",
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
const timeSettings = sceneSettings.timeSettings || sceneSettings.scene?.timeSettings || {};
|
|
72
|
+
const lighting = project.lights && project.lights.length > 0 ? project.lights : [{ ...LIGHTING_PRESETS.ambient.config, enabled: true, showHelpers: false }];
|
|
73
|
+
const controls = camera.controls;
|
|
74
|
+
const { shadows = false, antialias = true, dpr = window.devicePixelRatio, gl = {}, backgroundColor = "#000000" } = sceneCanvas;
|
|
75
|
+
const { position, orientation, fov, near, far } = camera;
|
|
76
|
+
const containerStyle = {
|
|
77
|
+
width,
|
|
78
|
+
height,
|
|
79
|
+
position: "relative",
|
|
80
|
+
overflow: "hidden",
|
|
81
|
+
...style,
|
|
82
|
+
};
|
|
83
|
+
// useEffect(() => {
|
|
84
|
+
// const initializeSceneAssets = async () => {
|
|
85
|
+
// if (modelObjects.length > 0) {
|
|
86
|
+
// const modelData: ModelData[] = modelObjects.map((obj) => {
|
|
87
|
+
// return {
|
|
88
|
+
// id: obj.id,
|
|
89
|
+
// ...obj.userData,
|
|
90
|
+
// };
|
|
91
|
+
// }) as ModelData[];
|
|
92
|
+
// await loadAssets(modelData);
|
|
93
|
+
// }
|
|
94
|
+
// const meshes = meshObjects.map((obj) => {
|
|
95
|
+
// return {
|
|
96
|
+
// id: obj.id,
|
|
97
|
+
// ...obj.userData,
|
|
98
|
+
// };
|
|
99
|
+
// });
|
|
100
|
+
// meshController.createMeshes(meshes);
|
|
101
|
+
// };
|
|
102
|
+
// initializeSceneAssets();
|
|
103
|
+
// }, [meshController, modelObjects, meshObjects]);
|
|
104
|
+
const handleElementClick = (element) => {
|
|
105
|
+
console.log("Element clicked in scene:", element);
|
|
106
|
+
if (element && onUiElementClick) {
|
|
107
|
+
onUiElementClick(element);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return (_jsx("div", { className: className, style: containerStyle, children: _jsx(Canvas, { style: {
|
|
111
|
+
backgroundColor: backgroundColor,
|
|
112
|
+
}, shadows: shadows, dpr: dpr, gl: {
|
|
113
|
+
antialias,
|
|
114
|
+
alpha: true,
|
|
115
|
+
powerPreference: "high-performance",
|
|
116
|
+
...gl,
|
|
117
|
+
}, camera: {
|
|
118
|
+
fov,
|
|
119
|
+
near,
|
|
120
|
+
far,
|
|
121
|
+
position: [position[0], position[1], position[2]],
|
|
122
|
+
rotation: [orientation[0], orientation[1], orientation[2]],
|
|
123
|
+
}, onCreated: (state) => {
|
|
124
|
+
state.gl.toneMapping = NoToneMapping;
|
|
125
|
+
setIsThreeJsMounted(true);
|
|
126
|
+
SceneStore.scene = state.scene;
|
|
127
|
+
SceneStore.gl = state.gl;
|
|
128
|
+
if (onSceneInitialized) {
|
|
129
|
+
onSceneInitialized();
|
|
130
|
+
}
|
|
131
|
+
}, children: _jsxs(Physics, { gravity: physicsSettings.gravity, paused: !physicsSettings.enabled, debug: physicsSettings.debug, children: [_jsx(LightsManager, { config: lighting[0] }), environment && _jsx(EnvironmentManager, { environment: environment, timeSettings: timeSettings }), _jsx(CameraController, { settings: camera }), _jsx(ObjectsRenderer, { cameraSettings: camera, generalObjectSettings: generalObjectSettings, createdObjects: sceneObjects, onObjectsReady: undefined, sequences: animationSequences, handleObjectClick: onObjectClick ? (object, ref, event) => onObjectClick(object, ref, event) : undefined }), _jsx(CursorController, { effects: project.cursor?.effects, clickActions: project.cursor?.clickActions })] }) }) }));
|
|
132
|
+
};
|
|
133
|
+
export default SceneBuilder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneFog.d.ts","sourceRoot":"","sources":["../../src/components/SceneFog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,WAAW,CAAC;CACpB;AAGD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAcrC,CAAC;AACF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { useThree } from '@react-three/fiber';
|
|
4
|
+
const SceneFog = ({ fog }) => {
|
|
5
|
+
const { scene } = useThree();
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (fog.visible) {
|
|
8
|
+
scene.fog = new THREE.Fog(fog.color, fog.near, fog.far);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
scene.fog = null;
|
|
12
|
+
}
|
|
13
|
+
return () => {
|
|
14
|
+
scene.fog = null;
|
|
15
|
+
};
|
|
16
|
+
}, [scene, fog.visible, fog.color, fog.near, fog.far]);
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
export default SceneFog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shape.d.ts","sourceRoot":"","sources":["../../src/components/Shape.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,KAAK,UAAU,GAAG,EAAE,CAAC;AAGrB,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAInC,CAAC;AACF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { GeometryShape } from "./GeometryShape.js";
|
|
4
|
+
const SuperMesh = ({}) => {
|
|
5
|
+
return (_jsx(GeometryShape
|
|
6
|
+
// ref={meshRef}
|
|
7
|
+
, {
|
|
8
|
+
// ref={meshRef}
|
|
9
|
+
shape: createdObject.config?.type || 'box', mode: createdObject.config?.mode || 'solid' }));
|
|
10
|
+
};
|
|
11
|
+
export default SuperMesh;
|