@3driseai/3drise-viewer 0.1.2 → 0.1.3
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 -1
- package/dist/components/CreatedObject.d.ts +2 -2
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +5 -6
- 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 +29 -24
- 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 +2 -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 +3 -2
- package/dist/components/cursor/CursorEffects.d.ts.map +1 -1
- package/dist/components/cursor/CursorEffects.js +3 -1
- 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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FerrofluidCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/FerrofluidCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FerrofluidCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/FerrofluidCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAiGvE,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
5
|
-
const FerrofluidCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, }) => {
|
|
6
|
+
const FerrofluidCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
|
|
6
7
|
const groupRef = useRef(null);
|
|
8
|
+
useObjectReady(groupRef, config, onObjectReady, onObjectDispose);
|
|
7
9
|
// Base sphere geometry (kept for original vertex positions)
|
|
8
10
|
const { geometry, basePositions } = useMemo(() => {
|
|
9
11
|
const baseRadius = 0.15 * config.scale;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlyphRingCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/GlyphRingCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlyphRingCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/GlyphRingCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAyE1D,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CA+CrE,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -73,8 +74,9 @@ const fragmentShader = /* glsl */ `
|
|
|
73
74
|
gl_FragColor = vec4(col, alpha);
|
|
74
75
|
}
|
|
75
76
|
`;
|
|
76
|
-
const GlyphRingCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
|
|
77
|
+
const GlyphRingCursor = ({ config, worldPosRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
|
|
77
78
|
const meshRef = useRef(null);
|
|
79
|
+
useObjectReady(meshRef, config, onObjectReady, onObjectDispose);
|
|
78
80
|
const { camera } = useThree();
|
|
79
81
|
const hoverSmooth = useRef(0);
|
|
80
82
|
const radius = Math.max(0.3, config.ringRadius * config.scale);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightningCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/LightningCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LightningCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/LightningCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAuBrE,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import LightningEffect from '../effects/LightningEffect.js';
|
|
5
|
-
const LightningCursor = ({ config, worldPosRef, }) => {
|
|
6
|
+
const LightningCursor = ({ config, worldPosRef, onObjectReady, onObjectDispose, }) => {
|
|
6
7
|
const groupRef = useRef(null);
|
|
8
|
+
useObjectReady(groupRef, config, onObjectReady, onObjectDispose);
|
|
7
9
|
const lightningConfig = useMemo(() => ({
|
|
8
10
|
enabled: true,
|
|
9
11
|
intensity: config.intensity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiquidMetalCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/LiquidMetalCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LiquidMetalCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/LiquidMetalCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAwDzE,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
5
|
-
const LiquidMetalCursor = ({ config, worldPosRef, velocityRef, }) => {
|
|
6
|
+
const LiquidMetalCursor = ({ config, worldPosRef, velocityRef, onObjectReady, onObjectDispose, }) => {
|
|
6
7
|
const groupRef = useRef(null);
|
|
8
|
+
useObjectReady(groupRef, config, onObjectReady, onObjectDispose);
|
|
7
9
|
const meshRef = useRef(null);
|
|
8
10
|
const geometry = useMemo(() => new THREE.IcosahedronGeometry(0.18, 4), []);
|
|
9
11
|
const basePositions = useMemo(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrbCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/OrbCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrbCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/OrbCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CA2BzD,CAAC;AACF,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import OrbEffect from '../effects/OrbEffect.js';
|
|
5
|
-
const OrbCursor = ({ config, worldPosRef, idleMsRef, }) => {
|
|
6
|
+
const OrbCursor = ({ config, worldPosRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
|
|
6
7
|
const groupRef = useRef(null);
|
|
8
|
+
useObjectReady(groupRef, config, onObjectReady, onObjectDispose);
|
|
7
9
|
const orbConfig = useMemo(() => ({
|
|
8
10
|
enabled: true,
|
|
9
11
|
intensity: config.intensity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlasmaWhipCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/PlasmaWhipCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlasmaWhipCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/PlasmaWhipCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAiE1D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAkEvE,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -65,7 +66,7 @@ const fragmentShader = /* glsl */ `
|
|
|
65
66
|
gl_FragColor = vec4(col, alpha);
|
|
66
67
|
}
|
|
67
68
|
`;
|
|
68
|
-
const PlasmaWhipCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
|
|
69
|
+
const PlasmaWhipCursor = ({ config, worldPosRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
|
|
69
70
|
const N = Math.min(MAX_POINTS, Math.max(4, config.pointCount));
|
|
70
71
|
const history = useMemo(() => {
|
|
71
72
|
const arr = [];
|
|
@@ -74,6 +75,7 @@ const PlasmaWhipCursor = ({ config, worldPosRef, hoverRef, idleMsRef, }) => {
|
|
|
74
75
|
return arr;
|
|
75
76
|
}, []);
|
|
76
77
|
const meshRef = useRef(null);
|
|
78
|
+
useObjectReady(meshRef, config, onObjectReady, onObjectDispose);
|
|
77
79
|
const geometryRef = useRef(null);
|
|
78
80
|
const firstFrame = useRef(true);
|
|
79
81
|
const material = useMemo(() => new THREE.ShaderMaterial({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklesCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/SparklesCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SparklesCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/SparklesCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAkC1D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAmHnE,CAAC;AACF,eAAe,cAAc,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -34,7 +35,7 @@ const fragmentShader = /* glsl */ `
|
|
|
34
35
|
gl_FragColor = vec4(col, alpha);
|
|
35
36
|
}
|
|
36
37
|
`;
|
|
37
|
-
const SparklesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, }) => {
|
|
38
|
+
const SparklesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
|
|
38
39
|
const positions = useMemo(() => new Float32Array(MAX_PARTICLES * 3), []);
|
|
39
40
|
const velocities = useMemo(() => new Float32Array(MAX_PARTICLES * 3), []);
|
|
40
41
|
const ages = useMemo(() => new Float32Array(MAX_PARTICLES), []);
|
|
@@ -77,6 +78,8 @@ const SparklesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef,
|
|
|
77
78
|
}, [geometry, material]);
|
|
78
79
|
const lastSpawnPos = useRef(new THREE.Vector3());
|
|
79
80
|
const spawnAccum = useRef(0);
|
|
81
|
+
const rootRef = useRef(null);
|
|
82
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
80
83
|
const firstFrame = useRef(true);
|
|
81
84
|
useFrame((_, delta) => {
|
|
82
85
|
const wp = worldPosRef.current;
|
|
@@ -146,6 +149,6 @@ const SparklesCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef,
|
|
|
146
149
|
geometry.attributes.position.needsUpdate = true;
|
|
147
150
|
geometry.attributes.aAge.needsUpdate = true;
|
|
148
151
|
});
|
|
149
|
-
return _jsx("points", { geometry: geometry, material: material, frustumCulled: false });
|
|
152
|
+
return _jsx("points", { ref: rootRef, geometry: geometry, material: material, frustumCulled: false });
|
|
150
153
|
};
|
|
151
154
|
export default SparklesCursor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeslaCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/TeslaCursor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TeslaCursor.d.ts","sourceRoot":"","sources":["../../../src/components/cursor/TeslaCursor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAqF1D,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAsI7D,CAAC;AACF,eAAe,WAAW,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
5
6
|
const MAX_HISTORY = 36;
|
|
6
7
|
const TUBULAR_RES = 120;
|
|
7
8
|
const RADIAL_RES = 6;
|
|
8
|
-
// ── Source point shader ─────────────────────────────────────────────────────
|
|
9
9
|
const sourceVertex = /* glsl */ `
|
|
10
10
|
uniform float uSize;
|
|
11
11
|
uniform float uShine;
|
|
@@ -34,9 +34,6 @@ const sourceFragment = /* glsl */ `
|
|
|
34
34
|
gl_FragColor = vec4(col, alpha);
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
// ── Tesla bolt shader ───────────────────────────────────────────────────────
|
|
38
|
-
// vUv.x: 0 at tail, 1 at source (cursor). uv.y wraps the tube.
|
|
39
|
-
// Energy packets travel from source (1) toward tail (0).
|
|
40
37
|
const trailVertex = /* glsl */ `
|
|
41
38
|
varying vec2 vUv;
|
|
42
39
|
void main() {
|
|
@@ -88,8 +85,9 @@ const trailFragment = /* glsl */ `
|
|
|
88
85
|
gl_FragColor = vec4(col, alpha);
|
|
89
86
|
}
|
|
90
87
|
`;
|
|
91
|
-
const TeslaCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, }) => {
|
|
92
|
-
|
|
88
|
+
const TeslaCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, onObjectReady, onObjectDispose, }) => {
|
|
89
|
+
const ref = useRef(null);
|
|
90
|
+
useObjectReady(ref, config, onObjectReady, onObjectDispose);
|
|
93
91
|
const sourceGeom = useMemo(() => {
|
|
94
92
|
const g = new THREE.BufferGeometry();
|
|
95
93
|
g.setAttribute('position', new THREE.BufferAttribute(new Float32Array([0, 0, 0]), 3));
|
|
@@ -108,7 +106,6 @@ const TeslaCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, })
|
|
|
108
106
|
depthWrite: false,
|
|
109
107
|
blending: THREE.AdditiveBlending,
|
|
110
108
|
}), []);
|
|
111
|
-
// ── Trail tube ───────────────────────────────────────────────────────────
|
|
112
109
|
const trailMeshRef = useRef(null);
|
|
113
110
|
const trailGeomRef = useRef(null);
|
|
114
111
|
const trailMat = useMemo(() => new THREE.ShaderMaterial({
|
|
@@ -218,6 +215,6 @@ const TeslaCursor = ({ config, worldPosRef, velocityRef, hoverRef, idleMsRef, })
|
|
|
218
215
|
trailGeomRef.current.dispose();
|
|
219
216
|
trailGeomRef.current = newGeo;
|
|
220
217
|
});
|
|
221
|
-
return (_jsxs(
|
|
218
|
+
return (_jsxs("group", { ref: ref, children: [_jsx("points", { geometry: sourceGeom, material: sourceMat, frustumCulled: false }), _jsx("mesh", { ref: trailMeshRef, material: trailMat, frustumCulled: false })] }));
|
|
222
219
|
};
|
|
223
220
|
export default TeslaCursor;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { ClickActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface BoltFlashActionProps {
|
|
5
|
+
interface BoltFlashActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: ClickActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoltFlashAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/BoltFlashAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoltFlashAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/BoltFlashAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AA6BD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgCnD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -28,8 +29,10 @@ const vertexShader = /* glsl */ `
|
|
|
28
29
|
gl_Position = projectionMatrix * mv;
|
|
29
30
|
}
|
|
30
31
|
`;
|
|
31
|
-
const BoltFlashAction = ({ worldPos, config, onDone }) => {
|
|
32
|
+
const BoltFlashAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
32
33
|
const startRef = useRef(null);
|
|
34
|
+
const rootRef = useRef(null);
|
|
35
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
33
36
|
const { geometry, material } = useMemo(() => {
|
|
34
37
|
const g = new THREE.BufferGeometry();
|
|
35
38
|
g.setAttribute('position', new THREE.BufferAttribute(new Float32Array([0, 0, 0]), 3));
|
|
@@ -57,6 +60,6 @@ const BoltFlashAction = ({ worldPos, config, onDone }) => {
|
|
|
57
60
|
if (p >= 1)
|
|
58
61
|
onDone();
|
|
59
62
|
});
|
|
60
|
-
return _jsx("points", { position: worldPos, geometry: geometry, material: material, frustumCulled: false });
|
|
63
|
+
return _jsx("points", { ref: rootRef, position: worldPos, geometry: geometry, material: material, frustumCulled: false });
|
|
61
64
|
};
|
|
62
65
|
export default BoltFlashAction;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { GlyphInscriptionActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface GlyphInscriptionActionProps {
|
|
5
|
+
interface GlyphInscriptionActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: GlyphInscriptionActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlyphInscriptionAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/GlyphInscriptionAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlyphInscriptionAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/GlyphInscriptionAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC1E,UAAU,2BAA4B,SAAQ,gBAAgB;IAC1D,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,4BAA4B,CAAC;IACrC,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AA6ED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAmCjE,CAAC;AACF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -76,9 +77,10 @@ const fragmentShader = /* glsl */ `
|
|
|
76
77
|
gl_FragColor = vec4(col, alpha);
|
|
77
78
|
}
|
|
78
79
|
`;
|
|
79
|
-
const GlyphInscriptionAction = ({ worldPos, config, onDone }) => {
|
|
80
|
+
const GlyphInscriptionAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
80
81
|
const startRef = useRef(null);
|
|
81
82
|
const meshRef = useRef(null);
|
|
83
|
+
useObjectReady(meshRef, config, onObjectReady, onObjectDispose);
|
|
82
84
|
const { camera, clock } = useThree();
|
|
83
85
|
const geometry = useMemo(() => new THREE.PlaneGeometry(2, 2, 1, 1), []);
|
|
84
86
|
const material = useMemo(() => new THREE.ShaderMaterial({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { ImplosionActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface ImplosionActionProps {
|
|
5
|
+
interface ImplosionActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: ImplosionActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImplosionAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/ImplosionAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImplosionAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/ImplosionAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,UAAU,oBAAqB,SAAQ,gBAAgB;IACnD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AA0DD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiCnD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -57,9 +58,10 @@ const fragmentShader = /* glsl */ `
|
|
|
57
58
|
gl_FragColor = vec4(col, alpha);
|
|
58
59
|
}
|
|
59
60
|
`;
|
|
60
|
-
const ImplosionAction = ({ worldPos, config, onDone }) => {
|
|
61
|
+
const ImplosionAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
61
62
|
const startRef = useRef(null);
|
|
62
63
|
const meshRef = useRef(null);
|
|
64
|
+
useObjectReady(meshRef, config, onObjectReady, onObjectDispose);
|
|
63
65
|
const { camera } = useThree();
|
|
64
66
|
const size = (config.scale ?? 1) * 2.5;
|
|
65
67
|
const geometry = useMemo(() => new THREE.PlaneGeometry(size, size, 1, 1), [size]);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { PhaseShiftActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface PhaseShiftActionProps {
|
|
5
|
+
interface PhaseShiftActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: PhaseShiftActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhaseShiftAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/PhaseShiftAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PhaseShiftAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/PhaseShiftAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,UAAU,qBAAsB,SAAQ,gBAAgB;IACpD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAsCD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgCrD,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -37,8 +38,10 @@ const fragmentShader = /* glsl */ `
|
|
|
37
38
|
gl_FragColor = vec4(col * (1.0 + fade * 0.4), alpha);
|
|
38
39
|
}
|
|
39
40
|
`;
|
|
40
|
-
const PhaseShiftAction = ({ worldPos, config, onDone }) => {
|
|
41
|
+
const PhaseShiftAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
41
42
|
const startRef = useRef(null);
|
|
43
|
+
const rootRef = useRef(null);
|
|
44
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
42
45
|
const { clock } = useThree();
|
|
43
46
|
const geometry = useMemo(() => new THREE.SphereGeometry(1, 36, 24), []);
|
|
44
47
|
const material = useMemo(() => new THREE.ShaderMaterial({
|
|
@@ -66,6 +69,6 @@ const PhaseShiftAction = ({ worldPos, config, onDone }) => {
|
|
|
66
69
|
if (p >= 1)
|
|
67
70
|
onDone();
|
|
68
71
|
});
|
|
69
|
-
return _jsx("mesh", { position: worldPos, geometry: geometry, material: material });
|
|
72
|
+
return _jsx("mesh", { ref: rootRef, position: worldPos, geometry: geometry, material: material });
|
|
70
73
|
};
|
|
71
74
|
export default PhaseShiftAction;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { PlasmaBombActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface PlasmaBombActionProps {
|
|
5
|
+
interface PlasmaBombActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: PlasmaBombActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlasmaBombAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/PlasmaBombAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlasmaBombAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/PlasmaBombAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,UAAU,qBAAsB,SAAQ,gBAAgB;IACpD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AA+DD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkCrD,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -62,8 +63,10 @@ const fragmentShader = /* glsl */ `
|
|
|
62
63
|
gl_FragColor = vec4(plasma * (1.0 + corona * 0.5), alpha);
|
|
63
64
|
}
|
|
64
65
|
`;
|
|
65
|
-
const PlasmaBombAction = ({ worldPos, config, onDone }) => {
|
|
66
|
+
const PlasmaBombAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
66
67
|
const startRef = useRef(null);
|
|
68
|
+
const rootRef = useRef(null);
|
|
69
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
67
70
|
const { clock } = useThree();
|
|
68
71
|
const tubeRadius = (config.ringWidth ?? 0.08);
|
|
69
72
|
const geometry = useMemo(() => new THREE.TorusGeometry(1, tubeRadius, 16, 96), [tubeRadius]);
|
|
@@ -93,6 +96,6 @@ const PlasmaBombAction = ({ worldPos, config, onDone }) => {
|
|
|
93
96
|
if (p >= 1)
|
|
94
97
|
onDone();
|
|
95
98
|
});
|
|
96
|
-
return (_jsx("mesh", { position: worldPos, rotation: [-Math.PI / 2, 0, 0], geometry: geometry, material: material }));
|
|
99
|
+
return (_jsx("mesh", { ref: rootRef, position: worldPos, rotation: [-Math.PI / 2, 0, 0], geometry: geometry, material: material }));
|
|
97
100
|
};
|
|
98
101
|
export default PlasmaBombAction;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { RealityTearActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface RealityTearActionProps {
|
|
5
|
+
interface RealityTearActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: RealityTearActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealityTearAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/RealityTearAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RealityTearAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/RealityTearAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,UAAU,sBAAuB,SAAQ,gBAAgB;IACrD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,uBAAuB,CAAC;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAgDD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA0CvD,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -47,9 +48,10 @@ const fragmentShader = /* glsl */ `
|
|
|
47
48
|
gl_FragColor = vec4(col, alpha);
|
|
48
49
|
}
|
|
49
50
|
`;
|
|
50
|
-
const RealityTearAction = ({ worldPos, config, onDone }) => {
|
|
51
|
+
const RealityTearAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
51
52
|
const startRef = useRef(null);
|
|
52
53
|
const meshRef = useRef(null);
|
|
54
|
+
useObjectReady(meshRef, config, onObjectReady, onObjectDispose);
|
|
53
55
|
const { camera, clock } = useThree();
|
|
54
56
|
const tearWidth = config.tearWidth ?? 1.6;
|
|
55
57
|
const tearHeight = config.scale ?? 1;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { ClickActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
export interface ShockwaveActionProps {
|
|
5
|
+
export interface ShockwaveActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: ClickActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShockwaveAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/ShockwaveAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShockwaveAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/ShockwaveAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC1D,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAwBD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8BnD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -23,8 +24,10 @@ const fragmentShader = /* glsl */ `
|
|
|
23
24
|
gl_FragColor = vec4(col, alpha);
|
|
24
25
|
}
|
|
25
26
|
`;
|
|
26
|
-
const ShockwaveAction = ({ worldPos, config, onDone }) => {
|
|
27
|
+
const ShockwaveAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
27
28
|
const startRef = useRef(null);
|
|
29
|
+
const rootRef = useRef(null);
|
|
30
|
+
useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
|
|
28
31
|
const geometry = useMemo(() => new THREE.TorusGeometry(1, 0.04, 8, 80), []);
|
|
29
32
|
const material = useMemo(() => new THREE.ShaderMaterial({
|
|
30
33
|
uniforms: {
|
|
@@ -50,6 +53,6 @@ const ShockwaveAction = ({ worldPos, config, onDone }) => {
|
|
|
50
53
|
if (p >= 1)
|
|
51
54
|
onDone();
|
|
52
55
|
});
|
|
53
|
-
return (_jsx("mesh", { position: worldPos, rotation: [-Math.PI / 2, 0, 0], geometry: geometry, material: material }));
|
|
56
|
+
return (_jsx("mesh", { ref: rootRef, position: worldPos, rotation: [-Math.PI / 2, 0, 0], geometry: geometry, material: material }));
|
|
54
57
|
};
|
|
55
58
|
export default ShockwaveAction;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { SparklesBurstActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface SparklesBurstActionProps {
|
|
5
|
+
interface SparklesBurstActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: SparklesBurstActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklesBurstAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/SparklesBurstAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SparklesBurstAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/SparklesBurstAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,UAAU,wBAAyB,SAAQ,gBAAgB;IACvD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AA8DD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAmC3D,CAAC;AACF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -61,9 +62,10 @@ const fragmentShader = /* glsl */ `
|
|
|
61
62
|
gl_FragColor = vec4(col, alpha);
|
|
62
63
|
}
|
|
63
64
|
`;
|
|
64
|
-
const SparklesBurstAction = ({ worldPos, config, onDone }) => {
|
|
65
|
+
const SparklesBurstAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
65
66
|
const startRef = useRef(null);
|
|
66
67
|
const meshRef = useRef(null);
|
|
68
|
+
useObjectReady(meshRef, config, onObjectReady, onObjectDispose);
|
|
67
69
|
const { camera, clock } = useThree();
|
|
68
70
|
const size = (config.scale ?? 1) * 2.5;
|
|
69
71
|
const geometry = useMemo(() => new THREE.PlaneGeometry(size, size, 1, 1), [size]);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ObjectReadyProps } from '../../../types/objectReady';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import React from "react";
|
|
3
4
|
import type { VoronoiFractureActionConfig } from "@3driseai/3drise-core";
|
|
4
|
-
interface VoronoiFractureActionProps {
|
|
5
|
+
interface VoronoiFractureActionProps extends ObjectReadyProps {
|
|
5
6
|
worldPos: THREE.Vector3;
|
|
6
7
|
config: VoronoiFractureActionConfig;
|
|
7
8
|
onDone: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoronoiFractureAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/VoronoiFractureAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VoronoiFractureAction.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/VoronoiFractureAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACzE,UAAU,0BAA2B,SAAQ,gBAAgB;IACzD,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,2BAA2B,CAAC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAuED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA4E/D,CAAC;AACF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectReady } from '../../../hooks/useObjectReady.js';
|
|
2
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
3
4
|
import { useFrame } from '@react-three/fiber';
|
|
4
5
|
import * as THREE from 'three';
|
|
@@ -70,9 +71,10 @@ const vertexShader = /* glsl */ `
|
|
|
70
71
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
71
72
|
}
|
|
72
73
|
`;
|
|
73
|
-
const VoronoiFractureAction = ({ worldPos, config, onDone }) => {
|
|
74
|
+
const VoronoiFractureAction = ({ worldPos, config, onDone, onObjectReady, onObjectDispose }) => {
|
|
74
75
|
const startRef = useRef(null);
|
|
75
76
|
const groupRef = useRef(null);
|
|
77
|
+
useObjectReady(groupRef, config, onObjectReady, onObjectDispose);
|
|
76
78
|
const COUNT = Math.max(6, Math.floor(config.shardCount ?? 24));
|
|
77
79
|
const RADIUS = config.scale ?? 1.2;
|
|
78
80
|
const { shards, geometry, material } = useMemo(() => {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { ShockwaveActionProps } from './ShockwaveAction';
|
|
2
|
+
export { default as BoltFlashAction } from './BoltFlashAction';
|
|
3
|
+
export { default as GlyphInscriptionAction } from './GlyphInscriptionAction';
|
|
4
|
+
export { default as ImplosionAction } from './ImplosionAction';
|
|
5
|
+
export { default as PhaseShiftAction } from './PhaseShiftAction';
|
|
6
|
+
export { default as PlasmaBombAction } from './PlasmaBombAction';
|
|
7
|
+
export { default as RealityTearAction } from './RealityTearAction';
|
|
8
|
+
export { default as ShockwaveAction } from './ShockwaveAction';
|
|
9
|
+
export { default as SparklesBurstAction } from './SparklesBurstAction';
|
|
10
|
+
export { default as VoronoiFractureAction } from './VoronoiFractureAction';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/cursor/clickActions/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,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,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|