@3driseai/3drise-viewer 0.1.25 → 0.1.27
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 +16 -0
- package/dist/animationsV2/ClipPlayer.d.ts.map +1 -0
- package/dist/animationsV2/ClipPlayer.js +199 -0
- package/dist/animationsV2/ClipsRuntime.d.ts +150 -0
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -0
- package/dist/animationsV2/ClipsRuntime.js +707 -0
- package/dist/animationsV2/appliers.d.ts +21 -0
- package/dist/animationsV2/appliers.d.ts.map +1 -0
- package/dist/animationsV2/appliers.js +222 -0
- package/dist/animationsV2/clipUtils.d.ts +33 -0
- package/dist/animationsV2/clipUtils.d.ts.map +1 -0
- package/dist/animationsV2/clipUtils.js +164 -0
- package/dist/animationsV2/elementSettings.d.ts +15 -0
- package/dist/animationsV2/elementSettings.d.ts.map +1 -0
- package/dist/animationsV2/elementSettings.js +16 -0
- package/dist/animationsV2/index.d.ts +16 -0
- package/dist/animationsV2/index.d.ts.map +1 -0
- package/dist/animationsV2/index.js +12 -0
- package/dist/animationsV2/nodeTracks.d.ts +13 -0
- package/dist/animationsV2/nodeTracks.d.ts.map +1 -0
- package/dist/animationsV2/nodeTracks.js +165 -0
- package/dist/animationsV2/normalize.d.ts +4 -0
- package/dist/animationsV2/normalize.d.ts.map +1 -0
- package/dist/animationsV2/normalize.js +60 -0
- package/dist/animationsV2/sequenceUtils.d.ts +98 -0
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -0
- package/dist/animationsV2/sequenceUtils.js +220 -0
- package/dist/animationsV2/types.d.ts +115 -0
- package/dist/animationsV2/types.d.ts.map +1 -0
- package/dist/animationsV2/types.js +8 -0
- package/dist/api/sceneHandle.d.ts +56 -17
- package/dist/api/sceneHandle.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +154 -77
- package/dist/components/AdvancedGrid.d.ts +8 -2
- package/dist/components/AdvancedGrid.d.ts.map +1 -1
- package/dist/components/AdvancedGrid.js +31 -14
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +7 -5
- package/dist/components/Bubbles.d.ts +7 -1
- package/dist/components/Bubbles.d.ts.map +1 -1
- package/dist/components/Bubbles.js +42 -22
- package/dist/components/CameraController.d.ts.map +1 -1
- package/dist/components/CameraController.js +0 -44
- package/dist/components/ChladniGrid.d.ts +8 -4
- package/dist/components/ChladniGrid.d.ts.map +1 -1
- package/dist/components/ChladniGrid.js +31 -13
- package/dist/components/CircuitGrid.d.ts +8 -11
- package/dist/components/CircuitGrid.d.ts.map +1 -1
- package/dist/components/CircuitGrid.js +31 -13
- package/dist/components/Clouds.d.ts.map +1 -1
- package/dist/components/Clouds.js +0 -34
- package/dist/components/CloudsGenerator.d.ts +1 -1
- package/dist/components/CloudsGenerator.js +1 -1
- package/dist/components/ContourGrid.d.ts +8 -14
- package/dist/components/ContourGrid.d.ts.map +1 -1
- package/dist/components/ContourGrid.js +31 -13
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +19 -1
- package/dist/components/EffectsGenerator.d.ts +7 -1
- package/dist/components/EffectsGenerator.d.ts.map +1 -1
- package/dist/components/EffectsGenerator.js +39 -38
- package/dist/components/EnvironmentManager.d.ts +4 -4
- package/dist/components/EnvironmentManager.d.ts.map +1 -1
- package/dist/components/EnvironmentManager.js +1 -1
- package/dist/components/FlowNetGrid.d.ts +8 -4
- package/dist/components/FlowNetGrid.d.ts.map +1 -1
- package/dist/components/FlowNetGrid.js +31 -13
- package/dist/components/FractalGrid.d.ts +8 -12
- package/dist/components/FractalGrid.d.ts.map +1 -1
- package/dist/components/FractalGrid.js +31 -13
- package/dist/components/GirihGrid.d.ts +8 -1
- package/dist/components/GirihGrid.d.ts.map +1 -1
- package/dist/components/GirihGrid.js +31 -13
- package/dist/components/Glyphs.d.ts +7 -1
- package/dist/components/Glyphs.d.ts.map +1 -1
- package/dist/components/Glyphs.js +40 -34
- package/dist/components/GravWaveGrid.d.ts +8 -1
- package/dist/components/GravWaveGrid.d.ts.map +1 -1
- package/dist/components/GravWaveGrid.js +31 -13
- package/dist/components/GridsGenerator.d.ts +7 -1
- package/dist/components/GridsGenerator.d.ts.map +1 -1
- package/dist/components/GridsGenerator.js +20 -18
- package/dist/components/HexGrid.d.ts +8 -10
- package/dist/components/HexGrid.d.ts.map +1 -1
- package/dist/components/HexGrid.js +31 -13
- package/dist/components/HyperbolicGrid.d.ts +8 -4
- package/dist/components/HyperbolicGrid.d.ts.map +1 -1
- package/dist/components/HyperbolicGrid.js +31 -13
- package/dist/components/LandscapeBuilder.d.ts +1 -1
- package/dist/components/LandscapeBuilder.d.ts.map +1 -1
- package/dist/components/LandscapeBuilder.js +1 -1
- package/dist/components/LandscapeObject.d.ts +1 -1
- package/dist/components/LandscapeObject.d.ts.map +1 -1
- package/dist/components/LandscapeObject.js +1 -1
- package/dist/components/MoireGrid.d.ts +8 -12
- package/dist/components/MoireGrid.d.ts.map +1 -1
- package/dist/components/MoireGrid.js +31 -13
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +2 -2
- package/dist/components/ObjectsRenderer.d.ts +4 -1
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +57 -3
- package/dist/components/Ocean.d.ts.map +1 -1
- package/dist/components/Ocean.js +0 -63
- package/dist/components/OceanBuilder.d.ts +1 -1
- package/dist/components/OceanBuilder.js +1 -1
- package/dist/components/ParticlesGenerator.d.ts.map +1 -1
- package/dist/components/ParticlesGenerator.js +6 -0
- package/dist/components/QuasiGrid.d.ts +8 -11
- package/dist/components/QuasiGrid.d.ts.map +1 -1
- package/dist/components/QuasiGrid.js +31 -13
- package/dist/components/RadarGrid.d.ts +8 -13
- package/dist/components/RadarGrid.d.ts.map +1 -1
- package/dist/components/RadarGrid.js +31 -13
- package/dist/components/ReactionDiffusionGrid.d.ts +8 -1
- package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
- package/dist/components/ReactionDiffusionGrid.js +33 -139
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +19 -4
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +0 -39
- package/dist/components/SkySystem.d.ts +1 -1
- package/dist/components/SparklesBurst.d.ts +7 -1
- package/dist/components/SparklesBurst.d.ts.map +1 -1
- package/dist/components/SparklesBurst.js +31 -28
- package/dist/components/Stars.d.ts.map +1 -1
- package/dist/components/Stars.js +3 -47
- package/dist/components/TerrainBuilder.d.ts +1 -1
- package/dist/components/TerrainBuilder.d.ts.map +1 -1
- package/dist/components/TerrainBuilder.js +1 -1
- package/dist/components/VoronoiGrid.d.ts +8 -10
- package/dist/components/VoronoiGrid.d.ts.map +1 -1
- package/dist/components/VoronoiGrid.js +31 -13
- package/dist/components/WallpaperGrid.d.ts +8 -1
- package/dist/components/WallpaperGrid.d.ts.map +1 -1
- package/dist/components/WallpaperGrid.js +33 -210
- package/dist/components/effects/AuraEffect.d.ts +8 -3
- package/dist/components/effects/AuraEffect.d.ts.map +1 -1
- package/dist/components/effects/AuraEffect.js +49 -24
- package/dist/components/effects/AuroraEffect.d.ts +8 -3
- package/dist/components/effects/AuroraEffect.d.ts.map +1 -1
- package/dist/components/effects/AuroraEffect.js +45 -25
- package/dist/components/effects/BlackHoleEffect.d.ts +8 -3
- package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -1
- package/dist/components/effects/BlackHoleEffect.js +42 -21
- package/dist/components/effects/ConstellationEffect.d.ts +8 -3
- package/dist/components/effects/ConstellationEffect.d.ts.map +1 -1
- package/dist/components/effects/ConstellationEffect.js +49 -23
- package/dist/components/effects/DandelionSeedsEffect.d.ts +7 -2
- package/dist/components/effects/DandelionSeedsEffect.d.ts.map +1 -1
- package/dist/components/effects/DandelionSeedsEffect.js +19 -9
- package/dist/components/effects/DataStreamEffect.d.ts +8 -3
- package/dist/components/effects/DataStreamEffect.d.ts.map +1 -1
- package/dist/components/effects/DataStreamEffect.js +54 -26
- package/dist/components/effects/DnaHelixEffect.d.ts +8 -3
- package/dist/components/effects/DnaHelixEffect.d.ts.map +1 -1
- package/dist/components/effects/DnaHelixEffect.js +62 -30
- package/dist/components/effects/FallingLeavesEffect.d.ts +7 -2
- package/dist/components/effects/FallingLeavesEffect.d.ts.map +1 -1
- package/dist/components/effects/FallingLeavesEffect.js +19 -9
- package/dist/components/effects/FieldLinesEffect.d.ts +8 -3
- package/dist/components/effects/FieldLinesEffect.d.ts.map +1 -1
- package/dist/components/effects/FieldLinesEffect.js +30 -20
- package/dist/components/effects/Fire.d.ts +8 -3
- package/dist/components/effects/Fire.d.ts.map +1 -1
- package/dist/components/effects/Fire.js +47 -10
- package/dist/components/effects/FireflySwarmEffect.d.ts +7 -2
- package/dist/components/effects/FireflySwarmEffect.d.ts.map +1 -1
- package/dist/components/effects/FireflySwarmEffect.js +19 -9
- package/dist/components/effects/Flares.d.ts +10 -3
- package/dist/components/effects/Flares.d.ts.map +1 -1
- package/dist/components/effects/Flares.js +53 -56
- package/dist/components/effects/ForcefieldEffect.d.ts +8 -3
- package/dist/components/effects/ForcefieldEffect.d.ts.map +1 -1
- package/dist/components/effects/ForcefieldEffect.js +52 -33
- package/dist/components/effects/GalaxyEffect.d.ts +7 -2
- package/dist/components/effects/GalaxyEffect.d.ts.map +1 -1
- package/dist/components/effects/GalaxyEffect.js +19 -9
- package/dist/components/effects/HarmonicShellEffect.d.ts +8 -3
- package/dist/components/effects/HarmonicShellEffect.d.ts.map +1 -1
- package/dist/components/effects/HarmonicShellEffect.js +30 -22
- package/dist/components/effects/HologramEffect.d.ts +8 -3
- package/dist/components/effects/HologramEffect.d.ts.map +1 -1
- package/dist/components/effects/HologramEffect.js +52 -23
- package/dist/components/effects/IceCrystalsEffect.d.ts +8 -3
- package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -1
- package/dist/components/effects/IceCrystalsEffect.js +36 -21
- package/dist/components/effects/IceHaloEffect.d.ts +7 -2
- package/dist/components/effects/IceHaloEffect.d.ts.map +1 -1
- package/dist/components/effects/IceHaloEffect.js +19 -9
- package/dist/components/effects/LichtenbergEffect.d.ts +7 -2
- package/dist/components/effects/LichtenbergEffect.d.ts.map +1 -1
- package/dist/components/effects/LichtenbergEffect.js +19 -9
- package/dist/components/effects/LightningEffect.d.ts +8 -3
- package/dist/components/effects/LightningEffect.d.ts.map +1 -1
- package/dist/components/effects/LightningEffect.js +54 -32
- package/dist/components/effects/MoleculesEffect.d.ts +8 -3
- package/dist/components/effects/MoleculesEffect.d.ts.map +1 -1
- package/dist/components/effects/MoleculesEffect.js +31 -21
- package/dist/components/effects/MurmurationEffect.d.ts +7 -2
- package/dist/components/effects/MurmurationEffect.d.ts.map +1 -1
- package/dist/components/effects/MurmurationEffect.js +19 -9
- package/dist/components/effects/NeuralNetworkEffect.d.ts +8 -3
- package/dist/components/effects/NeuralNetworkEffect.d.ts.map +1 -1
- package/dist/components/effects/NeuralNetworkEffect.js +66 -33
- package/dist/components/effects/OrbEffect.d.ts +8 -3
- package/dist/components/effects/OrbEffect.d.ts.map +1 -1
- package/dist/components/effects/OrbEffect.js +89 -42
- package/dist/components/effects/PlanetaryRingsEffect.d.ts +7 -2
- package/dist/components/effects/PlanetaryRingsEffect.d.ts.map +1 -1
- package/dist/components/effects/PlanetaryRingsEffect.js +19 -9
- package/dist/components/effects/PortalEffect.d.ts +8 -3
- package/dist/components/effects/PortalEffect.d.ts.map +1 -1
- package/dist/components/effects/PortalEffect.js +41 -25
- package/dist/components/effects/ShockwaveEffect.d.ts +7 -2
- package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
- package/dist/components/effects/ShockwaveEffect.js +19 -9
- package/dist/components/effects/SmokePlumeEffect.d.ts +8 -3
- package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -1
- package/dist/components/effects/SmokePlumeEffect.js +30 -20
- package/dist/components/effects/SmokeRibbon.d.ts +8 -2
- package/dist/components/effects/SmokeRibbon.d.ts.map +1 -1
- package/dist/components/effects/SmokeRibbon.js +34 -24
- package/dist/components/effects/SmokeRingEffect.d.ts +8 -3
- package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -1
- package/dist/components/effects/SmokeRingEffect.js +33 -21
- package/dist/components/effects/StrangeAttractorEffect.d.ts +8 -3
- package/dist/components/effects/StrangeAttractorEffect.d.ts.map +1 -1
- package/dist/components/effects/StrangeAttractorEffect.js +30 -20
- package/dist/components/effects/VolumetricFogEffect.d.ts +8 -3
- package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -1
- package/dist/components/effects/VolumetricFogEffect.js +38 -20
- package/dist/components/effects/WaterCausticsEffect.d.ts +7 -2
- package/dist/components/effects/WaterCausticsEffect.d.ts.map +1 -1
- package/dist/components/effects/WaterCausticsEffect.js +19 -9
- package/dist/components/effects/index.d.ts +0 -1
- package/dist/components/effects/index.d.ts.map +1 -1
- package/dist/components/effects/index.js +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/components/landscape/LandscapeMesh.js +1 -1
- package/dist/components/landscape/types.d.ts +1 -1
- package/dist/components/landscape/types.d.ts.map +1 -1
- package/dist/components/particles/MagneticBottleParticles.d.ts +17 -0
- package/dist/components/particles/MagneticBottleParticles.d.ts.map +1 -0
- package/dist/components/particles/MagneticBottleParticles.js +618 -0
- package/dist/components/particles/ShapeBurstParticles.d.ts +17 -0
- package/dist/components/particles/ShapeBurstParticles.d.ts.map +1 -0
- package/dist/components/particles/ShapeBurstParticles.js +588 -0
- package/dist/components/particles/ShapeFlowParticles.d.ts +17 -0
- package/dist/components/particles/ShapeFlowParticles.d.ts.map +1 -0
- package/dist/components/particles/ShapeFlowParticles.js +755 -0
- package/dist/components/particles/index.d.ts +6 -0
- package/dist/components/particles/index.d.ts.map +1 -1
- package/dist/components/particles/index.js +3 -0
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +0 -5
- package/dist/components/terrain/types.d.ts +1 -1
- package/dist/components/terrain/types.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.js +0 -6
- package/dist/components/volumetricClouds/types.d.ts +1 -1
- package/dist/components/volumetricClouds/types.d.ts.map +1 -1
- package/dist/components/water/types.d.ts +1 -1
- package/dist/components/water/types.d.ts.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/useConfigDriver.d.ts +22 -0
- package/dist/hooks/useConfigDriver.d.ts.map +1 -0
- package/dist/hooks/useConfigDriver.js +43 -0
- package/dist/hooks/useConfigLive.d.ts +1 -1
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/hooks/useInteraction.d.ts +6 -7
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +87 -268
- package/dist/hooks/useLandscapeMaps.d.ts +1 -1
- package/dist/hooks/useLandscapeMaps.d.ts.map +1 -1
- package/dist/hooks/useObjectAnimation.d.ts.map +1 -1
- package/dist/hooks/useObjectAnimation.js +0 -2
- package/dist/hooks/useOceanMaterial.d.ts +1 -1
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +0 -5
- package/dist/hooks/useRuntimeSettings.d.ts +1 -1
- package/dist/hooks/useRuntimeSettings.js +1 -1
- package/dist/hooks/useThunder.d.ts +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/interactions/index.d.ts +4 -0
- package/dist/interactions/index.d.ts.map +1 -0
- package/dist/interactions/index.js +1 -0
- package/dist/interactions/runner.d.ts +24 -0
- package/dist/interactions/runner.d.ts.map +1 -0
- package/dist/interactions/runner.js +46 -0
- package/dist/operations/catalogue/curlSmoke.d.ts +3 -0
- package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -0
- package/dist/operations/catalogue/curlSmoke.js +178 -0
- package/dist/operations/catalogue/displayImage.d.ts +3 -0
- package/dist/operations/catalogue/displayImage.d.ts.map +1 -0
- package/dist/operations/catalogue/displayImage.js +40 -0
- package/dist/operations/catalogue/dissolve.d.ts +3 -0
- package/dist/operations/catalogue/dissolve.d.ts.map +1 -0
- package/dist/operations/catalogue/dissolve.js +57 -0
- package/dist/operations/catalogue/emberAsh.d.ts +3 -0
- package/dist/operations/catalogue/emberAsh.d.ts.map +1 -0
- package/dist/operations/catalogue/emberAsh.js +171 -0
- package/dist/operations/catalogue/fade.d.ts +3 -0
- package/dist/operations/catalogue/fade.d.ts.map +1 -0
- package/dist/operations/catalogue/fade.js +45 -0
- package/dist/operations/catalogue/flip.d.ts +3 -0
- package/dist/operations/catalogue/flip.d.ts.map +1 -0
- package/dist/operations/catalogue/flip.js +69 -0
- package/dist/operations/catalogue/flock.d.ts +3 -0
- package/dist/operations/catalogue/flock.d.ts.map +1 -0
- package/dist/operations/catalogue/flock.js +163 -0
- package/dist/operations/catalogue/focus.d.ts +3 -0
- package/dist/operations/catalogue/focus.d.ts.map +1 -0
- package/dist/operations/catalogue/focus.js +23 -0
- package/dist/operations/catalogue/frame.d.ts +3 -0
- package/dist/operations/catalogue/frame.d.ts.map +1 -0
- package/dist/operations/catalogue/frame.js +44 -0
- package/dist/operations/catalogue/frost.d.ts +3 -0
- package/dist/operations/catalogue/frost.d.ts.map +1 -0
- package/dist/operations/catalogue/frost.js +111 -0
- package/dist/operations/catalogue/fxInstances.d.ts +21 -0
- package/dist/operations/catalogue/fxInstances.d.ts.map +1 -0
- package/dist/operations/catalogue/fxInstances.js +47 -0
- package/dist/operations/catalogue/fxPoints.d.ts +22 -0
- package/dist/operations/catalogue/fxPoints.d.ts.map +1 -0
- package/dist/operations/catalogue/fxPoints.js +70 -0
- package/dist/operations/catalogue/glow.d.ts +3 -0
- package/dist/operations/catalogue/glow.d.ts.map +1 -0
- package/dist/operations/catalogue/glow.js +50 -0
- package/dist/operations/catalogue/heatCracks.d.ts +3 -0
- package/dist/operations/catalogue/heatCracks.d.ts.map +1 -0
- package/dist/operations/catalogue/heatCracks.js +134 -0
- package/dist/operations/catalogue/hologram.d.ts +3 -0
- package/dist/operations/catalogue/hologram.d.ts.map +1 -0
- package/dist/operations/catalogue/hologram.js +118 -0
- package/dist/operations/catalogue/inkBloom.d.ts +3 -0
- package/dist/operations/catalogue/inkBloom.d.ts.map +1 -0
- package/dist/operations/catalogue/inkBloom.js +156 -0
- package/dist/operations/catalogue/ivy.d.ts +13 -0
- package/dist/operations/catalogue/ivy.d.ts.map +1 -0
- package/dist/operations/catalogue/ivy.js +469 -0
- package/dist/operations/catalogue/jelly.d.ts +3 -0
- package/dist/operations/catalogue/jelly.d.ts.map +1 -0
- package/dist/operations/catalogue/jelly.js +50 -0
- package/dist/operations/catalogue/kintsugi.d.ts +3 -0
- package/dist/operations/catalogue/kintsugi.d.ts.map +1 -0
- package/dist/operations/catalogue/kintsugi.js +173 -0
- package/dist/operations/catalogue/lidarScan.d.ts +3 -0
- package/dist/operations/catalogue/lidarScan.d.ts.map +1 -0
- package/dist/operations/catalogue/lidarScan.js +240 -0
- package/dist/operations/catalogue/liquidMetal.d.ts +3 -0
- package/dist/operations/catalogue/liquidMetal.d.ts.map +1 -0
- package/dist/operations/catalogue/liquidMetal.js +122 -0
- package/dist/operations/catalogue/materialFx.d.ts +6 -0
- package/dist/operations/catalogue/materialFx.d.ts.map +1 -0
- package/dist/operations/catalogue/materialFx.js +13 -0
- package/dist/operations/catalogue/metalize.d.ts +3 -0
- package/dist/operations/catalogue/metalize.d.ts.map +1 -0
- package/dist/operations/catalogue/metalize.js +135 -0
- package/dist/operations/catalogue/moveToFront.d.ts +3 -0
- package/dist/operations/catalogue/moveToFront.d.ts.map +1 -0
- package/dist/operations/catalogue/moveToFront.js +26 -0
- package/dist/operations/catalogue/orbit.d.ts +3 -0
- package/dist/operations/catalogue/orbit.d.ts.map +1 -0
- package/dist/operations/catalogue/orbit.js +29 -0
- package/dist/operations/catalogue/particleSwarm.d.ts +3 -0
- package/dist/operations/catalogue/particleSwarm.d.ts.map +1 -0
- package/dist/operations/catalogue/particleSwarm.js +138 -0
- package/dist/operations/catalogue/petalPeel.d.ts +3 -0
- package/dist/operations/catalogue/petalPeel.d.ts.map +1 -0
- package/dist/operations/catalogue/petalPeel.js +137 -0
- package/dist/operations/catalogue/petrify.d.ts +3 -0
- package/dist/operations/catalogue/petrify.d.ts.map +1 -0
- package/dist/operations/catalogue/petrify.js +94 -0
- package/dist/operations/catalogue/portal.d.ts +3 -0
- package/dist/operations/catalogue/portal.d.ts.map +1 -0
- package/dist/operations/catalogue/portal.js +224 -0
- package/dist/operations/catalogue/print3d.d.ts +3 -0
- package/dist/operations/catalogue/print3d.d.ts.map +1 -0
- package/dist/operations/catalogue/print3d.js +275 -0
- package/dist/operations/catalogue/rainBeads.d.ts +3 -0
- package/dist/operations/catalogue/rainBeads.d.ts.map +1 -0
- package/dist/operations/catalogue/rainBeads.js +223 -0
- package/dist/operations/catalogue/restPose.d.ts +21 -0
- package/dist/operations/catalogue/restPose.d.ts.map +1 -0
- package/dist/operations/catalogue/restPose.js +55 -0
- package/dist/operations/catalogue/rimLight.d.ts +3 -0
- package/dist/operations/catalogue/rimLight.d.ts.map +1 -0
- package/dist/operations/catalogue/rimLight.js +72 -0
- package/dist/operations/catalogue/sandErosion.d.ts +3 -0
- package/dist/operations/catalogue/sandErosion.d.ts.map +1 -0
- package/dist/operations/catalogue/sandErosion.js +167 -0
- package/dist/operations/catalogue/shaderLayers.d.ts +74 -0
- package/dist/operations/catalogue/shaderLayers.d.ts.map +1 -0
- package/dist/operations/catalogue/shaderLayers.js +322 -0
- package/dist/operations/catalogue/shatter.d.ts +3 -0
- package/dist/operations/catalogue/shatter.d.ts.map +1 -0
- package/dist/operations/catalogue/shatter.js +267 -0
- package/dist/operations/catalogue/silkDrape.d.ts +3 -0
- package/dist/operations/catalogue/silkDrape.d.ts.map +1 -0
- package/dist/operations/catalogue/silkDrape.js +340 -0
- package/dist/operations/catalogue/spin.d.ts +3 -0
- package/dist/operations/catalogue/spin.d.ts.map +1 -0
- package/dist/operations/catalogue/spin.js +42 -0
- package/dist/operations/catalogue/surfaceSample.d.ts +17 -0
- package/dist/operations/catalogue/surfaceSample.d.ts.map +1 -0
- package/dist/operations/catalogue/surfaceSample.js +187 -0
- package/dist/operations/catalogue/swirl.d.ts +3 -0
- package/dist/operations/catalogue/swirl.d.ts.map +1 -0
- package/dist/operations/catalogue/swirl.js +69 -0
- package/dist/operations/catalogue/teleport.d.ts +3 -0
- package/dist/operations/catalogue/teleport.d.ts.map +1 -0
- package/dist/operations/catalogue/teleport.js +213 -0
- package/dist/operations/catalogue/transitionField.d.ts +124 -0
- package/dist/operations/catalogue/transitionField.d.ts.map +1 -0
- package/dist/operations/catalogue/transitionField.js +278 -0
- package/dist/operations/catalogue/unweave.d.ts +3 -0
- package/dist/operations/catalogue/unweave.d.ts.map +1 -0
- package/dist/operations/catalogue/unweave.js +233 -0
- package/dist/operations/catalogue/visibility.d.ts +3 -0
- package/dist/operations/catalogue/visibility.d.ts.map +1 -0
- package/dist/operations/catalogue/visibility.js +25 -0
- package/dist/operations/catalogue/voxelize.d.ts +3 -0
- package/dist/operations/catalogue/voxelize.d.ts.map +1 -0
- package/dist/operations/catalogue/voxelize.js +148 -0
- package/dist/operations/catalogue/warmup.d.ts +22 -0
- package/dist/operations/catalogue/warmup.d.ts.map +1 -0
- package/dist/operations/catalogue/warmup.js +106 -0
- package/dist/operations/catalogue/zoom.d.ts +3 -0
- package/dist/operations/catalogue/zoom.d.ts.map +1 -0
- package/dist/operations/catalogue/zoom.js +33 -0
- package/dist/operations/index.d.ts +7 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +6 -0
- package/dist/operations/objectEffects.d.ts +46 -0
- package/dist/operations/objectEffects.d.ts.map +1 -0
- package/dist/operations/objectEffects.js +136 -0
- package/dist/operations/registry.d.ts +16 -0
- package/dist/operations/registry.d.ts.map +1 -0
- package/dist/operations/registry.js +63 -0
- package/dist/operations/runtime.d.ts +60 -0
- package/dist/operations/runtime.d.ts.map +1 -0
- package/dist/operations/runtime.js +317 -0
- package/dist/operations/types.d.ts +122 -0
- package/dist/operations/types.d.ts.map +1 -0
- package/dist/operations/types.js +9 -0
- package/dist/operations/useObjectEffectLayers.d.ts +4 -0
- package/dist/operations/useObjectEffectLayers.d.ts.map +1 -0
- package/dist/operations/useObjectEffectLayers.js +42 -0
- package/dist/operations/useOperationsRuntime.d.ts +3 -0
- package/dist/operations/useOperationsRuntime.d.ts.map +1 -0
- package/dist/operations/useOperationsRuntime.js +69 -0
- package/dist/presets/landscapePresets.d.ts +1 -1
- package/dist/presets/landscapePresets.d.ts.map +1 -1
- package/dist/presets/landscapePresets.js +1 -1
- package/dist/presets/landscapeTypes.d.ts +1 -1
- package/dist/presets/landscapeTypes.d.ts.map +1 -1
- package/dist/presets/landscapeTypes.js +1 -1
- package/dist/presets/oceanSurfacePresets.d.ts +1 -1
- package/dist/presets/terrainPresets.d.ts +1 -1
- package/dist/presets/terrainPresets.d.ts.map +1 -1
- package/dist/presets/volumetricCloudPresets.d.ts +1 -1
- package/dist/types/cloudConfigs.d.ts +2 -309
- package/dist/types/cloudConfigs.d.ts.map +1 -1
- package/dist/types/cloudConfigs.js +2 -339
- package/dist/types/index.d.ts +8 -8
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/landscapeConfigs.d.ts +2 -217
- package/dist/types/landscapeConfigs.d.ts.map +1 -1
- package/dist/types/landscapeConfigs.js +2 -256
- package/dist/types/oceanConfigs.d.ts +2 -289
- package/dist/types/oceanConfigs.d.ts.map +1 -1
- package/dist/types/oceanConfigs.js +2 -380
- package/dist/types/terrainConfigs.d.ts +2 -250
- package/dist/types/terrainConfigs.d.ts.map +1 -1
- package/dist/types/terrainConfigs.js +2 -292
- package/dist/utils/cloudUniforms.d.ts +1 -1
- package/dist/utils/configAnimations.d.ts +6 -0
- package/dist/utils/configAnimations.d.ts.map +1 -1
- package/dist/utils/configAnimations.js +14 -0
- package/dist/utils/gridConfig.d.ts +19 -0
- package/dist/utils/gridConfig.d.ts.map +1 -0
- package/dist/utils/gridConfig.js +52 -0
- package/dist/utils/handleCloudsAnimations.d.ts +1 -1
- package/dist/utils/handleCloudsAnimations.js +1 -1
- package/dist/utils/hasHoverAnimation.d.ts.map +1 -1
- package/dist/utils/hasHoverAnimation.js +0 -2
- package/dist/utils/landscapeUniforms.d.ts +1 -1
- package/dist/utils/landscapeUniforms.d.ts.map +1 -1
- package/dist/utils/oceanUniforms.d.ts +1 -1
- package/dist/utils/particleShape.d.ts +33 -0
- package/dist/utils/particleShape.d.ts.map +1 -0
- package/dist/utils/particleShape.js +207 -0
- package/dist/utils/particleTrails.d.ts.map +1 -1
- package/dist/utils/particleTrails.js +29 -14
- package/dist/utils/terrainUniforms.d.ts +1 -1
- package/dist/utils/terrainUniforms.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActionSequence } from '@3driseai/3drise-core';
|
|
2
|
+
import type { PerspectiveCamera } from 'three';
|
|
3
|
+
import type { KeyValue } from './types';
|
|
4
|
+
export interface ApplyContext {
|
|
5
|
+
camera: PerspectiveCamera | null;
|
|
6
|
+
/** drei OrbitControls (makeDefault), when present */
|
|
7
|
+
controls: any;
|
|
8
|
+
/** Authored settings for an element (object id or 'camera'), action patches included. */
|
|
9
|
+
getSettings: (state: string) => any;
|
|
10
|
+
/** Action definitions, for sequence cues. Without it cues are ignored. */
|
|
11
|
+
getAction?: (id: string) => ActionSequence | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function clearApplierCaches(): void;
|
|
14
|
+
/** Write one value. Unknown paths are ignored (the track picker never offers them). */
|
|
15
|
+
/** Write one value to the live scene. False when its target is not mounted yet. */
|
|
16
|
+
export declare function applyValue(ctx: ApplyContext, state: string, path: string, value: KeyValue, node?: string): boolean;
|
|
17
|
+
/** Whether a track's target is in the scene yet (a model may still be loading). */
|
|
18
|
+
export declare function isTargetMounted(ctx: ApplyContext, state: string, node?: string): boolean;
|
|
19
|
+
/** Whether a (state, path) has an applier — used by the track picker. */
|
|
20
|
+
export declare function isApplicable(state: string, path: string): boolean;
|
|
21
|
+
//# sourceMappingURL=appliers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appliers.d.ts","sourceRoot":"","sources":["../../src/animationsV2/appliers.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAc/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,qDAAqD;IACrD,QAAQ,EAAE,GAAG,CAAC;IACd,yFAAyF;IACzF,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC;IACpC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,CAAC;CACxD;AAWD,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AA2KD,uFAAuF;AACvF,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAIlH;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAKxF;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { findById, SceneStore, applySingleProperty, applyMaterialPropertyToObject, traverseSkippingEdgesAndEffects, EDGES_GROUP_KEY, } from '@3driseai/3drise-core';
|
|
2
|
+
import { CONFIG_LIVE_KEY } from '../hooks/useConfigLive.js';
|
|
3
|
+
import { CLOUD_LIVE_KEY } from '../hooks/useCloudLive.js';
|
|
4
|
+
import { OCEAN_LIVE_KEY } from '../hooks/useOceanLive.js';
|
|
5
|
+
import { TERRAIN_LIVE_KEY } from '../hooks/useTerrainLive.js';
|
|
6
|
+
import { createSunPosition } from '../utils/utils3d.js';
|
|
7
|
+
import { applyNodeValue, clearNodeCaches, nodesFor } from './nodeTracks.js';
|
|
8
|
+
// --- live-target caches (cleared when the scene changes under us) -------------
|
|
9
|
+
const objectCache = new Map();
|
|
10
|
+
const handleCache = new Map();
|
|
11
|
+
export function clearApplierCaches() {
|
|
12
|
+
objectCache.clear();
|
|
13
|
+
handleCache.clear();
|
|
14
|
+
clearNodeCaches();
|
|
15
|
+
}
|
|
16
|
+
function objectFor(state) {
|
|
17
|
+
const cached = objectCache.get(state);
|
|
18
|
+
if (cached && cached.parent)
|
|
19
|
+
return cached;
|
|
20
|
+
const found = findById(state);
|
|
21
|
+
if (found)
|
|
22
|
+
objectCache.set(state, found);
|
|
23
|
+
else
|
|
24
|
+
objectCache.delete(state);
|
|
25
|
+
return found;
|
|
26
|
+
}
|
|
27
|
+
function configHandleFor(state) {
|
|
28
|
+
const cached = handleCache.get(state);
|
|
29
|
+
if (cached && cached.alive)
|
|
30
|
+
return cached;
|
|
31
|
+
let found = null;
|
|
32
|
+
SceneStore.scene?.traverse((o) => {
|
|
33
|
+
if (found)
|
|
34
|
+
return;
|
|
35
|
+
const h = o.userData?.[CONFIG_LIVE_KEY];
|
|
36
|
+
if (h && h.alive && h.id === state)
|
|
37
|
+
found = h;
|
|
38
|
+
});
|
|
39
|
+
if (found)
|
|
40
|
+
handleCache.set(state, found);
|
|
41
|
+
else
|
|
42
|
+
handleCache.delete(state);
|
|
43
|
+
return found;
|
|
44
|
+
}
|
|
45
|
+
function edgesGroupOf(obj) {
|
|
46
|
+
for (const child of obj.children)
|
|
47
|
+
if (child.userData?.[EDGES_GROUP_KEY])
|
|
48
|
+
return child;
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const asVec3 = (v) => Array.isArray(v) && v.length >= 3 ? [Number(v[0]), Number(v[1]), Number(v[2])] : null;
|
|
52
|
+
const applyCamera = (ctx, _state, path, value) => {
|
|
53
|
+
const cam = ctx.camera;
|
|
54
|
+
if (!cam)
|
|
55
|
+
return false;
|
|
56
|
+
const target = ctx.controls?.target;
|
|
57
|
+
if (path === 'position') {
|
|
58
|
+
const v = asVec3(value);
|
|
59
|
+
if (!v)
|
|
60
|
+
return;
|
|
61
|
+
cam.position.set(...v);
|
|
62
|
+
// Face the orbit target NOW: OrbitControls oriented the camera earlier this frame
|
|
63
|
+
// from the old position, so without this the view lags a frame behind and wobbles.
|
|
64
|
+
// With the controls switched off (authored), the camera keeps its own orientation.
|
|
65
|
+
const orbiting = ctx.getSettings('camera')?.controls?.enabled !== false;
|
|
66
|
+
if (target && orbiting)
|
|
67
|
+
cam.lookAt(target);
|
|
68
|
+
}
|
|
69
|
+
else if (path === 'fov' && typeof value === 'number') {
|
|
70
|
+
cam.fov = value;
|
|
71
|
+
cam.updateProjectionMatrix();
|
|
72
|
+
}
|
|
73
|
+
else if (path === 'controls.target') {
|
|
74
|
+
const v = asVec3(value);
|
|
75
|
+
if (!v || !target)
|
|
76
|
+
return false;
|
|
77
|
+
target.set(...v);
|
|
78
|
+
cam.lookAt(target);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const applyTransform = (_ctx, state, path, value) => {
|
|
82
|
+
const obj = objectFor(state);
|
|
83
|
+
if (!obj)
|
|
84
|
+
return false;
|
|
85
|
+
const prop = path.slice('meshSettings.'.length);
|
|
86
|
+
if (prop === 'visible') {
|
|
87
|
+
obj.visible = !!value;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const v = asVec3(value);
|
|
91
|
+
if (!v)
|
|
92
|
+
return false;
|
|
93
|
+
if (prop === 'position')
|
|
94
|
+
obj.position.set(...v);
|
|
95
|
+
else if (prop === 'rotation')
|
|
96
|
+
obj.rotation.set(...v);
|
|
97
|
+
else if (prop === 'scale')
|
|
98
|
+
obj.scale.set(...v);
|
|
99
|
+
};
|
|
100
|
+
const applyMaterial = (_ctx, state, path, value) => {
|
|
101
|
+
const obj = objectFor(state);
|
|
102
|
+
if (!obj)
|
|
103
|
+
return false;
|
|
104
|
+
const key = path.slice('materialSettings.'.length);
|
|
105
|
+
traverseSkippingEdgesAndEffects(obj, true, (node) => {
|
|
106
|
+
if (!node.material)
|
|
107
|
+
return;
|
|
108
|
+
const mats = Array.isArray(node.material) ? node.material : [node.material];
|
|
109
|
+
for (const mat of mats) {
|
|
110
|
+
if (key === 'opacity' && typeof value === 'number' && 'transparent' in mat)
|
|
111
|
+
mat.transparent = value < 1;
|
|
112
|
+
applySingleProperty(mat, key, value);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const applyEdgesMaterial = (_ctx, state, path, value) => {
|
|
117
|
+
const obj = objectFor(state);
|
|
118
|
+
const edges = obj && edgesGroupOf(obj);
|
|
119
|
+
if (!edges)
|
|
120
|
+
return false;
|
|
121
|
+
applyMaterialPropertyToObject(edges, path.slice('edgesSettings.materialSettings.'.length), value);
|
|
122
|
+
};
|
|
123
|
+
const applyConfig = (_ctx, state, path, value) => {
|
|
124
|
+
const handle = configHandleFor(state);
|
|
125
|
+
if (!handle)
|
|
126
|
+
return false;
|
|
127
|
+
if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {
|
|
128
|
+
handle.set(path.slice('config.'.length), value);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
// --- environment: the same live paths the controllers' sliders use -------------------
|
|
132
|
+
/** Sky: the sky mesh's shader uniforms (what useSkyUniforms.updateUniforms writes). */
|
|
133
|
+
const SKY_UNIFORM_KEYS = new Set(['turbidity', 'rayleigh', 'mieCoefficient', 'mieDirectionalG']);
|
|
134
|
+
const applySky = (_ctx, _state, path, value) => {
|
|
135
|
+
if (typeof value !== 'number')
|
|
136
|
+
return;
|
|
137
|
+
const sky = objectFor('3drise-sky');
|
|
138
|
+
const uniforms = sky?.material?.uniforms;
|
|
139
|
+
if (!uniforms)
|
|
140
|
+
return false;
|
|
141
|
+
if (SKY_UNIFORM_KEYS.has(path)) {
|
|
142
|
+
if (uniforms[path])
|
|
143
|
+
uniforms[path].value = value;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if ((path === 'elevation' || path === 'azimuth') && uniforms.sunPosition) {
|
|
147
|
+
// The other angle comes from the current sun, so the two can be keyed separately.
|
|
148
|
+
const { x, y, z } = uniforms.sunPosition.value;
|
|
149
|
+
const r = Math.sqrt(x * x + y * y + z * z) || 1;
|
|
150
|
+
const current = { elevation: 90 - Math.acos(y / r) * (180 / Math.PI), azimuth: Math.atan2(z, x) * (180 / Math.PI) };
|
|
151
|
+
const elevation = path === 'elevation' ? value : current.elevation;
|
|
152
|
+
const azimuth = path === 'azimuth' ? value : current.azimuth;
|
|
153
|
+
uniforms.sunPosition.value.copy(createSunPosition(elevation, azimuth));
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/** Clouds: the layer's live handle — `config.*` is the deck, `cirrus.*` the high layer. */
|
|
157
|
+
const applyClouds = (ctx, _state, path, value) => {
|
|
158
|
+
if (typeof value !== 'number' && typeof value !== 'boolean' && typeof value !== 'string')
|
|
159
|
+
return;
|
|
160
|
+
const id = ctx.getSettings('clouds')?.id;
|
|
161
|
+
const handle = id ? objectFor(id)?.userData?.[CLOUD_LIVE_KEY] : undefined;
|
|
162
|
+
if (!handle)
|
|
163
|
+
return false;
|
|
164
|
+
if (path.startsWith('config.'))
|
|
165
|
+
handle.deck(path.slice('config.'.length), value);
|
|
166
|
+
else if (path.startsWith('cirrus.'))
|
|
167
|
+
handle.cirrus(path.slice('cirrus.'.length), value);
|
|
168
|
+
};
|
|
169
|
+
/** Ocean: the world ocean's live handle — `config.*`. */
|
|
170
|
+
const applyOcean = (ctx, _state, path, value) => {
|
|
171
|
+
if (typeof value !== 'number' && typeof value !== 'boolean' && typeof value !== 'string')
|
|
172
|
+
return;
|
|
173
|
+
const id = ctx.getSettings('ocean')?.id;
|
|
174
|
+
const handle = id ? objectFor(id)?.userData?.[OCEAN_LIVE_KEY] : undefined;
|
|
175
|
+
if (!handle || !path.startsWith('config.'))
|
|
176
|
+
return false;
|
|
177
|
+
handle.config(path.slice('config.'.length), value);
|
|
178
|
+
};
|
|
179
|
+
/** Procedural terrain: its live handle — `config.*`. */
|
|
180
|
+
const applyTerrain = (ctx, _state, path, value) => {
|
|
181
|
+
if (typeof value !== 'number' && typeof value !== 'boolean' && typeof value !== 'string')
|
|
182
|
+
return;
|
|
183
|
+
const id = ctx.getSettings('terrain')?.id;
|
|
184
|
+
const handle = id ? objectFor(id)?.userData?.[TERRAIN_LIVE_KEY] : undefined;
|
|
185
|
+
if (!handle || !path.startsWith('config.'))
|
|
186
|
+
return false;
|
|
187
|
+
handle.config(path.slice('config.'.length), value);
|
|
188
|
+
};
|
|
189
|
+
const APPLIERS = [
|
|
190
|
+
{ match: (s) => s === 'camera', apply: applyCamera },
|
|
191
|
+
// Environment before the generic path families: the ocean's `config.*` is not an object's.
|
|
192
|
+
{ match: (s) => s === 'sky', apply: applySky },
|
|
193
|
+
{ match: (s) => s === 'clouds', apply: applyClouds },
|
|
194
|
+
{ match: (s) => s === 'ocean', apply: applyOcean },
|
|
195
|
+
{ match: (s) => s === 'terrain', apply: applyTerrain },
|
|
196
|
+
{ match: (_s, p) => p.startsWith('meshSettings.'), apply: applyTransform },
|
|
197
|
+
{ match: (_s, p) => p.startsWith('materialSettings.'), apply: applyMaterial },
|
|
198
|
+
{ match: (_s, p) => p.startsWith('edgesSettings.materialSettings.'), apply: applyEdgesMaterial },
|
|
199
|
+
{ match: (_s, p) => p.startsWith('config.'), apply: applyConfig },
|
|
200
|
+
];
|
|
201
|
+
/** Write one value. Unknown paths are ignored (the track picker never offers them). */
|
|
202
|
+
/** Write one value to the live scene. False when its target is not mounted yet. */
|
|
203
|
+
export function applyValue(ctx, state, path, value, node) {
|
|
204
|
+
if (node)
|
|
205
|
+
return applyNodeValue(state, node, path, value);
|
|
206
|
+
const entry = APPLIERS.find(a => a.match(state, path));
|
|
207
|
+
return entry ? entry.apply(ctx, state, path, value) !== false : false;
|
|
208
|
+
}
|
|
209
|
+
/** Whether a track's target is in the scene yet (a model may still be loading). */
|
|
210
|
+
export function isTargetMounted(ctx, state, node) {
|
|
211
|
+
if (state === 'camera')
|
|
212
|
+
return !!ctx.camera;
|
|
213
|
+
if (state === 'sky' || state === 'clouds' || state === 'ocean' || state === 'terrain')
|
|
214
|
+
return true;
|
|
215
|
+
if (node)
|
|
216
|
+
return nodesFor(state, node).length > 0;
|
|
217
|
+
return !!objectFor(state);
|
|
218
|
+
}
|
|
219
|
+
/** Whether a (state, path) has an applier — used by the track picker. */
|
|
220
|
+
export function isApplicable(state, path) {
|
|
221
|
+
return APPLIERS.some(a => a.match(state, path));
|
|
222
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AnimationClip, EaseName, Keyframe, KeyValue, Track } from './types';
|
|
2
|
+
export declare const uid: (prefix: string) => string;
|
|
3
|
+
/** Read a dotted settings path ('materialSettings.opacity') from a settings object. */
|
|
4
|
+
export declare function getAtPath(obj: any, path: string): any;
|
|
5
|
+
export declare const secondsToFrame: (t: number, fps: number) => number;
|
|
6
|
+
export declare const frameToSeconds: (frame: number, fps: number) => number;
|
|
7
|
+
export declare const snapToFrame: (t: number, fps: number) => number;
|
|
8
|
+
/** 'SS:FF' timecode (minutes folded into seconds past 59 — clips are short). */
|
|
9
|
+
export declare function timecode(t: number, fps: number): string;
|
|
10
|
+
export declare function easeProgress(ease: EaseName | undefined, p: number): number;
|
|
11
|
+
/**
|
|
12
|
+
* The track's value at time t. Before the first key: the first key's value;
|
|
13
|
+
* after the last: the last key's value. Keys must be sorted by t.
|
|
14
|
+
*/
|
|
15
|
+
export declare function sampleTrack(track: Track, t: number): KeyValue | undefined;
|
|
16
|
+
export declare const sortKeys: (keys: Keyframe[]) => Keyframe[];
|
|
17
|
+
/** Add a key at t, or replace the value of a key already on that frame. */
|
|
18
|
+
export declare function upsertKey(track: Track, t: number, value: KeyValue, fps: number): Track;
|
|
19
|
+
/** Move keys by dt seconds, clamped to [0, duration], snapped to frames unless `free`. */
|
|
20
|
+
export declare function moveKeys(clip: AnimationClip, selection: Set<string>, dt: number, free: boolean): AnimationClip;
|
|
21
|
+
export declare function deleteKeys(clip: AnimationClip, selection: Set<string>): AnimationClip;
|
|
22
|
+
export declare function setKeysEase(clip: AnimationClip, selection: Set<string>, ease: EaseName): AnimationClip;
|
|
23
|
+
export declare function setKeyValue(clip: AnimationClip, keyId: string, value: KeyValue): AnimationClip;
|
|
24
|
+
export declare function findKey(clip: AnimationClip, keyId: string): {
|
|
25
|
+
track: Track;
|
|
26
|
+
key: Keyframe;
|
|
27
|
+
} | undefined;
|
|
28
|
+
/** All key times of the clip, sorted and unique (for Shift+←/→). */
|
|
29
|
+
export declare function allKeyTimes(clip: AnimationClip): number[];
|
|
30
|
+
export declare function newClip(name: string, key: string): AnimationClip;
|
|
31
|
+
/** Deep copy with fresh ids (duplicate). */
|
|
32
|
+
export declare function cloneClip(clip: AnimationClip, name: string, key: string): AnimationClip;
|
|
33
|
+
//# sourceMappingURL=clipUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipUtils.d.ts","sourceRoot":"","sources":["../../src/animationsV2/clipUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOlF,eAAO,MAAM,GAAG,GAAI,QAAQ,MAAM,WAAqF,CAAC;AAExH,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAOrD;AAMD,eAAO,MAAM,cAAc,GAAI,GAAG,MAAM,EAAE,KAAK,MAAM,WAAwB,CAAC;AAC9E,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,WAAgB,CAAC;AAC1E,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,EAAE,KAAK,MAAM,WAAgD,CAAC;AAEnG,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAKvD;AAaD,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAsBzE;AAMD,eAAO,MAAM,QAAQ,GAAI,MAAM,QAAQ,EAAE,eAAwC,CAAC;AAElF,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAOtF;AAED,0FAA0F;AAC1F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,aAAa,CAc9G;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,aAAa,CAKrF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,GAAG,aAAa,CAQtG;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,aAAa,CAQ9F;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE,GAAG,SAAS,CAMvG;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,EAAE,CAIzD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAEhE;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAQvF"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { applyEasing, interpolateValue } from '@3driseai/3drise-core';
|
|
2
|
+
import { DEFAULT_EASE } from './types.js';
|
|
3
|
+
// -----------------------------------------------------------------------------
|
|
4
|
+
// ids, paths
|
|
5
|
+
// -----------------------------------------------------------------------------
|
|
6
|
+
export const uid = (prefix) => `${prefix}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
|
|
7
|
+
/** Read a dotted settings path ('materialSettings.opacity') from a settings object. */
|
|
8
|
+
export function getAtPath(obj, path) {
|
|
9
|
+
let cur = obj;
|
|
10
|
+
for (const part of path.split('.')) {
|
|
11
|
+
if (cur == null)
|
|
12
|
+
return undefined;
|
|
13
|
+
cur = cur[part];
|
|
14
|
+
}
|
|
15
|
+
return cur;
|
|
16
|
+
}
|
|
17
|
+
// -----------------------------------------------------------------------------
|
|
18
|
+
// time
|
|
19
|
+
// -----------------------------------------------------------------------------
|
|
20
|
+
export const secondsToFrame = (t, fps) => Math.round(t * fps);
|
|
21
|
+
export const frameToSeconds = (frame, fps) => frame / fps;
|
|
22
|
+
export const snapToFrame = (t, fps) => frameToSeconds(secondsToFrame(t, fps), fps);
|
|
23
|
+
/** 'SS:FF' timecode (minutes folded into seconds past 59 — clips are short). */
|
|
24
|
+
export function timecode(t, fps) {
|
|
25
|
+
const totalFrames = Math.max(0, secondsToFrame(t, fps));
|
|
26
|
+
const s = Math.floor(totalFrames / fps);
|
|
27
|
+
const f = totalFrames - s * fps;
|
|
28
|
+
return `${String(s).padStart(2, '0')}:${String(f).padStart(2, '0')}`;
|
|
29
|
+
}
|
|
30
|
+
// -----------------------------------------------------------------------------
|
|
31
|
+
// sampling
|
|
32
|
+
// -----------------------------------------------------------------------------
|
|
33
|
+
/** Values that do not interpolate (booleans, non-colour strings) step at the next key. */
|
|
34
|
+
function isSteppedValue(v) {
|
|
35
|
+
if (typeof v === 'boolean')
|
|
36
|
+
return true;
|
|
37
|
+
if (typeof v === 'string')
|
|
38
|
+
return !/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(v);
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
export function easeProgress(ease, p) {
|
|
42
|
+
const name = ease ?? DEFAULT_EASE;
|
|
43
|
+
if (name === 'step')
|
|
44
|
+
return 0;
|
|
45
|
+
if (name === 'linear')
|
|
46
|
+
return p;
|
|
47
|
+
return applyEasing(name, p);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The track's value at time t. Before the first key: the first key's value;
|
|
51
|
+
* after the last: the last key's value. Keys must be sorted by t.
|
|
52
|
+
*/
|
|
53
|
+
export function sampleTrack(track, t) {
|
|
54
|
+
const keys = track.keys;
|
|
55
|
+
if (keys.length === 0)
|
|
56
|
+
return undefined;
|
|
57
|
+
if (t <= keys[0].t)
|
|
58
|
+
return keys[0].value;
|
|
59
|
+
const last = keys[keys.length - 1];
|
|
60
|
+
if (t >= last.t)
|
|
61
|
+
return last.value;
|
|
62
|
+
// binary search: last key with k.t <= t
|
|
63
|
+
let lo = 0;
|
|
64
|
+
let hi = keys.length - 1;
|
|
65
|
+
while (hi - lo > 1) {
|
|
66
|
+
const mid = (lo + hi) >> 1;
|
|
67
|
+
if (keys[mid].t <= t)
|
|
68
|
+
lo = mid;
|
|
69
|
+
else
|
|
70
|
+
hi = mid;
|
|
71
|
+
}
|
|
72
|
+
const a = keys[lo];
|
|
73
|
+
const b = keys[hi];
|
|
74
|
+
if (isSteppedValue(a.value) || isSteppedValue(b.value))
|
|
75
|
+
return a.value;
|
|
76
|
+
const span = b.t - a.t;
|
|
77
|
+
const p = span > 0 ? easeProgress(a.ease, (t - a.t) / span) : 1;
|
|
78
|
+
// interpolateValue is type-aware (numbers, arrays, hex colours); the property name
|
|
79
|
+
// only disambiguates colour keys, so pass the path's last segment.
|
|
80
|
+
return interpolateValue(track.path.split('.').pop() ?? track.path, a.value, b.value, p);
|
|
81
|
+
}
|
|
82
|
+
// -----------------------------------------------------------------------------
|
|
83
|
+
// key / track edits (pure — the slice stores the results)
|
|
84
|
+
// -----------------------------------------------------------------------------
|
|
85
|
+
export const sortKeys = (keys) => [...keys].sort((a, b) => a.t - b.t);
|
|
86
|
+
/** Add a key at t, or replace the value of a key already on that frame. */
|
|
87
|
+
export function upsertKey(track, t, value, fps) {
|
|
88
|
+
const frame = secondsToFrame(t, fps);
|
|
89
|
+
const existing = track.keys.find(k => secondsToFrame(k.t, fps) === frame);
|
|
90
|
+
if (existing) {
|
|
91
|
+
return { ...track, keys: track.keys.map(k => (k.id === existing.id ? { ...k, value } : k)) };
|
|
92
|
+
}
|
|
93
|
+
return { ...track, keys: sortKeys([...track.keys, { id: uid('k'), t: snapToFrame(t, fps), value }]) };
|
|
94
|
+
}
|
|
95
|
+
/** Move keys by dt seconds, clamped to [0, duration], snapped to frames unless `free`. */
|
|
96
|
+
export function moveKeys(clip, selection, dt, free) {
|
|
97
|
+
return {
|
|
98
|
+
...clip,
|
|
99
|
+
tracks: clip.tracks.map(track => {
|
|
100
|
+
if (!track.keys.some(k => selection.has(k.id)))
|
|
101
|
+
return track;
|
|
102
|
+
const keys = track.keys.map(k => {
|
|
103
|
+
if (!selection.has(k.id))
|
|
104
|
+
return k;
|
|
105
|
+
let t = Math.min(clip.duration, Math.max(0, k.t + dt));
|
|
106
|
+
if (!free)
|
|
107
|
+
t = snapToFrame(t, clip.fps);
|
|
108
|
+
return { ...k, t };
|
|
109
|
+
});
|
|
110
|
+
return { ...track, keys: sortKeys(keys) };
|
|
111
|
+
}),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export function deleteKeys(clip, selection) {
|
|
115
|
+
return {
|
|
116
|
+
...clip,
|
|
117
|
+
tracks: clip.tracks.map(track => ({ ...track, keys: track.keys.filter(k => !selection.has(k.id)) })),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export function setKeysEase(clip, selection, ease) {
|
|
121
|
+
return {
|
|
122
|
+
...clip,
|
|
123
|
+
tracks: clip.tracks.map(track => ({
|
|
124
|
+
...track,
|
|
125
|
+
keys: track.keys.map(k => (selection.has(k.id) ? { ...k, ease } : k)),
|
|
126
|
+
})),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export function setKeyValue(clip, keyId, value) {
|
|
130
|
+
return {
|
|
131
|
+
...clip,
|
|
132
|
+
tracks: clip.tracks.map(track => ({
|
|
133
|
+
...track,
|
|
134
|
+
keys: track.keys.map(k => (k.id === keyId ? { ...k, value } : k)),
|
|
135
|
+
})),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export function findKey(clip, keyId) {
|
|
139
|
+
for (const track of clip.tracks) {
|
|
140
|
+
const key = track.keys.find(k => k.id === keyId);
|
|
141
|
+
if (key)
|
|
142
|
+
return { track, key };
|
|
143
|
+
}
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
/** All key times of the clip, sorted and unique (for Shift+←/→). */
|
|
147
|
+
export function allKeyTimes(clip) {
|
|
148
|
+
const set = new Set();
|
|
149
|
+
clip.tracks.forEach(tr => tr.keys.forEach(k => set.add(k.t)));
|
|
150
|
+
return [...set].sort((a, b) => a - b);
|
|
151
|
+
}
|
|
152
|
+
export function newClip(name, key) {
|
|
153
|
+
return { id: uid('clip'), name, key, duration: 4, fps: 30, loop: false, yoyo: false, endMode: 'hold', tracks: [] };
|
|
154
|
+
}
|
|
155
|
+
/** Deep copy with fresh ids (duplicate). */
|
|
156
|
+
export function cloneClip(clip, name, key) {
|
|
157
|
+
return {
|
|
158
|
+
...clip,
|
|
159
|
+
id: uid('clip'),
|
|
160
|
+
name,
|
|
161
|
+
key,
|
|
162
|
+
tracks: clip.tracks.map(tr => ({ ...tr, id: uid('tr'), keys: tr.keys.map(k => ({ ...k, id: uid('k') })) })),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ElementSources {
|
|
2
|
+
objects: Array<{
|
|
3
|
+
id: string;
|
|
4
|
+
}>;
|
|
5
|
+
camera: unknown;
|
|
6
|
+
sky: unknown;
|
|
7
|
+
clouds: unknown;
|
|
8
|
+
ocean: unknown;
|
|
9
|
+
terrain: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare const ENVIRONMENT_STATES: readonly ["sky", "clouds", "ocean", "terrain"];
|
|
12
|
+
export type EnvironmentState = typeof ENVIRONMENT_STATES[number];
|
|
13
|
+
export declare const isEnvironmentState: (state: string) => state is EnvironmentState;
|
|
14
|
+
export declare function resolveElementSettings(state: string, src: ElementSources): any;
|
|
15
|
+
//# sourceMappingURL=elementSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementSettings.d.ts","sourceRoot":"","sources":["../../src/animationsV2/elementSettings.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,gDAAiD,CAAC;AACjF,MAAM,MAAM,gBAAgB,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACjE,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,gBACD,CAAC;AAE5D,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,GAAG,CAU9E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Authored settings of any animatable element, with applied action patches — the
|
|
2
|
+
// value a track starts from and returns to. Elements: an object id, 'camera', or an
|
|
3
|
+
// environment element ('sky' | 'clouds' | 'ocean' | 'terrain'; the first three are the ids actions use).
|
|
4
|
+
import { SceneActions, applySettingsPatch } from '@3driseai/3drise-core';
|
|
5
|
+
export const ENVIRONMENT_STATES = ['sky', 'clouds', 'ocean', 'terrain'];
|
|
6
|
+
export const isEnvironmentState = (state) => ENVIRONMENT_STATES.includes(state);
|
|
7
|
+
export function resolveElementSettings(state, src) {
|
|
8
|
+
const base = state === 'camera' ? src.camera
|
|
9
|
+
: state === 'sky' ? src.sky
|
|
10
|
+
: state === 'clouds' ? src.clouds
|
|
11
|
+
: state === 'ocean' ? src.ocean
|
|
12
|
+
: state === 'terrain' ? src.terrain
|
|
13
|
+
: src.objects.find(o => o.id === state);
|
|
14
|
+
const patch = SceneActions.getPatch(state);
|
|
15
|
+
return base && patch ? applySettingsPatch(base, patch) : base;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as ClipsRuntime } from './ClipsRuntime';
|
|
2
|
+
export type { RuntimeEvent, RuntimeEventType, DrivenSequence } from './ClipsRuntime';
|
|
3
|
+
export { default as ClipPlayer } from './ClipPlayer';
|
|
4
|
+
export type { ClipPlayerProps } from './ClipPlayer';
|
|
5
|
+
export * from './clipUtils';
|
|
6
|
+
export * from './sequenceUtils';
|
|
7
|
+
export * from './normalize';
|
|
8
|
+
export { applyValue, clearApplierCaches } from './appliers';
|
|
9
|
+
export type { ApplyContext } from './appliers';
|
|
10
|
+
export { readNodeValue, NODE_TRANSFORM_PATHS, NODE_MATERIAL_KEYS } from './nodeTracks';
|
|
11
|
+
export { resolveElementSettings, isEnvironmentState, ENVIRONMENT_STATES as CLIP_ENVIRONMENT_STATES } from './elementSettings';
|
|
12
|
+
export type { ElementSources } from './elementSettings';
|
|
13
|
+
export type { AnimationClip, Track as ClipTrack, Keyframe as ClipKeyframe, KeyValue as ClipKeyValue, EaseName as ClipEaseName, SequenceStep, StepClip, SequenceCue, AnimationSequence as ClipSequence, SequenceDriver, SequenceDriverSettings, } from './types';
|
|
14
|
+
export { DEFAULT_DRIVER_SETTINGS } from './types';
|
|
15
|
+
export { DEFAULT_EASE as CLIP_DEFAULT_EASE, FPS_PRESETS as CLIP_FPS_PRESETS } from './types';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animationsV2/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC9H,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EACR,aAAa,EAAE,KAAK,IAAI,SAAS,EAAE,QAAQ,IAAI,YAAY,EAAE,QAAQ,IAAI,YAAY,EAAE,QAAQ,IAAI,YAAY,EAC/G,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,IAAI,YAAY,EAAE,cAAc,EAAE,sBAAsB,GACjH,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Animations V2 runtime — clips, sequences, and the player. One ClipsRuntime
|
|
2
|
+
// instance serves the studio and the published viewer.
|
|
3
|
+
export { default as ClipsRuntime } from './ClipsRuntime.js';
|
|
4
|
+
export { default as ClipPlayer } from './ClipPlayer.js';
|
|
5
|
+
export * from './clipUtils.js';
|
|
6
|
+
export * from './sequenceUtils.js';
|
|
7
|
+
export * from './normalize.js';
|
|
8
|
+
export { applyValue, clearApplierCaches } from './appliers.js';
|
|
9
|
+
export { readNodeValue, NODE_TRANSFORM_PATHS, NODE_MATERIAL_KEYS } from './nodeTracks.js';
|
|
10
|
+
export { resolveElementSettings, isEnvironmentState, ENVIRONMENT_STATES as CLIP_ENVIRONMENT_STATES } from './elementSettings.js';
|
|
11
|
+
export { DEFAULT_DRIVER_SETTINGS } from './types.js';
|
|
12
|
+
export { DEFAULT_EASE as CLIP_DEFAULT_EASE, FPS_PRESETS as CLIP_FPS_PRESETS } from './types.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { KeyValue } from './types';
|
|
2
|
+
type Obj = any;
|
|
3
|
+
export declare const NODE_TRANSFORM_PATHS: readonly ["position", "rotation", "scale", "visible"];
|
|
4
|
+
export declare const NODE_MATERIAL_KEYS: readonly ["color", "opacity", "roughness", "metalness", "emissive", "emissiveIntensity"];
|
|
5
|
+
export declare function clearNodeCaches(): void;
|
|
6
|
+
export declare function nodesFor(state: string, node: string): Obj[];
|
|
7
|
+
/** The node's current value for a node-relative path (first match), as a key value. */
|
|
8
|
+
export declare function readNodeValue(state: string, node: string, path: string): KeyValue | undefined;
|
|
9
|
+
export declare function applyNodeValue(state: string, node: string, path: string, value: KeyValue): boolean;
|
|
10
|
+
/** Put a node track back: its snapshot, and the node's original materials once no material track remains. */
|
|
11
|
+
export declare function restoreNodeTrack(state: string, node: string, path: string, stillAnimated: (path: string) => boolean): void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=nodeTracks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeTracks.d.ts","sourceRoot":"","sources":["../../src/animationsV2/nodeTracks.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,KAAK,GAAG,GAAG,GAAG,CAAC;AAEf,eAAO,MAAM,oBAAoB,uDAAwD,CAAC;AAC1F,eAAO,MAAM,kBAAkB,0FAA2F,CAAC;AAa3H,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,EAAE,CAQ3D;AAUD,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAiB7F;AAoBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CA2BlG;AAED,6GAA6G;AAC7G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAiC1H"}
|