@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
|
// streams — out and up, or all toward one side of the screen — accelerating
|
|
5
5
|
// until they are gone. Birds always face the way they fly, so on revert they
|
|
6
6
|
// fly back in (head first) and settle into place as the surface re-forms.
|
|
7
|
+
// With Disappear off (an object effect's default) the birds stay perched on every
|
|
8
|
+
// spot of the surface (the surface itself gone): a flutter now and then, heads turning.
|
|
7
9
|
import { BufferAttribute, BufferGeometry, Vector3 } from 'three';
|
|
8
10
|
import { defineOperation } from '../types.js';
|
|
9
11
|
import { addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
@@ -36,17 +38,19 @@ function birdGeometry() {
|
|
|
36
38
|
export default defineOperation({
|
|
37
39
|
value: 'flock',
|
|
38
40
|
label: 'Flock',
|
|
39
|
-
description: 'Turn the targets into a flock of birds that takes off and flies away — reverting flies them home',
|
|
41
|
+
description: 'Turn the targets into a flock of birds that takes off and flies away (or, Disappear off, stays perched) — reverting flies them home',
|
|
40
42
|
channel: 'visual',
|
|
41
43
|
multi: true,
|
|
42
44
|
toggles: true,
|
|
43
|
-
usableIn: ['interaction', 'action'],
|
|
45
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
46
|
+
objectParams: { disappear: false },
|
|
44
47
|
params: {
|
|
45
48
|
direction: { type: 'select', label: 'Take-off order', default: 'down', options: DIRECTION_OPTIONS },
|
|
46
|
-
|
|
49
|
+
disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the birds stay perched on the object' },
|
|
50
|
+
exit: { type: 'select', label: 'Fly', default: 'away', showWhen: { disappear: ['true'] }, options: [{ value: 'away', label: 'Out and up' }, { value: 'left', label: 'To the right' }, { value: 'right', label: 'To the left' }, { value: 'up', label: 'Straight up' }] },
|
|
47
51
|
birds: { type: 'number', label: 'Birds', default: 1400, min: 100, max: 12000, step: 100 },
|
|
48
52
|
birdSize: { type: 'number', label: 'Bird size', default: 1, min: 0.3, max: 4, step: 0.05, unit: '×' },
|
|
49
|
-
speed: { type: 'number', label: 'Speed', default: 1, min: 0.2, max: 4, step: 0.05, unit: '×' },
|
|
53
|
+
speed: { type: 'number', label: 'Speed', default: 1, min: 0.2, max: 4, step: 0.05, unit: '×', showWhen: { disappear: ['true'] } },
|
|
50
54
|
edgeColor: { type: 'color', label: 'Edge colour', default: '#ffffff' },
|
|
51
55
|
scale: { type: 'number', label: 'Pattern', default: 2.5, min: 0.5, max: 12, step: 0.1 },
|
|
52
56
|
duration: { type: 'number', label: 'Duration', default: 3.4, min: 0.3, max: 14, step: 0.1, unit: 's' },
|
|
@@ -57,7 +61,7 @@ export default defineOperation({
|
|
|
57
61
|
const field = createFieldState(target);
|
|
58
62
|
field.edgeWidth.value = 0.04;
|
|
59
63
|
const own = {
|
|
60
|
-
field, exit: { value: new Vector3(1, 0, 0) }, mode: { value: 0 }, speed: { value: 1 }, dirSign: { value: 1 }, bird: { value: 1 }, mats: new Set(),
|
|
64
|
+
field, exit: { value: new Vector3(1, 0, 0) }, mode: { value: 0 }, speed: { value: 1 }, dirSign: { value: 1 }, bird: { value: 1 }, keep: { value: 0 }, mats: new Set(),
|
|
61
65
|
};
|
|
62
66
|
const sample = sampleSurfaceCached(target, Math.round(Number(p.birds)), 53);
|
|
63
67
|
const n = sample.count;
|
|
@@ -68,7 +72,7 @@ export default defineOperation({
|
|
|
68
72
|
attributes: { aFlkP: [pos, 3], aFlkN: [sample.normal.slice(0, n * 3), 3], aFlkR: [sample.random.slice(0, n * 4), 4] },
|
|
69
73
|
layerKey: 'flockInstances', roughness: 0.65, metalness: 0, doubleSided: true,
|
|
70
74
|
layer: {
|
|
71
|
-
uniforms: { ...fieldUniforms(P, field), uFlkExit: own.exit, uFlkMode: own.mode, uFlkSpeed: own.speed, uFlkDirSign: own.dirSign, uFlkBird: own.bird },
|
|
75
|
+
uniforms: { ...fieldUniforms(P, field), uFlkExit: own.exit, uFlkMode: own.mode, uFlkSpeed: own.speed, uFlkDirSign: own.dirSign, uFlkBird: own.bird, uFlkKeep: own.keep },
|
|
72
76
|
common: fieldGlsl(P),
|
|
73
77
|
vertexPars: /* glsl */ `
|
|
74
78
|
attribute float aWing; attribute vec3 aFlkP; attribute vec3 aFlkN; attribute vec4 aFlkR;
|
|
@@ -98,12 +102,33 @@ export default defineOperation({
|
|
|
98
102
|
vec3 right = normalize(cross(fwd, vec3(0.0, 1.0, 0.0)) + vec3(1e-4));
|
|
99
103
|
vec3 up = cross(right, fwd);
|
|
100
104
|
return mat3(right, up, fwd);
|
|
101
|
-
}
|
|
102
|
-
|
|
105
|
+
}
|
|
106
|
+
// perched: sitting on its spot, up along the surface normal, turning its head now and then
|
|
107
|
+
mat3 flkPerch() {
|
|
108
|
+
vec3 up = normalize(aFlkN + vec3(1e-4));
|
|
109
|
+
vec3 any = abs(up.y) < 0.9 ? vec3(0.0, 1.0, 0.0) : vec3(1.0, 0.0, 0.0);
|
|
110
|
+
vec3 right0 = normalize(cross(up, any));
|
|
111
|
+
float yaw = aFlkR.z * 6.2832 + step(0.6, aFlkR.y) * 0.35 * sin(uFlkTime * (0.4 + 0.5 * aFlkR.w) + aFlkR.x * 30.0);
|
|
112
|
+
vec3 right = right0 * cos(yaw) + cross(up, right0) * sin(yaw);
|
|
113
|
+
vec3 fwd = cross(right, up);
|
|
114
|
+
return mat3(right, up, fwd);
|
|
115
|
+
}
|
|
116
|
+
float flkHeld() { return uFlkKeep * step(0.9999, uFlkProgress); }`,
|
|
117
|
+
normal: `{ objectNormal = (uFlkKeep > 0.5 ? flkPerch() : flkFrame(clamp(flkAge(), 0.0, 1.0))) * objectNormal; }`,
|
|
103
118
|
vertex: /* glsl */ `
|
|
104
119
|
{
|
|
105
120
|
float a = flkAge();
|
|
106
121
|
if (a <= 0.0) { transformed *= 0.0; }
|
|
122
|
+
else if (uFlkKeep > 0.5) {
|
|
123
|
+
// perched on its spot; a brief flutter now and then
|
|
124
|
+
vec3 v = transformed;
|
|
125
|
+
float flutter = smoothstep(0.93, 1.0, sin(uFlkTime * (0.5 + 0.4 * aFlkR.x) + aFlkR.z * 60.0)) * flkHeld();
|
|
126
|
+
v.y += abs(aWing) * sin(uFlkTime * 22.0 + aFlkR.y * 6.28) * 0.38 * flutter;
|
|
127
|
+
v.y += abs(aWing) * 0.12; // wings held slightly up at rest
|
|
128
|
+
float size = uFlkExtent * 0.03 * uFlkBird * (0.8 + 0.4 * aFlkR.w);
|
|
129
|
+
float sc = smoothstep(0.0, 0.06, a);
|
|
130
|
+
transformed = flkPerch() * (v * size * sc) + aFlkN * uFlkExtent * 0.008;
|
|
131
|
+
}
|
|
107
132
|
else {
|
|
108
133
|
a = min(a, 1.0);
|
|
109
134
|
vec3 v = transformed;
|
|
@@ -139,6 +164,15 @@ export default defineOperation({
|
|
|
139
164
|
s.exit.value.copy(p.exit === 'left' ? r : r.negate());
|
|
140
165
|
}
|
|
141
166
|
s.mesh.visible = true;
|
|
167
|
+
s.keep.value = p.disappear === false ? 1 : 0;
|
|
168
|
+
if (s.keep.value) {
|
|
169
|
+
// keep: the surface becomes birds (0 → 1), perched, and holds
|
|
170
|
+
return runProgress(target, s.field, 1, {
|
|
171
|
+
duration: Number(p.duration) / (1 + LIFE), ease: 'none', hold: true,
|
|
172
|
+
onComplete: () => hideMeshes(target, KEY, true),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
hideMeshes(target, KEY, false);
|
|
142
176
|
return runProgress(target, s.field, 1 + LIFE, {
|
|
143
177
|
duration: Number(p.duration), ease: 'power1.in',
|
|
144
178
|
onComplete: () => { hideMeshes(target, KEY, true); s.mesh.visible = false; },
|
|
@@ -151,8 +185,9 @@ export default defineOperation({
|
|
|
151
185
|
hideMeshes(target, KEY, false);
|
|
152
186
|
s.mesh.visible = true;
|
|
153
187
|
s.dirSign.value = -1;
|
|
188
|
+
// from a hold it only has part of the way to go: keep the same speed
|
|
154
189
|
return runProgress(target, s.field, 0, {
|
|
155
|
-
duration: Number(p.duration), ease: 'power1.out',
|
|
190
|
+
duration: Number(p.duration) * Math.min(1, Math.max(0.1, s.field.progress.value / (1 + LIFE))), ease: s.keep.value ? 'none' : 'power1.out',
|
|
156
191
|
onComplete: () => {
|
|
157
192
|
s.mats.forEach(m => removeLayer(m, KEY));
|
|
158
193
|
disposeFxInstances(s.mesh);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flyBy.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/flyBy.ts"],"names":[],"mappings":";AA+CA,wBAkCG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Fly-by — the object takes off and flies past the camera. It lifts, banks into
|
|
2
|
+
// a turn and sweeps towards the viewer on a cubic Bézier, rolling into the curve
|
|
3
|
+
// (bank follows the path's sideways acceleration) and yawing to its heading, and
|
|
4
|
+
// passes just beside the lens. The way back: it comes in from behind the camera
|
|
5
|
+
// on the other side, banks round and sets down in place, the roll easing out.
|
|
6
|
+
import { Quaternion, Vector3 } from 'three';
|
|
7
|
+
import { clamp01, physicalExit, ring, smooth } from './physicalExit.js';
|
|
8
|
+
const _p0 = new Vector3(), _p1 = new Vector3(), _p2 = new Vector3(), _p3 = new Vector3();
|
|
9
|
+
const _a = new Vector3(), _vel = new Vector3(), _acc = new Vector3(), _side = new Vector3();
|
|
10
|
+
const _r = new Quaternion(), _y = new Quaternion();
|
|
11
|
+
/** The flight path from the object (0) to just beside the camera (1), on `side` (±1 along screen right). */
|
|
12
|
+
function path(a, side) {
|
|
13
|
+
const f = a.frame, H = a.size.y, span = a.span;
|
|
14
|
+
const cam = f.camera ?? _a.copy(f.toward).multiplyScalar(14 * span).addScaledVector(f.up, 1.5 * H);
|
|
15
|
+
const lift = Number(a.p.lift) * H;
|
|
16
|
+
_p0.set(0, 0, 0);
|
|
17
|
+
_p1.copy(f.up).multiplyScalar(lift * 1.4); // straight up off the ground
|
|
18
|
+
_p2.copy(cam).multiplyScalar(0.45).addScaledVector(f.right, side * 2.2 * span).addScaledVector(f.up, lift);
|
|
19
|
+
_p3.copy(cam).multiplyScalar(1.12).addScaledVector(f.right, side * 1.4 * span); // just past the lens, to the side
|
|
20
|
+
}
|
|
21
|
+
function bez(t, out, d = 0) {
|
|
22
|
+
const m = 1 - t;
|
|
23
|
+
if (d === 0)
|
|
24
|
+
return out.set(0, 0, 0).addScaledVector(_p0, m * m * m).addScaledVector(_p1, 3 * m * m * t).addScaledVector(_p2, 3 * m * t * t).addScaledVector(_p3, t * t * t);
|
|
25
|
+
if (d === 1)
|
|
26
|
+
return out.set(0, 0, 0).addScaledVector(_p1.clone().sub(_p0), 3 * m * m).addScaledVector(_p2.clone().sub(_p1), 6 * m * t).addScaledVector(_p3.clone().sub(_p2), 3 * t * t);
|
|
27
|
+
return out.set(0, 0, 0).addScaledVector(_p2.clone().sub(_p1.clone().multiplyScalar(2)).add(_p0), 6 * m).addScaledVector(_p3.clone().sub(_p2.clone().multiplyScalar(2)).add(_p1), 6 * t);
|
|
28
|
+
}
|
|
29
|
+
/** Bank into the curve: roll about the heading by the sideways acceleration, yaw towards the heading. */
|
|
30
|
+
function attitude(a, t, amount, yawAmount) {
|
|
31
|
+
const f = a.frame;
|
|
32
|
+
bez(t, _vel, 1);
|
|
33
|
+
bez(t, _acc, 2);
|
|
34
|
+
const flat = _vel.clone().addScaledVector(f.up, -_vel.dot(f.up));
|
|
35
|
+
const heading = flat.lengthSq() > 1e-8 ? flat.normalize() : f.toward.clone();
|
|
36
|
+
_side.crossVectors(f.up, heading);
|
|
37
|
+
const lateral = _acc.dot(_side) / Math.max(1e-6, _vel.lengthSq());
|
|
38
|
+
const bank = (Number(a.p.bank) * Math.PI / 180) * Math.max(-1, Math.min(1, lateral * a.span * 1.2)) * amount;
|
|
39
|
+
const yaw = Math.atan2(heading.dot(f.right), heading.dot(f.toward)) * yawAmount;
|
|
40
|
+
_r.setFromAxisAngle(heading, -bank);
|
|
41
|
+
_y.setFromAxisAngle(f.up, yaw);
|
|
42
|
+
return a.local(_r.multiply(_y));
|
|
43
|
+
}
|
|
44
|
+
const sideOf = (a) => (a.p.side === 'left' ? -1 : 1);
|
|
45
|
+
export default physicalExit({
|
|
46
|
+
value: 'flyBy',
|
|
47
|
+
label: 'Fly-by',
|
|
48
|
+
description: 'Takes off, banks and flies past the camera — it comes back from behind the camera on the other side and sets down in place',
|
|
49
|
+
params: {
|
|
50
|
+
side: {
|
|
51
|
+
type: 'select', label: 'Passes on the', default: 'right', options: [{ value: 'right', label: 'Right' }, { value: 'left', label: 'Left' }],
|
|
52
|
+
hint: 'The camera side it flies past',
|
|
53
|
+
},
|
|
54
|
+
bank: { type: 'number', label: 'Bank', default: 35, min: 0, max: 80, step: 1, unit: '°', hint: 'How hard it rolls into the turn' },
|
|
55
|
+
lift: { type: 'number', label: 'Climb', default: 0.8, min: 0, max: 4, step: 0.05, hint: 'How high it climbs first, × its height' },
|
|
56
|
+
duration: { type: 'number', label: 'Duration', default: 2.2, min: 0.5, max: 8, step: 0.05, unit: 's' },
|
|
57
|
+
},
|
|
58
|
+
exit(u, out, a) {
|
|
59
|
+
path(a, sideOf(a));
|
|
60
|
+
// takes off slowly, then accelerates along the path
|
|
61
|
+
const t = u * u * (0.4 + 0.6 * u);
|
|
62
|
+
bez(t, out.off);
|
|
63
|
+
const e = smooth(0, 0.2, u);
|
|
64
|
+
out.q.copy(attitude(a, Math.max(t, 0.02), e, e * 0.6));
|
|
65
|
+
out.s.setScalar(1 - smooth(0.9, 1, u)); // behind the lens: gone
|
|
66
|
+
},
|
|
67
|
+
enter(v, out, a) {
|
|
68
|
+
path(a, -sideOf(a));
|
|
69
|
+
// the same kind of path flown backwards: in from beside the lens, slowing down to set down
|
|
70
|
+
const left = 1 - v;
|
|
71
|
+
const t = Math.pow(left, 1.8);
|
|
72
|
+
bez(t, out.off);
|
|
73
|
+
// a soft touchdown bob in the last bit
|
|
74
|
+
out.off.addScaledVector(a.frame.up, -0.03 * a.size.y * ring(clamp01((v - 0.8) / 0.2), 1, 2.5));
|
|
75
|
+
const e = 1 - smooth(0.7, 1, v);
|
|
76
|
+
out.q.copy(attitude(a, Math.max(t, 0.02), e, e * 0.6));
|
|
77
|
+
out.s.setScalar(smooth(0, 0.08, v));
|
|
78
|
+
},
|
|
79
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frost.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/frost.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"frost.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/frost.ts"],"names":[],"mappings":";AAwEA,wBA+CG"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { Color } from 'three';
|
|
8
8
|
import { defineOperation } from '../types.js';
|
|
9
9
|
import { GLSL_WORLEY, 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 = 'Frs';
|
|
12
12
|
const KEY = 'frost';
|
|
13
13
|
const STATE = '__opFrost';
|
|
@@ -23,7 +23,7 @@ function layerFor(st) {
|
|
|
23
23
|
`;
|
|
24
24
|
return {
|
|
25
25
|
uniforms: { ...fieldUniforms(P, st.field), uFrsIce: st.ice, uFrsDensity: st.density },
|
|
26
|
-
common: `varying vec3 vFrsQ;\nvarying vec3 vFrsR;\nvarying vec3 vFrsView;\n${fieldGlsl(P)}\n${GLSL_WORLEY}`,
|
|
26
|
+
common: `varying vec3 vFrsQ;\nvarying vec3 vFrsR;\nvarying vec3 vFrsView;\n${fieldGlsl(P)}\n${goneGlsl(P)}\n${GLSL_WORLEY}`,
|
|
27
27
|
fragmentPars: 'float frsFr = 0.0; vec3 frsCell = vec3(1.0); float frsSeam = 0.0;',
|
|
28
28
|
vertex: /* glsl */ `
|
|
29
29
|
vFrsR = (uFrsRootInv * modelMatrix * vec4(transformed, 1.0)).xyz;
|
|
@@ -31,7 +31,11 @@ function layerFor(st) {
|
|
|
31
31
|
vFrsView = (modelViewMatrix * vec4(transformed, 1.0)).xyz;`,
|
|
32
32
|
diffuse: /* glsl */ `
|
|
33
33
|
{
|
|
34
|
-
|
|
34
|
+
float frsD = FrsThreshold() - FrsField(vFrsQ);
|
|
35
|
+
frsFr = smoothstep(0.0, uFrsEdgeWidth, frsD);
|
|
36
|
+
// revealed by the ice: nothing ahead of the front, solid ice right behind it
|
|
37
|
+
if (uFrsReveal > 0.5) { if (frsD < 0.0) discard; frsFr = 1.0; }
|
|
38
|
+
frsFr *= 1.0 - FrsGone(vFrsQ); // wiped by the look that replaces it
|
|
35
39
|
frsCell = fxWorley(vFrsR * (uFrsDensity / uFrsExtent));
|
|
36
40
|
frsSeam = 1.0 - smoothstep(0.0, 0.09, frsCell.y - frsCell.x);
|
|
37
41
|
${frozen}
|
|
@@ -70,6 +74,8 @@ export default defineOperation({
|
|
|
70
74
|
toggles: true,
|
|
71
75
|
usableIn: ['interaction', 'action', 'object'],
|
|
72
76
|
stack: 'surface',
|
|
77
|
+
presence: 'paint',
|
|
78
|
+
field: (target) => target.userData[STATE]?.field,
|
|
73
79
|
params: {
|
|
74
80
|
direction: { type: 'select', label: 'Direction', default: 'up', options: DIRECTION_OPTIONS },
|
|
75
81
|
ice: { type: 'color', label: 'Ice', default: '#bfe4ff' },
|
|
@@ -103,6 +109,7 @@ export default defineOperation({
|
|
|
103
109
|
const s = target.userData[STATE];
|
|
104
110
|
if (!s)
|
|
105
111
|
return;
|
|
112
|
+
setReveal(s.field, p);
|
|
106
113
|
return runProgress(target, s.field, 0, {
|
|
107
114
|
duration: Number(p.duration), ease: 'power1.in',
|
|
108
115
|
onComplete: () => { s.mats.forEach(m => removeLayer(m, KEY)); delete target.userData[STATE]; },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grow.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/grow.ts"],"names":[],"mappings":";AAIA,wBAeG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Grow — the object scales up (or down) and stays there, with a small overshoot
|
|
2
|
+
// as it arrives. From its base (it stays on the ground) or from its centre.
|
|
3
|
+
import { DURATION, heldPhysical } from './physicalHeld.js';
|
|
4
|
+
export default heldPhysical({
|
|
5
|
+
value: 'grow', label: 'Grow',
|
|
6
|
+
description: 'Scale up (or down) and stay — settles with a small overshoot; switching off brings it back',
|
|
7
|
+
ease: 'back.out(1.5)',
|
|
8
|
+
periodic: false,
|
|
9
|
+
params: {
|
|
10
|
+
scale: { type: 'number', label: 'Size', default: 1.25, min: 0.05, max: 5, step: 0.05, unit: '×' },
|
|
11
|
+
from: { type: 'select', label: 'From', default: 'base', options: [{ value: 'base', label: 'Its base' }, { value: 'center', label: 'Its centre' }] },
|
|
12
|
+
duration: { ...DURATION, default: 0.6, max: 6, hint: 'How long it takes to arrive, and to go back' },
|
|
13
|
+
},
|
|
14
|
+
memory: () => null,
|
|
15
|
+
move(part, st) {
|
|
16
|
+
part.s.setScalar(Math.max(0.001, 1 + (Number(st.p.scale) - 1) * st.amp.v));
|
|
17
|
+
part.pivot.copy(st.p.from === 'center' ? st.body.centerLocal : st.body.bottomLocal);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hologram.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/hologram.ts"],"names":[],"mappings":";AAgBA,
|
|
1
|
+
{"version":3,"file":"hologram.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/hologram.ts"],"names":[],"mappings":";AAgBA,wBA4FG"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// Reverting scans it back in: hologram first, then solid.
|
|
6
6
|
import { defineOperation } from '../types.js';
|
|
7
7
|
import { addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
8
|
-
import { SWEEP_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, runProgress, setFieldParams } from './transitionField.js';
|
|
8
|
+
import { SWEEP_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, goneGlsl, runProgress, setFieldParams, setReveal } from './transitionField.js';
|
|
9
9
|
import { Color } from 'three';
|
|
10
10
|
const P = 'Holo';
|
|
11
11
|
const KEY = 'hologram';
|
|
@@ -19,6 +19,8 @@ export default defineOperation({
|
|
|
19
19
|
toggles: true,
|
|
20
20
|
usableIn: ['interaction', 'action', 'object'],
|
|
21
21
|
objectParams: { disappear: false },
|
|
22
|
+
presence: 'paint',
|
|
23
|
+
field: (target) => target.userData[STATE]?.field,
|
|
22
24
|
params: {
|
|
23
25
|
direction: { type: 'select', label: 'Scan', default: 'down', options: SWEEP_OPTIONS },
|
|
24
26
|
color: { type: 'color', label: 'Colour', default: '#3fd4ff' },
|
|
@@ -35,7 +37,7 @@ export default defineOperation({
|
|
|
35
37
|
const own = st;
|
|
36
38
|
const layer = {
|
|
37
39
|
uniforms: { ...fieldUniforms(P, field), uHoloColor: st.color, uHoloDensity: st.density, uHoloGap: st.gap, uHoloKeep: st.keep },
|
|
38
|
-
common: `varying vec3 vHoloR;\nvarying vec3 vHoloView;\n${fieldGlsl(P)}`,
|
|
40
|
+
common: `varying vec3 vHoloR;\nvarying vec3 vHoloView;\n${fieldGlsl(P)}\n${goneGlsl(P)}`,
|
|
39
41
|
vertex: /* glsl */ `
|
|
40
42
|
vHoloR = (uHoloRootInv * modelMatrix * vec4(transformed, 1.0)).xyz;
|
|
41
43
|
vHoloView = (modelViewMatrix * vec4(transformed, 1.0)).xyz;`,
|
|
@@ -48,8 +50,10 @@ export default defineOperation({
|
|
|
48
50
|
float fa = mix(-band, 1.0 + uHoloGap + band, clamp(uHoloProgress, 0.0, 1.0)); // solid → hologram
|
|
49
51
|
// hologram → gone (never, when the object should stay as a hologram)
|
|
50
52
|
float fb = uHoloKeep > 0.5 ? -1.0 : fa - uHoloGap;
|
|
51
|
-
|
|
52
|
-
if (s <
|
|
53
|
+
float gone = HoloGone(q); // wiped by the look that replaces it
|
|
54
|
+
if (gone < 0.5 && s < fb) discard;
|
|
55
|
+
if (gone > 0.5) {
|
|
56
|
+
} else if (s < fa) {
|
|
53
57
|
// grid in root-local units, square cells, anti-aliased
|
|
54
58
|
vec3 cell = vHoloR * (uHoloDensity / uHoloExtent);
|
|
55
59
|
vec3 g = abs(fract(cell - 0.5) - 0.5) / max(fwidth(cell), vec3(1e-4));
|
|
@@ -64,6 +68,7 @@ export default defineOperation({
|
|
|
64
68
|
if (I < 0.32) discard;
|
|
65
69
|
outgoingLight = uHoloColor * I * 1.6;
|
|
66
70
|
} else {
|
|
71
|
+
if (uHoloReveal > 0.5) discard; // revealed by the scan: nothing ahead of the plane
|
|
67
72
|
// the solid side gets a faint pre-glow just ahead of the plane
|
|
68
73
|
outgoingLight += uHoloColor * exp(-(s - fa) / 0.03) * 0.6;
|
|
69
74
|
}
|
|
@@ -78,7 +83,7 @@ export default defineOperation({
|
|
|
78
83
|
target.userData[STATE] = st;
|
|
79
84
|
}
|
|
80
85
|
const s = st;
|
|
81
|
-
setFieldParams(s.field, { direction: p.direction }, target, ctx);
|
|
86
|
+
setFieldParams(s.field, { direction: p.direction, __reveal: p.__reveal }, target, ctx);
|
|
82
87
|
s.color.value.set(String(p.color));
|
|
83
88
|
s.density.value = Number(p.density);
|
|
84
89
|
s.gap.value = Number(p.hold);
|
|
@@ -95,6 +100,7 @@ export default defineOperation({
|
|
|
95
100
|
if (!s)
|
|
96
101
|
return;
|
|
97
102
|
setMeshesHidden(target, false);
|
|
103
|
+
setReveal(s.field, p);
|
|
98
104
|
return runProgress(target, s.field, 0, {
|
|
99
105
|
duration: Number(p.duration), ease: 'power1.inOut',
|
|
100
106
|
onComplete: () => { s.mats.forEach(m => removeLayer(m, KEY)); delete target.userData[STATE]; },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inkBloom.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/inkBloom.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"inkBloom.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/inkBloom.ts"],"names":[],"mappings":";AA4EA,wBAyHG"}
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
// so the ink reads as clean curling threads that fray, sink and thin out, not
|
|
5
5
|
// as soft blobs. Normal blending (dark on light), so it works on light scenes.
|
|
6
6
|
// Reverting draws the ink back into the object.
|
|
7
|
+
// With Disappear off (an object effect's default) the object stays stained with ink,
|
|
8
|
+
// filaments hanging in the water around it, swaying but never thinning out.
|
|
7
9
|
import { BufferAttribute, BufferGeometry, LineSegments, NormalBlending, ShaderMaterial } from 'three';
|
|
8
10
|
import { defineOperation } from '../types.js';
|
|
9
11
|
import { addLayer, forEachMeshMaterial, removeLayer, uniformDecl } from './shaderLayers.js';
|
|
10
|
-
import { DIRECTION_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, hideMeshes, runProgress, setFieldParams, surfaceLayer, } from './transitionField.js';
|
|
12
|
+
import { DIRECTION_OPTIONS, createFieldState, fieldGlsl, fieldUniforms, hideMeshes, runProgress, setFieldParams, setReveal, surfaceLayer, } from './transitionField.js';
|
|
11
13
|
import { sampleSurfaceCached } from './surfaceSample.js';
|
|
12
14
|
import { hideUntilWarm } from './warmup.js';
|
|
13
15
|
const P = 'Ink';
|
|
@@ -16,6 +18,28 @@ const STATE = '__opInk';
|
|
|
16
18
|
const LIFE = 0.9;
|
|
17
19
|
/** Points per filament (its trail through the water). */
|
|
18
20
|
const TRAIL = 12;
|
|
21
|
+
/** Keep: a wisp hangs this far along its path. */
|
|
22
|
+
const KEEP_AGE = 0.35;
|
|
23
|
+
/** The surface: stained along the front and gone behind it — or, keeping, stained all over and staying. */
|
|
24
|
+
function inkLayer(field, mixC, keep) {
|
|
25
|
+
const base = surfaceLayer(P, field, 'stain');
|
|
26
|
+
return {
|
|
27
|
+
...base,
|
|
28
|
+
uniforms: { ...base.uniforms, uInkMix: mixC, uInkKeep: keep },
|
|
29
|
+
fragment: /* glsl */ `
|
|
30
|
+
if (uInkKeep > 0.5) {
|
|
31
|
+
float InkD = InkField(vInkQ) - InkThreshold();
|
|
32
|
+
float stained = smoothstep(0.0, uInkEdgeWidth, -InkD);
|
|
33
|
+
// painting the object in: nothing ahead of the front, full ink right behind it
|
|
34
|
+
if (uInkReveal > 0.5) { if (InkD > 0.0) discard; stained = 1.0; }
|
|
35
|
+
// ink: a slow swirl of slightly lighter ink moving through it
|
|
36
|
+
float swirl = 0.8 + 0.4 * fxNoise(vInkQ * 5.0 + vec3(uInkTime * 0.12, -uInkTime * 0.08, 0.0));
|
|
37
|
+
vec3 ink = mix(uInkEdgeColor, outgoingLight, uInkMix) * swirl;
|
|
38
|
+
outgoingLight = mix(outgoingLight, ink, stained);
|
|
39
|
+
} else {${base.fragment}
|
|
40
|
+
}`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
19
43
|
function buildFilaments(target, count) {
|
|
20
44
|
const s = sampleSurfaceCached(target, count, 29);
|
|
21
45
|
const segs = TRAIL - 1;
|
|
@@ -45,18 +69,21 @@ function buildFilaments(target, count) {
|
|
|
45
69
|
export default defineOperation({
|
|
46
70
|
value: 'inkBloom',
|
|
47
71
|
label: 'Ink bloom',
|
|
48
|
-
description: 'Bleed the targets into fine curling ink filaments, like a drop in water — reverting draws the ink back in',
|
|
72
|
+
description: 'Bleed the targets into fine curling ink filaments, like a drop in water (or, Disappear off, keep them inked) — reverting draws the ink back in',
|
|
49
73
|
channel: 'visual',
|
|
50
74
|
multi: true,
|
|
51
75
|
toggles: true,
|
|
52
|
-
usableIn: ['interaction', 'action'],
|
|
76
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
77
|
+
objectParams: { disappear: false },
|
|
78
|
+
presence: 'paint',
|
|
53
79
|
params: {
|
|
54
80
|
direction: { type: 'select', label: 'Direction', default: 'noise', options: DIRECTION_OPTIONS },
|
|
81
|
+
disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the object stays inked, filaments hanging around it' },
|
|
55
82
|
edgeColor: { type: 'color', label: 'Ink colour', default: '#16203a' },
|
|
56
83
|
tint: { type: 'number', label: 'Object colour', default: 0.15, min: 0, max: 1, step: 0.05, hint: 'How much of the object’s own colour the ink keeps' },
|
|
57
84
|
filaments: { type: 'number', label: 'Filaments', default: 9000, min: 1000, max: 40000, step: 500 },
|
|
58
85
|
opacity: { type: 'number', label: 'Density', default: 0.55, min: 0.05, max: 1, step: 0.05 },
|
|
59
|
-
sink: { type: 'number', label: 'Sink', default: 1, min: -2, max: 3, step: 0.05, unit: '×', hint: 'Negative rises like smoke' },
|
|
86
|
+
sink: { type: 'number', label: 'Sink', default: 1, min: -2, max: 3, step: 0.05, unit: '×', hint: 'Negative rises like smoke', showWhen: { disappear: ['true'] } },
|
|
60
87
|
scale: { type: 'number', label: 'Pattern', default: 2.5, min: 0.5, max: 12, step: 0.1 },
|
|
61
88
|
duration: { type: 'number', label: 'Duration', default: 3.6, min: 0.3, max: 14, step: 0.1, unit: 's' },
|
|
62
89
|
},
|
|
@@ -65,8 +92,8 @@ export default defineOperation({
|
|
|
65
92
|
if (!st) {
|
|
66
93
|
const field = createFieldState(target);
|
|
67
94
|
field.edgeWidth.value = 0.12;
|
|
68
|
-
const mixC = { value: 0.15 }, sink = { value: 1 }, opacity = { value: 0.55 };
|
|
69
|
-
const uniforms = { ...fieldUniforms(P, field), uInkMix: mixC, uInkSink: sink, uInkOpacity: opacity };
|
|
95
|
+
const mixC = { value: 0.15 }, sink = { value: 1 }, opacity = { value: 0.55 }, keep = { value: 0 };
|
|
96
|
+
const uniforms = { ...fieldUniforms(P, field), uInkMix: mixC, uInkSink: sink, uInkOpacity: opacity, uInkKeep: keep };
|
|
70
97
|
const decl = Object.keys(uniforms).map(n => uniformDecl(n, uniforms[n].value)).join('\n');
|
|
71
98
|
const mat = new ShaderMaterial({
|
|
72
99
|
uniforms: uniforms,
|
|
@@ -88,6 +115,8 @@ vec3 inkAt(vec3 p0, vec3 n0, vec4 r, float a) {
|
|
|
88
115
|
void main() {
|
|
89
116
|
float birth = InkBirthOf(InkField(InkNorm(position)));
|
|
90
117
|
float a = (uInkProgress - birth) / ${LIFE.toFixed(2)};
|
|
118
|
+
// keep: the wisp hangs part-way along its path, swaying along it
|
|
119
|
+
a = mix(a, min(a, ${KEEP_AGE} * (0.92 + 0.08 * sin(uInkTime * 0.7 + aR.w * 6.2832))), uInkKeep);
|
|
91
120
|
// the trail: this vertex sits a little back along the wisp's own path
|
|
92
121
|
float trail = 0.22 * (0.6 + 0.8 * aR.w);
|
|
93
122
|
float ak = clamp(a - aK * trail, 0.0, 1.0);
|
|
@@ -114,9 +143,9 @@ void main() {
|
|
|
114
143
|
lines.renderOrder = 10;
|
|
115
144
|
target.add(lines);
|
|
116
145
|
hideUntilWarm(lines);
|
|
117
|
-
st = { field, mixC, sink, opacity, lines, mats: new Set() };
|
|
146
|
+
st = { field, mixC, sink, opacity, keep, lines, mats: new Set() };
|
|
118
147
|
const own = st;
|
|
119
|
-
const layer =
|
|
148
|
+
const layer = inkLayer(field, mixC, keep);
|
|
120
149
|
forEachMeshMaterial(target, (m, mesh) => {
|
|
121
150
|
if (mesh.userData?.__opFxHelper)
|
|
122
151
|
return;
|
|
@@ -131,6 +160,12 @@ void main() {
|
|
|
131
160
|
s.sink.value = Number(p.sink);
|
|
132
161
|
s.opacity.value = Number(p.opacity);
|
|
133
162
|
s.lines.visible = true;
|
|
163
|
+
s.keep.value = p.disappear === false ? 1 : 0;
|
|
164
|
+
hideMeshes(target, KEY, false);
|
|
165
|
+
if (s.keep.value) {
|
|
166
|
+
// keep: the ink spreads over the whole object (0 → 1) and holds
|
|
167
|
+
return runProgress(target, s.field, 1, { duration: Number(p.duration) / (1 + LIFE), ease: 'none', hold: true });
|
|
168
|
+
}
|
|
134
169
|
return runProgress(target, s.field, 1 + LIFE, {
|
|
135
170
|
duration: Number(p.duration), ease: 'none',
|
|
136
171
|
onComplete: () => { hideMeshes(target, KEY, true); s.lines.visible = false; },
|
|
@@ -141,9 +176,11 @@ void main() {
|
|
|
141
176
|
if (!s)
|
|
142
177
|
return;
|
|
143
178
|
hideMeshes(target, KEY, false);
|
|
179
|
+
setReveal(s.field, p);
|
|
144
180
|
s.lines.visible = true;
|
|
181
|
+
// from a hold it only has part of the way to go: keep the same speed
|
|
145
182
|
return runProgress(target, s.field, 0, {
|
|
146
|
-
duration: Number(p.duration), ease: 'none',
|
|
183
|
+
duration: Number(p.duration) * Math.min(1, Math.max(0.1, s.field.progress.value / (1 + LIFE))), ease: 'none',
|
|
147
184
|
onComplete: () => {
|
|
148
185
|
s.mats.forEach(m => removeLayer(m, KEY));
|
|
149
186
|
s.lines.removeFromParent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jelly.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/jelly.ts"],"names":[],"mappings":";AAWA,
|
|
1
|
+
{"version":3,"file":"jelly.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/jelly.ts"],"names":[],"mappings":";AAWA,wBA8CG"}
|
|
@@ -14,7 +14,7 @@ export default defineOperation({
|
|
|
14
14
|
channel: 'transform',
|
|
15
15
|
multi: true,
|
|
16
16
|
toggles: false,
|
|
17
|
-
usableIn: ['interaction', 'action'],
|
|
17
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
18
18
|
params: {
|
|
19
19
|
strength: { type: 'number', label: 'Squash', default: 0.28, min: 0.02, max: 0.7, step: 0.01 },
|
|
20
20
|
wobbles: { type: 'number', label: 'Wobbles', default: 3, min: 1, max: 8, step: 0.5 },
|
|
@@ -24,27 +24,37 @@ export default defineOperation({
|
|
|
24
24
|
const running = target.userData[KEY];
|
|
25
25
|
if (running) {
|
|
26
26
|
gsap.killTweensOf(running.proxy);
|
|
27
|
-
releaseRest(target);
|
|
27
|
+
releaseRest(target, KEY);
|
|
28
28
|
}
|
|
29
|
-
const rest = acquireRest(target);
|
|
30
|
-
const proxy = { t: 0 };
|
|
31
|
-
target.userData[KEY] = { proxy };
|
|
29
|
+
const rest = acquireRest(target, KEY);
|
|
32
30
|
const A = Number(p.strength);
|
|
33
31
|
const D = Number(p.duration);
|
|
32
|
+
// p.__backward (playback: reverse / yoyo) plays the same move backwards in time.
|
|
33
|
+
const back = p.__backward === true;
|
|
34
|
+
const proxy = { t: back ? D : 0 };
|
|
35
|
+
target.userData[KEY] = { proxy };
|
|
34
36
|
const w = 2 * Math.PI * (Number(p.wobbles) / D); // rad/s
|
|
35
37
|
const k = 4.6 / D; // decays to 1% by the end
|
|
36
38
|
const s = new Vector3();
|
|
37
39
|
gsap.to(proxy, {
|
|
38
|
-
t: D, duration: D, ease: 'none',
|
|
40
|
+
t: back ? 0 : D, duration: D, ease: 'none',
|
|
39
41
|
onUpdate: () => {
|
|
40
42
|
const t = proxy.t;
|
|
41
43
|
// damped spring, squash first
|
|
42
44
|
const sy = 1 - A * Math.exp(-k * t) * Math.sin(w * t);
|
|
43
45
|
const sxz = 1 / Math.sqrt(Math.max(sy, 0.05)); // keep the volume
|
|
44
46
|
s.set(sxz, sy, sxz);
|
|
45
|
-
poseAbout(target, rest, rest.bottomLocal, NO_TURN, s);
|
|
47
|
+
poseAbout(target, rest, rest.bottomLocal, NO_TURN, s, undefined, KEY);
|
|
46
48
|
},
|
|
47
|
-
onComplete: () => { delete target.userData[KEY]; releaseRest(target); },
|
|
49
|
+
onComplete: () => { delete target.userData[KEY]; releaseRest(target, KEY); },
|
|
48
50
|
});
|
|
49
51
|
},
|
|
52
|
+
cancel(target) {
|
|
53
|
+
const running = target.userData[KEY];
|
|
54
|
+
if (!running)
|
|
55
|
+
return;
|
|
56
|
+
gsap.killTweensOf(running.proxy);
|
|
57
|
+
delete target.userData[KEY];
|
|
58
|
+
releaseRest(target, KEY);
|
|
59
|
+
},
|
|
50
60
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knockAway.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/knockAway.ts"],"names":[],"mappings":";AA0BA,wBAmDG"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Knock away — the object is struck from the side at a point above or below its
|
|
2
|
+
// centre. The impulse gives it linear AND angular velocity, the spin set by the
|
|
3
|
+
// arm of the hit over its inertia (a box from its own bounds: I ∝ h² + w²), so a
|
|
4
|
+
// tall thing struck high tips and tumbles while a flat one mostly skims. It
|
|
5
|
+
// compresses at the impact, flies off on a ballistic arc, slowed by drag, tumbling
|
|
6
|
+
// at a constant rate, and is gone. The way back: it is thrown in from the other
|
|
7
|
+
// side with back-spin, lands upright and settles with two small hops and a rock.
|
|
8
|
+
import { Quaternion, Vector3 } from 'three';
|
|
9
|
+
import { clamp01, physicalExit, ring, smooth, stretchAxis } from './physicalExit.js';
|
|
10
|
+
const LAND = 0.62;
|
|
11
|
+
const _d = new Vector3(), _n = new Vector3(), _q = new Quaternion(), _y = new Quaternion();
|
|
12
|
+
function axes(a) {
|
|
13
|
+
const f = a.frame;
|
|
14
|
+
_d.copy(f.right).multiplyScalar(a.p.side === 'right' ? -1 : 1); // struck from the left = flies right
|
|
15
|
+
_n.crossVectors(f.up, _d).normalize(); // + about it tips the top towards _d
|
|
16
|
+
}
|
|
17
|
+
/** Turns of tumble over the flight: the hit's arm over the inertia (box), scaled by the strength. */
|
|
18
|
+
function tumbleTurns(a) {
|
|
19
|
+
const H = a.size.y, W = Math.max(a.size.x, a.size.z);
|
|
20
|
+
const arm = (Number(a.p.hit) - 0.5) * 2; // −1 (bottom) … 1 (top)
|
|
21
|
+
return 1.3 * arm * (Number(a.p.strength) / 6) * (H * H) / (H * H + W * W) * 2;
|
|
22
|
+
}
|
|
23
|
+
export default physicalExit({
|
|
24
|
+
value: 'knockAway',
|
|
25
|
+
label: 'Knock away',
|
|
26
|
+
description: 'Struck from the side: it flies off on an arc, tumbling by where it was hit — tall things tip, flat ones skim; it is thrown back in and lands with a hop',
|
|
27
|
+
params: {
|
|
28
|
+
side: {
|
|
29
|
+
type: 'select', label: 'Struck from', default: 'left', options: [{ value: 'left', label: 'The left' }, { value: 'right', label: 'The right' }],
|
|
30
|
+
hint: 'Screen-relative when it starts',
|
|
31
|
+
},
|
|
32
|
+
strength: { type: 'number', label: 'Strength', default: 6, min: 2, max: 30, step: 0.5, hint: 'How far it flies, × its size' },
|
|
33
|
+
lift: { type: 'number', label: 'Arc', default: 1.6, min: 0, max: 5, step: 0.05, hint: 'Height of the arc, × its height' },
|
|
34
|
+
hit: { type: 'number', label: 'Hit height', default: 0.75, min: 0, max: 1, step: 0.01, hint: '0 = struck at its base, 1 = at its top' },
|
|
35
|
+
duration: { type: 'number', label: 'Duration', default: 1.6, min: 0.3, max: 6, step: 0.05, unit: 's' },
|
|
36
|
+
},
|
|
37
|
+
exit(u, out, a) {
|
|
38
|
+
const p = a.p, H = a.size.y;
|
|
39
|
+
axes(a);
|
|
40
|
+
const dist = Number(p.strength) * a.span;
|
|
41
|
+
const x = dist * (1 - Math.pow(1 - u, 1.25)); // drag slows it
|
|
42
|
+
const y = 4 * Number(p.lift) * H * u * (1 - u);
|
|
43
|
+
out.off.copy(_d).multiplyScalar(x).addScaledVector(a.frame.up, y);
|
|
44
|
+
const th = 2 * Math.PI * tumbleTurns(a) * u;
|
|
45
|
+
_q.setFromAxisAngle(_n, th).multiply(_y.setFromAxisAngle(a.frame.up, 0.35 * u));
|
|
46
|
+
out.q.copy(a.local(_q));
|
|
47
|
+
// compressed by the blow for an instant
|
|
48
|
+
const squash = 0.18 * Math.sin(Math.PI * Math.min(1, u / 0.12));
|
|
49
|
+
stretchAxis(out.s, a.axis(_d), 1 - squash, 1 - smooth(0.7, 1, u));
|
|
50
|
+
},
|
|
51
|
+
enter(v, out, a) {
|
|
52
|
+
const p = a.p, H = a.size.y;
|
|
53
|
+
axes(a);
|
|
54
|
+
const dist = Number(p.strength) * a.span * 0.7;
|
|
55
|
+
if (v < LAND) {
|
|
56
|
+
const tau = v / LAND;
|
|
57
|
+
const x = -0.15 * a.span - dist * Math.pow(1 - tau, 1.15);
|
|
58
|
+
const y = 4 * Number(p.lift) * 0.8 * H * tau * (1 - tau);
|
|
59
|
+
out.off.copy(_d).multiplyScalar(x).addScaledVector(a.frame.up, y);
|
|
60
|
+
// back-spin that runs out exactly as it lands upright
|
|
61
|
+
const th = -2 * Math.PI * 0.75 * Math.sign(tumbleTurns(a) || 1) * Math.pow(1 - tau, 1.3);
|
|
62
|
+
out.q.copy(a.local(_q.setFromAxisAngle(_n, th)));
|
|
63
|
+
out.s.setScalar(smooth(0, 0.25, tau));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
// two shrinking hops over the last bit, rocking
|
|
67
|
+
const sg = clamp01((v - LAND) / (1 - LAND));
|
|
68
|
+
const x = -0.15 * a.span * Math.pow(1 - sg, 1.5);
|
|
69
|
+
const y = 0.22 * H * Math.abs(Math.sin(2 * Math.PI * sg)) * (1 - sg) * (1 - sg);
|
|
70
|
+
out.off.copy(_d).multiplyScalar(x).addScaledVector(a.frame.up, y);
|
|
71
|
+
out.q.copy(a.local(_q.setFromAxisAngle(_n, 0.12 * ring(sg, 1.5, 3))));
|
|
72
|
+
out.pivot = 'bottom';
|
|
73
|
+
},
|
|
74
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leafFall.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/leafFall.ts"],"names":[],"mappings":";AA2BA,wBA+CG"}
|