@3driseai/3drise-viewer 0.1.28 → 0.1.29
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 +44 -3
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +173 -55
- package/dist/animationsV2/appliers.d.ts.map +1 -1
- package/dist/animationsV2/appliers.js +21 -5
- 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 +44 -6
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
- package/dist/animationsV2/sequenceUtils.js +58 -12
- package/dist/animationsV2/types.d.ts +22 -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/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/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 +15 -4
- 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/PhyllotaxisGrid.d.ts +1 -1
- package/dist/components/PhyllotaxisGrid.d.ts.map +1 -1
- package/dist/components/PhyllotaxisGrid.js +3 -32
- 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 +187 -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 +29 -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 +10 -10
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +8 -6
- 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/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/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 +12 -0
- package/dist/components/text/TextObjectView.d.ts.map +1 -0
- package/dist/components/text/TextObjectView.js +11 -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 +48 -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/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/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 +44 -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/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/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/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/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/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 +27 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +13 -0
- package/dist/components/text/useTextObject.d.ts +21 -0
- package/dist/components/text/useTextObject.d.ts.map +1 -0
- package/dist/components/text/useTextObject.js +118 -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 +4 -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 +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- 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/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/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/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/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/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/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/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/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/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 +165 -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/renderedSky.d.ts +32 -0
- package/dist/utils/renderedSky.d.ts.map +1 -0
- package/dist/utils/renderedSky.js +57 -0
- 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/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
|
+
});
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { type Object3D } from 'three';
|
|
2
|
+
import type { EffectSpread, EffectStep, ObjectEffect } from '@3driseai/3drise-core';
|
|
3
|
+
/** A row of a group's clip that goes to the children: a visual effect, or a physical one scoped 'each'. */
|
|
4
|
+
export declare const isFanRow: (e: Pick<ObjectEffect, "operation" | "scope">) => boolean;
|
|
5
|
+
/** An effect clip as the fan-out hands it to a child (the controller's EffectClipData). */
|
|
6
|
+
export interface FanClip {
|
|
7
|
+
effects?: ObjectEffect[];
|
|
8
|
+
steps?: EffectStep[];
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
yoyo?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** The part of a child's controller the fan-out uses. */
|
|
13
|
+
export interface FanTarget {
|
|
14
|
+
addEffect(key: string, effect: Pick<ObjectEffect, 'operation' | 'params' | 'playback' | 'meshNames'>, opts?: {
|
|
15
|
+
instant?: boolean;
|
|
16
|
+
follows?: boolean;
|
|
17
|
+
}): boolean;
|
|
18
|
+
removeEffect(key: string): boolean;
|
|
19
|
+
applyClip(key: string, clip: FanClip): boolean;
|
|
20
|
+
removeClip(key: string): boolean;
|
|
21
|
+
fanLeave(keys: string[]): Promise<unknown>;
|
|
22
|
+
fanPark(keys: string[]): void;
|
|
23
|
+
fanEnter(keys: string[]): Promise<unknown>;
|
|
24
|
+
}
|
|
25
|
+
export declare class GroupFanout {
|
|
26
|
+
private root;
|
|
27
|
+
/** A child's controller; `create` makes one for a child that has no effects of its own. */
|
|
28
|
+
private controllerOf;
|
|
29
|
+
/** What is handed out now, by item id (own rows: their id; triggered rows: `t:<key>`; clips: `c:<key>`). */
|
|
30
|
+
private items;
|
|
31
|
+
private children;
|
|
32
|
+
private childKey;
|
|
33
|
+
private spread;
|
|
34
|
+
/** The group's own clip follows its visibility: its rows reach the children as following it too. */
|
|
35
|
+
private follows;
|
|
36
|
+
/** Pending gives / takes: `${itemId}|${childId}` → timer. */
|
|
37
|
+
private timers;
|
|
38
|
+
/** Pending visibility turns: childId → timer (and the leave promise to settle if called off). */
|
|
39
|
+
private vis;
|
|
40
|
+
constructor(root: Object3D,
|
|
41
|
+
/** A child's controller; `create` makes one for a child that has no effects of its own. */
|
|
42
|
+
controllerOf: (root: Object3D, create: boolean) => FanTarget | undefined);
|
|
43
|
+
private get groupId();
|
|
44
|
+
private key;
|
|
45
|
+
private rowFits;
|
|
46
|
+
private fits;
|
|
47
|
+
/** Milliseconds before child `c` gets (or, `out`, loses) its turn among `reach` (the children concerned). */
|
|
48
|
+
private turn;
|
|
49
|
+
private delay;
|
|
50
|
+
private cancel;
|
|
51
|
+
private schedule;
|
|
52
|
+
/** Run every pending give / take now (the group is being hidden: the children must be in their final state). */
|
|
53
|
+
private flush;
|
|
54
|
+
/** Hand an item (as it is when the delay ends) to a child. */
|
|
55
|
+
private give;
|
|
56
|
+
private take;
|
|
57
|
+
/** Hand out a new item: each child it reaches after its delay. */
|
|
58
|
+
private putOn;
|
|
59
|
+
/** Take an item off: each child after its out delay (`inOrder`: a handover — in the in order). */
|
|
60
|
+
private takeOff;
|
|
61
|
+
/** The leaf scene objects under the group, in the spread's order. */
|
|
62
|
+
private collect;
|
|
63
|
+
/**
|
|
64
|
+
* The group's own fan rows now (its clip's visual rows and physical 'each' rows, Base and steps).
|
|
65
|
+
* instant scene load: everything lands at once, no cascade.
|
|
66
|
+
* follows the group's clip follows visibility.
|
|
67
|
+
*/
|
|
68
|
+
sync(rows: ObjectEffect[], spread: EffectSpread | null | undefined, mode: 'animate' | 'instant', follows?: boolean): void;
|
|
69
|
+
addTriggered(key: string, effect: Pick<ObjectEffect, 'operation' | 'params' | 'playback'>): boolean;
|
|
70
|
+
removeTriggered(key: string): boolean;
|
|
71
|
+
hasTriggered(key: string): boolean;
|
|
72
|
+
applyClip(key: string, clip: FanClip): boolean;
|
|
73
|
+
removeClip(key: string): boolean;
|
|
74
|
+
hasClip(key: string): boolean;
|
|
75
|
+
/** The children that hold the group's own rows, and the keys of those rows on each. */
|
|
76
|
+
private holders;
|
|
77
|
+
private cancelVis;
|
|
78
|
+
/** The group is being hidden: each child plays the group's effects out on its turn. Resolves when the last has gone. */
|
|
79
|
+
leave(): Promise<unknown>;
|
|
80
|
+
/** The group is about to be shown: every child holding its effects starts from nothing. */
|
|
81
|
+
park(): void;
|
|
82
|
+
/** The group is drawn: each child gets ready and plays the group's effects in, on its turn. */
|
|
83
|
+
enter(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Children joined or left (checked every few frames, and on each change). `quiet` on the first look.
|
|
86
|
+
* A child that joins gets what is on at once; one that leaves loses it at once.
|
|
87
|
+
*/
|
|
88
|
+
check(quiet?: boolean): void;
|
|
89
|
+
/** Some child is still waiting for one of these items (a cascade is running). */
|
|
90
|
+
pending(itemIds: string[]): boolean;
|
|
91
|
+
/** Take everything off the children at once (the group is going away, or is no longer a group). */
|
|
92
|
+
dispose(): void;
|
|
93
|
+
/** Ids of the children now, in cascade order (tests / studio). */
|
|
94
|
+
get childIds(): string[];
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=groupFanout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupFanout.d.ts","sourceRoot":"","sources":["../../src/operations/groupFanout.ts"],"names":[],"mappings":"AAgCA,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIpF,2GAA2G;AAC3G,eAAO,MAAM,QAAQ,GAAI,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,KAAG,OACI,CAAC;AAE7E,2FAA2F;AAC3F,MAAM,WAAW,OAAO;IAAG,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE;AAE3G,yDAAyD;AACzD,MAAM,WAAW,SAAS;IACtB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;IAChK,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IAC/C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C;AAUD,qBAAa,WAAW;IAchB,OAAO,CAAC,IAAI;IACZ,2FAA2F;IAC3F,OAAO,CAAC,YAAY;IAfxB,4GAA4G;IAC5G,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,MAAM,CAAiD;IAC/D,oGAAoG;IACpG,OAAO,CAAC,OAAO,CAAS;IACxB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAA2E;IACzF,iGAAiG;IACjG,OAAO,CAAC,GAAG,CAA8E;gBAG7E,IAAI,EAAE,QAAQ;IACtB,2FAA2F;IACnF,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,KAAK,SAAS,GAAG,SAAS;IAGpF,OAAO,KAAK,OAAO,GAAuE;IAC1F,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,IAAI;IAEZ,6GAA6G;IAC7G,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,KAAK;IAEb,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,QAAQ;IAOhB,gHAAgH;IAChH,OAAO,CAAC,KAAK;IAMb,8DAA8D;IAC9D,OAAO,CAAC,IAAI;IAgBZ,OAAO,CAAC,IAAI;IAMZ,kEAAkE;IAClE,OAAO,CAAC,KAAK;IAQb,kGAAkG;IAClG,OAAO,CAAC,OAAO;IAQf,qEAAqE;IACrE,OAAO,CAAC,OAAO;IAsCf;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,OAAO,UAAQ;IA2BhH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC,GAAG,OAAO;IAkBnG,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IACrC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAElC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO;IAO9C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAChC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI7B,uFAAuF;IACvF,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,SAAS;IAKjB,wHAAwH;IACxH,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAazB,2FAA2F;IAC3F,IAAI;IAMJ,+FAA+F;IAC/F,KAAK;IAWL;;;OAGG;IACH,KAAK,CAAC,KAAK,UAAQ;IAcnB,iFAAiF;IACjF,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO;IAKnC,mGAAmG;IACnG,OAAO;IAUP,kEAAkE;IAClE,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAyC;CACpE"}
|