@3driseai/3drise-viewer 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animationsV2/ClipPlayer.d.ts.map +1 -1
- package/dist/animationsV2/ClipPlayer.js +13 -9
- package/dist/animationsV2/ClipsRuntime.d.ts +44 -3
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +173 -55
- package/dist/animationsV2/appliers.d.ts.map +1 -1
- package/dist/animationsV2/appliers.js +21 -5
- package/dist/animationsV2/index.d.ts +1 -1
- package/dist/animationsV2/index.d.ts.map +1 -1
- package/dist/animationsV2/normalize.d.ts.map +1 -1
- package/dist/animationsV2/normalize.js +7 -3
- package/dist/animationsV2/sequenceUtils.d.ts +44 -6
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -1
- package/dist/animationsV2/sequenceUtils.js +58 -12
- package/dist/animationsV2/types.d.ts +22 -12
- package/dist/animationsV2/types.d.ts.map +1 -1
- package/dist/api/sceneHandle.d.ts +35 -1
- package/dist/api/sceneHandle.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +88 -17
- package/dist/components/AdvancedGrid.d.ts +1 -5
- package/dist/components/AdvancedGrid.d.ts.map +1 -1
- package/dist/components/AdvancedGrid.js +6 -35
- package/dist/components/AnimatedObject.d.ts.map +1 -1
- package/dist/components/AnimatedObject.js +9 -4
- package/dist/components/ApollonianGrid.d.ts +1 -1
- package/dist/components/ApollonianGrid.d.ts.map +1 -1
- package/dist/components/ApollonianGrid.js +3 -28
- package/dist/components/ChladniGrid.d.ts +1 -1
- package/dist/components/ChladniGrid.d.ts.map +1 -1
- package/dist/components/ChladniGrid.js +6 -35
- package/dist/components/CircuitGrid.d.ts +1 -1
- package/dist/components/CircuitGrid.d.ts.map +1 -1
- package/dist/components/CircuitGrid.js +6 -34
- package/dist/components/ConformalGrid.d.ts +1 -1
- package/dist/components/ConformalGrid.d.ts.map +1 -1
- package/dist/components/ConformalGrid.js +3 -34
- package/dist/components/ContourGrid.d.ts +1 -1
- package/dist/components/ContourGrid.d.ts.map +1 -1
- package/dist/components/ContourGrid.js +6 -34
- package/dist/components/CustomPrimitive.js +1 -1
- package/dist/components/EnvironmentObject.d.ts.map +1 -1
- package/dist/components/EnvironmentObject.js +9 -7
- package/dist/components/FlowNetGrid.d.ts +1 -1
- package/dist/components/FlowNetGrid.d.ts.map +1 -1
- package/dist/components/FlowNetGrid.js +6 -34
- package/dist/components/FractalGrid.d.ts +1 -1
- package/dist/components/FractalGrid.d.ts.map +1 -1
- package/dist/components/FractalGrid.js +6 -37
- package/dist/components/Galaxy.d.ts.map +1 -1
- package/dist/components/Galaxy.js +9 -23
- package/dist/components/GirihGrid.d.ts +1 -1
- package/dist/components/GirihGrid.d.ts.map +1 -1
- package/dist/components/GirihGrid.js +6 -35
- package/dist/components/GravWaveGrid.d.ts +1 -1
- package/dist/components/GravWaveGrid.d.ts.map +1 -1
- package/dist/components/GravWaveGrid.js +6 -35
- package/dist/components/HexGrid.d.ts +1 -5
- package/dist/components/HexGrid.d.ts.map +1 -1
- package/dist/components/HexGrid.js +6 -36
- package/dist/components/HilbertGrid.d.ts +1 -1
- package/dist/components/HilbertGrid.d.ts.map +1 -1
- package/dist/components/HilbertGrid.js +3 -30
- package/dist/components/HyperbolicGrid.d.ts +1 -1
- package/dist/components/HyperbolicGrid.d.ts.map +1 -1
- package/dist/components/HyperbolicGrid.js +6 -34
- package/dist/components/LandObject.d.ts +9 -0
- package/dist/components/LandObject.d.ts.map +1 -0
- package/dist/components/LandObject.js +15 -0
- package/dist/components/LensingGrid.d.ts +1 -1
- package/dist/components/LensingGrid.d.ts.map +1 -1
- package/dist/components/LensingGrid.js +3 -29
- package/dist/components/LightsManager.d.ts.map +1 -1
- package/dist/components/LightsManager.js +8 -0
- package/dist/components/ModelBoundary.d.ts +2 -0
- package/dist/components/ModelBoundary.d.ts.map +1 -1
- package/dist/components/ModelBoundary.js +3 -0
- package/dist/components/ModelPrimitive.d.ts.map +1 -1
- package/dist/components/ModelPrimitive.js +6 -0
- package/dist/components/MoireGrid.d.ts +1 -1
- package/dist/components/MoireGrid.d.ts.map +1 -1
- package/dist/components/MoireGrid.js +6 -35
- package/dist/components/MoonDisc.d.ts +11 -0
- package/dist/components/MoonDisc.d.ts.map +1 -0
- package/dist/components/MoonDisc.js +128 -0
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +15 -4
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +7 -5
- package/dist/components/OceanBuilder.d.ts.map +1 -1
- package/dist/components/OceanBuilder.js +2 -0
- package/dist/components/ParastichyGrid.d.ts +1 -1
- package/dist/components/ParastichyGrid.d.ts.map +1 -1
- package/dist/components/ParastichyGrid.js +3 -30
- package/dist/components/PhyllotaxisGrid.d.ts +1 -1
- package/dist/components/PhyllotaxisGrid.d.ts.map +1 -1
- package/dist/components/PhyllotaxisGrid.js +3 -32
- package/dist/components/ProjectLoader.d.ts +5 -3
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +6 -3
- package/dist/components/QuasiGrid.d.ts +1 -1
- package/dist/components/QuasiGrid.d.ts.map +1 -1
- package/dist/components/QuasiGrid.js +6 -33
- package/dist/components/RadarGrid.d.ts +1 -1
- package/dist/components/RadarGrid.d.ts.map +1 -1
- package/dist/components/RadarGrid.js +6 -34
- package/dist/components/ReactionDiffusionGrid.d.ts +1 -1
- package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -1
- package/dist/components/ReactionDiffusionGrid.js +6 -35
- package/dist/components/SceneBuilder.d.ts +25 -3
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +68 -38
- package/dist/components/SkyController.d.ts +25 -1
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +189 -130
- package/dist/components/SkyMesh.d.ts.map +1 -1
- package/dist/components/SkyMesh.js +26 -1
- package/dist/components/SkyStars.d.ts +11 -0
- package/dist/components/SkyStars.d.ts.map +1 -0
- package/dist/components/SkyStars.js +187 -0
- package/dist/components/SkySystem.d.ts +3 -3
- package/dist/components/SkySystem.d.ts.map +1 -1
- package/dist/components/SkySystem.js +8 -2
- package/dist/components/Sun.d.ts +15 -1
- package/dist/components/Sun.d.ts.map +1 -1
- package/dist/components/Sun.js +64 -3
- package/dist/components/SunLight.d.ts +6 -1
- package/dist/components/SunLight.d.ts.map +1 -1
- package/dist/components/SunLight.js +96 -44
- package/dist/components/TerrainBuilder.d.ts.map +1 -1
- package/dist/components/TerrainBuilder.js +2 -0
- package/dist/components/TextGenerator.d.ts +9 -0
- package/dist/components/TextGenerator.d.ts.map +1 -0
- package/dist/components/TextGenerator.js +29 -0
- package/dist/components/TruchetGrid.d.ts +1 -1
- package/dist/components/TruchetGrid.d.ts.map +1 -1
- package/dist/components/TruchetGrid.js +3 -30
- package/dist/components/VoronoiGrid.d.ts +1 -1
- package/dist/components/VoronoiGrid.d.ts.map +1 -1
- package/dist/components/VoronoiGrid.js +6 -33
- package/dist/components/WallpaperGrid.d.ts +1 -1
- package/dist/components/WallpaperGrid.d.ts.map +1 -1
- package/dist/components/WallpaperGrid.js +6 -35
- package/dist/components/environment/Rain.d.ts +15 -0
- package/dist/components/environment/Rain.d.ts.map +1 -0
- package/dist/components/environment/Rain.js +110 -0
- package/dist/components/environment/Rainbow.d.ts +20 -0
- package/dist/components/environment/Rainbow.d.ts.map +1 -0
- package/dist/components/environment/Rainbow.js +974 -0
- package/dist/components/environment/Sandstorm.d.ts +20 -0
- package/dist/components/environment/Sandstorm.d.ts.map +1 -0
- package/dist/components/environment/Sandstorm.js +776 -0
- package/dist/components/environment/Snow.d.ts +20 -0
- package/dist/components/environment/Snow.d.ts.map +1 -0
- package/dist/components/environment/Snow.js +609 -0
- package/dist/components/environment/Thunderstorm.d.ts +20 -0
- package/dist/components/environment/Thunderstorm.d.ts.map +1 -0
- package/dist/components/environment/Thunderstorm.js +731 -0
- package/dist/components/environment/Tornado.d.ts +20 -0
- package/dist/components/environment/Tornado.d.ts.map +1 -0
- package/dist/components/environment/Tornado.js +762 -0
- package/dist/components/environment/index.d.ts +13 -0
- package/dist/components/environment/index.d.ts.map +1 -0
- package/dist/components/environment/index.js +7 -0
- package/dist/components/index.d.ts +10 -10
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +8 -6
- package/dist/components/land/LandPatch.d.ts +15 -0
- package/dist/components/land/LandPatch.d.ts.map +1 -0
- package/dist/components/land/LandPatch.js +170 -0
- package/dist/components/land/index.d.ts +3 -0
- package/dist/components/land/index.d.ts.map +1 -0
- package/dist/components/land/index.js +1 -0
- package/dist/components/space/Earth.d.ts +16 -0
- package/dist/components/space/Earth.d.ts.map +1 -0
- package/dist/components/space/Earth.js +75 -0
- package/dist/components/space/ShootingStar.d.ts +21 -0
- package/dist/components/space/ShootingStar.d.ts.map +1 -0
- package/dist/components/space/ShootingStar.js +101 -0
- package/dist/components/space/ShootingStars.d.ts +16 -0
- package/dist/components/space/ShootingStars.d.ts.map +1 -0
- package/dist/components/space/ShootingStars.js +71 -0
- package/dist/components/space/SolarSystem.d.ts +16 -0
- package/dist/components/space/SolarSystem.d.ts.map +1 -0
- package/dist/components/space/SolarSystem.js +141 -0
- package/dist/components/space/Stars.d.ts +20 -0
- package/dist/components/space/Stars.d.ts.map +1 -0
- package/dist/components/space/Stars.js +160 -0
- package/dist/components/space/index.d.ts +11 -0
- package/dist/components/space/index.d.ts.map +1 -0
- package/dist/components/space/index.js +8 -0
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +27 -3
- package/dist/components/terrain/types.d.ts +5 -1
- package/dist/components/terrain/types.d.ts.map +1 -1
- package/dist/components/text/BurnAwayText.d.ts +15 -0
- package/dist/components/text/BurnAwayText.d.ts.map +1 -0
- package/dist/components/text/BurnAwayText.js +4 -0
- package/dist/components/text/ChalkboardText.d.ts +15 -0
- package/dist/components/text/ChalkboardText.d.ts.map +1 -0
- package/dist/components/text/ChalkboardText.js +4 -0
- package/dist/components/text/ConstellationText.d.ts +15 -0
- package/dist/components/text/ConstellationText.d.ts.map +1 -0
- package/dist/components/text/ConstellationText.js +4 -0
- package/dist/components/text/EmbroideryText.d.ts +15 -0
- package/dist/components/text/EmbroideryText.d.ts.map +1 -0
- package/dist/components/text/EmbroideryText.js +4 -0
- package/dist/components/text/FourierSketchText.d.ts +15 -0
- package/dist/components/text/FourierSketchText.d.ts.map +1 -0
- package/dist/components/text/FourierSketchText.js +4 -0
- package/dist/components/text/FrostGrowthText.d.ts +15 -0
- package/dist/components/text/FrostGrowthText.d.ts.map +1 -0
- package/dist/components/text/FrostGrowthText.js +4 -0
- package/dist/components/text/HandwritingText.d.ts +15 -0
- package/dist/components/text/HandwritingText.d.ts.map +1 -0
- package/dist/components/text/HandwritingText.js +4 -0
- package/dist/components/text/InkBleedText.d.ts +15 -0
- package/dist/components/text/InkBleedText.d.ts.map +1 -0
- package/dist/components/text/InkBleedText.js +4 -0
- package/dist/components/text/LightPaintingText.d.ts +15 -0
- package/dist/components/text/LightPaintingText.d.ts.map +1 -0
- package/dist/components/text/LightPaintingText.js +4 -0
- package/dist/components/text/LiquidMetalText.d.ts +15 -0
- package/dist/components/text/LiquidMetalText.d.ts.map +1 -0
- package/dist/components/text/LiquidMetalText.js +4 -0
- package/dist/components/text/NeonTubeText.d.ts +15 -0
- package/dist/components/text/NeonTubeText.d.ts.map +1 -0
- package/dist/components/text/NeonTubeText.js +4 -0
- package/dist/components/text/PlasmaDischargeText.d.ts +15 -0
- package/dist/components/text/PlasmaDischargeText.d.ts.map +1 -0
- package/dist/components/text/PlasmaDischargeText.js +4 -0
- package/dist/components/text/TextObjectView.d.ts +12 -0
- package/dist/components/text/TextObjectView.d.ts.map +1 -0
- package/dist/components/text/TextObjectView.js +11 -0
- package/dist/components/text/engine/fieldkit.d.ts +24 -0
- package/dist/components/text/engine/fieldkit.d.ts.map +1 -0
- package/dist/components/text/engine/fieldkit.js +201 -0
- package/dist/components/text/engine/glyphs.d.ts +19 -0
- package/dist/components/text/engine/glyphs.d.ts.map +1 -0
- package/dist/components/text/engine/glyphs.js +269 -0
- package/dist/components/text/engine/looks/burnAway.d.ts +144 -0
- package/dist/components/text/engine/looks/burnAway.d.ts.map +1 -0
- package/dist/components/text/engine/looks/burnAway.js +593 -0
- package/dist/components/text/engine/looks/chalkboard.d.ts +135 -0
- package/dist/components/text/engine/looks/chalkboard.d.ts.map +1 -0
- package/dist/components/text/engine/looks/chalkboard.js +426 -0
- package/dist/components/text/engine/looks/constellation.d.ts +111 -0
- package/dist/components/text/engine/looks/constellation.d.ts.map +1 -0
- package/dist/components/text/engine/looks/constellation.js +496 -0
- package/dist/components/text/engine/looks/embroidery.d.ts +165 -0
- package/dist/components/text/engine/looks/embroidery.d.ts.map +1 -0
- package/dist/components/text/engine/looks/embroidery.js +645 -0
- package/dist/components/text/engine/looks/frostGrowth.d.ts +109 -0
- package/dist/components/text/engine/looks/frostGrowth.d.ts.map +1 -0
- package/dist/components/text/engine/looks/frostGrowth.js +727 -0
- package/dist/components/text/engine/looks/index.d.ts +2 -0
- package/dist/components/text/engine/looks/index.d.ts.map +1 -0
- package/dist/components/text/engine/looks/index.js +48 -0
- package/dist/components/text/engine/looks/inkBleed.d.ts +103 -0
- package/dist/components/text/engine/looks/inkBleed.d.ts.map +1 -0
- package/dist/components/text/engine/looks/inkBleed.js +590 -0
- package/dist/components/text/engine/looks/lightPainting.d.ts +132 -0
- package/dist/components/text/engine/looks/lightPainting.d.ts.map +1 -0
- package/dist/components/text/engine/looks/lightPainting.js +567 -0
- package/dist/components/text/engine/looks/liquidMetal.d.ts +135 -0
- package/dist/components/text/engine/looks/liquidMetal.d.ts.map +1 -0
- package/dist/components/text/engine/looks/liquidMetal.js +655 -0
- package/dist/components/text/engine/looks/plasmaDischarge.d.ts +126 -0
- package/dist/components/text/engine/looks/plasmaDischarge.d.ts.map +1 -0
- package/dist/components/text/engine/looks/plasmaDischarge.js +763 -0
- package/dist/components/text/engine/methods.d.ts +19 -0
- package/dist/components/text/engine/methods.d.ts.map +1 -0
- package/dist/components/text/engine/methods.js +126 -0
- package/dist/components/text/engine/playback.d.ts +40 -0
- package/dist/components/text/engine/playback.d.ts.map +1 -0
- package/dist/components/text/engine/playback.js +114 -0
- package/dist/components/text/engine/ribbon.d.ts +58 -0
- package/dist/components/text/engine/ribbon.d.ts.map +1 -0
- package/dist/components/text/engine/ribbon.js +250 -0
- package/dist/components/text/engine/variants.d.ts +159 -0
- package/dist/components/text/engine/variants.d.ts.map +1 -0
- package/dist/components/text/engine/variants.js +378 -0
- package/dist/components/text/fonts/architects-daughter.outline.d.ts +3 -0
- package/dist/components/text/fonts/architects-daughter.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/architects-daughter.outline.js +4 -0
- package/dist/components/text/fonts/architects-daughter.strokes.d.ts +3 -0
- package/dist/components/text/fonts/architects-daughter.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/architects-daughter.strokes.js +4 -0
- package/dist/components/text/fonts/caveat.outline.d.ts +3 -0
- package/dist/components/text/fonts/caveat.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/caveat.outline.js +4 -0
- package/dist/components/text/fonts/caveat.strokes.d.ts +3 -0
- package/dist/components/text/fonts/caveat.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/caveat.strokes.js +4 -0
- package/dist/components/text/fonts/courgette.outline.d.ts +3 -0
- package/dist/components/text/fonts/courgette.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/courgette.outline.js +4 -0
- package/dist/components/text/fonts/courgette.strokes.d.ts +3 -0
- package/dist/components/text/fonts/courgette.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/courgette.strokes.js +4 -0
- package/dist/components/text/fonts/dancing-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/dancing-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/dancing-script.outline.js +4 -0
- package/dist/components/text/fonts/dancing-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/dancing-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/dancing-script.strokes.js +4 -0
- package/dist/components/text/fonts/gochi-hand.outline.d.ts +3 -0
- package/dist/components/text/fonts/gochi-hand.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/gochi-hand.outline.js +4 -0
- package/dist/components/text/fonts/gochi-hand.strokes.d.ts +3 -0
- package/dist/components/text/fonts/gochi-hand.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/gochi-hand.strokes.js +4 -0
- package/dist/components/text/fonts/handlee.outline.d.ts +3 -0
- package/dist/components/text/fonts/handlee.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/handlee.outline.js +4 -0
- package/dist/components/text/fonts/handlee.strokes.d.ts +3 -0
- package/dist/components/text/fonts/handlee.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/handlee.strokes.js +4 -0
- package/dist/components/text/fonts/index.d.ts +5 -0
- package/dist/components/text/fonts/index.d.ts.map +1 -0
- package/dist/components/text/fonts/index.js +44 -0
- package/dist/components/text/fonts/indie-flower.outline.d.ts +3 -0
- package/dist/components/text/fonts/indie-flower.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/indie-flower.outline.js +4 -0
- package/dist/components/text/fonts/indie-flower.strokes.d.ts +3 -0
- package/dist/components/text/fonts/indie-flower.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/indie-flower.strokes.js +4 -0
- package/dist/components/text/fonts/kalam.outline.d.ts +3 -0
- package/dist/components/text/fonts/kalam.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/kalam.outline.js +4 -0
- package/dist/components/text/fonts/kalam.strokes.d.ts +3 -0
- package/dist/components/text/fonts/kalam.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/kalam.strokes.js +4 -0
- package/dist/components/text/fonts/kaushan-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/kaushan-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/kaushan-script.outline.js +4 -0
- package/dist/components/text/fonts/kaushan-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/kaushan-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/kaushan-script.strokes.js +4 -0
- package/dist/components/text/fonts/mynerve.outline.d.ts +3 -0
- package/dist/components/text/fonts/mynerve.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/mynerve.outline.js +4 -0
- package/dist/components/text/fonts/mynerve.strokes.d.ts +3 -0
- package/dist/components/text/fonts/mynerve.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/mynerve.strokes.js +4 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.d.ts +3 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/nanum-pen-script.outline.js +4 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts +3 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/nanum-pen-script.strokes.js +4 -0
- package/dist/components/text/fonts/pacifico.outline.d.ts +3 -0
- package/dist/components/text/fonts/pacifico.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/pacifico.outline.js +4 -0
- package/dist/components/text/fonts/pacifico.strokes.d.ts +3 -0
- package/dist/components/text/fonts/pacifico.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/pacifico.strokes.js +4 -0
- package/dist/components/text/fonts/patrick-hand.outline.d.ts +3 -0
- package/dist/components/text/fonts/patrick-hand.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/patrick-hand.outline.js +4 -0
- package/dist/components/text/fonts/patrick-hand.strokes.d.ts +3 -0
- package/dist/components/text/fonts/patrick-hand.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/patrick-hand.strokes.js +4 -0
- package/dist/components/text/fonts/poppins.outline.d.ts +3 -0
- package/dist/components/text/fonts/poppins.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/poppins.outline.js +4 -0
- package/dist/components/text/fonts/poppins.strokes.d.ts +3 -0
- package/dist/components/text/fonts/poppins.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/poppins.strokes.js +4 -0
- package/dist/components/text/fonts/satisfy.outline.d.ts +3 -0
- package/dist/components/text/fonts/satisfy.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/satisfy.outline.js +4 -0
- package/dist/components/text/fonts/satisfy.strokes.d.ts +3 -0
- package/dist/components/text/fonts/satisfy.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/satisfy.strokes.js +4 -0
- package/dist/components/text/fonts/sriracha.outline.d.ts +3 -0
- package/dist/components/text/fonts/sriracha.outline.d.ts.map +1 -0
- package/dist/components/text/fonts/sriracha.outline.js +4 -0
- package/dist/components/text/fonts/sriracha.strokes.d.ts +3 -0
- package/dist/components/text/fonts/sriracha.strokes.d.ts.map +1 -0
- package/dist/components/text/fonts/sriracha.strokes.js +4 -0
- package/dist/components/text/index.d.ts +27 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +13 -0
- package/dist/components/text/useTextObject.d.ts +21 -0
- package/dist/components/text/useTextObject.d.ts.map +1 -0
- package/dist/components/text/useTextObject.js +118 -0
- package/dist/components/water/OceanSurface.d.ts.map +1 -1
- package/dist/components/water/OceanSurface.js +3 -1
- package/dist/components/water/WaterBody.d.ts.map +1 -1
- package/dist/components/water/WaterBody.js +3 -1
- package/dist/components/water/types.d.ts +5 -1
- package/dist/components/water/types.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useCloudSun.d.ts +9 -4
- package/dist/hooks/useCloudSun.d.ts.map +1 -1
- package/dist/hooks/useCloudSun.js +17 -7
- package/dist/hooks/useConfigLive.d.ts +3 -2
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.js +4 -10
- package/dist/hooks/useEnvironmentProbe.d.ts +3 -22
- package/dist/hooks/useEnvironmentProbe.d.ts.map +1 -1
- package/dist/hooks/useEnvironmentProbe.js +47 -8
- package/dist/hooks/useGridSurface.d.ts +3 -10
- package/dist/hooks/useGridSurface.d.ts.map +1 -1
- package/dist/hooks/useGridSurface.js +5 -31
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +19 -72
- package/dist/hooks/useLightConfig.d.ts +2 -1
- package/dist/hooks/useLightConfig.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.d.ts +6 -2
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +37 -2
- package/dist/hooks/useSkyLive.d.ts +23 -0
- package/dist/hooks/useSkyLive.d.ts.map +1 -0
- package/dist/hooks/useSkyLive.js +30 -0
- package/dist/hooks/useSkyUniforms.d.ts.map +1 -1
- package/dist/hooks/useSkyUniforms.js +2 -10
- package/dist/hooks/useTerrainLive.d.ts +3 -1
- package/dist/hooks/useTerrainLive.d.ts.map +1 -1
- package/dist/hooks/useTerrainTextures.d.ts +38 -0
- package/dist/hooks/useTerrainTextures.d.ts.map +1 -0
- package/dist/hooks/useTerrainTextures.js +149 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/operations/catalogue/blastOff.d.ts +3 -0
- package/dist/operations/catalogue/blastOff.d.ts.map +1 -0
- package/dist/operations/catalogue/blastOff.js +118 -0
- package/dist/operations/catalogue/bounce.d.ts +3 -0
- package/dist/operations/catalogue/bounce.d.ts.map +1 -0
- package/dist/operations/catalogue/bounce.js +34 -0
- package/dist/operations/catalogue/curlSmoke.d.ts.map +1 -1
- package/dist/operations/catalogue/curlSmoke.js +3 -1
- package/dist/operations/catalogue/dissolve.d.ts.map +1 -1
- package/dist/operations/catalogue/dissolve.js +2 -1
- package/dist/operations/catalogue/driftUp.d.ts +3 -0
- package/dist/operations/catalogue/driftUp.d.ts.map +1 -0
- package/dist/operations/catalogue/driftUp.js +57 -0
- package/dist/operations/catalogue/emberAsh.d.ts.map +1 -1
- package/dist/operations/catalogue/emberAsh.js +2 -1
- package/dist/operations/catalogue/flip.d.ts.map +1 -1
- package/dist/operations/catalogue/flip.js +19 -9
- package/dist/operations/catalogue/float.d.ts +3 -0
- package/dist/operations/catalogue/float.d.ts.map +1 -0
- package/dist/operations/catalogue/float.js +39 -0
- package/dist/operations/catalogue/flyBy.d.ts +3 -0
- package/dist/operations/catalogue/flyBy.d.ts.map +1 -0
- package/dist/operations/catalogue/flyBy.js +79 -0
- package/dist/operations/catalogue/frost.d.ts.map +1 -1
- package/dist/operations/catalogue/frost.js +10 -3
- package/dist/operations/catalogue/grow.d.ts +3 -0
- package/dist/operations/catalogue/grow.d.ts.map +1 -0
- package/dist/operations/catalogue/grow.js +19 -0
- package/dist/operations/catalogue/hologram.d.ts.map +1 -1
- package/dist/operations/catalogue/hologram.js +11 -5
- package/dist/operations/catalogue/jelly.d.ts.map +1 -1
- package/dist/operations/catalogue/jelly.js +18 -8
- package/dist/operations/catalogue/knockAway.d.ts +3 -0
- package/dist/operations/catalogue/knockAway.d.ts.map +1 -0
- package/dist/operations/catalogue/knockAway.js +74 -0
- package/dist/operations/catalogue/leafFall.d.ts +3 -0
- package/dist/operations/catalogue/leafFall.d.ts.map +1 -0
- package/dist/operations/catalogue/leafFall.js +74 -0
- package/dist/operations/catalogue/lidarScan.d.ts.map +1 -1
- package/dist/operations/catalogue/lidarScan.js +4 -1
- package/dist/operations/catalogue/metalize.d.ts.map +1 -1
- package/dist/operations/catalogue/metalize.js +8 -2
- package/dist/operations/catalogue/motionTrail.d.ts +6 -0
- package/dist/operations/catalogue/motionTrail.d.ts.map +1 -0
- package/dist/operations/catalogue/motionTrail.js +221 -0
- package/dist/operations/catalogue/petrify.d.ts.map +1 -1
- package/dist/operations/catalogue/petrify.js +9 -3
- package/dist/operations/catalogue/physicalExit.d.ts +55 -0
- package/dist/operations/catalogue/physicalExit.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalExit.js +165 -0
- package/dist/operations/catalogue/physicalHeld.d.ts +41 -0
- package/dist/operations/catalogue/physicalHeld.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalHeld.js +78 -0
- package/dist/operations/catalogue/physicalMix.d.ts +45 -0
- package/dist/operations/catalogue/physicalMix.d.ts.map +1 -0
- package/dist/operations/catalogue/physicalMix.js +144 -0
- package/dist/operations/catalogue/pop.d.ts +3 -0
- package/dist/operations/catalogue/pop.d.ts.map +1 -0
- package/dist/operations/catalogue/pop.js +44 -0
- package/dist/operations/catalogue/print3d.d.ts.map +1 -1
- package/dist/operations/catalogue/print3d.js +5 -1
- package/dist/operations/catalogue/pulse.d.ts +3 -0
- package/dist/operations/catalogue/pulse.d.ts.map +1 -0
- package/dist/operations/catalogue/pulse.js +29 -0
- package/dist/operations/catalogue/restPose.d.ts +5 -7
- package/dist/operations/catalogue/restPose.d.ts.map +1 -1
- package/dist/operations/catalogue/restPose.js +18 -48
- package/dist/operations/catalogue/rotate.d.ts +3 -0
- package/dist/operations/catalogue/rotate.d.ts.map +1 -0
- package/dist/operations/catalogue/rotate.js +49 -0
- package/dist/operations/catalogue/shake.d.ts +3 -0
- package/dist/operations/catalogue/shake.d.ts.map +1 -0
- package/dist/operations/catalogue/shake.js +31 -0
- package/dist/operations/catalogue/shatter.d.ts.map +1 -1
- package/dist/operations/catalogue/shatter.js +5 -1
- package/dist/operations/catalogue/slam.d.ts +3 -0
- package/dist/operations/catalogue/slam.d.ts.map +1 -0
- package/dist/operations/catalogue/slam.js +89 -0
- package/dist/operations/catalogue/slingshot.d.ts +3 -0
- package/dist/operations/catalogue/slingshot.d.ts.map +1 -0
- package/dist/operations/catalogue/slingshot.js +88 -0
- package/dist/operations/catalogue/spin.d.ts.map +1 -1
- package/dist/operations/catalogue/spin.js +24 -13
- package/dist/operations/catalogue/sway.d.ts +3 -0
- package/dist/operations/catalogue/sway.d.ts.map +1 -0
- package/dist/operations/catalogue/sway.js +23 -0
- package/dist/operations/catalogue/swirl.d.ts.map +1 -1
- package/dist/operations/catalogue/swirl.js +6 -5
- package/dist/operations/catalogue/trailCore.d.ts +89 -0
- package/dist/operations/catalogue/trailCore.d.ts.map +1 -0
- package/dist/operations/catalogue/trailCore.js +190 -0
- package/dist/operations/catalogue/trailGhosts.d.ts +5 -0
- package/dist/operations/catalogue/trailGhosts.d.ts.map +1 -0
- package/dist/operations/catalogue/trailGhosts.js +179 -0
- package/dist/operations/catalogue/trailStampStyles.d.ts +11 -0
- package/dist/operations/catalogue/trailStampStyles.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStampStyles.js +479 -0
- package/dist/operations/catalogue/trailStamps.d.ts +57 -0
- package/dist/operations/catalogue/trailStamps.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStamps.js +349 -0
- package/dist/operations/catalogue/trailStreaks.d.ts +3 -0
- package/dist/operations/catalogue/trailStreaks.d.ts.map +1 -0
- package/dist/operations/catalogue/trailStreaks.js +147 -0
- package/dist/operations/catalogue/transitionField.d.ts +30 -0
- package/dist/operations/catalogue/transitionField.d.ts.map +1 -1
- package/dist/operations/catalogue/transitionField.js +21 -0
- package/dist/operations/catalogue/turnAway.d.ts +3 -0
- package/dist/operations/catalogue/turnAway.d.ts.map +1 -0
- package/dist/operations/catalogue/turnAway.js +54 -0
- package/dist/operations/catalogue/vortexDrain.d.ts +3 -0
- package/dist/operations/catalogue/vortexDrain.d.ts.map +1 -0
- package/dist/operations/catalogue/vortexDrain.js +68 -0
- package/dist/operations/catalogue/warp.d.ts +3 -0
- package/dist/operations/catalogue/warp.d.ts.map +1 -0
- package/dist/operations/catalogue/warp.js +73 -0
- package/dist/operations/catalogue/whoosh.d.ts +3 -0
- package/dist/operations/catalogue/whoosh.d.ts.map +1 -0
- package/dist/operations/catalogue/whoosh.js +84 -0
- package/dist/operations/catalogue/wobble.d.ts +3 -0
- package/dist/operations/catalogue/wobble.d.ts.map +1 -0
- package/dist/operations/catalogue/wobble.js +23 -0
- package/dist/operations/clipPreview.d.ts +3 -0
- package/dist/operations/clipPreview.d.ts.map +1 -0
- package/dist/operations/clipPreview.js +20 -0
- package/dist/operations/groupFanout.d.ts +96 -0
- package/dist/operations/groupFanout.d.ts.map +1 -0
- package/dist/operations/groupFanout.js +365 -0
- package/dist/operations/groups.d.ts +20 -0
- package/dist/operations/groups.d.ts.map +1 -0
- package/dist/operations/groups.js +66 -0
- package/dist/operations/index.d.ts +5 -2
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +5 -2
- package/dist/operations/objectEffects.d.ts +161 -6
- package/dist/operations/objectEffects.d.ts.map +1 -1
- package/dist/operations/objectEffects.js +1091 -17
- package/dist/operations/registry.d.ts.map +1 -1
- package/dist/operations/registry.js +24 -2
- package/dist/operations/runtime.d.ts +57 -2
- package/dist/operations/runtime.d.ts.map +1 -1
- package/dist/operations/runtime.js +161 -18
- package/dist/operations/types.d.ts +60 -3
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +5 -1
- package/dist/operations/useObjectEffectLayers.d.ts +2 -2
- package/dist/operations/useObjectEffectLayers.d.ts.map +1 -1
- package/dist/operations/useObjectEffectLayers.js +31 -10
- package/dist/operations/usePresentedVisibility.d.ts +10 -0
- package/dist/operations/usePresentedVisibility.d.ts.map +1 -0
- package/dist/operations/usePresentedVisibility.js +53 -0
- package/dist/presets/terrainBiomes.d.ts +67 -0
- package/dist/presets/terrainBiomes.d.ts.map +1 -0
- package/dist/presets/terrainBiomes.js +294 -0
- package/dist/presets/terrainPresets.d.ts +6 -0
- package/dist/presets/terrainPresets.d.ts.map +1 -1
- package/dist/presets/terrainPresets.js +26 -38
- package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
- package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/oceanCore.glsl.js +17 -0
- package/dist/shaders/glsl/surfaceCore.glsl.d.ts +21 -0
- package/dist/shaders/glsl/surfaceCore.glsl.d.ts.map +1 -0
- package/dist/shaders/glsl/surfaceCore.glsl.js +120 -0
- package/dist/shaders/glsl/terrainCore.glsl.d.ts +16 -3
- package/dist/shaders/glsl/terrainCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/terrainCore.glsl.js +266 -20
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +2 -0
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
- package/dist/shaders/ocean/OceanSurfaceMaterial.js +3 -0
- package/dist/shaders/terrain/TerrainMaterial.d.ts +17 -0
- package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
- package/dist/shaders/terrain/TerrainMaterial.js +107 -8
- package/dist/triggers/engine.d.ts +44 -0
- package/dist/triggers/engine.d.ts.map +1 -0
- package/dist/triggers/engine.js +165 -0
- package/dist/triggers/hosts/actions.d.ts +8 -0
- package/dist/triggers/hosts/actions.d.ts.map +1 -0
- package/dist/triggers/hosts/actions.js +22 -0
- package/dist/triggers/hosts/interactions.d.ts +6 -0
- package/dist/triggers/hosts/interactions.d.ts.map +1 -0
- package/dist/triggers/hosts/interactions.js +4 -0
- package/dist/triggers/hosts/timelineCues.d.ts +2 -0
- package/dist/triggers/hosts/timelineCues.d.ts.map +1 -0
- package/dist/triggers/hosts/timelineCues.js +22 -0
- package/dist/triggers/index.d.ts +13 -0
- package/dist/triggers/index.d.ts.map +1 -0
- package/dist/triggers/index.js +9 -0
- package/dist/triggers/kinds/action.d.ts +2 -0
- package/dist/triggers/kinds/action.d.ts.map +1 -0
- package/dist/triggers/kinds/action.js +31 -0
- package/dist/triggers/kinds/animations.d.ts +2 -0
- package/dist/triggers/kinds/animations.d.ts.map +1 -0
- package/dist/triggers/kinds/animations.js +75 -0
- package/dist/triggers/kinds/effects.d.ts +2 -0
- package/dist/triggers/kinds/effects.d.ts.map +1 -0
- package/dist/triggers/kinds/effects.js +27 -0
- package/dist/triggers/kinds/index.d.ts +4 -0
- package/dist/triggers/kinds/index.d.ts.map +1 -0
- package/dist/triggers/kinds/index.js +4 -0
- package/dist/triggers/log.d.ts +21 -0
- package/dist/triggers/log.d.ts.map +1 -0
- package/dist/triggers/log.js +43 -0
- package/dist/triggers/readiness.d.ts +40 -0
- package/dist/triggers/readiness.d.ts.map +1 -0
- package/dist/triggers/readiness.js +158 -0
- package/dist/triggers/registry.d.ts +41 -0
- package/dist/triggers/registry.d.ts.map +1 -0
- package/dist/triggers/registry.js +7 -0
- package/dist/types/gridConfigs.d.ts +18 -23
- package/dist/types/gridConfigs.d.ts.map +1 -1
- package/dist/ui/UiAnchorUpdater.d.ts +10 -0
- package/dist/ui/UiAnchorUpdater.d.ts.map +1 -0
- package/dist/ui/UiAnchorUpdater.js +111 -0
- package/dist/ui/UiLayers.d.ts +20 -0
- package/dist/ui/UiLayers.d.ts.map +1 -0
- package/dist/ui/UiLayers.js +57 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/uiAnchors.d.ts +21 -0
- package/dist/ui/uiAnchors.d.ts.map +1 -0
- package/dist/ui/uiAnchors.js +22 -0
- package/dist/ui/uiBaseStyles.d.ts +2 -0
- package/dist/ui/uiBaseStyles.d.ts.map +1 -0
- package/dist/ui/uiBaseStyles.js +100 -0
- package/dist/ui/uiBinder.d.ts +30 -0
- package/dist/ui/uiBinder.d.ts.map +1 -0
- package/dist/ui/uiBinder.js +344 -0
- package/dist/utils/configAnimations.d.ts.map +1 -1
- package/dist/utils/configAnimations.js +5 -1
- package/dist/utils/gridConfig.d.ts +1 -1
- package/dist/utils/gridConfig.d.ts.map +1 -1
- package/dist/utils/gridConfig.js +1 -1
- package/dist/utils/landPatch.d.ts +33 -0
- package/dist/utils/landPatch.d.ts.map +1 -0
- package/dist/utils/landPatch.js +114 -0
- package/dist/utils/renderedSky.d.ts +32 -0
- package/dist/utils/renderedSky.d.ts.map +1 -0
- package/dist/utils/renderedSky.js +57 -0
- package/dist/utils/skyMoon.d.ts +35 -0
- package/dist/utils/skyMoon.d.ts.map +1 -0
- package/dist/utils/skyMoon.js +41 -0
- package/dist/utils/terrainHeight.d.ts +4 -0
- package/dist/utils/terrainHeight.d.ts.map +1 -0
- package/dist/utils/terrainHeight.js +150 -0
- package/dist/utils/terrainTextureResolver.d.ts +18 -0
- package/dist/utils/terrainTextureResolver.d.ts.map +1 -0
- package/dist/utils/terrainTextureResolver.js +17 -0
- package/dist/utils/terrainUniforms.d.ts +17 -0
- package/dist/utils/terrainUniforms.d.ts.map +1 -1
- package/dist/utils/terrainUniforms.js +84 -0
- package/dist/utils/textureArrays.d.ts +29 -0
- package/dist/utils/textureArrays.d.ts.map +1 -0
- package/dist/utils/textureArrays.js +140 -0
- package/package.json +2 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export declare const handwriting: {
|
|
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
|
+
color: string;
|
|
15
|
+
color2: string;
|
|
16
|
+
weight: number;
|
|
17
|
+
wetTime: number;
|
|
18
|
+
sheen: number;
|
|
19
|
+
opacity: number;
|
|
20
|
+
penGlow: number;
|
|
21
|
+
};
|
|
22
|
+
gui: (string | number)[][];
|
|
23
|
+
structural: any[];
|
|
24
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
25
|
+
};
|
|
26
|
+
export declare const neonTube: {
|
|
27
|
+
key: string;
|
|
28
|
+
source: string;
|
|
29
|
+
drawMethods: string[];
|
|
30
|
+
eraseMethods: string[];
|
|
31
|
+
drawDefault: string;
|
|
32
|
+
eraseDefault: string;
|
|
33
|
+
catalog: {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
tags: string[];
|
|
37
|
+
};
|
|
38
|
+
defaults: {
|
|
39
|
+
color: string;
|
|
40
|
+
color2: string;
|
|
41
|
+
tube: number;
|
|
42
|
+
core: number;
|
|
43
|
+
glow: number;
|
|
44
|
+
flicker: number;
|
|
45
|
+
offLevel: number;
|
|
46
|
+
opacity: number;
|
|
47
|
+
};
|
|
48
|
+
gui: (string | number)[][];
|
|
49
|
+
structural: any[];
|
|
50
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
51
|
+
};
|
|
52
|
+
export declare const fourierSketch: {
|
|
53
|
+
key: string;
|
|
54
|
+
source: string;
|
|
55
|
+
drawMethods: string[];
|
|
56
|
+
eraseMethods: string[];
|
|
57
|
+
drawDefault: string;
|
|
58
|
+
eraseDefault: string;
|
|
59
|
+
catalog: {
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
tags: string[];
|
|
63
|
+
};
|
|
64
|
+
defaults: {
|
|
65
|
+
color: string;
|
|
66
|
+
color2: string;
|
|
67
|
+
line: number;
|
|
68
|
+
terms: number;
|
|
69
|
+
circles: number;
|
|
70
|
+
trail: number;
|
|
71
|
+
bridges: number;
|
|
72
|
+
glint: number;
|
|
73
|
+
opacity: number;
|
|
74
|
+
};
|
|
75
|
+
gui: (string | number)[][];
|
|
76
|
+
structural: string[];
|
|
77
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
78
|
+
};
|
|
79
|
+
export declare const VARIANTS: {
|
|
80
|
+
handwriting: {
|
|
81
|
+
key: string;
|
|
82
|
+
source: string;
|
|
83
|
+
drawMethods: string[];
|
|
84
|
+
eraseMethods: string[];
|
|
85
|
+
drawDefault: string;
|
|
86
|
+
eraseDefault: string;
|
|
87
|
+
catalog: {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
tags: string[];
|
|
91
|
+
};
|
|
92
|
+
defaults: {
|
|
93
|
+
color: string;
|
|
94
|
+
color2: string;
|
|
95
|
+
weight: number;
|
|
96
|
+
wetTime: number;
|
|
97
|
+
sheen: number;
|
|
98
|
+
opacity: number;
|
|
99
|
+
penGlow: number;
|
|
100
|
+
};
|
|
101
|
+
gui: (string | number)[][];
|
|
102
|
+
structural: any[];
|
|
103
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
104
|
+
};
|
|
105
|
+
neonTube: {
|
|
106
|
+
key: string;
|
|
107
|
+
source: string;
|
|
108
|
+
drawMethods: string[];
|
|
109
|
+
eraseMethods: string[];
|
|
110
|
+
drawDefault: string;
|
|
111
|
+
eraseDefault: string;
|
|
112
|
+
catalog: {
|
|
113
|
+
name: string;
|
|
114
|
+
description: string;
|
|
115
|
+
tags: string[];
|
|
116
|
+
};
|
|
117
|
+
defaults: {
|
|
118
|
+
color: string;
|
|
119
|
+
color2: string;
|
|
120
|
+
tube: number;
|
|
121
|
+
core: number;
|
|
122
|
+
glow: number;
|
|
123
|
+
flicker: number;
|
|
124
|
+
offLevel: number;
|
|
125
|
+
opacity: number;
|
|
126
|
+
};
|
|
127
|
+
gui: (string | number)[][];
|
|
128
|
+
structural: any[];
|
|
129
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
130
|
+
};
|
|
131
|
+
fourierSketch: {
|
|
132
|
+
key: string;
|
|
133
|
+
source: string;
|
|
134
|
+
drawMethods: string[];
|
|
135
|
+
eraseMethods: string[];
|
|
136
|
+
drawDefault: string;
|
|
137
|
+
eraseDefault: string;
|
|
138
|
+
catalog: {
|
|
139
|
+
name: string;
|
|
140
|
+
description: string;
|
|
141
|
+
tags: string[];
|
|
142
|
+
};
|
|
143
|
+
defaults: {
|
|
144
|
+
color: string;
|
|
145
|
+
color2: string;
|
|
146
|
+
line: number;
|
|
147
|
+
terms: number;
|
|
148
|
+
circles: number;
|
|
149
|
+
trail: number;
|
|
150
|
+
bridges: number;
|
|
151
|
+
glint: number;
|
|
152
|
+
opacity: number;
|
|
153
|
+
};
|
|
154
|
+
gui: (string | number)[][];
|
|
155
|
+
structural: string[];
|
|
156
|
+
build(layout: any, cfg: any, anim: any): any;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/components/text/engine/variants.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;CA0BvB,CAAC;AAyCF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;CAwBpB,CAAC;AA8DF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DzB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAqD,CAAC"}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { buildRibbon, ribbonMaterial, buildCapsules, capsuleMaterial, frag, setReveal, tips } from './ribbon.js';
|
|
3
|
+
import { prepare, applyAnim, extentOf, DRAW_METHODS, ERASE_METHODS } from './methods.js';
|
|
4
|
+
import { LOOKS } from './looks/index.js';
|
|
5
|
+
const hex = (h) => new THREE.Color(h);
|
|
6
|
+
// ---- shared: glowing points at the pen / front (a pool, one per active stroke) ---------------
|
|
7
|
+
function makeSpark(color) {
|
|
8
|
+
const g = new THREE.BufferGeometry();
|
|
9
|
+
g.setAttribute('position', new THREE.BufferAttribute(new Float32Array(3), 3));
|
|
10
|
+
const m = new THREE.ShaderMaterial({
|
|
11
|
+
uniforms: { uColor: { value: hex(color) }, uSize: { value: 0.05 }, uScale: { value: 800 }, uA: { value: 0 } },
|
|
12
|
+
vertexShader: /* glsl */ `uniform float uSize; uniform float uScale;
|
|
13
|
+
void main(){ vec4 mv = modelViewMatrix*vec4(position,1.0); gl_Position = projectionMatrix*mv; gl_PointSize = max(2.0, uSize*uScale/-mv.z); }`,
|
|
14
|
+
fragmentShader: /* glsl */ `uniform vec3 uColor; uniform float uA;
|
|
15
|
+
void main(){ vec2 p = gl_PointCoord*2.0-1.0; float r = length(p); float core = 1.0-smoothstep(0.0,0.28,r); float halo = pow(max(1.0-r,0.0),2.5)*0.55;
|
|
16
|
+
float a = (core*0.9+halo)*uA; if(a<0.004) discard; gl_FragColor = vec4(mix(uColor,vec3(1.0),0.6*core)*a, 1.0); }`,
|
|
17
|
+
transparent: true, depthWrite: false, blending: THREE.AdditiveBlending,
|
|
18
|
+
});
|
|
19
|
+
const p = new THREE.Points(g, m);
|
|
20
|
+
p.frustumCulled = false;
|
|
21
|
+
return p;
|
|
22
|
+
}
|
|
23
|
+
class SparkPool {
|
|
24
|
+
list;
|
|
25
|
+
group;
|
|
26
|
+
constructor(n, color) { this.list = []; this.group = new THREE.Group(); for (let i = 0; i < n; i++) {
|
|
27
|
+
const s = makeSpark(color);
|
|
28
|
+
this.list.push(s);
|
|
29
|
+
this.group.add(s);
|
|
30
|
+
} }
|
|
31
|
+
color(c) { this.list.forEach((s) => s.material.uniforms.uColor.value.set(c)); }
|
|
32
|
+
set(points, a, size, px) {
|
|
33
|
+
this.list.forEach((sp, i) => {
|
|
34
|
+
const p = points[i];
|
|
35
|
+
const pa = sp.geometry.attributes.position;
|
|
36
|
+
if (p) {
|
|
37
|
+
pa.setXYZ(0, p[0], p[1], 0.001);
|
|
38
|
+
pa.needsUpdate = true;
|
|
39
|
+
sp.material.uniforms.uA.value = a * (p[2] ?? 1);
|
|
40
|
+
sp.material.uniforms.uSize.value = size;
|
|
41
|
+
sp.material.uniforms.uScale.value = px;
|
|
42
|
+
}
|
|
43
|
+
else
|
|
44
|
+
sp.material.uniforms.uA.value = 0;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
dispose() { this.list.forEach((s) => { s.geometry.dispose(); s.material.dispose(); }); }
|
|
48
|
+
}
|
|
49
|
+
// =========================================================================================
|
|
50
|
+
// 1. handwriting — single-stroke pen paths derived from the font. Pen speed follows the 2/3 power law
|
|
51
|
+
// (slower in tight turns, where the ink pools). Wet ink dries from sheen colour to rest colour.
|
|
52
|
+
// Constant state: a slow sheen glint travels over the dry ink.
|
|
53
|
+
// =========================================================================================
|
|
54
|
+
const HW_FRAG = /* glsl */ `
|
|
55
|
+
uniform vec3 uColor; uniform vec3 uColor2; uniform float uOpacity; uniform float uWetT; uniform float uSheen;
|
|
56
|
+
void main(){
|
|
57
|
+
float fw = max(fwidth(vSide), 1e-4);
|
|
58
|
+
float edge = 1.0 - smoothstep(1.0 - 1.5*fw, 1.0, abs(vSide));
|
|
59
|
+
float a = edge*revealIn(0.0)*revealOut(0.0); if (a < 0.003) discard;
|
|
60
|
+
float age = ageAt(0.0);
|
|
61
|
+
float wet = exp(-age/uWetT);
|
|
62
|
+
vec3 col = mix(uColor*(0.8 + 0.2*clamp(vVar, 0.0, 1.0)), uColor2, wet*0.85);
|
|
63
|
+
col *= 1.0 - 0.14*smoothstep(0.5, 1.0, abs(vSide));
|
|
64
|
+
float ph = fract((vPos.x - uExt.x)/uExt.y*0.9 - uTime*0.16*uIdleSpeed);
|
|
65
|
+
float gl = exp(-pow((ph - 0.5)*9.0, 2.0)) * (0.5 + 0.5*clamp(vVar, 0.0, 1.0)) * smoothstep(0.4, 1.6, age);
|
|
66
|
+
col += uColor2*gl*uSheen*uIdle;
|
|
67
|
+
a *= uOpacity;
|
|
68
|
+
gl_FragColor = vec4(col*a, a);
|
|
69
|
+
#include <tonemapping_fragment>
|
|
70
|
+
#include <colorspace_fragment>
|
|
71
|
+
}`;
|
|
72
|
+
function finishStrokes(layout, mode, anim) {
|
|
73
|
+
const strokes = layout.strokes;
|
|
74
|
+
prepare(strokes, mode);
|
|
75
|
+
const G = layout.glyphs.length;
|
|
76
|
+
strokes.forEach((s) => { s.glyphN = s.glyph / Math.max(1, G - 1); });
|
|
77
|
+
return { strokes, G };
|
|
78
|
+
}
|
|
79
|
+
export const handwriting = {
|
|
80
|
+
key: 'handwriting', source: 'hand', drawMethods: DRAW_METHODS, eraseMethods: ERASE_METHODS, drawDefault: 'pen', eraseDefault: 'fade',
|
|
81
|
+
catalog: { name: 'Handwriting', description: 'A pen writes the text in single strokes, slowing in tight curves where the ink pools and drying from wet sheen to rest colour; a faint sheen drifts over the dry ink. Use for signatures, titles and invitations.', tags: ['handwriting', 'ink', 'pen', 'stroke', 'script'] },
|
|
82
|
+
defaults: { color: '#efe6d2', color2: '#ffd9a0', weight: 1, wetTime: 1.1, sheen: 0.35, opacity: 1, penGlow: 1 },
|
|
83
|
+
gui: [['weight', 0.4, 2.5, 0.01], ['wetTime', 0.2, 3, 0.05], ['sheen', 0, 1, 0.01], ['opacity', 0, 1, 0.01], ['penGlow', 0, 2, 0.05], ['color', 'color'], ['color2', 'color']],
|
|
84
|
+
structural: [],
|
|
85
|
+
build(layout, cfg, anim) {
|
|
86
|
+
const { strokes, G } = finishStrokes(layout, 'hand');
|
|
87
|
+
strokes.forEach((s) => { if (s.wfactor)
|
|
88
|
+
s.pressure = Float32Array.from(s.wfactor, (f) => Math.max(-0.5, Math.min(1.6, (f - 0.55) / 0.9))); });
|
|
89
|
+
const natural = layout.natural || 0.03;
|
|
90
|
+
const { infoD, infoE } = applyAnim(strokes, anim, G);
|
|
91
|
+
const geo = buildRibbon(strokes);
|
|
92
|
+
const mat = ribbonMaterial(frag(HW_FRAG), { uColor: { value: hex(cfg.color) }, uColor2: { value: hex(cfg.color2) }, uOpacity: { value: 1 }, uWetT: { value: cfg.wetTime }, uSheen: { value: cfg.sheen } }, '(0.55 + 0.9*clamp(aVar.x, -0.5, 1.6))', false);
|
|
93
|
+
const e = extentOf(strokes);
|
|
94
|
+
mat.uniforms.uExt.value.set(e.x0, e.w);
|
|
95
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
96
|
+
mesh.frustumCulled = false;
|
|
97
|
+
const pool = new SparkPool(24, cfg.color2);
|
|
98
|
+
const group = new THREE.Group();
|
|
99
|
+
group.add(mesh, pool.group);
|
|
100
|
+
const api = {
|
|
101
|
+
object: group,
|
|
102
|
+
apply(c) { const u = mat.uniforms; u.uColor.value.set(c.color); u.uColor2.value.set(c.color2); u.uHalf.value = natural * c.weight / 2; u.uOpacity.value = c.opacity; u.uWetT.value = c.wetTime; u.uSheen.value = c.sheen; pool.color(c.color2); api.c = c; },
|
|
103
|
+
update(S, time, px) {
|
|
104
|
+
setReveal(mat.uniforms, S, infoD, infoE, anim.draw.duration, time);
|
|
105
|
+
const on = infoD.tip && S.d > 0 && S.d < 1 && S.e <= 0;
|
|
106
|
+
pool.set(on ? tips(strokes, mat.uniforms.uHead.value, 24) : [], (api.c.penGlow || 0), natural * api.c.weight * 1.6, px);
|
|
107
|
+
},
|
|
108
|
+
dispose() { geo.dispose(); mat.dispose(); pool.dispose(); },
|
|
109
|
+
};
|
|
110
|
+
api.apply(cfg);
|
|
111
|
+
return api;
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
// =========================================================================================
|
|
115
|
+
// 2. neonTube — outline contours as glass tubing. A gas discharge ignites each contour (hot white core, stutter
|
|
116
|
+
// before it settles). Constant state: mains hum, slow breathing and the odd micro-dip in a single letter.
|
|
117
|
+
// Unlit glass is faintly visible before ignition and until erased.
|
|
118
|
+
// =========================================================================================
|
|
119
|
+
const NEON_FRAG = /* glsl */ `
|
|
120
|
+
uniform vec3 uColor; uniform vec3 uColor2; uniform float uCore; uniform float uGlow; uniform float uOpacity; uniform float uOff; uniform float uFlicker;
|
|
121
|
+
float vn(float x, float seed){ float i = floor(x); float f = fract(x); f = f*f*(3.0 - 2.0*f); return mix(h21(vec2(i, seed)), h21(vec2(i + 1.0, seed)), f); }
|
|
122
|
+
void main(){
|
|
123
|
+
float dist = length(vec2(max(abs(vXY.x) - vHL, 0.0), vXY.y));
|
|
124
|
+
float s = dist / uHalf;
|
|
125
|
+
float fw = max(fwidth(s), 1e-4); // derivatives first: no discard before them
|
|
126
|
+
float f = clamp((vXY.x + vHL)/(2.0*max(vHL,1e-6)), 0.0, 1.0);
|
|
127
|
+
float lit = revealIn(f);
|
|
128
|
+
float gone = revealOut(f);
|
|
129
|
+
float ageS = ageAt(f);
|
|
130
|
+
float front = exp(-ageS/0.2);
|
|
131
|
+
// all flicker is smooth value-noise in time and shared by every segment of a letter: no blocky or aliased jitter
|
|
132
|
+
float gs = vGlyph*17.3 + 3.1;
|
|
133
|
+
float stutter = smoothstep(0.15, 0.85, vn(uTime*6.0, gs));
|
|
134
|
+
float fl = mix(1.0, 0.72 + 0.28*stutter, uFlicker*(1.0 - smoothstep(0.2, 1.1, ageS))*step(0.01, lit));
|
|
135
|
+
// constant state: slow breathing, a faint slow shimmer and a rare, smooth micro-dip of a single letter
|
|
136
|
+
float hum = 1.0 - 0.025*uFlicker*uIdle*vn(uTime*2.5*uIdleSpeed, gs + 9.0);
|
|
137
|
+
float breath = 1.0 + 0.05*uIdle*sin(uTime*1.3*uIdleSpeed + vGlyph*6.0);
|
|
138
|
+
float slot = floor(uTime*0.4*uIdleSpeed); float u = fract(uTime*0.4*uIdleSpeed);
|
|
139
|
+
float dip = step(0.975, h21(vec2(slot, gs))) * exp(-pow((u - 0.5)*7.0, 2.0)) * 0.4 * uIdle * uFlicker;
|
|
140
|
+
float steady = hum*breath*(1.0 - dip);
|
|
141
|
+
float coreW = max(uCore, 2.2*fw);
|
|
142
|
+
float core = 1.0 - smoothstep(coreW*0.55, coreW, s);
|
|
143
|
+
float halo = pow(max(1.0 - s, 0.0), 2.6);
|
|
144
|
+
vec3 hot = mix(uColor2, vec3(1.0), 0.55);
|
|
145
|
+
vec3 on = hot*core*(0.82 + 0.45*front) + uColor*halo*uGlow*(0.45 + 0.7*front);
|
|
146
|
+
vec3 off = uColor*uOff*(core*0.9 + halo*0.2);
|
|
147
|
+
vec3 col = mix(off, on*fl*steady, lit)*gone*uOpacity*(1.0 - step(1.0, s));
|
|
148
|
+
gl_FragColor = vec4(col, 1.0);
|
|
149
|
+
#include <tonemapping_fragment>
|
|
150
|
+
#include <colorspace_fragment>
|
|
151
|
+
}`;
|
|
152
|
+
export const neonTube = {
|
|
153
|
+
key: 'neonTube', source: 'outline', drawMethods: DRAW_METHODS, eraseMethods: ERASE_METHODS, drawDefault: 'trace', eraseDefault: 'undraw',
|
|
154
|
+
catalog: { name: 'Neon Tube', description: 'Letter outlines as glass neon tubing: a gas discharge ignites each contour, stuttering before it settles into a steady hum with slow breathing and the odd micro-dip. Use for signs, nightlife and retro titles.', tags: ['neon', 'tube', 'glow', 'sign', 'outline'] },
|
|
155
|
+
defaults: { color: '#ff2f9a', color2: '#ffd2ec', tube: 0.04, core: 0.22, glow: 1, flicker: 1, offLevel: 0.07, opacity: 1 },
|
|
156
|
+
gui: [['tube', 0.015, 0.12, 0.001], ['core', 0.08, 0.5, 0.01], ['glow', 0, 2, 0.05], ['flicker', 0, 1, 0.05], ['offLevel', 0, 0.4, 0.01], ['opacity', 0, 1, 0.01], ['color', 'color'], ['color2', 'color']],
|
|
157
|
+
structural: [],
|
|
158
|
+
build(layout, cfg, anim) {
|
|
159
|
+
const { strokes, G } = finishStrokes(layout, 'outline');
|
|
160
|
+
const { infoD, infoE } = applyAnim(strokes, anim, G);
|
|
161
|
+
const geo = buildCapsules(strokes);
|
|
162
|
+
const mat = capsuleMaterial(NEON_FRAG, { uColor: { value: hex(cfg.color) }, uColor2: { value: hex(cfg.color2) }, uCore: { value: cfg.core }, uGlow: { value: cfg.glow }, uOpacity: { value: 1 }, uOff: { value: cfg.offLevel }, uFlicker: { value: cfg.flicker } });
|
|
163
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
164
|
+
mesh.frustumCulled = false;
|
|
165
|
+
const pool = new SparkPool(24, cfg.color2);
|
|
166
|
+
const group = new THREE.Group();
|
|
167
|
+
group.add(mesh, pool.group);
|
|
168
|
+
const api = {
|
|
169
|
+
object: group,
|
|
170
|
+
apply(c) { const u = mat.uniforms; u.uColor.value.set(c.color); u.uColor2.value.set(c.color2); u.uHalf.value = c.tube * 2; u.uCore.value = c.core; u.uGlow.value = c.glow; u.uOpacity.value = c.opacity; u.uOff.value = c.offLevel; u.uFlicker.value = c.flicker; pool.color(c.color2); api.c = c; },
|
|
171
|
+
update(S, time, px) {
|
|
172
|
+
setReveal(mat.uniforms, S, infoD, infoE, anim.draw.duration, time);
|
|
173
|
+
const on = infoD.tip && S.d > 0 && S.d < 1 && S.e <= 0;
|
|
174
|
+
pool.set(on ? tips(strokes, mat.uniforms.uHead.value, 24) : [], 0.8, api.c.tube * 1.5, px);
|
|
175
|
+
},
|
|
176
|
+
dispose() { geo.dispose(); mat.dispose(); pool.dispose(); },
|
|
177
|
+
};
|
|
178
|
+
api.apply(cfg);
|
|
179
|
+
return api;
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
// =========================================================================================
|
|
183
|
+
// 3. fourierSketch — every glyph is one closed complex curve z(t); its discrete Fourier series
|
|
184
|
+
// z(t) = sum c_k e^{i 2 pi k t} is drawn by a chain of rotating circles (epicycles), largest first.
|
|
185
|
+
// Constant state: glints travel round each contour. Counters are joined to the outer contour by dim bridge strokes.
|
|
186
|
+
// =========================================================================================
|
|
187
|
+
function glyphCurve(layout, gi, N) {
|
|
188
|
+
const segs = [];
|
|
189
|
+
const sts = layout.glyphs[gi].strokes.map((i) => layout.strokes[i]);
|
|
190
|
+
sts.forEach((s, i) => {
|
|
191
|
+
segs.push({ p: Array.from(s.pts), bridge: false });
|
|
192
|
+
const nx = sts[(i + 1) % sts.length];
|
|
193
|
+
segs.push({ p: [s.pts[s.pts.length - 2], s.pts[s.pts.length - 1], nx.pts[0], nx.pts[1]], bridge: true });
|
|
194
|
+
});
|
|
195
|
+
const pts = [], flag = [], cum = [0];
|
|
196
|
+
for (const sg of segs)
|
|
197
|
+
for (let i = 0; i < sg.p.length; i += 2) {
|
|
198
|
+
pts.push(sg.p[i], sg.p[i + 1]);
|
|
199
|
+
flag.push(sg.bridge ? 1 : 0);
|
|
200
|
+
}
|
|
201
|
+
const n = pts.length / 2;
|
|
202
|
+
for (let i = 1; i < n; i++)
|
|
203
|
+
cum.push(cum[i - 1] + Math.hypot(pts[2 * i] - pts[2 * i - 2], pts[2 * i + 1] - pts[2 * i - 1]));
|
|
204
|
+
const L = cum[n - 1];
|
|
205
|
+
const X = new Float64Array(N), Y = new Float64Array(N), F = new Uint8Array(N);
|
|
206
|
+
let j = 0;
|
|
207
|
+
for (let i = 0; i < N; i++) {
|
|
208
|
+
const d = (i / N) * L;
|
|
209
|
+
while (j < n - 2 && cum[j + 1] < d)
|
|
210
|
+
j++;
|
|
211
|
+
const f = (d - cum[j]) / Math.max(1e-9, cum[j + 1] - cum[j]);
|
|
212
|
+
X[i] = pts[2 * j] + (pts[2 * j + 2] - pts[2 * j]) * f;
|
|
213
|
+
Y[i] = pts[2 * j + 1] + (pts[2 * j + 3] - pts[2 * j + 1]) * f;
|
|
214
|
+
F[i] = flag[j] | flag[j + 1];
|
|
215
|
+
}
|
|
216
|
+
return { X, Y, F };
|
|
217
|
+
}
|
|
218
|
+
function dft(X, Y, K) {
|
|
219
|
+
const N = X.length;
|
|
220
|
+
const co = [];
|
|
221
|
+
for (let k = -N / 2; k < N / 2; k++) {
|
|
222
|
+
let re = 0, im = 0;
|
|
223
|
+
for (let n = 0; n < N; n++) {
|
|
224
|
+
const a = -2 * Math.PI * k * n / N, c = Math.cos(a), s = Math.sin(a);
|
|
225
|
+
re += X[n] * c - Y[n] * s;
|
|
226
|
+
im += X[n] * s + Y[n] * c;
|
|
227
|
+
}
|
|
228
|
+
co.push({ k, re: re / N, im: im / N, m: Math.hypot(re, im) / N });
|
|
229
|
+
}
|
|
230
|
+
co.sort((a, b) => b.m - a.m);
|
|
231
|
+
const top = co.slice(0, K);
|
|
232
|
+
const dc = co.find((c) => c.k === 0);
|
|
233
|
+
if (!top.includes(dc))
|
|
234
|
+
top.push(dc);
|
|
235
|
+
const kmax = Math.max(1, ...top.map((c) => Math.abs(c.k)));
|
|
236
|
+
for (const c of top) {
|
|
237
|
+
const x = Math.PI * c.k / (kmax + 1);
|
|
238
|
+
const sg = c.k === 0 ? 1 : Math.sin(x) / x;
|
|
239
|
+
c.re *= sg;
|
|
240
|
+
c.im *= sg;
|
|
241
|
+
c.m *= Math.abs(sg);
|
|
242
|
+
} // Lanczos sigma: tames Gibbs ripple
|
|
243
|
+
top.sort((a, b) => Number(b.k === 0) - Number(a.k === 0) || b.m - a.m);
|
|
244
|
+
return top;
|
|
245
|
+
}
|
|
246
|
+
const FS_FRAG = /* glsl */ `
|
|
247
|
+
uniform vec3 uColor; uniform vec3 uColor2; uniform float uOpacity; uniform float uTrail; uniform float uBridge; uniform float uGlint;
|
|
248
|
+
void main(){
|
|
249
|
+
float fw = max(fwidth(vSide), 1e-4);
|
|
250
|
+
float edge = 1.0 - smoothstep(1.0 - 1.5*fw, 1.0, abs(vSide));
|
|
251
|
+
float a = edge*revealIn(0.0)*revealOut(0.0)*mix(1.0, uBridge, clamp(vVar, 0.0, 1.0)); if (a < 0.003) discard;
|
|
252
|
+
float age = ageAt(0.0);
|
|
253
|
+
vec3 col = mix(uColor, uColor2, exp(-age/uTrail));
|
|
254
|
+
float ph = fract(arcAt(0.0) - uTime*0.11*uIdleSpeed + vGlyph*0.43);
|
|
255
|
+
float gl = exp(-pow((ph - 0.5)*11.0, 2.0)) * smoothstep(0.4, 1.6, age);
|
|
256
|
+
col = mix(col, uColor2, gl*0.75*uIdle*uGlint) + uColor2*gl*0.25*uIdle*uGlint;
|
|
257
|
+
gl_FragColor = vec4(col*a*uOpacity*0.9, 1.0);
|
|
258
|
+
#include <tonemapping_fragment>
|
|
259
|
+
#include <colorspace_fragment>
|
|
260
|
+
}`;
|
|
261
|
+
const RING_VERT = /* glsl */ `
|
|
262
|
+
attribute vec2 aq; attribute vec2 iC; attribute float iR; attribute float iA;
|
|
263
|
+
varying vec2 vP; varying float vR; varying float vA;
|
|
264
|
+
void main(){ vR = iR; vA = iA; float e = iR + 0.02; vP = aq*e; vec2 w = iC + vP; gl_Position = projectionMatrix*modelViewMatrix*vec4(w, 0.0, 1.0); }`;
|
|
265
|
+
const RING_FRAG = /* glsl */ `
|
|
266
|
+
precision highp float; uniform vec3 uColor; uniform float uW; uniform float uOpacity;
|
|
267
|
+
varying vec2 vP; varying float vR; varying float vA;
|
|
268
|
+
void main(){ float d = abs(length(vP) - vR); float fw = max(fwidth(d), 1e-5); float a = (1.0 - smoothstep(uW - fw, uW + fw, d))*vA*uOpacity; if (a < 0.003) discard;
|
|
269
|
+
gl_FragColor = vec4(uColor*a, 1.0); }`;
|
|
270
|
+
export const fourierSketch = {
|
|
271
|
+
key: 'fourierSketch', source: 'outline', drawMethods: ['epicycle', ...DRAW_METHODS], eraseMethods: ERASE_METHODS, drawDefault: 'epicycle', eraseDefault: 'fade',
|
|
272
|
+
catalog: { name: 'Fourier Sketch', description: 'Each letter is traced by a chain of rotating circles whose radii are its Fourier coefficients; more terms sharpen the form, and glints keep circling the finished contours. Use for science, math and generative titles.', tags: ['fourier', 'epicycle', 'math', 'harmonic', 'trace'] },
|
|
273
|
+
defaults: { color: '#5fd0ff', color2: '#fff1c2', line: 0.03, terms: 96, circles: 1, trail: 0.9, bridges: 0.14, glint: 1, opacity: 1 },
|
|
274
|
+
gui: [['line', 0.01, 0.1, 0.001], ['terms', 6, 128, 1], ['circles', 0, 1, 0.01], ['trail', 0.1, 4, 0.05], ['bridges', 0, 0.6, 0.01], ['glint', 0, 1, 0.01], ['opacity', 0, 1, 0.01], ['color', 'color'], ['color2', 'color']],
|
|
275
|
+
structural: ['terms'],
|
|
276
|
+
build(layout, cfg, anim) {
|
|
277
|
+
const G = layout.glyphs.length;
|
|
278
|
+
const N = 640, M = 900;
|
|
279
|
+
const K = Math.round(cfg.terms);
|
|
280
|
+
const strokes = [];
|
|
281
|
+
const coefs = [];
|
|
282
|
+
for (let gi = 0; gi < G; gi++) {
|
|
283
|
+
const { X, Y, F } = glyphCurve(layout, gi, N);
|
|
284
|
+
const co = dft(X, Y, K);
|
|
285
|
+
coefs.push(co);
|
|
286
|
+
const pts = new Float32Array((M + 1) * 2), pr = new Float32Array(M + 1), tt = new Float32Array(M + 1), cum = new Float32Array(M + 1);
|
|
287
|
+
for (let i = 0; i <= M; i++) {
|
|
288
|
+
const t = i / M;
|
|
289
|
+
let x = 0, y = 0;
|
|
290
|
+
for (const c of co) {
|
|
291
|
+
const a = 2 * Math.PI * c.k * t, cs = Math.cos(a), sn = Math.sin(a);
|
|
292
|
+
x += c.re * cs - c.im * sn;
|
|
293
|
+
y += c.re * sn + c.im * cs;
|
|
294
|
+
}
|
|
295
|
+
pts[2 * i] = x;
|
|
296
|
+
pts[2 * i + 1] = y;
|
|
297
|
+
pr[i] = F[Math.min(N - 1, Math.floor(t * N))];
|
|
298
|
+
tt[i] = t;
|
|
299
|
+
if (i)
|
|
300
|
+
cum[i] = cum[i - 1] + Math.hypot(x - pts[2 * i - 2], y - pts[2 * i - 1]);
|
|
301
|
+
}
|
|
302
|
+
strokes.push({ pts, cum, len: cum[M], closed: true, t: tt, pressure: pr, glyphN: gi / Math.max(1, G - 1), glyph: gi });
|
|
303
|
+
}
|
|
304
|
+
prepare(strokes, 'keep');
|
|
305
|
+
const { infoD, infoE } = applyAnim(strokes, anim, G);
|
|
306
|
+
const geo = buildRibbon(strokes);
|
|
307
|
+
const mat = ribbonMaterial(frag(FS_FRAG), { uColor: { value: hex(cfg.color) }, uColor2: { value: hex(cfg.color2) }, uOpacity: { value: 1 }, uTrail: { value: cfg.trail }, uBridge: { value: cfg.bridges }, uGlint: { value: cfg.glint } }, '1.0', true);
|
|
308
|
+
const ex = extentOf(strokes);
|
|
309
|
+
mat.uniforms.uExt.value.set(ex.x0, ex.w);
|
|
310
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
311
|
+
mesh.frustumCulled = false;
|
|
312
|
+
const rg = new THREE.InstancedBufferGeometry();
|
|
313
|
+
rg.setAttribute('aq', new THREE.BufferAttribute(new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]), 2));
|
|
314
|
+
rg.setIndex([0, 1, 2, 0, 2, 3]);
|
|
315
|
+
const iC = new THREE.InstancedBufferAttribute(new Float32Array(K * 2 + 2), 2), iR = new THREE.InstancedBufferAttribute(new Float32Array(K + 1), 1), iA = new THREE.InstancedBufferAttribute(new Float32Array(K + 1), 1);
|
|
316
|
+
iC.setUsage(THREE.DynamicDrawUsage);
|
|
317
|
+
iR.setUsage(THREE.DynamicDrawUsage);
|
|
318
|
+
iA.setUsage(THREE.DynamicDrawUsage);
|
|
319
|
+
rg.setAttribute('iC', iC);
|
|
320
|
+
rg.setAttribute('iR', iR);
|
|
321
|
+
rg.setAttribute('iA', iA);
|
|
322
|
+
rg.instanceCount = 0;
|
|
323
|
+
rg.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 1e3);
|
|
324
|
+
const rm = new THREE.ShaderMaterial({ uniforms: { uColor: { value: hex(cfg.color) }, uW: { value: 0.0026 }, uOpacity: { value: 1 } }, vertexShader: RING_VERT, fragmentShader: RING_FRAG, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, side: THREE.DoubleSide });
|
|
325
|
+
const rings = new THREE.Mesh(rg, rm);
|
|
326
|
+
rings.frustumCulled = false;
|
|
327
|
+
const lg = new THREE.BufferGeometry();
|
|
328
|
+
lg.setAttribute('position', new THREE.BufferAttribute(new Float32Array((K + 1) * 6), 3));
|
|
329
|
+
lg.setDrawRange(0, 0);
|
|
330
|
+
const lm = new THREE.LineBasicMaterial({ color: cfg.color, transparent: true, opacity: 0.4, blending: THREE.AdditiveBlending, depthWrite: false });
|
|
331
|
+
const lines = new THREE.LineSegments(lg, lm);
|
|
332
|
+
lines.frustumCulled = false;
|
|
333
|
+
const pool = new SparkPool(1, cfg.color2);
|
|
334
|
+
const group = new THREE.Group();
|
|
335
|
+
group.add(mesh, rings, lines, pool.group);
|
|
336
|
+
const epi = anim.draw.method === 'epicycle';
|
|
337
|
+
const api = {
|
|
338
|
+
object: group,
|
|
339
|
+
apply(c) { const u = mat.uniforms; u.uColor.value.set(c.color); u.uColor2.value.set(c.color2); u.uHalf.value = c.line / 2; u.uOpacity.value = c.opacity; u.uTrail.value = c.trail; u.uBridge.value = c.bridges; u.uGlint.value = c.glint; rm.uniforms.uColor.value.set(c.color); rm.uniforms.uOpacity.value = c.circles; lm.color.set(c.color); lm.opacity = 0.5 * c.circles; pool.color(c.color2); api.c = c; },
|
|
340
|
+
update(S, time, px) {
|
|
341
|
+
setReveal(mat.uniforms, S, infoD, infoE, anim.draw.duration, time);
|
|
342
|
+
const P = Math.min(0.99999, S.d);
|
|
343
|
+
const act = epi && S.d > 0 && S.d < 1 && S.e <= 0;
|
|
344
|
+
if (!act) {
|
|
345
|
+
rg.instanceCount = 0;
|
|
346
|
+
lg.setDrawRange(0, 0);
|
|
347
|
+
pool.set([], 0, 0.01, px);
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
const gi = Math.min(G - 1, Math.floor(P * G));
|
|
351
|
+
const t = P * G - gi;
|
|
352
|
+
const co = coefs[gi];
|
|
353
|
+
const fade = Math.min(1, t / 0.05) * Math.min(1, (1 - t) / 0.05);
|
|
354
|
+
let cx = 0, cy = 0;
|
|
355
|
+
const lp = lg.attributes.position;
|
|
356
|
+
co.forEach((c, i) => {
|
|
357
|
+
const a = 2 * Math.PI * c.k * t, cs = Math.cos(a), sn = Math.sin(a);
|
|
358
|
+
const tx = c.re * cs - c.im * sn, ty = c.re * sn + c.im * cs;
|
|
359
|
+
iC.setXY(i, cx, cy);
|
|
360
|
+
iR.setX(i, c.m);
|
|
361
|
+
iA.setX(i, i === 0 ? 0 : fade * Math.min(1, 0.35 + c.m * 30));
|
|
362
|
+
lp.setXYZ(2 * i, cx, cy, 0);
|
|
363
|
+
lp.setXYZ(2 * i + 1, cx + tx, cy + ty, 0);
|
|
364
|
+
cx += tx;
|
|
365
|
+
cy += ty;
|
|
366
|
+
});
|
|
367
|
+
iC.needsUpdate = iR.needsUpdate = iA.needsUpdate = lp.needsUpdate = true;
|
|
368
|
+
rg.instanceCount = co.length;
|
|
369
|
+
lg.setDrawRange(0, co.length * 2);
|
|
370
|
+
pool.set([[cx, cy]], fade * 0.9, api.c.line * 1.6, px);
|
|
371
|
+
},
|
|
372
|
+
dispose() { geo.dispose(); mat.dispose(); rg.dispose(); rm.dispose(); lg.dispose(); lm.dispose(); pool.dispose(); },
|
|
373
|
+
};
|
|
374
|
+
api.apply(cfg);
|
|
375
|
+
return api;
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
export const VARIANTS = { handwriting, neonTube, fourierSketch, ...LOOKS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architects-daughter.outline.d.ts","sourceRoot":"","sources":["../../../../src/components/text/fonts/architects-daughter.outline.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,IAAI,EAAE,GAAyt5J,CAAC;AACtu5J,eAAe,IAAI,CAAC"}
|