@3driseai/3drise-viewer 0.1.26 → 0.1.28
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/ApollonianGrid.d.ts +25 -0
- package/dist/components/ApollonianGrid.d.ts.map +1 -0
- package/dist/components/ApollonianGrid.js +80 -0
- 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/ConformalGrid.d.ts +25 -0
- package/dist/components/ConformalGrid.d.ts.map +1 -0
- package/dist/components/ConformalGrid.js +97 -0
- 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 +9 -3
- package/dist/components/GridsGenerator.d.ts.map +1 -1
- package/dist/components/GridsGenerator.js +41 -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/HilbertGrid.d.ts +25 -0
- package/dist/components/HilbertGrid.d.ts.map +1 -0
- package/dist/components/HilbertGrid.js +93 -0
- 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/LensingGrid.d.ts +25 -0
- package/dist/components/LensingGrid.d.ts.map +1 -0
- package/dist/components/LensingGrid.js +81 -0
- 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/ParastichyGrid.d.ts +25 -0
- package/dist/components/ParastichyGrid.d.ts.map +1 -0
- package/dist/components/ParastichyGrid.js +82 -0
- package/dist/components/ParticlesGenerator.d.ts.map +1 -1
- package/dist/components/ParticlesGenerator.js +6 -0
- package/dist/components/PhyllotaxisGrid.d.ts +25 -0
- package/dist/components/PhyllotaxisGrid.d.ts.map +1 -0
- package/dist/components/PhyllotaxisGrid.js +95 -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/TruchetGrid.d.ts +25 -0
- package/dist/components/TruchetGrid.d.ts.map +1 -0
- package/dist/components/TruchetGrid.js +82 -0
- 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 +14 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -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/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/gridConfigs.d.ts +103 -0
- package/dist/types/gridConfigs.d.ts.map +1 -1
- package/dist/types/index.d.ts +9 -9
- 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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Swirl — the object is drawn up into a vortex: it spirals out on a widening,
|
|
2
|
+
// rising helix, spinning about its own centre and shrinking to nothing.
|
|
3
|
+
// Reverting spirals it back down into place.
|
|
4
|
+
import { gsap } from 'gsap';
|
|
5
|
+
import { Quaternion, Vector3 } from 'three';
|
|
6
|
+
import { defineOperation } from '../types.js';
|
|
7
|
+
import { acquireRest, poseAbout, releaseRest } from './restPose.js';
|
|
8
|
+
const KEY = '__opSwirl';
|
|
9
|
+
const UP = new Vector3(0, 1, 0);
|
|
10
|
+
function pose(target, st, p) {
|
|
11
|
+
const t = st.proxy.t;
|
|
12
|
+
const r = st.rest;
|
|
13
|
+
const R = Math.max(r.size.x, r.size.z) * Number(p.radius);
|
|
14
|
+
const rise = r.size.y * Number(p.rise);
|
|
15
|
+
const turns = Number(p.turns);
|
|
16
|
+
const dir = p.reverse ? -1 : 1;
|
|
17
|
+
// helix: radius opens with an ease-out, height with an ease-in (it gets pulled up)
|
|
18
|
+
const phi = dir * turns * 2 * Math.PI * t;
|
|
19
|
+
const rad = R * Math.sin((Math.PI / 2) * t);
|
|
20
|
+
const off = new Vector3(rad * Math.cos(phi) - rad, rise * t * t, rad * Math.sin(phi));
|
|
21
|
+
// spins faster than it orbits, shrinks over the second half
|
|
22
|
+
const q = new Quaternion().setFromAxisAngle(UP, dir * turns * 2 * Math.PI * 1.6 * t * t);
|
|
23
|
+
const k = 1 - smoothstep(0.3, 1, t);
|
|
24
|
+
const s = new Vector3(1, 1, 1).multiplyScalar(Math.max(k, 1e-4));
|
|
25
|
+
poseAbout(target, r, r.centerLocal, q, s, off);
|
|
26
|
+
}
|
|
27
|
+
const smoothstep = (a, b, x) => { const v = Math.min(1, Math.max(0, (x - a) / (b - a))); return v * v * (3 - 2 * v); };
|
|
28
|
+
export default defineOperation({
|
|
29
|
+
value: 'swirl',
|
|
30
|
+
label: 'Swirl away',
|
|
31
|
+
description: 'Spiral the target up into a vortex until it vanishes — reverting spirals it back into place',
|
|
32
|
+
channel: 'transform',
|
|
33
|
+
multi: true,
|
|
34
|
+
toggles: true,
|
|
35
|
+
usableIn: ['interaction', 'action'],
|
|
36
|
+
params: {
|
|
37
|
+
turns: { type: 'number', label: 'Turns', default: 1.5, min: 0.5, max: 6, step: 0.25 },
|
|
38
|
+
radius: { type: 'number', label: 'Radius', default: 0.6, min: 0, max: 3, step: 0.05, hint: 'A fraction of the object’s width' },
|
|
39
|
+
rise: { type: 'number', label: 'Rise', default: 1.2, min: 0, max: 5, step: 0.05, hint: 'A fraction of the object’s height' },
|
|
40
|
+
reverse: { type: 'boolean', label: 'Clockwise', default: false },
|
|
41
|
+
duration: { type: 'number', label: 'Duration', default: 1.6, min: 0.2, max: 8, step: 0.05, unit: 's' },
|
|
42
|
+
},
|
|
43
|
+
apply(target, p) {
|
|
44
|
+
let st = target.userData[KEY];
|
|
45
|
+
if (!st) {
|
|
46
|
+
st = { rest: acquireRest(target), proxy: { t: 0 }, visible: target.visible };
|
|
47
|
+
target.userData[KEY] = st;
|
|
48
|
+
}
|
|
49
|
+
const s = st;
|
|
50
|
+
gsap.killTweensOf(s.proxy);
|
|
51
|
+
gsap.to(s.proxy, {
|
|
52
|
+
t: 1, duration: Number(p.duration), ease: 'power2.in',
|
|
53
|
+
onUpdate: () => pose(target, s, p),
|
|
54
|
+
onComplete: () => { target.visible = false; },
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
revert(target, p) {
|
|
58
|
+
const s = target.userData[KEY];
|
|
59
|
+
if (!s)
|
|
60
|
+
return;
|
|
61
|
+
target.visible = s.visible;
|
|
62
|
+
gsap.killTweensOf(s.proxy);
|
|
63
|
+
gsap.to(s.proxy, {
|
|
64
|
+
t: 0, duration: Number(p.duration), ease: 'power2.out',
|
|
65
|
+
onUpdate: () => pose(target, s, p),
|
|
66
|
+
onComplete: () => { delete target.userData[KEY]; releaseRest(target); },
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teleport.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/teleport.ts"],"names":[],"mappings":";AA2HA,wBAgGG"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// Teleport — the object is drawn toward a point of light just above it and sent
|
|
2
|
+
// up a beam. The surface leans in, heats to white and breaks into light along a
|
|
3
|
+
// noisy front; particles sampled from the surface spiral smoothly into the point
|
|
4
|
+
// and rise up the beam in tight helical streams. The beam itself is a clean
|
|
5
|
+
// column of light: a soft core that is brightest face-on, fine streaks flowing
|
|
6
|
+
// upward, and thin rings of light climbing it. Reverting materialises the
|
|
7
|
+
// object back down the beam.
|
|
8
|
+
import { AdditiveBlending, Color, CylinderGeometry, Mesh, ShaderMaterial } from 'three';
|
|
9
|
+
import { defineOperation } from '../types.js';
|
|
10
|
+
import { GLSL_ROT, addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
11
|
+
import { DIRECTION_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, hideMeshes, runProgress, setFieldParams, } from './transitionField.js';
|
|
12
|
+
import { sampleSurfaceCached } from './surfaceSample.js';
|
|
13
|
+
import { GLSL_POINT_SIZE, createFxPoints, disposeFxPoints } from './fxPoints.js';
|
|
14
|
+
import { hideUntilWarm } from './warmup.js';
|
|
15
|
+
const P = 'Tel';
|
|
16
|
+
const KEY = 'teleport';
|
|
17
|
+
const STATE = '__opTeleport';
|
|
18
|
+
const LIFE = 0.5;
|
|
19
|
+
const END = 1 + LIFE * 1.6;
|
|
20
|
+
/** The singularity: just above the top centre (GLSL, root-local). */
|
|
21
|
+
const SING = `(u${P}Min + u${P}Size * vec3(0.5, 1.0, 0.5) + vec3(0.0, 0.18 * u${P}Extent, 0.0))`;
|
|
22
|
+
function surface(st) {
|
|
23
|
+
return {
|
|
24
|
+
uniforms: { ...fieldUniforms(P, st.field), uTelLife: st.life, uTelGlow: st.glow },
|
|
25
|
+
common: `varying float vTelK;\nvarying vec3 vTelQ;\n${fieldGlsl(P)}\n${GLSL_ROT}`,
|
|
26
|
+
vertex: /* glsl */ `
|
|
27
|
+
{
|
|
28
|
+
mat4 toRoot = uTelRootInv * modelMatrix;
|
|
29
|
+
vec3 rl = (toRoot * vec4(transformed, 1.0)).xyz;
|
|
30
|
+
float birth = TelBirthOf(TelField(TelNorm(rl)));
|
|
31
|
+
float k = clamp((uTelProgress - birth) / uTelLife, 0.0, 1.0);
|
|
32
|
+
k = k * k * (3.0 - 2.0 * k);
|
|
33
|
+
vTelK = k;
|
|
34
|
+
vTelQ = TelNorm(rl);
|
|
35
|
+
vec3 S = ${SING};
|
|
36
|
+
// a gentle pull toward the point; the surface breaks into light long before it could smear
|
|
37
|
+
vec3 rel = fxRot(vec3(0.0, 1.0, 0.0), k * k * 0.9) * (rl - S);
|
|
38
|
+
rel.xz *= 1.0 - 0.35 * k;
|
|
39
|
+
rel.y *= 1.0 - 0.22 * k;
|
|
40
|
+
transformed = (inverse(toRoot) * vec4(S + rel, 1.0)).xyz;
|
|
41
|
+
}`,
|
|
42
|
+
fragment: /* glsl */ `
|
|
43
|
+
{
|
|
44
|
+
float cut = 0.1 + 0.35 * fxFbm(vTelQ * 7.0);
|
|
45
|
+
if (vTelK > cut) discard;
|
|
46
|
+
float h = smoothstep(0.0, cut, vTelK);
|
|
47
|
+
outgoingLight = mix(outgoingLight, uTelGlow * (1.5 + 3.5 * h), h);
|
|
48
|
+
}`,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** The beam: an open cylinder drawn as a soft column of light. */
|
|
52
|
+
function createColumn(target, st) {
|
|
53
|
+
const geo = new CylinderGeometry(1, 1, 1, 48, 1, true);
|
|
54
|
+
geo.translate(0, 0.5, 0); // base at the singularity
|
|
55
|
+
const mat = new ShaderMaterial({
|
|
56
|
+
uniforms: { uGlow: st.glow, uTime: st.field.time, uOn: { value: 0 } },
|
|
57
|
+
vertexShader: /* glsl */ `
|
|
58
|
+
varying vec3 vN; varying vec3 vV; varying vec2 vUv;
|
|
59
|
+
void main() {
|
|
60
|
+
vUv = uv;
|
|
61
|
+
vec4 mv = modelViewMatrix * vec4(position, 1.0);
|
|
62
|
+
vN = normalize(normalMatrix * normal);
|
|
63
|
+
vV = normalize(-mv.xyz);
|
|
64
|
+
gl_Position = projectionMatrix * mv;
|
|
65
|
+
}`,
|
|
66
|
+
fragmentShader: /* glsl */ `
|
|
67
|
+
uniform vec3 uGlow; uniform float uTime; uniform float uOn;
|
|
68
|
+
varying vec3 vN; varying vec3 vV; varying vec2 vUv;
|
|
69
|
+
float h1(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
|
|
70
|
+
float n1(vec2 p) { vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f);
|
|
71
|
+
return mix(mix(h1(i), h1(i + vec2(1.0, 0.0)), f.x), mix(h1(i + vec2(0.0, 1.0)), h1(i + vec2(1.0, 1.0)), f.x), f.y); }
|
|
72
|
+
void main() {
|
|
73
|
+
// a column of light is brightest where you look through its core
|
|
74
|
+
float face = pow(abs(dot(vN, vV)), 2.2) * 0.22; // a veil: the object shows through
|
|
75
|
+
// fine streaks flowing up
|
|
76
|
+
float streak = n1(vec2(vUv.x * 60.0, vUv.y * 3.0 - uTime * 2.2)) * n1(vec2(vUv.x * 23.0 + 7.0, vUv.y * 1.5 - uTime * 1.3));
|
|
77
|
+
// thin rings of light climbing the beam
|
|
78
|
+
float rings = pow(max(0.0, 1.0 - abs(fract(vUv.y * 4.0 - uTime * 0.6) - 0.5) * 2.0), 60.0) * (0.4 + 0.6 * (1.0 - face));
|
|
79
|
+
// fade in at the base, thin out toward the top
|
|
80
|
+
float along = smoothstep(0.0, 0.03, vUv.y) * pow(1.0 - vUv.y, 1.1);
|
|
81
|
+
float edge = pow(1.0 - abs(dot(vN, vV)), 3.0) * 0.35; // the column's silhouette
|
|
82
|
+
float I = (face * (0.4 + 1.2 * streak) + edge + rings * 0.7) * along * uOn;
|
|
83
|
+
vec3 c = mix(uGlow, vec3(1.0), 0.25) * I;
|
|
84
|
+
gl_FragColor = vec4(c, clamp(I, 0.0, 1.0));
|
|
85
|
+
#include <tonemapping_fragment>
|
|
86
|
+
#include <colorspace_fragment>
|
|
87
|
+
}`,
|
|
88
|
+
transparent: true, depthWrite: false, blending: AdditiveBlending, premultipliedAlpha: true, side: 2,
|
|
89
|
+
});
|
|
90
|
+
const m = new Mesh(geo, mat);
|
|
91
|
+
m.raycast = () => { };
|
|
92
|
+
m.userData.__opFxHelper = true;
|
|
93
|
+
m.frustumCulled = false;
|
|
94
|
+
m.renderOrder = 12;
|
|
95
|
+
target.add(m);
|
|
96
|
+
hideUntilWarm(m);
|
|
97
|
+
return m;
|
|
98
|
+
}
|
|
99
|
+
/** Place and light the column for the current progress (CPU side). */
|
|
100
|
+
function updateColumn(s) {
|
|
101
|
+
const f = s.field;
|
|
102
|
+
const E = f.extent.value;
|
|
103
|
+
const min = f.boundsMin.value, size = f.boundsSize.value;
|
|
104
|
+
const p = f.progress.value;
|
|
105
|
+
// the column rises around the object as it starts to break up, and fades once it has gone up
|
|
106
|
+
const on = Math.max(0, Math.min(1, (p - 0.02) / 0.3)) * (1 - Math.max(0, Math.min(1, (p - (END - 0.4)) / 0.4)));
|
|
107
|
+
s.column.material.uniforms.uOn.value = on;
|
|
108
|
+
// from the ground, around the object, and on up past it
|
|
109
|
+
s.column.position.set(min.x + size.x / 2, min.y, min.z + size.z / 2);
|
|
110
|
+
const r = Math.max(size.x, size.z) * 0.62 * s.width.value + 0.02 * E;
|
|
111
|
+
s.column.scale.set(r, size.y * (1.2 + s.beam.value), r);
|
|
112
|
+
s.column.visible = on > 0.001;
|
|
113
|
+
}
|
|
114
|
+
export default defineOperation({
|
|
115
|
+
value: 'teleport',
|
|
116
|
+
label: 'Teleport',
|
|
117
|
+
description: 'Draw the targets into a point of light and send them up a beam — reverting brings them back down',
|
|
118
|
+
channel: 'visual',
|
|
119
|
+
multi: true,
|
|
120
|
+
toggles: true,
|
|
121
|
+
usableIn: ['interaction', 'action'],
|
|
122
|
+
params: {
|
|
123
|
+
direction: { type: 'select', label: 'Direction', default: 'down', options: DIRECTION_OPTIONS },
|
|
124
|
+
color: { type: 'color', label: 'Light', default: '#a8ecff' },
|
|
125
|
+
sparks: { type: 'number', label: 'Particles', default: 9000, min: 1000, max: 60000, step: 1000 },
|
|
126
|
+
beam: { type: 'number', label: 'Beam height', default: 3, min: 0.5, max: 10, step: 0.1, unit: '×' },
|
|
127
|
+
width: { type: 'number', label: 'Beam width', default: 1, min: 0.2, max: 4, step: 0.05, unit: '×' },
|
|
128
|
+
scale: { type: 'number', label: 'Pattern', default: 2, min: 0.5, max: 12, step: 0.1 },
|
|
129
|
+
duration: { type: 'number', label: 'Duration', default: 2.8, min: 0.3, max: 12, step: 0.1, unit: 's' },
|
|
130
|
+
},
|
|
131
|
+
apply(target, p, ctx) {
|
|
132
|
+
let st = target.userData[STATE];
|
|
133
|
+
if (!st) {
|
|
134
|
+
const field = createFieldState(target);
|
|
135
|
+
field.edgeWidth.value = 0.1;
|
|
136
|
+
const own = { field, life: { value: LIFE }, glow: { value: new Color() }, beam: { value: 3 }, width: { value: 1 }, mats: new Set() };
|
|
137
|
+
const sample = sampleSurfaceCached(target, Math.round(Number(p.sparks)), 23);
|
|
138
|
+
own.points = createFxPoints(target, sample, {
|
|
139
|
+
additive: true,
|
|
140
|
+
uniforms: { ...fieldUniforms(P, field), uTelLife: own.life, uTelGlow: own.glow, uTelBeam: own.beam, uTelWidth: own.width },
|
|
141
|
+
vertexPars: fieldGlsl(P) + GLSL_POINT_SIZE + GLSL_ROT,
|
|
142
|
+
vertexMain: /* glsl */ `
|
|
143
|
+
float birth = TelBirthOf(TelField(TelNorm(aP)));
|
|
144
|
+
float a = (uTelProgress - birth) / (uTelLife * 1.6);
|
|
145
|
+
if (a <= 0.0 || a >= 1.0) { gl_Position = vec4(2.0, 2.0, 2.0, 1.0); gl_PointSize = 0.0; vColor = vec3(0.0); vAlpha = 0.0; return; }
|
|
146
|
+
float E = uTelExtent;
|
|
147
|
+
vec3 S = ${SING};
|
|
148
|
+
float R = max(u${P}Size.x, u${P}Size.z) * 0.35 * uTelWidth + 0.01 * E;
|
|
149
|
+
vec3 local;
|
|
150
|
+
if (a < 0.5) {
|
|
151
|
+
// spiral smoothly into the point
|
|
152
|
+
float k = a / 0.5; k = k * k * (3.0 - 2.0 * k);
|
|
153
|
+
vec3 rel = fxRot(vec3(0.0, 1.0, 0.0), k * 4.5 + aR.x * 0.4) * (aP - S);
|
|
154
|
+
local = S + rel * (1.0 - k);
|
|
155
|
+
} else {
|
|
156
|
+
// up the beam on a tight helix (a few clean streams, not a random spray)
|
|
157
|
+
float k = (a - 0.5) / 0.5;
|
|
158
|
+
float stream = floor(aR.y * 5.0);
|
|
159
|
+
float ang = stream * 1.2566 + k * 9.0 + u${P}Time * 1.5;
|
|
160
|
+
float rad = R * (0.25 + 0.5 * aR.z) * (1.0 - 0.4 * k);
|
|
161
|
+
local = S + vec3(cos(ang) * rad, k * k * uTelBeam * u${P}Size.y, sin(ang) * rad);
|
|
162
|
+
}
|
|
163
|
+
vec4 mv = modelViewMatrix * vec4(local, 1.0);
|
|
164
|
+
gl_Position = projectionMatrix * mv;
|
|
165
|
+
float fade = smoothstep(0.0, 0.06, a) * (1.0 - smoothstep(0.82, 1.0, a));
|
|
166
|
+
vColor = mix(uTelGlow, vec3(1.0), 0.3 + 0.3 * aR.w) * 1.8;
|
|
167
|
+
vAlpha = fade * 0.85;
|
|
168
|
+
gl_PointSize = clamp(fxPointPx(E * 0.0026 * (0.7 + 0.6 * aR.w), mv), 1.0, 7.0);`,
|
|
169
|
+
});
|
|
170
|
+
own.column = createColumn(target, own);
|
|
171
|
+
const layer = surface(own);
|
|
172
|
+
forEachMeshMaterial(target, (mat, mesh) => {
|
|
173
|
+
if (mesh.userData?.__opFxHelper)
|
|
174
|
+
return;
|
|
175
|
+
if (addLayer(mat, KEY, layer))
|
|
176
|
+
own.mats.add(mat);
|
|
177
|
+
});
|
|
178
|
+
st = own;
|
|
179
|
+
target.userData[STATE] = st;
|
|
180
|
+
}
|
|
181
|
+
const s = st;
|
|
182
|
+
setFieldParams(s.field, p, target, ctx);
|
|
183
|
+
s.glow.value.set(String(p.color));
|
|
184
|
+
s.beam.value = Number(p.beam);
|
|
185
|
+
s.width.value = Number(p.width);
|
|
186
|
+
s.points.visible = true;
|
|
187
|
+
updateColumn(s);
|
|
188
|
+
return runProgress(target, s.field, END, {
|
|
189
|
+
duration: Number(p.duration), ease: 'power1.in',
|
|
190
|
+
onUpdate: () => updateColumn(s),
|
|
191
|
+
onComplete: () => { hideMeshes(target, KEY, true); s.points.visible = false; s.column.visible = false; },
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
revert(target, p) {
|
|
195
|
+
const s = target.userData[STATE];
|
|
196
|
+
if (!s)
|
|
197
|
+
return;
|
|
198
|
+
hideMeshes(target, KEY, false);
|
|
199
|
+
s.points.visible = true;
|
|
200
|
+
return runProgress(target, s.field, 0, {
|
|
201
|
+
duration: Number(p.duration), ease: 'power1.out',
|
|
202
|
+
onUpdate: () => updateColumn(s),
|
|
203
|
+
onComplete: () => {
|
|
204
|
+
s.mats.forEach(m => removeLayer(m, KEY));
|
|
205
|
+
disposeFxPoints(s.points);
|
|
206
|
+
s.column.removeFromParent();
|
|
207
|
+
s.column.geometry.dispose();
|
|
208
|
+
s.column.material.dispose();
|
|
209
|
+
delete target.userData[STATE];
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Box3, Color, Matrix4, Vector3 } from 'three';
|
|
2
|
+
import type { Object3D } from 'three';
|
|
3
|
+
export declare const DIRECTION_OPTIONS: {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
/** The sweeping (non-scattered) directions, for effects that need a front with a side. */
|
|
8
|
+
export declare const SWEEP_OPTIONS: {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
export interface FieldState {
|
|
13
|
+
/** 0 = whole, 1 = the surface is gone (particles may still be in flight, see `tail`). */
|
|
14
|
+
progress: {
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
time: {
|
|
18
|
+
value: number;
|
|
19
|
+
};
|
|
20
|
+
rootInv: {
|
|
21
|
+
value: Matrix4;
|
|
22
|
+
};
|
|
23
|
+
boundsMin: {
|
|
24
|
+
value: Vector3;
|
|
25
|
+
};
|
|
26
|
+
boundsSize: {
|
|
27
|
+
value: Vector3;
|
|
28
|
+
};
|
|
29
|
+
/** Length of the bounds diagonal — the unit every motion is scaled by. */
|
|
30
|
+
extent: {
|
|
31
|
+
value: number;
|
|
32
|
+
};
|
|
33
|
+
scale: {
|
|
34
|
+
value: number;
|
|
35
|
+
};
|
|
36
|
+
direction: {
|
|
37
|
+
value: number;
|
|
38
|
+
};
|
|
39
|
+
edgeWidth: {
|
|
40
|
+
value: number;
|
|
41
|
+
};
|
|
42
|
+
edgeColor: {
|
|
43
|
+
value: Color;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Left → right / right → left: the screen direction at the moment the effect
|
|
47
|
+
* was triggered, in the target's root-local space (unit). Fixed for the run, so
|
|
48
|
+
* the camera moving mid-transition doesn't bend the front.
|
|
49
|
+
*/
|
|
50
|
+
sweep: {
|
|
51
|
+
value: Vector3;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Bounds of `root` in its own (root-local) space. */
|
|
55
|
+
export declare function localBounds(root: Object3D): Box3;
|
|
56
|
+
export declare function createFieldState(root: Object3D): FieldState;
|
|
57
|
+
/** The camera's screen-right, in `root`'s local space (world X when there is no camera). */
|
|
58
|
+
export declare function screenRight(root: Object3D, ctx?: {
|
|
59
|
+
tools?: {
|
|
60
|
+
cameraPose?: () => {
|
|
61
|
+
position: number[];
|
|
62
|
+
target: number[];
|
|
63
|
+
} | null;
|
|
64
|
+
};
|
|
65
|
+
}): Vector3;
|
|
66
|
+
/**
|
|
67
|
+
* Apply the shared knobs. Pass the target and the operation context so the
|
|
68
|
+
* left → right / right → left directions can be taken from the screen at trigger.
|
|
69
|
+
*/
|
|
70
|
+
export declare function setFieldParams(st: FieldState, p: Record<string, unknown>, root?: Object3D, ctx?: any): void;
|
|
71
|
+
export declare const syncRoot: (root: Object3D, st: FieldState) => void;
|
|
72
|
+
/** The field's uniforms under a prefix: `u<P>Progress`, `u<P>RootInv`, … */
|
|
73
|
+
export declare function fieldUniforms(P: string, st: FieldState): Record<string, {
|
|
74
|
+
value: unknown;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* GLSL (after the uniform declarations):
|
|
78
|
+
* <P>Norm(vec3 rootLocal) → q in 0..1 root-local position → normalised
|
|
79
|
+
* <P>Field(vec3 q) → f in 0..1 the field
|
|
80
|
+
* <P>Threshold() → t the front; surface visible where f > t
|
|
81
|
+
* Calm, low-frequency fBm — stretched so the front moves evenly over the whole run.
|
|
82
|
+
*/
|
|
83
|
+
export declare const fieldGlsl: (P: string) => string;
|
|
84
|
+
/** Whether a field state is holding (tests / debugging). */
|
|
85
|
+
export declare const isHolding: (st: FieldState) => boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Run the field's progress to `to`, refreshing the root matrix and the clock
|
|
88
|
+
* every tick. `tail` (in progress units) lets particles finish after the surface
|
|
89
|
+
* is gone: the tween covers 0 → 1 + tail.
|
|
90
|
+
*/
|
|
91
|
+
export declare function runProgress(root: Object3D, st: FieldState, to: number, opts: {
|
|
92
|
+
duration: number;
|
|
93
|
+
ease: string;
|
|
94
|
+
onUpdate?: () => void;
|
|
95
|
+
onComplete?: () => void;
|
|
96
|
+
/** false when the effect runs its own clock */
|
|
97
|
+
clock?: boolean;
|
|
98
|
+
/** Extra work to finish before the clock starts (e.g. shatter's geometry swap). */
|
|
99
|
+
ready?: Promise<unknown>;
|
|
100
|
+
/**
|
|
101
|
+
* A state effect (frost, metalize…): once it has run on, keep the clock and
|
|
102
|
+
* the root matrix running while it holds, so its own motion continues and
|
|
103
|
+
* its pattern stays fixed to an object that moves. Stops when the next run starts.
|
|
104
|
+
*/
|
|
105
|
+
hold?: boolean;
|
|
106
|
+
}): Promise<void>;
|
|
107
|
+
/** The surface part of a transition: discard behind the front, light the edge. */
|
|
108
|
+
export declare function surfaceLayer(P: string, st: FieldState, edge?: 'ember' | 'tint' | 'stain' | 'none'): {
|
|
109
|
+
uniforms: Record<string, {
|
|
110
|
+
value: unknown;
|
|
111
|
+
}>;
|
|
112
|
+
common: string;
|
|
113
|
+
vertex: string;
|
|
114
|
+
fragment: string;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Hide / show the target's own meshes (never the effect's helpers) once a
|
|
118
|
+
* transition has taken the surface away. `tag` keeps each effect's bookkeeping
|
|
119
|
+
* separate, so two effects never restore each other's visibility.
|
|
120
|
+
*/
|
|
121
|
+
export declare function hideMeshes(target: Object3D, tag: string, hidden: boolean): void;
|
|
122
|
+
/** The current direction as a root-local unit vector (up for scattered / centre → out). */
|
|
123
|
+
export declare function sweepVector(st: FieldState): Vector3;
|
|
124
|
+
//# sourceMappingURL=transitionField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transitionField.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/transitionField.ts"],"names":[],"mappings":"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"}
|