@3driseai/3drise-viewer 0.1.28 → 0.1.30
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.map +1 -1
- package/dist/animationsV2/ClipPlayer.js +13 -9
- package/dist/animationsV2/ClipsRuntime.d.ts +48 -3
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +239 -57
- package/dist/animationsV2/appliers.d.ts.map +1 -1
- package/dist/animationsV2/appliers.js +21 -5
- package/dist/animationsV2/clipUtils.js +1 -1
- 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 +7 -3
- package/dist/animationsV2/sequenceUtils.d.ts +49 -6
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
- package/dist/animationsV2/sequenceUtils.js +68 -12
- package/dist/animationsV2/types.d.ts +28 -12
- package/dist/animationsV2/types.d.ts.map +1 -1
- package/dist/api/sceneHandle.d.ts +35 -1
- package/dist/api/sceneHandle.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +88 -17
- package/dist/components/AdvancedGrid.d.ts +1 -5
- package/dist/components/AdvancedGrid.d.ts.map +1 -1
- package/dist/components/AdvancedGrid.js +6 -35
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +9 -4
- package/dist/components/ApollonianGrid.d.ts +1 -1
- package/dist/components/ApollonianGrid.d.ts.map +1 -1
- package/dist/components/ApollonianGrid.js +3 -28
- package/dist/components/ChladniGrid.d.ts +1 -1
- package/dist/components/ChladniGrid.d.ts.map +1 -1
- package/dist/components/ChladniGrid.js +6 -35
- package/dist/components/CircuitGrid.d.ts +1 -1
- package/dist/components/CircuitGrid.d.ts.map +1 -1
- package/dist/components/CircuitGrid.js +6 -34
- package/dist/components/ConformalGrid.d.ts +1 -1
- package/dist/components/ConformalGrid.d.ts.map +1 -1
- package/dist/components/ConformalGrid.js +3 -34
- package/dist/components/ContourGrid.d.ts +1 -1
- package/dist/components/ContourGrid.d.ts.map +1 -1
- package/dist/components/ContourGrid.js +6 -34
- package/dist/components/CustomPrimitive.js +1 -1
- package/dist/components/EffectsGenerator.d.ts.map +1 -1
- package/dist/components/EffectsGenerator.js +43 -38
- package/dist/components/EnvironmentObject.d.ts.map +1 -1
- package/dist/components/EnvironmentObject.js +9 -7
- package/dist/components/FlowNetGrid.d.ts +1 -1
- package/dist/components/FlowNetGrid.d.ts.map +1 -1
- package/dist/components/FlowNetGrid.js +6 -34
- package/dist/components/FractalGrid.d.ts +1 -1
- package/dist/components/FractalGrid.d.ts.map +1 -1
- package/dist/components/FractalGrid.js +6 -37
- package/dist/components/Galaxy.d.ts.map +1 -1
- package/dist/components/Galaxy.js +9 -23
- package/dist/components/GeometryShape.d.ts.map +1 -1
- package/dist/components/GeometryShape.js +22 -2
- package/dist/components/GirihGrid.d.ts +1 -1
- package/dist/components/GirihGrid.d.ts.map +1 -1
- package/dist/components/GirihGrid.js +6 -35
- package/dist/components/GravWaveGrid.d.ts +1 -1
- package/dist/components/GravWaveGrid.d.ts.map +1 -1
- package/dist/components/GravWaveGrid.js +6 -35
- package/dist/components/HexGrid.d.ts +1 -5
- package/dist/components/HexGrid.d.ts.map +1 -1
- package/dist/components/HexGrid.js +6 -36
- package/dist/components/HilbertGrid.d.ts +1 -1
- package/dist/components/HilbertGrid.d.ts.map +1 -1
- package/dist/components/HilbertGrid.js +3 -30
- package/dist/components/HyperbolicGrid.d.ts +1 -1
- package/dist/components/HyperbolicGrid.d.ts.map +1 -1
- package/dist/components/HyperbolicGrid.js +6 -34
- package/dist/components/LandObject.d.ts +9 -0
- package/dist/components/LandObject.d.ts.map +1 -0
- package/dist/components/LandObject.js +15 -0
- package/dist/components/LensingGrid.d.ts +1 -1
- package/dist/components/LensingGrid.d.ts.map +1 -1
- package/dist/components/LensingGrid.js +3 -29
- package/dist/components/LightsManager.d.ts.map +1 -1
- package/dist/components/LightsManager.js +8 -0
- package/dist/components/ModelBoundary.d.ts +2 -0
- package/dist/components/ModelBoundary.d.ts.map +1 -1
- package/dist/components/ModelBoundary.js +3 -0
- package/dist/components/ModelPrimitive.d.ts.map +1 -1
- package/dist/components/ModelPrimitive.js +6 -0
- package/dist/components/MoireGrid.d.ts +1 -1
- package/dist/components/MoireGrid.d.ts.map +1 -1
- package/dist/components/MoireGrid.js +6 -35
- package/dist/components/MoonDisc.d.ts +11 -0
- package/dist/components/MoonDisc.d.ts.map +1 -0
- package/dist/components/MoonDisc.js +128 -0
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +10 -10
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +7 -5
- package/dist/components/OceanBuilder.d.ts.map +1 -1
- package/dist/components/OceanBuilder.js +2 -0
- package/dist/components/ParastichyGrid.d.ts +1 -1
- package/dist/components/ParastichyGrid.d.ts.map +1 -1
- package/dist/components/ParastichyGrid.js +3 -30
- package/dist/components/ParticlesGenerator.d.ts.map +1 -1
- package/dist/components/ParticlesGenerator.js +44 -24
- package/dist/components/PhyllotaxisGrid.d.ts +1 -1
- package/dist/components/PhyllotaxisGrid.d.ts.map +1 -1
- package/dist/components/PhyllotaxisGrid.js +3 -32
- package/dist/components/PickVolume.d.ts +17 -0
- package/dist/components/PickVolume.d.ts.map +1 -0
- package/dist/components/PickVolume.js +20 -0
- package/dist/components/ProjectLoader.d.ts +5 -3
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +6 -3
- package/dist/components/QuasiGrid.d.ts +1 -1
- package/dist/components/QuasiGrid.d.ts.map +1 -1
- package/dist/components/QuasiGrid.js +6 -33
- package/dist/components/RadarGrid.d.ts +1 -1
- package/dist/components/RadarGrid.d.ts.map +1 -1
- package/dist/components/RadarGrid.js +6 -34
- package/dist/components/ReactionDiffusionGrid.d.ts +1 -1
- package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
- package/dist/components/ReactionDiffusionGrid.js +6 -35
- package/dist/components/SceneBuilder.d.ts +25 -3
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +68 -38
- package/dist/components/SkyController.d.ts +25 -1
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +189 -130
- package/dist/components/SkyMesh.d.ts.map +1 -1
- package/dist/components/SkyMesh.js +26 -1
- package/dist/components/SkyStars.d.ts +11 -0
- package/dist/components/SkyStars.d.ts.map +1 -0
- package/dist/components/SkyStars.js +268 -0
- package/dist/components/SkySystem.d.ts +3 -3
- package/dist/components/SkySystem.d.ts.map +1 -1
- package/dist/components/SkySystem.js +8 -2
- package/dist/components/Sun.d.ts +15 -1
- package/dist/components/Sun.d.ts.map +1 -1
- package/dist/components/Sun.js +64 -3
- package/dist/components/SunLight.d.ts +6 -1
- package/dist/components/SunLight.d.ts.map +1 -1
- package/dist/components/SunLight.js +96 -44
- package/dist/components/TerrainBuilder.d.ts.map +1 -1
- package/dist/components/TerrainBuilder.js +2 -0
- package/dist/components/TextGenerator.d.ts +9 -0
- package/dist/components/TextGenerator.d.ts.map +1 -0
- package/dist/components/TextGenerator.js +30 -0
- package/dist/components/TruchetGrid.d.ts +1 -1
- package/dist/components/TruchetGrid.d.ts.map +1 -1
- package/dist/components/TruchetGrid.js +3 -30
- package/dist/components/VoronoiGrid.d.ts +1 -1
- package/dist/components/VoronoiGrid.d.ts.map +1 -1
- package/dist/components/VoronoiGrid.js +6 -33
- package/dist/components/WallpaperGrid.d.ts +1 -1
- package/dist/components/WallpaperGrid.d.ts.map +1 -1
- package/dist/components/WallpaperGrid.js +6 -35
- package/dist/components/environment/Rain.d.ts +15 -0
- package/dist/components/environment/Rain.d.ts.map +1 -0
- package/dist/components/environment/Rain.js +110 -0
- package/dist/components/environment/Rainbow.d.ts +20 -0
- package/dist/components/environment/Rainbow.d.ts.map +1 -0
- package/dist/components/environment/Rainbow.js +974 -0
- package/dist/components/environment/Sandstorm.d.ts +20 -0
- package/dist/components/environment/Sandstorm.d.ts.map +1 -0
- package/dist/components/environment/Sandstorm.js +776 -0
- package/dist/components/environment/Snow.d.ts +20 -0
- package/dist/components/environment/Snow.d.ts.map +1 -0
- package/dist/components/environment/Snow.js +609 -0
- package/dist/components/environment/Thunderstorm.d.ts +20 -0
- package/dist/components/environment/Thunderstorm.d.ts.map +1 -0
- package/dist/components/environment/Thunderstorm.js +731 -0
- package/dist/components/environment/Tornado.d.ts +20 -0
- package/dist/components/environment/Tornado.d.ts.map +1 -0
- package/dist/components/environment/Tornado.js +762 -0
- package/dist/components/environment/index.d.ts +13 -0
- package/dist/components/environment/index.d.ts.map +1 -0
- package/dist/components/environment/index.js +7 -0
- package/dist/components/index.d.ts +11 -18
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +9 -10
- package/dist/components/land/LandPatch.d.ts +15 -0
- package/dist/components/land/LandPatch.d.ts.map +1 -0
- package/dist/components/land/LandPatch.js +170 -0
- package/dist/components/land/index.d.ts +3 -0
- package/dist/components/land/index.d.ts.map +1 -0
- package/dist/components/land/index.js +1 -0
- package/dist/components/particles/BioluminescentWakeParticles.d.ts +5 -0
- package/dist/components/particles/BioluminescentWakeParticles.d.ts.map +1 -1
- package/dist/components/particles/BioluminescentWakeParticles.js +2 -1
- package/dist/components/particles/BrownianDustParticles.d.ts +5 -0
- package/dist/components/particles/BrownianDustParticles.d.ts.map +1 -1
- package/dist/components/particles/BrownianDustParticles.js +2 -0
- package/dist/components/particles/ChladniSandParticles.d.ts +5 -0
- package/dist/components/particles/ChladniSandParticles.d.ts.map +1 -1
- package/dist/components/particles/ChladniSandParticles.js +2 -1
- package/dist/components/particles/ElectronOrbitalsParticles.d.ts +5 -0
- package/dist/components/particles/ElectronOrbitalsParticles.d.ts.map +1 -1
- package/dist/components/particles/ElectronOrbitalsParticles.js +2 -1
- package/dist/components/particles/FaradayPowderParticles.d.ts +5 -0
- package/dist/components/particles/FaradayPowderParticles.d.ts.map +1 -1
- package/dist/components/particles/FaradayPowderParticles.js +2 -1
- package/dist/components/particles/GrinderSparksParticles.d.ts +5 -0
- package/dist/components/particles/GrinderSparksParticles.d.ts.map +1 -1
- package/dist/components/particles/GrinderSparksParticles.js +2 -1
- package/dist/components/particles/MagneticBottleParticles.d.ts +5 -0
- package/dist/components/particles/MagneticBottleParticles.d.ts.map +1 -1
- package/dist/components/particles/MagneticBottleParticles.js +2 -1
- package/dist/components/particles/NeonRainParticles.d.ts +5 -0
- package/dist/components/particles/NeonRainParticles.d.ts.map +1 -1
- package/dist/components/particles/NeonRainParticles.js +2 -1
- package/dist/components/particles/ShapeBurstParticles.d.ts +5 -0
- package/dist/components/particles/ShapeBurstParticles.d.ts.map +1 -1
- package/dist/components/particles/ShapeBurstParticles.js +2 -1
- package/dist/components/particles/ShapeFlowParticles.d.ts +5 -0
- package/dist/components/particles/ShapeFlowParticles.d.ts.map +1 -1
- package/dist/components/particles/ShapeFlowParticles.js +2 -1
- package/dist/components/particles/TidalStreamParticles.d.ts +5 -0
- package/dist/components/particles/TidalStreamParticles.d.ts.map +1 -1
- package/dist/components/particles/TidalStreamParticles.js +2 -0
- package/dist/components/space/Earth.d.ts +16 -0
- package/dist/components/space/Earth.d.ts.map +1 -0
- package/dist/components/space/Earth.js +75 -0
- package/dist/components/space/ShootingStar.d.ts +21 -0
- package/dist/components/space/ShootingStar.d.ts.map +1 -0
- package/dist/components/space/ShootingStar.js +101 -0
- package/dist/components/space/ShootingStars.d.ts +16 -0
- package/dist/components/space/ShootingStars.d.ts.map +1 -0
- package/dist/components/space/ShootingStars.js +71 -0
- package/dist/components/space/SolarSystem.d.ts +16 -0
- package/dist/components/space/SolarSystem.d.ts.map +1 -0
- package/dist/components/space/SolarSystem.js +141 -0
- package/dist/components/space/Stars.d.ts +20 -0
- package/dist/components/space/Stars.d.ts.map +1 -0
- package/dist/components/space/Stars.js +160 -0
- package/dist/components/space/index.d.ts +11 -0
- package/dist/components/space/index.d.ts.map +1 -0
- package/dist/components/space/index.js +8 -0
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +27 -3
- package/dist/components/terrain/types.d.ts +5 -1
- package/dist/components/terrain/types.d.ts.map +1 -1
- package/dist/components/text/BurnAwayText.d.ts +15 -0
- package/dist/components/text/BurnAwayText.d.ts.map +1 -0
- package/dist/components/text/BurnAwayText.js +4 -0
- package/dist/components/text/ChalkboardText.d.ts +15 -0
- package/dist/components/text/ChalkboardText.d.ts.map +1 -0
- package/dist/components/text/ChalkboardText.js +4 -0
- package/dist/components/text/ConstellationText.d.ts +15 -0
- package/dist/components/text/ConstellationText.d.ts.map +1 -0
- package/dist/components/text/ConstellationText.js +4 -0
- package/dist/components/text/EmbroideryText.d.ts +15 -0
- package/dist/components/text/EmbroideryText.d.ts.map +1 -0
- package/dist/components/text/EmbroideryText.js +4 -0
- package/dist/components/text/FourierSketchText.d.ts +15 -0
- package/dist/components/text/FourierSketchText.d.ts.map +1 -0
- package/dist/components/text/FourierSketchText.js +4 -0
- package/dist/components/text/FrostGrowthText.d.ts +15 -0
- package/dist/components/text/FrostGrowthText.d.ts.map +1 -0
- package/dist/components/text/FrostGrowthText.js +4 -0
- package/dist/components/text/HandwritingText.d.ts +15 -0
- package/dist/components/text/HandwritingText.d.ts.map +1 -0
- package/dist/components/text/HandwritingText.js +4 -0
- package/dist/components/text/InkBleedText.d.ts +15 -0
- package/dist/components/text/InkBleedText.d.ts.map +1 -0
- package/dist/components/text/InkBleedText.js +4 -0
- package/dist/components/text/LightPaintingText.d.ts +15 -0
- package/dist/components/text/LightPaintingText.d.ts.map +1 -0
- package/dist/components/text/LightPaintingText.js +4 -0
- package/dist/components/text/LiquidMetalText.d.ts +15 -0
- package/dist/components/text/LiquidMetalText.d.ts.map +1 -0
- package/dist/components/text/LiquidMetalText.js +4 -0
- package/dist/components/text/NeonTubeText.d.ts +15 -0
- package/dist/components/text/NeonTubeText.d.ts.map +1 -0
- package/dist/components/text/NeonTubeText.js +4 -0
- package/dist/components/text/PlainText.d.ts +15 -0
- package/dist/components/text/PlainText.d.ts.map +1 -0
- package/dist/components/text/PlainText.js +4 -0
- package/dist/components/text/PlasmaDischargeText.d.ts +15 -0
- package/dist/components/text/PlasmaDischargeText.d.ts.map +1 -0
- package/dist/components/text/PlasmaDischargeText.js +4 -0
- package/dist/components/text/TextObjectView.d.ts +14 -0
- package/dist/components/text/TextObjectView.d.ts.map +1 -0
- package/dist/components/text/TextObjectView.js +17 -0
- package/dist/components/text/engine/fieldkit.d.ts +24 -0
- package/dist/components/text/engine/fieldkit.d.ts.map +1 -0
- package/dist/components/text/engine/fieldkit.js +201 -0
- package/dist/components/text/engine/glyphs.d.ts +19 -0
- package/dist/components/text/engine/glyphs.d.ts.map +1 -0
- package/dist/components/text/engine/glyphs.js +269 -0
- package/dist/components/text/engine/looks/burnAway.d.ts +144 -0
- package/dist/components/text/engine/looks/burnAway.d.ts.map +1 -0
- package/dist/components/text/engine/looks/burnAway.js +593 -0
- package/dist/components/text/engine/looks/chalkboard.d.ts +135 -0
- package/dist/components/text/engine/looks/chalkboard.d.ts.map +1 -0
- package/dist/components/text/engine/looks/chalkboard.js +426 -0
- package/dist/components/text/engine/looks/constellation.d.ts +111 -0
- package/dist/components/text/engine/looks/constellation.d.ts.map +1 -0
- package/dist/components/text/engine/looks/constellation.js +496 -0
- package/dist/components/text/engine/looks/embroidery.d.ts +165 -0
- package/dist/components/text/engine/looks/embroidery.d.ts.map +1 -0
- package/dist/components/text/engine/looks/embroidery.js +645 -0
- package/dist/components/text/engine/looks/frostGrowth.d.ts +109 -0
- package/dist/components/text/engine/looks/frostGrowth.d.ts.map +1 -0
- package/dist/components/text/engine/looks/frostGrowth.js +727 -0
- package/dist/components/text/engine/looks/index.d.ts +2 -0
- package/dist/components/text/engine/looks/index.d.ts.map +1 -0
- package/dist/components/text/engine/looks/index.js +49 -0
- package/dist/components/text/engine/looks/inkBleed.d.ts +103 -0
- package/dist/components/text/engine/looks/inkBleed.d.ts.map +1 -0
- package/dist/components/text/engine/looks/inkBleed.js +590 -0
- package/dist/components/text/engine/looks/lightPainting.d.ts +132 -0
- package/dist/components/text/engine/looks/lightPainting.d.ts.map +1 -0
- package/dist/components/text/engine/looks/lightPainting.js +567 -0
- package/dist/components/text/engine/looks/liquidMetal.d.ts +135 -0
- package/dist/components/text/engine/looks/liquidMetal.d.ts.map +1 -0
- package/dist/components/text/engine/looks/liquidMetal.js +655 -0
- package/dist/components/text/engine/looks/plain.d.ts +146 -0
- package/dist/components/text/engine/looks/plain.d.ts.map +1 -0
- package/dist/components/text/engine/looks/plain.js +104 -0
- package/dist/components/text/engine/looks/plasmaDischarge.d.ts +126 -0
- package/dist/components/text/engine/looks/plasmaDischarge.d.ts.map +1 -0
- package/dist/components/text/engine/looks/plasmaDischarge.js +763 -0
- package/dist/components/text/engine/methods.d.ts +19 -0
- package/dist/components/text/engine/methods.d.ts.map +1 -0
- package/dist/components/text/engine/methods.js +126 -0
- package/dist/components/text/engine/playback.d.ts +40 -0
- package/dist/components/text/engine/playback.d.ts.map +1 -0
- package/dist/components/text/engine/playback.js +114 -0
- package/dist/components/text/engine/ribbon.d.ts +58 -0
- package/dist/components/text/engine/ribbon.d.ts.map +1 -0
- package/dist/components/text/engine/ribbon.js +250 -0
- package/dist/components/text/engine/variants.d.ts +159 -0
- package/dist/components/text/engine/variants.d.ts.map +1 -0
- package/dist/components/text/engine/variants.js +378 -0
- package/dist/components/text/fonts/architects-daughter.outline.d.ts +3 -0
- package/dist/components/text/fonts/architects-daughter.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/architects-daughter.outline.js +4 -0
- package/dist/components/text/fonts/architects-daughter.strokes.d.ts +3 -0
- package/dist/components/text/fonts/architects-daughter.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/architects-daughter.strokes.js +4 -0
- package/dist/components/text/fonts/bebas-neue.outline.d.ts +3 -0
- package/dist/components/text/fonts/bebas-neue.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/bebas-neue.outline.js +4 -0
- package/dist/components/text/fonts/bebas-neue.strokes.d.ts +3 -0
- package/dist/components/text/fonts/bebas-neue.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/bebas-neue.strokes.js +4 -0
- package/dist/components/text/fonts/caveat.outline.d.ts +3 -0
- package/dist/components/text/fonts/caveat.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/caveat.outline.js +4 -0
- package/dist/components/text/fonts/caveat.strokes.d.ts +3 -0
- package/dist/components/text/fonts/caveat.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/caveat.strokes.js +4 -0
- package/dist/components/text/fonts/courgette.outline.d.ts +3 -0
- package/dist/components/text/fonts/courgette.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/courgette.outline.js +4 -0
- package/dist/components/text/fonts/courgette.strokes.d.ts +3 -0
- package/dist/components/text/fonts/courgette.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/courgette.strokes.js +4 -0
- package/dist/components/text/fonts/dancing-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/dancing-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/dancing-script.outline.js +4 -0
- package/dist/components/text/fonts/dancing-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/dancing-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/dancing-script.strokes.js +4 -0
- package/dist/components/text/fonts/gochi-hand.outline.d.ts +3 -0
- package/dist/components/text/fonts/gochi-hand.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/gochi-hand.outline.js +4 -0
- package/dist/components/text/fonts/gochi-hand.strokes.d.ts +3 -0
- package/dist/components/text/fonts/gochi-hand.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/gochi-hand.strokes.js +4 -0
- package/dist/components/text/fonts/handlee.outline.d.ts +3 -0
- package/dist/components/text/fonts/handlee.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/handlee.outline.js +4 -0
- package/dist/components/text/fonts/handlee.strokes.d.ts +3 -0
- package/dist/components/text/fonts/handlee.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/handlee.strokes.js +4 -0
- package/dist/components/text/fonts/index.d.ts +5 -0
- package/dist/components/text/fonts/index.d.ts.map +1 -0
- package/dist/components/text/fonts/index.js +58 -0
- package/dist/components/text/fonts/indie-flower.outline.d.ts +3 -0
- package/dist/components/text/fonts/indie-flower.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/indie-flower.outline.js +4 -0
- package/dist/components/text/fonts/indie-flower.strokes.d.ts +3 -0
- package/dist/components/text/fonts/indie-flower.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/indie-flower.strokes.js +4 -0
- package/dist/components/text/fonts/inter.outline.d.ts +3 -0
- package/dist/components/text/fonts/inter.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/inter.outline.js +4 -0
- package/dist/components/text/fonts/inter.strokes.d.ts +3 -0
- package/dist/components/text/fonts/inter.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/inter.strokes.js +4 -0
- package/dist/components/text/fonts/kalam.outline.d.ts +3 -0
- package/dist/components/text/fonts/kalam.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/kalam.outline.js +4 -0
- package/dist/components/text/fonts/kalam.strokes.d.ts +3 -0
- package/dist/components/text/fonts/kalam.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/kalam.strokes.js +4 -0
- package/dist/components/text/fonts/kaushan-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/kaushan-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/kaushan-script.outline.js +4 -0
- package/dist/components/text/fonts/kaushan-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/kaushan-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/kaushan-script.strokes.js +4 -0
- package/dist/components/text/fonts/lora.outline.d.ts +3 -0
- package/dist/components/text/fonts/lora.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/lora.outline.js +4 -0
- package/dist/components/text/fonts/lora.strokes.d.ts +3 -0
- package/dist/components/text/fonts/lora.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/lora.strokes.js +4 -0
- package/dist/components/text/fonts/montserrat.outline.d.ts +3 -0
- package/dist/components/text/fonts/montserrat.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/montserrat.outline.js +4 -0
- package/dist/components/text/fonts/montserrat.strokes.d.ts +3 -0
- package/dist/components/text/fonts/montserrat.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/montserrat.strokes.js +4 -0
- package/dist/components/text/fonts/mynerve.outline.d.ts +3 -0
- package/dist/components/text/fonts/mynerve.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/mynerve.outline.js +4 -0
- package/dist/components/text/fonts/mynerve.strokes.d.ts +3 -0
- package/dist/components/text/fonts/mynerve.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/mynerve.strokes.js +4 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.js +4 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.js +4 -0
- package/dist/components/text/fonts/oswald.outline.d.ts +3 -0
- package/dist/components/text/fonts/oswald.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/oswald.outline.js +4 -0
- package/dist/components/text/fonts/oswald.strokes.d.ts +3 -0
- package/dist/components/text/fonts/oswald.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/oswald.strokes.js +4 -0
- package/dist/components/text/fonts/pacifico.outline.d.ts +3 -0
- package/dist/components/text/fonts/pacifico.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/pacifico.outline.js +4 -0
- package/dist/components/text/fonts/pacifico.strokes.d.ts +3 -0
- package/dist/components/text/fonts/pacifico.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/pacifico.strokes.js +4 -0
- package/dist/components/text/fonts/patrick-hand.outline.d.ts +3 -0
- package/dist/components/text/fonts/patrick-hand.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/patrick-hand.outline.js +4 -0
- package/dist/components/text/fonts/patrick-hand.strokes.d.ts +3 -0
- package/dist/components/text/fonts/patrick-hand.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/patrick-hand.strokes.js +4 -0
- package/dist/components/text/fonts/playfair-display.outline.d.ts +3 -0
- package/dist/components/text/fonts/playfair-display.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/playfair-display.outline.js +4 -0
- package/dist/components/text/fonts/playfair-display.strokes.d.ts +3 -0
- package/dist/components/text/fonts/playfair-display.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/playfair-display.strokes.js +4 -0
- package/dist/components/text/fonts/poppins.outline.d.ts +3 -0
- package/dist/components/text/fonts/poppins.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/poppins.outline.js +4 -0
- package/dist/components/text/fonts/poppins.strokes.d.ts +3 -0
- package/dist/components/text/fonts/poppins.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/poppins.strokes.js +4 -0
- package/dist/components/text/fonts/roboto.outline.d.ts +3 -0
- package/dist/components/text/fonts/roboto.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/roboto.outline.js +4 -0
- package/dist/components/text/fonts/roboto.strokes.d.ts +3 -0
- package/dist/components/text/fonts/roboto.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/roboto.strokes.js +4 -0
- package/dist/components/text/fonts/satisfy.outline.d.ts +3 -0
- package/dist/components/text/fonts/satisfy.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/satisfy.outline.js +4 -0
- package/dist/components/text/fonts/satisfy.strokes.d.ts +3 -0
- package/dist/components/text/fonts/satisfy.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/satisfy.strokes.js +4 -0
- package/dist/components/text/fonts/sriracha.outline.d.ts +3 -0
- package/dist/components/text/fonts/sriracha.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/sriracha.outline.js +4 -0
- package/dist/components/text/fonts/sriracha.strokes.d.ts +3 -0
- package/dist/components/text/fonts/sriracha.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/sriracha.strokes.js +4 -0
- package/dist/components/text/index.d.ts +29 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +14 -0
- package/dist/components/text/useTextObject.d.ts +22 -0
- package/dist/components/text/useTextObject.d.ts.map +1 -0
- package/dist/components/text/useTextObject.js +130 -0
- package/dist/components/water/OceanSurface.d.ts.map +1 -1
- package/dist/components/water/OceanSurface.js +3 -1
- package/dist/components/water/WaterBody.d.ts.map +1 -1
- package/dist/components/water/WaterBody.js +3 -1
- package/dist/components/water/types.d.ts +5 -1
- package/dist/components/water/types.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -0
- 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/useCloudSun.d.ts +9 -4
- package/dist/hooks/useCloudSun.d.ts.map +1 -1
- package/dist/hooks/useCloudSun.js +17 -7
- package/dist/hooks/useConfigLive.d.ts +3 -2
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.js +4 -10
- package/dist/hooks/useEnvironmentProbe.d.ts +3 -22
- package/dist/hooks/useEnvironmentProbe.d.ts.map +1 -1
- package/dist/hooks/useEnvironmentProbe.js +47 -8
- package/dist/hooks/useGridSurface.d.ts +3 -10
- package/dist/hooks/useGridSurface.d.ts.map +1 -1
- package/dist/hooks/useGridSurface.js +5 -31
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +19 -72
- package/dist/hooks/useLightConfig.d.ts +2 -1
- package/dist/hooks/useLightConfig.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.d.ts +6 -2
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +37 -2
- package/dist/hooks/useSkyLive.d.ts +23 -0
- package/dist/hooks/useSkyLive.d.ts.map +1 -0
- package/dist/hooks/useSkyLive.js +30 -0
- package/dist/hooks/useSkyUniforms.d.ts.map +1 -1
- package/dist/hooks/useSkyUniforms.js +2 -10
- package/dist/hooks/useTerrainLive.d.ts +3 -1
- package/dist/hooks/useTerrainLive.d.ts.map +1 -1
- package/dist/hooks/useTerrainTextures.d.ts +38 -0
- package/dist/hooks/useTerrainTextures.d.ts.map +1 -0
- package/dist/hooks/useTerrainTextures.js +149 -0
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/operations/catalogue/blastOff.d.ts +3 -0
- package/dist/operations/catalogue/blastOff.d.ts.map +1 -0
- package/dist/operations/catalogue/blastOff.js +118 -0
- package/dist/operations/catalogue/bounce.d.ts +3 -0
- package/dist/operations/catalogue/bounce.d.ts.map +1 -0
- package/dist/operations/catalogue/bounce.js +34 -0
- package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -1
- package/dist/operations/catalogue/curlSmoke.js +3 -1
- package/dist/operations/catalogue/dissolve.d.ts.map +1 -1
- package/dist/operations/catalogue/dissolve.js +2 -1
- package/dist/operations/catalogue/driftUp.d.ts +3 -0
- package/dist/operations/catalogue/driftUp.d.ts.map +1 -0
- package/dist/operations/catalogue/driftUp.js +57 -0
- package/dist/operations/catalogue/emberAsh.d.ts.map +1 -1
- package/dist/operations/catalogue/emberAsh.js +2 -1
- package/dist/operations/catalogue/flip.d.ts.map +1 -1
- package/dist/operations/catalogue/flip.js +19 -9
- package/dist/operations/catalogue/float.d.ts +3 -0
- package/dist/operations/catalogue/float.d.ts.map +1 -0
- package/dist/operations/catalogue/float.js +39 -0
- package/dist/operations/catalogue/flock.d.ts.map +1 -1
- package/dist/operations/catalogue/flock.js +44 -9
- package/dist/operations/catalogue/flyBy.d.ts +3 -0
- package/dist/operations/catalogue/flyBy.d.ts.map +1 -0
- package/dist/operations/catalogue/flyBy.js +79 -0
- package/dist/operations/catalogue/frost.d.ts.map +1 -1
- package/dist/operations/catalogue/frost.js +10 -3
- package/dist/operations/catalogue/grow.d.ts +3 -0
- package/dist/operations/catalogue/grow.d.ts.map +1 -0
- package/dist/operations/catalogue/grow.js +19 -0
- package/dist/operations/catalogue/hologram.d.ts.map +1 -1
- package/dist/operations/catalogue/hologram.js +11 -5
- package/dist/operations/catalogue/inkBloom.d.ts.map +1 -1
- package/dist/operations/catalogue/inkBloom.js +46 -9
- package/dist/operations/catalogue/jelly.d.ts.map +1 -1
- package/dist/operations/catalogue/jelly.js +18 -8
- package/dist/operations/catalogue/knockAway.d.ts +3 -0
- package/dist/operations/catalogue/knockAway.d.ts.map +1 -0
- package/dist/operations/catalogue/knockAway.js +74 -0
- package/dist/operations/catalogue/leafFall.d.ts +3 -0
- package/dist/operations/catalogue/leafFall.d.ts.map +1 -0
- package/dist/operations/catalogue/leafFall.js +74 -0
- package/dist/operations/catalogue/lidarScan.d.ts.map +1 -1
- package/dist/operations/catalogue/lidarScan.js +4 -1
- package/dist/operations/catalogue/liquidMetal.d.ts.map +1 -1
- package/dist/operations/catalogue/liquidMetal.js +41 -12
- package/dist/operations/catalogue/metalize.d.ts.map +1 -1
- package/dist/operations/catalogue/metalize.js +8 -2
- package/dist/operations/catalogue/motionTrail.d.ts +6 -0
- package/dist/operations/catalogue/motionTrail.d.ts.map +1 -0
- package/dist/operations/catalogue/motionTrail.js +221 -0
- package/dist/operations/catalogue/particleSwarm.d.ts.map +1 -1
- package/dist/operations/catalogue/particleSwarm.js +29 -9
- package/dist/operations/catalogue/petalPeel.d.ts.map +1 -1
- package/dist/operations/catalogue/petalPeel.js +33 -9
- package/dist/operations/catalogue/petrify.d.ts.map +1 -1
- package/dist/operations/catalogue/petrify.js +9 -3
- package/dist/operations/catalogue/physicalExit.d.ts +55 -0
- package/dist/operations/catalogue/physicalExit.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalExit.js +165 -0
- package/dist/operations/catalogue/physicalHeld.d.ts +41 -0
- package/dist/operations/catalogue/physicalHeld.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalHeld.js +78 -0
- package/dist/operations/catalogue/physicalMix.d.ts +45 -0
- package/dist/operations/catalogue/physicalMix.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalMix.js +144 -0
- package/dist/operations/catalogue/pop.d.ts +3 -0
- package/dist/operations/catalogue/pop.d.ts.map +1 -0
- package/dist/operations/catalogue/pop.js +44 -0
- package/dist/operations/catalogue/portal.d.ts.map +1 -1
- package/dist/operations/catalogue/portal.js +33 -11
- package/dist/operations/catalogue/print3d.d.ts.map +1 -1
- package/dist/operations/catalogue/print3d.js +5 -1
- package/dist/operations/catalogue/pulse.d.ts +3 -0
- package/dist/operations/catalogue/pulse.d.ts.map +1 -0
- package/dist/operations/catalogue/pulse.js +29 -0
- package/dist/operations/catalogue/restPose.d.ts +5 -7
- package/dist/operations/catalogue/restPose.d.ts.map +1 -1
- package/dist/operations/catalogue/restPose.js +18 -48
- package/dist/operations/catalogue/rotate.d.ts +3 -0
- package/dist/operations/catalogue/rotate.d.ts.map +1 -0
- package/dist/operations/catalogue/rotate.js +49 -0
- package/dist/operations/catalogue/sandErosion.d.ts.map +1 -1
- package/dist/operations/catalogue/sandErosion.js +36 -14
- package/dist/operations/catalogue/shake.d.ts +3 -0
- package/dist/operations/catalogue/shake.d.ts.map +1 -0
- package/dist/operations/catalogue/shake.js +31 -0
- package/dist/operations/catalogue/shatter.d.ts.map +1 -1
- package/dist/operations/catalogue/shatter.js +5 -1
- package/dist/operations/catalogue/slam.d.ts +3 -0
- package/dist/operations/catalogue/slam.d.ts.map +1 -0
- package/dist/operations/catalogue/slam.js +89 -0
- package/dist/operations/catalogue/slingshot.d.ts +3 -0
- package/dist/operations/catalogue/slingshot.d.ts.map +1 -0
- package/dist/operations/catalogue/slingshot.js +88 -0
- package/dist/operations/catalogue/spin.d.ts.map +1 -1
- package/dist/operations/catalogue/spin.js +24 -13
- package/dist/operations/catalogue/sway.d.ts +3 -0
- package/dist/operations/catalogue/sway.d.ts.map +1 -0
- package/dist/operations/catalogue/sway.js +23 -0
- package/dist/operations/catalogue/swirl.d.ts.map +1 -1
- package/dist/operations/catalogue/swirl.js +6 -5
- package/dist/operations/catalogue/teleport.d.ts.map +1 -1
- package/dist/operations/catalogue/teleport.js +43 -12
- package/dist/operations/catalogue/trailCore.d.ts +89 -0
- package/dist/operations/catalogue/trailCore.d.ts.map +1 -0
- package/dist/operations/catalogue/trailCore.js +190 -0
- package/dist/operations/catalogue/trailGhosts.d.ts +5 -0
- package/dist/operations/catalogue/trailGhosts.d.ts.map +1 -0
- package/dist/operations/catalogue/trailGhosts.js +179 -0
- package/dist/operations/catalogue/trailStampStyles.d.ts +11 -0
- package/dist/operations/catalogue/trailStampStyles.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStampStyles.js +479 -0
- package/dist/operations/catalogue/trailStamps.d.ts +57 -0
- package/dist/operations/catalogue/trailStamps.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStamps.js +349 -0
- package/dist/operations/catalogue/trailStreaks.d.ts +3 -0
- package/dist/operations/catalogue/trailStreaks.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStreaks.js +147 -0
- package/dist/operations/catalogue/transitionField.d.ts +30 -0
- package/dist/operations/catalogue/transitionField.d.ts.map +1 -1
- package/dist/operations/catalogue/transitionField.js +21 -0
- package/dist/operations/catalogue/turnAway.d.ts +3 -0
- package/dist/operations/catalogue/turnAway.d.ts.map +1 -0
- package/dist/operations/catalogue/turnAway.js +54 -0
- package/dist/operations/catalogue/unweave.d.ts.map +1 -1
- package/dist/operations/catalogue/unweave.js +34 -15
- package/dist/operations/catalogue/vortexDrain.d.ts +3 -0
- package/dist/operations/catalogue/vortexDrain.d.ts.map +1 -0
- package/dist/operations/catalogue/vortexDrain.js +68 -0
- package/dist/operations/catalogue/voxelize.d.ts.map +1 -1
- package/dist/operations/catalogue/voxelize.js +37 -10
- package/dist/operations/catalogue/warp.d.ts +3 -0
- package/dist/operations/catalogue/warp.d.ts.map +1 -0
- package/dist/operations/catalogue/warp.js +73 -0
- package/dist/operations/catalogue/whoosh.d.ts +3 -0
- package/dist/operations/catalogue/whoosh.d.ts.map +1 -0
- package/dist/operations/catalogue/whoosh.js +84 -0
- package/dist/operations/catalogue/wobble.d.ts +3 -0
- package/dist/operations/catalogue/wobble.d.ts.map +1 -0
- package/dist/operations/catalogue/wobble.js +23 -0
- package/dist/operations/clipPreview.d.ts +3 -0
- package/dist/operations/clipPreview.d.ts.map +1 -0
- package/dist/operations/clipPreview.js +20 -0
- package/dist/operations/groupFanout.d.ts +96 -0
- package/dist/operations/groupFanout.d.ts.map +1 -0
- package/dist/operations/groupFanout.js +365 -0
- package/dist/operations/groups.d.ts +20 -0
- package/dist/operations/groups.d.ts.map +1 -0
- package/dist/operations/groups.js +66 -0
- package/dist/operations/index.d.ts +5 -2
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +5 -2
- package/dist/operations/objectEffects.d.ts +161 -6
- package/dist/operations/objectEffects.d.ts.map +1 -1
- package/dist/operations/objectEffects.js +1091 -17
- package/dist/operations/registry.d.ts.map +1 -1
- package/dist/operations/registry.js +24 -2
- package/dist/operations/runtime.d.ts +57 -2
- package/dist/operations/runtime.d.ts.map +1 -1
- package/dist/operations/runtime.js +161 -18
- package/dist/operations/types.d.ts +60 -3
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +5 -1
- package/dist/operations/useObjectEffectLayers.d.ts +2 -2
- package/dist/operations/useObjectEffectLayers.d.ts.map +1 -1
- package/dist/operations/useObjectEffectLayers.js +31 -10
- package/dist/operations/usePresentedVisibility.d.ts +10 -0
- package/dist/operations/usePresentedVisibility.d.ts.map +1 -0
- package/dist/operations/usePresentedVisibility.js +53 -0
- package/dist/presets/terrainBiomes.d.ts +67 -0
- package/dist/presets/terrainBiomes.d.ts.map +1 -0
- package/dist/presets/terrainBiomes.js +294 -0
- package/dist/presets/terrainPresets.d.ts +6 -0
- package/dist/presets/terrainPresets.d.ts.map +1 -1
- package/dist/presets/terrainPresets.js +26 -38
- package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
- package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/oceanCore.glsl.js +17 -0
- package/dist/shaders/glsl/surfaceCore.glsl.d.ts +21 -0
- package/dist/shaders/glsl/surfaceCore.glsl.d.ts.map +1 -0
- package/dist/shaders/glsl/surfaceCore.glsl.js +120 -0
- package/dist/shaders/glsl/terrainCore.glsl.d.ts +16 -3
- package/dist/shaders/glsl/terrainCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/terrainCore.glsl.js +266 -20
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +2 -0
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
- package/dist/shaders/ocean/OceanSurfaceMaterial.js +3 -0
- package/dist/shaders/terrain/TerrainMaterial.d.ts +17 -0
- package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
- package/dist/shaders/terrain/TerrainMaterial.js +107 -8
- package/dist/triggers/engine.d.ts +44 -0
- package/dist/triggers/engine.d.ts.map +1 -0
- package/dist/triggers/engine.js +168 -0
- package/dist/triggers/hosts/actions.d.ts +8 -0
- package/dist/triggers/hosts/actions.d.ts.map +1 -0
- package/dist/triggers/hosts/actions.js +22 -0
- package/dist/triggers/hosts/interactions.d.ts +6 -0
- package/dist/triggers/hosts/interactions.d.ts.map +1 -0
- package/dist/triggers/hosts/interactions.js +4 -0
- package/dist/triggers/hosts/timelineCues.d.ts +2 -0
- package/dist/triggers/hosts/timelineCues.d.ts.map +1 -0
- package/dist/triggers/hosts/timelineCues.js +22 -0
- package/dist/triggers/index.d.ts +13 -0
- package/dist/triggers/index.d.ts.map +1 -0
- package/dist/triggers/index.js +9 -0
- package/dist/triggers/kinds/action.d.ts +2 -0
- package/dist/triggers/kinds/action.d.ts.map +1 -0
- package/dist/triggers/kinds/action.js +31 -0
- package/dist/triggers/kinds/animations.d.ts +2 -0
- package/dist/triggers/kinds/animations.d.ts.map +1 -0
- package/dist/triggers/kinds/animations.js +75 -0
- package/dist/triggers/kinds/effects.d.ts +2 -0
- package/dist/triggers/kinds/effects.d.ts.map +1 -0
- package/dist/triggers/kinds/effects.js +27 -0
- package/dist/triggers/kinds/index.d.ts +4 -0
- package/dist/triggers/kinds/index.d.ts.map +1 -0
- package/dist/triggers/kinds/index.js +4 -0
- package/dist/triggers/log.d.ts +21 -0
- package/dist/triggers/log.d.ts.map +1 -0
- package/dist/triggers/log.js +43 -0
- package/dist/triggers/readiness.d.ts +40 -0
- package/dist/triggers/readiness.d.ts.map +1 -0
- package/dist/triggers/readiness.js +158 -0
- package/dist/triggers/registry.d.ts +41 -0
- package/dist/triggers/registry.d.ts.map +1 -0
- package/dist/triggers/registry.js +7 -0
- package/dist/types/gridConfigs.d.ts +18 -23
- package/dist/types/gridConfigs.d.ts.map +1 -1
- package/dist/ui/UiAnchorUpdater.d.ts +10 -0
- package/dist/ui/UiAnchorUpdater.d.ts.map +1 -0
- package/dist/ui/UiAnchorUpdater.js +111 -0
- package/dist/ui/UiLayers.d.ts +20 -0
- package/dist/ui/UiLayers.d.ts.map +1 -0
- package/dist/ui/UiLayers.js +57 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/uiAnchors.d.ts +21 -0
- package/dist/ui/uiAnchors.d.ts.map +1 -0
- package/dist/ui/uiAnchors.js +22 -0
- package/dist/ui/uiBaseStyles.d.ts +2 -0
- package/dist/ui/uiBaseStyles.d.ts.map +1 -0
- package/dist/ui/uiBaseStyles.js +100 -0
- package/dist/ui/uiBinder.d.ts +30 -0
- package/dist/ui/uiBinder.d.ts.map +1 -0
- package/dist/ui/uiBinder.js +344 -0
- package/dist/utils/configAnimations.d.ts.map +1 -1
- package/dist/utils/configAnimations.js +5 -1
- package/dist/utils/gridConfig.d.ts +1 -1
- package/dist/utils/gridConfig.d.ts.map +1 -1
- package/dist/utils/gridConfig.js +1 -1
- package/dist/utils/landPatch.d.ts +33 -0
- package/dist/utils/landPatch.d.ts.map +1 -0
- package/dist/utils/landPatch.js +114 -0
- package/dist/utils/pickProxy.d.ts +11 -0
- package/dist/utils/pickProxy.d.ts.map +1 -0
- package/dist/utils/pickProxy.js +36 -0
- package/dist/utils/renderedSky.d.ts +32 -0
- package/dist/utils/renderedSky.d.ts.map +1 -0
- package/dist/utils/renderedSky.js +57 -0
- package/dist/utils/shapes.d.ts +4 -0
- package/dist/utils/shapes.d.ts.map +1 -1
- package/dist/utils/shapes.js +4 -1
- package/dist/utils/skyMoon.d.ts +35 -0
- package/dist/utils/skyMoon.d.ts.map +1 -0
- package/dist/utils/skyMoon.js +41 -0
- package/dist/utils/terrainHeight.d.ts +4 -0
- package/dist/utils/terrainHeight.d.ts.map +1 -0
- package/dist/utils/terrainHeight.js +150 -0
- package/dist/utils/terrainTextureResolver.d.ts +18 -0
- package/dist/utils/terrainTextureResolver.d.ts.map +1 -0
- package/dist/utils/terrainTextureResolver.js +17 -0
- package/dist/utils/terrainUniforms.d.ts +17 -0
- package/dist/utils/terrainUniforms.d.ts.map +1 -1
- package/dist/utils/terrainUniforms.js +84 -0
- package/dist/utils/textShape.d.ts +24 -0
- package/dist/utils/textShape.d.ts.map +1 -0
- package/dist/utils/textShape.js +102 -0
- package/dist/utils/textureArrays.d.ts +29 -0
- package/dist/utils/textureArrays.d.ts.map +1 -0
- package/dist/utils/textureArrays.js +140 -0
- package/package.json +2 -2
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// rotation (inner rings faster, like a disc). While it is on, the swarm keeps
|
|
5
5
|
// turning. Reverting pulls every particle back to its exact spot and the
|
|
6
6
|
// surface closes behind them.
|
|
7
|
+
// With Disappear off (an object effect's default) the object stays as a particle
|
|
8
|
+
// cloud in its own shape: every particle on its spot, twinkling and breathing.
|
|
7
9
|
import { gsap } from 'gsap';
|
|
8
10
|
import { defineOperation } from '../types.js';
|
|
9
11
|
import { addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
@@ -18,17 +20,19 @@ const FLIGHT = 0.5;
|
|
|
18
20
|
export default defineOperation({
|
|
19
21
|
value: 'particleSwarm',
|
|
20
22
|
label: 'Particle swarm',
|
|
21
|
-
description: 'Break the targets into their own coloured particles that swirl around them — reverting reassembles',
|
|
23
|
+
description: 'Break the targets into their own coloured particles that swirl around them (or, Disappear off, stay as a particle cloud) — reverting reassembles',
|
|
22
24
|
channel: 'visual',
|
|
23
25
|
multi: true,
|
|
24
26
|
toggles: true,
|
|
25
|
-
usableIn: ['interaction', 'action'],
|
|
27
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
28
|
+
objectParams: { disappear: false },
|
|
26
29
|
params: {
|
|
27
30
|
direction: { type: 'select', label: 'Direction', default: 'up', options: DIRECTION_OPTIONS },
|
|
31
|
+
disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the object stays as a cloud of particles in its own shape' },
|
|
28
32
|
particles: { type: 'number', label: 'Particles', default: 30000, min: 2000, max: 120000, step: 1000 },
|
|
29
33
|
particleSize: { type: 'number', label: 'Particle size', default: 1, min: 0.2, max: 4, step: 0.1, unit: '×' },
|
|
30
|
-
spread: { type: 'number', label: 'Spread', default: 1, min: 0.3, max: 3, step: 0.05, unit: '×', hint: 'Radius of the vortex' },
|
|
31
|
-
speed: { type: 'number', label: 'Swirl speed', default: 1, min: 0, max: 4, step: 0.05, unit: '×' },
|
|
34
|
+
spread: { type: 'number', label: 'Spread', default: 1, min: 0.3, max: 3, step: 0.05, unit: '×', hint: 'Radius of the vortex', showWhen: { disappear: ['true'] } },
|
|
35
|
+
speed: { type: 'number', label: 'Swirl speed', default: 1, min: 0, max: 4, step: 0.05, unit: '×', showWhen: { disappear: ['true'] } },
|
|
32
36
|
edgeColor: { type: 'color', label: 'Edge colour', default: '#9fe8ff' },
|
|
33
37
|
glow: { type: 'boolean', label: 'Glow', default: true, hint: 'Additive light — off keeps the true surface colours' },
|
|
34
38
|
duration: { type: 'number', label: 'Duration', default: 2.8, min: 0.3, max: 12, step: 0.1, unit: 's' },
|
|
@@ -39,16 +43,19 @@ export default defineOperation({
|
|
|
39
43
|
const field = createFieldState(target);
|
|
40
44
|
field.edgeWidth.value = 0.05;
|
|
41
45
|
field.scale.value = 2.5;
|
|
42
|
-
const flight = { value: FLIGHT }, spread = { value: 1 }, speed = { value: 1 }, size = { value: 1 };
|
|
46
|
+
const flight = { value: FLIGHT }, spread = { value: 1 }, speed = { value: 1 }, size = { value: 1 }, keep = { value: 0 };
|
|
43
47
|
const sample = sampleSurfaceCached(target, Math.round(Number(p.particles)), 11);
|
|
44
48
|
const points = createFxPoints(target, sample, {
|
|
45
49
|
additive: !!p.glow,
|
|
46
|
-
uniforms: { ...fieldUniforms(P, field), uSwmFlight: flight, uSwmSpread: spread, uSwmSpeed: speed, uSwmPtSize: size },
|
|
50
|
+
uniforms: { ...fieldUniforms(P, field), uSwmFlight: flight, uSwmSpread: spread, uSwmSpeed: speed, uSwmPtSize: size, uSwmKeep: keep },
|
|
47
51
|
vertexPars: fieldGlsl(P) + GLSL_POINT_SIZE,
|
|
48
52
|
vertexMain: /* glsl */ `
|
|
49
53
|
float birth = ${P}BirthOf(${P}Field(${P}Norm(aP)));
|
|
50
54
|
float a = clamp((uSwmProgress - birth) / uSwmFlight, 0.0, 1.0);
|
|
51
55
|
if (a <= 0.0) { gl_Position = vec4(2.0, 2.0, 2.0, 1.0); gl_PointSize = 0.0; vColor = vec3(0.0); vAlpha = 0.0; return; }
|
|
56
|
+
// keep: the particle appears on its spot and stays there
|
|
57
|
+
float held = uSwmKeep * step(0.9999, uSwmProgress);
|
|
58
|
+
a = mix(a, min(a, 0.001), uSwmKeep);
|
|
52
59
|
float E = uSwmExtent;
|
|
53
60
|
vec3 C = u${P}Min + u${P}Size * 0.5;
|
|
54
61
|
// destination: a tilted two-arm spiral galaxy around the object's centre.
|
|
@@ -71,19 +78,22 @@ export default defineOperation({
|
|
|
71
78
|
vec3 ctrl = aP + aN * (0.25 * E) + vec3(0.0, 0.12 * E, 0.0);
|
|
72
79
|
float k = a * a * (3.0 - 2.0 * a);
|
|
73
80
|
vec3 local = mix(mix(aP, ctrl, k), mix(ctrl, D, k), k);
|
|
81
|
+
// holding as a cloud: particles jitter on their spots, the whole cloud breathes
|
|
82
|
+
local += held * (aN * E * 0.004 * sin(u${P}Time * (2.0 + 2.0 * aR.w) + aR.z * 40.0));
|
|
83
|
+
local = C + (local - C) * (1.0 + held * 0.012 * sin(u${P}Time * 0.9));
|
|
74
84
|
vec4 mv = modelViewMatrix * vec4(local, 1.0);
|
|
75
85
|
gl_Position = projectionMatrix * mv;
|
|
76
86
|
// the colour of the spot it left, brighter in flight, a slow shimmer in the vortex
|
|
77
87
|
float flightGlow = sin(3.14159 * a);
|
|
78
88
|
float shimmer = 0.85 + 0.15 * sin(u${P}Time * (1.0 + 2.0 * aR.w) + aR.z * 6.2832);
|
|
79
89
|
vColor = aC * (1.0 + 0.4 * flightGlow) * shimmer + u${P}EdgeColor * 0.25 * flightGlow * flightGlow;
|
|
80
|
-
vAlpha = smoothstep(0.0, 0.08, a);
|
|
90
|
+
vAlpha = mix(smoothstep(0.0, 0.08, a), 0.75 + 0.25 * sin(u${P}Time * (3.0 + 4.0 * aR.x) + aR.y * 50.0), uSwmKeep);
|
|
81
91
|
gl_PointSize = clamp(fxPointPx(E * 0.0045 * uSwmPtSize * (0.6 + 0.8 * aR.w), mv), 0.0, 20.0);`,
|
|
82
92
|
});
|
|
83
93
|
const own = {};
|
|
84
94
|
// while the swarm exists it keeps turning, even after the transition finished
|
|
85
95
|
const tick = () => { own.field.time.value += gsap.ticker.deltaRatio() / 60; syncRoot(target, own.field); };
|
|
86
|
-
Object.assign(own, { field, flight, spread, speed, size, points, mats: new Set(), tick });
|
|
96
|
+
Object.assign(own, { field, flight, spread, speed, size, keep, points, mats: new Set(), tick });
|
|
87
97
|
st = own;
|
|
88
98
|
const layer = surfaceLayer(P, field, 'tint');
|
|
89
99
|
forEachMeshMaterial(target, (mat, mesh) => {
|
|
@@ -100,6 +110,15 @@ export default defineOperation({
|
|
|
100
110
|
s.spread.value = Number(p.spread);
|
|
101
111
|
s.speed.value = Number(p.speed);
|
|
102
112
|
s.size.value = Number(p.particleSize);
|
|
113
|
+
s.keep.value = p.disappear === false ? 1 : 0;
|
|
114
|
+
setMeshesHidden(target, false);
|
|
115
|
+
if (s.keep.value) {
|
|
116
|
+
// keep: the surface becomes its particles (0 → 1) and holds — its own ticker keeps the time running
|
|
117
|
+
return runProgress(target, s.field, 1, {
|
|
118
|
+
duration: Number(p.duration) / (1 + FLIGHT), ease: 'none', clock: false,
|
|
119
|
+
onComplete: () => setMeshesHidden(target, true),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
103
122
|
return runProgress(target, s.field, 1 + FLIGHT, {
|
|
104
123
|
duration: Number(p.duration), ease: 'power1.inOut', clock: false,
|
|
105
124
|
onComplete: () => setMeshesHidden(target, true),
|
|
@@ -110,8 +129,9 @@ export default defineOperation({
|
|
|
110
129
|
if (!s)
|
|
111
130
|
return;
|
|
112
131
|
setMeshesHidden(target, false);
|
|
132
|
+
// from a hold it only has part of the way to go: keep the same speed
|
|
113
133
|
return runProgress(target, s.field, 0, {
|
|
114
|
-
duration: Number(p.duration), ease: 'power1.inOut', clock: false,
|
|
134
|
+
duration: Number(p.duration) * Math.min(1, Math.max(0.1, s.field.progress.value / (1 + FLIGHT))), ease: s.keep.value ? 'none' : 'power1.inOut', clock: false,
|
|
115
135
|
onComplete: () => {
|
|
116
136
|
gsap.ticker.remove(s.tick);
|
|
117
137
|
s.mats.forEach(m => removeLayer(m, KEY));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"petalPeel.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/petalPeel.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"petalPeel.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/petalPeel.ts"],"names":[],"mappings":";AAwBA,wBA2IG"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// rocking tumble — and settles flat on the ground around the base. The flakes
|
|
5
5
|
// are real lit, double-sided instances (one instanced mesh, casting shadows).
|
|
6
6
|
// Reverting lifts them back into place and the surface closes.
|
|
7
|
+
// With Disappear off (an object effect's default) the object stays "lifted": every
|
|
8
|
+
// flake hinged up off the surface like raised scales, breathing in slow waves.
|
|
7
9
|
import { CircleGeometry } from 'three';
|
|
8
10
|
import { defineOperation } from '../types.js';
|
|
9
11
|
import { GLSL_ROT, addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
@@ -17,16 +19,18 @@ const LIFE = 0.8;
|
|
|
17
19
|
export default defineOperation({
|
|
18
20
|
value: 'petalPeel',
|
|
19
21
|
label: 'Petal peel',
|
|
20
|
-
description: 'Peel the targets into flakes that flutter down like leaves — reverting lifts them back',
|
|
22
|
+
description: 'Peel the targets into flakes that flutter down like leaves (or, Disappear off, stay lifted like raised scales) — reverting lifts them back',
|
|
21
23
|
channel: 'visual',
|
|
22
24
|
multi: true,
|
|
23
25
|
toggles: true,
|
|
24
|
-
usableIn: ['interaction', 'action'],
|
|
26
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
27
|
+
objectParams: { disappear: false },
|
|
25
28
|
params: {
|
|
26
29
|
direction: { type: 'select', label: 'Direction', default: 'down', options: DIRECTION_OPTIONS },
|
|
30
|
+
disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the flakes stay lifted off the surface, like raised scales' },
|
|
27
31
|
petals: { type: 'number', label: 'Petals', default: 2600, min: 300, max: 20000, step: 100 },
|
|
28
32
|
petalSize: { type: 'number', label: 'Petal size', default: 1, min: 0.3, max: 4, step: 0.05, unit: '×' },
|
|
29
|
-
drift: { type: 'number', label: 'Drift', default: 1, min: 0, max: 4, step: 0.05, unit: '×', hint: 'How far they sway and scatter' },
|
|
33
|
+
drift: { type: 'number', label: 'Drift', default: 1, min: 0, max: 4, step: 0.05, unit: '×', hint: 'How far they sway and scatter', showWhen: { disappear: ['true'] } },
|
|
30
34
|
edgeColor: { type: 'color', label: 'Edge colour', default: '#fff1d6' },
|
|
31
35
|
scale: { type: 'number', label: 'Pattern', default: 2.5, min: 0.5, max: 12, step: 0.1 },
|
|
32
36
|
duration: { type: 'number', label: 'Duration', default: 4, min: 0.3, max: 14, step: 0.1, unit: 's' },
|
|
@@ -36,7 +40,7 @@ export default defineOperation({
|
|
|
36
40
|
if (!st) {
|
|
37
41
|
const field = createFieldState(target);
|
|
38
42
|
field.edgeWidth.value = 0.04;
|
|
39
|
-
const life = { value: LIFE }, drift = { value: 1 };
|
|
43
|
+
const life = { value: LIFE }, drift = { value: 1 }, keep = { value: 0 };
|
|
40
44
|
const count = Math.round(Number(p.petals));
|
|
41
45
|
const sample = sampleSurfaceCached(target, count, 47);
|
|
42
46
|
// petal size from the surface area each one has to cover
|
|
@@ -54,7 +58,7 @@ export default defineOperation({
|
|
|
54
58
|
},
|
|
55
59
|
layerKey: 'petalInstances', roughness: 0.7, metalness: 0, doubleSided: true,
|
|
56
60
|
layer: {
|
|
57
|
-
uniforms: { ...fieldUniforms(P, field), uPdlLife: life, uPdlDrift: drift },
|
|
61
|
+
uniforms: { ...fieldUniforms(P, field), uPdlLife: life, uPdlDrift: drift, uPdlKeep: keep },
|
|
58
62
|
common: fieldGlsl(P) + GLSL_ROT,
|
|
59
63
|
vertexPars: /* glsl */ `
|
|
60
64
|
attribute vec3 aPdlP; attribute vec3 aPdlN; attribute vec4 aPdlR;
|
|
@@ -78,12 +82,22 @@ export default defineOperation({
|
|
|
78
82
|
mat3 lying = fxRot(vec3(0.0, 1.0, 0.0), aPdlR.y * 6.28) * mat3(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);
|
|
79
83
|
float settle = smoothstep(land, land + 0.06, a);
|
|
80
84
|
return mat3(mix(inAir[0], lying[0], settle), mix(inAir[1], lying[1], settle), mix(inAir[2], lying[2], settle));
|
|
81
|
-
}
|
|
82
|
-
|
|
85
|
+
}
|
|
86
|
+
// lifted (keep): hinged up off the surface, breathing in slow waves across the object
|
|
87
|
+
float pdlLift(float a) {
|
|
88
|
+
float held = uPdlKeep * step(0.9999, uPdlProgress);
|
|
89
|
+
float wave = sin(uPdlTime * 1.1 + dot(aPdlP, vec3(1.0, 0.6, 0.3)) / uPdlExtent * 7.0 + aPdlR.x * 0.8);
|
|
90
|
+
return smoothstep(0.0, 0.14, a) * (0.5 + held * 0.14 * wave);
|
|
91
|
+
}
|
|
92
|
+
mat3 pdlLifted(float a) { return pdlFrame() * fxRot(vec3(1.0, 0.0, 0.0), pdlLift(a)); }`,
|
|
93
|
+
normal: `{ objectNormal = (uPdlKeep > 0.5 ? pdlLifted(pdlAge()) : pdlRot(pdlAge())) * objectNormal; }`,
|
|
83
94
|
vertex: /* glsl */ `
|
|
84
95
|
{
|
|
85
96
|
float a = pdlAge();
|
|
86
97
|
if (a <= 0.0) { transformed *= 0.0; }
|
|
98
|
+
else if (uPdlKeep > 0.5) {
|
|
99
|
+
transformed = pdlLifted(a) * transformed + aPdlN * (0.012 * uPdlExtent) * smoothstep(0.0, 0.14, a);
|
|
100
|
+
}
|
|
87
101
|
else {
|
|
88
102
|
a = min(a, 1.0);
|
|
89
103
|
float E = uPdlExtent;
|
|
@@ -101,7 +115,7 @@ export default defineOperation({
|
|
|
101
115
|
}`,
|
|
102
116
|
},
|
|
103
117
|
});
|
|
104
|
-
st = { field, life, drift, mesh, mats: new Set() };
|
|
118
|
+
st = { field, life, drift, keep, mesh, mats: new Set() };
|
|
105
119
|
const own = st;
|
|
106
120
|
const layer = surfaceLayer(P, field, 'tint');
|
|
107
121
|
forEachMeshMaterial(target, (mat, m) => {
|
|
@@ -115,6 +129,15 @@ export default defineOperation({
|
|
|
115
129
|
const s = st;
|
|
116
130
|
setFieldParams(s.field, p, target, ctx);
|
|
117
131
|
s.drift.value = Number(p.drift);
|
|
132
|
+
s.keep.value = p.disappear === false ? 1 : 0;
|
|
133
|
+
hideMeshes(target, KEY, false);
|
|
134
|
+
if (s.keep.value) {
|
|
135
|
+
// keep: the surface lifts into flakes (0 → 1) and holds
|
|
136
|
+
return runProgress(target, s.field, 1, {
|
|
137
|
+
duration: Number(p.duration) / (1 + LIFE), ease: 'none', hold: true,
|
|
138
|
+
onComplete: () => hideMeshes(target, KEY, true),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
118
141
|
return runProgress(target, s.field, 1 + LIFE, {
|
|
119
142
|
duration: Number(p.duration), ease: 'none',
|
|
120
143
|
onComplete: () => hideMeshes(target, KEY, true),
|
|
@@ -125,8 +148,9 @@ export default defineOperation({
|
|
|
125
148
|
if (!s)
|
|
126
149
|
return;
|
|
127
150
|
hideMeshes(target, KEY, false);
|
|
151
|
+
// from a hold it only has part of the way to go: keep the same speed
|
|
128
152
|
return runProgress(target, s.field, 0, {
|
|
129
|
-
duration: Number(p.duration), ease: 'none',
|
|
153
|
+
duration: Number(p.duration) * Math.min(1, Math.max(0.1, s.field.progress.value / (1 + LIFE))), ease: 'none',
|
|
130
154
|
onComplete: () => {
|
|
131
155
|
s.mats.forEach(m => removeLayer(m, KEY));
|
|
132
156
|
disposeFxInstances(s.mesh);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"petrify.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/petrify.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"petrify.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/petrify.ts"],"names":[],"mappings":";AAwDA,wBA6CG"}
|
|
@@ -7,17 +7,20 @@
|
|
|
7
7
|
import { Color } from 'three';
|
|
8
8
|
import { defineOperation } from '../types.js';
|
|
9
9
|
import { addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
10
|
-
import { DIRECTION_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, runProgress, setFieldParams } from './transitionField.js';
|
|
10
|
+
import { DIRECTION_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, goneGlsl, runProgress, setFieldParams, setReveal } from './transitionField.js';
|
|
11
11
|
const P = 'Stn';
|
|
12
12
|
const KEY = 'petrify';
|
|
13
13
|
const STATE = '__opPetrify';
|
|
14
14
|
function layerFor(st) {
|
|
15
15
|
const amount = /* glsl */ `
|
|
16
16
|
float stnD = StnThreshold() - StnField(vStnQ);
|
|
17
|
-
float st = smoothstep(0.0, uStnEdgeWidth, stnD)
|
|
17
|
+
float st = smoothstep(0.0, uStnEdgeWidth, stnD);
|
|
18
|
+
// revealed by the stone: nothing ahead of the front, full stone right behind it
|
|
19
|
+
if (uStnReveal > 0.5) { if (stnD < 0.0) discard; st = 1.0; }
|
|
20
|
+
if (StnGone(vStnQ) > 0.5) { st = 0.0; stnD = -1.0; } // wiped by the look that replaces it`;
|
|
18
21
|
return {
|
|
19
22
|
uniforms: { ...fieldUniforms(P, st.field), uStnStone: st.stone },
|
|
20
|
-
common: `varying vec3 vStnQ;\nvarying vec3 vStnR;\n${fieldGlsl(P)}`,
|
|
23
|
+
common: `varying vec3 vStnQ;\nvarying vec3 vStnR;\n${fieldGlsl(P)}\n${goneGlsl(P)}`,
|
|
21
24
|
vertex: /* glsl */ `
|
|
22
25
|
vStnR = (uStnRootInv * modelMatrix * vec4(transformed, 1.0)).xyz;
|
|
23
26
|
vStnQ = StnNorm(vStnR);`,
|
|
@@ -54,6 +57,8 @@ export default defineOperation({
|
|
|
54
57
|
multi: true,
|
|
55
58
|
toggles: true,
|
|
56
59
|
usableIn: ['interaction', 'action', 'object'],
|
|
60
|
+
presence: 'paint',
|
|
61
|
+
field: (target) => target.userData[STATE]?.field,
|
|
57
62
|
stack: 'surface',
|
|
58
63
|
params: {
|
|
59
64
|
direction: { type: 'select', label: 'Direction', default: 'up', options: DIRECTION_OPTIONS },
|
|
@@ -86,6 +91,7 @@ export default defineOperation({
|
|
|
86
91
|
const s = target.userData[STATE];
|
|
87
92
|
if (!s)
|
|
88
93
|
return;
|
|
94
|
+
setReveal(s.field, p);
|
|
89
95
|
return runProgress(target, s.field, 0, {
|
|
90
96
|
duration: Number(p.duration), ease: 'power1.inOut',
|
|
91
97
|
onComplete: () => { s.mats.forEach(m => removeLayer(m, KEY)); delete target.userData[STATE]; },
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Quaternion, Vector3 } from 'three';
|
|
2
|
+
import { type OperationDefinition, type OperationParamSpec, type OperationParams } from '../types';
|
|
3
|
+
/** What a path writes: a turn and scale about a pivot (object-local), plus a world offset. */
|
|
4
|
+
export interface ExitPose {
|
|
5
|
+
q: Quaternion;
|
|
6
|
+
s: Vector3;
|
|
7
|
+
off: Vector3;
|
|
8
|
+
/** 'center' or 'bottom' of the object's bounds. */
|
|
9
|
+
pivot: 'center' | 'bottom';
|
|
10
|
+
}
|
|
11
|
+
/** The world frame the path is laid out in, fixed when the motion starts. */
|
|
12
|
+
export interface ExitFrame {
|
|
13
|
+
/** World up. */
|
|
14
|
+
up: Vector3;
|
|
15
|
+
/** Screen right on the ground plane (world X with no camera). */
|
|
16
|
+
right: Vector3;
|
|
17
|
+
/** From the object towards the camera on the ground plane (world +Z with no camera). */
|
|
18
|
+
toward: Vector3;
|
|
19
|
+
/** From the object's base to the camera (world), or null without a camera. */
|
|
20
|
+
camera: Vector3 | null;
|
|
21
|
+
}
|
|
22
|
+
export interface ExitPathArgs<M> {
|
|
23
|
+
/** World size at rest, and its largest side. */
|
|
24
|
+
size: Vector3;
|
|
25
|
+
span: number;
|
|
26
|
+
p: OperationParams;
|
|
27
|
+
frame: ExitFrame;
|
|
28
|
+
/** Built once per run by `prepare` (tables, random draws). */
|
|
29
|
+
mem: M;
|
|
30
|
+
/** A turn given in WORLD axes, as the object-local turn ExitPose.q expects. */
|
|
31
|
+
local: (qWorld: Quaternion) => Quaternion;
|
|
32
|
+
/** The object's own axis (0 x, 1 y, 2 z) that lies closest to a WORLD direction at rest — for stretching along it. */
|
|
33
|
+
axis: (worldDir: Vector3) => 0 | 1 | 2;
|
|
34
|
+
}
|
|
35
|
+
export interface ExitSpec<M = unknown> {
|
|
36
|
+
value: string;
|
|
37
|
+
label: string;
|
|
38
|
+
description: string;
|
|
39
|
+
params: Record<string, OperationParamSpec>;
|
|
40
|
+
/** Per-run data shared by both paths (an integrated angle table…). */
|
|
41
|
+
prepare?: (args: Omit<ExitPathArgs<M>, 'mem' | 'local' | 'axis'>) => M;
|
|
42
|
+
/** u: 0 at rest → 1 gone. Must be the identity at u = 0 and scale ~0 at u = 1. */
|
|
43
|
+
exit: (u: number, out: ExitPose, a: ExitPathArgs<M>) => void;
|
|
44
|
+
/** v: 0 gone → 1 at rest. Scale ~0 at v = 0, the identity at v = 1. */
|
|
45
|
+
enter: (v: number, out: ExitPose, a: ExitPathArgs<M>) => void;
|
|
46
|
+
}
|
|
47
|
+
export declare const clamp01: (x: number) => number;
|
|
48
|
+
export declare const smooth: (a: number, b: number, x: number) => number;
|
|
49
|
+
/** Stretch by `k` along one local axis keeping the volume (the other two by 1/√k), times a uniform `size`. */
|
|
50
|
+
export declare function stretchAxis(s: Vector3, axis: 0 | 1 | 2, k: number, size?: number): void;
|
|
51
|
+
/** A damped ring that starts at 0, moves first in `+` and lands exactly at 0 at σ = 1. */
|
|
52
|
+
export declare const ring: (sg: number, cycles: number, decay?: number) => number;
|
|
53
|
+
/** Build a physical exit operation from its two paths. */
|
|
54
|
+
export declare function physicalExit<M = unknown>(spec: ExitSpec<M>): OperationDefinition;
|
|
55
|
+
//# sourceMappingURL=physicalExit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physicalExit.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/physicalExit.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAA0C,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3I,8FAA8F;AAC9F,MAAM,WAAW,QAAQ;IACrB,CAAC,EAAE,UAAU,CAAC;IACd,CAAC,EAAE,OAAO,CAAC;IACX,GAAG,EAAE,OAAO,CAAC;IACb,mDAAmD;IACnD,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC9B;AAED,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACtB,gBAAgB;IAChB,EAAE,EAAE,OAAO,CAAC;IACZ,iEAAiE;IACjE,KAAK,EAAE,OAAO,CAAC;IACf,wFAAwF;IACxF,MAAM,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,gDAAgD;IAChD,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,eAAe,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,8DAA8D;IAC9D,GAAG,EAAE,CAAC,CAAC;IACP,+EAA+E;IAC/E,KAAK,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC;IAC1C,sHAAsH;IACtH,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,OAAO;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC3C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,kFAAkF;IAClF,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7D,uEAAuE;IACvE,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACjE;AAeD,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,WAAgC,CAAC;AAClE,eAAO,MAAM,MAAM,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,WAA0E,CAAC;AAEjI,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,SAAI,QAG3E;AAED,0FAA0F;AAC1F,eAAO,MAAM,IAAI,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,cAAS,WACqB,CAAC;AAiBhF,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,mBAAmB,CA+FhF"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Physical exits — the object leaves the scene by a motion of its own (blast off,
|
|
2
|
+
// drain into a vortex, fall like a leaf) and comes back by ANOTHER motion: a rocket
|
|
3
|
+
// lands, it does not un-launch. One shape for all of them:
|
|
4
|
+
//
|
|
5
|
+
// apply the exit path, u: 0 (at rest) → 1 (gone: scale ~0, then hidden)
|
|
6
|
+
// revert from gone: the entrance path, v: 0 (gone) → 1 (exactly at rest)
|
|
7
|
+
// from part-way out: back along the exit path (it turns round mid-flight)
|
|
8
|
+
// apply while it is still coming in: back along the entrance path (it turns round)
|
|
9
|
+
//
|
|
10
|
+
// Paths are pure functions of their own progress, written as physics in time (the
|
|
11
|
+
// tween is linear, the motion's easing is the physics), so a turn-round is seamless
|
|
12
|
+
// and `duration: 0` lands exactly. They ride on the object's transform through the
|
|
13
|
+
// physical mix (./physicalMix.ts) — never writing position / rotation / scale —
|
|
14
|
+
// so they stack with held motions and follow a moving base.
|
|
15
|
+
//
|
|
16
|
+
// presence 'vanish': as an object effect following visibility, shown = the entrance,
|
|
17
|
+
// hidden = the exit.
|
|
18
|
+
import { gsap } from 'gsap';
|
|
19
|
+
import { Quaternion, Vector3 } from 'three';
|
|
20
|
+
import { defineOperation } from '../types.js';
|
|
21
|
+
import { acquireRest, poseAbout, releaseRest } from './restPose.js';
|
|
22
|
+
import { mixBase } from './physicalMix.js';
|
|
23
|
+
const UP = new Vector3(0, 1, 0);
|
|
24
|
+
const GONE = 1e-4;
|
|
25
|
+
export const clamp01 = (x) => Math.min(1, Math.max(0, x));
|
|
26
|
+
export const smooth = (a, b, x) => { const v = clamp01((x - a) / (b - a)); return v * v * (3 - 2 * v); };
|
|
27
|
+
/** Stretch by `k` along one local axis keeping the volume (the other two by 1/√k), times a uniform `size`. */
|
|
28
|
+
export function stretchAxis(s, axis, k, size = 1) {
|
|
29
|
+
const o = 1 / Math.sqrt(Math.max(k, 0.02));
|
|
30
|
+
s.set(o * size, o * size, o * size).setComponent(axis, k * size);
|
|
31
|
+
}
|
|
32
|
+
/** A damped ring that starts at 0, moves first in `+` and lands exactly at 0 at σ = 1. */
|
|
33
|
+
export const ring = (sg, cycles, decay = 3) => Math.sin(2 * Math.PI * cycles * sg) * Math.exp(-decay * sg) * (1 - sg * sg);
|
|
34
|
+
/** The camera's ground-plane frame at trigger time (world X / +Z without a camera). */
|
|
35
|
+
function frameOf(target, ctx) {
|
|
36
|
+
const frame = { up: UP.clone(), right: new Vector3(1, 0, 0), toward: new Vector3(0, 0, 1), camera: null };
|
|
37
|
+
const cam = ctx?.tools?.cameraPose?.();
|
|
38
|
+
if (!cam)
|
|
39
|
+
return frame;
|
|
40
|
+
const at = mixBase(target).position.clone(); // where it stands at its base, not where a path left it
|
|
41
|
+
target.parent?.localToWorld(at);
|
|
42
|
+
frame.camera = new Vector3(cam.position[0], cam.position[1], cam.position[2]).sub(at);
|
|
43
|
+
const t = new Vector3(cam.position[0] - at.x, 0, cam.position[2] - at.z);
|
|
44
|
+
if (t.lengthSq() < 1e-8)
|
|
45
|
+
return frame;
|
|
46
|
+
frame.toward.copy(t.normalize());
|
|
47
|
+
frame.right.crossVectors(UP, frame.toward).normalize();
|
|
48
|
+
return frame;
|
|
49
|
+
}
|
|
50
|
+
/** Build a physical exit operation from its two paths. */
|
|
51
|
+
export function physicalExit(spec) {
|
|
52
|
+
const KEY = `__opExit_${spec.value}`;
|
|
53
|
+
const pose = { q: new Quaternion(), s: new Vector3(1, 1, 1), off: new Vector3(), pivot: 'center' };
|
|
54
|
+
const draw = (target, st) => {
|
|
55
|
+
const a = st.args;
|
|
56
|
+
pose.q.identity();
|
|
57
|
+
pose.s.set(1, 1, 1);
|
|
58
|
+
pose.off.set(0, 0, 0);
|
|
59
|
+
pose.pivot = 'center';
|
|
60
|
+
if (st.mode === 'exit')
|
|
61
|
+
spec.exit(st.t, pose, a);
|
|
62
|
+
else
|
|
63
|
+
spec.enter(st.t, pose, a);
|
|
64
|
+
pose.s.set(Math.max(pose.s.x, GONE), Math.max(pose.s.y, GONE), Math.max(pose.s.z, GONE));
|
|
65
|
+
const pivot = pose.pivot === 'bottom' ? st.rest.bottomLocal : st.rest.centerLocal;
|
|
66
|
+
poseAbout(target, st.rest, pivot, pose.q, pose.s, pose.off, KEY);
|
|
67
|
+
};
|
|
68
|
+
const setup = (target, st, p, ctx) => {
|
|
69
|
+
st.frame = frameOf(target, ctx);
|
|
70
|
+
const size = st.rest.size.clone();
|
|
71
|
+
const base = { size, span: Math.max(size.x, size.y, size.z, 1e-6), p, frame: st.frame };
|
|
72
|
+
// the object's world turn at its BASE (not the pose this path left it in)
|
|
73
|
+
const W = target.parent ? target.parent.getWorldQuaternion(new Quaternion()) : new Quaternion();
|
|
74
|
+
W.multiply(mixBase(target).quaternion);
|
|
75
|
+
const Wi = W.clone().invert();
|
|
76
|
+
const local = (qWorld) => qWorld.premultiply(Wi).multiply(W);
|
|
77
|
+
const _d = new Vector3();
|
|
78
|
+
const axis = (dir) => {
|
|
79
|
+
_d.copy(dir).applyQuaternion(Wi);
|
|
80
|
+
const x = Math.abs(_d.x), y = Math.abs(_d.y), z = Math.abs(_d.z);
|
|
81
|
+
return x >= y && x >= z ? 0 : y >= z ? 1 : 2;
|
|
82
|
+
};
|
|
83
|
+
st.args = { ...base, local, axis, mem: spec.prepare ? spec.prepare(base) : undefined };
|
|
84
|
+
};
|
|
85
|
+
/** Move along the current path to `to`; resolves when it gets there (or is replaced). */
|
|
86
|
+
const run = (target, st, to, seconds, done) => {
|
|
87
|
+
gsap.killTweensOf(st.proxy);
|
|
88
|
+
st.resolve?.();
|
|
89
|
+
st.proxy.t = st.t;
|
|
90
|
+
return new Promise(resolve => {
|
|
91
|
+
st.resolve = resolve;
|
|
92
|
+
const finish = () => { st.t = to; draw(target, st); st.resolve = undefined; done(); resolve(); };
|
|
93
|
+
if (seconds <= 1e-4 || Math.abs(to - st.t) < 1e-6) {
|
|
94
|
+
finish();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
gsap.to(st.proxy, {
|
|
98
|
+
t: to, duration: seconds, ease: 'none',
|
|
99
|
+
onUpdate: () => { st.t = st.proxy.t; draw(target, st); },
|
|
100
|
+
onComplete: finish,
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
const release = (target) => {
|
|
105
|
+
const st = target.userData[KEY];
|
|
106
|
+
if (!st)
|
|
107
|
+
return;
|
|
108
|
+
gsap.killTweensOf(st.proxy);
|
|
109
|
+
st.resolve?.();
|
|
110
|
+
delete target.userData[KEY];
|
|
111
|
+
releaseRest(target, KEY);
|
|
112
|
+
};
|
|
113
|
+
return defineOperation({
|
|
114
|
+
value: spec.value,
|
|
115
|
+
label: spec.label,
|
|
116
|
+
description: spec.description,
|
|
117
|
+
channel: 'transform',
|
|
118
|
+
multi: true,
|
|
119
|
+
toggles: true,
|
|
120
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
121
|
+
presence: 'vanish',
|
|
122
|
+
params: spec.params,
|
|
123
|
+
apply(target, p, ctx) {
|
|
124
|
+
let st = target.userData[KEY];
|
|
125
|
+
if (!st) {
|
|
126
|
+
st = { rest: acquireRest(target, KEY), mode: 'exit', t: 0, proxy: { t: 0 }, frame: frameOf(target, ctx) };
|
|
127
|
+
target.userData[KEY] = st;
|
|
128
|
+
setup(target, st, p, ctx);
|
|
129
|
+
}
|
|
130
|
+
else
|
|
131
|
+
st.args = { ...st.args, p };
|
|
132
|
+
const D = Number(p.duration);
|
|
133
|
+
const s = st;
|
|
134
|
+
// still coming in: turn round along the entrance, back to gone
|
|
135
|
+
if (s.mode === 'enter' && s.t < 1)
|
|
136
|
+
return run(target, s, 0, D * s.t, () => { s.mode = 'exit'; s.t = 1; target.visible = false; });
|
|
137
|
+
if (s.mode === 'enter') {
|
|
138
|
+
s.mode = 'exit';
|
|
139
|
+
s.t = 0;
|
|
140
|
+
setup(target, s, p, ctx);
|
|
141
|
+
}
|
|
142
|
+
return run(target, s, 1, D * (1 - s.t), () => { target.visible = false; });
|
|
143
|
+
},
|
|
144
|
+
revert(target, p, ctx) {
|
|
145
|
+
const st = target.userData[KEY];
|
|
146
|
+
if (!st)
|
|
147
|
+
return;
|
|
148
|
+
st.args = { ...st.args, p };
|
|
149
|
+
target.visible = true; // it comes back shown (it may have gone while the object was hidden)
|
|
150
|
+
const D = Number(p.duration);
|
|
151
|
+
const done = () => release(target);
|
|
152
|
+
// part-way out: turn round along the exit
|
|
153
|
+
if (st.mode === 'exit' && st.t < 1)
|
|
154
|
+
return run(target, st, 0, D * st.t, done);
|
|
155
|
+
// gone: the entrance (re-laid out for where the camera is now)
|
|
156
|
+
if (st.mode === 'exit') {
|
|
157
|
+
st.mode = 'enter';
|
|
158
|
+
st.t = 0;
|
|
159
|
+
setup(target, st, p, ctx);
|
|
160
|
+
draw(target, st);
|
|
161
|
+
}
|
|
162
|
+
return run(target, st, 1, D * (1 - st.t), done);
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { OperationDefinition, OperationParamSpec, OperationParams } from '../types';
|
|
2
|
+
import { type MixBody, type MixPart } from './physicalMix';
|
|
3
|
+
export interface HeldState<M> {
|
|
4
|
+
/** Strength 0..1 (the in / out envelope). */
|
|
5
|
+
amp: {
|
|
6
|
+
v: number;
|
|
7
|
+
};
|
|
8
|
+
/** The effect's current parameters (a live edit lands here). */
|
|
9
|
+
p: OperationParams;
|
|
10
|
+
body: MixBody;
|
|
11
|
+
/** The effect's own memory between frames. */
|
|
12
|
+
mem: M;
|
|
13
|
+
/** Leaving (the out is playing). */
|
|
14
|
+
out: boolean;
|
|
15
|
+
/** The motion's own clock, seconds — runs backwards while `__backward` is set. */
|
|
16
|
+
t: number;
|
|
17
|
+
resolve?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface HeldPhysicalSpec<M> {
|
|
20
|
+
value: string;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
params: Record<string, OperationParamSpec>;
|
|
24
|
+
/** Ease of the in / out envelope (default sine.inOut). */
|
|
25
|
+
ease?: string;
|
|
26
|
+
/** A repeating motion (see the header). Default true; false = a state that arrives and stays. */
|
|
27
|
+
periodic?: boolean;
|
|
28
|
+
memory: (body: MixBody, p: OperationParams) => M;
|
|
29
|
+
/** Fill `part` for this frame. `time` is the motion's clock and `dt` its step (negative when it runs backwards). */
|
|
30
|
+
move: (part: MixPart, st: HeldState<M>, time: number, dt: number) => void;
|
|
31
|
+
/** The out is starting (e.g. pick where to land). */
|
|
32
|
+
onOut?: (st: HeldState<M>) => void;
|
|
33
|
+
}
|
|
34
|
+
/** A periodic effect's pass. */
|
|
35
|
+
export declare const DURATION: Extract<OperationParamSpec, {
|
|
36
|
+
type: 'number';
|
|
37
|
+
}>;
|
|
38
|
+
/** How long a periodic effect takes to build up, and to settle, within a pass of `duration`. */
|
|
39
|
+
export declare const periodicEase: (duration: number) => number;
|
|
40
|
+
export declare function heldPhysical<M>(spec: HeldPhysicalSpec<M>): OperationDefinition;
|
|
41
|
+
//# sourceMappingURL=physicalHeld.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physicalHeld.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/physicalHeld.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EAAqB,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE9E,MAAM,WAAW,SAAS,CAAC,CAAC;IACxB,6CAA6C;IAC7C,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnB,gEAAgE;IAChE,CAAC,EAAE,eAAe,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,8CAA8C;IAC9C,GAAG,EAAE,CAAC,CAAC;IACP,oCAAoC;IACpC,GAAG,EAAE,OAAO,CAAC;IACb,kFAAkF;IAClF,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC3C,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,eAAe,KAAK,CAAC,CAAC;IACjD,oHAAoH;IACpH,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E,qDAAqD;IACrD,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACtC;AAED,gCAAgC;AAChC,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAgL,CAAC;AAEtP,gGAAgG;AAChG,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,WAAgD,CAAC;AAE9F,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAmD9E"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Held physical effects (float, sway, bounce…): one shape for all of them.
|
|
2
|
+
//
|
|
3
|
+
// in the motion's strength eases 0 → 1 while it is already moving
|
|
4
|
+
// hold it keeps moving for as long as the effect is on
|
|
5
|
+
// out the strength eases back to 0, the object settles on its base
|
|
6
|
+
//
|
|
7
|
+
// Two kinds:
|
|
8
|
+
// periodic a motion that repeats (float, sway, bounce…). `duration` is one PASS —
|
|
9
|
+
// in + moving + out. Whoever plays it decides how long it stays on: an
|
|
10
|
+
// object effect plays one pass and settles, or keeps it on with Loop
|
|
11
|
+
// (see ObjectEffectsController); an interaction keeps it on until toggled.
|
|
12
|
+
// `__backward` runs its clock backwards (playback reverse / yoyo).
|
|
13
|
+
// state it arrives and stays (grow). `duration` is the in / out time.
|
|
14
|
+
//
|
|
15
|
+
// The motion itself is a `move` function that fills the effect's part of the
|
|
16
|
+
// physical mix (./physicalMix.ts) each frame — so these stack with each other
|
|
17
|
+
// and ride on the object's own (authored / animated) transform.
|
|
18
|
+
import { gsap } from 'gsap';
|
|
19
|
+
import { defineOperation } from '../types.js';
|
|
20
|
+
import { joinMix, leaveMix } from './physicalMix.js';
|
|
21
|
+
/** A periodic effect's pass. */
|
|
22
|
+
export const DURATION = { type: 'number', label: 'Duration', default: 4, min: 0.2, max: 30, step: 0.1, unit: 's', hint: 'One pass: it builds up, moves and settles. With Loop it just keeps going' };
|
|
23
|
+
/** How long a periodic effect takes to build up, and to settle, within a pass of `duration`. */
|
|
24
|
+
export const periodicEase = (duration) => Math.min(0.8, Math.max(0, duration) * 0.25);
|
|
25
|
+
export function heldPhysical(spec) {
|
|
26
|
+
const KEY = `__op_${spec.value}`;
|
|
27
|
+
const periodic = spec.periodic !== false;
|
|
28
|
+
const easeTime = (p) => (periodic ? periodicEase(Number(p.duration)) : Number(p.duration));
|
|
29
|
+
const run = (target, st, to, duration, done) => {
|
|
30
|
+
gsap.killTweensOf(st.amp);
|
|
31
|
+
st.resolve?.(); // a run that is replaced still finishes for whoever waits on it
|
|
32
|
+
return new Promise((resolve) => {
|
|
33
|
+
st.resolve = resolve;
|
|
34
|
+
gsap.to(st.amp, {
|
|
35
|
+
v: to, duration, ease: spec.ease ?? 'sine.inOut',
|
|
36
|
+
onComplete: () => { if (st.resolve === resolve)
|
|
37
|
+
st.resolve = undefined; done?.(); resolve(); },
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return defineOperation({
|
|
42
|
+
value: spec.value, label: spec.label, description: spec.description,
|
|
43
|
+
channel: 'transform', multi: true, toggles: true,
|
|
44
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
45
|
+
periodic,
|
|
46
|
+
params: spec.params,
|
|
47
|
+
apply(target, p) {
|
|
48
|
+
let st = target.userData[KEY];
|
|
49
|
+
if (!st) {
|
|
50
|
+
const own = { amp: { v: 0 }, p, out: false, t: 0 };
|
|
51
|
+
const { body } = joinMix(target, KEY, (part, _time, dt) => {
|
|
52
|
+
const step = own.p.__backward === true ? -dt : dt;
|
|
53
|
+
own.t += step;
|
|
54
|
+
spec.move(part, own, own.t, step);
|
|
55
|
+
});
|
|
56
|
+
own.body = body;
|
|
57
|
+
own.mem = spec.memory(body, p);
|
|
58
|
+
st = own;
|
|
59
|
+
target.userData[KEY] = st;
|
|
60
|
+
}
|
|
61
|
+
st.p = p;
|
|
62
|
+
st.out = false;
|
|
63
|
+
return run(target, st, 1, easeTime(p));
|
|
64
|
+
},
|
|
65
|
+
revert(target, p) {
|
|
66
|
+
const st = target.userData[KEY];
|
|
67
|
+
if (!st)
|
|
68
|
+
return;
|
|
69
|
+
st.out = true;
|
|
70
|
+
spec.onOut?.(st);
|
|
71
|
+
// from part-way it takes part of the time (same speed both ways)
|
|
72
|
+
return run(target, st, 0, easeTime(p) * Math.min(1, Math.max(0.1, Math.abs(st.amp.v))), () => {
|
|
73
|
+
leaveMix(target, KEY);
|
|
74
|
+
delete target.userData[KEY];
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|