@3driseai/3drise-viewer 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animationsV2/ClipPlayer.d.ts.map +1 -1
- package/dist/animationsV2/ClipPlayer.js +13 -9
- package/dist/animationsV2/ClipsRuntime.d.ts +48 -3
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +239 -57
- package/dist/animationsV2/appliers.d.ts.map +1 -1
- package/dist/animationsV2/appliers.js +21 -5
- package/dist/animationsV2/clipUtils.js +1 -1
- package/dist/animationsV2/index.d.ts +1 -1
- package/dist/animationsV2/index.d.ts.map +1 -1
- package/dist/animationsV2/normalize.d.ts.map +1 -1
- package/dist/animationsV2/normalize.js +7 -3
- package/dist/animationsV2/sequenceUtils.d.ts +49 -6
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
- package/dist/animationsV2/sequenceUtils.js +68 -12
- package/dist/animationsV2/types.d.ts +28 -12
- package/dist/animationsV2/types.d.ts.map +1 -1
- package/dist/api/sceneHandle.d.ts +35 -1
- package/dist/api/sceneHandle.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +88 -17
- package/dist/components/AdvancedGrid.d.ts +1 -5
- package/dist/components/AdvancedGrid.d.ts.map +1 -1
- package/dist/components/AdvancedGrid.js +6 -35
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +9 -4
- package/dist/components/ApollonianGrid.d.ts +1 -1
- package/dist/components/ApollonianGrid.d.ts.map +1 -1
- package/dist/components/ApollonianGrid.js +3 -28
- package/dist/components/ChladniGrid.d.ts +1 -1
- package/dist/components/ChladniGrid.d.ts.map +1 -1
- package/dist/components/ChladniGrid.js +6 -35
- package/dist/components/CircuitGrid.d.ts +1 -1
- package/dist/components/CircuitGrid.d.ts.map +1 -1
- package/dist/components/CircuitGrid.js +6 -34
- package/dist/components/ConformalGrid.d.ts +1 -1
- package/dist/components/ConformalGrid.d.ts.map +1 -1
- package/dist/components/ConformalGrid.js +3 -34
- package/dist/components/ContourGrid.d.ts +1 -1
- package/dist/components/ContourGrid.d.ts.map +1 -1
- package/dist/components/ContourGrid.js +6 -34
- package/dist/components/CustomPrimitive.js +1 -1
- package/dist/components/EffectsGenerator.d.ts.map +1 -1
- package/dist/components/EffectsGenerator.js +43 -38
- package/dist/components/EnvironmentObject.d.ts.map +1 -1
- package/dist/components/EnvironmentObject.js +9 -7
- package/dist/components/FlowNetGrid.d.ts +1 -1
- package/dist/components/FlowNetGrid.d.ts.map +1 -1
- package/dist/components/FlowNetGrid.js +6 -34
- package/dist/components/FractalGrid.d.ts +1 -1
- package/dist/components/FractalGrid.d.ts.map +1 -1
- package/dist/components/FractalGrid.js +6 -37
- package/dist/components/Galaxy.d.ts.map +1 -1
- package/dist/components/Galaxy.js +9 -23
- package/dist/components/GeometryShape.d.ts.map +1 -1
- package/dist/components/GeometryShape.js +22 -2
- package/dist/components/GirihGrid.d.ts +1 -1
- package/dist/components/GirihGrid.d.ts.map +1 -1
- package/dist/components/GirihGrid.js +6 -35
- package/dist/components/GravWaveGrid.d.ts +1 -1
- package/dist/components/GravWaveGrid.d.ts.map +1 -1
- package/dist/components/GravWaveGrid.js +6 -35
- package/dist/components/HexGrid.d.ts +1 -5
- package/dist/components/HexGrid.d.ts.map +1 -1
- package/dist/components/HexGrid.js +6 -36
- package/dist/components/HilbertGrid.d.ts +1 -1
- package/dist/components/HilbertGrid.d.ts.map +1 -1
- package/dist/components/HilbertGrid.js +3 -30
- package/dist/components/HyperbolicGrid.d.ts +1 -1
- package/dist/components/HyperbolicGrid.d.ts.map +1 -1
- package/dist/components/HyperbolicGrid.js +6 -34
- package/dist/components/LandObject.d.ts +9 -0
- package/dist/components/LandObject.d.ts.map +1 -0
- package/dist/components/LandObject.js +15 -0
- package/dist/components/LensingGrid.d.ts +1 -1
- package/dist/components/LensingGrid.d.ts.map +1 -1
- package/dist/components/LensingGrid.js +3 -29
- package/dist/components/LightsManager.d.ts.map +1 -1
- package/dist/components/LightsManager.js +8 -0
- package/dist/components/ModelBoundary.d.ts +2 -0
- package/dist/components/ModelBoundary.d.ts.map +1 -1
- package/dist/components/ModelBoundary.js +3 -0
- package/dist/components/ModelPrimitive.d.ts.map +1 -1
- package/dist/components/ModelPrimitive.js +6 -0
- package/dist/components/MoireGrid.d.ts +1 -1
- package/dist/components/MoireGrid.d.ts.map +1 -1
- package/dist/components/MoireGrid.js +6 -35
- package/dist/components/MoonDisc.d.ts +11 -0
- package/dist/components/MoonDisc.d.ts.map +1 -0
- package/dist/components/MoonDisc.js +128 -0
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +10 -10
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +7 -5
- package/dist/components/OceanBuilder.d.ts.map +1 -1
- package/dist/components/OceanBuilder.js +2 -0
- package/dist/components/ParastichyGrid.d.ts +1 -1
- package/dist/components/ParastichyGrid.d.ts.map +1 -1
- package/dist/components/ParastichyGrid.js +3 -30
- package/dist/components/ParticlesGenerator.d.ts.map +1 -1
- package/dist/components/ParticlesGenerator.js +44 -24
- package/dist/components/PhyllotaxisGrid.d.ts +1 -1
- package/dist/components/PhyllotaxisGrid.d.ts.map +1 -1
- package/dist/components/PhyllotaxisGrid.js +3 -32
- package/dist/components/PickVolume.d.ts +17 -0
- package/dist/components/PickVolume.d.ts.map +1 -0
- package/dist/components/PickVolume.js +20 -0
- package/dist/components/ProjectLoader.d.ts +5 -3
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +6 -3
- package/dist/components/QuasiGrid.d.ts +1 -1
- package/dist/components/QuasiGrid.d.ts.map +1 -1
- package/dist/components/QuasiGrid.js +6 -33
- package/dist/components/RadarGrid.d.ts +1 -1
- package/dist/components/RadarGrid.d.ts.map +1 -1
- package/dist/components/RadarGrid.js +6 -34
- package/dist/components/ReactionDiffusionGrid.d.ts +1 -1
- package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
- package/dist/components/ReactionDiffusionGrid.js +6 -35
- package/dist/components/SceneBuilder.d.ts +25 -3
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +68 -38
- package/dist/components/SkyController.d.ts +25 -1
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +189 -130
- package/dist/components/SkyMesh.d.ts.map +1 -1
- package/dist/components/SkyMesh.js +26 -1
- package/dist/components/SkyStars.d.ts +11 -0
- package/dist/components/SkyStars.d.ts.map +1 -0
- package/dist/components/SkyStars.js +268 -0
- package/dist/components/SkySystem.d.ts +3 -3
- package/dist/components/SkySystem.d.ts.map +1 -1
- package/dist/components/SkySystem.js +8 -2
- package/dist/components/Sun.d.ts +15 -1
- package/dist/components/Sun.d.ts.map +1 -1
- package/dist/components/Sun.js +64 -3
- package/dist/components/SunLight.d.ts +6 -1
- package/dist/components/SunLight.d.ts.map +1 -1
- package/dist/components/SunLight.js +96 -44
- package/dist/components/TerrainBuilder.d.ts.map +1 -1
- package/dist/components/TerrainBuilder.js +2 -0
- package/dist/components/TextGenerator.d.ts +9 -0
- package/dist/components/TextGenerator.d.ts.map +1 -0
- package/dist/components/TextGenerator.js +30 -0
- package/dist/components/TruchetGrid.d.ts +1 -1
- package/dist/components/TruchetGrid.d.ts.map +1 -1
- package/dist/components/TruchetGrid.js +3 -30
- package/dist/components/VoronoiGrid.d.ts +1 -1
- package/dist/components/VoronoiGrid.d.ts.map +1 -1
- package/dist/components/VoronoiGrid.js +6 -33
- package/dist/components/WallpaperGrid.d.ts +1 -1
- package/dist/components/WallpaperGrid.d.ts.map +1 -1
- package/dist/components/WallpaperGrid.js +6 -35
- package/dist/components/environment/Rain.d.ts +15 -0
- package/dist/components/environment/Rain.d.ts.map +1 -0
- package/dist/components/environment/Rain.js +110 -0
- package/dist/components/environment/Rainbow.d.ts +20 -0
- package/dist/components/environment/Rainbow.d.ts.map +1 -0
- package/dist/components/environment/Rainbow.js +974 -0
- package/dist/components/environment/Sandstorm.d.ts +20 -0
- package/dist/components/environment/Sandstorm.d.ts.map +1 -0
- package/dist/components/environment/Sandstorm.js +776 -0
- package/dist/components/environment/Snow.d.ts +20 -0
- package/dist/components/environment/Snow.d.ts.map +1 -0
- package/dist/components/environment/Snow.js +609 -0
- package/dist/components/environment/Thunderstorm.d.ts +20 -0
- package/dist/components/environment/Thunderstorm.d.ts.map +1 -0
- package/dist/components/environment/Thunderstorm.js +731 -0
- package/dist/components/environment/Tornado.d.ts +20 -0
- package/dist/components/environment/Tornado.d.ts.map +1 -0
- package/dist/components/environment/Tornado.js +762 -0
- package/dist/components/environment/index.d.ts +13 -0
- package/dist/components/environment/index.d.ts.map +1 -0
- package/dist/components/environment/index.js +7 -0
- package/dist/components/index.d.ts +11 -18
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +9 -10
- package/dist/components/land/LandPatch.d.ts +15 -0
- package/dist/components/land/LandPatch.d.ts.map +1 -0
- package/dist/components/land/LandPatch.js +170 -0
- package/dist/components/land/index.d.ts +3 -0
- package/dist/components/land/index.d.ts.map +1 -0
- package/dist/components/land/index.js +1 -0
- package/dist/components/particles/BioluminescentWakeParticles.d.ts +5 -0
- package/dist/components/particles/BioluminescentWakeParticles.d.ts.map +1 -1
- package/dist/components/particles/BioluminescentWakeParticles.js +2 -1
- package/dist/components/particles/BrownianDustParticles.d.ts +5 -0
- package/dist/components/particles/BrownianDustParticles.d.ts.map +1 -1
- package/dist/components/particles/BrownianDustParticles.js +2 -0
- package/dist/components/particles/ChladniSandParticles.d.ts +5 -0
- package/dist/components/particles/ChladniSandParticles.d.ts.map +1 -1
- package/dist/components/particles/ChladniSandParticles.js +2 -1
- package/dist/components/particles/ElectronOrbitalsParticles.d.ts +5 -0
- package/dist/components/particles/ElectronOrbitalsParticles.d.ts.map +1 -1
- package/dist/components/particles/ElectronOrbitalsParticles.js +2 -1
- package/dist/components/particles/FaradayPowderParticles.d.ts +5 -0
- package/dist/components/particles/FaradayPowderParticles.d.ts.map +1 -1
- package/dist/components/particles/FaradayPowderParticles.js +2 -1
- package/dist/components/particles/GrinderSparksParticles.d.ts +5 -0
- package/dist/components/particles/GrinderSparksParticles.d.ts.map +1 -1
- package/dist/components/particles/GrinderSparksParticles.js +2 -1
- package/dist/components/particles/MagneticBottleParticles.d.ts +5 -0
- package/dist/components/particles/MagneticBottleParticles.d.ts.map +1 -1
- package/dist/components/particles/MagneticBottleParticles.js +2 -1
- package/dist/components/particles/NeonRainParticles.d.ts +5 -0
- package/dist/components/particles/NeonRainParticles.d.ts.map +1 -1
- package/dist/components/particles/NeonRainParticles.js +2 -1
- package/dist/components/particles/ShapeBurstParticles.d.ts +5 -0
- package/dist/components/particles/ShapeBurstParticles.d.ts.map +1 -1
- package/dist/components/particles/ShapeBurstParticles.js +2 -1
- package/dist/components/particles/ShapeFlowParticles.d.ts +5 -0
- package/dist/components/particles/ShapeFlowParticles.d.ts.map +1 -1
- package/dist/components/particles/ShapeFlowParticles.js +2 -1
- package/dist/components/particles/TidalStreamParticles.d.ts +5 -0
- package/dist/components/particles/TidalStreamParticles.d.ts.map +1 -1
- package/dist/components/particles/TidalStreamParticles.js +2 -0
- package/dist/components/space/Earth.d.ts +16 -0
- package/dist/components/space/Earth.d.ts.map +1 -0
- package/dist/components/space/Earth.js +75 -0
- package/dist/components/space/ShootingStar.d.ts +21 -0
- package/dist/components/space/ShootingStar.d.ts.map +1 -0
- package/dist/components/space/ShootingStar.js +101 -0
- package/dist/components/space/ShootingStars.d.ts +16 -0
- package/dist/components/space/ShootingStars.d.ts.map +1 -0
- package/dist/components/space/ShootingStars.js +71 -0
- package/dist/components/space/SolarSystem.d.ts +16 -0
- package/dist/components/space/SolarSystem.d.ts.map +1 -0
- package/dist/components/space/SolarSystem.js +141 -0
- package/dist/components/space/Stars.d.ts +20 -0
- package/dist/components/space/Stars.d.ts.map +1 -0
- package/dist/components/space/Stars.js +160 -0
- package/dist/components/space/index.d.ts +11 -0
- package/dist/components/space/index.d.ts.map +1 -0
- package/dist/components/space/index.js +8 -0
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +27 -3
- package/dist/components/terrain/types.d.ts +5 -1
- package/dist/components/terrain/types.d.ts.map +1 -1
- package/dist/components/text/BurnAwayText.d.ts +15 -0
- package/dist/components/text/BurnAwayText.d.ts.map +1 -0
- package/dist/components/text/BurnAwayText.js +4 -0
- package/dist/components/text/ChalkboardText.d.ts +15 -0
- package/dist/components/text/ChalkboardText.d.ts.map +1 -0
- package/dist/components/text/ChalkboardText.js +4 -0
- package/dist/components/text/ConstellationText.d.ts +15 -0
- package/dist/components/text/ConstellationText.d.ts.map +1 -0
- package/dist/components/text/ConstellationText.js +4 -0
- package/dist/components/text/EmbroideryText.d.ts +15 -0
- package/dist/components/text/EmbroideryText.d.ts.map +1 -0
- package/dist/components/text/EmbroideryText.js +4 -0
- package/dist/components/text/FourierSketchText.d.ts +15 -0
- package/dist/components/text/FourierSketchText.d.ts.map +1 -0
- package/dist/components/text/FourierSketchText.js +4 -0
- package/dist/components/text/FrostGrowthText.d.ts +15 -0
- package/dist/components/text/FrostGrowthText.d.ts.map +1 -0
- package/dist/components/text/FrostGrowthText.js +4 -0
- package/dist/components/text/HandwritingText.d.ts +15 -0
- package/dist/components/text/HandwritingText.d.ts.map +1 -0
- package/dist/components/text/HandwritingText.js +4 -0
- package/dist/components/text/InkBleedText.d.ts +15 -0
- package/dist/components/text/InkBleedText.d.ts.map +1 -0
- package/dist/components/text/InkBleedText.js +4 -0
- package/dist/components/text/LightPaintingText.d.ts +15 -0
- package/dist/components/text/LightPaintingText.d.ts.map +1 -0
- package/dist/components/text/LightPaintingText.js +4 -0
- package/dist/components/text/LiquidMetalText.d.ts +15 -0
- package/dist/components/text/LiquidMetalText.d.ts.map +1 -0
- package/dist/components/text/LiquidMetalText.js +4 -0
- package/dist/components/text/NeonTubeText.d.ts +15 -0
- package/dist/components/text/NeonTubeText.d.ts.map +1 -0
- package/dist/components/text/NeonTubeText.js +4 -0
- package/dist/components/text/PlainText.d.ts +15 -0
- package/dist/components/text/PlainText.d.ts.map +1 -0
- package/dist/components/text/PlainText.js +4 -0
- package/dist/components/text/PlasmaDischargeText.d.ts +15 -0
- package/dist/components/text/PlasmaDischargeText.d.ts.map +1 -0
- package/dist/components/text/PlasmaDischargeText.js +4 -0
- package/dist/components/text/TextObjectView.d.ts +14 -0
- package/dist/components/text/TextObjectView.d.ts.map +1 -0
- package/dist/components/text/TextObjectView.js +17 -0
- package/dist/components/text/engine/fieldkit.d.ts +24 -0
- package/dist/components/text/engine/fieldkit.d.ts.map +1 -0
- package/dist/components/text/engine/fieldkit.js +201 -0
- package/dist/components/text/engine/glyphs.d.ts +19 -0
- package/dist/components/text/engine/glyphs.d.ts.map +1 -0
- package/dist/components/text/engine/glyphs.js +269 -0
- package/dist/components/text/engine/looks/burnAway.d.ts +144 -0
- package/dist/components/text/engine/looks/burnAway.d.ts.map +1 -0
- package/dist/components/text/engine/looks/burnAway.js +593 -0
- package/dist/components/text/engine/looks/chalkboard.d.ts +135 -0
- package/dist/components/text/engine/looks/chalkboard.d.ts.map +1 -0
- package/dist/components/text/engine/looks/chalkboard.js +426 -0
- package/dist/components/text/engine/looks/constellation.d.ts +111 -0
- package/dist/components/text/engine/looks/constellation.d.ts.map +1 -0
- package/dist/components/text/engine/looks/constellation.js +496 -0
- package/dist/components/text/engine/looks/embroidery.d.ts +165 -0
- package/dist/components/text/engine/looks/embroidery.d.ts.map +1 -0
- package/dist/components/text/engine/looks/embroidery.js +645 -0
- package/dist/components/text/engine/looks/frostGrowth.d.ts +109 -0
- package/dist/components/text/engine/looks/frostGrowth.d.ts.map +1 -0
- package/dist/components/text/engine/looks/frostGrowth.js +727 -0
- package/dist/components/text/engine/looks/index.d.ts +2 -0
- package/dist/components/text/engine/looks/index.d.ts.map +1 -0
- package/dist/components/text/engine/looks/index.js +49 -0
- package/dist/components/text/engine/looks/inkBleed.d.ts +103 -0
- package/dist/components/text/engine/looks/inkBleed.d.ts.map +1 -0
- package/dist/components/text/engine/looks/inkBleed.js +590 -0
- package/dist/components/text/engine/looks/lightPainting.d.ts +132 -0
- package/dist/components/text/engine/looks/lightPainting.d.ts.map +1 -0
- package/dist/components/text/engine/looks/lightPainting.js +567 -0
- package/dist/components/text/engine/looks/liquidMetal.d.ts +135 -0
- package/dist/components/text/engine/looks/liquidMetal.d.ts.map +1 -0
- package/dist/components/text/engine/looks/liquidMetal.js +655 -0
- package/dist/components/text/engine/looks/plain.d.ts +146 -0
- package/dist/components/text/engine/looks/plain.d.ts.map +1 -0
- package/dist/components/text/engine/looks/plain.js +104 -0
- package/dist/components/text/engine/looks/plasmaDischarge.d.ts +126 -0
- package/dist/components/text/engine/looks/plasmaDischarge.d.ts.map +1 -0
- package/dist/components/text/engine/looks/plasmaDischarge.js +763 -0
- package/dist/components/text/engine/methods.d.ts +19 -0
- package/dist/components/text/engine/methods.d.ts.map +1 -0
- package/dist/components/text/engine/methods.js +126 -0
- package/dist/components/text/engine/playback.d.ts +40 -0
- package/dist/components/text/engine/playback.d.ts.map +1 -0
- package/dist/components/text/engine/playback.js +114 -0
- package/dist/components/text/engine/ribbon.d.ts +58 -0
- package/dist/components/text/engine/ribbon.d.ts.map +1 -0
- package/dist/components/text/engine/ribbon.js +250 -0
- package/dist/components/text/engine/variants.d.ts +159 -0
- package/dist/components/text/engine/variants.d.ts.map +1 -0
- package/dist/components/text/engine/variants.js +378 -0
- package/dist/components/text/fonts/architects-daughter.outline.d.ts +3 -0
- package/dist/components/text/fonts/architects-daughter.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/architects-daughter.outline.js +4 -0
- package/dist/components/text/fonts/architects-daughter.strokes.d.ts +3 -0
- package/dist/components/text/fonts/architects-daughter.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/architects-daughter.strokes.js +4 -0
- package/dist/components/text/fonts/bebas-neue.outline.d.ts +3 -0
- package/dist/components/text/fonts/bebas-neue.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/bebas-neue.outline.js +4 -0
- package/dist/components/text/fonts/bebas-neue.strokes.d.ts +3 -0
- package/dist/components/text/fonts/bebas-neue.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/bebas-neue.strokes.js +4 -0
- package/dist/components/text/fonts/caveat.outline.d.ts +3 -0
- package/dist/components/text/fonts/caveat.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/caveat.outline.js +4 -0
- package/dist/components/text/fonts/caveat.strokes.d.ts +3 -0
- package/dist/components/text/fonts/caveat.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/caveat.strokes.js +4 -0
- package/dist/components/text/fonts/courgette.outline.d.ts +3 -0
- package/dist/components/text/fonts/courgette.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/courgette.outline.js +4 -0
- package/dist/components/text/fonts/courgette.strokes.d.ts +3 -0
- package/dist/components/text/fonts/courgette.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/courgette.strokes.js +4 -0
- package/dist/components/text/fonts/dancing-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/dancing-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/dancing-script.outline.js +4 -0
- package/dist/components/text/fonts/dancing-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/dancing-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/dancing-script.strokes.js +4 -0
- package/dist/components/text/fonts/gochi-hand.outline.d.ts +3 -0
- package/dist/components/text/fonts/gochi-hand.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/gochi-hand.outline.js +4 -0
- package/dist/components/text/fonts/gochi-hand.strokes.d.ts +3 -0
- package/dist/components/text/fonts/gochi-hand.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/gochi-hand.strokes.js +4 -0
- package/dist/components/text/fonts/handlee.outline.d.ts +3 -0
- package/dist/components/text/fonts/handlee.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/handlee.outline.js +4 -0
- package/dist/components/text/fonts/handlee.strokes.d.ts +3 -0
- package/dist/components/text/fonts/handlee.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/handlee.strokes.js +4 -0
- package/dist/components/text/fonts/index.d.ts +5 -0
- package/dist/components/text/fonts/index.d.ts.map +1 -0
- package/dist/components/text/fonts/index.js +58 -0
- package/dist/components/text/fonts/indie-flower.outline.d.ts +3 -0
- package/dist/components/text/fonts/indie-flower.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/indie-flower.outline.js +4 -0
- package/dist/components/text/fonts/indie-flower.strokes.d.ts +3 -0
- package/dist/components/text/fonts/indie-flower.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/indie-flower.strokes.js +4 -0
- package/dist/components/text/fonts/inter.outline.d.ts +3 -0
- package/dist/components/text/fonts/inter.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/inter.outline.js +4 -0
- package/dist/components/text/fonts/inter.strokes.d.ts +3 -0
- package/dist/components/text/fonts/inter.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/inter.strokes.js +4 -0
- package/dist/components/text/fonts/kalam.outline.d.ts +3 -0
- package/dist/components/text/fonts/kalam.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/kalam.outline.js +4 -0
- package/dist/components/text/fonts/kalam.strokes.d.ts +3 -0
- package/dist/components/text/fonts/kalam.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/kalam.strokes.js +4 -0
- package/dist/components/text/fonts/kaushan-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/kaushan-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/kaushan-script.outline.js +4 -0
- package/dist/components/text/fonts/kaushan-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/kaushan-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/kaushan-script.strokes.js +4 -0
- package/dist/components/text/fonts/lora.outline.d.ts +3 -0
- package/dist/components/text/fonts/lora.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/lora.outline.js +4 -0
- package/dist/components/text/fonts/lora.strokes.d.ts +3 -0
- package/dist/components/text/fonts/lora.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/lora.strokes.js +4 -0
- package/dist/components/text/fonts/montserrat.outline.d.ts +3 -0
- package/dist/components/text/fonts/montserrat.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/montserrat.outline.js +4 -0
- package/dist/components/text/fonts/montserrat.strokes.d.ts +3 -0
- package/dist/components/text/fonts/montserrat.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/montserrat.strokes.js +4 -0
- package/dist/components/text/fonts/mynerve.outline.d.ts +3 -0
- package/dist/components/text/fonts/mynerve.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/mynerve.outline.js +4 -0
- package/dist/components/text/fonts/mynerve.strokes.d.ts +3 -0
- package/dist/components/text/fonts/mynerve.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/mynerve.strokes.js +4 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.js +4 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.js +4 -0
- package/dist/components/text/fonts/oswald.outline.d.ts +3 -0
- package/dist/components/text/fonts/oswald.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/oswald.outline.js +4 -0
- package/dist/components/text/fonts/oswald.strokes.d.ts +3 -0
- package/dist/components/text/fonts/oswald.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/oswald.strokes.js +4 -0
- package/dist/components/text/fonts/pacifico.outline.d.ts +3 -0
- package/dist/components/text/fonts/pacifico.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/pacifico.outline.js +4 -0
- package/dist/components/text/fonts/pacifico.strokes.d.ts +3 -0
- package/dist/components/text/fonts/pacifico.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/pacifico.strokes.js +4 -0
- package/dist/components/text/fonts/patrick-hand.outline.d.ts +3 -0
- package/dist/components/text/fonts/patrick-hand.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/patrick-hand.outline.js +4 -0
- package/dist/components/text/fonts/patrick-hand.strokes.d.ts +3 -0
- package/dist/components/text/fonts/patrick-hand.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/patrick-hand.strokes.js +4 -0
- package/dist/components/text/fonts/playfair-display.outline.d.ts +3 -0
- package/dist/components/text/fonts/playfair-display.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/playfair-display.outline.js +4 -0
- package/dist/components/text/fonts/playfair-display.strokes.d.ts +3 -0
- package/dist/components/text/fonts/playfair-display.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/playfair-display.strokes.js +4 -0
- package/dist/components/text/fonts/poppins.outline.d.ts +3 -0
- package/dist/components/text/fonts/poppins.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/poppins.outline.js +4 -0
- package/dist/components/text/fonts/poppins.strokes.d.ts +3 -0
- package/dist/components/text/fonts/poppins.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/poppins.strokes.js +4 -0
- package/dist/components/text/fonts/roboto.outline.d.ts +3 -0
- package/dist/components/text/fonts/roboto.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/roboto.outline.js +4 -0
- package/dist/components/text/fonts/roboto.strokes.d.ts +3 -0
- package/dist/components/text/fonts/roboto.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/roboto.strokes.js +4 -0
- package/dist/components/text/fonts/satisfy.outline.d.ts +3 -0
- package/dist/components/text/fonts/satisfy.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/satisfy.outline.js +4 -0
- package/dist/components/text/fonts/satisfy.strokes.d.ts +3 -0
- package/dist/components/text/fonts/satisfy.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/satisfy.strokes.js +4 -0
- package/dist/components/text/fonts/sriracha.outline.d.ts +3 -0
- package/dist/components/text/fonts/sriracha.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/sriracha.outline.js +4 -0
- package/dist/components/text/fonts/sriracha.strokes.d.ts +3 -0
- package/dist/components/text/fonts/sriracha.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/sriracha.strokes.js +4 -0
- package/dist/components/text/index.d.ts +29 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +14 -0
- package/dist/components/text/useTextObject.d.ts +22 -0
- package/dist/components/text/useTextObject.d.ts.map +1 -0
- package/dist/components/text/useTextObject.js +130 -0
- package/dist/components/water/OceanSurface.d.ts.map +1 -1
- package/dist/components/water/OceanSurface.js +3 -1
- package/dist/components/water/WaterBody.d.ts.map +1 -1
- package/dist/components/water/WaterBody.js +3 -1
- package/dist/components/water/types.d.ts +5 -1
- package/dist/components/water/types.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useCloudSun.d.ts +9 -4
- package/dist/hooks/useCloudSun.d.ts.map +1 -1
- package/dist/hooks/useCloudSun.js +17 -7
- package/dist/hooks/useConfigLive.d.ts +3 -2
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.js +4 -10
- package/dist/hooks/useEnvironmentProbe.d.ts +3 -22
- package/dist/hooks/useEnvironmentProbe.d.ts.map +1 -1
- package/dist/hooks/useEnvironmentProbe.js +47 -8
- package/dist/hooks/useGridSurface.d.ts +3 -10
- package/dist/hooks/useGridSurface.d.ts.map +1 -1
- package/dist/hooks/useGridSurface.js +5 -31
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +19 -72
- package/dist/hooks/useLightConfig.d.ts +2 -1
- package/dist/hooks/useLightConfig.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.d.ts +6 -2
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +37 -2
- package/dist/hooks/useSkyLive.d.ts +23 -0
- package/dist/hooks/useSkyLive.d.ts.map +1 -0
- package/dist/hooks/useSkyLive.js +30 -0
- package/dist/hooks/useSkyUniforms.d.ts.map +1 -1
- package/dist/hooks/useSkyUniforms.js +2 -10
- package/dist/hooks/useTerrainLive.d.ts +3 -1
- package/dist/hooks/useTerrainLive.d.ts.map +1 -1
- package/dist/hooks/useTerrainTextures.d.ts +38 -0
- package/dist/hooks/useTerrainTextures.d.ts.map +1 -0
- package/dist/hooks/useTerrainTextures.js +149 -0
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/operations/catalogue/blastOff.d.ts +3 -0
- package/dist/operations/catalogue/blastOff.d.ts.map +1 -0
- package/dist/operations/catalogue/blastOff.js +118 -0
- package/dist/operations/catalogue/bounce.d.ts +3 -0
- package/dist/operations/catalogue/bounce.d.ts.map +1 -0
- package/dist/operations/catalogue/bounce.js +34 -0
- package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -1
- package/dist/operations/catalogue/curlSmoke.js +3 -1
- package/dist/operations/catalogue/dissolve.d.ts.map +1 -1
- package/dist/operations/catalogue/dissolve.js +2 -1
- package/dist/operations/catalogue/driftUp.d.ts +3 -0
- package/dist/operations/catalogue/driftUp.d.ts.map +1 -0
- package/dist/operations/catalogue/driftUp.js +57 -0
- package/dist/operations/catalogue/emberAsh.d.ts.map +1 -1
- package/dist/operations/catalogue/emberAsh.js +2 -1
- package/dist/operations/catalogue/flip.d.ts.map +1 -1
- package/dist/operations/catalogue/flip.js +19 -9
- package/dist/operations/catalogue/float.d.ts +3 -0
- package/dist/operations/catalogue/float.d.ts.map +1 -0
- package/dist/operations/catalogue/float.js +39 -0
- package/dist/operations/catalogue/flock.d.ts.map +1 -1
- package/dist/operations/catalogue/flock.js +44 -9
- package/dist/operations/catalogue/flyBy.d.ts +3 -0
- package/dist/operations/catalogue/flyBy.d.ts.map +1 -0
- package/dist/operations/catalogue/flyBy.js +79 -0
- package/dist/operations/catalogue/frost.d.ts.map +1 -1
- package/dist/operations/catalogue/frost.js +10 -3
- package/dist/operations/catalogue/grow.d.ts +3 -0
- package/dist/operations/catalogue/grow.d.ts.map +1 -0
- package/dist/operations/catalogue/grow.js +19 -0
- package/dist/operations/catalogue/hologram.d.ts.map +1 -1
- package/dist/operations/catalogue/hologram.js +11 -5
- package/dist/operations/catalogue/inkBloom.d.ts.map +1 -1
- package/dist/operations/catalogue/inkBloom.js +46 -9
- package/dist/operations/catalogue/jelly.d.ts.map +1 -1
- package/dist/operations/catalogue/jelly.js +18 -8
- package/dist/operations/catalogue/knockAway.d.ts +3 -0
- package/dist/operations/catalogue/knockAway.d.ts.map +1 -0
- package/dist/operations/catalogue/knockAway.js +74 -0
- package/dist/operations/catalogue/leafFall.d.ts +3 -0
- package/dist/operations/catalogue/leafFall.d.ts.map +1 -0
- package/dist/operations/catalogue/leafFall.js +74 -0
- package/dist/operations/catalogue/lidarScan.d.ts.map +1 -1
- package/dist/operations/catalogue/lidarScan.js +4 -1
- package/dist/operations/catalogue/liquidMetal.d.ts.map +1 -1
- package/dist/operations/catalogue/liquidMetal.js +41 -12
- package/dist/operations/catalogue/metalize.d.ts.map +1 -1
- package/dist/operations/catalogue/metalize.js +8 -2
- package/dist/operations/catalogue/motionTrail.d.ts +6 -0
- package/dist/operations/catalogue/motionTrail.d.ts.map +1 -0
- package/dist/operations/catalogue/motionTrail.js +221 -0
- package/dist/operations/catalogue/particleSwarm.d.ts.map +1 -1
- package/dist/operations/catalogue/particleSwarm.js +29 -9
- package/dist/operations/catalogue/petalPeel.d.ts.map +1 -1
- package/dist/operations/catalogue/petalPeel.js +33 -9
- package/dist/operations/catalogue/petrify.d.ts.map +1 -1
- package/dist/operations/catalogue/petrify.js +9 -3
- package/dist/operations/catalogue/physicalExit.d.ts +55 -0
- package/dist/operations/catalogue/physicalExit.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalExit.js +165 -0
- package/dist/operations/catalogue/physicalHeld.d.ts +41 -0
- package/dist/operations/catalogue/physicalHeld.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalHeld.js +78 -0
- package/dist/operations/catalogue/physicalMix.d.ts +45 -0
- package/dist/operations/catalogue/physicalMix.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalMix.js +144 -0
- package/dist/operations/catalogue/pop.d.ts +3 -0
- package/dist/operations/catalogue/pop.d.ts.map +1 -0
- package/dist/operations/catalogue/pop.js +44 -0
- package/dist/operations/catalogue/portal.d.ts.map +1 -1
- package/dist/operations/catalogue/portal.js +33 -11
- package/dist/operations/catalogue/print3d.d.ts.map +1 -1
- package/dist/operations/catalogue/print3d.js +5 -1
- package/dist/operations/catalogue/pulse.d.ts +3 -0
- package/dist/operations/catalogue/pulse.d.ts.map +1 -0
- package/dist/operations/catalogue/pulse.js +29 -0
- package/dist/operations/catalogue/restPose.d.ts +5 -7
- package/dist/operations/catalogue/restPose.d.ts.map +1 -1
- package/dist/operations/catalogue/restPose.js +18 -48
- package/dist/operations/catalogue/rotate.d.ts +3 -0
- package/dist/operations/catalogue/rotate.d.ts.map +1 -0
- package/dist/operations/catalogue/rotate.js +49 -0
- package/dist/operations/catalogue/sandErosion.d.ts.map +1 -1
- package/dist/operations/catalogue/sandErosion.js +36 -14
- package/dist/operations/catalogue/shake.d.ts +3 -0
- package/dist/operations/catalogue/shake.d.ts.map +1 -0
- package/dist/operations/catalogue/shake.js +31 -0
- package/dist/operations/catalogue/shatter.d.ts.map +1 -1
- package/dist/operations/catalogue/shatter.js +5 -1
- package/dist/operations/catalogue/slam.d.ts +3 -0
- package/dist/operations/catalogue/slam.d.ts.map +1 -0
- package/dist/operations/catalogue/slam.js +89 -0
- package/dist/operations/catalogue/slingshot.d.ts +3 -0
- package/dist/operations/catalogue/slingshot.d.ts.map +1 -0
- package/dist/operations/catalogue/slingshot.js +88 -0
- package/dist/operations/catalogue/spin.d.ts.map +1 -1
- package/dist/operations/catalogue/spin.js +24 -13
- package/dist/operations/catalogue/sway.d.ts +3 -0
- package/dist/operations/catalogue/sway.d.ts.map +1 -0
- package/dist/operations/catalogue/sway.js +23 -0
- package/dist/operations/catalogue/swirl.d.ts.map +1 -1
- package/dist/operations/catalogue/swirl.js +6 -5
- package/dist/operations/catalogue/teleport.d.ts.map +1 -1
- package/dist/operations/catalogue/teleport.js +43 -12
- package/dist/operations/catalogue/trailCore.d.ts +89 -0
- package/dist/operations/catalogue/trailCore.d.ts.map +1 -0
- package/dist/operations/catalogue/trailCore.js +190 -0
- package/dist/operations/catalogue/trailGhosts.d.ts +5 -0
- package/dist/operations/catalogue/trailGhosts.d.ts.map +1 -0
- package/dist/operations/catalogue/trailGhosts.js +179 -0
- package/dist/operations/catalogue/trailStampStyles.d.ts +11 -0
- package/dist/operations/catalogue/trailStampStyles.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStampStyles.js +479 -0
- package/dist/operations/catalogue/trailStamps.d.ts +57 -0
- package/dist/operations/catalogue/trailStamps.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStamps.js +349 -0
- package/dist/operations/catalogue/trailStreaks.d.ts +3 -0
- package/dist/operations/catalogue/trailStreaks.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStreaks.js +147 -0
- package/dist/operations/catalogue/transitionField.d.ts +30 -0
- package/dist/operations/catalogue/transitionField.d.ts.map +1 -1
- package/dist/operations/catalogue/transitionField.js +21 -0
- package/dist/operations/catalogue/turnAway.d.ts +3 -0
- package/dist/operations/catalogue/turnAway.d.ts.map +1 -0
- package/dist/operations/catalogue/turnAway.js +54 -0
- package/dist/operations/catalogue/unweave.d.ts.map +1 -1
- package/dist/operations/catalogue/unweave.js +34 -15
- package/dist/operations/catalogue/vortexDrain.d.ts +3 -0
- package/dist/operations/catalogue/vortexDrain.d.ts.map +1 -0
- package/dist/operations/catalogue/vortexDrain.js +68 -0
- package/dist/operations/catalogue/voxelize.d.ts.map +1 -1
- package/dist/operations/catalogue/voxelize.js +37 -10
- package/dist/operations/catalogue/warp.d.ts +3 -0
- package/dist/operations/catalogue/warp.d.ts.map +1 -0
- package/dist/operations/catalogue/warp.js +73 -0
- package/dist/operations/catalogue/whoosh.d.ts +3 -0
- package/dist/operations/catalogue/whoosh.d.ts.map +1 -0
- package/dist/operations/catalogue/whoosh.js +84 -0
- package/dist/operations/catalogue/wobble.d.ts +3 -0
- package/dist/operations/catalogue/wobble.d.ts.map +1 -0
- package/dist/operations/catalogue/wobble.js +23 -0
- package/dist/operations/clipPreview.d.ts +3 -0
- package/dist/operations/clipPreview.d.ts.map +1 -0
- package/dist/operations/clipPreview.js +20 -0
- package/dist/operations/groupFanout.d.ts +96 -0
- package/dist/operations/groupFanout.d.ts.map +1 -0
- package/dist/operations/groupFanout.js +365 -0
- package/dist/operations/groups.d.ts +20 -0
- package/dist/operations/groups.d.ts.map +1 -0
- package/dist/operations/groups.js +66 -0
- package/dist/operations/index.d.ts +5 -2
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +5 -2
- package/dist/operations/objectEffects.d.ts +161 -6
- package/dist/operations/objectEffects.d.ts.map +1 -1
- package/dist/operations/objectEffects.js +1091 -17
- package/dist/operations/registry.d.ts.map +1 -1
- package/dist/operations/registry.js +24 -2
- package/dist/operations/runtime.d.ts +57 -2
- package/dist/operations/runtime.d.ts.map +1 -1
- package/dist/operations/runtime.js +161 -18
- package/dist/operations/types.d.ts +60 -3
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +5 -1
- package/dist/operations/useObjectEffectLayers.d.ts +2 -2
- package/dist/operations/useObjectEffectLayers.d.ts.map +1 -1
- package/dist/operations/useObjectEffectLayers.js +31 -10
- package/dist/operations/usePresentedVisibility.d.ts +10 -0
- package/dist/operations/usePresentedVisibility.d.ts.map +1 -0
- package/dist/operations/usePresentedVisibility.js +53 -0
- package/dist/presets/terrainBiomes.d.ts +67 -0
- package/dist/presets/terrainBiomes.d.ts.map +1 -0
- package/dist/presets/terrainBiomes.js +294 -0
- package/dist/presets/terrainPresets.d.ts +6 -0
- package/dist/presets/terrainPresets.d.ts.map +1 -1
- package/dist/presets/terrainPresets.js +26 -38
- package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
- package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/oceanCore.glsl.js +17 -0
- package/dist/shaders/glsl/surfaceCore.glsl.d.ts +21 -0
- package/dist/shaders/glsl/surfaceCore.glsl.d.ts.map +1 -0
- package/dist/shaders/glsl/surfaceCore.glsl.js +120 -0
- package/dist/shaders/glsl/terrainCore.glsl.d.ts +16 -3
- package/dist/shaders/glsl/terrainCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/terrainCore.glsl.js +266 -20
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +2 -0
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
- package/dist/shaders/ocean/OceanSurfaceMaterial.js +3 -0
- package/dist/shaders/terrain/TerrainMaterial.d.ts +17 -0
- package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
- package/dist/shaders/terrain/TerrainMaterial.js +107 -8
- package/dist/triggers/engine.d.ts +44 -0
- package/dist/triggers/engine.d.ts.map +1 -0
- package/dist/triggers/engine.js +168 -0
- package/dist/triggers/hosts/actions.d.ts +8 -0
- package/dist/triggers/hosts/actions.d.ts.map +1 -0
- package/dist/triggers/hosts/actions.js +22 -0
- package/dist/triggers/hosts/interactions.d.ts +6 -0
- package/dist/triggers/hosts/interactions.d.ts.map +1 -0
- package/dist/triggers/hosts/interactions.js +4 -0
- package/dist/triggers/hosts/timelineCues.d.ts +2 -0
- package/dist/triggers/hosts/timelineCues.d.ts.map +1 -0
- package/dist/triggers/hosts/timelineCues.js +22 -0
- package/dist/triggers/index.d.ts +13 -0
- package/dist/triggers/index.d.ts.map +1 -0
- package/dist/triggers/index.js +9 -0
- package/dist/triggers/kinds/action.d.ts +2 -0
- package/dist/triggers/kinds/action.d.ts.map +1 -0
- package/dist/triggers/kinds/action.js +31 -0
- package/dist/triggers/kinds/animations.d.ts +2 -0
- package/dist/triggers/kinds/animations.d.ts.map +1 -0
- package/dist/triggers/kinds/animations.js +75 -0
- package/dist/triggers/kinds/effects.d.ts +2 -0
- package/dist/triggers/kinds/effects.d.ts.map +1 -0
- package/dist/triggers/kinds/effects.js +27 -0
- package/dist/triggers/kinds/index.d.ts +4 -0
- package/dist/triggers/kinds/index.d.ts.map +1 -0
- package/dist/triggers/kinds/index.js +4 -0
- package/dist/triggers/log.d.ts +21 -0
- package/dist/triggers/log.d.ts.map +1 -0
- package/dist/triggers/log.js +43 -0
- package/dist/triggers/readiness.d.ts +40 -0
- package/dist/triggers/readiness.d.ts.map +1 -0
- package/dist/triggers/readiness.js +158 -0
- package/dist/triggers/registry.d.ts +41 -0
- package/dist/triggers/registry.d.ts.map +1 -0
- package/dist/triggers/registry.js +7 -0
- package/dist/types/gridConfigs.d.ts +18 -23
- package/dist/types/gridConfigs.d.ts.map +1 -1
- package/dist/ui/UiAnchorUpdater.d.ts +10 -0
- package/dist/ui/UiAnchorUpdater.d.ts.map +1 -0
- package/dist/ui/UiAnchorUpdater.js +111 -0
- package/dist/ui/UiLayers.d.ts +20 -0
- package/dist/ui/UiLayers.d.ts.map +1 -0
- package/dist/ui/UiLayers.js +57 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/uiAnchors.d.ts +21 -0
- package/dist/ui/uiAnchors.d.ts.map +1 -0
- package/dist/ui/uiAnchors.js +22 -0
- package/dist/ui/uiBaseStyles.d.ts +2 -0
- package/dist/ui/uiBaseStyles.d.ts.map +1 -0
- package/dist/ui/uiBaseStyles.js +100 -0
- package/dist/ui/uiBinder.d.ts +30 -0
- package/dist/ui/uiBinder.d.ts.map +1 -0
- package/dist/ui/uiBinder.js +344 -0
- package/dist/utils/configAnimations.d.ts.map +1 -1
- package/dist/utils/configAnimations.js +5 -1
- package/dist/utils/gridConfig.d.ts +1 -1
- package/dist/utils/gridConfig.d.ts.map +1 -1
- package/dist/utils/gridConfig.js +1 -1
- package/dist/utils/landPatch.d.ts +33 -0
- package/dist/utils/landPatch.d.ts.map +1 -0
- package/dist/utils/landPatch.js +114 -0
- package/dist/utils/pickProxy.d.ts +11 -0
- package/dist/utils/pickProxy.d.ts.map +1 -0
- package/dist/utils/pickProxy.js +36 -0
- package/dist/utils/renderedSky.d.ts +32 -0
- package/dist/utils/renderedSky.d.ts.map +1 -0
- package/dist/utils/renderedSky.js +57 -0
- package/dist/utils/shapes.d.ts +4 -0
- package/dist/utils/shapes.d.ts.map +1 -1
- package/dist/utils/shapes.js +4 -1
- package/dist/utils/skyMoon.d.ts +35 -0
- package/dist/utils/skyMoon.d.ts.map +1 -0
- package/dist/utils/skyMoon.js +41 -0
- package/dist/utils/terrainHeight.d.ts +4 -0
- package/dist/utils/terrainHeight.d.ts.map +1 -0
- package/dist/utils/terrainHeight.js +150 -0
- package/dist/utils/terrainTextureResolver.d.ts +18 -0
- package/dist/utils/terrainTextureResolver.d.ts.map +1 -0
- package/dist/utils/terrainTextureResolver.js +17 -0
- package/dist/utils/terrainUniforms.d.ts +17 -0
- package/dist/utils/terrainUniforms.d.ts.map +1 -1
- package/dist/utils/terrainUniforms.js +84 -0
- package/dist/utils/textShape.d.ts +24 -0
- package/dist/utils/textShape.d.ts.map +1 -0
- package/dist/utils/textShape.js +102 -0
- package/dist/utils/textureArrays.d.ts +29 -0
- package/dist/utils/textureArrays.d.ts.map +1 -0
- package/dist/utils/textureArrays.js +140 -0
- package/package.json +2 -2
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
key: string;
|
|
4
|
+
source: string;
|
|
5
|
+
drawMethods: string[];
|
|
6
|
+
eraseMethods: string[];
|
|
7
|
+
drawDefault: string;
|
|
8
|
+
eraseDefault: string;
|
|
9
|
+
methodInfo: {
|
|
10
|
+
smudge: {
|
|
11
|
+
label: string;
|
|
12
|
+
hint: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
catalog: {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
tags: string[];
|
|
19
|
+
};
|
|
20
|
+
defaults: {
|
|
21
|
+
pressure: number;
|
|
22
|
+
chatter: number;
|
|
23
|
+
grain: number;
|
|
24
|
+
weight: number;
|
|
25
|
+
dust: number;
|
|
26
|
+
ghost: number;
|
|
27
|
+
swing: number;
|
|
28
|
+
board: number;
|
|
29
|
+
opacity: number;
|
|
30
|
+
color: string;
|
|
31
|
+
color2: string;
|
|
32
|
+
};
|
|
33
|
+
ui: {
|
|
34
|
+
main: {
|
|
35
|
+
unit?: any;
|
|
36
|
+
name: any;
|
|
37
|
+
label: any;
|
|
38
|
+
description: any;
|
|
39
|
+
type: string;
|
|
40
|
+
min: any;
|
|
41
|
+
max: any;
|
|
42
|
+
step: any;
|
|
43
|
+
}[];
|
|
44
|
+
more: ({
|
|
45
|
+
unit?: any;
|
|
46
|
+
name: any;
|
|
47
|
+
label: any;
|
|
48
|
+
description: any;
|
|
49
|
+
type: string;
|
|
50
|
+
min: any;
|
|
51
|
+
max: any;
|
|
52
|
+
step: any;
|
|
53
|
+
} | {
|
|
54
|
+
name: string;
|
|
55
|
+
label: string;
|
|
56
|
+
description: string;
|
|
57
|
+
type: string;
|
|
58
|
+
})[];
|
|
59
|
+
};
|
|
60
|
+
structural: any[];
|
|
61
|
+
presets: ({
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
patch: {
|
|
65
|
+
pressure?: undefined;
|
|
66
|
+
grain?: undefined;
|
|
67
|
+
dust?: undefined;
|
|
68
|
+
weight?: undefined;
|
|
69
|
+
ghost?: undefined;
|
|
70
|
+
board?: undefined;
|
|
71
|
+
color?: undefined;
|
|
72
|
+
color2?: undefined;
|
|
73
|
+
};
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
patch: {
|
|
78
|
+
pressure: number;
|
|
79
|
+
grain: number;
|
|
80
|
+
dust: number;
|
|
81
|
+
weight: number;
|
|
82
|
+
ghost?: undefined;
|
|
83
|
+
board?: undefined;
|
|
84
|
+
color?: undefined;
|
|
85
|
+
color2?: undefined;
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
patch: {
|
|
91
|
+
pressure: number;
|
|
92
|
+
grain: number;
|
|
93
|
+
dust: number;
|
|
94
|
+
weight: number;
|
|
95
|
+
ghost: number;
|
|
96
|
+
board?: undefined;
|
|
97
|
+
color?: undefined;
|
|
98
|
+
color2?: undefined;
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
name: string;
|
|
102
|
+
description: string;
|
|
103
|
+
patch: {
|
|
104
|
+
board: number;
|
|
105
|
+
ghost: number;
|
|
106
|
+
pressure: number;
|
|
107
|
+
color: string;
|
|
108
|
+
grain?: undefined;
|
|
109
|
+
dust?: undefined;
|
|
110
|
+
weight?: undefined;
|
|
111
|
+
color2?: undefined;
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
name: string;
|
|
115
|
+
description: string;
|
|
116
|
+
patch: {
|
|
117
|
+
color: string;
|
|
118
|
+
color2: string;
|
|
119
|
+
pressure: number;
|
|
120
|
+
grain?: undefined;
|
|
121
|
+
dust?: undefined;
|
|
122
|
+
weight?: undefined;
|
|
123
|
+
ghost?: undefined;
|
|
124
|
+
board?: undefined;
|
|
125
|
+
};
|
|
126
|
+
})[];
|
|
127
|
+
build(layout: any, cfg: any, anim: any): {
|
|
128
|
+
object: THREE.Group<THREE.Object3DEventMap>;
|
|
129
|
+
apply(c: any): void;
|
|
130
|
+
update(S: any, time: any, px: any): void;
|
|
131
|
+
dispose(): void;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export default _default;
|
|
135
|
+
//# sourceMappingURL=chalkboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chalkboard.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/engine/looks/chalkboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyQ/B,wBAkHE"}
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { REVEAL_UNIFORMS, setReveal } from '../ribbon.js';
|
|
3
|
+
import { prepare, applyAnim, extentOf, DRAW_METHODS, ERASE_METHODS } from '../methods.js';
|
|
4
|
+
import { buildField, fieldMaterial, fieldQuad } from '../fieldkit.js';
|
|
5
|
+
const hex = (h) => new THREE.Color(h);
|
|
6
|
+
const mulberry32 = (a) => () => { a |= 0; a = (a + 0x6D2B79F5) | 0; let t = Math.imul(a ^ (a >>> 15), 1 | a); t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t; return ((t ^ (t >>> 14)) >>> 0) / 4294967296; };
|
|
7
|
+
// =========================================================================================
|
|
8
|
+
// chalkboard — chalk on slate.
|
|
9
|
+
//
|
|
10
|
+
// THE MATHS. The board is a fixed height field H(p) (fractal gradient noise, 5 octaves from 0.07 em down to 0.005 em, plus
|
|
11
|
+
// thin directional scratch grooves), anchored in glyph space: it is the board, it never moves. A stick of chalk drags over
|
|
12
|
+
// it and leaves a deposit thickness T(p) = pressure * profile(distance to the pen path) * streaks. Chalk lodges on the
|
|
13
|
+
// highest spots first and only fills the valleys as T grows, so the covered fraction is
|
|
14
|
+
// coverage = smoothstep( T - (1 - H) * depthScale )
|
|
15
|
+
// i.e. the level set {H > 1 - T} of the same relief. Light pressure -> only the peaks catch (broken, grainy line); heavy
|
|
16
|
+
// pressure -> every valley fills (nearly solid). The profile has a soft shoulder plus an exponential tail: the tail is far
|
|
17
|
+
// below the valley depth, so only the highest peaks catch it, which IS the powdery dust halo (low-density speckle that falls
|
|
18
|
+
// off over a short distance). Pressure per point = pen pressure (slow = pressed hard) mixed with the stroke width factor.
|
|
19
|
+
// Alpha is coverage times a thickness term (thin film is translucent, the slate shows through); colour moves from a warm
|
|
20
|
+
// dim shade (thin) to a bluish-white highlight (thick), brightened by the relief height (peaks catch more).
|
|
21
|
+
//
|
|
22
|
+
// ERASE (smudge). A felt swipes along a seeded direction: the band is the wipe sweep g(p), exact per pixel. Inside the band
|
|
23
|
+
// the chalk is dragged along the swipe: the deposit thickness is replaced by the mean stroke density sampled along the
|
|
24
|
+
// swipe direction (anisotropic blur, 10 taps from the signed-distance field), thinned to a ghost film that is read through
|
|
25
|
+
// the same relief (grainy haze). The ghost fades out over the last 30 percent of the erase, so S.e = 1 is fully clean.
|
|
26
|
+
//
|
|
27
|
+
// FALLING DUST. Per stroke, 36 particles are born on the pen path (weighted by pressure) at the moment the pen passes; their
|
|
28
|
+
// position is a closed form of (time since birth): drag-limited fall + slow drift, fade in/out.
|
|
29
|
+
//
|
|
30
|
+
// IDLE. Mineral crystals in the chalk are cells fixed on the board; each has a facet angle, and a light whose angle sweeps
|
|
31
|
+
// slowly (with a phase that travels across the board) makes a crystal flash when facet and light line up: tiny sparkles
|
|
32
|
+
// glinting at different times. Freshly written lines also settle slowly from brighter to normal.
|
|
33
|
+
// =========================================================================================
|
|
34
|
+
const COMMON = /* glsl */ `
|
|
35
|
+
vec2 hash22(vec2 p){ vec3 p3 = fract(vec3(p.xyx)*vec3(0.1031, 0.1030, 0.0973)); p3 += dot(p3, p3.yzx + 33.33); return fract((p3.xx + p3.yz)*p3.zy); }
|
|
36
|
+
float hash12(vec2 p){ vec3 p3 = fract(vec3(p.xyx)*0.1031); p3 += dot(p3, p3.yzx + 33.33); return fract((p3.x + p3.y)*p3.z); }
|
|
37
|
+
float gnoise(vec2 p){
|
|
38
|
+
vec2 i = floor(p); vec2 f = fract(p); vec2 u = f*f*f*(f*(f*6.0 - 15.0) + 10.0);
|
|
39
|
+
float a = dot(hash22(i) - 0.5, f);
|
|
40
|
+
float b = dot(hash22(i + vec2(1.0, 0.0)) - 0.5, f - vec2(1.0, 0.0));
|
|
41
|
+
float c = dot(hash22(i + vec2(0.0, 1.0)) - 0.5, f - vec2(0.0, 1.0));
|
|
42
|
+
float d = dot(hash22(i + vec2(1.0, 1.0)) - 0.5, f - vec2(1.0, 1.0));
|
|
43
|
+
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y)*2.0; // roughly [-0.7, 0.7]
|
|
44
|
+
}
|
|
45
|
+
// board relief 0..1, anchored in glyph space; octaves finer than a pixel fade out so nothing aliases
|
|
46
|
+
float relief(vec2 p, float px, float seed){
|
|
47
|
+
float s = 0.0; float v = 0.0; float lam = 0.07; float amp = 0.3;
|
|
48
|
+
for (int i = 0; i < 5; i++) {
|
|
49
|
+
float w = 1.0 - smoothstep(0.3, 0.85, px/lam);
|
|
50
|
+
s += amp*w*gnoise(p/lam + float(i)*7.31 + seed);
|
|
51
|
+
v += amp*amp*w*w;
|
|
52
|
+
lam *= 0.5; amp *= 1.3;
|
|
53
|
+
}
|
|
54
|
+
float h = s/max(sqrt(v), 1e-3);
|
|
55
|
+
// scratch grooves: thin streaks stretched along the board (two slightly different angles)
|
|
56
|
+
vec2 q1 = vec2(dot(p, vec2(0.9877, 0.1564)), dot(p, vec2(-0.1564, 0.9877)));
|
|
57
|
+
vec2 q2 = vec2(dot(p, vec2(0.9703, -0.2419)), dot(p, vec2(0.2419, 0.9703)));
|
|
58
|
+
float w1 = 1.0 - smoothstep(0.3, 0.85, px/0.0055); float w2 = 1.0 - smoothstep(0.3, 0.85, px/0.009);
|
|
59
|
+
float g1 = smoothstep(0.30, 0.55, gnoise(vec2(q1.x/0.28, q1.y/0.0055 + 3.7 + seed)));
|
|
60
|
+
float g2 = smoothstep(0.30, 0.55, gnoise(vec2(q2.x/0.55, q2.y/0.009 + 9.1 + seed)));
|
|
61
|
+
return clamp(0.5 + 1.25*h - 0.38*g1*w1 - 0.30*g2*w2, 0.0, 1.0);
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
const CHALK_FRAG = /* glsl */ `
|
|
65
|
+
uniform vec3 uColor; uniform vec3 uColor2; uniform float uOpacity; uniform float uPress; uniform float uGrain; uniform float uGhost;
|
|
66
|
+
uniform float uHW; uniform float uSm; uniform float uSmLen; uniform float uWo; uniform float uWspan; uniform float uSeed;
|
|
67
|
+
uniform vec2 uWdir;
|
|
68
|
+
uniform float uChatter; uniform float uK; uniform float uSg; uniform float uR; uniform float uHH;
|
|
69
|
+
uniform vec2 uC; uniform vec2 uC0; uniform vec2 uNrm;
|
|
70
|
+
${COMMON}
|
|
71
|
+
float streakFn(float d, float u, float sid, float px){
|
|
72
|
+
float w1 = 1.0 - smoothstep(0.3, 0.85, px/0.012); float w2 = 1.0 - smoothstep(0.3, 0.85, px/0.0065);
|
|
73
|
+
float a = gnoise(vec2(d/0.012 + sid*13.7, u*0.24 + sid*3.1)); float b = gnoise(vec2(d/0.0065 + sid*5.3, u*0.56 + sid*9.9));
|
|
74
|
+
return clamp(0.5 + 0.9*(0.6*a*w1 + 0.4*b*w2), 0.0, 1.0);
|
|
75
|
+
}
|
|
76
|
+
// swipe coordinate: the felt pivots on the elbow, so the sweep is an arc about the pivot uC (angle times radius); uK < 0.004 = straight band
|
|
77
|
+
float sweepCoord(vec2 p){
|
|
78
|
+
if (uK < 0.004) return dot(p, uWdir);
|
|
79
|
+
vec2 d = p - uC; vec2 a = (uC0 - uC)/uR;
|
|
80
|
+
return uSg*atan(a.x*d.y - a.y*d.x, dot(a, d))*uR;
|
|
81
|
+
}
|
|
82
|
+
// stroke density along the swipe path (anisotropic, curved): chalk dragged by the felt, so strokes shear along the arc
|
|
83
|
+
float smearDen(vec2 p, float L, float hw){
|
|
84
|
+
vec2 dv = p - uC; float rr = max(length(dv), 0.05);
|
|
85
|
+
float lat = uK < 0.004 ? dot(p, uNrm) : rr;
|
|
86
|
+
float ln = floor(lat/0.011); float j = hash12(vec2(ln, 3.3)); // one jitter per streak line: coherent streaks along the swipe
|
|
87
|
+
float a = 0.0;
|
|
88
|
+
for (int i = 0; i < 16; i++) {
|
|
89
|
+
float u = (float(i) + j)/16.0; float s = u*u*L; float w = exp(-1.2*u)*mix(0.5, 1.0, smoothstep(0.0, 0.25, u));
|
|
90
|
+
float wb = 0.012*gnoise(vec2(u*2.0, ln*0.31));
|
|
91
|
+
vec2 q;
|
|
92
|
+
if (uK < 0.004) q = p - uWdir*s + uNrm*wb;
|
|
93
|
+
else { float dl = -uSg*s/rr; float cs = cos(dl); float sn = sin(dl); vec2 dd = dv*(1.0 + wb/rr); q = uC + vec2(cs*dd.x - sn*dd.y, sn*dd.x + cs*dd.y); }
|
|
94
|
+
a = max(a, w*(1.0 - smoothstep(0.3*hw, 1.5*hw, fieldA(q).x))); // trailing streak behind every stroke crossing
|
|
95
|
+
}
|
|
96
|
+
return a;
|
|
97
|
+
}
|
|
98
|
+
// stick-slip: the dash phase is the pen's own time (pen time / slip time), so dash spacing = speed x slip time
|
|
99
|
+
float chatterMod(float ph, float fwp, float prs, float sid, float px){
|
|
100
|
+
float spacing = 1.3*px/max(fwp, 1e-5); // em between dashes = pen speed x slip time
|
|
101
|
+
float gate = uChatter*(1.0 - smoothstep(0.35, 1.0, uPress))*smoothstep(0.0, 0.35, 1.0 - prs)*smoothstep(0.07, 0.115, spacing)*(1.0 - smoothstep(0.22, 0.5, fwp)); // fast and light only; fades before dashes alias
|
|
102
|
+
float pw = ph + 0.34*gnoise(vec2(ph*0.55 + sid*7.0, sid*1.7)) + 0.18*gnoise(vec2(ph*1.7 + sid*3.0, 9.0)); // seeded period jitter
|
|
103
|
+
float kk = floor(pw); float f = fract(pw); float hh = hash12(vec2(kk, sid + 0.5));
|
|
104
|
+
float ew = max(0.03, 1.3*fwp);
|
|
105
|
+
float onset = smoothstep(0.0, ew, f); // the stick catches abruptly
|
|
106
|
+
float en = 0.4 + 0.42*hh;
|
|
107
|
+
float tl = 1.0 - smoothstep(en - 0.16, en + 0.06, f); // then slips and tapers
|
|
108
|
+
float catchw = 0.72 + 0.55*exp(-f*3.5); // heavier at the start of each dash
|
|
109
|
+
float shape = onset*tl*catchw*(0.35 + 0.65*hh);
|
|
110
|
+
return mix(1.0, shape + 0.07, clamp(gate*1.7, 0.0, 1.0));
|
|
111
|
+
}
|
|
112
|
+
float crystals(vec2 p, float px){
|
|
113
|
+
float CS = 0.014; vec2 q = p/CS; vec2 id = floor(q); vec2 f = fract(q);
|
|
114
|
+
vec3 r = vec3(hash22(id), hash12(id + 7.7));
|
|
115
|
+
float has = step(r.x, 0.16);
|
|
116
|
+
vec2 c = 0.3 + 0.4*hash22(id + 3.1);
|
|
117
|
+
float rad = max(0.2, 1.0*px/CS);
|
|
118
|
+
float dd = length(f - c)/rad;
|
|
119
|
+
float spot = exp(-dd*dd*1.6);
|
|
120
|
+
float phi = r.z*6.2831853 + r.y*3.0;
|
|
121
|
+
float L = uTime*0.23*uIdleSpeed + dot(id, vec2(0.061, 0.037)) + 1.7*sin(dot(id, vec2(0.021, -0.017))); // light angle: sweeps slowly, phase travels across the board
|
|
122
|
+
float a = 0.5 + 0.5*cos(phi - L);
|
|
123
|
+
return has*spot*pow(a, 36.0);
|
|
124
|
+
}
|
|
125
|
+
void main(){
|
|
126
|
+
vec2 p = vPos;
|
|
127
|
+
float px = 0.5*(length(dFdx(p)) + length(dFdy(p))) + 1e-5;
|
|
128
|
+
vec4 A = fieldA(p); vec4 B = fieldB(p);
|
|
129
|
+
float prs = texture2D(uP, fieldUV(p)).y;
|
|
130
|
+
float ph = A.w; float fwp = fwidth(ph);
|
|
131
|
+
float d = max(A.x, 0.0); float wf = clamp(B.y, 0.3, 2.0); float sid = B.z*255.0;
|
|
132
|
+
float pl = clamp(0.55*prs + 0.45*clamp((wf - 0.55)/0.9, 0.0, 1.0), 0.0, 1.0);
|
|
133
|
+
float wob = 0.6*gnoise(vec2(A.w*0.3 + sid*3.7, sid*11.3)) + 0.4*gnoise(p*1.9 + sid*7.0); // the stick wears: slow width wobble
|
|
134
|
+
float hw = uHW*(0.6 + 0.4*wf)*(1.0 + 0.3*wob);
|
|
135
|
+
float peff = (0.2 + 1.5*uPress*(0.45 + 0.7*pl))*(0.94 + 0.3*gnoise(p/0.11 + sid));
|
|
136
|
+
float hl = 0.009 + 0.16*hw;
|
|
137
|
+
float core = 1.0 - smoothstep(0.55*hw, 1.05*hw, d);
|
|
138
|
+
float tail = 0.4*exp(-max(d - 0.8*hw, 0.0)/hl)*(1.0 - smoothstep(0.8*hw + 4.0*hl, 0.8*hw + 6.0*hl, d));
|
|
139
|
+
float prof = core + tail*(1.0 - core);
|
|
140
|
+
float st = streakFn(d, A.w, sid, px);
|
|
141
|
+
float Tsh = peff*prof*(0.72 + 0.56*st)*chatterMod(ph, fwp, prs, sid, px);
|
|
142
|
+
float rin = revealInG(A.y);
|
|
143
|
+
float outv = 1.0; float Tf = Tsh; float gmix = 1.0;
|
|
144
|
+
if (uSm > 0.5) {
|
|
145
|
+
float gU = (sweepCoord(p) - uWo)/uWspan; float gP = clamp(gU, 0.0, 1.0);
|
|
146
|
+
float k = clamp((gP - uErase)/max(uSoftOut, 1e-4), 0.0, 1.0);
|
|
147
|
+
if (k < 0.999) {
|
|
148
|
+
float den = smearDen(p, uSmLen, uHW);
|
|
149
|
+
float Tsm = den*(0.55 + 0.9*uPress)*1.0;
|
|
150
|
+
float sm = 1.0 - smoothstep(0.45, 1.0, k);
|
|
151
|
+
float ghostFade = 1.0 - smoothstep(0.7, 1.0, uE);
|
|
152
|
+
float amp = mix(uGhost*1.4*ghostFade, 1.0, smoothstep(0.0, 0.7, k));
|
|
153
|
+
Tf = mix(Tsh, Tsm, sm)*amp; gmix = mix(1.0, 0.38, sm);
|
|
154
|
+
}
|
|
155
|
+
// crescent of smeared chalk dust where the felt lifts at the end of the arc; gone before the erase ends
|
|
156
|
+
float lat = uK < 0.004 ? dot(p - uC0, uNrm) : length(p - uC) - uR;
|
|
157
|
+
float lens = clamp(1.0 - (lat/uHH)*(lat/uHH), 0.0, 1.0);
|
|
158
|
+
float gc = 0.94 - 0.045*(1.0 - lens);
|
|
159
|
+
float cw = 0.034*(0.3 + 0.7*lens);
|
|
160
|
+
float cres = exp(-pow((gU - gc)/cw, 2.0))*lens;
|
|
161
|
+
float cAmp = smoothstep(0.55, 0.85, uE)*(1.0 - smoothstep(0.9, 1.0, uE))*(0.35 + 0.65*uGhost);
|
|
162
|
+
float eEdge = min(min(p.x - uFExt.x, uFExt.x + uFExt.z - p.x), min(p.y - uFExt.y, uFExt.y + uFExt.w - p.y));
|
|
163
|
+
float Tcr = 1.3*cres*cAmp*(0.6 + 0.8*gnoise(p/0.05 + 3.0))*smoothstep(0.0, 0.03, eEdge);
|
|
164
|
+
if (Tcr > Tf) { Tf = Tcr; gmix = 0.5; }
|
|
165
|
+
outv = 1.0 - smoothstep(0.985, 1.0, uE);
|
|
166
|
+
} else outv = revealOutG(A.z);
|
|
167
|
+
float vis = rin*outv*uOpacity;
|
|
168
|
+
if (vis < 0.003 || Tf < 0.004) discard;
|
|
169
|
+
float H = relief(p, px, uSeed);
|
|
170
|
+
float Hc = clamp(0.5 + (H - 0.5)*(0.35 + 1.9*uGrain)*gmix, 0.0, 1.0);
|
|
171
|
+
float x = Tf - (1.0 - Hc)*0.95;
|
|
172
|
+
float cov = smoothstep(0.0, 0.17, x);
|
|
173
|
+
float thick = smoothstep(0.25, 1.15, Tf);
|
|
174
|
+
float a = cov*(0.45 + 0.55*thick)*vis;
|
|
175
|
+
float tk = smoothstep(0.3, 1.4, Tf);
|
|
176
|
+
vec3 thin = uColor*vec3(1.0, 0.95, 0.87)*0.88;
|
|
177
|
+
vec3 dense = mix(uColor, uColor2, 0.8);
|
|
178
|
+
float shade = 0.74 + 0.26*Hc;
|
|
179
|
+
float age = ageG(A.y);
|
|
180
|
+
float fresh = exp(-age/9.0);
|
|
181
|
+
vec3 col = mix(thin, dense, tk)*shade*(1.0 + 0.08*fresh*smoothstep(0.0, 0.5, age + 0.5));
|
|
182
|
+
col = min(col, vec3(0.985));
|
|
183
|
+
float gl = crystals(p, px)*smoothstep(0.35, 0.9, cov)*vis*uIdle;
|
|
184
|
+
gl_FragColor = vec4(col*a + vec3(0.95, 0.97, 1.0)*gl*1.2, max(a, gl*0.6));
|
|
185
|
+
#include <tonemapping_fragment>
|
|
186
|
+
#include <colorspace_fragment>
|
|
187
|
+
}`;
|
|
188
|
+
const BOARD_FRAG = /* glsl */ `
|
|
189
|
+
uniform vec3 uSlate; uniform vec3 uChalk; uniform float uBoard; uniform float uSeed; uniform vec2 uWdir;
|
|
190
|
+
uniform float uChatter; uniform float uK; uniform float uSg; uniform float uR; uniform float uHH;
|
|
191
|
+
uniform vec2 uC; uniform vec2 uC0; uniform vec2 uNrm;
|
|
192
|
+
${COMMON}
|
|
193
|
+
float oldDen(vec2 pp, float hw, float j){
|
|
194
|
+
float a = 0.0; float ws = 0.0;
|
|
195
|
+
for (int i = 0; i < 6; i++) { float u = (float(i) + j)/6.0; float w = exp(-1.4*u); a += w*(1.0 - smoothstep(0.3*hw, 1.6*hw, fieldA(pp - vec2(0.55*u, 0.0)).x)); ws += w; }
|
|
196
|
+
return a/ws;
|
|
197
|
+
}
|
|
198
|
+
void main(){
|
|
199
|
+
vec2 p = vPos;
|
|
200
|
+
float px = 0.5*(length(dFdx(p)) + length(dFdy(p))) + 1e-5;
|
|
201
|
+
float vis = smoothstep(0.0, 0.1, uD)*(1.0 - smoothstep(0.55, 1.0, uE));
|
|
202
|
+
vec2 e = min(p - uFExt.xy, uFExt.xy + uFExt.zw - p);
|
|
203
|
+
float ed = min(e.x, e.y);
|
|
204
|
+
float edge = smoothstep(0.0, max(0.02, 1.5*px), ed);
|
|
205
|
+
float a0 = uBoard*vis*edge;
|
|
206
|
+
if (a0 < 0.003) discard;
|
|
207
|
+
float H = relief(p*1.3, px, uSeed + 4.0);
|
|
208
|
+
vec2 q = vec2(dot(p, uWdir), dot(p, vec2(-uWdir.y, uWdir.x)));
|
|
209
|
+
float cloud = 0.5 + 0.5*(0.7*gnoise(vec2(q.x/1.1, q.y/0.16) + uSeed) + 0.5*gnoise(vec2(q.x/0.45, q.y/0.07) + 5.0));
|
|
210
|
+
float haze = smoothstep(0.35, 0.95, cloud);
|
|
211
|
+
float j = hash12(floor(p/max(px, 1e-4)));
|
|
212
|
+
vec2 p1 = vec2(0.9903*p.x - 0.1392*p.y, 0.1392*p.x + 0.9903*p.y)*0.62 + vec2(0.15, 0.25);
|
|
213
|
+
vec2 p2 = vec2(0.9962*p.x + 0.0872*p.y, -0.0872*p.x + 0.9962*p.y)*1.35 + vec2(-0.4, -0.15);
|
|
214
|
+
float old = 0.0;
|
|
215
|
+
old += oldDen(p1, 0.05, j)*smoothstep(0.1, 0.8, gnoise(p*0.9 + 2.0) + 0.5);
|
|
216
|
+
old += 0.7*oldDen(p2, 0.04, j)*smoothstep(0.1, 0.8, gnoise(p*0.8 + 8.0) + 0.5);
|
|
217
|
+
float vig = 0.78 + 0.22*smoothstep(0.0, 0.5, ed);
|
|
218
|
+
vec3 col = uSlate*(0.84 + 0.3*H)*vig;
|
|
219
|
+
float chalk = (0.010*haze + 0.022*clamp(old, 0.0, 1.0))*(0.45 + 0.9*H);
|
|
220
|
+
col += uChalk*chalk;
|
|
221
|
+
gl_FragColor = vec4(col*a0, a0);
|
|
222
|
+
#include <tonemapping_fragment>
|
|
223
|
+
#include <colorspace_fragment>
|
|
224
|
+
}`;
|
|
225
|
+
const DUST_VERT = /* glsl */ `
|
|
226
|
+
attribute vec4 aR; attribute float aB;
|
|
227
|
+
${REVEAL_UNIFORMS}
|
|
228
|
+
uniform float uScale; uniform float uDust; uniform float uOn; uniform float uOpacity;
|
|
229
|
+
varying float vA;
|
|
230
|
+
void main(){
|
|
231
|
+
float tau = (uHead - aB)*uDur + uSince;
|
|
232
|
+
float life = 1.3 + 1.5*aR.x;
|
|
233
|
+
float t = tau/life;
|
|
234
|
+
float on = step(0.0, tau)*(1.0 - step(1.0, t))*uOn*step(aR.w, uDust);
|
|
235
|
+
float k = 0.45;
|
|
236
|
+
vec3 pos = position;
|
|
237
|
+
pos.y -= (0.15 + 0.16*aR.y)*(tau - k*(1.0 - exp(-tau/k)));
|
|
238
|
+
pos.x += 0.05*(aR.z - 0.5)*tau + 0.012*sin(tau*2.1 + aR.z*6.2831);
|
|
239
|
+
vec4 mv = modelViewMatrix*vec4(pos, 1.0);
|
|
240
|
+
gl_Position = projectionMatrix*mv;
|
|
241
|
+
float sz = (0.009 + 0.014*aR.y)*(1.0 + 1.2*t);
|
|
242
|
+
gl_PointSize = max(2.0, sz*uScale/-mv.z);
|
|
243
|
+
float cl = (sz*uScale/-mv.z)/gl_PointSize;
|
|
244
|
+
vA = smoothstep(0.0, 0.06, t)*pow(max(1.0 - t, 0.0), 1.5)*0.6*on*(1.0 - smoothstep(0.0, 0.2, uE))*uOpacity*min(1.0, cl*cl*1.5);
|
|
245
|
+
if (on < 0.5) gl_Position = vec4(2.0, 2.0, 2.0, 1.0);
|
|
246
|
+
}`;
|
|
247
|
+
const DUST_FRAG = /* glsl */ `
|
|
248
|
+
precision highp float; uniform vec3 uColor; varying float vA;
|
|
249
|
+
void main(){
|
|
250
|
+
vec2 c = gl_PointCoord*2.0 - 1.0; float r2 = dot(c, c);
|
|
251
|
+
float a = exp(-r2*3.2)*(1.0 - smoothstep(0.6, 1.0, sqrt(r2)))*vA;
|
|
252
|
+
if (a < 0.003) discard;
|
|
253
|
+
gl_FragColor = vec4(uColor*a, a);
|
|
254
|
+
#include <tonemapping_fragment>
|
|
255
|
+
#include <colorspace_fragment>
|
|
256
|
+
}`;
|
|
257
|
+
const row = (name, label, description, min, max, step, unit) => ({ name, label, description, type: 'number', min, max, step, ...(unit ? { unit } : {}) });
|
|
258
|
+
export default {
|
|
259
|
+
key: 'chalkboard', source: 'hand', drawMethods: DRAW_METHODS, eraseMethods: ['smudge', ...ERASE_METHODS], drawDefault: 'pen', eraseDefault: 'smudge',
|
|
260
|
+
methodInfo: { smudge: { label: 'Smudge', hint: 'A felt swipes across: strokes smear along the swipe and leave a faint ghost that fades out.' } },
|
|
261
|
+
catalog: {
|
|
262
|
+
name: 'Chalkboard',
|
|
263
|
+
description: 'Single-stroke chalk on slate: pressure-dependent deposit on a fixed grainy board with powdery halo, falling dust at the pen and a felt-smudge erase leaving ghosts. Use for classrooms, menus and hand-made titles.',
|
|
264
|
+
tags: ['chalk', 'chalkboard', 'slate', 'handwriting', 'classroom', 'dust', 'smudge', 'grain'],
|
|
265
|
+
},
|
|
266
|
+
defaults: { pressure: 0.55, chatter: 0.6, grain: 0.55, weight: 1, dust: 0.6, ghost: 0.5, swing: 0.6, board: 0, opacity: 1, color: '#ebe6d8', color2: '#c4dcf2' },
|
|
267
|
+
ui: {
|
|
268
|
+
main: [
|
|
269
|
+
row('pressure', 'Pressure', 'How hard the chalk is pressed: light = broken grainy line, heavy = nearly solid', 0, 1, 0.01),
|
|
270
|
+
row('chatter', 'Chatter', 'Stick-slip skipping: fast, light strokes break into dashes whose spacing follows pen speed', 0, 1, 0.01),
|
|
271
|
+
row('grain', 'Grain', 'Contrast of the board relief the chalk catches on', 0, 1, 0.01),
|
|
272
|
+
row('dust', 'Dust', 'Falling chalk dust at the tip while writing', 0, 1, 0.01),
|
|
273
|
+
],
|
|
274
|
+
more: [
|
|
275
|
+
row('weight', 'Weight', 'Thickness of the chalk stick', 0.4, 2.5, 0.01),
|
|
276
|
+
row('swing', 'Swing', 'Curvature of the felt swipe: 0 = straight band, 1 = tight arc about the elbow', 0, 1, 0.01),
|
|
277
|
+
row('ghost', 'Ghost', 'Chalk residue left by the smudge erase before it fades out', 0, 1, 0.01),
|
|
278
|
+
row('board', 'Board', 'Slate board behind the text with faint old writing', 0, 1, 0.01),
|
|
279
|
+
row('opacity', 'Opacity', 'Overall opacity', 0, 1, 0.01),
|
|
280
|
+
{ name: 'color', label: 'Chalk', description: 'Chalk colour', type: 'color' },
|
|
281
|
+
{ name: 'color2', label: 'Highlight', description: 'Tint of the dense deposit', type: 'color' },
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
structural: [],
|
|
285
|
+
presets: [
|
|
286
|
+
{ name: 'Classroom', description: 'Balanced white chalk on a dark board', patch: {} },
|
|
287
|
+
{ name: 'Fresh stick', description: 'New chalk pressed hard: dense, bright, heavy dust', patch: { pressure: 0.9, grain: 0.35, dust: 0.9, weight: 1.15 } },
|
|
288
|
+
{ name: 'Worn stub', description: 'Light touch with a short stub: broken and gritty', patch: { pressure: 0.25, grain: 0.85, dust: 0.3, weight: 0.8, ghost: 0.8 } },
|
|
289
|
+
{ name: 'Old board', description: 'Slate with years of old writing under the text', patch: { board: 1, ghost: 0.8, pressure: 0.5, color: '#e4e0d2' } },
|
|
290
|
+
{ name: 'Pink chalk', description: 'Coloured pigment chalk', patch: { color: '#f4b8c8', color2: '#ffd7e2', pressure: 0.6 } },
|
|
291
|
+
],
|
|
292
|
+
build(layout, cfg, anim) {
|
|
293
|
+
const strokes = layout.strokes;
|
|
294
|
+
prepare(strokes, 'hand');
|
|
295
|
+
const G = layout.glyphs.length;
|
|
296
|
+
strokes.forEach((s) => { s.glyphN = s.glyph / Math.max(1, G - 1); });
|
|
297
|
+
const natural = layout.natural || 0.06;
|
|
298
|
+
const smudge = anim.erase.method === 'smudge';
|
|
299
|
+
const seedH = Math.abs(Math.sin(G * 12.9898 + strokes.length * 78.233)) * 43758.5453 % 1;
|
|
300
|
+
const ang = (anim.erase.angle || 0) + (seedH - 0.5) * 24; // seeded swipe direction (degrees)
|
|
301
|
+
const anim2 = smudge ? { draw: anim.draw, play: anim.play, erase: { ...anim.erase, method: 'wipe', angle: ang } } : anim;
|
|
302
|
+
const { infoD, infoE } = applyAnim(strokes, anim2, G);
|
|
303
|
+
const ex = extentOf(strokes);
|
|
304
|
+
const a = (ang * Math.PI) / 180, dx = Math.cos(a), dy = Math.sin(a), nx = -dy, ny = dx;
|
|
305
|
+
const cx0 = (ex.x0 + ex.x1) / 2, cy0 = (ex.y0 + ex.y1) / 2, sg = seedH > 0.5 ? 1 : -1;
|
|
306
|
+
const pd = 0.28, corners = [[ex.x0 - pd, ex.y0 - pd], [ex.x1 + pd, ex.y0 - pd], [ex.x0 - pd, ex.y1 + pd], [ex.x1 + pd, ex.y1 + pd]]; // sweep spans the whole field quad, so the arc end (crescent) lies inside it
|
|
307
|
+
const hh = Math.max(0.5, (ex.y1 - ex.y0) / 2 + 0.35);
|
|
308
|
+
// swipe geometry for a given swing: pivot far to one side (sg), sweep coordinate = angle x radius (JS mirror of sweepCoord in the shader)
|
|
309
|
+
const geom = (swing) => {
|
|
310
|
+
const K = swing * 0.3, arc = K >= 0.004, R = arc ? 1 / K : 1, Cx = cx0 + nx * sg * R, Cy = cy0 + ny * sg * R;
|
|
311
|
+
const ax = (cx0 - Cx) / R, ay = (cy0 - Cy) / R;
|
|
312
|
+
const co = (x, y) => (arc ? sg * Math.atan2(ax * (y - Cy) - ay * (x - Cx), ax * (x - Cx) + ay * (y - Cy)) * R : x * dx + y * dy);
|
|
313
|
+
const cs = corners.map(([x, y]) => co(x, y));
|
|
314
|
+
const lo = Math.min(...cs);
|
|
315
|
+
return { K: arc ? K : 0, R, Cx, Cy, lo, span: Math.max(1e-6, Math.max(...cs) - lo) };
|
|
316
|
+
};
|
|
317
|
+
const g0 = geom(cfg.swing);
|
|
318
|
+
// main field: the arc slot carries the stick-slip phase = pen time / slip time (absolute, independent of the draw method)
|
|
319
|
+
const field = buildField(strokes.map((s) => { const ph = new Float32Array(s.pts.length / 2); for (let i = 0; i < ph.length; i++)
|
|
320
|
+
ph[i] = s.pt[i] * s.ptime / 0.13; return { ...s, cum: ph, len: 1 }; }), { source: 'hand', texels: 512 });
|
|
321
|
+
const pfield = buildField(strokes.map((s) => ({ ...s, wfactor: s.pressure })), { source: 'hand', texels: 192 }); // pen pressure (wfactor slot)
|
|
322
|
+
const seed = (seedH * 40) % 40;
|
|
323
|
+
const common = { uColor: { value: hex(cfg.color) }, uColor2: { value: hex(cfg.color2) }, uOpacity: { value: 1 }, uSeed: { value: seed }, uWdir: { value: new THREE.Vector2(dx, dy) } };
|
|
324
|
+
const mat = fieldMaterial(field, CHALK_FRAG, {
|
|
325
|
+
...common, uP: { value: pfield.f1 }, uPress: { value: cfg.pressure }, uGrain: { value: cfg.grain }, uGhost: { value: cfg.ghost }, uHW: { value: natural * 0.7 },
|
|
326
|
+
uSm: { value: smudge ? 1 : 0 }, uSmLen: { value: 1.3 }, uWo: { value: g0.lo }, uWspan: { value: g0.span }, uChatter: { value: cfg.chatter },
|
|
327
|
+
uK: { value: g0.K }, uSg: { value: sg }, uR: { value: g0.R }, uHH: { value: hh }, uC: { value: new THREE.Vector2(g0.Cx, g0.Cy) }, uC0: { value: new THREE.Vector2(cx0, cy0) }, uNrm: { value: new THREE.Vector2(nx, ny) },
|
|
328
|
+
}, { extra: 'uniform sampler2D uP;\n' });
|
|
329
|
+
const mesh = fieldQuad(field, mat);
|
|
330
|
+
mesh.renderOrder = 2;
|
|
331
|
+
const bmat = fieldMaterial(field, BOARD_FRAG, { uSlate: { value: hex('#1b2326') }, uChalk: { value: hex(cfg.color) }, uBoard: { value: cfg.board }, uSeed: { value: seed }, uWdir: { value: new THREE.Vector2(dx, dy) } });
|
|
332
|
+
const board = fieldQuad(field, bmat);
|
|
333
|
+
board.renderOrder = 0;
|
|
334
|
+
board.visible = cfg.board > 0.001;
|
|
335
|
+
// falling dust: 36 particles per stroke, born on the pen path (pressure-weighted) when the pen passes
|
|
336
|
+
const PER = 36;
|
|
337
|
+
const pos = [], aB = [], aR = [];
|
|
338
|
+
strokes.forEach((s, si) => {
|
|
339
|
+
const rnd = mulberry32(1000 + si * 77);
|
|
340
|
+
const n = s.pts.length / 2;
|
|
341
|
+
if (n < 2)
|
|
342
|
+
return;
|
|
343
|
+
const cw = new Float32Array(n);
|
|
344
|
+
let c = 0;
|
|
345
|
+
for (let i = 0; i < n; i++) {
|
|
346
|
+
c += (i ? s.cum[i] - s.cum[i - 1] : 0) * (0.35 + (s.pressure ? s.pressure[i] : 0.5)) + 1e-6;
|
|
347
|
+
cw[i] = c;
|
|
348
|
+
}
|
|
349
|
+
for (let k = 0; k < PER; k++) {
|
|
350
|
+
const target = ((k + rnd()) / PER) * c;
|
|
351
|
+
let lo2 = 0, hi = n - 1;
|
|
352
|
+
while (hi - lo2 > 1) {
|
|
353
|
+
const m = (lo2 + hi) >> 1;
|
|
354
|
+
if (cw[m] <= target)
|
|
355
|
+
lo2 = m;
|
|
356
|
+
else
|
|
357
|
+
hi = m;
|
|
358
|
+
}
|
|
359
|
+
const i = lo2;
|
|
360
|
+
const i2 = Math.min(n - 1, i + 1), i0 = Math.max(0, i - 1);
|
|
361
|
+
let nx = -(s.pts[2 * i2 + 1] - s.pts[2 * i0 + 1]), ny = s.pts[2 * i2] - s.pts[2 * i0];
|
|
362
|
+
const nl = Math.hypot(nx, ny) || 1;
|
|
363
|
+
nx /= nl;
|
|
364
|
+
ny /= nl;
|
|
365
|
+
const off = (rnd() - 0.5) * natural * 0.9;
|
|
366
|
+
pos.push(s.pts[2 * i] + nx * off, s.pts[2 * i + 1] + ny * off - natural * 0.15, 0);
|
|
367
|
+
aB.push(s.seg[0] + s.t[i] * (s.seg[1] - s.seg[0]));
|
|
368
|
+
aR.push(rnd(), rnd(), rnd(), rnd());
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
const dg = new THREE.BufferGeometry();
|
|
372
|
+
dg.setAttribute('position', new THREE.BufferAttribute(new Float32Array(pos), 3));
|
|
373
|
+
dg.setAttribute('aB', new THREE.BufferAttribute(new Float32Array(aB), 1));
|
|
374
|
+
dg.setAttribute('aR', new THREE.BufferAttribute(new Float32Array(aR), 4));
|
|
375
|
+
dg.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 1e3);
|
|
376
|
+
const dmat = new THREE.ShaderMaterial({
|
|
377
|
+
uniforms: { ...mat.uniforms, uScale: { value: 800 }, uDust: { value: cfg.dust }, uOn: { value: infoD.tip ? 1 : 0 }, uOpacity: { value: 1 }, uColor: { value: hex(cfg.color) } },
|
|
378
|
+
vertexShader: DUST_VERT, fragmentShader: DUST_FRAG, transparent: true, depthWrite: false,
|
|
379
|
+
blending: THREE.CustomBlending, blendEquation: THREE.AddEquation, blendSrc: THREE.OneFactor, blendDst: THREE.OneMinusSrcAlphaFactor,
|
|
380
|
+
});
|
|
381
|
+
const dust = new THREE.Points(dg, dmat);
|
|
382
|
+
dust.frustumCulled = false;
|
|
383
|
+
dust.renderOrder = 3;
|
|
384
|
+
const group = new THREE.Group();
|
|
385
|
+
group.add(board, mesh, dust);
|
|
386
|
+
const api = {
|
|
387
|
+
object: group,
|
|
388
|
+
apply(c) {
|
|
389
|
+
const u = mat.uniforms;
|
|
390
|
+
u.uColor.value.set(c.color);
|
|
391
|
+
u.uColor2.value.set(c.color2);
|
|
392
|
+
u.uOpacity.value = c.opacity;
|
|
393
|
+
u.uPress.value = c.pressure;
|
|
394
|
+
u.uGrain.value = c.grain;
|
|
395
|
+
u.uGhost.value = c.ghost;
|
|
396
|
+
u.uChatter.value = c.chatter;
|
|
397
|
+
{
|
|
398
|
+
const g = geom(c.swing);
|
|
399
|
+
u.uK.value = g.K;
|
|
400
|
+
u.uR.value = g.R;
|
|
401
|
+
u.uWo.value = g.lo;
|
|
402
|
+
u.uWspan.value = g.span;
|
|
403
|
+
u.uC.value.set(g.Cx, g.Cy);
|
|
404
|
+
}
|
|
405
|
+
u.uHW.value = natural * 0.7 * c.weight;
|
|
406
|
+
const b = bmat.uniforms;
|
|
407
|
+
b.uBoard.value = c.board;
|
|
408
|
+
b.uChalk.value.set(c.color);
|
|
409
|
+
board.visible = c.board > 0.001;
|
|
410
|
+
const d = dmat.uniforms;
|
|
411
|
+
d.uColor.value.set(c.color);
|
|
412
|
+
d.uDust.value = c.dust;
|
|
413
|
+
d.uOpacity.value = c.opacity;
|
|
414
|
+
},
|
|
415
|
+
update(S, time, px) {
|
|
416
|
+
setReveal(mat.uniforms, S, infoD, infoE, anim.draw.duration, time);
|
|
417
|
+
setReveal(bmat.uniforms, S, infoD, infoE, anim.draw.duration, time);
|
|
418
|
+
setReveal(dmat.uniforms, S, infoD, infoE, anim.draw.duration, time);
|
|
419
|
+
dmat.uniforms.uScale.value = px;
|
|
420
|
+
},
|
|
421
|
+
dispose() { field.dispose(); pfield.dispose(); mesh.geometry.dispose(); board.geometry.dispose(); mat.dispose(); bmat.dispose(); dg.dispose(); dmat.dispose(); },
|
|
422
|
+
};
|
|
423
|
+
api.apply(cfg);
|
|
424
|
+
return api;
|
|
425
|
+
},
|
|
426
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
key: string;
|
|
3
|
+
source: string;
|
|
4
|
+
drawMethods: string[];
|
|
5
|
+
eraseMethods: string[];
|
|
6
|
+
drawDefault: string;
|
|
7
|
+
eraseDefault: string;
|
|
8
|
+
catalog: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
};
|
|
13
|
+
defaults: {
|
|
14
|
+
stars: number;
|
|
15
|
+
brightness: number;
|
|
16
|
+
twinkle: number;
|
|
17
|
+
lines: number;
|
|
18
|
+
temperature: number;
|
|
19
|
+
seed: number;
|
|
20
|
+
color: string;
|
|
21
|
+
color2: string;
|
|
22
|
+
opacity: number;
|
|
23
|
+
};
|
|
24
|
+
ui: {
|
|
25
|
+
main: ({
|
|
26
|
+
name: string;
|
|
27
|
+
label: string;
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
min: number;
|
|
31
|
+
max: number;
|
|
32
|
+
step: number;
|
|
33
|
+
unit: string;
|
|
34
|
+
} | {
|
|
35
|
+
name: string;
|
|
36
|
+
label: string;
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
41
|
+
step: number;
|
|
42
|
+
unit?: undefined;
|
|
43
|
+
})[];
|
|
44
|
+
more: ({
|
|
45
|
+
name: string;
|
|
46
|
+
label: string;
|
|
47
|
+
description: string;
|
|
48
|
+
type: string;
|
|
49
|
+
min: number;
|
|
50
|
+
max: number;
|
|
51
|
+
step: number;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
label: string;
|
|
55
|
+
description: string;
|
|
56
|
+
type: string;
|
|
57
|
+
min?: undefined;
|
|
58
|
+
max?: undefined;
|
|
59
|
+
step?: undefined;
|
|
60
|
+
})[];
|
|
61
|
+
};
|
|
62
|
+
structural: string[];
|
|
63
|
+
presets: ({
|
|
64
|
+
name: string;
|
|
65
|
+
description: string;
|
|
66
|
+
patch: {
|
|
67
|
+
temperature?: undefined;
|
|
68
|
+
color?: undefined;
|
|
69
|
+
color2?: undefined;
|
|
70
|
+
brightness?: undefined;
|
|
71
|
+
twinkle?: undefined;
|
|
72
|
+
lines?: undefined;
|
|
73
|
+
};
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
patch: {
|
|
78
|
+
temperature: number;
|
|
79
|
+
color: string;
|
|
80
|
+
color2: string;
|
|
81
|
+
brightness: number;
|
|
82
|
+
twinkle?: undefined;
|
|
83
|
+
lines?: undefined;
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
patch: {
|
|
89
|
+
temperature: number;
|
|
90
|
+
color: string;
|
|
91
|
+
color2: string;
|
|
92
|
+
twinkle: number;
|
|
93
|
+
brightness?: undefined;
|
|
94
|
+
lines?: undefined;
|
|
95
|
+
};
|
|
96
|
+
} | {
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
patch: {
|
|
100
|
+
brightness: number;
|
|
101
|
+
lines: number;
|
|
102
|
+
twinkle: number;
|
|
103
|
+
temperature?: undefined;
|
|
104
|
+
color?: undefined;
|
|
105
|
+
color2?: undefined;
|
|
106
|
+
};
|
|
107
|
+
})[];
|
|
108
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
109
|
+
};
|
|
110
|
+
export default _default;
|
|
111
|
+
//# sourceMappingURL=constellation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constellation.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/engine/looks/constellation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8OA,wBAoIE"}
|