@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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Turn away — the object turns like a card and leaves edge-on. It spins up about
|
|
2
|
+
// a vertical (or horizontal) axis and, as it comes round to face the camera with
|
|
3
|
+
// its edge, the side that would face you thins away — it vanishes at the moment
|
|
4
|
+
// it is edge-on. The way back: it turns into view from a sliver, slowing, and
|
|
5
|
+
// settles with a small overshoot.
|
|
6
|
+
import { Quaternion, Vector3 } from 'three';
|
|
7
|
+
import { physicalExit, ring, smooth } from './physicalExit.js';
|
|
8
|
+
const _q = new Quaternion(), _q2 = new Quaternion(), _e = new Vector3();
|
|
9
|
+
/** Total turn: whole turns, then the quarter that brings it edge-on. */
|
|
10
|
+
const angleOf = (a) => (Number(a.p.turns) + 0.25) * 2 * Math.PI * (a.p.reverse ? -1 : 1);
|
|
11
|
+
/**
|
|
12
|
+
* Turn by `th` about the chosen screen axis and thin `thin` (0…1) the side that ends up
|
|
13
|
+
* across the view when the full turn `end` is reached.
|
|
14
|
+
*/
|
|
15
|
+
function pose(out, a, th, end, thin) {
|
|
16
|
+
const f = a.frame;
|
|
17
|
+
const vertical = a.p.axis !== 'horizontal';
|
|
18
|
+
const turnAxis = vertical ? f.up : f.right;
|
|
19
|
+
_q.setFromAxisAngle(turnAxis, th);
|
|
20
|
+
out.q.copy(a.local(_q));
|
|
21
|
+
// the rest-pose direction that the end turn carries onto the collapsing screen axis
|
|
22
|
+
_e.copy(vertical ? f.right : f.up).applyQuaternion(_q2.setFromAxisAngle(turnAxis, -end));
|
|
23
|
+
const k = 1 - thin;
|
|
24
|
+
out.s.set(1, 1, 1).setComponent(a.axis(_e), Math.max(k, 0));
|
|
25
|
+
}
|
|
26
|
+
export default physicalExit({
|
|
27
|
+
value: 'turnAway',
|
|
28
|
+
label: 'Turn away',
|
|
29
|
+
description: 'Turns like a card and vanishes edge-on — it turns back into view from a sliver',
|
|
30
|
+
params: {
|
|
31
|
+
axis: {
|
|
32
|
+
type: 'select', label: 'Turns about', default: 'vertical', options: [{ value: 'vertical', label: 'Its upright axis' }, { value: 'horizontal', label: 'A level axis (flips over)' }],
|
|
33
|
+
},
|
|
34
|
+
turns: { type: 'number', label: 'Turns', default: 1, min: 0, max: 5, step: 0.25, hint: 'Whole turns before it goes edge-on' },
|
|
35
|
+
reverse: { type: 'boolean', label: 'Other way', default: false },
|
|
36
|
+
duration: { type: 'number', label: 'Duration', default: 1.2, min: 0.3, max: 6, step: 0.05, unit: 's' },
|
|
37
|
+
},
|
|
38
|
+
exit(u, out, a) {
|
|
39
|
+
const end = angleOf(a);
|
|
40
|
+
// spins up (turn ∝ u²); the side across the view thins over the last quarter turn
|
|
41
|
+
const th = end * u * u;
|
|
42
|
+
const last = 1 - 0.25 / (Number(a.p.turns) + 0.25); // where the last quarter starts, in turn share
|
|
43
|
+
const thin = smooth(Math.sqrt(Math.max(0, last)) * 0.98, 1, u);
|
|
44
|
+
pose(out, a, th, end, thin);
|
|
45
|
+
},
|
|
46
|
+
enter(v, out, a) {
|
|
47
|
+
const end = angleOf(a);
|
|
48
|
+
// from edge-on (−end) back to facing, slowing; a small overshoot at the end
|
|
49
|
+
const left = 1 - v;
|
|
50
|
+
const th = -end * Math.pow(left, 2.2) + 0.12 * Math.sign(end) * ring(smooth(0.55, 1, v), 1, 3);
|
|
51
|
+
const thin = 1 - smooth(0, 0.3, v);
|
|
52
|
+
pose(out, a, th, -end, thin);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unweave.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/unweave.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"unweave.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/unweave.ts"],"names":[],"mappings":";AA+EA,wBAgKG"}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
// of light beyond the object on that side (left/right: screen, at trigger)
|
|
7
7
|
// random every thread segment flies off on its own heading and fades
|
|
8
8
|
// scale the whole thread sculpture expands outward, keeping its shape, and fades
|
|
9
|
-
// With
|
|
9
|
+
// With Disappear off (an object effect's default) the object stays as a woven thread
|
|
10
|
+
// sculpture and holds: light pulses run along the rings, threads shimmer.
|
|
10
11
|
// Reverting weaves the object back together.
|
|
11
12
|
import { AdditiveBlending, BufferAttribute, BufferGeometry, Color, LineSegments, Matrix4, ShaderMaterial, Vector3 } from 'three';
|
|
12
13
|
import { defineOperation } from '../types.js';
|
|
@@ -19,6 +20,8 @@ const KEY = 'unweave';
|
|
|
19
20
|
const STATE = '__opUnweave';
|
|
20
21
|
const MAX_TRIS = 300_000;
|
|
21
22
|
const MAX_SEGMENTS = 200_000;
|
|
23
|
+
/** The threads run on past the surface (0 → 1) to 1.6 while dispersing. */
|
|
24
|
+
const END = 1.6;
|
|
22
25
|
const MODES = ['up', 'down', 'left', 'right', 'random', 'scale'];
|
|
23
26
|
/** Slice every mesh of the target with `levels` horizontal planes (root space). */
|
|
24
27
|
function contourSegments(target, levels) {
|
|
@@ -76,17 +79,19 @@ function contourSegments(target, levels) {
|
|
|
76
79
|
export default defineOperation({
|
|
77
80
|
value: 'unweave',
|
|
78
81
|
label: 'Unweave',
|
|
79
|
-
description: 'Re-draw the targets as glowing threads that unravel into a point of light — reverting weaves them back',
|
|
82
|
+
description: 'Re-draw the targets as glowing threads that unravel into a point of light (or, Disappear off, stay as a thread sculpture) — reverting weaves them back',
|
|
80
83
|
channel: 'visual',
|
|
81
84
|
multi: true,
|
|
82
85
|
toggles: true,
|
|
83
|
-
usableIn: ['interaction', 'action'],
|
|
86
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
87
|
+
objectParams: { disappear: false },
|
|
88
|
+
// no presence: with Disappear off the look decorates the object (it appears, then is re-drawn); on, it is the entrance / exit
|
|
84
89
|
params: {
|
|
85
90
|
color: { type: 'color', label: 'Thread', default: '#ffcf7a' },
|
|
86
91
|
threads: { type: 'number', label: 'Threads', default: 56, min: 8, max: 200, step: 1, hint: 'Contour lines from bottom to top' },
|
|
87
|
-
|
|
92
|
+
disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the object stays as a glowing thread sculpture' },
|
|
88
93
|
mode: {
|
|
89
|
-
type: 'select', label: 'Dispersal', default: 'up',
|
|
94
|
+
type: 'select', label: 'Dispersal', default: 'up', showWhen: { disappear: ['true'] },
|
|
90
95
|
options: [
|
|
91
96
|
{ value: 'up', label: 'Unravel upward' }, { value: 'down', label: 'Unravel downward' },
|
|
92
97
|
{ value: 'left', label: 'Unravel left → right' }, { value: 'right', label: 'Unravel right → left' },
|
|
@@ -114,7 +119,7 @@ export default defineOperation({
|
|
|
114
119
|
uniforms: uniforms,
|
|
115
120
|
vertexShader: `${decl}
|
|
116
121
|
attribute float aUnwLevel; attribute float aUnwAng; attribute float aUnwRand;
|
|
117
|
-
varying float vUnwA; varying float vUnwU;
|
|
122
|
+
varying float vUnwA; varying float vUnwU; varying float vUnwL; varying float vUnwR;
|
|
118
123
|
${fieldGlsl(P)}
|
|
119
124
|
${GLSL_ROT}
|
|
120
125
|
void main() {
|
|
@@ -136,6 +141,7 @@ void main() {
|
|
|
136
141
|
float u = clamp((prog - 0.55 - delay * 0.9) / 0.4, 0.0, 1.0) * uUnwDisperse;
|
|
137
142
|
u = u * u * (3.0 - 2.0 * u);
|
|
138
143
|
vUnwU = u;
|
|
144
|
+
vUnwL = s; vUnwR = aUnwRand;
|
|
139
145
|
vec3 p;
|
|
140
146
|
if (uUnwMode < 3.5) {
|
|
141
147
|
vec3 rel = fxRot(ax, u * (2.5 + aUnwRand)) * rel0;
|
|
@@ -152,10 +158,16 @@ void main() {
|
|
|
152
158
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(p, 1.0);
|
|
153
159
|
}`,
|
|
154
160
|
fragmentShader: `
|
|
155
|
-
uniform vec3 uUnwColor;
|
|
161
|
+
uniform vec3 uUnwColor; uniform float uUnwTime; uniform float uUnwDisperse; uniform float uUnwProgress;
|
|
162
|
+
varying float vUnwA; varying float vUnwU; varying float vUnwL; varying float vUnwR;
|
|
156
163
|
void main() {
|
|
157
164
|
float a = vUnwA * (1.0 - smoothstep(0.85, 1.0, vUnwU));
|
|
158
|
-
|
|
165
|
+
// holding as a sculpture: a pulse of light climbs the rings, threads shimmer
|
|
166
|
+
float held = (1.0 - uUnwDisperse) * step(0.9999, uUnwProgress);
|
|
167
|
+
float pulse = 0.5 + 0.5 * sin((vUnwL * 7.0 - uUnwTime * 1.3) * 6.2832);
|
|
168
|
+
float shimmer = 0.6 + 0.4 * sin(uUnwTime * (2.0 + 3.0 * vUnwR) + vUnwR * 40.0);
|
|
169
|
+
float glow = mix(1.0, 0.55 + 0.9 * pulse * pulse + 0.35 * shimmer, held);
|
|
170
|
+
vec3 c = uUnwColor * (1.2 + 2.5 * vUnwU) * glow;
|
|
159
171
|
gl_FragColor = vec4(c * a, a);
|
|
160
172
|
#include <tonemapping_fragment>
|
|
161
173
|
#include <colorspace_fragment>
|
|
@@ -186,7 +198,7 @@ void main() {
|
|
|
186
198
|
s.color.value.set(String(p.color));
|
|
187
199
|
const mode = MODES.includes(String(p.mode)) ? String(p.mode) : 'up';
|
|
188
200
|
s.mode.value = MODES.indexOf(mode);
|
|
189
|
-
s.disperse.value = p.
|
|
201
|
+
s.disperse.value = p.disappear === false ? 0 : 1;
|
|
190
202
|
if (mode === 'up')
|
|
191
203
|
s.axis.value.set(0, 1, 0);
|
|
192
204
|
else if (mode === 'down')
|
|
@@ -205,12 +217,18 @@ void main() {
|
|
|
205
217
|
s.field.sweep.value.copy(s.axis.value).negate();
|
|
206
218
|
}
|
|
207
219
|
s.lines.visible = true;
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
220
|
+
if (s.disperse.value === 0) {
|
|
221
|
+
// keep: the surface goes (0 → 1), the sculpture stays and holds
|
|
222
|
+
return runProgress(target, s.field, 1, {
|
|
223
|
+
duration: Number(p.duration) * (1 / END), ease: 'none', hold: true,
|
|
224
|
+
onComplete: () => hideMeshes(target, KEY, true),
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
hideMeshes(target, KEY, false);
|
|
228
|
+
// 0 → 1: surface goes (field clamps at 1); the threads run on to END
|
|
229
|
+
return runProgress(target, s.field, END, {
|
|
211
230
|
duration: Number(p.duration), ease: 'none',
|
|
212
|
-
onComplete: () => { hideMeshes(target, KEY, true);
|
|
213
|
-
s.lines.visible = false; },
|
|
231
|
+
onComplete: () => { hideMeshes(target, KEY, true); s.lines.visible = false; },
|
|
214
232
|
});
|
|
215
233
|
},
|
|
216
234
|
revert(target, p) {
|
|
@@ -219,8 +237,9 @@ void main() {
|
|
|
219
237
|
return;
|
|
220
238
|
hideMeshes(target, KEY, false);
|
|
221
239
|
s.lines.visible = true;
|
|
240
|
+
// from a hold it only has part of the way to go: keep the same speed
|
|
222
241
|
return runProgress(target, s.field, 0, {
|
|
223
|
-
duration: Number(p.duration), ease: 'none',
|
|
242
|
+
duration: Number(p.duration) * Math.min(1, Math.max(0.1, s.field.progress.value / END)), ease: 'none',
|
|
224
243
|
onComplete: () => {
|
|
225
244
|
s.mats.forEach(m => removeLayer(m, KEY));
|
|
226
245
|
s.lines.removeFromParent();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vortexDrain.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/vortexDrain.ts"],"names":[],"mappings":";AAuBA,wBA8BG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Vortex drain — the object is caught by a whirlpool under it and drained away.
|
|
2
|
+
// It is drawn out onto an orbit, then spirals in and down the funnel, keeping
|
|
3
|
+
// its angular momentum: ω ∝ L / r², so it whirls faster and faster as the orbit
|
|
4
|
+
// tightens, spins up about its own axis, leans into the funnel and shrinks into
|
|
5
|
+
// the point below its base. The way back is the drain run backwards, a fountain:
|
|
6
|
+
// it is flung up out of the point, slows as the orbit widens and is set down.
|
|
7
|
+
import { Quaternion, Vector3 } from 'three';
|
|
8
|
+
import { clamp01, physicalExit, smooth } from './physicalExit.js';
|
|
9
|
+
const N = 512;
|
|
10
|
+
const _q = new Quaternion(), _t = new Quaternion(), _axis = new Vector3();
|
|
11
|
+
/** Orbit radius (fraction of the widest): opens to its widest a third of the way in, closes to 0. */
|
|
12
|
+
const radiusAt = (u) => Math.sin(Math.PI * Math.pow(clamp01(u), 0.6));
|
|
13
|
+
/** Angle along the drain at u, read from the integrated table. */
|
|
14
|
+
function thetaAt(tab, u) {
|
|
15
|
+
const x = clamp01(u) * (N - 1), i = Math.floor(x), f = x - i;
|
|
16
|
+
return i >= N - 1 ? tab.theta[N - 1] : tab.theta[i] * (1 - f) + tab.theta[i + 1] * f;
|
|
17
|
+
}
|
|
18
|
+
export default physicalExit({
|
|
19
|
+
value: 'vortexDrain',
|
|
20
|
+
label: 'Vortex drain',
|
|
21
|
+
description: 'Caught by a whirlpool: it spirals in and down, spinning faster as the orbit tightens, and drains away — reverting flings it back up out of the funnel',
|
|
22
|
+
params: {
|
|
23
|
+
turns: { type: 'number', label: 'Turns', default: 3, min: 0.5, max: 10, step: 0.25, hint: 'Times round the funnel' },
|
|
24
|
+
radius: { type: 'number', label: 'Orbit', default: 0.7, min: 0, max: 3, step: 0.05, hint: 'Widest orbit, × its width' },
|
|
25
|
+
depth: { type: 'number', label: 'Depth', default: 0.9, min: 0, max: 4, step: 0.05, hint: 'How far it sinks, × its height' },
|
|
26
|
+
lean: { type: 'number', label: 'Lean', default: 22, min: 0, max: 60, step: 1, unit: '°', hint: 'How much it leans into the funnel' },
|
|
27
|
+
reverse: { type: 'boolean', label: 'Clockwise', default: false },
|
|
28
|
+
duration: { type: 'number', label: 'Duration', default: 2.4, min: 0.4, max: 10, step: 0.05, unit: 's' },
|
|
29
|
+
},
|
|
30
|
+
prepare({ p }) {
|
|
31
|
+
// integrate θ' = L(u) / (r² + ε²): angular momentum arrives as it is caught, then is kept
|
|
32
|
+
const theta = new Float32Array(N);
|
|
33
|
+
let acc = 0;
|
|
34
|
+
for (let i = 1; i < N; i++) {
|
|
35
|
+
const u = (i - 0.5) / (N - 1);
|
|
36
|
+
const r = radiusAt(u);
|
|
37
|
+
const L = smooth(0, 0.3, u);
|
|
38
|
+
acc += L / (r * r + 0.09) / (N - 1);
|
|
39
|
+
theta[i] = acc;
|
|
40
|
+
}
|
|
41
|
+
const k = (Number(p.turns) * 2 * Math.PI) / Math.max(acc, 1e-6) * (p.reverse ? -1 : 1);
|
|
42
|
+
for (let i = 0; i < N; i++)
|
|
43
|
+
theta[i] *= k;
|
|
44
|
+
return { theta };
|
|
45
|
+
},
|
|
46
|
+
exit(u, out, a) { drain(u, out, a); },
|
|
47
|
+
// the drain backwards in time: out of the point, the orbit widening, the whirl slowing
|
|
48
|
+
enter(v, out, a) { drain(1 - v, out, a); },
|
|
49
|
+
});
|
|
50
|
+
function drain(u, out, a) {
|
|
51
|
+
const p = a.p, f = a.frame;
|
|
52
|
+
const R = Math.max(a.size.x, a.size.z) * Number(p.radius) * radiusAt(u);
|
|
53
|
+
const th = thetaAt(a.mem, u);
|
|
54
|
+
const c = Math.cos(th), s = Math.sin(th);
|
|
55
|
+
const sink = Number(p.depth) * a.size.y * Math.pow(u, 2.2);
|
|
56
|
+
out.off.set(0, 0, 0)
|
|
57
|
+
.addScaledVector(f.right, R * c)
|
|
58
|
+
.addScaledVector(f.toward, R * s)
|
|
59
|
+
.addScaledVector(f.up, -sink);
|
|
60
|
+
// spins about its own up with the whirl (a little faster), leans its top in towards the axis
|
|
61
|
+
_q.setFromAxisAngle(f.up, th * 1.25);
|
|
62
|
+
const lean = (Number(p.lean) * Math.PI / 180) * smooth(0.05, 0.5, u) * (1 - smooth(0.85, 1, u) * 0.5);
|
|
63
|
+
// the tangent of the orbit: leaning about it tips the top towards the funnel's axis
|
|
64
|
+
_axis.set(0, 0, 0).addScaledVector(f.right, -s).addScaledVector(f.toward, c).normalize();
|
|
65
|
+
_t.setFromAxisAngle(_axis, lean); // + about the tangent tips the top inwards (t × up = −radial)
|
|
66
|
+
out.q.copy(a.local(_t.multiply(_q)));
|
|
67
|
+
out.s.setScalar(1 - smooth(0.4, 1, u));
|
|
68
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voxelize.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/voxelize.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"voxelize.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/voxelize.ts"],"names":[],"mappings":";AA0DA,wBA2GG"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// passes, the surface goes and its voxel pops in with a brief flash; a moment
|
|
5
5
|
// later the voxel lifts off along the surface normal and upward, tumbling and
|
|
6
6
|
// shrinking. Reverting flies every cube back and the surface re-forms.
|
|
7
|
+
// With Disappear off (an object effect's default) the whole object stays digitised:
|
|
8
|
+
// every cube in place, and holds — a scan line climbs the rows, a few cubes flicker.
|
|
7
9
|
import { BoxGeometry } from 'three';
|
|
8
10
|
import { defineOperation } from '../types.js';
|
|
9
11
|
import { GLSL_ROT, addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
|
|
@@ -14,6 +16,8 @@ const P = 'Vox';
|
|
|
14
16
|
const KEY = 'voxelize';
|
|
15
17
|
const STATE = '__opVoxelize';
|
|
16
18
|
const LIFE = 0.75;
|
|
19
|
+
/** Keep: the voxel age is clamped here — popped in, flash gone, not yet lifting off. */
|
|
20
|
+
const KEEP_AGE = 0.28;
|
|
17
21
|
/** Quantise surface samples to a grid: one voxel per occupied cell, averaged. */
|
|
18
22
|
function buildVoxels(target, resolution) {
|
|
19
23
|
const sample = sampleSurfaceCached(target, 40000, 37);
|
|
@@ -61,15 +65,18 @@ function buildVoxels(target, resolution) {
|
|
|
61
65
|
export default defineOperation({
|
|
62
66
|
value: 'voxelize',
|
|
63
67
|
label: 'Voxelise',
|
|
64
|
-
description: 'Digitise the targets into cubes that peel off and float away — reverting clicks them back',
|
|
68
|
+
description: 'Digitise the targets into cubes that peel off and float away (or, Disappear off, stay as a voxel model) — reverting clicks them back',
|
|
65
69
|
channel: 'visual',
|
|
66
70
|
multi: true,
|
|
67
71
|
toggles: true,
|
|
68
|
-
usableIn: ['interaction', 'action'],
|
|
72
|
+
usableIn: ['interaction', 'action', 'object'],
|
|
73
|
+
objectParams: { disappear: false },
|
|
74
|
+
// no presence: with Disappear off the look decorates the object (it appears, then is re-drawn); on, it is the entrance / exit
|
|
69
75
|
params: {
|
|
70
76
|
direction: { type: 'select', label: 'Direction', default: 'up', options: DIRECTION_OPTIONS },
|
|
71
77
|
resolution: { type: 'number', label: 'Resolution', default: 26, min: 6, max: 70, step: 1, hint: 'Cubes across the object’s largest side' },
|
|
72
|
-
lift: { type: 'number', label: 'Float', default: 1, min: 0, max: 4, step: 0.05, unit: '×' },
|
|
78
|
+
lift: { type: 'number', label: 'Float', default: 1, min: 0, max: 4, step: 0.05, unit: '×', showWhen: { disappear: ['true'] } },
|
|
79
|
+
disappear: { type: 'boolean', label: 'Disappear', default: true, hint: 'Off: the object stays as a model of cubes' },
|
|
73
80
|
edgeColor: { type: 'color', label: 'Scan colour', default: '#7fe3ff' },
|
|
74
81
|
scale: { type: 'number', label: 'Pattern', default: 2, min: 0.5, max: 12, step: 0.1 },
|
|
75
82
|
duration: { type: 'number', label: 'Duration', default: 3, min: 0.3, max: 12, step: 0.1, unit: 's' },
|
|
@@ -79,7 +86,7 @@ export default defineOperation({
|
|
|
79
86
|
if (!st) {
|
|
80
87
|
const field = createFieldState(target);
|
|
81
88
|
field.edgeWidth.value = 0.04;
|
|
82
|
-
const life = { value: LIFE }, lift = { value: 1 };
|
|
89
|
+
const life = { value: LIFE }, lift = { value: 1 }, keep = { value: 0 };
|
|
83
90
|
const vox = buildVoxels(target, Math.round(Number(p.resolution)));
|
|
84
91
|
const s = vox.cell * 0.94;
|
|
85
92
|
const mesh = createFxInstances(target, {
|
|
@@ -88,11 +95,11 @@ export default defineOperation({
|
|
|
88
95
|
attributes: { aVoxP: [vox.positions, 3], aVoxN: [vox.normals, 3], aVoxR: [vox.rand, 4] },
|
|
89
96
|
layerKey: 'voxelInstances', roughness: 0.55, metalness: 0.05,
|
|
90
97
|
layer: {
|
|
91
|
-
uniforms: { ...fieldUniforms(P, field), uVoxLife: life, uVoxLift: lift },
|
|
92
|
-
common: `varying float vVoxFlash;\n${fieldGlsl(P)}\n${GLSL_ROT}`,
|
|
98
|
+
uniforms: { ...fieldUniforms(P, field), uVoxLife: life, uVoxLift: lift, uVoxKeep: keep },
|
|
99
|
+
common: `varying float vVoxFlash; varying float vVoxHold; varying vec2 vVoxYR;\n${fieldGlsl(P)}\n${GLSL_ROT}`,
|
|
93
100
|
vertexPars: /* glsl */ `
|
|
94
101
|
attribute vec3 aVoxP; attribute vec3 aVoxN; attribute vec4 aVoxR;
|
|
95
|
-
float voxAge() {
|
|
102
|
+
float voxAge() { const float KEEP_AGE = ${KEEP_AGE.toFixed(2)}; float a = (uVoxProgress - VoxBirthOf(VoxField(VoxNorm(aVoxP)))) / uVoxLife; return mix(a, min(a, KEEP_AGE), uVoxKeep); }
|
|
96
103
|
mat3 voxSpin(float a) { float fly = smoothstep(0.3, 1.0, a); return fxRot(normalize(aVoxR.xyz - 0.5 + vec3(1e-3)), fly * fly * (2.0 + 3.0 * aVoxR.w)); }`,
|
|
97
104
|
normal: `{ objectNormal = voxSpin(voxAge()) * objectNormal; }`,
|
|
98
105
|
vertex: /* glsl */ `
|
|
@@ -106,11 +113,21 @@ export default defineOperation({
|
|
|
106
113
|
+ (aVoxR.xyz - 0.5) * E * 0.25 * fly;
|
|
107
114
|
transformed = voxSpin(a) * (transformed * sc) + off;
|
|
108
115
|
vVoxFlash = pop * (1.0 - smoothstep(0.1, 0.24, a));
|
|
116
|
+
// holding as a voxel model
|
|
117
|
+
vVoxHold = uVoxKeep * step(0.9999, uVoxProgress);
|
|
118
|
+
vVoxYR = vec2(VoxNorm(aVoxP).y, aVoxR.w);
|
|
119
|
+
}`,
|
|
120
|
+
emissive: /* glsl */ `
|
|
121
|
+
{
|
|
122
|
+
// a scan line climbs the rows now and then; a few cubes flicker
|
|
123
|
+
float scan = fract(uVoxTime * 0.22);
|
|
124
|
+
float line = exp(-pow((vVoxYR.x - scan * 1.2 + 0.1) * 18.0, 2.0));
|
|
125
|
+
float flick = step(0.955, vVoxYR.y) * (0.5 + 0.5 * sin(uVoxTime * (7.0 + 9.0 * vVoxYR.y) + vVoxYR.y * 50.0));
|
|
126
|
+
totalEmissiveRadiance += uVoxEdgeColor * (vVoxFlash * 0.7 + vVoxHold * (0.35 * line + 0.3 * flick * flick));
|
|
109
127
|
}`,
|
|
110
|
-
emissive: `totalEmissiveRadiance += uVoxEdgeColor * vVoxFlash * 0.7;`,
|
|
111
128
|
},
|
|
112
129
|
});
|
|
113
|
-
st = { field, life, lift, mesh, mats: new Set() };
|
|
130
|
+
st = { field, life, lift, keep, mesh, mats: new Set() };
|
|
114
131
|
const own = st;
|
|
115
132
|
const layer = surfaceLayer(P, field, 'tint');
|
|
116
133
|
forEachMeshMaterial(target, (mat, m) => {
|
|
@@ -125,6 +142,15 @@ export default defineOperation({
|
|
|
125
142
|
setFieldParams(s.field, p, target, ctx);
|
|
126
143
|
s.lift.value = Number(p.lift);
|
|
127
144
|
s.mesh.visible = true;
|
|
145
|
+
s.keep.value = p.disappear === false ? 1 : 0;
|
|
146
|
+
if (s.keep.value) {
|
|
147
|
+
// keep: the surface goes (0 → 1), every cube stays in place and holds
|
|
148
|
+
return runProgress(target, s.field, 1, {
|
|
149
|
+
duration: Number(p.duration) / (1 + LIFE), ease: 'none', hold: true,
|
|
150
|
+
onComplete: () => hideMeshes(target, KEY, true),
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
hideMeshes(target, KEY, false);
|
|
128
154
|
return runProgress(target, s.field, 1 + LIFE, {
|
|
129
155
|
duration: Number(p.duration), ease: 'none',
|
|
130
156
|
onComplete: () => { hideMeshes(target, KEY, true); s.mesh.visible = false; },
|
|
@@ -136,8 +162,9 @@ export default defineOperation({
|
|
|
136
162
|
return;
|
|
137
163
|
hideMeshes(target, KEY, false);
|
|
138
164
|
s.mesh.visible = true;
|
|
165
|
+
// from a hold it only has part of the way to go: keep the same speed
|
|
139
166
|
return runProgress(target, s.field, 0, {
|
|
140
|
-
duration: Number(p.duration), ease: 'none',
|
|
167
|
+
duration: Number(p.duration) * Math.min(1, Math.max(0.1, s.field.progress.value / (1 + LIFE))), ease: 'none',
|
|
141
168
|
onComplete: () => {
|
|
142
169
|
s.mats.forEach(m => removeLayer(m, KEY));
|
|
143
170
|
disposeFxInstances(s.mesh);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warp.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/warp.ts"],"names":[],"mappings":";AAkBA,wBAsDG"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Warp — a jump to hyperspace. The object charges: it draws back a touch and
|
|
2
|
+
// compresses along its heading with a fine hum, then stretches far along it
|
|
3
|
+
// while thinning across (volume kept) and accelerates exponentially, gone in a
|
|
4
|
+
// few frames. The way back: it shoots in stretched, decelerating exponentially,
|
|
5
|
+
// snaps out of the stretch on arrival and jiggles until it is exactly at rest.
|
|
6
|
+
import { Vector3 } from 'three';
|
|
7
|
+
import { clamp01, physicalExit, ring, smooth, stretchAxis } from './physicalExit.js';
|
|
8
|
+
const ARRIVE = 0.55;
|
|
9
|
+
const _d = new Vector3();
|
|
10
|
+
function dirOf(f, d) {
|
|
11
|
+
if (d === 'right')
|
|
12
|
+
return _d.copy(f.right);
|
|
13
|
+
if (d === 'left')
|
|
14
|
+
return _d.copy(f.right).negate();
|
|
15
|
+
if (d === 'up')
|
|
16
|
+
return _d.copy(f.up);
|
|
17
|
+
return _d.copy(f.toward).negate(); // away, into the scene
|
|
18
|
+
}
|
|
19
|
+
export default physicalExit({
|
|
20
|
+
value: 'warp',
|
|
21
|
+
label: 'Warp',
|
|
22
|
+
description: 'Charges, then stretches along its heading and jumps away in a blink — it shoots back in, snaps out of the stretch and jiggles to rest',
|
|
23
|
+
params: {
|
|
24
|
+
direction: {
|
|
25
|
+
type: 'select', label: 'Direction', default: 'right', options: [
|
|
26
|
+
{ value: 'right', label: 'Right' }, { value: 'away', label: 'Away' }, { value: 'left', label: 'Left' }, { value: 'up', label: 'Up' },
|
|
27
|
+
], hint: 'Screen-relative when it starts',
|
|
28
|
+
},
|
|
29
|
+
stretch: { type: 'number', label: 'Stretch', default: 3, min: 1, max: 8, step: 0.1, unit: '×', hint: 'How long it gets at the jump' },
|
|
30
|
+
charge: { type: 'number', label: 'Charge', default: 0.55, min: 0.1, max: 0.85, step: 0.01, hint: 'Share of the duration spent charging' },
|
|
31
|
+
distance: { type: 'number', label: 'Distance', default: 30, min: 5, max: 120, step: 1, hint: 'How far it jumps, × its size' },
|
|
32
|
+
duration: { type: 'number', label: 'Duration', default: 1.4, min: 0.3, max: 6, step: 0.05, unit: 's' },
|
|
33
|
+
},
|
|
34
|
+
exit(u, out, a) {
|
|
35
|
+
const p = a.p, D = Number(p.duration);
|
|
36
|
+
const d = dirOf(a.frame, p.direction);
|
|
37
|
+
const axis = a.axis(d);
|
|
38
|
+
const C = Number(p.charge), S = Number(p.stretch), L = Number(p.distance) * a.span;
|
|
39
|
+
if (u < C) {
|
|
40
|
+
const t = u / C;
|
|
41
|
+
// draws back a little and compresses along the heading; a fine hum builds
|
|
42
|
+
const c = smooth(0, 1, t);
|
|
43
|
+
const hum = 0.012 * smooth(0.3, 0.8, t) * (1 - smooth(0.9, 1, t)) * Math.sin(2 * Math.PI * 24 * u * D);
|
|
44
|
+
out.off.copy(d).multiplyScalar(-0.06 * a.span * c);
|
|
45
|
+
stretchAxis(out.s, axis, 1 - 0.14 * c + hum);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const tau = (u - C) / (1 - C);
|
|
49
|
+
const k = 6;
|
|
50
|
+
const x = (Math.exp(k * tau) - 1) / (Math.exp(k) - 1); // exponential take-off
|
|
51
|
+
out.off.copy(d).multiplyScalar(-0.06 * a.span + (L + 0.06 * a.span) * x);
|
|
52
|
+
const s = 0.86 + (S - 0.86) * smooth(0, 0.35, tau);
|
|
53
|
+
stretchAxis(out.s, axis, s, 1 - smooth(0.7, 1, tau));
|
|
54
|
+
},
|
|
55
|
+
enter(v, out, a) {
|
|
56
|
+
const p = a.p;
|
|
57
|
+
const d = dirOf(a.frame, p.direction);
|
|
58
|
+
const axis = a.axis(d);
|
|
59
|
+
const S = Number(p.stretch), L = Number(p.distance) * a.span;
|
|
60
|
+
if (v < ARRIVE) {
|
|
61
|
+
const tau = v / ARRIVE;
|
|
62
|
+
const k = 6;
|
|
63
|
+
const x = (Math.exp(k * (1 - tau)) - 1) / (Math.exp(k) - 1); // exponential braking
|
|
64
|
+
out.off.copy(d).multiplyScalar(L * x);
|
|
65
|
+
const s = 1 + (S - 1) * (1 - smooth(0.65, 1, tau));
|
|
66
|
+
stretchAxis(out.s, axis, s, smooth(0, 0.2, tau));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// snapped out of the stretch: it jiggles along the heading
|
|
70
|
+
const sg = clamp01((v - ARRIVE) / (1 - ARRIVE));
|
|
71
|
+
stretchAxis(out.s, axis, 1 - 0.18 * ring(sg, 2, 3.5));
|
|
72
|
+
},
|
|
73
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoosh.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/whoosh.ts"],"names":[],"mappings":";AAmEA,wBAcG"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Whoosh — the object streaks through its own spot again and again, each pass
|
|
2
|
+
// crossing the one before it (an X seen from above: back-left → front-right,
|
|
3
|
+
// then back-right → front-left, the angle opening a little every pair), with a
|
|
4
|
+
// soft alternating arc. On each streak it stretches along its motion (volume
|
|
5
|
+
// kept) and banks into it. After `passes` fly-throughs it comes in on the next
|
|
6
|
+
// crossing line, brakes exponentially into place, overshoots a touch and settles.
|
|
7
|
+
// Leaving plays it backwards in time: it bolts off along that line, then streaks
|
|
8
|
+
// through its spot the other way round, and is gone.
|
|
9
|
+
import { Quaternion, Vector3 } from 'three';
|
|
10
|
+
import { clamp01, physicalExit, ring, smooth, stretchAxis } from './physicalExit.js';
|
|
11
|
+
const _d = new Vector3(), _q = new Quaternion();
|
|
12
|
+
const PASS = 1, GAP = 0.14, ARRIVE = 1.5, SETTLE = 0.75; // timeline units
|
|
13
|
+
/** Direction of crossing line i on the ground plane (screen-relative), mostly across the view. */
|
|
14
|
+
function lineDir(a, i, out) {
|
|
15
|
+
const f = a.frame;
|
|
16
|
+
const side = (i % 2 === 0 ? 1 : -1) * (a.p.mirror ? -1 : 1); // alternates which way it crosses
|
|
17
|
+
const phi = (24 + 9 * Math.floor(i / 2)) * Math.PI / 180; // each pair opens a little wider
|
|
18
|
+
return out.set(0, 0, 0).addScaledVector(f.right, side * Math.cos(phi)).addScaledVector(f.toward, Math.sin(phi)).normalize();
|
|
19
|
+
}
|
|
20
|
+
function streak(out, a, tau, i) {
|
|
21
|
+
const f = a.frame, H = a.size.y;
|
|
22
|
+
const W = Number(a.p.spread) * a.span;
|
|
23
|
+
lineDir(a, i, _d);
|
|
24
|
+
// straight through its spot at constant speed, with a soft arc that alternates up / down
|
|
25
|
+
const arc = (i % 2 === 0 ? 1 : -0.45) * 0.3 * H * Math.sin(Math.PI * tau);
|
|
26
|
+
out.off.copy(_d).multiplyScalar(W * (2 * tau - 1)).addScaledVector(f.up, arc + 0.15 * H * Math.sin(Math.PI * tau));
|
|
27
|
+
stretchAxis(out.s, a.axis(_d), 1 + Number(a.p.stretch), smooth(0, 0.06, tau) * (1 - smooth(0.94, 1, tau)));
|
|
28
|
+
out.q.copy(a.local(_q.setFromAxisAngle(_d, (i % 2 === 0 ? -1 : 1) * 0.3 * Math.cos(Math.PI * tau))));
|
|
29
|
+
}
|
|
30
|
+
function arrive(out, a, tau, i) {
|
|
31
|
+
const st = Number(a.p.stretch);
|
|
32
|
+
const L = Number(a.p.spread) * a.span;
|
|
33
|
+
lineDir(a, i, _d);
|
|
34
|
+
const k = 5;
|
|
35
|
+
const left = (Math.exp(k * (1 - tau)) - 1) / (Math.exp(k) - 1); // exponential braking
|
|
36
|
+
out.off.copy(_d).multiplyScalar(-L * left);
|
|
37
|
+
stretchAxis(out.s, a.axis(_d), 1 + st * Math.min(1, left * 4), smooth(0, 0.06, tau));
|
|
38
|
+
}
|
|
39
|
+
function settle(out, a, sg, i) {
|
|
40
|
+
const st = Number(a.p.stretch);
|
|
41
|
+
lineDir(a, i, _d);
|
|
42
|
+
const r = ring(sg, 1.5, 3.4);
|
|
43
|
+
out.off.copy(_d).multiplyScalar(0.12 * a.span * r); // past its spot along the line, and back
|
|
44
|
+
stretchAxis(out.s, 1, 1 - 0.3 * st * Math.abs(r));
|
|
45
|
+
out.pivot = 'bottom';
|
|
46
|
+
}
|
|
47
|
+
/** The entrance at v (0 gone → 1 at rest). */
|
|
48
|
+
function entrance(v, out, a) {
|
|
49
|
+
const n = Math.max(0, Math.round(Number(a.p.passes)));
|
|
50
|
+
const total = n * (PASS + GAP) + ARRIVE + SETTLE;
|
|
51
|
+
let t = clamp01(v) * total;
|
|
52
|
+
for (let i = 0; i < n; i++) {
|
|
53
|
+
if (t < PASS) {
|
|
54
|
+
streak(out, a, t / PASS, i);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
t -= PASS;
|
|
58
|
+
if (t < GAP) {
|
|
59
|
+
out.s.setScalar(0);
|
|
60
|
+
return;
|
|
61
|
+
} // off-screen between passes
|
|
62
|
+
t -= GAP;
|
|
63
|
+
}
|
|
64
|
+
if (t < ARRIVE) {
|
|
65
|
+
arrive(out, a, t / ARRIVE, n);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
settle(out, a, clamp01((t - ARRIVE) / SETTLE), n);
|
|
69
|
+
}
|
|
70
|
+
export default physicalExit({
|
|
71
|
+
value: 'whoosh',
|
|
72
|
+
label: 'Whoosh',
|
|
73
|
+
description: 'Streaks through its own spot again and again, each pass crossing the last, then brakes into place; it leaves the same way, in reverse',
|
|
74
|
+
params: {
|
|
75
|
+
passes: { type: 'number', label: 'Passes', default: 3, min: 0, max: 8, step: 1, hint: 'Fly-throughs before it settles (add duration with more passes)' },
|
|
76
|
+
spread: { type: 'number', label: 'Reach', default: 7, min: 2, max: 25, step: 0.5, hint: 'How far each pass runs either side of its spot, × its size' },
|
|
77
|
+
stretch: { type: 'number', label: 'Stretch', default: 0.6, min: 0, max: 2, step: 0.05, hint: 'How long it gets while it streaks' },
|
|
78
|
+
mirror: { type: 'boolean', label: 'Mirror', default: false, hint: 'Start the first pass from the right' },
|
|
79
|
+
duration: { type: 'number', label: 'Duration', default: 3, min: 0.6, max: 14, step: 0.05, unit: 's', hint: 'The whole entrance (or exit)' },
|
|
80
|
+
},
|
|
81
|
+
// leaving: the same timeline backwards (bolts off along the last line, then the passes the other way round)
|
|
82
|
+
exit(u, out, a) { entrance(1 - u, out, a); },
|
|
83
|
+
enter(v, out, a) { entrance(v, out, a); },
|
|
84
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wobble.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/wobble.ts"],"names":[],"mappings":";AAOA,wBAiBG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Wobble — the object's up axis traces a small cone, like a spinning top that is
|
|
2
|
+
// settling (precession), with a slow nutation so the circle breathes.
|
|
3
|
+
import { Vector3 } from 'three';
|
|
4
|
+
import { DURATION, heldPhysical } from './physicalHeld.js';
|
|
5
|
+
const _axis = new Vector3();
|
|
6
|
+
export default heldPhysical({
|
|
7
|
+
value: 'wobble', label: 'Wobble',
|
|
8
|
+
description: 'Lean round in a circle, like a top that is settling — standing on its base',
|
|
9
|
+
params: {
|
|
10
|
+
angle: { type: 'number', label: 'Lean', default: 6, min: 0.5, max: 40, step: 0.5, unit: '°' },
|
|
11
|
+
speed: { type: 'number', label: 'Speed', default: 1, min: 0.1, max: 6, step: 0.05, unit: '×' },
|
|
12
|
+
clockwise: { type: 'boolean', label: 'Clockwise', default: false },
|
|
13
|
+
duration: { ...DURATION, default: 3 },
|
|
14
|
+
},
|
|
15
|
+
memory: () => null,
|
|
16
|
+
move(part, st, time) {
|
|
17
|
+
const p = st.p;
|
|
18
|
+
const phi = (p.clockwise ? -1 : 1) * 2 * Math.PI * 0.45 * Number(p.speed) * time;
|
|
19
|
+
const lean = (Number(p.angle) * Math.PI / 180) * (1 + 0.18 * Math.sin(phi * 0.37)) * st.amp.v;
|
|
20
|
+
part.q.setFromAxisAngle(_axis.set(Math.cos(phi), 0, Math.sin(phi)), lean);
|
|
21
|
+
part.pivot.copy(st.body.bottomLocal);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipPreview.d.ts","sourceRoot":"","sources":["../../src/operations/clipPreview.ts"],"names":[],"mappings":"AAOA,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,OAAO,SAAM,EAAE,OAAO,SAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAWrF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// A small preview image of what the scene shows right now — for an effect clip template's card.
|
|
2
|
+
// The same full frame as the studio's screenshots (renderFrame: clouds and other full-screen
|
|
3
|
+
// passes included), scaled down to a thumbnail.
|
|
4
|
+
import { SceneStore } from '@3driseai/3drise-core';
|
|
5
|
+
import cameraManager from '../utils/CameraSingleton.js';
|
|
6
|
+
import { renderFrame } from '../utils/frameRenderer.js';
|
|
7
|
+
/** A JPEG of the current frame, at most `maxSize` px on its long side. Null when no scene is mounted. */
|
|
8
|
+
export function captureFrameImage(maxSize = 512, quality = 0.85) {
|
|
9
|
+
const gl = SceneStore.gl, scene = SceneStore.scene, camera = cameraManager.getCamera?.();
|
|
10
|
+
if (!gl || !scene || !camera || typeof document === 'undefined')
|
|
11
|
+
return Promise.resolve(null);
|
|
12
|
+
renderFrame(gl, scene, camera);
|
|
13
|
+
const src = gl.domElement;
|
|
14
|
+
const k = Math.min(1, maxSize / Math.max(src.width, src.height, 1));
|
|
15
|
+
const out = document.createElement('canvas');
|
|
16
|
+
out.width = Math.max(1, Math.round(src.width * k));
|
|
17
|
+
out.height = Math.max(1, Math.round(src.height * k));
|
|
18
|
+
out.getContext('2d')?.drawImage(src, 0, 0, out.width, out.height);
|
|
19
|
+
return new Promise(resolve => out.toBlob(b => resolve(b), 'image/jpeg', quality));
|
|
20
|
+
}
|