@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,71 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { Box3, Sphere } from 'three';
|
|
4
|
+
import MoleculesEffect from './effects/MoleculesEffect.js';
|
|
5
|
+
import ShockwaveEffect from './effects/ShockwaveEffect.js';
|
|
6
|
+
import AuraEffect from './effects/AuraEffect.js';
|
|
7
|
+
import DataStreamEffect from './effects/DataStreamEffect.js';
|
|
8
|
+
import ConstellationEffect from './effects/ConstellationEffect.js';
|
|
9
|
+
import HologramEffect from './effects/HologramEffect.js';
|
|
10
|
+
import PortalEffect from './effects/PortalEffect.js';
|
|
11
|
+
import DnaHelixEffect from './effects/DnaHelixEffect.js';
|
|
12
|
+
import OrbEffect from './effects/OrbEffect.js';
|
|
13
|
+
import LightningEffect from './effects/LightningEffect.js';
|
|
14
|
+
import AuroraEffect from './effects/AuroraEffect.js';
|
|
15
|
+
import ForcefieldEffect from './effects/ForcefieldEffect.js';
|
|
16
|
+
import NeuralNetworkEffect from './effects/NeuralNetworkEffect.js';
|
|
17
|
+
import BlackHoleEffect from './effects/BlackHoleEffect.js';
|
|
18
|
+
import IceCrystalsEffect from './effects/IceCrystalsEffect.js';
|
|
19
|
+
import SmokePlumeEffect from './effects/SmokePlumeEffect.js';
|
|
20
|
+
import VolumetricFogEffect from './effects/VolumetricFogEffect.js';
|
|
21
|
+
import SmokeRingEffect from './effects/SmokeRingEffect.js';
|
|
22
|
+
import Flares from './Flares.js';
|
|
23
|
+
import SparklesBurst from './SparklesBurst.js';
|
|
24
|
+
import Bubbles from './Bubbles.js';
|
|
25
|
+
import Glyphs from './Glyphs.js';
|
|
26
|
+
import Fire from './effects/Fire.js';
|
|
27
|
+
import SmokeRibbon from './effects/SmokeRibbon.js';
|
|
28
|
+
const EffectsGenerator = ({ settings, object }) => {
|
|
29
|
+
console.log('EffectsGenerator render with settings:', settings, 'and object:', object);
|
|
30
|
+
const { config } = settings;
|
|
31
|
+
if (!config.enabled)
|
|
32
|
+
return null;
|
|
33
|
+
// console.log('Effect config:', config);
|
|
34
|
+
const boundingRadius = useMemo(() => {
|
|
35
|
+
if (!object)
|
|
36
|
+
return 1;
|
|
37
|
+
const box = new Box3().setFromObject(object);
|
|
38
|
+
const sphere = new Sphere();
|
|
39
|
+
box.getBoundingSphere(sphere);
|
|
40
|
+
return sphere.radius || 1;
|
|
41
|
+
}, [object]);
|
|
42
|
+
const animations = settings.animations;
|
|
43
|
+
switch (config.type) {
|
|
44
|
+
case 'molecules': return _jsx(MoleculesEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
45
|
+
case 'shockwave': return _jsx(ShockwaveEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
46
|
+
case 'aura': return _jsx(AuraEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
47
|
+
case 'dataStream': return _jsx(DataStreamEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
48
|
+
case 'constellation': return _jsx(ConstellationEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
49
|
+
case 'hologram': return _jsx(HologramEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
50
|
+
case 'portal': return _jsx(PortalEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
51
|
+
case 'dnaHelix': return _jsx(DnaHelixEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
52
|
+
case 'orb': return _jsx(OrbEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
53
|
+
case 'lightning': return _jsx(LightningEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
54
|
+
case 'aurora': return _jsx(AuroraEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
55
|
+
case 'forcefield': return _jsx(ForcefieldEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
56
|
+
case 'neuralNetwork': return _jsx(NeuralNetworkEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
57
|
+
case 'blackHole': return _jsx(BlackHoleEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
58
|
+
case 'iceCrystals': return _jsx(IceCrystalsEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
59
|
+
case 'smokePlume': return _jsx(SmokePlumeEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
60
|
+
case 'volumetricFog': return _jsx(VolumetricFogEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
61
|
+
case 'smokeRing': return _jsx(SmokeRingEffect, { boundingRadius: boundingRadius, config: config, animations: animations });
|
|
62
|
+
case 'fire': return _jsx(Fire, { hostRef: object, config: config, animations: animations });
|
|
63
|
+
case 'flares': return _jsx(Flares, { hostRef: object, config: config, animations: animations });
|
|
64
|
+
case 'sparklesBurst': return _jsx(SparklesBurst, { boundingRadius: boundingRadius, config: config });
|
|
65
|
+
case 'bubbles': return _jsx(Bubbles, { boundingRadius: boundingRadius, config: config });
|
|
66
|
+
case 'glyphs': return _jsx(Glyphs, { boundingRadius: boundingRadius, config: config });
|
|
67
|
+
case 'smokeRibbon': return _jsx(SmokeRibbon, { config: config, boundingRadius: boundingRadius });
|
|
68
|
+
default: return null;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
export default EffectsGenerator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CreatedObjectSettings } from '@3driseai/3drise-core';
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface EffectsGroupProps {
|
|
4
|
+
createdObject: CreatedObjectSettings;
|
|
5
|
+
}
|
|
6
|
+
declare const EffectsGroup: React.FC<EffectsGroupProps>;
|
|
7
|
+
export default EffectsGroup;
|
|
8
|
+
//# sourceMappingURL=EffectsGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EffectsGroup.d.ts","sourceRoot":"","sources":["../../src/components/EffectsGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,UAAU,iBAAiB;IACvB,aAAa,EAAE,qBAAqB,CAAC;CACxC;AAGD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAK7C,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { GEREATIVE_EFFECTS_KEY } from '@3driseai/3drise-core';
|
|
3
|
+
import EffectsGenerator from './EffectsGenerator.js';
|
|
4
|
+
import { findById } from '../utils/sceneQuery.js';
|
|
5
|
+
const EffectsGroup = ({ createdObject }) => {
|
|
6
|
+
if (!createdObject.effects || createdObject.effects.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
const object = findById(createdObject.id);
|
|
9
|
+
return (_jsx("group", { name: `${createdObject.id}-effects`, userData: { [GEREATIVE_EFFECTS_KEY]: true }, children: createdObject.effects.map((effect, index) => (_jsx(EffectsGenerator, { settings: effect, object: object }, index))) }));
|
|
10
|
+
};
|
|
11
|
+
export default EffectsGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SkySystemProps } from './SkySystem';
|
|
2
|
+
import type { EnvironmentConfig } from '@3driseai/3drise-core';
|
|
3
|
+
export interface EnvironmentManagerProps extends SkySystemProps {
|
|
4
|
+
environment?: EnvironmentConfig;
|
|
5
|
+
cubeCameraResolution?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const EnvironmentManager: any;
|
|
8
|
+
export default EnvironmentManager;
|
|
9
|
+
//# sourceMappingURL=EnvironmentManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentManager.d.ts","sourceRoot":"","sources":["../../src/components/EnvironmentManager.tsx"],"names":[],"mappings":"AAIA,OAAkB,EAAqB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAIhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC3D,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,QAAA,MAAM,kBAAkB,EA8DlB,GAAI,CAAC;AAEX,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, forwardRef } from 'react';
|
|
3
|
+
import { Environment } from '@react-three/drei';
|
|
4
|
+
import { useThree } from '@react-three/fiber';
|
|
5
|
+
import { Vector3 } from 'three';
|
|
6
|
+
import SkySystem from './SkySystem.js';
|
|
7
|
+
import { useCubeCamera } from '../hooks/useCubeCamera.js';
|
|
8
|
+
import HdrPlaylistRenderer from './HdrPlaylistRenderer.js';
|
|
9
|
+
import { getTransitionSettings } from '@3driseai/3drise-core';
|
|
10
|
+
const EnvironmentManager = forwardRef(({ environment, cubeCameraResolution = 512, timeSettings, onTimeOfDayChange, onTimeUpdate, }, ref) => {
|
|
11
|
+
const { scene } = useThree();
|
|
12
|
+
const defaultHdr = {
|
|
13
|
+
visible: false,
|
|
14
|
+
name: null,
|
|
15
|
+
settings: {
|
|
16
|
+
groundRadius: 200,
|
|
17
|
+
groundHeight: 10,
|
|
18
|
+
groundScale: 100,
|
|
19
|
+
blur: 0,
|
|
20
|
+
backgroundBlurriness: 0,
|
|
21
|
+
backgroundIntensity: 1,
|
|
22
|
+
backgroundRotation: 0,
|
|
23
|
+
environmentIntensity: 1,
|
|
24
|
+
environmentRotation: 0,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const hdr = environment?.hdr ?? defaultHdr;
|
|
28
|
+
const backgroundName = hdr.visible ? hdr.name : null;
|
|
29
|
+
const urls = hdr.urls;
|
|
30
|
+
const playlistActive = !!urls && urls.length > 1;
|
|
31
|
+
const singleUrl = urls && urls.length === 1 ? urls[0] : undefined;
|
|
32
|
+
const hdrActive = !!(backgroundName || singleUrl || playlistActive);
|
|
33
|
+
const sky = environment?.sky;
|
|
34
|
+
const sunSystemVisible = sky?.sunSystem?.visible;
|
|
35
|
+
const sunSize = sky?.sunSystem?.sunSize;
|
|
36
|
+
const moonSize = sky?.sunSystem?.moonSize;
|
|
37
|
+
const skyboxScale = 100000;
|
|
38
|
+
const sunIntensity = sky?.sunSystem?.intensity;
|
|
39
|
+
const castShadow = sky?.sunSystem?.castShadow;
|
|
40
|
+
const shadowMapSize = sky?.sunSystem?.shadowMapSize;
|
|
41
|
+
const playerPosition = new Vector3(0, 0, 0);
|
|
42
|
+
const starsSettings = environment?.stars;
|
|
43
|
+
const cloudsSettings = environment?.clouds;
|
|
44
|
+
const cloudsMaterialSettings = environment?.clouds?.materialSettings;
|
|
45
|
+
const skyControllerSettings = sky && !sky.sunSystem.visible ? sky : undefined;
|
|
46
|
+
const rainSettings = environment?.rain;
|
|
47
|
+
const fogSettings = environment?.fog;
|
|
48
|
+
useCubeCamera({
|
|
49
|
+
hdrSettings: hdr,
|
|
50
|
+
skyVisible: true,
|
|
51
|
+
sunSystemVisible: sunSystemVisible ?? false,
|
|
52
|
+
timeSettings,
|
|
53
|
+
resolution: cubeCameraResolution,
|
|
54
|
+
});
|
|
55
|
+
// While the playlist is active, drei <Environment> unmounts; HdrPlaylistRenderer
|
|
56
|
+
// owns scene.environment + scene.background for the duration of the transitions.
|
|
57
|
+
const environmentComponent = useMemo(() => {
|
|
58
|
+
if (playlistActive)
|
|
59
|
+
return null;
|
|
60
|
+
if (!singleUrl && !backgroundName)
|
|
61
|
+
return null;
|
|
62
|
+
const sourceProps = singleUrl
|
|
63
|
+
? { files: singleUrl }
|
|
64
|
+
: { preset: backgroundName };
|
|
65
|
+
return (_jsx(Environment, { ...sourceProps, background: true, scene: scene, backgroundBlurriness: hdr.settings.backgroundBlurriness ?? 0, backgroundIntensity: hdr.settings.backgroundIntensity ?? 1, backgroundRotation: [0, hdr.settings.backgroundRotation ?? Math.PI / 2, 0], environmentIntensity: hdr.settings.environmentIntensity ?? 1, environmentRotation: [0, hdr.settings.environmentRotation ?? Math.PI / 2, 0], blur: hdr.settings.blur ?? 0, ground: {
|
|
66
|
+
radius: hdr.settings.groundRadius,
|
|
67
|
+
height: hdr.settings.groundHeight,
|
|
68
|
+
scale: hdr.settings.groundScale,
|
|
69
|
+
} }));
|
|
70
|
+
}, [playlistActive, singleUrl, backgroundName, hdr.settings, scene]);
|
|
71
|
+
return (_jsxs(_Fragment, { children: [environmentComponent, playlistActive && urls && (_jsx(HdrPlaylistRenderer, { urls: urls, transition: getTransitionSettings(hdr) })), _jsx(SkySystem, { ref: ref, timeSettings: timeSettings, visible: true, sunSystemVisible: sunSystemVisible, sunSize: sunSize, moonSize: moonSize, skyboxScale: skyboxScale, sunIntensity: sunIntensity, castShadow: castShadow, shadowMapSize: shadowMapSize, playerPosition: playerPosition, starsSettings: starsSettings, cloudsSettings: cloudsSettings, cloudsMaterialSettings: cloudsMaterialSettings, skyControllerSettings: skyControllerSettings, rainSettings: rainSettings, fogSettings: fogSettings, onTimeOfDayChange: onTimeOfDayChange, onTimeUpdate: onTimeUpdate })] }));
|
|
72
|
+
});
|
|
73
|
+
EnvironmentManager.displayName = 'EnvironmentManager';
|
|
74
|
+
export default EnvironmentManager;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CreatedObjectSettings } from "@3driseai/3drise-core";
|
|
3
|
+
type EnvironmentObjectProps = {
|
|
4
|
+
createdObject: CreatedObjectSettings;
|
|
5
|
+
};
|
|
6
|
+
declare const EnvironmentObject: React.FC<EnvironmentObjectProps>;
|
|
7
|
+
export default EnvironmentObject;
|
|
8
|
+
//# sourceMappingURL=EnvironmentObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentObject.d.ts","sourceRoot":"","sources":["../../src/components/EnvironmentObject.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,KAAK,sBAAsB,GAAG;IAC1B,aAAa,EAAE,qBAAqB,CAAC;CACxC,CAAC;AAGF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAUvD,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Rain from './Rain.js';
|
|
3
|
+
const EnvironmentObject = ({ createdObject }) => {
|
|
4
|
+
const config = createdObject.config;
|
|
5
|
+
if (!config || config.enabled === false)
|
|
6
|
+
return null;
|
|
7
|
+
switch (config.type) {
|
|
8
|
+
case 'rain':
|
|
9
|
+
return _jsx(Rain, { settings: createdObject });
|
|
10
|
+
default:
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export default EnvironmentObject;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Vector3, Object3D } from "three";
|
|
2
|
+
import { AnimationOptions, FlaresConfig } from "@3driseai/3drise-core";
|
|
3
|
+
declare global {
|
|
4
|
+
namespace JSX {
|
|
5
|
+
interface IntrinsicElements {
|
|
6
|
+
flareMaterial: any;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type FlaresProps = {
|
|
11
|
+
/**
|
|
12
|
+
* true -> silhouette mode: bursts root on the enclosing object's actual
|
|
13
|
+
* screen silhouette (mask render pass).
|
|
14
|
+
* false -> plane mode: circular limb billboard (default).
|
|
15
|
+
*/
|
|
16
|
+
hostRef?: Object3D | null;
|
|
17
|
+
/** Root the bursts at the center (shooting from source) instead of the limb. */
|
|
18
|
+
config: FlaresConfig;
|
|
19
|
+
/** Uniform overrides for FlareMaterial (u_frequency, u_reach, ...). */
|
|
20
|
+
uniforms?: Record<string, number | Vector3 | number[]>;
|
|
21
|
+
animations?: AnimationOptions[];
|
|
22
|
+
};
|
|
23
|
+
export default function Flares({ hostRef, config, uniforms, animations }: FlaresProps): import("react").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=Flares.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flares.d.ts","sourceRoot":"","sources":["../../src/components/Flares.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwE,OAAO,EAA8B,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5I,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,aAAa,EAAE,GAAG,CAAC;SACtB;KACJ;CACJ;AAED,MAAM,MAAM,WAAW,GAAG;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,gFAAgF;IAChF,MAAM,EAAE,YAAY,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC,CAAC;AAUF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,WAAW,+BA0HpF"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
3
|
+
import { useFrame, useThree } from "@react-three/fiber";
|
|
4
|
+
import { WebGLRenderTarget, MeshBasicMaterial, AdditiveBlending, Box3, Sphere, Vector3, Vector2, Quaternion, Color, Object3D } from "three";
|
|
5
|
+
const tmpBox = new Box3();
|
|
6
|
+
const tmpSphere = new Sphere();
|
|
7
|
+
const tmpVec = new Vector3();
|
|
8
|
+
const tmpVec2 = new Vector2();
|
|
9
|
+
const tmpQuat = new Quaternion();
|
|
10
|
+
const tmpRight = new Vector3();
|
|
11
|
+
const tmpColor = new Color();
|
|
12
|
+
export default function Flares({ hostRef, config, uniforms, animations }) {
|
|
13
|
+
const { gl, scene } = useThree();
|
|
14
|
+
const anchorRef = useRef(null);
|
|
15
|
+
const meshRef = useRef(null);
|
|
16
|
+
const matRef = useRef(null);
|
|
17
|
+
const { radius, padding = 1.2, fitKey, shooting, maskResolution = 512, maskLayer = 31 } = config;
|
|
18
|
+
const maskTarget = useMemo(() => hostRef
|
|
19
|
+
? new WebGLRenderTarget(maskResolution, maskResolution, {
|
|
20
|
+
depthBuffer: true,
|
|
21
|
+
stencilBuffer: false,
|
|
22
|
+
samples: 4 // MSAA mask (WebGL2) -> smooth silhouette edges
|
|
23
|
+
})
|
|
24
|
+
: null, [hostRef, maskResolution]);
|
|
25
|
+
const maskMaterial = useMemo(() => new MeshBasicMaterial({ color: 0xffffff }), []);
|
|
26
|
+
useEffect(() => () => maskTarget?.dispose(), [maskTarget]);
|
|
27
|
+
// Fit the billboard to the host object + tag the host for the mask pass.
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const anchor = anchorRef.current;
|
|
30
|
+
const mesh = meshRef.current;
|
|
31
|
+
if (!anchor || !mesh)
|
|
32
|
+
return;
|
|
33
|
+
const host = hostRef && hostRef instanceof Object3D ? hostRef : anchor;
|
|
34
|
+
// Silhouette mode: tag every host node (except us) with the mask layer.
|
|
35
|
+
if (hostRef && host) {
|
|
36
|
+
host.traverse((o) => o.layers.enable(maskLayer));
|
|
37
|
+
anchor.traverse((o) => o.layers.disable(maskLayer));
|
|
38
|
+
}
|
|
39
|
+
if (radius !== undefined) {
|
|
40
|
+
anchor.position.set(0, 0, 0);
|
|
41
|
+
mesh.scale.setScalar(radius * padding);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (!host)
|
|
45
|
+
return;
|
|
46
|
+
// Bounding box of every sibling except ourselves (world space).
|
|
47
|
+
tmpBox.makeEmpty();
|
|
48
|
+
let hasGeometry = false;
|
|
49
|
+
for (const child of host.children) {
|
|
50
|
+
if (child === anchor)
|
|
51
|
+
continue;
|
|
52
|
+
const childBox = new Box3().setFromObject(child);
|
|
53
|
+
if (!childBox.isEmpty()) {
|
|
54
|
+
tmpBox.union(childBox);
|
|
55
|
+
hasGeometry = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Host itself may be a mesh (Flares nested directly inside it).
|
|
59
|
+
if (host.geometry) {
|
|
60
|
+
const g = host.geometry;
|
|
61
|
+
if (!g.boundingBox)
|
|
62
|
+
g.computeBoundingBox();
|
|
63
|
+
if (g.boundingBox) {
|
|
64
|
+
tmpBox.union(g.boundingBox.clone().applyMatrix4(host.matrixWorld));
|
|
65
|
+
hasGeometry = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!hasGeometry)
|
|
69
|
+
return;
|
|
70
|
+
tmpBox.getBoundingSphere(tmpSphere);
|
|
71
|
+
host.updateWorldMatrix(true, false);
|
|
72
|
+
const localCenter = host.worldToLocal(tmpSphere.center.clone());
|
|
73
|
+
host.getWorldScale(tmpVec);
|
|
74
|
+
const worldScale = Math.max(tmpVec.x, tmpVec.y, tmpVec.z) || 1;
|
|
75
|
+
anchor.position.copy(localCenter);
|
|
76
|
+
mesh.scale.setScalar((tmpSphere.radius / worldScale) * padding);
|
|
77
|
+
}, [radius, padding, fitKey, hostRef, maskLayer]);
|
|
78
|
+
useFrame(({ camera: cam }, delta) => {
|
|
79
|
+
const mat = matRef.current;
|
|
80
|
+
const mesh = meshRef.current;
|
|
81
|
+
if (mat)
|
|
82
|
+
mat.u_time += delta;
|
|
83
|
+
// World-space billboard: compensate for inherited rotation.
|
|
84
|
+
if (mesh && hostRef) {
|
|
85
|
+
hostRef.getWorldQuaternion(tmpQuat).invert();
|
|
86
|
+
mesh.quaternion.copy(tmpQuat).multiply(cam.quaternion);
|
|
87
|
+
}
|
|
88
|
+
// --- Silhouette mask pass: render only the host, white on black. ---
|
|
89
|
+
if (hostRef && maskTarget && mat && mesh) {
|
|
90
|
+
const prevOverride = scene.overrideMaterial;
|
|
91
|
+
const prevBackground = scene.background;
|
|
92
|
+
const prevTarget = gl.getRenderTarget();
|
|
93
|
+
const prevLayers = cam.layers.mask;
|
|
94
|
+
gl.getClearColor(tmpColor);
|
|
95
|
+
const prevClearAlpha = gl.getClearAlpha();
|
|
96
|
+
scene.overrideMaterial = maskMaterial;
|
|
97
|
+
scene.background = null;
|
|
98
|
+
cam.layers.set(maskLayer);
|
|
99
|
+
gl.setRenderTarget(maskTarget);
|
|
100
|
+
gl.setClearColor(0x000000, 1);
|
|
101
|
+
gl.clear();
|
|
102
|
+
gl.render(scene, cam);
|
|
103
|
+
gl.setRenderTarget(prevTarget);
|
|
104
|
+
gl.setClearColor(tmpColor, prevClearAlpha);
|
|
105
|
+
scene.overrideMaterial = prevOverride;
|
|
106
|
+
scene.background = prevBackground;
|
|
107
|
+
cam.layers.mask = prevLayers;
|
|
108
|
+
// Feed the shader: mask, buffer size, host center in screen UV.
|
|
109
|
+
mat.u_mask = maskTarget.texture;
|
|
110
|
+
gl.getDrawingBufferSize(tmpVec2);
|
|
111
|
+
mat.u_resolution.set(tmpVec2.x, tmpVec2.y);
|
|
112
|
+
const anchor = anchorRef.current;
|
|
113
|
+
anchor.getWorldPosition(tmpVec).project(cam);
|
|
114
|
+
const cx = tmpVec.x * 0.5 + 0.5;
|
|
115
|
+
const cy = tmpVec.y * 0.5 + 0.5;
|
|
116
|
+
mat.u_center.set(cx, cy);
|
|
117
|
+
// Bounding-silhouette radius in aspect-corrected screen UV: project a
|
|
118
|
+
// point one limb-unit to the camera's right of the center.
|
|
119
|
+
mesh.getWorldScale(tmpVec);
|
|
120
|
+
const worldLimb = Math.max(tmpVec.x, tmpVec.y, tmpVec.z);
|
|
121
|
+
tmpRight.setFromMatrixColumn(cam.matrixWorld, 0).multiplyScalar(worldLimb);
|
|
122
|
+
anchor.getWorldPosition(tmpVec).add(tmpRight).project(cam);
|
|
123
|
+
const aspect = tmpVec2.x / tmpVec2.y;
|
|
124
|
+
const dx = (tmpVec.x * 0.5 + 0.5 - cx) * aspect;
|
|
125
|
+
const dy = tmpVec.y * 0.5 + 0.5 - cy;
|
|
126
|
+
mat.u_limbScreen = Math.max(Math.hypot(dx, dy), 1e-4);
|
|
127
|
+
mat.u_maskEnabled = 1;
|
|
128
|
+
}
|
|
129
|
+
else if (mat) {
|
|
130
|
+
mat.u_maskEnabled = 0;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return (_jsx("group", { ref: anchorRef, children: _jsxs("mesh", { ref: meshRef, renderOrder: 2, children: [_jsx("planeGeometry", { args: [4.4, 4.4] }), _jsx("flareMaterial", { ref: matRef, transparent: true, depthWrite: false, depthTest: !hostRef && !shooting, blending: AdditiveBlending, u_shootEnabled: shooting ? 1 : 0, ...uniforms })] }) }));
|
|
134
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Object3D } from 'three';
|
|
2
|
+
import type { CreatedObjectSettings, HoverSettings, GalleryLayoutSettings, TransformEffect, ColorEffect, MaterialSettings } from '@3driseai/3drise-core';
|
|
3
|
+
import type { FrameShapeType } from './FrameGeometry';
|
|
4
|
+
import { type ThreeEvent } from "@react-three/fiber";
|
|
5
|
+
export type { FrameShapeType };
|
|
6
|
+
export interface FrameProps {
|
|
7
|
+
url: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
createdObject: CreatedObjectSettings;
|
|
10
|
+
position?: [number, number, number];
|
|
11
|
+
rotation?: [number, number, number];
|
|
12
|
+
shapeType?: FrameShapeType;
|
|
13
|
+
hoverSettings: HoverSettings;
|
|
14
|
+
transformEffects?: TransformEffect[];
|
|
15
|
+
colorEffects?: ColorEffect[];
|
|
16
|
+
layoutSettings: GalleryLayoutSettings;
|
|
17
|
+
side: number;
|
|
18
|
+
materialSettings: MaterialSettings;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
handleObjectClick?: (createdObject: CreatedObjectSettings, ref: Object3D, event: ThreeEvent<MouseEvent>) => void;
|
|
21
|
+
}
|
|
22
|
+
export default function Frame({ url, isActive, createdObject, position, rotation, shapeType, hoverSettings, transformEffects, colorEffects, layoutSettings, side, materialSettings, children, handleObjectClick, }: FrameProps): import("react").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=Frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../src/components/Frame.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,qBAAqB,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzJ,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,cAAc,EAAE,qBAAqB,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACpH;AAGD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAoB,EAAE,aAAa,EAAE,gBAAqB,EAAE,YAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,GAAG,EAAE,UAAU,+BA2ClP"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState, useEffect } from "react";
|
|
3
|
+
import { useCursor } from "@react-three/drei";
|
|
4
|
+
import { BackSide, DoubleSide, FrontSide, Mesh } from "three";
|
|
5
|
+
import { texturesManager } from "@3driseai/3drise-core";
|
|
6
|
+
import { FrameGeometry } from "./FrameGeometry.js";
|
|
7
|
+
import { FrameImage } from "./FrameImage.js";
|
|
8
|
+
import MaterialLibrary from "./MaterialLibrary.js";
|
|
9
|
+
import { useFrameEffects } from "../hooks/useFrameEffects.js";
|
|
10
|
+
import { useObjectAnimation } from "../hooks/useObjectAnimation.js";
|
|
11
|
+
export default function Frame({ url, isActive, createdObject, position, rotation, shapeType = 'circle', hoverSettings, transformEffects = [], colorEffects = [], layoutSettings, side, materialSettings, children, handleObjectClick, }) {
|
|
12
|
+
const frameRef = useRef(new Mesh());
|
|
13
|
+
const imageRef = useRef(null);
|
|
14
|
+
const [texture, setTexture] = useState(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
let mounted = true;
|
|
17
|
+
const existing = texturesManager.getTextureByUrl(url);
|
|
18
|
+
if (existing) {
|
|
19
|
+
setTexture(existing);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const name = url.split('/').pop()?.split('.')[0] || `texture-${Date.now()}`;
|
|
23
|
+
texturesManager.loadTexture(name, url, 'images')
|
|
24
|
+
.then((loaded) => { if (mounted)
|
|
25
|
+
setTexture(loaded); })
|
|
26
|
+
.catch((err) => console.error('Failed to load texture:', err));
|
|
27
|
+
}
|
|
28
|
+
return () => { mounted = false; };
|
|
29
|
+
}, [url]);
|
|
30
|
+
const { handlePointerEnter, handlePointerLeave, hovered } = useFrameEffects(isActive);
|
|
31
|
+
useCursor(hovered);
|
|
32
|
+
const enabledEffects = transformEffects.filter(e => e.enabled !== false);
|
|
33
|
+
const animateMaterial = enabledEffects.length > 0 || colorEffects.some(e => e.enabled !== false);
|
|
34
|
+
useObjectAnimation(createdObject, animateMaterial, { enabled: true, hovered }, frameRef.current);
|
|
35
|
+
const scale = [
|
|
36
|
+
0.9 * (layoutSettings.width || 1),
|
|
37
|
+
0.9 * (layoutSettings.height || 1),
|
|
38
|
+
0.9,
|
|
39
|
+
];
|
|
40
|
+
const showFront = side === FrontSide || side === DoubleSide;
|
|
41
|
+
const showBack = side === BackSide || side === DoubleSide;
|
|
42
|
+
const onClick = (e) => {
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
if (!frameRef.current)
|
|
45
|
+
return;
|
|
46
|
+
// const clickedPoint = e.point;
|
|
47
|
+
handleObjectClick?.(createdObject, frameRef.current, e);
|
|
48
|
+
};
|
|
49
|
+
if (!texture)
|
|
50
|
+
return null;
|
|
51
|
+
// console.log('Rendering Frame - url:', url);
|
|
52
|
+
return (_jsx("mesh", { name: url, ref: frameRef, position: position, rotation: rotation, scale: scale, raycast: () => null, onPointerEnter: handlePointerEnter, onPointerLeave: handlePointerLeave, onClick: onClick, userData: {
|
|
53
|
+
url,
|
|
54
|
+
}, children: children ? children : (_jsxs(_Fragment, { children: [_jsx(FrameGeometry, { shapeType: 'rectangle', layoutSettings: layoutSettings, scale: layoutSettings.outerFrameScale }), _jsx(MaterialLibrary, { materialSettings: materialSettings }), showFront && (_jsx(FrameImage, { ref: imageRef, texture: texture, shapeType: 'rectangle', position: [0, 0, 0.02] })), showBack && (_jsx(FrameImage, { texture: texture, shapeType: 'rectangle', position: [0, 0, -0.02], rotation: [0, Math.PI, 0], isBack: true }))] })) }));
|
|
55
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GalleryLayoutSettings } from "@3driseai/3drise-core";
|
|
2
|
+
export type FrameShapeType = 'rectangle' | 'ellipse' | 'circle' | 'roundedRectangle';
|
|
3
|
+
interface FrameGeometryProps {
|
|
4
|
+
shapeType: FrameShapeType;
|
|
5
|
+
scale?: number;
|
|
6
|
+
layoutSettings?: GalleryLayoutSettings;
|
|
7
|
+
}
|
|
8
|
+
export declare function FrameGeometry({ shapeType, scale, layoutSettings }: FrameGeometryProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=FrameGeometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameGeometry.d.ts","sourceRoot":"","sources":["../../src/components/FrameGeometry.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AAErF,UAAU,kBAAkB;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,qBAAqB,CAAC;CAC1C;AAGD,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,KAAS,EAAE,cAAc,EAAE,EAAE,kBAAkB,+BAezF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function FrameGeometry({ shapeType, scale = 1, layoutSettings }) {
|
|
3
|
+
const width = (layoutSettings?.width || 1) * scale;
|
|
4
|
+
const height = (layoutSettings?.height || 1) * scale;
|
|
5
|
+
const depth = 0.05;
|
|
6
|
+
switch (shapeType) {
|
|
7
|
+
case 'ellipse':
|
|
8
|
+
return _jsx("circleGeometry", { args: [scale * 0.5, 32] });
|
|
9
|
+
case 'circle':
|
|
10
|
+
return _jsx("cylinderGeometry", { args: [scale * 0.5, depth, scale * 0.5, 32] });
|
|
11
|
+
case 'roundedRectangle':
|
|
12
|
+
return _jsx("cylinderGeometry", { args: [scale * 0.1, scale * 0.1, 1, 8] });
|
|
13
|
+
case 'rectangle':
|
|
14
|
+
default:
|
|
15
|
+
return _jsx("boxGeometry", { args: [width, height, depth] });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameImage.d.ts","sourceRoot":"","sources":["../../src/components/FrameImage.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,EAUjB,GAAI,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { FrameGeometry } from "./FrameGeometry.js";
|
|
4
|
+
export const FrameImage = forwardRef(({ texture, shapeType, position, rotation, isBack = false, layoutSettings, }, ref) => {
|
|
5
|
+
const width = layoutSettings?.width || 1;
|
|
6
|
+
const height = layoutSettings?.height || 1;
|
|
7
|
+
const imageScale = 0.9;
|
|
8
|
+
const scaledSettings = {
|
|
9
|
+
...layoutSettings,
|
|
10
|
+
width: width * imageScale,
|
|
11
|
+
height: height * imageScale,
|
|
12
|
+
};
|
|
13
|
+
return (_jsxs("mesh", { ref: ref, raycast: () => null, position: position, rotation: rotation, children: [_jsx(FrameGeometry, { shapeType: shapeType, layoutSettings: scaledSettings }), _jsx("meshBasicMaterial", { map: texture, toneMapped: false, transparent: true })] }));
|
|
14
|
+
});
|
|
15
|
+
FrameImage.displayName = 'FrameImage';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CreatedObjectSettings } from "@3driseai/3drise-core";
|
|
3
|
+
import { Object3D } from "three";
|
|
4
|
+
export interface GalaxyProps {
|
|
5
|
+
createdObject: CreatedObjectSettings;
|
|
6
|
+
onObjectReady?: (object: CreatedObjectSettings, ref: Object3D) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Galaxy: React.FC<GalaxyProps>;
|
|
9
|
+
export default Galaxy;
|
|
10
|
+
//# sourceMappingURL=Galaxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Galaxy.d.ts","sourceRoot":"","sources":["../../src/components/Galaxy.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,MAAM,WAAW,WAAW;IACxB,aAAa,EAAE,qBAAqB,CAAC;IACrC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC1E;AAGD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsBjC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Stars from './Stars.js';
|
|
3
|
+
import Earth from './Earth.js';
|
|
4
|
+
import SolarSystem from './SolarSystem.js';
|
|
5
|
+
import ShootingStars from './ShootingStars.js';
|
|
6
|
+
const Galaxy = ({ createdObject, onObjectReady }) => {
|
|
7
|
+
const config = createdObject.config;
|
|
8
|
+
console.log('Galaxy config:', config);
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
11
|
+
const starsSettings = config.stars;
|
|
12
|
+
const earthSettings = config.earth;
|
|
13
|
+
const solarSystemSettings = config.solarSystem;
|
|
14
|
+
const shootingStarsSettings = config.shootingStars;
|
|
15
|
+
// const timeSettings = config.time as TimeSettings | undefined;
|
|
16
|
+
switch (config.type) {
|
|
17
|
+
case 'stars':
|
|
18
|
+
return _jsx(Stars, { settings: createdObject, onObjectReady: onObjectReady });
|
|
19
|
+
case 'earth':
|
|
20
|
+
return _jsx(Earth, { ...config, onMeshReady: (mesh) => onObjectReady && onObjectReady(createdObject, mesh) });
|
|
21
|
+
case 'solarSystem':
|
|
22
|
+
return _jsx(SolarSystem, { ...config, onObjectReady: group => onObjectReady && onObjectReady(createdObject, group) });
|
|
23
|
+
case 'shootingStars':
|
|
24
|
+
return _jsx(ShootingStars, { settings: config });
|
|
25
|
+
default:
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default Galaxy;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CreatedObjectSettings } from '@3driseai/3drise-core';
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Object3D } from "three";
|
|
4
|
+
import { type ThreeEvent } from "@react-three/fiber";
|
|
5
|
+
export interface GalleryLayoutProps {
|
|
6
|
+
createdObject: CreatedObjectSettings;
|
|
7
|
+
selectedFrameUrl?: string;
|
|
8
|
+
handleObjectClick?: (createdObject: CreatedObjectSettings, ref: Object3D, event: ThreeEvent<MouseEvent>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const GalleryLayout: React.FC<GalleryLayoutProps>;
|
|
11
|
+
export default GalleryLayout;
|
|
12
|
+
//# sourceMappingURL=GalleryLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryLayout.d.ts","sourceRoot":"","sources":["../../src/components/GalleryLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,MAAM,WAAW,kBAAkB;IAC/B,aAAa,EAAE,qBAAqB,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACpH;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAa/C,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useRef } from 'react';
|
|
3
|
+
import { updateCurrentLayoutSettings } from '@3driseai/3drise-core';
|
|
4
|
+
import Frame from './Frame.js';
|
|
5
|
+
import { ImageGeometry } from './ImageGeometry.js';
|
|
6
|
+
const GalleryLayout = ({ createdObject, selectedFrameUrl, handleObjectClick, }) => {
|
|
7
|
+
const groupRef = useRef(null);
|
|
8
|
+
console.log('GalleryLayout - createdObject:', createdObject);
|
|
9
|
+
const { config, materialSettings, animations } = createdObject;
|
|
10
|
+
const galleryLayout = config || {
|
|
11
|
+
frames: [],
|
|
12
|
+
geometryType: 'none',
|
|
13
|
+
outerFrameScale: 1,
|
|
14
|
+
};
|
|
15
|
+
const { frames, layoutSettings } = useMemo(() => updateCurrentLayoutSettings(galleryLayout), [galleryLayout]);
|
|
16
|
+
console.log('GalleryLayout - frames:', frames);
|
|
17
|
+
console.log('GalleryLayout - layoutSettings:', layoutSettings);
|
|
18
|
+
return (_jsx("group", { ref: groupRef, scale: [1, 1, 1], position: [0, 0, 0], rotation: [0, 0, 0], children: frames.map((frame, index) => (_jsx(Frame, { url: frame.url, isActive: selectedFrameUrl === frame.url, createdObject: createdObject, position: frame.position, rotation: frame.rotation, hoverSettings: { sensitivity: 0.5, applyToChildren: false }, transformEffects: animations?.transform?.effects || [], layoutSettings: layoutSettings, side: galleryLayout?.side || 2, materialSettings: materialSettings, handleObjectClick: handleObjectClick, children: layoutSettings.geometryType !== 'none' && (_jsx(ImageGeometry, { url: frame.url, geometryType: layoutSettings.geometryType, outerFrameScale: layoutSettings.outerFrameScale })) }, index))) }));
|
|
19
|
+
};
|
|
20
|
+
export default GalleryLayout;
|