@3driseai/3drise-viewer 0.1.2 → 0.1.4
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 +2 -1
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +11 -3
- package/dist/components/Bubbles.d.ts +2 -1
- package/dist/components/Bubbles.d.ts.map +1 -1
- package/dist/components/Bubbles.js +5 -2
- package/dist/components/CameraController.d.ts +9 -1
- package/dist/components/CameraController.d.ts.map +1 -1
- package/dist/components/CameraController.js +12 -1
- package/dist/components/Clouds.d.ts +2 -1
- package/dist/components/Clouds.d.ts.map +1 -1
- package/dist/components/Clouds.js +3 -4
- package/dist/components/CreatedObject.d.ts +2 -2
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +5 -10
- package/dist/components/CustomPrimitive.d.ts +2 -2
- package/dist/components/CustomPrimitive.d.ts.map +1 -1
- package/dist/components/CustomPrimitive.js +6 -2
- package/dist/components/Earth.d.ts +2 -4
- package/dist/components/Earth.d.ts.map +1 -1
- package/dist/components/Earth.js +6 -4
- package/dist/components/EffectsGenerator.d.ts +2 -1
- package/dist/components/EffectsGenerator.d.ts.map +1 -1
- package/dist/components/EffectsGenerator.js +26 -25
- package/dist/components/EffectsGroup.d.ts +2 -1
- package/dist/components/EffectsGroup.d.ts.map +1 -1
- package/dist/components/EffectsGroup.js +7 -2
- package/dist/components/EnvironmentManager.js +2 -2
- package/dist/components/EnvironmentObject.d.ts +2 -1
- package/dist/components/EnvironmentObject.d.ts.map +1 -1
- package/dist/components/EnvironmentObject.js +2 -2
- package/dist/components/Frame.d.ts +3 -2
- package/dist/components/Frame.d.ts.map +1 -1
- package/dist/components/Frame.js +3 -1
- package/dist/components/Galaxy.d.ts +2 -3
- package/dist/components/Galaxy.d.ts.map +1 -1
- package/dist/components/Galaxy.js +10 -10
- package/dist/components/GalleryLayout.d.ts +2 -1
- package/dist/components/GalleryLayout.d.ts.map +1 -1
- package/dist/components/GalleryLayout.js +3 -1
- package/dist/components/GeometryShape.d.ts +3 -2
- package/dist/components/GeometryShape.d.ts.map +1 -1
- package/dist/components/GeometryShape.js +17 -6
- package/dist/components/Glyphs.d.ts +2 -1
- package/dist/components/Glyphs.d.ts.map +1 -1
- package/dist/components/Glyphs.js +6 -2
- package/dist/components/GridHelper.d.ts +2 -1
- package/dist/components/GridHelper.d.ts.map +1 -1
- package/dist/components/GridHelper.js +3 -1
- package/dist/components/GridsGenerator.d.ts +2 -1
- package/dist/components/GridsGenerator.d.ts.map +1 -1
- package/dist/components/GridsGenerator.js +12 -4
- package/dist/components/HdrPlaylistRenderer.d.ts +2 -1
- package/dist/components/HdrPlaylistRenderer.d.ts.map +1 -1
- package/dist/components/HdrPlaylistRenderer.js +3 -1
- package/dist/components/Lensflare.d.ts +2 -1
- package/dist/components/Lensflare.d.ts.map +1 -1
- package/dist/components/Lensflare.js +3 -1
- package/dist/components/Letter.d.ts +3 -2
- package/dist/components/Letter.d.ts.map +1 -1
- package/dist/components/Letter.js +3 -1
- package/dist/components/Letters.d.ts +3 -2
- package/dist/components/Letters.d.ts.map +1 -1
- package/dist/components/Letters.js +3 -1
- package/dist/components/LightObject.d.ts +2 -1
- package/dist/components/LightObject.d.ts.map +1 -1
- package/dist/components/LightObject.js +11 -7
- package/dist/components/LightsManager.d.ts +2 -1
- package/dist/components/LightsManager.d.ts.map +1 -1
- package/dist/components/LightsManager.js +6 -3
- package/dist/components/Lines.d.ts +2 -1
- package/dist/components/Lines.d.ts.map +1 -1
- package/dist/components/Lines.js +2 -2
- package/dist/components/Moon.d.ts +2 -3
- package/dist/components/Moon.d.ts.map +1 -1
- package/dist/components/Moon.js +6 -4
- package/dist/components/MyGrid.d.ts +3 -2
- package/dist/components/MyGrid.d.ts.map +1 -1
- package/dist/components/MyGrid.js +5 -2
- package/dist/components/ObjectNode.d.ts +2 -2
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +30 -30
- package/dist/components/ObjectNodeApi.d.ts +2 -2
- package/dist/components/ObjectNodeApi.d.ts.map +1 -1
- package/dist/components/ObjectNodeApi.js +2 -2
- package/dist/components/ObjectsRenderer.d.ts +2 -1
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +15 -4
- package/dist/components/ObjectsRendererApi.d.ts +2 -1
- package/dist/components/ObjectsRendererApi.d.ts.map +1 -1
- package/dist/components/ObjectsRendererApi.js +2 -2
- package/dist/components/Ocean.d.ts +2 -1
- package/dist/components/Ocean.d.ts.map +1 -1
- package/dist/components/Ocean.js +3 -1
- package/dist/components/Outline.d.ts +3 -2
- package/dist/components/Outline.d.ts.map +1 -1
- package/dist/components/Outline.js +6 -2
- package/dist/components/ParticlesR3f.d.ts +2 -1
- package/dist/components/ParticlesR3f.d.ts.map +1 -1
- package/dist/components/ParticlesR3f.js +3 -1
- package/dist/components/Path.d.ts +2 -1
- package/dist/components/Path.d.ts.map +1 -1
- package/dist/components/Path.js +14 -3
- package/dist/components/PathGeometry.d.ts +2 -1
- package/dist/components/PathGeometry.d.ts.map +1 -1
- package/dist/components/PathGeometry.js +6 -2
- package/dist/components/PathRenderer.d.ts +2 -1
- package/dist/components/PathRenderer.d.ts.map +1 -1
- package/dist/components/PathRenderer.js +6 -2
- package/dist/components/Planet.d.ts +2 -3
- package/dist/components/Planet.d.ts.map +1 -1
- package/dist/components/Planet.js +6 -4
- package/dist/components/PointCloud.d.ts +2 -1
- package/dist/components/PointCloud.d.ts.map +1 -1
- package/dist/components/PointCloud.js +3 -1
- package/dist/components/ProjectLoader.d.ts +2 -1
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +6 -3
- package/dist/components/Rain.d.ts +2 -1
- package/dist/components/Rain.d.ts.map +1 -1
- package/dist/components/Rain.js +7 -1
- package/dist/components/SceneBuilder.d.ts +2 -1
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +2 -2
- package/dist/components/ShootingStar.d.ts +2 -1
- package/dist/components/ShootingStar.d.ts.map +1 -1
- package/dist/components/ShootingStar.js +5 -2
- package/dist/components/ShootingStars.d.ts +2 -1
- package/dist/components/ShootingStars.d.ts.map +1 -1
- package/dist/components/ShootingStars.js +2 -2
- package/dist/components/SkyController.d.ts +3 -2
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +9 -6
- package/dist/components/SkyMesh.d.ts +2 -3
- package/dist/components/SkyMesh.d.ts.map +1 -1
- package/dist/components/SkyMesh.js +3 -5
- package/dist/components/SkySystem.d.ts +2 -1
- package/dist/components/SkySystem.d.ts.map +1 -1
- package/dist/components/SkySystem.js +6 -2
- package/dist/components/Skybox.d.ts +2 -1
- package/dist/components/Skybox.d.ts.map +1 -1
- package/dist/components/Skybox.js +5 -2
- package/dist/components/SolarSystem.d.ts +2 -4
- package/dist/components/SolarSystem.d.ts.map +1 -1
- package/dist/components/SolarSystem.js +3 -1
- package/dist/components/SparklesBurst.d.ts +2 -1
- package/dist/components/SparklesBurst.d.ts.map +1 -1
- package/dist/components/SparklesBurst.js +5 -2
- package/dist/components/Stars.d.ts +2 -3
- package/dist/components/Stars.d.ts.map +1 -1
- package/dist/components/Stars.js +3 -2
- package/dist/components/Sun.d.ts +3 -2
- package/dist/components/Sun.d.ts.map +1 -1
- package/dist/components/Sun.js +7 -3
- package/dist/components/SunCore.d.ts +3 -2
- package/dist/components/SunCore.d.ts.map +1 -1
- package/dist/components/SunCore.js +3 -1
- package/dist/components/SunLight.d.ts +2 -1
- package/dist/components/SunLight.d.ts.map +1 -1
- package/dist/components/SunLight.js +3 -1
- package/dist/components/Text2D.d.ts +2 -1
- package/dist/components/Text2D.d.ts.map +1 -1
- package/dist/components/Text2D.js +3 -1
- package/dist/components/Text3D.d.ts +2 -1
- package/dist/components/Text3D.d.ts.map +1 -1
- package/dist/components/Text3D.js +2 -2
- package/dist/components/VolumePoints.d.ts +3 -2
- package/dist/components/VolumePoints.d.ts.map +1 -1
- package/dist/components/VolumePoints.js +6 -2
- package/dist/components/cursor/AuraCursor.d.ts.map +1 -1
- package/dist/components/cursor/AuraCursor.js +3 -1
- package/dist/components/cursor/AuroraCursor.d.ts.map +1 -1
- package/dist/components/cursor/AuroraCursor.js +5 -2
- package/dist/components/cursor/BubblesCursor.d.ts.map +1 -1
- package/dist/components/cursor/BubblesCursor.js +5 -2
- package/dist/components/cursor/CometCursor.d.ts.map +1 -1
- package/dist/components/cursor/CometCursor.js +6 -3
- package/dist/components/cursor/CrosshairCursor.d.ts.map +1 -1
- package/dist/components/cursor/CrosshairCursor.js +6 -3
- package/dist/components/cursor/CursorActions.d.ts +2 -1
- package/dist/components/cursor/CursorActions.d.ts.map +1 -1
- package/dist/components/cursor/CursorActions.js +12 -10
- package/dist/components/cursor/CursorController.d.ts +4 -1
- package/dist/components/cursor/CursorController.d.ts.map +1 -1
- package/dist/components/cursor/CursorController.js +1 -1
- package/dist/components/cursor/CursorEffects.d.ts +4 -2
- package/dist/components/cursor/CursorEffects.d.ts.map +1 -1
- package/dist/components/cursor/CursorEffects.js +6 -2
- package/dist/components/cursor/FerrofluidCursor.d.ts.map +1 -1
- package/dist/components/cursor/FerrofluidCursor.js +3 -1
- package/dist/components/cursor/GlyphRingCursor.d.ts.map +1 -1
- package/dist/components/cursor/GlyphRingCursor.js +3 -1
- package/dist/components/cursor/LightningCursor.d.ts.map +1 -1
- package/dist/components/cursor/LightningCursor.js +3 -1
- package/dist/components/cursor/LiquidMetalCursor.d.ts.map +1 -1
- package/dist/components/cursor/LiquidMetalCursor.js +3 -1
- package/dist/components/cursor/OrbCursor.d.ts.map +1 -1
- package/dist/components/cursor/OrbCursor.js +3 -1
- package/dist/components/cursor/PlasmaWhipCursor.d.ts.map +1 -1
- package/dist/components/cursor/PlasmaWhipCursor.js +3 -1
- package/dist/components/cursor/SparklesCursor.d.ts.map +1 -1
- package/dist/components/cursor/SparklesCursor.js +5 -2
- package/dist/components/cursor/TeslaCursor.d.ts.map +1 -1
- package/dist/components/cursor/TeslaCursor.js +6 -9
- package/dist/components/cursor/clickActions/BoltFlashAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/BoltFlashAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/BoltFlashAction.js +5 -2
- package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/GlyphInscriptionAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/GlyphInscriptionAction.js +3 -1
- package/dist/components/cursor/clickActions/ImplosionAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/ImplosionAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/ImplosionAction.js +3 -1
- package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/PhaseShiftAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/PhaseShiftAction.js +5 -2
- package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/PlasmaBombAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/PlasmaBombAction.js +5 -2
- package/dist/components/cursor/clickActions/RealityTearAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/RealityTearAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/RealityTearAction.js +3 -1
- package/dist/components/cursor/clickActions/ShockwaveAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/ShockwaveAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/ShockwaveAction.js +5 -2
- package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/SparklesBurstAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/SparklesBurstAction.js +3 -1
- package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts +2 -1
- package/dist/components/cursor/clickActions/VoronoiFractureAction.d.ts.map +1 -1
- package/dist/components/cursor/clickActions/VoronoiFractureAction.js +3 -1
- package/dist/components/cursor/clickActions/index.d.ts +11 -0
- package/dist/components/cursor/clickActions/index.d.ts.map +1 -0
- package/dist/components/cursor/clickActions/index.js +10 -0
- package/dist/components/cursor/index.d.ts +21 -0
- package/dist/components/cursor/index.d.ts.map +1 -0
- package/dist/components/cursor/index.js +19 -0
- package/dist/components/effects/AuraEffect.d.ts +2 -1
- package/dist/components/effects/AuraEffect.d.ts.map +1 -1
- package/dist/components/effects/AuraEffect.js +5 -2
- package/dist/components/effects/AuroraEffect.d.ts +2 -1
- package/dist/components/effects/AuroraEffect.d.ts.map +1 -1
- package/dist/components/effects/AuroraEffect.js +3 -1
- package/dist/components/effects/BlackHoleEffect.d.ts +2 -1
- package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -1
- package/dist/components/effects/BlackHoleEffect.js +3 -1
- package/dist/components/effects/ConstellationEffect.d.ts +2 -1
- package/dist/components/effects/ConstellationEffect.d.ts.map +1 -1
- package/dist/components/effects/ConstellationEffect.js +3 -1
- package/dist/components/effects/Corona.d.ts +19 -0
- package/dist/components/effects/Corona.d.ts.map +1 -0
- package/dist/components/effects/Corona.js +15 -0
- package/dist/components/effects/DataStreamEffect.d.ts +2 -1
- package/dist/components/effects/DataStreamEffect.d.ts.map +1 -1
- package/dist/components/effects/DataStreamEffect.js +5 -2
- package/dist/components/effects/DnaHelixEffect.d.ts +2 -1
- package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -1
- package/dist/components/effects/DnaHelixEffect.js +3 -1
- package/dist/components/effects/Fire.d.ts +3 -2
- package/dist/components/effects/Fire.d.ts.map +1 -1
- package/dist/components/effects/Fire.js +3 -1
- package/dist/components/effects/FireEffect.d.ts +2 -1
- package/dist/components/effects/FireEffect.d.ts.map +1 -1
- package/dist/components/effects/FireEffect.js +5 -2
- package/dist/components/effects/Flares.d.ts +25 -0
- package/dist/components/effects/Flares.d.ts.map +1 -0
- package/dist/components/effects/Flares.js +136 -0
- package/dist/components/effects/ForcefieldEffect.d.ts +2 -1
- package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -1
- package/dist/components/effects/ForcefieldEffect.js +3 -1
- package/dist/components/effects/HologramEffect.d.ts +2 -1
- package/dist/components/effects/HologramEffect.d.ts.map +1 -1
- package/dist/components/effects/HologramEffect.js +5 -2
- package/dist/components/effects/IceCrystalsEffect.d.ts +2 -1
- package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -1
- package/dist/components/effects/IceCrystalsEffect.js +3 -1
- package/dist/components/effects/LightningEffect.d.ts +2 -1
- package/dist/components/effects/LightningEffect.d.ts.map +1 -1
- package/dist/components/effects/LightningEffect.js +5 -2
- package/dist/components/effects/MoleculesEffect.d.ts +2 -1
- package/dist/components/effects/MoleculesEffect.d.ts.map +1 -1
- package/dist/components/effects/MoleculesEffect.js +5 -2
- package/dist/components/effects/NeuralNetworkEffect.d.ts +2 -1
- package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -1
- package/dist/components/effects/NeuralNetworkEffect.js +3 -1
- package/dist/components/effects/OrbEffect.d.ts +2 -1
- package/dist/components/effects/OrbEffect.d.ts.map +1 -1
- package/dist/components/effects/OrbEffect.js +5 -2
- package/dist/components/effects/PortalEffect.d.ts +2 -1
- package/dist/components/effects/PortalEffect.d.ts.map +1 -1
- package/dist/components/effects/PortalEffect.js +5 -2
- package/dist/components/effects/ShockwaveEffect.d.ts +2 -1
- package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
- package/dist/components/effects/ShockwaveEffect.js +5 -2
- package/dist/components/effects/SmokePlumeEffect.d.ts +2 -1
- package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -1
- package/dist/components/effects/SmokePlumeEffect.js +5 -2
- package/dist/components/effects/SmokeRibbon.d.ts +3 -2
- package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
- package/dist/components/effects/SmokeRibbon.js +5 -2
- package/dist/components/effects/SmokeRingEffect.d.ts +2 -1
- package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -1
- package/dist/components/effects/SmokeRingEffect.js +5 -2
- package/dist/components/effects/VolumetricFogEffect.d.ts +2 -1
- package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -1
- package/dist/components/effects/VolumetricFogEffect.js +5 -2
- package/dist/components/effects/index.d.ts +28 -0
- package/dist/components/effects/index.d.ts.map +1 -0
- package/dist/components/effects/index.js +24 -0
- package/dist/components/index.d.ts +112 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +77 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/hooks/index.d.ts +55 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +46 -1
- package/dist/hooks/useObjectReady.d.ts +29 -0
- package/dist/hooks/useObjectReady.d.ts.map +1 -0
- package/dist/hooks/useObjectReady.js +59 -0
- package/dist/index.d.ts +4 -135
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -108
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/objectReady.d.ts +24 -0
- package/dist/types/objectReady.d.ts.map +1 -0
- package/dist/types/objectReady.js +1 -0
- package/package.json +3 -3
|
@@ -3,12 +3,13 @@ import { PlaneGeometry } from 'three';
|
|
|
3
3
|
import { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
|
|
4
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
5
5
|
import { SmokeRibbonMaterial } from '@3driseai/3drise-core';
|
|
6
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
6
7
|
/**
|
|
7
8
|
* Place where you want the smoke to rise from — it climbs the parent's local +Y:
|
|
8
9
|
*
|
|
9
10
|
* <SmokeRibbon position={[0, 0, 0]} config={{ planes: 2, twistStart: 0.2 }} />
|
|
10
11
|
*/
|
|
11
|
-
const SmokeRibbon = ({ config = {}, boundingRadius = 1, ...groupProps }) => {
|
|
12
|
+
const SmokeRibbon = ({ config = {}, boundingRadius = 1, onObjectReady, onObjectDispose, ...groupProps }) => {
|
|
12
13
|
const { width = 1.5, height = 5, segmentsPerLength = 12, planes = 2, color = '#f2f2f7', colorTop = '#b3b8c7', speed = 0.18, detail = 1.4, remapLow = 0.38, remapHigh = 1.0, edgeX = 0.4, edgeY = 0.32, density = 1.0, twistStrength = 9, twistSpeed = 0.4, twistScale = 0.9, twistStart = 0.18, wind = [0.15, 0], animate = true, interactive = false, } = config;
|
|
13
14
|
// One material instance shared across the crossed planes -> one set of uniforms.
|
|
14
15
|
const material = useMemo(() => new SmokeRibbonMaterial(), []);
|
|
@@ -50,6 +51,8 @@ const SmokeRibbon = ({ config = {}, boundingRadius = 1, ...groupProps }) => {
|
|
|
50
51
|
]);
|
|
51
52
|
const { pointer } = useThree();
|
|
52
53
|
const hovering = useRef(false);
|
|
54
|
+
const rootRef = useRef(null);
|
|
55
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
53
56
|
useFrame(({ clock }) => {
|
|
54
57
|
if (animate)
|
|
55
58
|
material.u_time = clock.getElapsedTime();
|
|
@@ -64,6 +67,6 @@ const SmokeRibbon = ({ config = {}, boundingRadius = 1, ...groupProps }) => {
|
|
|
64
67
|
}
|
|
65
68
|
});
|
|
66
69
|
console.log('SmokeRibbon render with config:', config, 'and groupProps:', groupProps);
|
|
67
|
-
return (_jsx("group", { ...groupProps, onPointerOver: interactive ? () => (hovering.current = true) : undefined, onPointerOut: interactive ? () => (hovering.current = false) : undefined, children: angles.map((a, i) => (_jsx("mesh", { geometry: geometry, material: material, "rotation-y": a }, i))) }));
|
|
70
|
+
return (_jsx("group", { ref: rootRef, ...groupProps, onPointerOver: interactive ? () => (hovering.current = true) : undefined, onPointerOut: interactive ? () => (hovering.current = false) : undefined, children: angles.map((a, i) => (_jsx("mesh", { geometry: geometry, material: material, "rotation-y": a }, i))) }));
|
|
68
71
|
};
|
|
69
72
|
export default SmokeRibbon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { SmokeRingConfig, AnimationOptions } from "@3driseai/3drise-core";
|
|
3
|
-
|
|
3
|
+
import type { ObjectReadyProps } from '../../types/objectReady';
|
|
4
|
+
interface SmokeRingEffectProps extends ObjectReadyProps {
|
|
4
5
|
boundingRadius: number;
|
|
5
6
|
config: SmokeRingConfig;
|
|
6
7
|
animations?: AnimationOptions[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmokeRingEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokeRingEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SmokeRingEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/SmokeRingEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AAiED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2FnD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { useRef, useMemo } from 'react';
|
|
|
3
3
|
import { useFrame } from '@react-three/fiber';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { applyGenerativeAnimations } from '../../utils/handleGenerativeEffectsAnimations.js';
|
|
6
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
6
7
|
// ── Per-ring puff shader (one Points per ring — GPU computes torus positions) ──
|
|
7
8
|
const ringVert = /* glsl */ `
|
|
8
9
|
attribute float aAngle; // 0..TAU position around torus
|
|
@@ -65,9 +66,11 @@ const ringFrag = /* glsl */ `
|
|
|
65
66
|
}
|
|
66
67
|
`;
|
|
67
68
|
const PUFFS_PER_RING = 120;
|
|
68
|
-
const SmokeRingEffect = ({ boundingRadius, config, animations }) => {
|
|
69
|
+
const SmokeRingEffect = ({ boundingRadius, config, animations, onObjectReady, onObjectDispose }) => {
|
|
69
70
|
const { ringCount, expansionRadius, riseSpeed, intervalSeconds, smokeColor, thickness, opacity, speed, intensity } = config;
|
|
70
71
|
const startValuesCacheRef = useRef({});
|
|
72
|
+
const rootRef = useRef(null);
|
|
73
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
71
74
|
const N = Math.max(1, Math.min(ringCount, 4));
|
|
72
75
|
// Ring states — one per slot
|
|
73
76
|
const ringStates = useRef([]);
|
|
@@ -153,6 +156,6 @@ const SmokeRingEffect = ({ boundingRadius, config, animations }) => {
|
|
|
153
156
|
applyGenerativeAnimations(mats, animations, startValuesCacheRef.current, Date.now(), false);
|
|
154
157
|
}
|
|
155
158
|
});
|
|
156
|
-
return (_jsx("group", { children: geos.map((geo, i) => (_jsx("points", { geometry: geo, material: mats[i] }, i))) }));
|
|
159
|
+
return (_jsx("group", { ref: rootRef, children: geos.map((geo, i) => (_jsx("points", { geometry: geo, material: mats[i] }, i))) }));
|
|
157
160
|
};
|
|
158
161
|
export default SmokeRingEffect;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { VolumetricFogConfig, AnimationOptions } from "@3driseai/3drise-core";
|
|
3
|
-
|
|
3
|
+
import type { ObjectReadyProps } from '../../types/objectReady';
|
|
4
|
+
interface VolumetricFogEffectProps extends ObjectReadyProps {
|
|
4
5
|
boundingRadius: number;
|
|
5
6
|
config: VolumetricFogConfig;
|
|
6
7
|
animations?: AnimationOptions[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumetricFogEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/VolumetricFogEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"VolumetricFogEffect.d.ts","sourceRoot":"","sources":["../../../src/components/effects/VolumetricFogEffect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,UAAU,wBAAyB,SAAQ,gBAAgB;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACnC;AAoDD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAyD3D,CAAC;AACF,eAAe,mBAAmB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { useRef, useMemo } from 'react';
|
|
|
3
3
|
import { useFrame } from '@react-three/fiber';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { applyGenerativeAnimations } from '../../utils/handleGenerativeEffectsAnimations.js';
|
|
6
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
6
7
|
// ── Billboard fog puff — drifts slowly, never rises far ───────────────────────
|
|
7
8
|
const fogVert = /* glsl */ `
|
|
8
9
|
attribute float aT; // stagger offset 0..1
|
|
@@ -52,9 +53,11 @@ const fogFrag = /* glsl */ `
|
|
|
52
53
|
gl_FragColor = vec4(uFogColor, g * vAlpha * uDensity);
|
|
53
54
|
}
|
|
54
55
|
`;
|
|
55
|
-
const VolumetricFogEffect = ({ boundingRadius, config, animations }) => {
|
|
56
|
+
const VolumetricFogEffect = ({ boundingRadius, config, animations, onObjectReady, onObjectDispose }) => {
|
|
56
57
|
const { particleCount, fogRadius, driftSpeed, fogColor, density, opacity, intensity } = config;
|
|
57
58
|
const startValuesCacheRef = useRef({});
|
|
59
|
+
const rootRef = useRef(null);
|
|
60
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
58
61
|
const r = boundingRadius * fogRadius;
|
|
59
62
|
const { geo, mat } = useMemo(() => {
|
|
60
63
|
const N = Math.max(20, Math.min(particleCount, 200));
|
|
@@ -106,6 +109,6 @@ const VolumetricFogEffect = ({ boundingRadius, config, animations }) => {
|
|
|
106
109
|
applyGenerativeAnimations([mat], animations, startValuesCacheRef.current, Date.now(), false);
|
|
107
110
|
}
|
|
108
111
|
});
|
|
109
|
-
return _jsx("points", { geometry: geo, material: mat });
|
|
112
|
+
return _jsx("points", { ref: rootRef, geometry: geo, material: mat });
|
|
110
113
|
};
|
|
111
114
|
export default VolumetricFogEffect;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type { CoronaProps } from './Corona';
|
|
2
|
+
export type { FireProps } from './Fire';
|
|
3
|
+
export type { FlaresProps } from './Flares';
|
|
4
|
+
export type { SmokeRibbonProps } from './SmokeRibbon';
|
|
5
|
+
export { default as AuraEffect } from './AuraEffect';
|
|
6
|
+
export { default as AuroraEffect } from './AuroraEffect';
|
|
7
|
+
export { default as BlackHoleEffect } from './BlackHoleEffect';
|
|
8
|
+
export { default as ConstellationEffect } from './ConstellationEffect';
|
|
9
|
+
export { default as Corona } from './Corona';
|
|
10
|
+
export { default as DataStreamEffect } from './DataStreamEffect';
|
|
11
|
+
export { default as DnaHelixEffect } from './DnaHelixEffect';
|
|
12
|
+
export { default as Fire } from './Fire';
|
|
13
|
+
export { default as FireEffect } from './FireEffect';
|
|
14
|
+
export { default as Flares } from './Flares';
|
|
15
|
+
export { default as ForcefieldEffect } from './ForcefieldEffect';
|
|
16
|
+
export { default as HologramEffect } from './HologramEffect';
|
|
17
|
+
export { default as IceCrystalsEffect } from './IceCrystalsEffect';
|
|
18
|
+
export { default as LightningEffect } from './LightningEffect';
|
|
19
|
+
export { default as MoleculesEffect } from './MoleculesEffect';
|
|
20
|
+
export { default as NeuralNetworkEffect } from './NeuralNetworkEffect';
|
|
21
|
+
export { default as OrbEffect } from './OrbEffect';
|
|
22
|
+
export { default as PortalEffect } from './PortalEffect';
|
|
23
|
+
export { default as ShockwaveEffect } from './ShockwaveEffect';
|
|
24
|
+
export { default as SmokePlumeEffect } from './SmokePlumeEffect';
|
|
25
|
+
export { default as SmokeRibbon } from './SmokeRibbon';
|
|
26
|
+
export { default as SmokeRingEffect } from './SmokeRingEffect';
|
|
27
|
+
export { default as VolumetricFogEffect } from './VolumetricFogEffect';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/effects/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C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|
+
export { default as AuroraEffect } from './AuroraEffect.js';
|
|
4
|
+
export { default as BlackHoleEffect } from './BlackHoleEffect.js';
|
|
5
|
+
export { default as ConstellationEffect } from './ConstellationEffect.js';
|
|
6
|
+
export { default as Corona } from './Corona.js';
|
|
7
|
+
export { default as DataStreamEffect } from './DataStreamEffect.js';
|
|
8
|
+
export { default as DnaHelixEffect } from './DnaHelixEffect.js';
|
|
9
|
+
export { default as Fire } from './Fire.js';
|
|
10
|
+
export { default as FireEffect } from './FireEffect.js';
|
|
11
|
+
export { default as Flares } from './Flares.js';
|
|
12
|
+
export { default as ForcefieldEffect } from './ForcefieldEffect.js';
|
|
13
|
+
export { default as HologramEffect } from './HologramEffect.js';
|
|
14
|
+
export { default as IceCrystalsEffect } from './IceCrystalsEffect.js';
|
|
15
|
+
export { default as LightningEffect } from './LightningEffect.js';
|
|
16
|
+
export { default as MoleculesEffect } from './MoleculesEffect.js';
|
|
17
|
+
export { default as NeuralNetworkEffect } from './NeuralNetworkEffect.js';
|
|
18
|
+
export { default as OrbEffect } from './OrbEffect.js';
|
|
19
|
+
export { default as PortalEffect } from './PortalEffect.js';
|
|
20
|
+
export { default as ShockwaveEffect } from './ShockwaveEffect.js';
|
|
21
|
+
export { default as SmokePlumeEffect } from './SmokePlumeEffect.js';
|
|
22
|
+
export { default as SmokeRibbon } from './SmokeRibbon.js';
|
|
23
|
+
export { default as SmokeRingEffect } from './SmokeRingEffect.js';
|
|
24
|
+
export { default as VolumetricFogEffect } from './VolumetricFogEffect.js';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export type { AnimatedObjectProps } from './AnimatedObject';
|
|
2
|
+
export type { BubblesProps } from './Bubbles';
|
|
3
|
+
export type { CloudsProps } from './Clouds';
|
|
4
|
+
export type { EffectsGeneratorProps } from './EffectsGenerator';
|
|
5
|
+
export type { EnvironmentManagerProps } from './EnvironmentManager';
|
|
6
|
+
export type { OutlineMode, Point3 } from './extractOutline';
|
|
7
|
+
export type { FrameProps } from './Frame';
|
|
8
|
+
export type { FrameShapeType } from './FrameGeometry';
|
|
9
|
+
export type { GalaxyProps } from './Galaxy';
|
|
10
|
+
export type { GalleryLayoutProps } from './GalleryLayout';
|
|
11
|
+
export type { GeometryMeshProps } from './GeometryShape';
|
|
12
|
+
export type { GlyphsProps } from './Glyphs';
|
|
13
|
+
export type { GridHelperProps } from './GridHelper';
|
|
14
|
+
export type { HdrPlaylistRendererProps } from './HdrPlaylistRenderer';
|
|
15
|
+
export type { ImageGeometryProps } from './ImageGeometry';
|
|
16
|
+
export type { LensflareProps } from './Lensflare';
|
|
17
|
+
export type { LetterData, LetterProps } from './Letter';
|
|
18
|
+
export type { LettersProps } from './Letters';
|
|
19
|
+
export type { LightsManagerProps } from './LightsManager';
|
|
20
|
+
export type { LoadingIndicatorProps } from './LoadingIndicator';
|
|
21
|
+
export type { MaterialLibraryProps } from './MaterialLibrary';
|
|
22
|
+
export type { MoonProps, MoonSettings } from './Moon';
|
|
23
|
+
export type { MyGridProps } from './MyGrid';
|
|
24
|
+
export type { ObjectsRendererApiProps } from './ObjectsRendererApi';
|
|
25
|
+
export type { OceanProps } from './Ocean';
|
|
26
|
+
export type { OutlineProps } from './Outline';
|
|
27
|
+
export type { PathRendererProps } from './PathRenderer';
|
|
28
|
+
export type { PlanetProps, PlanetType } from './Planet';
|
|
29
|
+
export type { RainProps } from './Rain';
|
|
30
|
+
export type { SceneFogProps } from './SceneFog';
|
|
31
|
+
export type { ShootingStarProps } from './ShootingStar';
|
|
32
|
+
export type { ShootingStarsProps } from './ShootingStars';
|
|
33
|
+
export type { SkyboxProps } from './Skybox';
|
|
34
|
+
export type { SkyControllerProps } from './SkyController';
|
|
35
|
+
export type { SkyMeshProps } from './SkyMesh';
|
|
36
|
+
export type { SkySystemProps, SkySystemRef } from './SkySystem';
|
|
37
|
+
export type { SparklesBurstProps } from './SparklesBurst';
|
|
38
|
+
export type { StarsProps } from './Stars';
|
|
39
|
+
export type { SunCoreProps } from './SunCore';
|
|
40
|
+
export type { SunLightProps } from './SunLight';
|
|
41
|
+
export type { Text2DProps } from './Text2D';
|
|
42
|
+
export type { Text3DProps } from './Text3D';
|
|
43
|
+
export type { VolumePointsProps } from './VolumePoints';
|
|
44
|
+
export { AnimatedObject, default as AnimatedObjectDefault } from './AnimatedObject';
|
|
45
|
+
export { default as Bubbles } from './Bubbles';
|
|
46
|
+
export { CameraController, default as CameraControllerDefault } from './CameraController';
|
|
47
|
+
export { default as Clouds } from './Clouds';
|
|
48
|
+
export { default as CreatedObject } from './CreatedObject';
|
|
49
|
+
export { default as CustomPrimitive } from './CustomPrimitive';
|
|
50
|
+
export { default as Earth } from './Earth';
|
|
51
|
+
export { default as EffectsGenerator } from './EffectsGenerator';
|
|
52
|
+
export { default as EffectsGroup } from './EffectsGroup';
|
|
53
|
+
export { default as EnvironmentManager } from './EnvironmentManager';
|
|
54
|
+
export { default as EnvironmentObject } from './EnvironmentObject';
|
|
55
|
+
export { default as Frame } from './Frame';
|
|
56
|
+
export { FrameGeometry } from './FrameGeometry';
|
|
57
|
+
export { FrameImage } from './FrameImage';
|
|
58
|
+
export { default as Galaxy } from './Galaxy';
|
|
59
|
+
export { default as GalleryLayout } from './GalleryLayout';
|
|
60
|
+
export { default as Glyphs } from './Glyphs';
|
|
61
|
+
export { default as GridHelper } from './GridHelper';
|
|
62
|
+
export { default as GridGenerator } from './GridsGenerator';
|
|
63
|
+
export { default as HdrPlaylistRenderer } from './HdrPlaylistRenderer';
|
|
64
|
+
export { ImageGeometry } from './ImageGeometry';
|
|
65
|
+
export { default as Lensflare, createFlareTexture } from './Lensflare';
|
|
66
|
+
export { default as Letter } from './Letter';
|
|
67
|
+
export { default as Letters } from './Letters';
|
|
68
|
+
export { default as LightObject } from './LightObject';
|
|
69
|
+
export { default as LightsManager } from './LightsManager';
|
|
70
|
+
export { default as Lines } from './Lines';
|
|
71
|
+
export { default as LoadingIndicator } from './LoadingIndicator';
|
|
72
|
+
export { default as MaterialLibrary } from './MaterialLibrary';
|
|
73
|
+
export { default as Moon, defaultMoonSettings } from './Moon';
|
|
74
|
+
export { MyGrid, defaultMyGridConfig } from './MyGrid';
|
|
75
|
+
export { default as ObjectNode } from './ObjectNode';
|
|
76
|
+
export { default as ObjectNodeApi } from './ObjectNodeApi';
|
|
77
|
+
export { default as ObjectsRenderer } from './ObjectsRenderer';
|
|
78
|
+
export { default as ObjectsRendererApi } from './ObjectsRendererApi';
|
|
79
|
+
export { default as Ocean } from './Ocean';
|
|
80
|
+
export { Outline } from './Outline';
|
|
81
|
+
export { default as ParticlesR3f } from './ParticlesR3f';
|
|
82
|
+
export { default as Path } from './Path';
|
|
83
|
+
export { default as PathGeometry } from './PathGeometry';
|
|
84
|
+
export { default as PathRenderer } from './PathRenderer';
|
|
85
|
+
export { default as Planet } from './Planet';
|
|
86
|
+
export { default as PointCloud } from './PointCloud';
|
|
87
|
+
export { default as ProductionScene } from './ProductionScene';
|
|
88
|
+
export { default as ProjectLoader } from './ProjectLoader';
|
|
89
|
+
export { default as Rain } from './Rain';
|
|
90
|
+
export { default as RiseLogo } from './RiseLogo';
|
|
91
|
+
export { default as SceneBuilder } from './SceneBuilder';
|
|
92
|
+
export { default as SceneFog } from './SceneFog';
|
|
93
|
+
export { default as ShootingStar } from './ShootingStar';
|
|
94
|
+
export { default as ShootingStars } from './ShootingStars';
|
|
95
|
+
export { default as Skybox } from './Skybox';
|
|
96
|
+
export { default as SkyController } from './SkyController';
|
|
97
|
+
export { default as SkyMesh } from './SkyMesh';
|
|
98
|
+
export { default as SkySystem } from './SkySystem';
|
|
99
|
+
export { default as SolarSystem } from './SolarSystem';
|
|
100
|
+
export { default as SparklesBurst } from './SparklesBurst';
|
|
101
|
+
export { default as Stars, generateStarsGeometry } from './Stars';
|
|
102
|
+
export { default as Sun } from './Sun';
|
|
103
|
+
export { default as SunCore } from './SunCore';
|
|
104
|
+
export { default as SunLight } from './SunLight';
|
|
105
|
+
export { default as Text2D } from './Text2D';
|
|
106
|
+
export { default as Text3D } from './Text3D';
|
|
107
|
+
export { VolumePoints } from './VolumePoints';
|
|
108
|
+
export { FitGroup, GeometryMesh, computeMode, contourSlices, evenScatter, meshVertices, plexus, surfaceScatter, symmetricScatter, useShapeGeometry as useGeometryShape, volumeFill, wireframe, } from './GeometryShape';
|
|
109
|
+
export { contour2D, edges3D } from './extractOutline';
|
|
110
|
+
export * from './cursor';
|
|
111
|
+
export * from './effects';
|
|
112
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,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EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAO9C,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,gBAAgB,IAAI,gBAAgB,EACpC,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGtD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Public surface of the components folder.
|
|
2
|
+
// Sub-folders own their own barrels; this file only aggregates them.
|
|
3
|
+
// ----------------------------------------------------------- components
|
|
4
|
+
export { AnimatedObject, default as AnimatedObjectDefault } from './AnimatedObject.js';
|
|
5
|
+
export { default as Bubbles } from './Bubbles.js';
|
|
6
|
+
export { CameraController, default as CameraControllerDefault } from './CameraController.js';
|
|
7
|
+
export { default as Clouds } from './Clouds.js';
|
|
8
|
+
export { default as CreatedObject } from './CreatedObject.js';
|
|
9
|
+
export { default as CustomPrimitive } from './CustomPrimitive.js';
|
|
10
|
+
export { default as Earth } from './Earth.js';
|
|
11
|
+
export { default as EffectsGenerator } from './EffectsGenerator.js';
|
|
12
|
+
export { default as EffectsGroup } from './EffectsGroup.js';
|
|
13
|
+
export { default as EnvironmentManager } from './EnvironmentManager.js';
|
|
14
|
+
export { default as EnvironmentObject } from './EnvironmentObject.js';
|
|
15
|
+
export { default as Frame } from './Frame.js';
|
|
16
|
+
export { FrameGeometry } from './FrameGeometry.js';
|
|
17
|
+
export { FrameImage } from './FrameImage.js';
|
|
18
|
+
export { default as Galaxy } from './Galaxy.js';
|
|
19
|
+
export { default as GalleryLayout } from './GalleryLayout.js';
|
|
20
|
+
export { default as Glyphs } from './Glyphs.js';
|
|
21
|
+
export { default as GridHelper } from './GridHelper.js';
|
|
22
|
+
export { default as GridGenerator } from './GridsGenerator.js';
|
|
23
|
+
export { default as HdrPlaylistRenderer } from './HdrPlaylistRenderer.js';
|
|
24
|
+
export { ImageGeometry } from './ImageGeometry.js';
|
|
25
|
+
export { default as Lensflare, createFlareTexture } from './Lensflare.js';
|
|
26
|
+
export { default as Letter } from './Letter.js';
|
|
27
|
+
export { default as Letters } from './Letters.js';
|
|
28
|
+
export { default as LightObject } from './LightObject.js';
|
|
29
|
+
export { default as LightsManager } from './LightsManager.js';
|
|
30
|
+
export { default as Lines } from './Lines.js';
|
|
31
|
+
export { default as LoadingIndicator } from './LoadingIndicator.js';
|
|
32
|
+
export { default as MaterialLibrary } from './MaterialLibrary.js';
|
|
33
|
+
export { default as Moon, defaultMoonSettings } from './Moon.js';
|
|
34
|
+
export { MyGrid, defaultMyGridConfig } from './MyGrid.js';
|
|
35
|
+
export { default as ObjectNode } from './ObjectNode.js';
|
|
36
|
+
export { default as ObjectNodeApi } from './ObjectNodeApi.js';
|
|
37
|
+
export { default as ObjectsRenderer } from './ObjectsRenderer.js';
|
|
38
|
+
export { default as ObjectsRendererApi } from './ObjectsRendererApi.js';
|
|
39
|
+
export { default as Ocean } from './Ocean.js';
|
|
40
|
+
export { Outline } from './Outline.js';
|
|
41
|
+
export { default as ParticlesR3f } from './ParticlesR3f.js';
|
|
42
|
+
export { default as Path } from './Path.js';
|
|
43
|
+
export { default as PathGeometry } from './PathGeometry.js';
|
|
44
|
+
export { default as PathRenderer } from './PathRenderer.js';
|
|
45
|
+
export { default as Planet } from './Planet.js';
|
|
46
|
+
export { default as PointCloud } from './PointCloud.js';
|
|
47
|
+
export { default as ProductionScene } from './ProductionScene.js';
|
|
48
|
+
export { default as ProjectLoader } from './ProjectLoader.js';
|
|
49
|
+
export { default as Rain } from './Rain.js';
|
|
50
|
+
export { default as RiseLogo } from './RiseLogo.js';
|
|
51
|
+
export { default as SceneBuilder } from './SceneBuilder.js';
|
|
52
|
+
export { default as SceneFog } from './SceneFog.js';
|
|
53
|
+
export { default as ShootingStar } from './ShootingStar.js';
|
|
54
|
+
export { default as ShootingStars } from './ShootingStars.js';
|
|
55
|
+
export { default as Skybox } from './Skybox.js';
|
|
56
|
+
export { default as SkyController } from './SkyController.js';
|
|
57
|
+
export { default as SkyMesh } from './SkyMesh.js';
|
|
58
|
+
export { default as SkySystem } from './SkySystem.js';
|
|
59
|
+
export { default as SolarSystem } from './SolarSystem.js';
|
|
60
|
+
export { default as SparklesBurst } from './SparklesBurst.js';
|
|
61
|
+
export { default as Stars, generateStarsGeometry } from './Stars.js';
|
|
62
|
+
export { default as Sun } from './Sun.js';
|
|
63
|
+
export { default as SunCore } from './SunCore.js';
|
|
64
|
+
export { default as SunLight } from './SunLight.js';
|
|
65
|
+
export { default as Text2D } from './Text2D.js';
|
|
66
|
+
export { default as Text3D } from './Text3D.js';
|
|
67
|
+
export { VolumePoints } from './VolumePoints.js';
|
|
68
|
+
// --------------------------------------------------- geometry utilities
|
|
69
|
+
// GeometryShape also declares edges3D/contour2D, byte-identical to the ones in
|
|
70
|
+
// extractOutline; only the extractOutline copies are exported. Its
|
|
71
|
+
// useShapeGeometry takes a GeometryShapeConfig (the hooks/ one takes a
|
|
72
|
+
// ShapeName + options), so it is aliased to useGeometryShape.
|
|
73
|
+
export { FitGroup, GeometryMesh, computeMode, contourSlices, evenScatter, meshVertices, plexus, surfaceScatter, symmetricScatter, useShapeGeometry as useGeometryShape, volumeFill, wireframe, } from './GeometryShape.js';
|
|
74
|
+
export { contour2D, edges3D } from './extractOutline.js';
|
|
75
|
+
// ------------------------------------------------------------ sub-folders
|
|
76
|
+
export * from './cursor/index.js';
|
|
77
|
+
export * from './effects/index.js';
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const dataCenterServer
|
|
1
|
+
export declare const dataCenterServer: string;
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,QAAgF,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -2,4 +2,4 @@ const LOCAL_DATA_CENTER_SERVER = 'http://localhost:3001/api/data/';
|
|
|
2
2
|
const PRODUCTION_DATA_CENTER_SERVER = 'https://3drise.ai/api/data/';
|
|
3
3
|
const isLocalHostRuntime = typeof window !== 'undefined' &&
|
|
4
4
|
(window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1');
|
|
5
|
-
export const dataCenterServer = PRODUCTION_DATA_CENTER_SERVER;
|
|
5
|
+
export const dataCenterServer = isLocalHostRuntime ? LOCAL_DATA_CENTER_SERVER : PRODUCTION_DATA_CENTER_SERVER;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1,56 @@
|
|
|
1
|
+
export type { Update3driseShaderOptions } from './use3driseShader';
|
|
2
|
+
export { update3driseShaderUniforms, use3driseShader } from './use3driseShader';
|
|
3
|
+
export { useAnimationEvents } from './useAnimationEvents';
|
|
4
|
+
export { useCameraAnimation } from './useCameraAnimation';
|
|
5
|
+
export type { UseContinuousEffectsOptions, UseContinuousEffectsResult } from './useContinuousEffects';
|
|
6
|
+
export { DEBUG_CONTINUOUS_EFFECTS, useContinuousEffects } from './useContinuousEffects';
|
|
7
|
+
export type { UseCubeCameraOptions } from './useCubeCamera';
|
|
8
|
+
export { useCubeCamera } from './useCubeCamera';
|
|
9
|
+
export type { UseEnvironmentEffectsOptions } from './useEnvironmentEffects';
|
|
10
|
+
export { useEnvironmentEffects } from './useEnvironmentEffects';
|
|
11
|
+
export { useFrameAnimations } from './useFrameAnimations';
|
|
12
|
+
export { useFrameEffects } from './useFrameEffects';
|
|
13
|
+
export { ANIMATION_PRESETS, useGsapAnimation } from './useGsapAnimation';
|
|
14
|
+
export { useInteraction } from './useInteraction';
|
|
15
|
+
export type { UseInteractionEffectsOptions, UseInteractionEffectsResult } from './useInteractionEffects';
|
|
16
|
+
export { useMouseMove } from './useInteractionEffects';
|
|
17
|
+
export { useKey, useKeyUpDown } from './useKey';
|
|
18
|
+
export type { UseLightAnimationOptions } from './useLightAnimation';
|
|
19
|
+
export { useLightAnimation } from './useLightAnimation';
|
|
20
|
+
export { useLightHandlers } from './useLightHandlers';
|
|
21
|
+
export type { UseLightMouseMoveOptions } from './useLightMouseMove';
|
|
22
|
+
export { useLightMouseMove } from './useLightMouseMove';
|
|
23
|
+
export { useLightShadow } from './useLightShadow';
|
|
24
|
+
export { useMaterialApplication } from './useMaterialApplication';
|
|
25
|
+
export type { UseMaterialOptionsReturn } from './useMaterialOptions';
|
|
26
|
+
export { useMaterialOptions } from './useMaterialOptions';
|
|
27
|
+
export { useMaterialUniforms } from './useMaterialUniforms';
|
|
28
|
+
export { useMeshController } from './useMeshController';
|
|
29
|
+
export { useMouseHandlers } from './useMouseHandlers';
|
|
30
|
+
export type { NumericValue } from './useNumericAnimation';
|
|
31
|
+
export { useNumericAnimation } from './useNumericAnimation';
|
|
32
|
+
export { useObjectAnimation } from './useObjectAnimation';
|
|
33
|
+
export { useObjectEdges } from './useObjectEdges';
|
|
34
|
+
export type { ObjectEffectsFunctions, ObjectEffectsState, UseObjectEffectsReturn } from './useObjectEffects';
|
|
35
|
+
export { useObjectEffects } from './useObjectEffects';
|
|
36
|
+
export { useObjectReady, useObjectReadyReporter } from './useObjectReady';
|
|
37
|
+
export { useOrbitControls } from './useOrbitControls';
|
|
38
|
+
export { useOutline } from './useOutline';
|
|
39
|
+
export { useParticlePositions } from './useParticlePositions';
|
|
40
|
+
export { useParticlesColors } from './useParticlesColors';
|
|
41
|
+
export { useParticlesTextures } from './useParticlesTextures';
|
|
42
|
+
export type { PathAnimationOptions } from './usePathAnimation';
|
|
43
|
+
export { usePathAnimation } from './usePathAnimation';
|
|
44
|
+
export { useSequenceAnimation } from './useSequenceAnimation';
|
|
45
|
+
export { useShadowApplication } from './useShadowApplication';
|
|
46
|
+
export { useShapeGeometry } from './useShapeGeometry';
|
|
47
|
+
export type { SkyAnimValues } from './useSkyAnimation';
|
|
48
|
+
export { useSkyAnimation } from './useSkyAnimation';
|
|
49
|
+
export type { SkyTimeState, TimeOfDayLabel, UseSkySystemOptions, UseSkySystemReturn } from './useSkySystem';
|
|
50
|
+
export { useSkySystem } from './useSkySystem';
|
|
51
|
+
export { useSkyUniforms } from './useSkyUniforms';
|
|
52
|
+
export { useTransformControls } from './useTransformControls';
|
|
53
|
+
export { useVolumePoints } from './useVolumePoints';
|
|
54
|
+
export { useWaterEnvironment } from './useWaterEnvironment';
|
|
55
|
+
export { useWaterReflections } from './useWaterReflections';
|
|
1
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAA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AAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
// Public surface of the hooks folder.
|
|
2
|
+
// Explicit named re-exports, matching the convention in components/index.ts.
|
|
3
|
+
// Default exports are omitted throughout: every hook that has one also exports
|
|
4
|
+
// the same function by name.
|
|
5
|
+
export { update3driseShaderUniforms, use3driseShader } from './use3driseShader.js';
|
|
6
|
+
export { useAnimationEvents } from './useAnimationEvents.js';
|
|
7
|
+
export { useCameraAnimation } from './useCameraAnimation.js';
|
|
8
|
+
export { DEBUG_CONTINUOUS_EFFECTS, useContinuousEffects } from './useContinuousEffects.js';
|
|
9
|
+
export { useCubeCamera } from './useCubeCamera.js';
|
|
10
|
+
export { useEnvironmentEffects } from './useEnvironmentEffects.js';
|
|
11
|
+
export { useFrameAnimations } from './useFrameAnimations.js';
|
|
12
|
+
export { useFrameEffects } from './useFrameEffects.js';
|
|
13
|
+
export { ANIMATION_PRESETS, useGsapAnimation } from './useGsapAnimation.js';
|
|
14
|
+
export { useInteraction } from './useInteraction.js';
|
|
15
|
+
export { useMouseMove } from './useInteractionEffects.js';
|
|
16
|
+
export { useKey, useKeyUpDown } from './useKey.js';
|
|
17
|
+
export { useLightAnimation } from './useLightAnimation.js';
|
|
18
|
+
export { useLightHandlers } from './useLightHandlers.js';
|
|
19
|
+
export { useLightMouseMove } from './useLightMouseMove.js';
|
|
20
|
+
export { useLightShadow } from './useLightShadow.js';
|
|
21
|
+
export { useMaterialApplication } from './useMaterialApplication.js';
|
|
22
|
+
export { useMaterialOptions } from './useMaterialOptions.js';
|
|
23
|
+
export { useMaterialUniforms } from './useMaterialUniforms.js';
|
|
24
|
+
export { useMeshController } from './useMeshController.js';
|
|
25
|
+
export { useMouseHandlers } from './useMouseHandlers.js';
|
|
26
|
+
export { useNumericAnimation } from './useNumericAnimation.js';
|
|
27
|
+
export { useObjectAnimation } from './useObjectAnimation.js';
|
|
28
|
+
export { useObjectEdges } from './useObjectEdges.js';
|
|
29
|
+
export { useObjectEffects } from './useObjectEffects.js';
|
|
30
|
+
export { useObjectReady, useObjectReadyReporter } from './useObjectReady.js';
|
|
31
|
+
export { useOrbitControls } from './useOrbitControls.js';
|
|
32
|
+
export { useOutline } from './useOutline.js';
|
|
33
|
+
export { useParticlePositions } from './useParticlePositions.js';
|
|
34
|
+
export { useParticlesColors } from './useParticlesColors.js';
|
|
35
|
+
export { useParticlesTextures } from './useParticlesTextures.js';
|
|
36
|
+
export { usePathAnimation } from './usePathAnimation.js';
|
|
37
|
+
export { useSequenceAnimation } from './useSequenceAnimation.js';
|
|
38
|
+
export { useShadowApplication } from './useShadowApplication.js';
|
|
39
|
+
export { useShapeGeometry } from './useShapeGeometry.js';
|
|
40
|
+
export { useSkyAnimation } from './useSkyAnimation.js';
|
|
41
|
+
export { useSkySystem } from './useSkySystem.js';
|
|
42
|
+
export { useSkyUniforms } from './useSkyUniforms.js';
|
|
43
|
+
export { useTransformControls } from './useTransformControls.js';
|
|
44
|
+
export { useVolumePoints } from './useVolumePoints.js';
|
|
45
|
+
export { useWaterEnvironment } from './useWaterEnvironment.js';
|
|
46
|
+
export { useWaterReflections } from './useWaterReflections.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { Object3D } from 'three';
|
|
3
|
+
import type { ObjectReadySource, OnObjectDispose, OnObjectReady } from '../types/objectReady';
|
|
4
|
+
/**
|
|
5
|
+
* Report a component's root Object3D to its parent, and report it again on the
|
|
6
|
+
* way out.
|
|
7
|
+
*
|
|
8
|
+
* Fires `onObjectReady(source, ref.current)` once the ref is populated, and
|
|
9
|
+
* `onObjectDispose(source, ref.current)` when the component unmounts or the ref
|
|
10
|
+
* points somewhere else. The callbacks are read through a ref, so passing an
|
|
11
|
+
* inline arrow function from the parent does not cause the pair to re-fire on
|
|
12
|
+
* every render.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useObjectReady(ref: RefObject<Object3D | null>, source: ObjectReadySource, onObjectReady?: OnObjectReady, onObjectDispose?: OnObjectDispose): void;
|
|
15
|
+
/**
|
|
16
|
+
* The imperative counterpart to {@link useObjectReady}, for components that
|
|
17
|
+
* create their Object3D inside an effect rather than through JSX — there is no
|
|
18
|
+
* ref for the layout effect to watch, and by the time the object exists the
|
|
19
|
+
* layout effect has already run.
|
|
20
|
+
*
|
|
21
|
+
* Returns two stable callables, so they can be used inside an effect without
|
|
22
|
+
* appearing in its dependency array.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useObjectReadyReporter(source: ObjectReadySource, onObjectReady?: OnObjectReady, onObjectDispose?: OnObjectDispose): {
|
|
25
|
+
report: (object: Object3D) => void;
|
|
26
|
+
reportDisposed: (object: Object3D) => void;
|
|
27
|
+
};
|
|
28
|
+
export default useObjectReady;
|
|
29
|
+
//# sourceMappingURL=useObjectReady.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useObjectReady.d.ts","sourceRoot":"","sources":["../../src/hooks/useObjectReady.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9F;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC1B,GAAG,EAAE,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,EAC/B,MAAM,EAAE,iBAAiB,EACzB,aAAa,CAAC,EAAE,aAAa,EAC7B,eAAe,CAAC,EAAE,eAAe,GAClC,IAAI,CAoBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,iBAAiB,EACzB,aAAa,CAAC,EAAE,aAAa,EAC7B,eAAe,CAAC,EAAE,eAAe,GAClC;IAAE,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IAAC,cAAc,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAA;CAAE,CAgBpF;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useCallback, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Report a component's root Object3D to its parent, and report it again on the
|
|
4
|
+
* way out.
|
|
5
|
+
*
|
|
6
|
+
* Fires `onObjectReady(source, ref.current)` once the ref is populated, and
|
|
7
|
+
* `onObjectDispose(source, ref.current)` when the component unmounts or the ref
|
|
8
|
+
* points somewhere else. The callbacks are read through a ref, so passing an
|
|
9
|
+
* inline arrow function from the parent does not cause the pair to re-fire on
|
|
10
|
+
* every render.
|
|
11
|
+
*/
|
|
12
|
+
export function useObjectReady(ref, source, onObjectReady, onObjectDispose) {
|
|
13
|
+
const readyRef = useRef(onObjectReady);
|
|
14
|
+
const disposeRef = useRef(onObjectDispose);
|
|
15
|
+
const sourceRef = useRef(source);
|
|
16
|
+
readyRef.current = onObjectReady;
|
|
17
|
+
disposeRef.current = onObjectDispose;
|
|
18
|
+
sourceRef.current = source;
|
|
19
|
+
useLayoutEffect(() => {
|
|
20
|
+
const object = ref.current;
|
|
21
|
+
if (!object)
|
|
22
|
+
return;
|
|
23
|
+
// Capture the source at fire time so dispose reports the same pair that
|
|
24
|
+
// ready did, and so an inline object literal from the parent cannot
|
|
25
|
+
// retrigger the effect on every render.
|
|
26
|
+
const settings = sourceRef.current;
|
|
27
|
+
readyRef.current?.(settings, object);
|
|
28
|
+
return () => {
|
|
29
|
+
disposeRef.current?.(settings, object);
|
|
30
|
+
};
|
|
31
|
+
}, [ref.current]);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The imperative counterpart to {@link useObjectReady}, for components that
|
|
35
|
+
* create their Object3D inside an effect rather than through JSX — there is no
|
|
36
|
+
* ref for the layout effect to watch, and by the time the object exists the
|
|
37
|
+
* layout effect has already run.
|
|
38
|
+
*
|
|
39
|
+
* Returns two stable callables, so they can be used inside an effect without
|
|
40
|
+
* appearing in its dependency array.
|
|
41
|
+
*/
|
|
42
|
+
export function useObjectReadyReporter(source, onObjectReady, onObjectDispose) {
|
|
43
|
+
const readyRef = useRef(onObjectReady);
|
|
44
|
+
const disposeRef = useRef(onObjectDispose);
|
|
45
|
+
const sourceRef = useRef(source);
|
|
46
|
+
readyRef.current = onObjectReady;
|
|
47
|
+
disposeRef.current = onObjectDispose;
|
|
48
|
+
sourceRef.current = source;
|
|
49
|
+
const report = useCallback((object) => {
|
|
50
|
+
if (object)
|
|
51
|
+
readyRef.current?.(sourceRef.current, object);
|
|
52
|
+
}, []);
|
|
53
|
+
const reportDisposed = useCallback((object) => {
|
|
54
|
+
if (object)
|
|
55
|
+
disposeRef.current?.(sourceRef.current, object);
|
|
56
|
+
}, []);
|
|
57
|
+
return { report, reportDisposed };
|
|
58
|
+
}
|
|
59
|
+
export default useObjectReady;
|