@3driseai/3drise-viewer 0.1.26 → 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 +3 -0
- package/dist/animationsV2/ClipPlayer.d.ts.map +1 -1
- package/dist/animationsV2/ClipPlayer.js +67 -8
- package/dist/animationsV2/ClipsRuntime.d.ts +39 -0
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +245 -14
- package/dist/animationsV2/appliers.d.ts +5 -0
- package/dist/animationsV2/appliers.d.ts.map +1 -1
- package/dist/animationsV2/appliers.js +25 -7
- package/dist/animationsV2/index.d.ts +1 -1
- package/dist/animationsV2/index.d.ts.map +1 -1
- package/dist/animationsV2/normalize.d.ts.map +1 -1
- package/dist/animationsV2/normalize.js +18 -7
- package/dist/animationsV2/sequenceUtils.d.ts +42 -1
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
- package/dist/animationsV2/sequenceUtils.js +103 -3
- package/dist/animationsV2/types.d.ts +20 -0
- package/dist/animationsV2/types.d.ts.map +1 -1
- 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/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/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/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/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.map +1 -1
- package/dist/components/ObjectsRenderer.js +37 -3
- 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.js +1 -1
- 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/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/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/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 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- 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/useLandscapeMaps.d.ts +1 -1
- package/dist/hooks/useLandscapeMaps.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.d.ts +1 -1
- package/dist/hooks/useThunder.d.ts +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/interactions/index.d.ts +2 -1
- package/dist/interactions/index.d.ts.map +1 -1
- package/dist/interactions/index.js +1 -1
- package/dist/interactions/runner.d.ts +18 -3
- package/dist/interactions/runner.d.ts.map +1 -1
- package/dist/interactions/runner.js +25 -2
- 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.map +1 -1
- package/dist/operations/catalogue/displayImage.js +1 -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.map +1 -1
- package/dist/operations/catalogue/fade.js +1 -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.map +1 -1
- package/dist/operations/catalogue/focus.js +1 -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.map +1 -1
- package/dist/operations/catalogue/glow.js +2 -1
- 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/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.map +1 -1
- package/dist/operations/catalogue/moveToFront.js +1 -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.map +1 -1
- package/dist/operations/catalogue/visibility.js +1 -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.map +1 -1
- package/dist/operations/catalogue/zoom.js +1 -0
- package/dist/operations/index.d.ts +4 -2
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +4 -2
- 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 +7 -2
- package/dist/operations/registry.d.ts.map +1 -1
- package/dist/operations/registry.js +45 -3
- package/dist/operations/runtime.d.ts +40 -2
- package/dist/operations/runtime.d.ts.map +1 -1
- package/dist/operations/runtime.js +164 -8
- package/dist/operations/types.d.ts +29 -3
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +6 -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.map +1 -1
- package/dist/operations/useOperationsRuntime.js +42 -4
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/operations/runtime.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAgB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/operations/runtime.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAgB,MAAM,uBAAuB,CAAC;AAI1G,OAAO,KAAK,EAAoB,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAwCtG,kEAAkE;AAClE,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,IAAI,CAQpE;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAE1E;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,QAAQ,GA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Aa,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5F;AAQD,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAQvF;AAED,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,YAAkC,CAAC;AAEtF,kEAAkE;AAClE,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGjE"}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { SceneActions, findNodesByName } from '@3driseai/3drise-core';
|
|
2
2
|
import { findById } from '../utils/sceneQuery.js';
|
|
3
3
|
import { getOperation, resolveParams } from './registry.js';
|
|
4
|
+
import { warmMode } from './catalogue/warmup.js';
|
|
4
5
|
const active = new Map(); // `${op}:${uuid}`
|
|
5
6
|
const slots = new Map(); // exclusive group → active key
|
|
6
7
|
const toolsStack = [];
|
|
7
8
|
let cameraHome = null;
|
|
8
9
|
const keyOf = (op, target) => `${op}:${target.uuid}`;
|
|
9
10
|
const tools = () => toolsStack[toolsStack.length - 1];
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Stand-in tools for object effects that run before (or after) a scene has
|
|
13
|
+
* registered its tools — visual state effects only read the camera pose (for a
|
|
14
|
+
* left / right sweep), and fall back to world axes without one.
|
|
15
|
+
*/
|
|
16
|
+
const BARE_TOOLS = {
|
|
17
|
+
animateCamera: async () => undefined,
|
|
18
|
+
cameraPose: () => null,
|
|
19
|
+
orbitCamera: async () => undefined,
|
|
20
|
+
moveToFront: () => undefined,
|
|
21
|
+
restoreTransform: () => undefined,
|
|
22
|
+
};
|
|
23
|
+
function context(self, bare = false) {
|
|
24
|
+
const t = tools() ?? (bare ? BARE_TOOLS : undefined);
|
|
12
25
|
if (!t)
|
|
13
26
|
return null;
|
|
14
27
|
return {
|
|
@@ -42,8 +55,8 @@ export function registerOperationTools(t) {
|
|
|
42
55
|
export function isOperationOn(op, target) {
|
|
43
56
|
return active.has(keyOf(op, target));
|
|
44
57
|
}
|
|
45
|
-
export function applyOperation(def, target, params, self) {
|
|
46
|
-
const ctx = context(self);
|
|
58
|
+
export function applyOperation(def, target, params, self, opts) {
|
|
59
|
+
const ctx = context(self, opts?.bare);
|
|
47
60
|
if (!ctx)
|
|
48
61
|
return false;
|
|
49
62
|
const key = keyOf(def.value, target);
|
|
@@ -59,23 +72,52 @@ export function applyOperation(def, target, params, self) {
|
|
|
59
72
|
}
|
|
60
73
|
slots.set(def.exclusive.group, key);
|
|
61
74
|
}
|
|
62
|
-
|
|
75
|
+
runs.set(key, finished(def.apply(target, params, ctx), params));
|
|
63
76
|
if (def.revert)
|
|
64
77
|
active.set(key, { op: def.value, target, params });
|
|
65
78
|
return true;
|
|
66
79
|
}
|
|
67
|
-
|
|
80
|
+
// ---------------------------------------------------------------- run completion
|
|
81
|
+
/** The last run (apply or revert) of each op on each target — resolves when it has really finished. */
|
|
82
|
+
const runs = new Map();
|
|
83
|
+
const wait = (s) => new Promise(r => setTimeout(r, Math.max(0, s) * 1000));
|
|
84
|
+
const durationOf = (params) => (Number.isFinite(Number(params.duration)) ? Number(params.duration) : 1);
|
|
85
|
+
/** Visual transitions return their run; others (transform / camera tweens) take their duration. */
|
|
86
|
+
function finished(res, params) {
|
|
87
|
+
return res && typeof res.then === 'function'
|
|
88
|
+
? res.then(() => undefined, () => undefined)
|
|
89
|
+
: wait(durationOf(params));
|
|
90
|
+
}
|
|
91
|
+
/** The last run (apply or revert) of an op on a target — resolves when it has really finished. */
|
|
92
|
+
export const runOf = (op, target) => runs.get(keyOf(op, target)) ?? Promise.resolve();
|
|
93
|
+
/**
|
|
94
|
+
* Undo an operation that is on. `params` overrides the ones it was applied with
|
|
95
|
+
* (e.g. a zero duration to take it off at once); `bare` runs it with no scene tools.
|
|
96
|
+
*/
|
|
97
|
+
export function revertOperation(def, target, opts) {
|
|
68
98
|
const key = keyOf(def.value, target);
|
|
69
99
|
const entry = active.get(key);
|
|
70
|
-
const ctx = context();
|
|
100
|
+
const ctx = context(undefined, opts?.bare);
|
|
71
101
|
if (!entry || !ctx || !def.revert)
|
|
72
102
|
return false;
|
|
73
103
|
active.delete(key);
|
|
74
104
|
if (def.exclusive && slots.get(def.exclusive.group) === key)
|
|
75
105
|
slots.delete(def.exclusive.group);
|
|
76
|
-
|
|
106
|
+
const params = opts?.params ? { ...entry.params, ...opts.params } : entry.params;
|
|
107
|
+
runs.set(key, finished(def.revert(target, params, ctx), params));
|
|
77
108
|
return true;
|
|
78
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Undo an operation's effect on a target even when the runtime no longer tracks
|
|
112
|
+
* it as on (its scene tools were unregistered first, on unmount). Reverts of
|
|
113
|
+
* operations that are not on do nothing.
|
|
114
|
+
*/
|
|
115
|
+
export function forceRevert(def, target, params) {
|
|
116
|
+
if (revertOperation(def, target, { bare: true, params }) || !def.revert)
|
|
117
|
+
return;
|
|
118
|
+
const ctx = context(undefined, true);
|
|
119
|
+
runs.set(keyOf(def.value, target), finished(def.revert(target, params, ctx), params));
|
|
120
|
+
}
|
|
79
121
|
/** The objects an effect acts on: 'self', object ids, narrowed to model nodes. */
|
|
80
122
|
export function resolveEffectTargets(effect, self) {
|
|
81
123
|
const out = [];
|
|
@@ -114,6 +156,120 @@ export function runEffect(effect, mode, self) {
|
|
|
114
156
|
applyOperation(def, target, params, self);
|
|
115
157
|
}
|
|
116
158
|
}
|
|
159
|
+
// ---------------------------------------------------------------- preview
|
|
160
|
+
const PREVIEW_HOLD = 0.7; // s the finished state is held before it comes back
|
|
161
|
+
/** The running preview of each effect row (by effect id): a newer one replaces it. */
|
|
162
|
+
const previews = new Map();
|
|
163
|
+
/**
|
|
164
|
+
* Play an effect for the studio and put everything back: apply, wait for the run
|
|
165
|
+
* to REALLY finish (it may first compile its shaders in the background), hold a
|
|
166
|
+
* moment, revert and wait for that too. One-shot operations (spin, jelly, flip)
|
|
167
|
+
* just play; orbit plays and flies home. An effect that is already on is replayed
|
|
168
|
+
* (revert, then apply) so the scene ends as it was.
|
|
169
|
+
* Pressing play again on the same row — also after switching its operation —
|
|
170
|
+
* replaces the running preview: the old one is put back and the new one plays.
|
|
171
|
+
*/
|
|
172
|
+
export async function previewEffect(effect, self) {
|
|
173
|
+
const def = getOperation(effect.operation);
|
|
174
|
+
if (!def || !tools())
|
|
175
|
+
return false;
|
|
176
|
+
const targets = resolveEffectTargets(effect, self);
|
|
177
|
+
if (!targets.length)
|
|
178
|
+
return false;
|
|
179
|
+
const list = def.multi ? targets : targets.slice(0, 1);
|
|
180
|
+
const prev = previews.get(effect.id);
|
|
181
|
+
if (prev) {
|
|
182
|
+
const pd = getOperation(prev.op);
|
|
183
|
+
if (pd)
|
|
184
|
+
for (const t of prev.targets)
|
|
185
|
+
if (isOperationOn(pd.value, t))
|
|
186
|
+
revertOperation(pd, t);
|
|
187
|
+
}
|
|
188
|
+
const token = (prev?.token ?? 0) + 1;
|
|
189
|
+
previews.set(effect.id, { token, op: def.value, targets: list });
|
|
190
|
+
const alive = () => previews.get(effect.id)?.token === token;
|
|
191
|
+
const params = resolveParams(def, effect.params);
|
|
192
|
+
const applyAll = () => Promise.all(list.map(t => { applyOperation(def, t, params, self); return runOf(def.value, t); }));
|
|
193
|
+
const revertAll = () => Promise.all(list.map(t => { revertOperation(def, t); return runOf(def.value, t); }));
|
|
194
|
+
try {
|
|
195
|
+
const wasOn = list.some(t => isOperationOn(def.value, t));
|
|
196
|
+
if (wasOn) {
|
|
197
|
+
await revertAll();
|
|
198
|
+
if (!alive())
|
|
199
|
+
return true;
|
|
200
|
+
await wait(PREVIEW_HOLD);
|
|
201
|
+
if (!alive())
|
|
202
|
+
return true;
|
|
203
|
+
await applyAll();
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
await applyAll();
|
|
207
|
+
if (!alive())
|
|
208
|
+
return true;
|
|
209
|
+
await wait(PREVIEW_HOLD);
|
|
210
|
+
if (!alive())
|
|
211
|
+
return true;
|
|
212
|
+
if (def.revert)
|
|
213
|
+
await revertAll();
|
|
214
|
+
}
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
if (alive())
|
|
219
|
+
previews.delete(effect.id);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/** Preview several effects together (an interaction's "Try it"). */
|
|
223
|
+
export async function previewEffects(effects, self) {
|
|
224
|
+
const results = await Promise.all(effects.map(e => previewEffect(e, self)));
|
|
225
|
+
return results.some(Boolean);
|
|
226
|
+
}
|
|
227
|
+
export const isPreviewing = (effectId) => previews.has(effectId);
|
|
228
|
+
// ---------------------------------------------------------------- pre-warm
|
|
229
|
+
/** Visual operations with no shaders of their own — nothing to warm (and a warm-only run would show). */
|
|
230
|
+
const NO_SHADERS = new Set(['glow', 'fade', 'visibility', 'displayImage']);
|
|
231
|
+
const warmed = new Set();
|
|
232
|
+
let warmQueue = Promise.resolve();
|
|
233
|
+
/**
|
|
234
|
+
* Compile an effect's shaders ahead of time, without showing anything, so its
|
|
235
|
+
* first real play starts instantly. Visual effects only (the others have no
|
|
236
|
+
* shaders). Runs one at a time, in the background; each (effect, target) once.
|
|
237
|
+
* Used when an effect is picked in the editor and, for every effect a scene's
|
|
238
|
+
* interactions and actions use, when the scene loads.
|
|
239
|
+
*/
|
|
240
|
+
export function prewarmEffect(effect, self) {
|
|
241
|
+
const def = getOperation(effect.operation);
|
|
242
|
+
if (!def || def.channel !== 'visual' || !def.revert || NO_SHADERS.has(def.value))
|
|
243
|
+
return Promise.resolve();
|
|
244
|
+
const params = resolveParams(def, effect.params);
|
|
245
|
+
const job = async () => {
|
|
246
|
+
const ctx = context(self);
|
|
247
|
+
if (!ctx)
|
|
248
|
+
return;
|
|
249
|
+
const targets = resolveEffectTargets(effect, self);
|
|
250
|
+
for (const t of def.multi ? targets : targets.slice(0, 1)) {
|
|
251
|
+
const k = `${def.value}:${t.uuid}`;
|
|
252
|
+
if (warmed.has(k) || isOperationOn(def.value, t))
|
|
253
|
+
continue;
|
|
254
|
+
warmed.add(k);
|
|
255
|
+
// a warm-only run: stages and compiles everything, animates nothing…
|
|
256
|
+
warmMode.on = true;
|
|
257
|
+
let res;
|
|
258
|
+
try {
|
|
259
|
+
res = def.apply(t, params, ctx);
|
|
260
|
+
}
|
|
261
|
+
finally {
|
|
262
|
+
warmMode.on = false;
|
|
263
|
+
}
|
|
264
|
+
await finished(res, { duration: 0 });
|
|
265
|
+
// …then quietly take it off again, unless the user started it meanwhile
|
|
266
|
+
if (!isOperationOn(def.value, t))
|
|
267
|
+
await finished(def.revert(t, { ...params, duration: 0.001 }, ctx), { duration: 0 });
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
warmQueue = warmQueue.then(job, job);
|
|
271
|
+
return warmQueue;
|
|
272
|
+
}
|
|
117
273
|
// ---------------------------------------------------------------- actions
|
|
118
274
|
const actionEffectsOn = new Set();
|
|
119
275
|
const listeners = new Set();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Object3D } from 'three';
|
|
2
|
-
import type { OperationName, OperationParamValue, Vector3Array } from '@3driseai/3drise-core';
|
|
2
|
+
import type { OperationChannel, OperationName, OperationParamValue, Vector3Array } from '@3driseai/3drise-core';
|
|
3
3
|
/** A parameter the studio shows under the effect, with its default. */
|
|
4
4
|
export type OperationParamSpec = {
|
|
5
5
|
type: 'number';
|
|
@@ -31,7 +31,8 @@ export type OperationParamSpec = {
|
|
|
31
31
|
hint?: string;
|
|
32
32
|
};
|
|
33
33
|
export type OperationParams = Record<string, OperationParamValue>;
|
|
34
|
-
|
|
34
|
+
/** interaction / action: triggered. object: layered on the object (CreatedObject.effects), switched on / off. */
|
|
35
|
+
export type OperationSource = 'interaction' | 'action' | 'object';
|
|
35
36
|
/** Scene tools the runtime hands an operation (built from the viewer's hooks). */
|
|
36
37
|
export interface OperationTools {
|
|
37
38
|
/** Animate the camera; `lookAt` moves the orbit target. */
|
|
@@ -43,6 +44,11 @@ export interface OperationTools {
|
|
|
43
44
|
position: Vector3Array;
|
|
44
45
|
target: Vector3Array;
|
|
45
46
|
} | null;
|
|
47
|
+
/**
|
|
48
|
+
* Circle the camera around `center` (world Y axis) by `degrees`, keeping its
|
|
49
|
+
* distance and height; the orbit target eases onto `center` on the way.
|
|
50
|
+
*/
|
|
51
|
+
orbitCamera: (center: Vector3Array, degrees: number, duration: number, ease: string) => Promise<void>;
|
|
46
52
|
moveToFront: (object: Object3D, options: {
|
|
47
53
|
distance: number;
|
|
48
54
|
scale: [number, number];
|
|
@@ -68,6 +74,8 @@ export interface OperationDefinition {
|
|
|
68
74
|
label: string;
|
|
69
75
|
/** One line for the studio (tooltip). */
|
|
70
76
|
description: string;
|
|
77
|
+
/** What it acts on — an interaction holds one effect per channel (see OperationChannel). */
|
|
78
|
+
channel: OperationChannel;
|
|
71
79
|
/** More than one target allowed. */
|
|
72
80
|
multi: boolean;
|
|
73
81
|
/** An interaction triggered again undoes it. */
|
|
@@ -86,11 +94,29 @@ export interface OperationDefinition {
|
|
|
86
94
|
release: 'revert' | 'handover';
|
|
87
95
|
};
|
|
88
96
|
params?: Record<string, OperationParamSpec>;
|
|
97
|
+
/**
|
|
98
|
+
* Object effects only: parameters forced to these values (the studio hides
|
|
99
|
+
* them), e.g. a hologram that must stay visible.
|
|
100
|
+
*/
|
|
101
|
+
objectParams?: OperationParams;
|
|
102
|
+
/**
|
|
103
|
+
* Object effects only: one effect of a stack per object — `surface` effects
|
|
104
|
+
* replace the whole look of the surface (frost, metalize, petrify), so two
|
|
105
|
+
* never run together. Effects without a stack add on top of anything.
|
|
106
|
+
*/
|
|
107
|
+
stack?: 'surface';
|
|
108
|
+
/** Visual transitions return a promise that resolves when the run has finished. */
|
|
89
109
|
apply: (target: Object3D, params: OperationParams, ctx: OperationContext) => void | Promise<void>;
|
|
90
110
|
/** No revert = one-way (applies only). */
|
|
91
|
-
revert?: (target: Object3D, params: OperationParams, ctx: OperationContext) => void
|
|
111
|
+
revert?: (target: Object3D, params: OperationParams, ctx: OperationContext) => void | Promise<void>;
|
|
92
112
|
}
|
|
93
113
|
/** Type helper for catalogue files. */
|
|
94
114
|
export declare const defineOperation: (def: OperationDefinition) => OperationDefinition;
|
|
95
115
|
export declare const DEFAULT_EASE = "power2.out";
|
|
116
|
+
/** The channels in studio order, with their labels. */
|
|
117
|
+
export declare const OPERATION_CHANNELS: Array<{
|
|
118
|
+
value: OperationChannel;
|
|
119
|
+
label: string;
|
|
120
|
+
description: string;
|
|
121
|
+
}>;
|
|
96
122
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/operations/types.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/operations/types.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhH,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GACxB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CA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,CAAC;IAC5C;;;OAGG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mFAAmF;IACnF,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClG,0CAA0C;IAC1C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvG;AAED,uCAAuC;AACvC,eAAO,MAAM,eAAe,GAAI,KAAK,mBAAmB,KAAG,mBAA0B,CAAC;AAEtF,eAAO,MAAM,YAAY,eAAe,CAAC;AAEzC,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAIrG,CAAC"}
|
package/dist/operations/types.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
/** Type helper for catalogue files. */
|
|
2
2
|
export const defineOperation = (def) => def;
|
|
3
3
|
export const DEFAULT_EASE = 'power2.out';
|
|
4
|
+
/** The channels in studio order, with their labels. */
|
|
5
|
+
export const OPERATION_CHANNELS = [
|
|
6
|
+
{ value: 'transform', label: 'Transform', description: "Moves, turns or scales the object itself" },
|
|
7
|
+
{ value: 'visual', label: 'Visual', description: 'Changes how the object looks — never where it is' },
|
|
8
|
+
{ value: 'camera', label: 'Camera', description: 'Moves or turns the camera' },
|
|
9
|
+
];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Object3D } from 'three';
|
|
2
|
+
import type { ObjectEffect } from '@3driseai/3drise-core';
|
|
3
|
+
export declare function useObjectEffectLayers(ref: React.RefObject<Object3D | null>, effects: ObjectEffect[] | undefined): void;
|
|
4
|
+
//# sourceMappingURL=useObjectEffectLayers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useObjectEffectLayers.d.ts","sourceRoot":"","sources":["../../src/operations/useObjectEffectLayers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,QAkC/G"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Runs an object's effects (CreatedObject.effects) on its group — see ./objectEffects.ts.
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { useFrame } from '@react-three/fiber';
|
|
4
|
+
import { ObjectEffectsController, surfaceSignature } from './objectEffects.js';
|
|
5
|
+
/** How often (frames) the object's meshes / materials are checked for replacement. */
|
|
6
|
+
const CHECK_EVERY = 20;
|
|
7
|
+
export function useObjectEffectLayers(ref, effects) {
|
|
8
|
+
const ctrl = useRef(null);
|
|
9
|
+
const signature = useRef('');
|
|
10
|
+
const latest = useRef(effects);
|
|
11
|
+
latest.current = effects;
|
|
12
|
+
const has = !!effects?.length;
|
|
13
|
+
// Changes after the first sync play their transitions; the first lands at once.
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const root = ref.current;
|
|
16
|
+
if (!root)
|
|
17
|
+
return;
|
|
18
|
+
if (!ctrl.current) {
|
|
19
|
+
if (!has)
|
|
20
|
+
return;
|
|
21
|
+
ctrl.current = new ObjectEffectsController(root);
|
|
22
|
+
signature.current = surfaceSignature(root);
|
|
23
|
+
ctrl.current.sync(effects, 'instant');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
ctrl.current.sync(effects, 'animate');
|
|
27
|
+
}, [effects, has, ref]);
|
|
28
|
+
useEffect(() => () => { ctrl.current?.dispose(); ctrl.current = null; }, []);
|
|
29
|
+
// A model that finished loading, a material swapped by an edit: move the effects over.
|
|
30
|
+
const frame = useRef(0);
|
|
31
|
+
useFrame(() => {
|
|
32
|
+
const c = ctrl.current;
|
|
33
|
+
const root = ref.current;
|
|
34
|
+
if (!c || !root || ++frame.current % CHECK_EVERY)
|
|
35
|
+
return;
|
|
36
|
+
const sig = surfaceSignature(root);
|
|
37
|
+
if (sig === signature.current)
|
|
38
|
+
return;
|
|
39
|
+
signature.current = sig;
|
|
40
|
+
void c.refresh();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperationsRuntime.d.ts","sourceRoot":"","sources":["../../src/operations/useOperationsRuntime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useOperationsRuntime.d.ts","sourceRoot":"","sources":["../../src/operations/useOperationsRuntime.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AAQvE,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,WAAW,QAsD/D"}
|
|
@@ -1,20 +1,58 @@
|
|
|
1
1
|
// Mounts the operations runtime on the scene: builds the scene tools from the
|
|
2
2
|
// viewer's hooks and registers them. Called once, in ObjectsRenderer.
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
|
+
import { gsap } from 'gsap';
|
|
5
|
+
import { Vector3 } from 'three';
|
|
4
6
|
import cameraManager from '../utils/CameraSingleton.js';
|
|
5
7
|
import useCameraAnimation from '../hooks/useCameraAnimation.js';
|
|
6
8
|
import { useFrameAnimations } from '../hooks/useFrameAnimations.js';
|
|
7
9
|
import { useOrbitControls } from '../hooks/useOrbitControls.js';
|
|
8
10
|
import { registerOperationTools } from './runtime.js';
|
|
9
11
|
export function useOperationsRuntime(cameraSettings) {
|
|
10
|
-
const { animateCamera } = useCameraAnimation({ autoAnimate: false, defaultDuration: 1, defaultEase: 'power2.out' });
|
|
12
|
+
const { animateCamera, killAnimation } = useCameraAnimation({ autoAnimate: false, defaultDuration: 1, defaultEase: 'power2.out' });
|
|
11
13
|
const { moveToFront, restoreOriginalTransform } = useFrameAnimations(cameraSettings);
|
|
12
14
|
const controls = useOrbitControls();
|
|
13
15
|
// Latest hook functions, read at call time (the registration itself is stable).
|
|
14
|
-
const latest = useRef({ animateCamera, moveToFront, restoreOriginalTransform, controls, cameraSettings });
|
|
15
|
-
latest.current = { animateCamera, moveToFront, restoreOriginalTransform, controls, cameraSettings };
|
|
16
|
+
const latest = useRef({ animateCamera, killAnimation, moveToFront, restoreOriginalTransform, controls, cameraSettings });
|
|
17
|
+
latest.current = { animateCamera, killAnimation, moveToFront, restoreOriginalTransform, controls, cameraSettings };
|
|
18
|
+
// One camera move at a time: a new move stops a running orbit, an orbit stops a running move.
|
|
19
|
+
const orbit = useRef(null);
|
|
20
|
+
const stopOrbit = () => { orbit.current?.kill(); orbit.current = null; };
|
|
16
21
|
useEffect(() => registerOperationTools({
|
|
17
|
-
animateCamera: (to, duration, ease, lookAt) => latest.current.animateCamera(to, duration, ease, lookAt),
|
|
22
|
+
animateCamera: (to, duration, ease, lookAt) => { stopOrbit(); return latest.current.animateCamera(to, duration, ease, lookAt); },
|
|
23
|
+
orbitCamera: (center, degrees, duration, ease) => {
|
|
24
|
+
const cam = cameraManager.getCamera();
|
|
25
|
+
const controls = latest.current.controls;
|
|
26
|
+
if (!cam)
|
|
27
|
+
return Promise.resolve();
|
|
28
|
+
stopOrbit();
|
|
29
|
+
latest.current.killAnimation();
|
|
30
|
+
const c = new Vector3(...center);
|
|
31
|
+
const offset = cam.position.clone().sub(c);
|
|
32
|
+
const fromTarget = controls?.target?.clone() ?? c.clone();
|
|
33
|
+
const up = new Vector3(0, 1, 0);
|
|
34
|
+
const total = (degrees * Math.PI) / 180;
|
|
35
|
+
const proxy = { t: 0 };
|
|
36
|
+
return new Promise((resolve) => {
|
|
37
|
+
orbit.current = gsap.to(proxy, {
|
|
38
|
+
t: 1, duration, ease,
|
|
39
|
+
onUpdate: () => {
|
|
40
|
+
cam.position.copy(c).add(offset.clone().applyAxisAngle(up, total * proxy.t));
|
|
41
|
+
// the look-at point settles on the centre over the first third
|
|
42
|
+
const k = Math.min(1, proxy.t * 3);
|
|
43
|
+
const s = k * k * (3 - 2 * k);
|
|
44
|
+
if (controls?.target) {
|
|
45
|
+
controls.target.lerpVectors(fromTarget, c, s);
|
|
46
|
+
controls.update?.();
|
|
47
|
+
}
|
|
48
|
+
else
|
|
49
|
+
cam.lookAt(c);
|
|
50
|
+
},
|
|
51
|
+
onComplete: () => { orbit.current = null; resolve(); },
|
|
52
|
+
onInterrupt: () => resolve(),
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
},
|
|
18
56
|
cameraPose: () => {
|
|
19
57
|
const pos = cameraManager.getPosition();
|
|
20
58
|
if (!pos)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landscapePresets.d.ts","sourceRoot":"","sources":["../../src/presets/landscapePresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"landscapePresets.d.ts","sourceRoot":"","sources":["../../src/presets/landscapePresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAG9E;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,sEAAsE;IACtE,MAAM,EAAE;QACJ,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;QACpB,KAAK,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,yEAAyE;IACzE,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,iDAAiD;IACjD,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;CACrC;AAkED,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAwD7C,CAAA;AAED,2EAA2E;AAC3E,MAAM,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;AAExE,MAAM,WAAW,uBAAuB;IACpC,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAChC,+EAA+E;IAC/E,OAAO,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,sBAAsB,GAChC,uBAAuB,CAwCzB;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAElF;AAED;6CAC6C;AAC7C,wBAAgB,yBAAyB,IAAI,MAAM,EAAE,CAapD;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAK9E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LandscapeConfig, LandscapeQualityConfig, LandscapeSurface } from '
|
|
1
|
+
import type { LandscapeConfig, LandscapeQualityConfig, LandscapeSurface } from '@3driseai/3drise-core';
|
|
2
2
|
/**
|
|
3
3
|
* Landscape types and shapes — the two things a person actually picks.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landscapeTypes.d.ts","sourceRoot":"","sources":["../../src/presets/landscapeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"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CAAA;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,GAAG,sBAAsB,CAO5G;AAED;;oDAEoD;AACpD,wBAAgB,qBAAqB,CACjC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,EAAE,MAAM,GACvB,eAAe,GAAG,IAAI,CAWxB;AAMD,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAChC,wEAAwE;IACxE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;IACjF,wCAAwC;IACxC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAAA;CAC9F;AAED,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAChC,OAAO,EAAE,sBAAsB,CAAA;IAC/B,yEAAyE;IACzE,OAAO,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,mBAAmB,EAC1B,MAAM,GAAE,eAA4B,EACpC,QAAQ,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACrD,qBAAqB,CAwDvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultLandscapeQuality, defaultLandscapeSurface } from '
|
|
1
|
+
import { defaultLandscapeQuality, defaultLandscapeSurface } from '@3driseai/3drise-core';
|
|
2
2
|
const S = (pack, band, metres, surface) => ({ pack, band, metres, surface });
|
|
3
3
|
/** Texture repeats across the tile, from a real-world tile size. Clamped: below
|
|
4
4
|
* about half a metre a ground texture aliases before it reads as detail, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terrainPresets.d.ts","sourceRoot":"","sources":["../../src/presets/terrainPresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"terrainPresets.d.ts","sourceRoot":"","sources":["../../src/presets/terrainPresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC3C;AAgSD,eAAO,MAAM,cAAc,EAAE,aAAa,EAKzC,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,EAAE,CAE3E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE9E;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAG1E"}
|