@3driseai/3drise-viewer 0.1.25 → 0.1.27
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/animationsV2/ClipPlayer.d.ts +16 -0
- package/dist/animationsV2/ClipPlayer.d.ts.map +1 -0
- package/dist/animationsV2/ClipPlayer.js +199 -0
- package/dist/animationsV2/ClipsRuntime.d.ts +150 -0
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -0
- package/dist/animationsV2/ClipsRuntime.js +707 -0
- package/dist/animationsV2/appliers.d.ts +21 -0
- package/dist/animationsV2/appliers.d.ts.map +1 -0
- package/dist/animationsV2/appliers.js +222 -0
- package/dist/animationsV2/clipUtils.d.ts +33 -0
- package/dist/animationsV2/clipUtils.d.ts.map +1 -0
- package/dist/animationsV2/clipUtils.js +164 -0
- package/dist/animationsV2/elementSettings.d.ts +15 -0
- package/dist/animationsV2/elementSettings.d.ts.map +1 -0
- package/dist/animationsV2/elementSettings.js +16 -0
- package/dist/animationsV2/index.d.ts +16 -0
- package/dist/animationsV2/index.d.ts.map +1 -0
- package/dist/animationsV2/index.js +12 -0
- package/dist/animationsV2/nodeTracks.d.ts +13 -0
- package/dist/animationsV2/nodeTracks.d.ts.map +1 -0
- package/dist/animationsV2/nodeTracks.js +165 -0
- package/dist/animationsV2/normalize.d.ts +4 -0
- package/dist/animationsV2/normalize.d.ts.map +1 -0
- package/dist/animationsV2/normalize.js +60 -0
- package/dist/animationsV2/sequenceUtils.d.ts +98 -0
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -0
- package/dist/animationsV2/sequenceUtils.js +220 -0
- package/dist/animationsV2/types.d.ts +115 -0
- package/dist/animationsV2/types.d.ts.map +1 -0
- package/dist/animationsV2/types.js +8 -0
- package/dist/api/sceneHandle.d.ts +56 -17
- package/dist/api/sceneHandle.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +154 -77
- package/dist/components/AdvancedGrid.d.ts +8 -2
- package/dist/components/AdvancedGrid.d.ts.map +1 -1
- package/dist/components/AdvancedGrid.js +31 -14
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +7 -5
- package/dist/components/Bubbles.d.ts +7 -1
- package/dist/components/Bubbles.d.ts.map +1 -1
- package/dist/components/Bubbles.js +42 -22
- package/dist/components/CameraController.d.ts.map +1 -1
- package/dist/components/CameraController.js +0 -44
- package/dist/components/ChladniGrid.d.ts +8 -4
- package/dist/components/ChladniGrid.d.ts.map +1 -1
- package/dist/components/ChladniGrid.js +31 -13
- package/dist/components/CircuitGrid.d.ts +8 -11
- package/dist/components/CircuitGrid.d.ts.map +1 -1
- package/dist/components/CircuitGrid.js +31 -13
- package/dist/components/Clouds.d.ts.map +1 -1
- package/dist/components/Clouds.js +0 -34
- package/dist/components/CloudsGenerator.d.ts +1 -1
- package/dist/components/CloudsGenerator.js +1 -1
- package/dist/components/ContourGrid.d.ts +8 -14
- package/dist/components/ContourGrid.d.ts.map +1 -1
- package/dist/components/ContourGrid.js +31 -13
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +19 -1
- package/dist/components/EffectsGenerator.d.ts +7 -1
- package/dist/components/EffectsGenerator.d.ts.map +1 -1
- package/dist/components/EffectsGenerator.js +39 -38
- package/dist/components/EnvironmentManager.d.ts +4 -4
- package/dist/components/EnvironmentManager.d.ts.map +1 -1
- package/dist/components/EnvironmentManager.js +1 -1
- package/dist/components/FlowNetGrid.d.ts +8 -4
- package/dist/components/FlowNetGrid.d.ts.map +1 -1
- package/dist/components/FlowNetGrid.js +31 -13
- package/dist/components/FractalGrid.d.ts +8 -12
- package/dist/components/FractalGrid.d.ts.map +1 -1
- package/dist/components/FractalGrid.js +31 -13
- package/dist/components/GirihGrid.d.ts +8 -1
- package/dist/components/GirihGrid.d.ts.map +1 -1
- package/dist/components/GirihGrid.js +31 -13
- package/dist/components/Glyphs.d.ts +7 -1
- package/dist/components/Glyphs.d.ts.map +1 -1
- package/dist/components/Glyphs.js +40 -34
- package/dist/components/GravWaveGrid.d.ts +8 -1
- package/dist/components/GravWaveGrid.d.ts.map +1 -1
- package/dist/components/GravWaveGrid.js +31 -13
- package/dist/components/GridsGenerator.d.ts +7 -1
- package/dist/components/GridsGenerator.d.ts.map +1 -1
- package/dist/components/GridsGenerator.js +20 -18
- package/dist/components/HexGrid.d.ts +8 -10
- package/dist/components/HexGrid.d.ts.map +1 -1
- package/dist/components/HexGrid.js +31 -13
- package/dist/components/HyperbolicGrid.d.ts +8 -4
- package/dist/components/HyperbolicGrid.d.ts.map +1 -1
- package/dist/components/HyperbolicGrid.js +31 -13
- package/dist/components/LandscapeBuilder.d.ts +1 -1
- package/dist/components/LandscapeBuilder.d.ts.map +1 -1
- package/dist/components/LandscapeBuilder.js +1 -1
- package/dist/components/LandscapeObject.d.ts +1 -1
- package/dist/components/LandscapeObject.d.ts.map +1 -1
- package/dist/components/LandscapeObject.js +1 -1
- package/dist/components/MoireGrid.d.ts +8 -12
- package/dist/components/MoireGrid.d.ts.map +1 -1
- package/dist/components/MoireGrid.js +31 -13
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +2 -2
- package/dist/components/ObjectsRenderer.d.ts +4 -1
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +57 -3
- package/dist/components/Ocean.d.ts.map +1 -1
- package/dist/components/Ocean.js +0 -63
- package/dist/components/OceanBuilder.d.ts +1 -1
- package/dist/components/OceanBuilder.js +1 -1
- package/dist/components/ParticlesGenerator.d.ts.map +1 -1
- package/dist/components/ParticlesGenerator.js +6 -0
- package/dist/components/QuasiGrid.d.ts +8 -11
- package/dist/components/QuasiGrid.d.ts.map +1 -1
- package/dist/components/QuasiGrid.js +31 -13
- package/dist/components/RadarGrid.d.ts +8 -13
- package/dist/components/RadarGrid.d.ts.map +1 -1
- package/dist/components/RadarGrid.js +31 -13
- package/dist/components/ReactionDiffusionGrid.d.ts +8 -1
- package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
- package/dist/components/ReactionDiffusionGrid.js +33 -139
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +19 -4
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +0 -39
- package/dist/components/SkySystem.d.ts +1 -1
- package/dist/components/SparklesBurst.d.ts +7 -1
- package/dist/components/SparklesBurst.d.ts.map +1 -1
- package/dist/components/SparklesBurst.js +31 -28
- package/dist/components/Stars.d.ts.map +1 -1
- package/dist/components/Stars.js +3 -47
- package/dist/components/TerrainBuilder.d.ts +1 -1
- package/dist/components/TerrainBuilder.d.ts.map +1 -1
- package/dist/components/TerrainBuilder.js +1 -1
- package/dist/components/VoronoiGrid.d.ts +8 -10
- package/dist/components/VoronoiGrid.d.ts.map +1 -1
- package/dist/components/VoronoiGrid.js +31 -13
- package/dist/components/WallpaperGrid.d.ts +8 -1
- package/dist/components/WallpaperGrid.d.ts.map +1 -1
- package/dist/components/WallpaperGrid.js +33 -210
- package/dist/components/effects/AuraEffect.d.ts +8 -3
- package/dist/components/effects/AuraEffect.d.ts.map +1 -1
- package/dist/components/effects/AuraEffect.js +49 -24
- package/dist/components/effects/AuroraEffect.d.ts +8 -3
- package/dist/components/effects/AuroraEffect.d.ts.map +1 -1
- package/dist/components/effects/AuroraEffect.js +45 -25
- package/dist/components/effects/BlackHoleEffect.d.ts +8 -3
- package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -1
- package/dist/components/effects/BlackHoleEffect.js +42 -21
- package/dist/components/effects/ConstellationEffect.d.ts +8 -3
- package/dist/components/effects/ConstellationEffect.d.ts.map +1 -1
- package/dist/components/effects/ConstellationEffect.js +49 -23
- package/dist/components/effects/DandelionSeedsEffect.d.ts +7 -2
- package/dist/components/effects/DandelionSeedsEffect.d.ts.map +1 -1
- package/dist/components/effects/DandelionSeedsEffect.js +19 -9
- package/dist/components/effects/DataStreamEffect.d.ts +8 -3
- package/dist/components/effects/DataStreamEffect.d.ts.map +1 -1
- package/dist/components/effects/DataStreamEffect.js +54 -26
- package/dist/components/effects/DnaHelixEffect.d.ts +8 -3
- package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -1
- package/dist/components/effects/DnaHelixEffect.js +62 -30
- package/dist/components/effects/FallingLeavesEffect.d.ts +7 -2
- package/dist/components/effects/FallingLeavesEffect.d.ts.map +1 -1
- package/dist/components/effects/FallingLeavesEffect.js +19 -9
- package/dist/components/effects/FieldLinesEffect.d.ts +8 -3
- package/dist/components/effects/FieldLinesEffect.d.ts.map +1 -1
- package/dist/components/effects/FieldLinesEffect.js +30 -20
- package/dist/components/effects/Fire.d.ts +8 -3
- package/dist/components/effects/Fire.d.ts.map +1 -1
- package/dist/components/effects/Fire.js +47 -10
- package/dist/components/effects/FireflySwarmEffect.d.ts +7 -2
- package/dist/components/effects/FireflySwarmEffect.d.ts.map +1 -1
- package/dist/components/effects/FireflySwarmEffect.js +19 -9
- package/dist/components/effects/Flares.d.ts +10 -3
- package/dist/components/effects/Flares.d.ts.map +1 -1
- package/dist/components/effects/Flares.js +53 -56
- package/dist/components/effects/ForcefieldEffect.d.ts +8 -3
- package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -1
- package/dist/components/effects/ForcefieldEffect.js +52 -33
- package/dist/components/effects/GalaxyEffect.d.ts +7 -2
- package/dist/components/effects/GalaxyEffect.d.ts.map +1 -1
- package/dist/components/effects/GalaxyEffect.js +19 -9
- package/dist/components/effects/HarmonicShellEffect.d.ts +8 -3
- package/dist/components/effects/HarmonicShellEffect.d.ts.map +1 -1
- package/dist/components/effects/HarmonicShellEffect.js +30 -22
- package/dist/components/effects/HologramEffect.d.ts +8 -3
- package/dist/components/effects/HologramEffect.d.ts.map +1 -1
- package/dist/components/effects/HologramEffect.js +52 -23
- package/dist/components/effects/IceCrystalsEffect.d.ts +8 -3
- package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -1
- package/dist/components/effects/IceCrystalsEffect.js +36 -21
- package/dist/components/effects/IceHaloEffect.d.ts +7 -2
- package/dist/components/effects/IceHaloEffect.d.ts.map +1 -1
- package/dist/components/effects/IceHaloEffect.js +19 -9
- package/dist/components/effects/LichtenbergEffect.d.ts +7 -2
- package/dist/components/effects/LichtenbergEffect.d.ts.map +1 -1
- package/dist/components/effects/LichtenbergEffect.js +19 -9
- package/dist/components/effects/LightningEffect.d.ts +8 -3
- package/dist/components/effects/LightningEffect.d.ts.map +1 -1
- package/dist/components/effects/LightningEffect.js +54 -32
- package/dist/components/effects/MoleculesEffect.d.ts +8 -3
- package/dist/components/effects/MoleculesEffect.d.ts.map +1 -1
- package/dist/components/effects/MoleculesEffect.js +31 -21
- package/dist/components/effects/MurmurationEffect.d.ts +7 -2
- package/dist/components/effects/MurmurationEffect.d.ts.map +1 -1
- package/dist/components/effects/MurmurationEffect.js +19 -9
- package/dist/components/effects/NeuralNetworkEffect.d.ts +8 -3
- package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -1
- package/dist/components/effects/NeuralNetworkEffect.js +66 -33
- package/dist/components/effects/OrbEffect.d.ts +8 -3
- package/dist/components/effects/OrbEffect.d.ts.map +1 -1
- package/dist/components/effects/OrbEffect.js +89 -42
- package/dist/components/effects/PlanetaryRingsEffect.d.ts +7 -2
- package/dist/components/effects/PlanetaryRingsEffect.d.ts.map +1 -1
- package/dist/components/effects/PlanetaryRingsEffect.js +19 -9
- package/dist/components/effects/PortalEffect.d.ts +8 -3
- package/dist/components/effects/PortalEffect.d.ts.map +1 -1
- package/dist/components/effects/PortalEffect.js +41 -25
- package/dist/components/effects/ShockwaveEffect.d.ts +7 -2
- package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
- package/dist/components/effects/ShockwaveEffect.js +19 -9
- package/dist/components/effects/SmokePlumeEffect.d.ts +8 -3
- package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -1
- package/dist/components/effects/SmokePlumeEffect.js +30 -20
- package/dist/components/effects/SmokeRibbon.d.ts +8 -2
- package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
- package/dist/components/effects/SmokeRibbon.js +34 -24
- package/dist/components/effects/SmokeRingEffect.d.ts +8 -3
- package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -1
- package/dist/components/effects/SmokeRingEffect.js +33 -21
- package/dist/components/effects/StrangeAttractorEffect.d.ts +8 -3
- package/dist/components/effects/StrangeAttractorEffect.d.ts.map +1 -1
- package/dist/components/effects/StrangeAttractorEffect.js +30 -20
- package/dist/components/effects/VolumetricFogEffect.d.ts +8 -3
- package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -1
- package/dist/components/effects/VolumetricFogEffect.js +38 -20
- package/dist/components/effects/WaterCausticsEffect.d.ts +7 -2
- package/dist/components/effects/WaterCausticsEffect.d.ts.map +1 -1
- package/dist/components/effects/WaterCausticsEffect.js +19 -9
- package/dist/components/effects/index.d.ts +0 -1
- package/dist/components/effects/index.d.ts.map +1 -1
- package/dist/components/effects/index.js +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/components/landscape/LandscapeMesh.js +1 -1
- package/dist/components/landscape/types.d.ts +1 -1
- package/dist/components/landscape/types.d.ts.map +1 -1
- package/dist/components/particles/MagneticBottleParticles.d.ts +17 -0
- package/dist/components/particles/MagneticBottleParticles.d.ts.map +1 -0
- package/dist/components/particles/MagneticBottleParticles.js +618 -0
- package/dist/components/particles/ShapeBurstParticles.d.ts +17 -0
- package/dist/components/particles/ShapeBurstParticles.d.ts.map +1 -0
- package/dist/components/particles/ShapeBurstParticles.js +588 -0
- package/dist/components/particles/ShapeFlowParticles.d.ts +17 -0
- package/dist/components/particles/ShapeFlowParticles.d.ts.map +1 -0
- package/dist/components/particles/ShapeFlowParticles.js +755 -0
- package/dist/components/particles/index.d.ts +6 -0
- package/dist/components/particles/index.d.ts.map +1 -1
- package/dist/components/particles/index.js +3 -0
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +0 -5
- package/dist/components/terrain/types.d.ts +1 -1
- package/dist/components/terrain/types.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.js +0 -6
- package/dist/components/volumetricClouds/types.d.ts +1 -1
- package/dist/components/volumetricClouds/types.d.ts.map +1 -1
- package/dist/components/water/types.d.ts +1 -1
- package/dist/components/water/types.d.ts.map +1 -1
- 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 +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/useConfigDriver.d.ts +22 -0
- package/dist/hooks/useConfigDriver.d.ts.map +1 -0
- package/dist/hooks/useConfigDriver.js +43 -0
- package/dist/hooks/useConfigLive.d.ts +1 -1
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/hooks/useInteraction.d.ts +6 -7
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +87 -268
- package/dist/hooks/useLandscapeMaps.d.ts +1 -1
- package/dist/hooks/useLandscapeMaps.d.ts.map +1 -1
- package/dist/hooks/useObjectAnimation.d.ts.map +1 -1
- package/dist/hooks/useObjectAnimation.js +0 -2
- package/dist/hooks/useOceanMaterial.d.ts +1 -1
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +0 -5
- package/dist/hooks/useRuntimeSettings.d.ts +1 -1
- package/dist/hooks/useRuntimeSettings.js +1 -1
- package/dist/hooks/useThunder.d.ts +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/interactions/index.d.ts +4 -0
- package/dist/interactions/index.d.ts.map +1 -0
- package/dist/interactions/index.js +1 -0
- package/dist/interactions/runner.d.ts +24 -0
- package/dist/interactions/runner.d.ts.map +1 -0
- package/dist/interactions/runner.js +46 -0
- package/dist/operations/catalogue/curlSmoke.d.ts +3 -0
- package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -0
- package/dist/operations/catalogue/curlSmoke.js +178 -0
- package/dist/operations/catalogue/displayImage.d.ts +3 -0
- package/dist/operations/catalogue/displayImage.d.ts.map +1 -0
- package/dist/operations/catalogue/displayImage.js +40 -0
- package/dist/operations/catalogue/dissolve.d.ts +3 -0
- package/dist/operations/catalogue/dissolve.d.ts.map +1 -0
- package/dist/operations/catalogue/dissolve.js +57 -0
- package/dist/operations/catalogue/emberAsh.d.ts +3 -0
- package/dist/operations/catalogue/emberAsh.d.ts.map +1 -0
- package/dist/operations/catalogue/emberAsh.js +171 -0
- package/dist/operations/catalogue/fade.d.ts +3 -0
- package/dist/operations/catalogue/fade.d.ts.map +1 -0
- package/dist/operations/catalogue/fade.js +45 -0
- package/dist/operations/catalogue/flip.d.ts +3 -0
- package/dist/operations/catalogue/flip.d.ts.map +1 -0
- package/dist/operations/catalogue/flip.js +69 -0
- package/dist/operations/catalogue/flock.d.ts +3 -0
- package/dist/operations/catalogue/flock.d.ts.map +1 -0
- package/dist/operations/catalogue/flock.js +163 -0
- package/dist/operations/catalogue/focus.d.ts +3 -0
- package/dist/operations/catalogue/focus.d.ts.map +1 -0
- package/dist/operations/catalogue/focus.js +23 -0
- package/dist/operations/catalogue/frame.d.ts +3 -0
- package/dist/operations/catalogue/frame.d.ts.map +1 -0
- package/dist/operations/catalogue/frame.js +44 -0
- package/dist/operations/catalogue/frost.d.ts +3 -0
- package/dist/operations/catalogue/frost.d.ts.map +1 -0
- package/dist/operations/catalogue/frost.js +111 -0
- package/dist/operations/catalogue/fxInstances.d.ts +21 -0
- package/dist/operations/catalogue/fxInstances.d.ts.map +1 -0
- package/dist/operations/catalogue/fxInstances.js +47 -0
- package/dist/operations/catalogue/fxPoints.d.ts +22 -0
- package/dist/operations/catalogue/fxPoints.d.ts.map +1 -0
- package/dist/operations/catalogue/fxPoints.js +70 -0
- package/dist/operations/catalogue/glow.d.ts +3 -0
- package/dist/operations/catalogue/glow.d.ts.map +1 -0
- package/dist/operations/catalogue/glow.js +50 -0
- package/dist/operations/catalogue/heatCracks.d.ts +3 -0
- package/dist/operations/catalogue/heatCracks.d.ts.map +1 -0
- package/dist/operations/catalogue/heatCracks.js +134 -0
- package/dist/operations/catalogue/hologram.d.ts +3 -0
- package/dist/operations/catalogue/hologram.d.ts.map +1 -0
- package/dist/operations/catalogue/hologram.js +118 -0
- package/dist/operations/catalogue/inkBloom.d.ts +3 -0
- package/dist/operations/catalogue/inkBloom.d.ts.map +1 -0
- package/dist/operations/catalogue/inkBloom.js +156 -0
- package/dist/operations/catalogue/ivy.d.ts +13 -0
- package/dist/operations/catalogue/ivy.d.ts.map +1 -0
- package/dist/operations/catalogue/ivy.js +469 -0
- package/dist/operations/catalogue/jelly.d.ts +3 -0
- package/dist/operations/catalogue/jelly.d.ts.map +1 -0
- package/dist/operations/catalogue/jelly.js +50 -0
- package/dist/operations/catalogue/kintsugi.d.ts +3 -0
- package/dist/operations/catalogue/kintsugi.d.ts.map +1 -0
- package/dist/operations/catalogue/kintsugi.js +173 -0
- package/dist/operations/catalogue/lidarScan.d.ts +3 -0
- package/dist/operations/catalogue/lidarScan.d.ts.map +1 -0
- package/dist/operations/catalogue/lidarScan.js +240 -0
- package/dist/operations/catalogue/liquidMetal.d.ts +3 -0
- package/dist/operations/catalogue/liquidMetal.d.ts.map +1 -0
- package/dist/operations/catalogue/liquidMetal.js +122 -0
- package/dist/operations/catalogue/materialFx.d.ts +6 -0
- package/dist/operations/catalogue/materialFx.d.ts.map +1 -0
- package/dist/operations/catalogue/materialFx.js +13 -0
- package/dist/operations/catalogue/metalize.d.ts +3 -0
- package/dist/operations/catalogue/metalize.d.ts.map +1 -0
- package/dist/operations/catalogue/metalize.js +135 -0
- package/dist/operations/catalogue/moveToFront.d.ts +3 -0
- package/dist/operations/catalogue/moveToFront.d.ts.map +1 -0
- package/dist/operations/catalogue/moveToFront.js +26 -0
- package/dist/operations/catalogue/orbit.d.ts +3 -0
- package/dist/operations/catalogue/orbit.d.ts.map +1 -0
- package/dist/operations/catalogue/orbit.js +29 -0
- package/dist/operations/catalogue/particleSwarm.d.ts +3 -0
- package/dist/operations/catalogue/particleSwarm.d.ts.map +1 -0
- package/dist/operations/catalogue/particleSwarm.js +138 -0
- package/dist/operations/catalogue/petalPeel.d.ts +3 -0
- package/dist/operations/catalogue/petalPeel.d.ts.map +1 -0
- package/dist/operations/catalogue/petalPeel.js +137 -0
- package/dist/operations/catalogue/petrify.d.ts +3 -0
- package/dist/operations/catalogue/petrify.d.ts.map +1 -0
- package/dist/operations/catalogue/petrify.js +94 -0
- package/dist/operations/catalogue/portal.d.ts +3 -0
- package/dist/operations/catalogue/portal.d.ts.map +1 -0
- package/dist/operations/catalogue/portal.js +224 -0
- package/dist/operations/catalogue/print3d.d.ts +3 -0
- package/dist/operations/catalogue/print3d.d.ts.map +1 -0
- package/dist/operations/catalogue/print3d.js +275 -0
- package/dist/operations/catalogue/rainBeads.d.ts +3 -0
- package/dist/operations/catalogue/rainBeads.d.ts.map +1 -0
- package/dist/operations/catalogue/rainBeads.js +223 -0
- package/dist/operations/catalogue/restPose.d.ts +21 -0
- package/dist/operations/catalogue/restPose.d.ts.map +1 -0
- package/dist/operations/catalogue/restPose.js +55 -0
- package/dist/operations/catalogue/rimLight.d.ts +3 -0
- package/dist/operations/catalogue/rimLight.d.ts.map +1 -0
- package/dist/operations/catalogue/rimLight.js +72 -0
- package/dist/operations/catalogue/sandErosion.d.ts +3 -0
- package/dist/operations/catalogue/sandErosion.d.ts.map +1 -0
- package/dist/operations/catalogue/sandErosion.js +167 -0
- package/dist/operations/catalogue/shaderLayers.d.ts +74 -0
- package/dist/operations/catalogue/shaderLayers.d.ts.map +1 -0
- package/dist/operations/catalogue/shaderLayers.js +322 -0
- package/dist/operations/catalogue/shatter.d.ts +3 -0
- package/dist/operations/catalogue/shatter.d.ts.map +1 -0
- package/dist/operations/catalogue/shatter.js +267 -0
- package/dist/operations/catalogue/silkDrape.d.ts +3 -0
- package/dist/operations/catalogue/silkDrape.d.ts.map +1 -0
- package/dist/operations/catalogue/silkDrape.js +340 -0
- package/dist/operations/catalogue/spin.d.ts +3 -0
- package/dist/operations/catalogue/spin.d.ts.map +1 -0
- package/dist/operations/catalogue/spin.js +42 -0
- package/dist/operations/catalogue/surfaceSample.d.ts +17 -0
- package/dist/operations/catalogue/surfaceSample.d.ts.map +1 -0
- package/dist/operations/catalogue/surfaceSample.js +187 -0
- package/dist/operations/catalogue/swirl.d.ts +3 -0
- package/dist/operations/catalogue/swirl.d.ts.map +1 -0
- package/dist/operations/catalogue/swirl.js +69 -0
- package/dist/operations/catalogue/teleport.d.ts +3 -0
- package/dist/operations/catalogue/teleport.d.ts.map +1 -0
- package/dist/operations/catalogue/teleport.js +213 -0
- package/dist/operations/catalogue/transitionField.d.ts +124 -0
- package/dist/operations/catalogue/transitionField.d.ts.map +1 -0
- package/dist/operations/catalogue/transitionField.js +278 -0
- package/dist/operations/catalogue/unweave.d.ts +3 -0
- package/dist/operations/catalogue/unweave.d.ts.map +1 -0
- package/dist/operations/catalogue/unweave.js +233 -0
- package/dist/operations/catalogue/visibility.d.ts +3 -0
- package/dist/operations/catalogue/visibility.d.ts.map +1 -0
- package/dist/operations/catalogue/visibility.js +25 -0
- package/dist/operations/catalogue/voxelize.d.ts +3 -0
- package/dist/operations/catalogue/voxelize.d.ts.map +1 -0
- package/dist/operations/catalogue/voxelize.js +148 -0
- package/dist/operations/catalogue/warmup.d.ts +22 -0
- package/dist/operations/catalogue/warmup.d.ts.map +1 -0
- package/dist/operations/catalogue/warmup.js +106 -0
- package/dist/operations/catalogue/zoom.d.ts +3 -0
- package/dist/operations/catalogue/zoom.d.ts.map +1 -0
- package/dist/operations/catalogue/zoom.js +33 -0
- package/dist/operations/index.d.ts +7 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +6 -0
- package/dist/operations/objectEffects.d.ts +46 -0
- package/dist/operations/objectEffects.d.ts.map +1 -0
- package/dist/operations/objectEffects.js +136 -0
- package/dist/operations/registry.d.ts +16 -0
- package/dist/operations/registry.d.ts.map +1 -0
- package/dist/operations/registry.js +63 -0
- package/dist/operations/runtime.d.ts +60 -0
- package/dist/operations/runtime.d.ts.map +1 -0
- package/dist/operations/runtime.js +317 -0
- package/dist/operations/types.d.ts +122 -0
- package/dist/operations/types.d.ts.map +1 -0
- package/dist/operations/types.js +9 -0
- package/dist/operations/useObjectEffectLayers.d.ts +4 -0
- package/dist/operations/useObjectEffectLayers.d.ts.map +1 -0
- package/dist/operations/useObjectEffectLayers.js +42 -0
- package/dist/operations/useOperationsRuntime.d.ts +3 -0
- package/dist/operations/useOperationsRuntime.d.ts.map +1 -0
- package/dist/operations/useOperationsRuntime.js +69 -0
- package/dist/presets/landscapePresets.d.ts +1 -1
- package/dist/presets/landscapePresets.d.ts.map +1 -1
- package/dist/presets/landscapePresets.js +1 -1
- package/dist/presets/landscapeTypes.d.ts +1 -1
- package/dist/presets/landscapeTypes.d.ts.map +1 -1
- package/dist/presets/landscapeTypes.js +1 -1
- package/dist/presets/oceanSurfacePresets.d.ts +1 -1
- package/dist/presets/terrainPresets.d.ts +1 -1
- package/dist/presets/terrainPresets.d.ts.map +1 -1
- package/dist/presets/volumetricCloudPresets.d.ts +1 -1
- package/dist/types/cloudConfigs.d.ts +2 -309
- package/dist/types/cloudConfigs.d.ts.map +1 -1
- package/dist/types/cloudConfigs.js +2 -339
- package/dist/types/index.d.ts +8 -8
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/landscapeConfigs.d.ts +2 -217
- package/dist/types/landscapeConfigs.d.ts.map +1 -1
- package/dist/types/landscapeConfigs.js +2 -256
- package/dist/types/oceanConfigs.d.ts +2 -289
- package/dist/types/oceanConfigs.d.ts.map +1 -1
- package/dist/types/oceanConfigs.js +2 -380
- package/dist/types/terrainConfigs.d.ts +2 -250
- package/dist/types/terrainConfigs.d.ts.map +1 -1
- package/dist/types/terrainConfigs.js +2 -292
- package/dist/utils/cloudUniforms.d.ts +1 -1
- package/dist/utils/configAnimations.d.ts +6 -0
- package/dist/utils/configAnimations.d.ts.map +1 -1
- package/dist/utils/configAnimations.js +14 -0
- package/dist/utils/gridConfig.d.ts +19 -0
- package/dist/utils/gridConfig.d.ts.map +1 -0
- package/dist/utils/gridConfig.js +52 -0
- package/dist/utils/handleCloudsAnimations.d.ts +1 -1
- package/dist/utils/handleCloudsAnimations.js +1 -1
- package/dist/utils/hasHoverAnimation.d.ts.map +1 -1
- package/dist/utils/hasHoverAnimation.js +0 -2
- package/dist/utils/landscapeUniforms.d.ts +1 -1
- package/dist/utils/landscapeUniforms.d.ts.map +1 -1
- package/dist/utils/oceanUniforms.d.ts +1 -1
- package/dist/utils/particleShape.d.ts +33 -0
- package/dist/utils/particleShape.d.ts.map +1 -0
- package/dist/utils/particleShape.js +207 -0
- package/dist/utils/particleTrails.d.ts.map +1 -1
- package/dist/utils/particleTrails.js +29 -14
- package/dist/utils/terrainUniforms.d.ts +1 -1
- package/dist/utils/terrainUniforms.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,283 +1,102 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* useInteraction.
|
|
2
|
+
* useInteraction — runs an object's interactions.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* An interaction (core `Interaction`) is a trigger plus three kinds of reaction,
|
|
5
|
+
* run in this order:
|
|
6
|
+
*
|
|
7
|
+
* effects operations on their targets, through the shared operations runtime
|
|
8
|
+
* (../operations) — a triggered interaction toggles an operation that
|
|
9
|
+
* can be undone, and applies one that can't. 'self' = the object the
|
|
10
|
+
* interaction is on.
|
|
11
|
+
* animations play / pause / stop / toggle a clip or a sequence (ClipsRuntime).
|
|
12
|
+
* play starts from the beginning, or resumes if paused; toggle plays
|
|
13
|
+
* forward, then back — "back" is the opposite of a sequence's own
|
|
14
|
+
* reverse.
|
|
15
|
+
* actions apply / revert / toggle an action (SceneActions; its own effects
|
|
16
|
+
* run through the same runtime).
|
|
9
17
|
*/
|
|
10
|
-
import { useCallback, useRef } from 'react';
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const { animateCamera } = useCameraAnimation({
|
|
32
|
-
autoAnimate: false,
|
|
33
|
-
defaultDuration: 1,
|
|
34
|
-
defaultEase: "power2.out"
|
|
35
|
-
});
|
|
36
|
-
const { moveToFront, zoomToFrame, restoreOriginalTransform, restoreCamera } = useFrameAnimations(cameraSettings);
|
|
37
|
-
const { vanishObject, restoreVanishedObject, animateGlowEffect, removeGlow, isVanished, isGlowing, glowingObjects, vanishedObjects, } = useObjectEffects();
|
|
38
|
-
// ===========================================================================
|
|
39
|
-
// UTILITY: Resolve Target Objects
|
|
40
|
-
// ===========================================================================
|
|
41
|
-
const resolveTargets = useCallback((interaction, currentRef) => {
|
|
42
|
-
const { targetIds, targetMode } = interaction;
|
|
43
|
-
// If no targetIds specified, return current object only
|
|
44
|
-
if (!targetIds || targetIds.length === 0) {
|
|
45
|
-
return [currentRef];
|
|
46
|
-
}
|
|
47
|
-
const targetRefs = [];
|
|
48
|
-
// Add current object if mode is 'add'
|
|
49
|
-
if (targetMode === 'add') {
|
|
50
|
-
targetRefs.push(currentRef);
|
|
51
|
-
}
|
|
52
|
-
// Lookup targets from scene
|
|
53
|
-
targetIds.forEach(id => {
|
|
54
|
-
const obj = findById(id);
|
|
55
|
-
if (obj) {
|
|
56
|
-
targetRefs.push(obj);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
return targetRefs.length > 0 ? targetRefs : [currentRef];
|
|
18
|
+
import { useCallback, useMemo, useRef } from 'react';
|
|
19
|
+
import { SceneActions } from '@3driseai/3drise-core';
|
|
20
|
+
import ClipsRuntime from '../animationsV2/ClipsRuntime.js';
|
|
21
|
+
import { clipMap } from '../animationsV2/sequenceUtils.js';
|
|
22
|
+
import { runEffect } from '../operations/runtime.js';
|
|
23
|
+
import { useOperationsRuntime } from '../operations/useOperationsRuntime.js';
|
|
24
|
+
export function useInteraction({ cameraSettings, sequences = [], clips = [], actionSequences = [], }) {
|
|
25
|
+
// The scene's operation tools (camera, bring-to-front…) for the shared runtime.
|
|
26
|
+
useOperationsRuntime(cameraSettings);
|
|
27
|
+
// Toggle state: animation ids whose last toggle went "forward".
|
|
28
|
+
const toggledRef = useRef(new Set());
|
|
29
|
+
const clipsById = useMemo(() => clipMap(clips), [clips]);
|
|
30
|
+
/** First trigger → forward (false), next → back (true), … per key. */
|
|
31
|
+
const nextIsBack = useCallback((key) => {
|
|
32
|
+
const toggled = toggledRef.current;
|
|
33
|
+
const back = toggled.has(key);
|
|
34
|
+
if (back)
|
|
35
|
+
toggled.delete(key);
|
|
36
|
+
else
|
|
37
|
+
toggled.add(key);
|
|
38
|
+
return back;
|
|
60
39
|
}, []);
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// it makes that interaction's animations and actions two-state. Animations play
|
|
66
|
-
// forward then reversed; actions apply then revert (their patches are removed).
|
|
67
|
-
const triggerAnimations = useCallback((animationIds, toggle = false) => {
|
|
68
|
-
if (!animationIds || animationIds.length === 0)
|
|
40
|
+
// ---------------------------------------------------------------- run
|
|
41
|
+
const executeInteraction = useCallback((params) => {
|
|
42
|
+
const { interaction, ref } = params;
|
|
43
|
+
if (!interaction?.enabled)
|
|
69
44
|
return;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
45
|
+
// 1. Effects — each on its own targets.
|
|
46
|
+
for (const effect of interaction.effects ?? [])
|
|
47
|
+
runEffect(effect, 'trigger', ref);
|
|
48
|
+
// 2. Animations.
|
|
49
|
+
for (const a of interaction.animations ?? []) {
|
|
50
|
+
if (a.kind === 'clip') {
|
|
51
|
+
const clip = clipsById.get(a.ref);
|
|
52
|
+
if (!clip)
|
|
53
|
+
continue;
|
|
54
|
+
if (a.command === 'pause')
|
|
55
|
+
ClipsRuntime.pause(clip.id);
|
|
56
|
+
else if (a.command === 'stop')
|
|
57
|
+
ClipsRuntime.stop(clip.id);
|
|
58
|
+
else if (a.command === 'toggle')
|
|
59
|
+
ClipsRuntime.play(clip, { reverse: nextIsBack(`clip:${clip.id}`) });
|
|
60
|
+
else if (ClipsRuntime.isActive(clip.id) && !ClipsRuntime.isPlaying(clip.id) && ClipsRuntime.getTime(clip.id) < clip.duration)
|
|
61
|
+
ClipsRuntime.resume(clip.id);
|
|
62
|
+
else
|
|
63
|
+
ClipsRuntime.play(clip, { from: 0 });
|
|
77
64
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
// ===========================================================================
|
|
90
|
-
const triggerActions = useCallback((actionIds, toggle = false) => {
|
|
91
|
-
if (!actionIds || actionIds.length === 0)
|
|
92
|
-
return;
|
|
93
|
-
actionIds.forEach(actionId => {
|
|
94
|
-
const action = actionSequences.find(a => a.id === actionId);
|
|
95
|
-
if (!action)
|
|
96
|
-
return;
|
|
97
|
-
if (toggle)
|
|
98
|
-
SceneActions.toggleAction(action);
|
|
99
|
-
else
|
|
100
|
-
SceneActions.applyAction(action);
|
|
101
|
-
});
|
|
102
|
-
}, [actionSequences]);
|
|
103
|
-
// ===========================================================================
|
|
104
|
-
// UTILITY: Execute Single Operation
|
|
105
|
-
// ===========================================================================
|
|
106
|
-
const executeOperation = useCallback(async (operation, ref, createdObject, textureUrl) => {
|
|
107
|
-
if (!operation || operation === 'none')
|
|
108
|
-
return;
|
|
109
|
-
const defaultDuration = 1.0;
|
|
110
|
-
const defaultEase = "power2.out";
|
|
111
|
-
const defaultDistance = 2.0;
|
|
112
|
-
const isCurrentlySelected = currentAnimatedRef.current !== null;
|
|
113
|
-
const isSameObject = currentAnimatedRef.current?.uuid === ref.uuid;
|
|
114
|
-
switch (operation) {
|
|
115
|
-
case 'vanish': {
|
|
116
|
-
if (isVanished(ref.uuid)) {
|
|
117
|
-
restoreVanishedObject(ref, defaultDuration, defaultEase);
|
|
65
|
+
else {
|
|
66
|
+
const seq = sequences.find(s => s.id === a.ref);
|
|
67
|
+
if (!seq)
|
|
68
|
+
continue;
|
|
69
|
+
if (a.command === 'pause')
|
|
70
|
+
ClipsRuntime.pauseSequence(seq.id);
|
|
71
|
+
else if (a.command === 'stop')
|
|
72
|
+
ClipsRuntime.stopSequence(seq.id);
|
|
73
|
+
else if (a.command === 'toggle') {
|
|
74
|
+
const back = nextIsBack(`seq:${seq.id}`);
|
|
75
|
+
ClipsRuntime.playSequence(seq, clipsById, { reverse: back ? !seq.reverse : seq.reverse });
|
|
118
76
|
}
|
|
119
|
-
else {
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
case 'glow': {
|
|
125
|
-
if (isGlowing(ref.uuid)) {
|
|
126
|
-
removeGlow(ref);
|
|
77
|
+
else if (ClipsRuntime.isSequenceActive(seq.id) && !ClipsRuntime.isSequencePlaying(seq.id) && ClipsRuntime.getSequenceProgress(seq.id) < 1) {
|
|
78
|
+
ClipsRuntime.resumeSequence(seq.id);
|
|
127
79
|
}
|
|
128
80
|
else {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
case 'focus': {
|
|
134
|
-
animateCamera({}, defaultDuration, defaultEase, createdObject.meshSettings.position);
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
case 'moveToFront': {
|
|
138
|
-
// Toggle: if clicking the same object, restore it
|
|
139
|
-
if (isCurrentlySelected && isSameObject) {
|
|
140
|
-
restoreOriginalTransform(currentAnimatedRef.current, {
|
|
141
|
-
duration: defaultDuration,
|
|
142
|
-
ease: defaultEase
|
|
143
|
-
});
|
|
144
|
-
currentAnimatedRef.current = null;
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
// Restore previous object if different
|
|
148
|
-
if (isCurrentlySelected && !isSameObject) {
|
|
149
|
-
restoreOriginalTransform(currentAnimatedRef.current, {
|
|
150
|
-
duration: defaultDuration,
|
|
151
|
-
ease: defaultEase
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
// Apply new animation
|
|
155
|
-
moveToFront(ref, {
|
|
156
|
-
distance: defaultDistance,
|
|
157
|
-
scale: [6, 4],
|
|
158
|
-
duration: defaultDuration,
|
|
159
|
-
ease: defaultEase
|
|
160
|
-
});
|
|
161
|
-
currentAnimatedRef.current = ref;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
case 'zoom': {
|
|
165
|
-
// Toggle: if clicking the same object, restore camera
|
|
166
|
-
if (isCurrentlySelected && isSameObject) {
|
|
167
|
-
restoreCamera({ duration: defaultDuration, ease: defaultEase });
|
|
168
|
-
currentAnimatedRef.current = null;
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
// Restore previous camera if different object
|
|
172
|
-
if (isCurrentlySelected && !isSameObject) {
|
|
173
|
-
restoreCamera({ duration: defaultDuration, ease: defaultEase });
|
|
174
|
-
}
|
|
175
|
-
// Apply new zoom
|
|
176
|
-
zoomToFrame(ref, {
|
|
177
|
-
distance: defaultDistance,
|
|
178
|
-
duration: defaultDuration,
|
|
179
|
-
ease: defaultEase
|
|
180
|
-
});
|
|
181
|
-
currentAnimatedRef.current = ref;
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
case 'playAnimation':
|
|
185
|
-
// Handled by triggerAnimations
|
|
186
|
-
break;
|
|
187
|
-
case 'displayImage': {
|
|
188
|
-
if (!textureUrl)
|
|
189
|
-
break;
|
|
190
|
-
let applier;
|
|
191
|
-
let meshWithMap = null;
|
|
192
|
-
ref.traverse((child) => {
|
|
193
|
-
if (!applier && typeof child.userData?.applyTexture === 'function') {
|
|
194
|
-
applier = child.userData.applyTexture;
|
|
195
|
-
}
|
|
196
|
-
else if (!meshWithMap && child.material) {
|
|
197
|
-
meshWithMap = child;
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
if (applier) {
|
|
201
|
-
applier(textureUrl);
|
|
81
|
+
// From the start edge of its own direction.
|
|
82
|
+
const total = ClipsRuntime.getSequenceDuration(seq.id);
|
|
83
|
+
ClipsRuntime.playSequence(seq, clipsById, { from: seq.reverse && total > 0 ? total : 0 });
|
|
202
84
|
}
|
|
203
|
-
else if (meshWithMap) {
|
|
204
|
-
const name = textureUrl.split('/').pop()?.split('.')[0] || `texture-${Date.now()}`;
|
|
205
|
-
try {
|
|
206
|
-
const loaded = await texturesManager.loadTexture(name, textureUrl, 'images');
|
|
207
|
-
const mat = meshWithMap.material;
|
|
208
|
-
mat.map = loaded;
|
|
209
|
-
mat.needsUpdate = true;
|
|
210
|
-
}
|
|
211
|
-
catch (err) {
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
break;
|
|
215
85
|
}
|
|
216
|
-
case 'toggle':
|
|
217
|
-
// Modifier for animationIds/actionIds — handled in executeInteraction.
|
|
218
|
-
break;
|
|
219
|
-
case 'create':
|
|
220
|
-
case 'update':
|
|
221
|
-
case 'delete':
|
|
222
|
-
case 'loadProject':
|
|
223
|
-
break;
|
|
224
86
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
restoreCamera,
|
|
237
|
-
]);
|
|
238
|
-
// ===========================================================================
|
|
239
|
-
// UTILITY: Execute Multiple Operations
|
|
240
|
-
// ===========================================================================
|
|
241
|
-
const executeOperations = useCallback((operations, ref, createdObject, textureUrl) => {
|
|
242
|
-
if (!operations || operations.length === 0)
|
|
243
|
-
return;
|
|
244
|
-
operations.forEach(operation => {
|
|
245
|
-
executeOperation(operation, ref, createdObject, textureUrl);
|
|
246
|
-
});
|
|
247
|
-
}, [executeOperation]);
|
|
248
|
-
// ===========================================================================
|
|
249
|
-
// MAIN: Execute Interaction
|
|
250
|
-
// ===========================================================================
|
|
251
|
-
const executeInteraction = useCallback((params) => {
|
|
252
|
-
const { interaction, ref, createdObject } = params;
|
|
253
|
-
if (!interaction.enabled)
|
|
254
|
-
return;
|
|
255
|
-
let textureUrl = undefined;
|
|
256
|
-
if (interaction.operations?.includes('displayImage')) {
|
|
257
|
-
textureUrl = ref.userData?.url;
|
|
87
|
+
// 3. Actions.
|
|
88
|
+
for (const a of interaction.actions ?? []) {
|
|
89
|
+
const action = actionSequences.find(x => x.id === a.ref);
|
|
90
|
+
if (!action)
|
|
91
|
+
continue;
|
|
92
|
+
if (a.command === 'revert')
|
|
93
|
+
SceneActions.revertAction(action);
|
|
94
|
+
else if (a.command === 'toggle')
|
|
95
|
+
SceneActions.toggleAction(action);
|
|
96
|
+
else
|
|
97
|
+
SceneActions.applyAction(action);
|
|
258
98
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
// 2. Execute operations on each target
|
|
262
|
-
targets.forEach(targetRef => {
|
|
263
|
-
// Find the createdObject for this target (if different from original)
|
|
264
|
-
// For now, use the original createdObject for position data
|
|
265
|
-
executeOperations(interaction.operations, targetRef, createdObject, textureUrl);
|
|
266
|
-
});
|
|
267
|
-
// 3. Trigger animations and actions ('toggle' makes both two-state)
|
|
268
|
-
const toggle = interaction.operations?.includes('toggle') ?? false;
|
|
269
|
-
triggerAnimations(interaction.animationIds, toggle);
|
|
270
|
-
triggerActions(interaction.actionIds, toggle);
|
|
271
|
-
}, [resolveTargets, executeOperations, triggerAnimations, triggerActions]);
|
|
272
|
-
// ===========================================================================
|
|
273
|
-
// RETURN
|
|
274
|
-
// ===========================================================================
|
|
275
|
-
return {
|
|
276
|
-
executeInteraction,
|
|
277
|
-
// Expose refs for context to share
|
|
278
|
-
currentAnimatedRef,
|
|
279
|
-
glowingObjects,
|
|
280
|
-
vanishedObjects,
|
|
281
|
-
};
|
|
99
|
+
}, [clipsById, sequences, actionSequences, nextIsBack]);
|
|
100
|
+
return { executeInteraction };
|
|
282
101
|
}
|
|
283
102
|
export default useInteraction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DecodedHeightmap } from '../utils/landscapeTextures';
|
|
2
|
-
import type { LandscapeConfig, LandscapeQualityConfig } from '
|
|
2
|
+
import type { LandscapeConfig, LandscapeQualityConfig } from '@3driseai/3drise-core';
|
|
3
3
|
import type { LandscapeMapUniforms } from '../utils/landscapeUniforms';
|
|
4
4
|
/**
|
|
5
5
|
* Every image a landscape needs, loaded and packed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLandscapeMaps.d.ts","sourceRoot":"","sources":["../../src/hooks/useLandscapeMaps.ts"],"names":[],"mappings":"AAEA,OAAO,EAOH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useLandscapeMaps.d.ts","sourceRoot":"","sources":["../../src/hooks/useLandscapeMaps.ts"],"names":[],"mappings":"AAEA,OAAO,EAOH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEtE;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC5D,kEAAkE;IAClE,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACpC,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAA;CACrB;AA4CD,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,sBAAsB,GAChC,kBAAkB,CAmHpB;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useObjectAnimation.d.ts","sourceRoot":"","sources":["../../src/hooks/useObjectAnimation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"useObjectAnimation.d.ts","sourceRoot":"","sources":["../../src/hooks/useObjectAnimation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,UAAU,yBAAyB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,wBAAyB,SAAQ,0BAA0B,EAAE,2BAA2B;CACjG;AAGD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,gBAAgB,qBAAqB,GAAG,IAAI,EAAE,iBAAiB,OAAO,EAAE,UAAS,yBAA8B,EAAE,SAAS,cAAc,KAAG,wBAAwB,GAAG,IAcxM,CAAC"}
|
|
@@ -3,7 +3,6 @@ import { useFrame } from '@react-three/fiber';
|
|
|
3
3
|
import { findById } from '@3driseai/3drise-core';
|
|
4
4
|
import { useContinuousEffects } from "./useContinuousEffects.js";
|
|
5
5
|
import { useMouseMove } from "./useInteractionEffects.js";
|
|
6
|
-
import { useSequenceAnimation } from "./useSequenceAnimation.js";
|
|
7
6
|
/**
|
|
8
7
|
* Drive every continuous animation for one scene object.
|
|
9
8
|
*
|
|
@@ -28,6 +27,5 @@ export const useObjectAnimation = (objectSettings, animateMaterial, options = {}
|
|
|
28
27
|
const source = object ?? fallbackRef;
|
|
29
28
|
const continuousResult = useContinuousEffects(objectSettings, { enabled, animateMaterial, hovered }, source);
|
|
30
29
|
const mouseMoveResult = useMouseMove(objectSettings, { enabled, animateMaterial }, source);
|
|
31
|
-
useSequenceAnimation(objectSettings?.id, source);
|
|
32
30
|
return { ...continuousResult, ...mouseMoveResult };
|
|
33
31
|
};
|
|
@@ -2,7 +2,7 @@ import * as THREE from 'three';
|
|
|
2
2
|
import { type RootState } from '@react-three/fiber';
|
|
3
3
|
import type { SkySettings, TimeSettings } from '@3driseai/3drise-core';
|
|
4
4
|
import { OceanSurfaceMaterial } from '../shaders/ocean/OceanSurfaceMaterial';
|
|
5
|
-
import type { OceanConfig, OceanQualityConfig } from '
|
|
5
|
+
import type { OceanConfig, OceanQualityConfig } from '@3driseai/3drise-core';
|
|
6
6
|
/**
|
|
7
7
|
* Everything the two water hosts share: the material, the live-edit handle, and
|
|
8
8
|
* the per-frame uniform push.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOceanMaterial.d.ts","sourceRoot":"","sources":["../../src/hooks/useOceanMaterial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EAChB,OAAO,GACV,EAAE,uBAAuB,GAAG,mBAAmB,CAkE/C;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from 'react';
|
|
2
2
|
import { useFrame } from '@react-three/fiber';
|
|
3
3
|
import { useCloudSun } from './useCloudSun.js';
|
|
4
|
-
import { useLiveTransitionEvents } from './useLiveTransitionEvents.js';
|
|
5
4
|
import { OCEAN_LIVE_KEY } from './useOceanLive.js';
|
|
6
5
|
import { OceanSurfaceMaterial } from '../shaders/ocean/OceanSurfaceMaterial.js';
|
|
7
6
|
import { applySunUniforms } from '../utils/cloudUniforms.js';
|
|
@@ -36,10 +35,6 @@ export function useOceanMaterial({ id, config, quality, skySettings, timeSetting
|
|
|
36
35
|
root.userData[OCEAN_LIVE_KEY] = liveHandle;
|
|
37
36
|
return () => { delete root.userData[OCEAN_LIVE_KEY]; };
|
|
38
37
|
}, [id, liveHandle]);
|
|
39
|
-
// Sequence-authored transitions (`transition.state === 'ocean'`) — shared by
|
|
40
|
-
// both hosts (OceanSurface, WaterBody), the same way the material and the
|
|
41
|
-
// live handle already are.
|
|
42
|
-
useLiveTransitionEvents('ocean', liveConfig, config, rootRef);
|
|
43
38
|
useFrame((state) => {
|
|
44
39
|
const shader = material;
|
|
45
40
|
updateSun();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* An element's settings with any applied action patches laid over them.
|
|
3
3
|
*
|
|
4
4
|
* `state` is the element's action address: its object id, or 'camera' | 'sky' |
|
|
5
|
-
* 'ocean' | 'clouds'. Subscribes to that one element only, so applying an action
|
|
5
|
+
* 'ocean' | 'clouds' | 'terrain'. Subscribes to that one element only, so applying an action
|
|
6
6
|
* re-renders the elements it touches and nothing else. With no patch applied this
|
|
7
7
|
* returns `base` itself — no copy, no identity change.
|
|
8
8
|
*
|
|
@@ -5,7 +5,7 @@ const noopUnsubscribe = () => { };
|
|
|
5
5
|
* An element's settings with any applied action patches laid over them.
|
|
6
6
|
*
|
|
7
7
|
* `state` is the element's action address: its object id, or 'camera' | 'sky' |
|
|
8
|
-
* 'ocean' | 'clouds'. Subscribes to that one element only, so applying an action
|
|
8
|
+
* 'ocean' | 'clouds' | 'terrain'. Subscribes to that one element only, so applying an action
|
|
9
9
|
* re-renders the elements it touches and nothing else. With no patch applied this
|
|
10
10
|
* returns `base` itself — no copy, no identity change.
|
|
11
11
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { FontInfo } from '@3driseai/3drise-core';
|
|
2
2
|
export { AnimationsManager as animationsManager, fontManager } from '@3driseai/3drise-core';
|
|
3
3
|
export * from './types';
|
|
4
4
|
export * from './components';
|
|
5
5
|
export * from './hooks';
|
|
6
6
|
export { createSceneHandle } from './api/sceneHandle';
|
|
7
|
-
export
|
|
7
|
+
export * from './animationsV2';
|
|
8
|
+
export * from './interactions';
|
|
9
|
+
export * from './operations';
|
|
10
|
+
export type { SceneHandle, SceneHandleEvent, SceneHandleEventType, SceneActionInfo, SceneClipInfo, SceneSequenceInfo, ScenePlayOptions, ScenePlayback } from './api/sceneHandle';
|
|
8
11
|
export type { PathAnimationOptions as PathAnimationHookOptions } from './hooks/usePathAnimation';
|
|
9
12
|
export { cameraManager } from './utils/CameraSingleton';
|
|
10
13
|
export { applyAnchorSettings, createCurves, createSunPosition, randomRange, } from './utils/utils3d';
|
|
11
14
|
export { applyAnchorSettings as applyAnchorSettingsLegacy } from './utils/anchorUtils';
|
|
12
15
|
export * from './utils/shapes';
|
|
13
|
-
export { applyGenerativeAnimations } from './utils/handleGenerativeEffectsAnimations';
|
|
14
16
|
export { hasHoverAnimation } from './utils/hasHoverAnimation';
|
|
15
17
|
export { findById } from './utils/sceneQuery';
|
|
16
18
|
export { hasFrameRenderer, registerFrameRenderer, renderFrame } from './utils/frameRenderer';
|
|
@@ -32,7 +34,7 @@ export { applyOceanUniforms, buildWaveTable, seaState } from './utils/oceanUnifo
|
|
|
32
34
|
export type { WaveTable } from './utils/oceanUniforms';
|
|
33
35
|
export { applyCameraUniforms, applyCirrusUniforms, applyDeckUniforms, applySunUniforms, applyThunderUniforms, } from './utils/cloudUniforms';
|
|
34
36
|
export { applyCloudsKeyframeAnimations, applyCloudsMouseMove, resolveDeckConfig, } from './utils/handleCloudsAnimations';
|
|
35
|
-
export { applyConfigKeyframeAnimations, applyConfigMouseMove, hasConfigOverrides, resolveConfig, } from './utils/configAnimations';
|
|
37
|
+
export { applyConfigKeyframeAnimations, applyConfigMouseMove, hasConfigOverrides, resolveConfig, withConfigDefaults, } from './utils/configAnimations';
|
|
36
38
|
export type { ConfigOverride, ConfigStartValues } from './utils/configAnimations';
|
|
37
39
|
export { volumetricCloudPresets, cirrusPresets, getCloudPresetsForType, getCloudPresetByName, getCirrusPresetByName, searchCloudPresetsByTags, } from './presets/volumetricCloudPresets';
|
|
38
40
|
export type { VolumetricCloudPreset, CirrusPreset } from './presets/volumetricCloudPresets';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAG5F,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAA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AACpC,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,EACd,eAAe,EACf,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,14 @@ export * from './components/index.js';
|
|
|
8
8
|
export * from './hooks/index.js';
|
|
9
9
|
// External control of a loaded project (ProjectLoader ref / onSceneReady)
|
|
10
10
|
export { createSceneHandle } from './api/sceneHandle.js';
|
|
11
|
+
export * from './animationsV2/index.js';
|
|
12
|
+
export * from './interactions/index.js';
|
|
13
|
+
export * from './operations/index.js';
|
|
11
14
|
// Utils
|
|
12
15
|
export { cameraManager } from './utils/CameraSingleton.js';
|
|
13
16
|
export { applyAnchorSettings, createCurves, createSunPosition, randomRange, } from './utils/utils3d.js';
|
|
14
17
|
export { applyAnchorSettings as applyAnchorSettingsLegacy } from './utils/anchorUtils.js';
|
|
15
18
|
export * from './utils/shapes.js';
|
|
16
|
-
export { applyGenerativeAnimations } from './utils/handleGenerativeEffectsAnimations.js';
|
|
17
19
|
export { hasHoverAnimation } from './utils/hasHoverAnimation.js';
|
|
18
20
|
export { findById } from './utils/sceneQuery.js';
|
|
19
21
|
export { hasFrameRenderer, registerFrameRenderer, renderFrame } from './utils/frameRenderer.js';
|
|
@@ -28,7 +30,7 @@ export { buildTextureArray, decodeHeightmap, loadImage } from './utils/landscape
|
|
|
28
30
|
export { applyOceanUniforms, buildWaveTable, seaState } from './utils/oceanUniforms.js';
|
|
29
31
|
export { applyCameraUniforms, applyCirrusUniforms, applyDeckUniforms, applySunUniforms, applyThunderUniforms, } from './utils/cloudUniforms.js';
|
|
30
32
|
export { applyCloudsKeyframeAnimations, applyCloudsMouseMove, resolveDeckConfig, } from './utils/handleCloudsAnimations.js';
|
|
31
|
-
export { applyConfigKeyframeAnimations, applyConfigMouseMove, hasConfigOverrides, resolveConfig, } from './utils/configAnimations.js';
|
|
33
|
+
export { applyConfigKeyframeAnimations, applyConfigMouseMove, hasConfigOverrides, resolveConfig, withConfigDefaults, } from './utils/configAnimations.js';
|
|
32
34
|
// Presets
|
|
33
35
|
export { volumetricCloudPresets, cirrusPresets, getCloudPresetsForType, getCloudPresetByName, getCirrusPresetByName, searchCloudPresetsByTags, } from './presets/volumetricCloudPresets.js';
|
|
34
36
|
export { terrainPresets, getTerrainPresetsForType, getTerrainPresetByName, searchTerrainPresetsByTags, } from './presets/terrainPresets.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { runInteraction, setInteractionRunner, previewInteractionEffect, setEffectPreviewer, prewarmInteractionEffect, setEffectPrewarmer, ObjectHoverContext } from './runner';
|
|
2
|
+
export type { RunOptions } from './runner';
|
|
3
|
+
export type { ObjectHoverHandler } from './runner';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAChL,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { runInteraction, setInteractionRunner, previewInteractionEffect, setEffectPreviewer, prewarmInteractionEffect, setEffectPrewarmer, ObjectHoverContext } from './runner.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CreatedObjectSettings, Interaction, OperationEffect } from '@3driseai/3drise-core';
|
|
2
|
+
/** preview: effects play and then put everything back (the studio's "Try it"). */
|
|
3
|
+
export interface RunOptions {
|
|
4
|
+
preview?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type Runner = (objectId: string, interaction: Interaction, opts?: RunOptions) => boolean;
|
|
7
|
+
type EffectPreviewer = (objectId: string, effect: OperationEffect) => Promise<boolean>;
|
|
8
|
+
type EffectPrewarmer = (objectId: string, effect: OperationEffect) => Promise<void>;
|
|
9
|
+
export declare function setInteractionRunner(next: Runner): () => void;
|
|
10
|
+
/** Run an interaction now. False when no scene is mounted or the object is not there. */
|
|
11
|
+
export declare function runInteraction(objectId: string, interaction: Interaction, opts?: RunOptions): boolean;
|
|
12
|
+
export declare function setEffectPreviewer(next: EffectPreviewer): () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Play one effect of an interaction on object `objectId` ('self' resolves to it)
|
|
15
|
+
* and bring the scene back afterwards. False when no scene is mounted.
|
|
16
|
+
*/
|
|
17
|
+
export declare function setEffectPrewarmer(next: EffectPrewarmer): () => void;
|
|
18
|
+
/** Compile an interaction effect's shaders ahead of time (no visible change), so its first play is instant. */
|
|
19
|
+
export declare function prewarmInteractionEffect(objectId: string, effect: OperationEffect): Promise<void>;
|
|
20
|
+
export declare function previewInteractionEffect(objectId: string, effect: OperationEffect): Promise<boolean>;
|
|
21
|
+
export type ObjectHoverHandler = (createdObject: CreatedObjectSettings, ref: any, trigger: 'mouseEnter' | 'mouseLeave') => void;
|
|
22
|
+
export declare const ObjectHoverContext: import("react").Context<ObjectHoverHandler>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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