@appinternalleads/ui 0.4.0 → 0.4.1
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/cjs/agent/AgentComponent.js +1 -1
- package/dist/cjs/agent/AgentComponent.js.map +1 -1
- package/dist/cjs/agent/manifests.js +81 -1
- package/dist/cjs/agent/manifests.js.map +1 -1
- package/dist/cjs/agent/result.js +6 -0
- package/dist/cjs/agent/result.js.map +1 -1
- package/dist/cjs/components/catalog.js +18 -0
- package/dist/cjs/components/catalog.js.map +1 -1
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.js +21 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.types.js +6 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.types.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.web.js +89 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStage.web.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStatusView.js +62 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStatusView.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStill.js +20 -0
- package/dist/cjs/components/onboarding/animated-status/AnimatedStill.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/contract.js +87 -0
- package/dist/cjs/components/onboarding/animated-status/contract.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/engine.js +40 -0
- package/dist/cjs/components/onboarding/animated-status/engine.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/index.js +20 -0
- package/dist/cjs/components/onboarding/animated-status/index.js.map +1 -0
- package/dist/cjs/components/onboarding/animated-status/presets.json +126 -0
- package/dist/cjs/components/onboarding/animated-status/riv.js +7 -0
- package/dist/cjs/components/onboarding/animated-status/riv.js.map +1 -0
- package/dist/cjs/components/onboarding/index.js +4 -0
- package/dist/cjs/components/onboarding/index.js.map +1 -1
- package/dist/cjs/components/onboarding/presets.js +90 -84
- package/dist/cjs/components/onboarding/presets.js.map +1 -1
- package/dist/cjs/components/onboarding/receipt-printer/ReceiptStage.js +43 -6
- package/dist/cjs/components/onboarding/receipt-printer/ReceiptStage.js.map +1 -1
- package/dist/cjs/components/onboarding/send-completion/SendCompletionView.js +111 -0
- package/dist/cjs/components/onboarding/send-completion/SendCompletionView.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.js +37 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.types.js +6 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.types.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.web.js +107 -0
- package/dist/cjs/components/onboarding/send-completion/SendStage.web.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/SendStill.js +17 -0
- package/dist/cjs/components/onboarding/send-completion/SendStill.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/contract.js +83 -0
- package/dist/cjs/components/onboarding/send-completion/contract.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/engine.js +32 -0
- package/dist/cjs/components/onboarding/send-completion/engine.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/index.js +22 -0
- package/dist/cjs/components/onboarding/send-completion/index.js.map +1 -0
- package/dist/cjs/components/onboarding/send-completion/presets.json +132 -0
- package/dist/cjs/components/onboarding/send-completion/riv.js +7 -0
- package/dist/cjs/components/onboarding/send-completion/riv.js.map +1 -0
- package/dist/cjs/components/onboarding/shared/actions-data.js +2 -0
- package/dist/cjs/components/onboarding/shared/actions-data.js.map +1 -1
- package/dist/cjs/components/onboarding/shared/configColor.js +76 -0
- package/dist/cjs/components/onboarding/shared/configColor.js.map +1 -0
- package/dist/cjs/components/onboarding/shared/contract.js +4 -0
- package/dist/cjs/components/onboarding/shared/contract.js.map +1 -1
- package/dist/cjs/components/onboarding/shared/describe.js +1 -1
- package/dist/cjs/components/onboarding/shared/describe.js.map +1 -1
- package/dist/cjs/components/onboarding/shared/mock.js +2 -0
- package/dist/cjs/components/onboarding/shared/mock.js.map +1 -1
- package/dist/cjs/components/onboarding/views.js +8 -0
- package/dist/cjs/components/onboarding/views.js.map +1 -1
- package/dist/cjs/motion/MotionPlayer.js +42 -0
- package/dist/cjs/motion/MotionPlayer.js.map +1 -0
- package/dist/cjs/motion/agent.js +323 -0
- package/dist/cjs/motion/agent.js.map +1 -0
- package/dist/cjs/motion/cat/Cat.js +79 -0
- package/dist/cjs/motion/cat/Cat.js.map +1 -0
- package/dist/cjs/motion/cat/animation.js +204 -0
- package/dist/cjs/motion/cat/animation.js.map +1 -0
- package/dist/cjs/motion/cat/art.generated.js +37 -0
- package/dist/cjs/motion/cat/art.generated.js.map +1 -0
- package/dist/cjs/motion/cat/config.js +136 -0
- package/dist/cjs/motion/cat/config.js.map +1 -0
- package/dist/cjs/motion/cat/index.js +75 -0
- package/dist/cjs/motion/cat/index.js.map +1 -0
- package/dist/cjs/motion/cat/rig.js +99 -0
- package/dist/cjs/motion/cat/rig.js.map +1 -0
- package/dist/cjs/motion/cat/scene.js +148 -0
- package/dist/cjs/motion/cat/scene.js.map +1 -0
- package/dist/cjs/motion/configurable/config.js +477 -0
- package/dist/cjs/motion/configurable/config.js.map +1 -0
- package/dist/cjs/motion/configurable/controls.js +44 -0
- package/dist/cjs/motion/configurable/controls.js.map +1 -0
- package/dist/cjs/motion/easing.js +62 -0
- package/dist/cjs/motion/easing.js.map +1 -0
- package/dist/cjs/motion/fit.js +12 -0
- package/dist/cjs/motion/fit.js.map +1 -0
- package/dist/cjs/motion/index.js +101 -0
- package/dist/cjs/motion/index.js.map +1 -0
- package/dist/cjs/motion/neon/GlowRenderer.js +18 -0
- package/dist/cjs/motion/neon/GlowRenderer.js.map +1 -0
- package/dist/cjs/motion/neon/NeonCanvas.js +97 -0
- package/dist/cjs/motion/neon/NeonCanvas.js.map +1 -0
- package/dist/cjs/motion/neon/NeonText.js +108 -0
- package/dist/cjs/motion/neon/NeonText.js.map +1 -0
- package/dist/cjs/motion/neon/NeonTextFrame.js +36 -0
- package/dist/cjs/motion/neon/NeonTextFrame.js.map +1 -0
- package/dist/cjs/motion/neon/artwork.js +102 -0
- package/dist/cjs/motion/neon/artwork.js.map +1 -0
- package/dist/cjs/motion/neon/audio.js +165 -0
- package/dist/cjs/motion/neon/audio.js.map +1 -0
- package/dist/cjs/motion/neon/config.js +334 -0
- package/dist/cjs/motion/neon/config.js.map +1 -0
- package/dist/cjs/motion/neon/flicker.js +196 -0
- package/dist/cjs/motion/neon/flicker.js.map +1 -0
- package/dist/cjs/motion/neon/fonts.js +52 -0
- package/dist/cjs/motion/neon/fonts.js.map +1 -0
- package/dist/cjs/motion/neon/frame.js +24 -0
- package/dist/cjs/motion/neon/frame.js.map +1 -0
- package/dist/cjs/motion/neon/glitch.js +114 -0
- package/dist/cjs/motion/neon/glitch.js.map +1 -0
- package/dist/cjs/motion/neon/index.js +119 -0
- package/dist/cjs/motion/neon/index.js.map +1 -0
- package/dist/cjs/motion/neon/layers.js +68 -0
- package/dist/cjs/motion/neon/layers.js.map +1 -0
- package/dist/cjs/motion/neon/material.js +56 -0
- package/dist/cjs/motion/neon/material.js.map +1 -0
- package/dist/cjs/motion/neon/random.js +43 -0
- package/dist/cjs/motion/neon/random.js.map +1 -0
- package/dist/cjs/motion/neon/scene.js +549 -0
- package/dist/cjs/motion/neon/scene.js.map +1 -0
- package/dist/cjs/motion/neon/synth.js +213 -0
- package/dist/cjs/motion/neon/synth.js.map +1 -0
- package/dist/cjs/motion/neon/typography.js +81 -0
- package/dist/cjs/motion/neon/typography.js.map +1 -0
- package/dist/cjs/motion/neon/wall.js +113 -0
- package/dist/cjs/motion/neon/wall.js.map +1 -0
- package/dist/cjs/motion/paperfold/PaperFold.js +40 -0
- package/dist/cjs/motion/paperfold/PaperFold.js.map +1 -0
- package/dist/cjs/motion/paperfold/PaperFoldFrame.js +290 -0
- package/dist/cjs/motion/paperfold/PaperFoldFrame.js.map +1 -0
- package/dist/cjs/motion/paperfold/PaperFoldPlayer.js +59 -0
- package/dist/cjs/motion/paperfold/PaperFoldPlayer.js.map +1 -0
- package/dist/cjs/motion/paperfold/art.js +388 -0
- package/dist/cjs/motion/paperfold/art.js.map +1 -0
- package/dist/cjs/motion/paperfold/config.js +103 -0
- package/dist/cjs/motion/paperfold/config.js.map +1 -0
- package/dist/cjs/motion/paperfold/controls.js +493 -0
- package/dist/cjs/motion/paperfold/controls.js.map +1 -0
- package/dist/cjs/motion/paperfold/engine.js +722 -0
- package/dist/cjs/motion/paperfold/engine.js.map +1 -0
- package/dist/cjs/motion/paperfold/fonts.js +25 -0
- package/dist/cjs/motion/paperfold/fonts.js.map +1 -0
- package/dist/cjs/motion/paperfold/index.js +113 -0
- package/dist/cjs/motion/paperfold/index.js.map +1 -0
- package/dist/cjs/motion/paperfold/manipulate.js +170 -0
- package/dist/cjs/motion/paperfold/manipulate.js.map +1 -0
- package/dist/cjs/motion/paperfold/presets.js +119 -0
- package/dist/cjs/motion/paperfold/presets.js.map +1 -0
- package/dist/cjs/motion/paperfold/template.js +40 -0
- package/dist/cjs/motion/paperfold/template.js.map +1 -0
- package/dist/cjs/motion/player.js +203 -0
- package/dist/cjs/motion/player.js.map +1 -0
- package/dist/cjs/motion/promo/PromoFrame.js +293 -0
- package/dist/cjs/motion/promo/PromoFrame.js.map +1 -0
- package/dist/cjs/motion/promo/PromoShowcasePlayer.js +59 -0
- package/dist/cjs/motion/promo/PromoShowcasePlayer.js.map +1 -0
- package/dist/cjs/motion/promo/config.js +565 -0
- package/dist/cjs/motion/promo/config.js.map +1 -0
- package/dist/cjs/motion/promo/controls.js +571 -0
- package/dist/cjs/motion/promo/controls.js.map +1 -0
- package/dist/cjs/motion/promo/easing.js +35 -0
- package/dist/cjs/motion/promo/easing.js.map +1 -0
- package/dist/cjs/motion/promo/engine.js +567 -0
- package/dist/cjs/motion/promo/engine.js.map +1 -0
- package/dist/cjs/motion/promo/fonts.js +20 -0
- package/dist/cjs/motion/promo/fonts.js.map +1 -0
- package/dist/cjs/motion/promo/icons.js +29 -0
- package/dist/cjs/motion/promo/icons.js.map +1 -0
- package/dist/cjs/motion/promo/index.js +73 -0
- package/dist/cjs/motion/promo/index.js.map +1 -0
- package/dist/cjs/motion/promo/presets.js +44 -0
- package/dist/cjs/motion/promo/presets.js.map +1 -0
- package/dist/cjs/motion/promo/template.js +38 -0
- package/dist/cjs/motion/promo/template.js.map +1 -0
- package/dist/cjs/motion/replication2/Replication2Player.js +93 -0
- package/dist/cjs/motion/replication2/Replication2Player.js.map +1 -0
- package/dist/cjs/motion/replication2/config.js +352 -0
- package/dist/cjs/motion/replication2/config.js.map +1 -0
- package/dist/cjs/motion/replication2/controls.js +286 -0
- package/dist/cjs/motion/replication2/controls.js.map +1 -0
- package/dist/cjs/motion/replication2/driver.js +68 -0
- package/dist/cjs/motion/replication2/driver.js.map +1 -0
- package/dist/cjs/motion/replication2/easing.js +97 -0
- package/dist/cjs/motion/replication2/easing.js.map +1 -0
- package/dist/cjs/motion/replication2/engine.js +481 -0
- package/dist/cjs/motion/replication2/engine.js.map +1 -0
- package/dist/cjs/motion/replication2/html.js +88 -0
- package/dist/cjs/motion/replication2/html.js.map +1 -0
- package/dist/cjs/motion/replication2/index.js +61 -0
- package/dist/cjs/motion/replication2/index.js.map +1 -0
- package/dist/cjs/motion/replication2/measure.js +30 -0
- package/dist/cjs/motion/replication2/measure.js.map +1 -0
- package/dist/cjs/motion/replication2/metrics.js +10 -0
- package/dist/cjs/motion/replication2/metrics.js.map +1 -0
- package/dist/cjs/motion/replication2/presets.js +67 -0
- package/dist/cjs/motion/replication2/presets.js.map +1 -0
- package/dist/cjs/motion/replication2/riv.js +7 -0
- package/dist/cjs/motion/replication2/riv.js.map +1 -0
- package/dist/cjs/motion/replication2/rive-contract.js +158 -0
- package/dist/cjs/motion/replication2/rive-contract.js.map +1 -0
- package/dist/cjs/motion/replication2/template.js +35 -0
- package/dist/cjs/motion/replication2/template.js.map +1 -0
- package/dist/cjs/motion/sample.js +149 -0
- package/dist/cjs/motion/sample.js.map +1 -0
- package/dist/cjs/motion/templates/hey-template.js +1552 -0
- package/dist/cjs/motion/templates/hey-template.js.map +1 -0
- package/dist/cjs/motion/templates/index.js +22 -0
- package/dist/cjs/motion/templates/index.js.map +1 -0
- package/dist/cjs/motion/templates/word-motion.js +1165 -0
- package/dist/cjs/motion/templates/word-motion.js.map +1 -0
- package/dist/cjs/motion/types.js +3 -0
- package/dist/cjs/motion/types.js.map +1 -0
- package/dist/cjs/motion/typesurface/TypeSurfaceCanvas.js +62 -0
- package/dist/cjs/motion/typesurface/TypeSurfaceCanvas.js.map +1 -0
- package/dist/cjs/motion/typesurface/art.js +861 -0
- package/dist/cjs/motion/typesurface/art.js.map +1 -0
- package/dist/cjs/motion/typesurface/config.js +269 -0
- package/dist/cjs/motion/typesurface/config.js.map +1 -0
- package/dist/cjs/motion/typesurface/engine.js +607 -0
- package/dist/cjs/motion/typesurface/engine.js.map +1 -0
- package/dist/cjs/motion/typesurface/fonts.js +45 -0
- package/dist/cjs/motion/typesurface/fonts.js.map +1 -0
- package/dist/cjs/motion/typesurface/index.js +72 -0
- package/dist/cjs/motion/typesurface/index.js.map +1 -0
- package/dist/cjs/motion/typesurface/layout.js +130 -0
- package/dist/cjs/motion/typesurface/layout.js.map +1 -0
- package/dist/cjs/motion/typesurface/ops.js +175 -0
- package/dist/cjs/motion/typesurface/ops.js.map +1 -0
- package/dist/cjs/motion/typesurface/presets.js +192 -0
- package/dist/cjs/motion/typesurface/presets.js.map +1 -0
- package/dist/cjs/motion/typesurface/renderer.js +672 -0
- package/dist/cjs/motion/typesurface/renderer.js.map +1 -0
- package/dist/cjs/motion/typesurface/shaders.js +300 -0
- package/dist/cjs/motion/typesurface/shaders.js.map +1 -0
- package/dist/cjs/motion/typesurface/surfaces.js +156 -0
- package/dist/cjs/motion/typesurface/surfaces.js.map +1 -0
- package/dist/cjs/motion/typesurface/text.js +34 -0
- package/dist/cjs/motion/typesurface/text.js.map +1 -0
- package/dist/cjs/motion/typesurface/timeline.js +64 -0
- package/dist/cjs/motion/typesurface/timeline.js.map +1 -0
- package/dist/cjs/motion/validate.js +89 -0
- package/dist/cjs/motion/validate.js.map +1 -0
- package/dist/cjs/native/RiveReceiptStage.js +9 -150
- package/dist/cjs/native/RiveReceiptStage.js.map +1 -1
- package/dist/cjs/native/riveReceiptStageFactory.js +162 -0
- package/dist/cjs/native/riveReceiptStageFactory.js.map +1 -0
- package/dist/cjs/tokens/stage.js +10 -0
- package/dist/cjs/tokens/stage.js.map +1 -0
- package/dist/esm/agent/AgentComponent.js +1 -1
- package/dist/esm/agent/AgentComponent.js.map +1 -1
- package/dist/esm/agent/manifests.d.ts.map +1 -1
- package/dist/esm/agent/manifests.js +81 -1
- package/dist/esm/agent/manifests.js.map +1 -1
- package/dist/esm/agent/result.d.ts.map +1 -1
- package/dist/esm/agent/result.js +6 -0
- package/dist/esm/agent/result.js.map +1 -1
- package/dist/esm/agent/types.d.ts +1 -1
- package/dist/esm/agent/types.d.ts.map +1 -1
- package/dist/esm/components/catalog.d.ts +1 -1
- package/dist/esm/components/catalog.d.ts.map +1 -1
- package/dist/esm/components/catalog.js +18 -0
- package/dist/esm/components/catalog.js.map +1 -1
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.d.ts +9 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.js +18 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.d.ts +31 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.js +3 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.d.ts +4 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.js +86 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.d.ts +32 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.js +59 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.d.ts +8 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.js +17 -0
- package/dist/esm/components/onboarding/animated-status/AnimatedStill.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/contract.d.ts +61 -0
- package/dist/esm/components/onboarding/animated-status/contract.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/contract.js +78 -0
- package/dist/esm/components/onboarding/animated-status/contract.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/engine.d.ts +24 -0
- package/dist/esm/components/onboarding/animated-status/engine.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/engine.js +32 -0
- package/dist/esm/components/onboarding/animated-status/engine.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/index.d.ts +5 -0
- package/dist/esm/components/onboarding/animated-status/index.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/index.js +4 -0
- package/dist/esm/components/onboarding/animated-status/index.js.map +1 -0
- package/dist/esm/components/onboarding/animated-status/presets.json +126 -0
- package/dist/esm/components/onboarding/animated-status/riv.d.ts +3 -0
- package/dist/esm/components/onboarding/animated-status/riv.d.ts.map +1 -0
- package/dist/esm/components/onboarding/animated-status/riv.js +4 -0
- package/dist/esm/components/onboarding/animated-status/riv.js.map +1 -0
- package/dist/esm/components/onboarding/index.d.ts +2 -0
- package/dist/esm/components/onboarding/index.d.ts.map +1 -1
- package/dist/esm/components/onboarding/index.js +4 -0
- package/dist/esm/components/onboarding/index.js.map +1 -1
- package/dist/esm/components/onboarding/presets.d.ts.map +1 -1
- package/dist/esm/components/onboarding/presets.js +6 -0
- package/dist/esm/components/onboarding/presets.js.map +1 -1
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.d.ts +4 -6
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.d.ts.map +1 -1
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.js +42 -6
- package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.js.map +1 -1
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.d.ts +47 -0
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.js +108 -0
- package/dist/esm/components/onboarding/send-completion/SendCompletionView.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.d.ts +9 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.js +34 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.d.ts +33 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.js +3 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.types.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.d.ts +4 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.js +104 -0
- package/dist/esm/components/onboarding/send-completion/SendStage.web.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.d.ts +11 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.js +14 -0
- package/dist/esm/components/onboarding/send-completion/SendStill.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/contract.d.ts +99 -0
- package/dist/esm/components/onboarding/send-completion/contract.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/contract.js +76 -0
- package/dist/esm/components/onboarding/send-completion/contract.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/engine.d.ts +20 -0
- package/dist/esm/components/onboarding/send-completion/engine.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/engine.js +28 -0
- package/dist/esm/components/onboarding/send-completion/engine.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/index.d.ts +6 -0
- package/dist/esm/components/onboarding/send-completion/index.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/index.js +6 -0
- package/dist/esm/components/onboarding/send-completion/index.js.map +1 -0
- package/dist/esm/components/onboarding/send-completion/presets.json +132 -0
- package/dist/esm/components/onboarding/send-completion/riv.d.ts +3 -0
- package/dist/esm/components/onboarding/send-completion/riv.d.ts.map +1 -0
- package/dist/esm/components/onboarding/send-completion/riv.js +4 -0
- package/dist/esm/components/onboarding/send-completion/riv.js.map +1 -0
- package/dist/esm/components/onboarding/shared/actions-data.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/actions-data.js +2 -0
- package/dist/esm/components/onboarding/shared/actions-data.js.map +1 -1
- package/dist/esm/components/onboarding/shared/configColor.d.ts +29 -0
- package/dist/esm/components/onboarding/shared/configColor.d.ts.map +1 -0
- package/dist/esm/components/onboarding/shared/configColor.js +69 -0
- package/dist/esm/components/onboarding/shared/configColor.js.map +1 -0
- package/dist/esm/components/onboarding/shared/contract.d.ts +1 -1
- package/dist/esm/components/onboarding/shared/contract.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/contract.js +4 -0
- package/dist/esm/components/onboarding/shared/contract.js.map +1 -1
- package/dist/esm/components/onboarding/shared/describe.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/describe.js +1 -1
- package/dist/esm/components/onboarding/shared/describe.js.map +1 -1
- package/dist/esm/components/onboarding/shared/mock.d.ts +2 -0
- package/dist/esm/components/onboarding/shared/mock.d.ts.map +1 -1
- package/dist/esm/components/onboarding/shared/mock.js +2 -0
- package/dist/esm/components/onboarding/shared/mock.js.map +1 -1
- package/dist/esm/components/onboarding/views.d.ts.map +1 -1
- package/dist/esm/components/onboarding/views.js +8 -0
- package/dist/esm/components/onboarding/views.js.map +1 -1
- package/dist/esm/motion/MotionPlayer.d.ts +22 -0
- package/dist/esm/motion/MotionPlayer.d.ts.map +1 -0
- package/dist/esm/motion/MotionPlayer.js +39 -0
- package/dist/esm/motion/MotionPlayer.js.map +1 -0
- package/dist/esm/motion/agent.d.ts +146 -0
- package/dist/esm/motion/agent.d.ts.map +1 -0
- package/dist/esm/motion/agent.js +278 -0
- package/dist/esm/motion/agent.js.map +1 -0
- package/dist/esm/motion/cat/Cat.d.ts +43 -0
- package/dist/esm/motion/cat/Cat.d.ts.map +1 -0
- package/dist/esm/motion/cat/Cat.js +74 -0
- package/dist/esm/motion/cat/Cat.js.map +1 -0
- package/dist/esm/motion/cat/animation.d.ts +86 -0
- package/dist/esm/motion/cat/animation.d.ts.map +1 -0
- package/dist/esm/motion/cat/animation.js +193 -0
- package/dist/esm/motion/cat/animation.js.map +1 -0
- package/dist/esm/motion/cat/art.generated.d.ts +53 -0
- package/dist/esm/motion/cat/art.generated.d.ts.map +1 -0
- package/dist/esm/motion/cat/art.generated.js +34 -0
- package/dist/esm/motion/cat/art.generated.js.map +1 -0
- package/dist/esm/motion/cat/config.d.ts +103 -0
- package/dist/esm/motion/cat/config.d.ts.map +1 -0
- package/dist/esm/motion/cat/config.js +129 -0
- package/dist/esm/motion/cat/config.js.map +1 -0
- package/dist/esm/motion/cat/index.d.ts +13 -0
- package/dist/esm/motion/cat/index.d.ts.map +1 -0
- package/dist/esm/motion/cat/index.js +13 -0
- package/dist/esm/motion/cat/index.js.map +1 -0
- package/dist/esm/motion/cat/rig.d.ts +44 -0
- package/dist/esm/motion/cat/rig.d.ts.map +1 -0
- package/dist/esm/motion/cat/rig.js +86 -0
- package/dist/esm/motion/cat/rig.js.map +1 -0
- package/dist/esm/motion/cat/scene.d.ts +66 -0
- package/dist/esm/motion/cat/scene.d.ts.map +1 -0
- package/dist/esm/motion/cat/scene.js +137 -0
- package/dist/esm/motion/cat/scene.js.map +1 -0
- package/dist/esm/motion/configurable/config.d.ts +80 -0
- package/dist/esm/motion/configurable/config.d.ts.map +1 -0
- package/dist/esm/motion/configurable/config.js +468 -0
- package/dist/esm/motion/configurable/config.js.map +1 -0
- package/dist/esm/motion/configurable/controls.d.ts +74 -0
- package/dist/esm/motion/configurable/controls.d.ts.map +1 -0
- package/dist/esm/motion/configurable/controls.js +38 -0
- package/dist/esm/motion/configurable/controls.js.map +1 -0
- package/dist/esm/motion/easing.d.ts +4 -0
- package/dist/esm/motion/easing.d.ts.map +1 -0
- package/dist/esm/motion/easing.js +58 -0
- package/dist/esm/motion/easing.js.map +1 -0
- package/dist/esm/motion/fit.d.ts +8 -0
- package/dist/esm/motion/fit.d.ts.map +1 -0
- package/dist/esm/motion/fit.js +8 -0
- package/dist/esm/motion/fit.js.map +1 -0
- package/dist/esm/motion/index.d.ts +27 -0
- package/dist/esm/motion/index.d.ts.map +1 -0
- package/dist/esm/motion/index.js +21 -0
- package/dist/esm/motion/index.js.map +1 -0
- package/dist/esm/motion/neon/GlowRenderer.d.ts +31 -0
- package/dist/esm/motion/neon/GlowRenderer.d.ts.map +1 -0
- package/dist/esm/motion/neon/GlowRenderer.js +14 -0
- package/dist/esm/motion/neon/GlowRenderer.js.map +1 -0
- package/dist/esm/motion/neon/NeonCanvas.d.ts +42 -0
- package/dist/esm/motion/neon/NeonCanvas.d.ts.map +1 -0
- package/dist/esm/motion/neon/NeonCanvas.js +92 -0
- package/dist/esm/motion/neon/NeonCanvas.js.map +1 -0
- package/dist/esm/motion/neon/NeonText.d.ts +26 -0
- package/dist/esm/motion/neon/NeonText.d.ts.map +1 -0
- package/dist/esm/motion/neon/NeonText.js +103 -0
- package/dist/esm/motion/neon/NeonText.js.map +1 -0
- package/dist/esm/motion/neon/NeonTextFrame.d.ts +29 -0
- package/dist/esm/motion/neon/NeonTextFrame.d.ts.map +1 -0
- package/dist/esm/motion/neon/NeonTextFrame.js +33 -0
- package/dist/esm/motion/neon/NeonTextFrame.js.map +1 -0
- package/dist/esm/motion/neon/artwork.d.ts +29 -0
- package/dist/esm/motion/neon/artwork.d.ts.map +1 -0
- package/dist/esm/motion/neon/artwork.js +98 -0
- package/dist/esm/motion/neon/artwork.js.map +1 -0
- package/dist/esm/motion/neon/audio.d.ts +49 -0
- package/dist/esm/motion/neon/audio.d.ts.map +1 -0
- package/dist/esm/motion/neon/audio.js +161 -0
- package/dist/esm/motion/neon/audio.js.map +1 -0
- package/dist/esm/motion/neon/config.d.ts +319 -0
- package/dist/esm/motion/neon/config.d.ts.map +1 -0
- package/dist/esm/motion/neon/config.js +319 -0
- package/dist/esm/motion/neon/config.js.map +1 -0
- package/dist/esm/motion/neon/flicker.d.ts +82 -0
- package/dist/esm/motion/neon/flicker.d.ts.map +1 -0
- package/dist/esm/motion/neon/flicker.js +187 -0
- package/dist/esm/motion/neon/flicker.js.map +1 -0
- package/dist/esm/motion/neon/fonts.d.ts +29 -0
- package/dist/esm/motion/neon/fonts.d.ts.map +1 -0
- package/dist/esm/motion/neon/fonts.js +47 -0
- package/dist/esm/motion/neon/fonts.js.map +1 -0
- package/dist/esm/motion/neon/frame.d.ts +22 -0
- package/dist/esm/motion/neon/frame.d.ts.map +1 -0
- package/dist/esm/motion/neon/frame.js +20 -0
- package/dist/esm/motion/neon/frame.js.map +1 -0
- package/dist/esm/motion/neon/glitch.d.ts +64 -0
- package/dist/esm/motion/neon/glitch.d.ts.map +1 -0
- package/dist/esm/motion/neon/glitch.js +108 -0
- package/dist/esm/motion/neon/glitch.js.map +1 -0
- package/dist/esm/motion/neon/index.d.ts +29 -0
- package/dist/esm/motion/neon/index.d.ts.map +1 -0
- package/dist/esm/motion/neon/index.js +28 -0
- package/dist/esm/motion/neon/index.js.map +1 -0
- package/dist/esm/motion/neon/layers.d.ts +56 -0
- package/dist/esm/motion/neon/layers.d.ts.map +1 -0
- package/dist/esm/motion/neon/layers.js +64 -0
- package/dist/esm/motion/neon/layers.js.map +1 -0
- package/dist/esm/motion/neon/material.d.ts +68 -0
- package/dist/esm/motion/neon/material.d.ts.map +1 -0
- package/dist/esm/motion/neon/material.js +51 -0
- package/dist/esm/motion/neon/material.js.map +1 -0
- package/dist/esm/motion/neon/random.d.ts +15 -0
- package/dist/esm/motion/neon/random.d.ts.map +1 -0
- package/dist/esm/motion/neon/random.js +37 -0
- package/dist/esm/motion/neon/random.js.map +1 -0
- package/dist/esm/motion/neon/scene.d.ts +255 -0
- package/dist/esm/motion/neon/scene.d.ts.map +1 -0
- package/dist/esm/motion/neon/scene.js +532 -0
- package/dist/esm/motion/neon/scene.js.map +1 -0
- package/dist/esm/motion/neon/synth.d.ts +18 -0
- package/dist/esm/motion/neon/synth.d.ts.map +1 -0
- package/dist/esm/motion/neon/synth.js +208 -0
- package/dist/esm/motion/neon/synth.js.map +1 -0
- package/dist/esm/motion/neon/typography.d.ts +53 -0
- package/dist/esm/motion/neon/typography.d.ts.map +1 -0
- package/dist/esm/motion/neon/typography.js +74 -0
- package/dist/esm/motion/neon/typography.js.map +1 -0
- package/dist/esm/motion/neon/wall.d.ts +62 -0
- package/dist/esm/motion/neon/wall.d.ts.map +1 -0
- package/dist/esm/motion/neon/wall.js +106 -0
- package/dist/esm/motion/neon/wall.js.map +1 -0
- package/dist/esm/motion/paperfold/PaperFold.d.ts +36 -0
- package/dist/esm/motion/paperfold/PaperFold.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/PaperFold.js +37 -0
- package/dist/esm/motion/paperfold/PaperFold.js.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.d.ts +39 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.js +283 -0
- package/dist/esm/motion/paperfold/PaperFoldFrame.js.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.d.ts +27 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.js +56 -0
- package/dist/esm/motion/paperfold/PaperFoldPlayer.js.map +1 -0
- package/dist/esm/motion/paperfold/art.d.ts +148 -0
- package/dist/esm/motion/paperfold/art.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/art.js +374 -0
- package/dist/esm/motion/paperfold/art.js.map +1 -0
- package/dist/esm/motion/paperfold/config.d.ts +47 -0
- package/dist/esm/motion/paperfold/config.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/config.js +96 -0
- package/dist/esm/motion/paperfold/config.js.map +1 -0
- package/dist/esm/motion/paperfold/controls.d.ts +57 -0
- package/dist/esm/motion/paperfold/controls.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/controls.js +506 -0
- package/dist/esm/motion/paperfold/controls.js.map +1 -0
- package/dist/esm/motion/paperfold/engine.d.ts +397 -0
- package/dist/esm/motion/paperfold/engine.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/engine.js +699 -0
- package/dist/esm/motion/paperfold/engine.js.map +1 -0
- package/dist/esm/motion/paperfold/fonts.d.ts +3 -0
- package/dist/esm/motion/paperfold/fonts.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/fonts.js +21 -0
- package/dist/esm/motion/paperfold/fonts.js.map +1 -0
- package/dist/esm/motion/paperfold/index.d.ts +17 -0
- package/dist/esm/motion/paperfold/index.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/index.js +17 -0
- package/dist/esm/motion/paperfold/index.js.map +1 -0
- package/dist/esm/motion/paperfold/manipulate.d.ts +59 -0
- package/dist/esm/motion/paperfold/manipulate.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/manipulate.js +161 -0
- package/dist/esm/motion/paperfold/manipulate.js.map +1 -0
- package/dist/esm/motion/paperfold/presets.d.ts +9 -0
- package/dist/esm/motion/paperfold/presets.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/presets.js +115 -0
- package/dist/esm/motion/paperfold/presets.js.map +1 -0
- package/dist/esm/motion/paperfold/template.d.ts +3 -0
- package/dist/esm/motion/paperfold/template.d.ts.map +1 -0
- package/dist/esm/motion/paperfold/template.js +37 -0
- package/dist/esm/motion/paperfold/template.js.map +1 -0
- package/dist/esm/motion/player.d.ts +35 -0
- package/dist/esm/motion/player.d.ts.map +1 -0
- package/dist/esm/motion/player.js +197 -0
- package/dist/esm/motion/player.js.map +1 -0
- package/dist/esm/motion/promo/PromoFrame.d.ts +31 -0
- package/dist/esm/motion/promo/PromoFrame.d.ts.map +1 -0
- package/dist/esm/motion/promo/PromoFrame.js +288 -0
- package/dist/esm/motion/promo/PromoFrame.js.map +1 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.d.ts +25 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.d.ts.map +1 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.js +56 -0
- package/dist/esm/motion/promo/PromoShowcasePlayer.js.map +1 -0
- package/dist/esm/motion/promo/config.d.ts +91 -0
- package/dist/esm/motion/promo/config.d.ts.map +1 -0
- package/dist/esm/motion/promo/config.js +550 -0
- package/dist/esm/motion/promo/config.js.map +1 -0
- package/dist/esm/motion/promo/controls.d.ts +86 -0
- package/dist/esm/motion/promo/controls.d.ts.map +1 -0
- package/dist/esm/motion/promo/controls.js +567 -0
- package/dist/esm/motion/promo/controls.js.map +1 -0
- package/dist/esm/motion/promo/easing.d.ts +3 -0
- package/dist/esm/motion/promo/easing.d.ts.map +1 -0
- package/dist/esm/motion/promo/easing.js +32 -0
- package/dist/esm/motion/promo/easing.js.map +1 -0
- package/dist/esm/motion/promo/engine.d.ts +205 -0
- package/dist/esm/motion/promo/engine.d.ts.map +1 -0
- package/dist/esm/motion/promo/engine.js +551 -0
- package/dist/esm/motion/promo/engine.js.map +1 -0
- package/dist/esm/motion/promo/fonts.d.ts +7 -0
- package/dist/esm/motion/promo/fonts.d.ts.map +1 -0
- package/dist/esm/motion/promo/fonts.js +16 -0
- package/dist/esm/motion/promo/fonts.js.map +1 -0
- package/dist/esm/motion/promo/icons.d.ts +7 -0
- package/dist/esm/motion/promo/icons.d.ts.map +1 -0
- package/dist/esm/motion/promo/icons.js +26 -0
- package/dist/esm/motion/promo/icons.js.map +1 -0
- package/dist/esm/motion/promo/index.d.ts +15 -0
- package/dist/esm/motion/promo/index.d.ts.map +1 -0
- package/dist/esm/motion/promo/index.js +15 -0
- package/dist/esm/motion/promo/index.js.map +1 -0
- package/dist/esm/motion/promo/presets.d.ts +13 -0
- package/dist/esm/motion/promo/presets.d.ts.map +1 -0
- package/dist/esm/motion/promo/presets.js +40 -0
- package/dist/esm/motion/promo/presets.js.map +1 -0
- package/dist/esm/motion/promo/template.d.ts +8 -0
- package/dist/esm/motion/promo/template.d.ts.map +1 -0
- package/dist/esm/motion/promo/template.js +35 -0
- package/dist/esm/motion/promo/template.js.map +1 -0
- package/dist/esm/motion/replication2/Replication2Player.d.ts +26 -0
- package/dist/esm/motion/replication2/Replication2Player.d.ts.map +1 -0
- package/dist/esm/motion/replication2/Replication2Player.js +90 -0
- package/dist/esm/motion/replication2/Replication2Player.js.map +1 -0
- package/dist/esm/motion/replication2/config.d.ts +78 -0
- package/dist/esm/motion/replication2/config.d.ts.map +1 -0
- package/dist/esm/motion/replication2/config.js +341 -0
- package/dist/esm/motion/replication2/config.js.map +1 -0
- package/dist/esm/motion/replication2/controls.d.ts +70 -0
- package/dist/esm/motion/replication2/controls.d.ts.map +1 -0
- package/dist/esm/motion/replication2/controls.js +283 -0
- package/dist/esm/motion/replication2/controls.js.map +1 -0
- package/dist/esm/motion/replication2/driver.d.ts +23 -0
- package/dist/esm/motion/replication2/driver.d.ts.map +1 -0
- package/dist/esm/motion/replication2/driver.js +65 -0
- package/dist/esm/motion/replication2/driver.js.map +1 -0
- package/dist/esm/motion/replication2/easing.d.ts +19 -0
- package/dist/esm/motion/replication2/easing.d.ts.map +1 -0
- package/dist/esm/motion/replication2/easing.js +92 -0
- package/dist/esm/motion/replication2/easing.js.map +1 -0
- package/dist/esm/motion/replication2/engine.d.ts +236 -0
- package/dist/esm/motion/replication2/engine.d.ts.map +1 -0
- package/dist/esm/motion/replication2/engine.js +470 -0
- package/dist/esm/motion/replication2/engine.js.map +1 -0
- package/dist/esm/motion/replication2/html.d.ts +30 -0
- package/dist/esm/motion/replication2/html.d.ts.map +1 -0
- package/dist/esm/motion/replication2/html.js +83 -0
- package/dist/esm/motion/replication2/html.js.map +1 -0
- package/dist/esm/motion/replication2/index.d.ts +15 -0
- package/dist/esm/motion/replication2/index.d.ts.map +1 -0
- package/dist/esm/motion/replication2/index.js +15 -0
- package/dist/esm/motion/replication2/index.js.map +1 -0
- package/dist/esm/motion/replication2/measure.d.ts +3 -0
- package/dist/esm/motion/replication2/measure.d.ts.map +1 -0
- package/dist/esm/motion/replication2/measure.js +27 -0
- package/dist/esm/motion/replication2/measure.js.map +1 -0
- package/dist/esm/motion/replication2/metrics.d.ts +6 -0
- package/dist/esm/motion/replication2/metrics.d.ts.map +1 -0
- package/dist/esm/motion/replication2/metrics.js +7 -0
- package/dist/esm/motion/replication2/metrics.js.map +1 -0
- package/dist/esm/motion/replication2/presets.d.ts +13 -0
- package/dist/esm/motion/replication2/presets.d.ts.map +1 -0
- package/dist/esm/motion/replication2/presets.js +63 -0
- package/dist/esm/motion/replication2/presets.js.map +1 -0
- package/dist/esm/motion/replication2/riv.d.ts +3 -0
- package/dist/esm/motion/replication2/riv.d.ts.map +1 -0
- package/dist/esm/motion/replication2/riv.js +4 -0
- package/dist/esm/motion/replication2/riv.js.map +1 -0
- package/dist/esm/motion/replication2/rive-contract.d.ts +27 -0
- package/dist/esm/motion/replication2/rive-contract.d.ts.map +1 -0
- package/dist/esm/motion/replication2/rive-contract.js +153 -0
- package/dist/esm/motion/replication2/rive-contract.js.map +1 -0
- package/dist/esm/motion/replication2/template.d.ts +8 -0
- package/dist/esm/motion/replication2/template.d.ts.map +1 -0
- package/dist/esm/motion/replication2/template.js +32 -0
- package/dist/esm/motion/replication2/template.js.map +1 -0
- package/dist/esm/motion/sample.d.ts +61 -0
- package/dist/esm/motion/sample.d.ts.map +1 -0
- package/dist/esm/motion/sample.js +138 -0
- package/dist/esm/motion/sample.js.map +1 -0
- package/dist/esm/motion/templates/hey-template.d.ts +3 -0
- package/dist/esm/motion/templates/hey-template.d.ts.map +1 -0
- package/dist/esm/motion/templates/hey-template.js +1549 -0
- package/dist/esm/motion/templates/hey-template.js.map +1 -0
- package/dist/esm/motion/templates/index.d.ts +22 -0
- package/dist/esm/motion/templates/index.d.ts.map +1 -0
- package/dist/esm/motion/templates/index.js +15 -0
- package/dist/esm/motion/templates/index.js.map +1 -0
- package/dist/esm/motion/templates/word-motion.d.ts +3 -0
- package/dist/esm/motion/templates/word-motion.d.ts.map +1 -0
- package/dist/esm/motion/templates/word-motion.js +1162 -0
- package/dist/esm/motion/templates/word-motion.js.map +1 -0
- package/dist/esm/motion/types.d.ts +192 -0
- package/dist/esm/motion/types.d.ts.map +1 -0
- package/dist/esm/motion/types.js +2 -0
- package/dist/esm/motion/types.js.map +1 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts +22 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js +58 -0
- package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js.map +1 -0
- package/dist/esm/motion/typesurface/art.d.ts +21 -0
- package/dist/esm/motion/typesurface/art.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/art.js +854 -0
- package/dist/esm/motion/typesurface/art.js.map +1 -0
- package/dist/esm/motion/typesurface/config.d.ts +273 -0
- package/dist/esm/motion/typesurface/config.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/config.js +260 -0
- package/dist/esm/motion/typesurface/config.js.map +1 -0
- package/dist/esm/motion/typesurface/engine.d.ts +94 -0
- package/dist/esm/motion/typesurface/engine.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/engine.js +603 -0
- package/dist/esm/motion/typesurface/engine.js.map +1 -0
- package/dist/esm/motion/typesurface/fonts.d.ts +25 -0
- package/dist/esm/motion/typesurface/fonts.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/fonts.js +40 -0
- package/dist/esm/motion/typesurface/fonts.js.map +1 -0
- package/dist/esm/motion/typesurface/index.d.ts +17 -0
- package/dist/esm/motion/typesurface/index.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/index.js +17 -0
- package/dist/esm/motion/typesurface/index.js.map +1 -0
- package/dist/esm/motion/typesurface/layout.d.ts +57 -0
- package/dist/esm/motion/typesurface/layout.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/layout.js +122 -0
- package/dist/esm/motion/typesurface/layout.js.map +1 -0
- package/dist/esm/motion/typesurface/ops.d.ts +70 -0
- package/dist/esm/motion/typesurface/ops.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/ops.js +164 -0
- package/dist/esm/motion/typesurface/ops.js.map +1 -0
- package/dist/esm/motion/typesurface/presets.d.ts +33 -0
- package/dist/esm/motion/typesurface/presets.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/presets.js +185 -0
- package/dist/esm/motion/typesurface/presets.js.map +1 -0
- package/dist/esm/motion/typesurface/renderer.d.ts +78 -0
- package/dist/esm/motion/typesurface/renderer.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/renderer.js +666 -0
- package/dist/esm/motion/typesurface/renderer.js.map +1 -0
- package/dist/esm/motion/typesurface/shaders.d.ts +17 -0
- package/dist/esm/motion/typesurface/shaders.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/shaders.js +297 -0
- package/dist/esm/motion/typesurface/shaders.js.map +1 -0
- package/dist/esm/motion/typesurface/surfaces.d.ts +81 -0
- package/dist/esm/motion/typesurface/surfaces.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/surfaces.js +149 -0
- package/dist/esm/motion/typesurface/surfaces.js.map +1 -0
- package/dist/esm/motion/typesurface/text.d.ts +17 -0
- package/dist/esm/motion/typesurface/text.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/text.js +28 -0
- package/dist/esm/motion/typesurface/text.js.map +1 -0
- package/dist/esm/motion/typesurface/timeline.d.ts +15 -0
- package/dist/esm/motion/typesurface/timeline.d.ts.map +1 -0
- package/dist/esm/motion/typesurface/timeline.js +57 -0
- package/dist/esm/motion/typesurface/timeline.js.map +1 -0
- package/dist/esm/motion/validate.d.ts +22 -0
- package/dist/esm/motion/validate.d.ts.map +1 -0
- package/dist/esm/motion/validate.js +84 -0
- package/dist/esm/motion/validate.js.map +1 -0
- package/dist/esm/native/RiveReceiptStage.d.ts +25 -2
- package/dist/esm/native/RiveReceiptStage.d.ts.map +1 -1
- package/dist/esm/native/RiveReceiptStage.js +7 -148
- package/dist/esm/native/RiveReceiptStage.js.map +1 -1
- package/dist/esm/native/riveReceiptStageFactory.d.ts +26 -0
- package/dist/esm/native/riveReceiptStageFactory.d.ts.map +1 -0
- package/dist/esm/native/riveReceiptStageFactory.js +159 -0
- package/dist/esm/native/riveReceiptStageFactory.js.map +1 -0
- package/dist/esm/tokens/stage.d.ts +7 -0
- package/dist/esm/tokens/stage.d.ts.map +1 -0
- package/dist/esm/tokens/stage.js +7 -0
- package/dist/esm/tokens/stage.js.map +1 -0
- package/package.json +35 -1
- package/spec/examples/components/onboarding/animated-status/case1.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case2.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case3.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case4.json +42 -0
- package/spec/examples/components/onboarding/animated-status/case5.json +42 -0
- package/spec/examples/components/onboarding/send-completion/case1.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case2.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case3.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case4.json +48 -0
- package/spec/examples/components/onboarding/send-completion/case5.json +48 -0
- package/spec/families/onboarding.schema.json +610 -1
- package/src/agent/AgentComponent.tsx +1 -1
- package/src/agent/manifests.ts +83 -1
- package/src/agent/result.ts +6 -0
- package/src/agent/types.ts +1 -1
- package/src/components/catalog.ts +21 -1
- package/src/components/onboarding/animated-status/AnimatedStage.tsx +18 -0
- package/src/components/onboarding/animated-status/AnimatedStage.types.ts +30 -0
- package/src/components/onboarding/animated-status/AnimatedStage.web.tsx +99 -0
- package/src/components/onboarding/animated-status/AnimatedStatusView.tsx +109 -0
- package/src/components/onboarding/animated-status/AnimatedStill.tsx +23 -0
- package/src/components/onboarding/animated-status/contract.ts +105 -0
- package/src/components/onboarding/animated-status/engine.ts +49 -0
- package/src/components/onboarding/animated-status/index.ts +8 -0
- package/src/components/onboarding/animated-status/presets.json +126 -0
- package/src/components/onboarding/animated-status/riv.ts +4 -0
- package/src/components/onboarding/index.ts +4 -0
- package/src/components/onboarding/presets.ts +6 -0
- package/src/components/onboarding/receipt-printer/ReceiptStage.tsx +46 -7
- package/src/components/onboarding/send-completion/SendCompletionView.tsx +164 -0
- package/src/components/onboarding/send-completion/SendStage.tsx +27 -0
- package/src/components/onboarding/send-completion/SendStage.types.ts +32 -0
- package/src/components/onboarding/send-completion/SendStage.web.tsx +116 -0
- package/src/components/onboarding/send-completion/SendStill.tsx +19 -0
- package/src/components/onboarding/send-completion/contract.ts +127 -0
- package/src/components/onboarding/send-completion/engine.ts +37 -0
- package/src/components/onboarding/send-completion/index.ts +10 -0
- package/src/components/onboarding/send-completion/presets.json +132 -0
- package/src/components/onboarding/send-completion/riv.ts +4 -0
- package/src/components/onboarding/shared/actions-data.ts +2 -0
- package/src/components/onboarding/shared/configColor.ts +72 -0
- package/src/components/onboarding/shared/contract.ts +4 -0
- package/src/components/onboarding/shared/describe.ts +1 -1
- package/src/components/onboarding/shared/mock.ts +2 -0
- package/src/components/onboarding/views.ts +8 -0
- package/src/motion/MotionPlayer.tsx +62 -0
- package/src/motion/agent.ts +288 -0
- package/src/motion/cat/Cat.tsx +118 -0
- package/src/motion/cat/animation.ts +206 -0
- package/src/motion/cat/art.generated.ts +44 -0
- package/src/motion/cat/config.ts +186 -0
- package/src/motion/cat/index.ts +26 -0
- package/src/motion/cat/rig.ts +102 -0
- package/src/motion/cat/scene.ts +181 -0
- package/src/motion/configurable/config.ts +420 -0
- package/src/motion/configurable/controls.ts +93 -0
- package/src/motion/easing.ts +55 -0
- package/src/motion/fit.ts +8 -0
- package/src/motion/index.ts +29 -0
- package/src/motion/neon/GlowRenderer.tsx +83 -0
- package/src/motion/neon/NeonCanvas.tsx +175 -0
- package/src/motion/neon/NeonText.tsx +113 -0
- package/src/motion/neon/NeonTextFrame.tsx +67 -0
- package/src/motion/neon/artwork.ts +95 -0
- package/src/motion/neon/audio.ts +162 -0
- package/src/motion/neon/config.ts +484 -0
- package/src/motion/neon/flicker.ts +225 -0
- package/src/motion/neon/fonts.ts +76 -0
- package/src/motion/neon/frame.ts +34 -0
- package/src/motion/neon/glitch.ts +142 -0
- package/src/motion/neon/index.ts +41 -0
- package/src/motion/neon/layers.tsx +209 -0
- package/src/motion/neon/material.ts +88 -0
- package/src/motion/neon/random.ts +40 -0
- package/src/motion/neon/scene.ts +610 -0
- package/src/motion/neon/synth.ts +188 -0
- package/src/motion/neon/typography.ts +102 -0
- package/src/motion/neon/wall.ts +157 -0
- package/src/motion/paperfold/PaperFold.tsx +45 -0
- package/src/motion/paperfold/PaperFoldFrame.tsx +576 -0
- package/src/motion/paperfold/PaperFoldPlayer.tsx +80 -0
- package/src/motion/paperfold/art.ts +455 -0
- package/src/motion/paperfold/config.ts +98 -0
- package/src/motion/paperfold/controls.ts +557 -0
- package/src/motion/paperfold/engine.ts +852 -0
- package/src/motion/paperfold/fonts.ts +21 -0
- package/src/motion/paperfold/index.ts +30 -0
- package/src/motion/paperfold/manipulate.ts +188 -0
- package/src/motion/paperfold/presets.ts +117 -0
- package/src/motion/paperfold/template.ts +38 -0
- package/src/motion/player.ts +207 -0
- package/src/motion/promo/PromoFrame.tsx +501 -0
- package/src/motion/promo/PromoShowcasePlayer.tsx +78 -0
- package/src/motion/promo/config.ts +479 -0
- package/src/motion/promo/controls.ts +643 -0
- package/src/motion/promo/easing.ts +36 -0
- package/src/motion/promo/engine.ts +587 -0
- package/src/motion/promo/fonts.ts +16 -0
- package/src/motion/promo/icons.tsx +29 -0
- package/src/motion/promo/index.ts +24 -0
- package/src/motion/promo/presets.ts +40 -0
- package/src/motion/promo/template.ts +36 -0
- package/src/motion/replication2/Replication2Player.tsx +115 -0
- package/src/motion/replication2/config.ts +323 -0
- package/src/motion/replication2/controls.ts +336 -0
- package/src/motion/replication2/driver.ts +92 -0
- package/src/motion/replication2/easing.ts +88 -0
- package/src/motion/replication2/engine.ts +539 -0
- package/src/motion/replication2/html.ts +87 -0
- package/src/motion/replication2/index.ts +14 -0
- package/src/motion/replication2/measure.ts +28 -0
- package/src/motion/replication2/metrics.ts +7 -0
- package/src/motion/replication2/presets.ts +63 -0
- package/src/motion/replication2/riv.ts +4 -0
- package/src/motion/replication2/rive-contract.ts +165 -0
- package/src/motion/replication2/template.ts +33 -0
- package/src/motion/sample.ts +173 -0
- package/src/motion/templates/hey-template.ts +1553 -0
- package/src/motion/templates/index.ts +17 -0
- package/src/motion/templates/word-motion.ts +1166 -0
- package/src/motion/types.ts +162 -0
- package/src/motion/typesurface/TypeSurfaceCanvas.tsx +73 -0
- package/src/motion/typesurface/art.ts +639 -0
- package/src/motion/typesurface/config.ts +486 -0
- package/src/motion/typesurface/engine.ts +586 -0
- package/src/motion/typesurface/fonts.ts +63 -0
- package/src/motion/typesurface/index.ts +16 -0
- package/src/motion/typesurface/layout.ts +133 -0
- package/src/motion/typesurface/ops.ts +196 -0
- package/src/motion/typesurface/presets.ts +199 -0
- package/src/motion/typesurface/renderer.ts +579 -0
- package/src/motion/typesurface/shaders.ts +303 -0
- package/src/motion/typesurface/surfaces.ts +223 -0
- package/src/motion/typesurface/text.ts +35 -0
- package/src/motion/typesurface/timeline.ts +58 -0
- package/src/motion/validate.ts +101 -0
- package/src/native/RiveReceiptStage.tsx +8 -155
- package/src/native/riveReceiptStageFactory.tsx +175 -0
- package/src/tokens/stage.ts +6 -0
- package/tools/ask/dist/components.mjs +6887 -46
- package/tools/ask/mcp.mjs +80 -1
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **GLSL for the renderer.** Three programs:
|
|
3
|
+
* surface paper, pages, table and props: textured, lit by one key light with a soft shadow map,
|
|
4
|
+
* a sky/ground ambient, cavity darkening in valleys and crease light along folds
|
|
5
|
+
* text the letters: alpha from the text raster, then the material. Floating, they are a flat
|
|
6
|
+
* graphic; as they blend in they take the surface's light, then its colour (the blend
|
|
7
|
+
* mode, against the paper under them), its grain, ragged edges, and a halftone screen
|
|
8
|
+
* depth the shadow pass (letters cast their shape while they float)
|
|
9
|
+
*/
|
|
10
|
+
export const COMMON = /* glsl */ `#version 300 es
|
|
11
|
+
precision highp float;
|
|
12
|
+
precision highp sampler2DShadow;
|
|
13
|
+
uniform vec3 uLightDir;
|
|
14
|
+
uniform vec3 uEye;
|
|
15
|
+
uniform mat4 uLightVP;
|
|
16
|
+
uniform sampler2DShadow uShadow;
|
|
17
|
+
uniform vec3 uKey;
|
|
18
|
+
uniform float uAmb;
|
|
19
|
+
uniform vec3 uBackdrop;
|
|
20
|
+
uniform vec3 uTarget;
|
|
21
|
+
uniform float uRadius;
|
|
22
|
+
|
|
23
|
+
vec3 toLin(vec3 c) { return pow(max(c, 0.0), vec3(2.2)); }
|
|
24
|
+
vec3 toSrgb(vec3 c) { return pow(max(c, 0.0), vec3(1.0 / 2.2)); }
|
|
25
|
+
vec3 tone(vec3 c) { c *= 0.92; return clamp((c * (2.51 * c + 0.03)) / (c * (2.43 * c + 0.59) + 0.14), 0.0, 1.0); }
|
|
26
|
+
|
|
27
|
+
float shadowAt(vec3 wp, vec3 n) {
|
|
28
|
+
vec4 lp = uLightVP * vec4(wp + n * 0.003, 1.0);
|
|
29
|
+
vec3 c = lp.xyz / lp.w * 0.5 + 0.5;
|
|
30
|
+
if (c.x < 0.0 || c.x > 1.0 || c.y < 0.0 || c.y > 1.0 || c.z > 1.0) return 1.0;
|
|
31
|
+
vec2 texel = 1.0 / vec2(textureSize(uShadow, 0));
|
|
32
|
+
float s = 0.0;
|
|
33
|
+
for (int x = -2; x <= 2; x++) for (int y = -2; y <= 2; y++) s += texture(uShadow, vec3(c.xy + vec2(x, y) * texel * 1.5, c.z - 0.0012));
|
|
34
|
+
return s / 25.0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
vec3 shade(vec3 alb, vec3 n, vec3 wp, float cav, float spec, float rough, float translucency) {
|
|
38
|
+
float sh = shadowAt(wp, n);
|
|
39
|
+
float nl = dot(n, uLightDir);
|
|
40
|
+
float diff = max(nl, 0.0) * sh;
|
|
41
|
+
float back = max(-nl, 0.0) * translucency;
|
|
42
|
+
vec3 sky = vec3(0.66, 0.68, 0.74), gnd = vec3(0.3, 0.27, 0.23);
|
|
43
|
+
vec3 amb = mix(gnd, sky, n.z * 0.5 + 0.5) * (1.0 - max(cav, 0.0) * 0.6) * (0.75 + 0.25 * sh);
|
|
44
|
+
vec3 V = normalize(uEye - wp);
|
|
45
|
+
vec3 H = normalize(uLightDir + V);
|
|
46
|
+
float sp = pow(max(dot(n, H), 0.0), mix(6.0, 160.0, 1.0 - rough)) * spec * sh;
|
|
47
|
+
return alb * (uKey * (diff + back) + amb * uAmb) + uKey * sp;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A photo studio, as seen in a reflection: dim room, the key softbox toward the light, a long strip light opposite. */
|
|
51
|
+
vec3 envAt(vec3 r) {
|
|
52
|
+
vec3 base = mix(vec3(0.05, 0.05, 0.055), vec3(0.42, 0.43, 0.45), smoothstep(-0.3, 0.9, r.z));
|
|
53
|
+
float key = smoothstep(0.9, 0.965, dot(r, uLightDir));
|
|
54
|
+
vec3 sd = normalize(vec3(0.72, -0.25, 0.64));
|
|
55
|
+
vec3 ax = normalize(cross(sd, vec3(0.0, 0.0, 1.0)));
|
|
56
|
+
float along = dot(r, ax);
|
|
57
|
+
float strip = smoothstep(0.975, 0.992, dot(normalize(r - ax * along), sd)) * (1.0 - smoothstep(0.4, 0.62, abs(along)));
|
|
58
|
+
return base + vec3(1.0, 0.98, 0.95) * key * 3.2 + vec3(0.95, 0.97, 1.0) * strip * 2.4;
|
|
59
|
+
}
|
|
60
|
+
float fresnel(float ndv, float f0) { return f0 + (1.0 - f0) * pow(1.0 - ndv, 5.0); }
|
|
61
|
+
|
|
62
|
+
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); }
|
|
63
|
+
float vnoise(vec2 p) {
|
|
64
|
+
vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f);
|
|
65
|
+
return mix(mix(hash12(i), hash12(i + vec2(1, 0)), f.x), mix(hash12(i + vec2(0, 1)), hash12(i + vec2(1, 1)), f.x), f.y);
|
|
66
|
+
}
|
|
67
|
+
float fbm(vec2 p) { float s = 0.0, a = 0.5; for (int i = 0; i < 5; i++) { s += a * vnoise(p); p *= 2.03; a *= 0.5; } return s; }
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
export const SURFACE_VS = /* glsl */ `#version 300 es
|
|
71
|
+
layout(location = 0) in vec3 aPos;
|
|
72
|
+
layout(location = 1) in vec3 aNrm;
|
|
73
|
+
layout(location = 2) in vec2 aUv;
|
|
74
|
+
layout(location = 3) in vec4 aAttr;
|
|
75
|
+
uniform mat4 uVP;
|
|
76
|
+
out vec3 vW; out vec3 vN; out vec2 vUv; out vec4 vAttr;
|
|
77
|
+
void main() { vW = aPos; vN = aNrm; vUv = aUv; vAttr = aAttr; gl_Position = uVP * vec4(aPos, 1.0); }
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
export const SURFACE_FS = COMMON + /* glsl */ `
|
|
81
|
+
in vec3 vW; in vec3 vN; in vec2 vUv; in vec4 vAttr;
|
|
82
|
+
uniform int uMode; // 0 sheet, 1 table, 2 prop (bottle)
|
|
83
|
+
uniform int uShading; // 0 paper, 1 label, 2 film, 3 fabric
|
|
84
|
+
uniform vec3 uPropColor;
|
|
85
|
+
uniform vec3 uCapColor;
|
|
86
|
+
uniform int uTable; // 0 desk, 1 studio, 3 wood
|
|
87
|
+
uniform sampler2D uFront;
|
|
88
|
+
uniform sampler2D uBackTex;
|
|
89
|
+
uniform sampler2D uGrain;
|
|
90
|
+
uniform float uAspect;
|
|
91
|
+
uniform float uSpec;
|
|
92
|
+
uniform float uRough;
|
|
93
|
+
uniform float uTranslucent;
|
|
94
|
+
uniform int uDebug; // 1 deformation, 2 mapping
|
|
95
|
+
out vec4 outColor;
|
|
96
|
+
|
|
97
|
+
vec3 tableColor(vec2 p) {
|
|
98
|
+
if (uTable == 0) {
|
|
99
|
+
float g = fbm(vec2(p.x * 1.2, p.y * 14.0) + fbm(p * 3.0) * 1.5);
|
|
100
|
+
float rings = sin((p.y * 26.0 + g * 6.0)) * 0.5 + 0.5;
|
|
101
|
+
return toLin(mix(vec3(0.20, 0.12, 0.07), vec3(0.34, 0.21, 0.12), g * 0.7 + rings * 0.3));
|
|
102
|
+
}
|
|
103
|
+
if (uTable == 3) {
|
|
104
|
+
float g = fbm(vec2(p.x * 1.0, p.y * 10.0) + fbm(p * 2.0));
|
|
105
|
+
return toLin(mix(vec3(0.46, 0.33, 0.21), vec3(0.62, 0.47, 0.31), g));
|
|
106
|
+
}
|
|
107
|
+
return toLin(uBackdrop * (0.96 + 0.06 * fbm(p * 4.0)));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
void main() {
|
|
111
|
+
vec3 n = normalize(vN);
|
|
112
|
+
vec3 col;
|
|
113
|
+
if (uMode == 1) {
|
|
114
|
+
vec3 alb = tableColor(vW.xy);
|
|
115
|
+
col = shade(alb, vec3(0, 0, 1), vW, 0.0, 0.05, 0.8, 0.0);
|
|
116
|
+
vec3 disp = toSrgb(tone(col));
|
|
117
|
+
float f = smoothstep(uRadius * 1.3, uRadius * 3.2, length(vW.xy - uTarget.xy));
|
|
118
|
+
outColor = vec4(mix(disp, uBackdrop, f), 1.0);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
vec3 V = normalize(uEye - vW);
|
|
122
|
+
if (uMode == 2) {
|
|
123
|
+
float ndv = max(dot(n, V), 0.0);
|
|
124
|
+
vec3 R = reflect(-V, n);
|
|
125
|
+
if (vAttr.x < 0.5) {
|
|
126
|
+
// Dark glass: almost black body, the room in its reflection.
|
|
127
|
+
vec3 body = shade(toLin(uPropColor) * 0.55, n, vW, 0.0, 1.4, 0.04, 0.0);
|
|
128
|
+
col = body + envAt(R) * fresnel(ndv, 0.06) * 1.1;
|
|
129
|
+
} else {
|
|
130
|
+
// Foil capsule: coloured metal, crinkled.
|
|
131
|
+
vec3 c = toLin(uCapColor);
|
|
132
|
+
float crink = fbm(vec2(atan(vW.x, vW.z + 0.36) * 9.0, vW.y * 30.0)) - 0.5;
|
|
133
|
+
vec3 nb = normalize(n + vec3(crink * 0.25, 0.0, crink * 0.2));
|
|
134
|
+
col = shade(c * 0.3, nb, vW, 0.0, 0.8, 0.3, 0.0) + c * envAt(reflect(-V, nb)) * 0.7;
|
|
135
|
+
}
|
|
136
|
+
outColor = vec4(toSrgb(tone(col)), 1.0);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
bool front = gl_FrontFacing;
|
|
140
|
+
if (!front) n = -n;
|
|
141
|
+
vec2 uv = front ? vUv : vec2(1.0 - vUv.x, vUv.y);
|
|
142
|
+
vec4 tex = front ? texture(uFront, uv) : texture(uBackTex, uv);
|
|
143
|
+
if (tex.a < 0.5) discard; // punched holes
|
|
144
|
+
vec3 alb = toLin(tex.rgb);
|
|
145
|
+
if (uMode == 0) {
|
|
146
|
+
float gr = texture(uGrain, vUv * vec2(5.0, 5.0 * uAspect)).r - 0.5;
|
|
147
|
+
alb *= 1.0 + gr * 0.1;
|
|
148
|
+
alb *= 1.0 - vAttr.x * 0.1;
|
|
149
|
+
}
|
|
150
|
+
if (uDebug == 1) alb = mix(vec3(0.05, 0.1, 0.6), vec3(1.0, 0.25, 0.05), clamp(vAttr.z * 6.0, 0.0, 1.0));
|
|
151
|
+
if (uDebug == 2) { vec2 c = floor(vUv * vec2(20.0, 20.0 * uAspect)); alb = mix(alb, mod(c.x + c.y, 2.0) < 1.0 ? vec3(0.9, 0.3, 0.3) : vec3(0.3, 0.5, 0.9), 0.55); }
|
|
152
|
+
float ndv = max(dot(n, V), 0.0);
|
|
153
|
+
col = shade(alb, n, vW, vAttr.y, uSpec, uRough, uTranslucent);
|
|
154
|
+
if (uShading == 1) col += envAt(reflect(-V, n)) * fresnel(ndv, 0.02) * 0.35;
|
|
155
|
+
if (uShading == 2) col += envAt(reflect(-V, n)) * fresnel(ndv, 0.07) * 0.9;
|
|
156
|
+
if (uShading == 3) col += alb * uKey * pow(1.0 - ndv, 3.0) * 0.45;
|
|
157
|
+
col += uKey * alb * vAttr.x * 0.05;
|
|
158
|
+
outColor = vec4(toSrgb(tone(col)), 1.0);
|
|
159
|
+
}
|
|
160
|
+
`;
|
|
161
|
+
|
|
162
|
+
export const TEXT_VS = /* glsl */ `#version 300 es
|
|
163
|
+
layout(location = 0) in vec3 aPos;
|
|
164
|
+
layout(location = 1) in vec3 aNrm;
|
|
165
|
+
layout(location = 2) in vec2 aUv;
|
|
166
|
+
layout(location = 3) in vec4 aAttr;
|
|
167
|
+
layout(location = 4) in vec2 aTuv;
|
|
168
|
+
uniform mat4 uVP;
|
|
169
|
+
out vec3 vW; out vec3 vN; out vec2 vUv; out vec4 vAttr; out vec2 vTuv;
|
|
170
|
+
void main() { vW = aPos; vN = aNrm; vUv = aUv; vAttr = aAttr; vTuv = aTuv; gl_Position = uVP * vec4(aPos, 1.0); }
|
|
171
|
+
`;
|
|
172
|
+
|
|
173
|
+
/** The glyph remap (letters spread mid-morph) and alpha sampling, shared by text and its shadow. */
|
|
174
|
+
const TEXT_ALPHA = /* glsl */ `
|
|
175
|
+
uniform sampler2D uText;
|
|
176
|
+
uniform vec2 uBlock;
|
|
177
|
+
uniform float uGap;
|
|
178
|
+
uniform vec4 uGlyphs[96]; // x0, x1, shift, _
|
|
179
|
+
uniform vec4 uLines[8]; // top, _, first glyph, count
|
|
180
|
+
uniform int uLineCount;
|
|
181
|
+
|
|
182
|
+
// Returns the source point, and z = 0 when it falls outside the chosen letter (a neighbour's ink).
|
|
183
|
+
vec3 remap(vec2 b) {
|
|
184
|
+
if (uGap <= 0.0) return vec3(b, 1.0);
|
|
185
|
+
int li = 0;
|
|
186
|
+
for (int k = 0; k < 8; k++) if (k < uLineCount && b.y >= uLines[k].x) li = k;
|
|
187
|
+
vec4 L = uLines[li];
|
|
188
|
+
int first = int(L.z), cnt = int(L.w);
|
|
189
|
+
float best = 1e9, shift = 0.0, x0 = 0.0, x1 = 0.0;
|
|
190
|
+
for (int i = 0; i < 96; i++) {
|
|
191
|
+
if (i >= cnt) break;
|
|
192
|
+
vec4 g = uGlyphs[first + i];
|
|
193
|
+
float d = abs(b.x - ((g.x + g.y) * 0.5 + g.z));
|
|
194
|
+
if (d < best) { best = d; shift = g.z; x0 = g.x; x1 = g.y; }
|
|
195
|
+
}
|
|
196
|
+
float sx = b.x - shift;
|
|
197
|
+
float m = (x1 - x0) * 0.06;
|
|
198
|
+
return vec3(sx, b.y, (sx >= x0 - m && sx <= x1 + m) ? 1.0 : 0.0);
|
|
199
|
+
}
|
|
200
|
+
float alphaAt(vec2 tc, float lod) {
|
|
201
|
+
if (tc.x < 0.0 || tc.y < 0.0 || tc.x > 1.0 || tc.y > 1.0) return 0.0;
|
|
202
|
+
return textureLod(uText, tc, lod).a;
|
|
203
|
+
}
|
|
204
|
+
`;
|
|
205
|
+
|
|
206
|
+
export const TEXT_FS = COMMON + TEXT_ALPHA + /* glsl */ `
|
|
207
|
+
in vec3 vW; in vec3 vN; in vec2 vUv; in vec4 vAttr; in vec2 vTuv;
|
|
208
|
+
uniform sampler2D uPaper;
|
|
209
|
+
uniform sampler2D uGrain;
|
|
210
|
+
uniform float uAspect;
|
|
211
|
+
uniform vec3 uColor; uniform vec3 uColor2; uniform float uGradOn; uniform float uGradAngle;
|
|
212
|
+
uniform float uOpacity; uniform int uBlendMode; uniform int uMat;
|
|
213
|
+
uniform float uBlendAmt, uInkStrength, uSpread, uRough, uPaperInf, uGrainInf, uHalftone, uDisp, uContrast, uGloss, uEmboss;
|
|
214
|
+
uniform float uLod;
|
|
215
|
+
out vec4 outColor;
|
|
216
|
+
|
|
217
|
+
vec3 blendWith(vec3 b, vec3 s) {
|
|
218
|
+
if (uBlendMode == 1) return b * s;
|
|
219
|
+
if (uBlendMode == 2) return 1.0 - (1.0 - b) * (1.0 - s);
|
|
220
|
+
if (uBlendMode == 3) return mix(2.0 * b * s, 1.0 - 2.0 * (1.0 - b) * (1.0 - s), step(0.5, b));
|
|
221
|
+
if (uBlendMode == 4) return min(b, s);
|
|
222
|
+
if (uBlendMode == 5) return max(b, s);
|
|
223
|
+
if (uBlendMode == 6) return 1.0 - min(vec3(1.0), (1.0 - b) / max(s, vec3(0.001)));
|
|
224
|
+
if (uBlendMode == 7) return mix(2.0 * b * s + b * b * (1.0 - 2.0 * s), sqrt(b) * (2.0 * s - 1.0) + 2.0 * b * (1.0 - s), step(0.5, s));
|
|
225
|
+
return s;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
void main() {
|
|
229
|
+
if (!gl_FrontFacing) discard;
|
|
230
|
+
float lit = smoothstep(0.0, 0.35, uBlendAmt);
|
|
231
|
+
float prn = smoothstep(0.25, 0.7, uBlendAmt);
|
|
232
|
+
float emb = smoothstep(0.6, 1.0, uBlendAmt);
|
|
233
|
+
float gr = texture(uGrain, vUv * vec2(9.0, 9.0 * uAspect)).r;
|
|
234
|
+
float gr2 = texture(uGrain, vUv * vec2(2.1, 2.1 * uAspect) + 0.37).r;
|
|
235
|
+
vec3 rm = remap(vTuv * uBlock);
|
|
236
|
+
vec2 b = rm.xy + (vec2(gr2, gr) - 0.5) * uDisp * prn;
|
|
237
|
+
vec2 tc = b / uBlock;
|
|
238
|
+
float a = alphaAt(tc, 0.0) * rm.z;
|
|
239
|
+
float ab = alphaAt(tc, uLod + 1.0 + uSpread * 2.0);
|
|
240
|
+
a = max(a, smoothstep(0.1, 0.6, ab) * uSpread * prn * 0.85 * rm.z);
|
|
241
|
+
// Ragged edges: noise only where the letter is partly covered.
|
|
242
|
+
float edge = 1.0 - abs(a * 2.0 - 1.0);
|
|
243
|
+
a = clamp(a + (gr - 0.5) * 2.2 * uRough * prn * edge, 0.0, 1.0);
|
|
244
|
+
// Paper tooth breaks the ink up.
|
|
245
|
+
a *= 1.0 - uGrainInf * prn * smoothstep(0.45, 0.85, 1.0 - gr) * 0.75;
|
|
246
|
+
if (uHalftone > 0.0 && emb > 0.0) {
|
|
247
|
+
vec2 hp = mat2(0.7071, -0.7071, 0.7071, 0.7071) * (vUv * vec2(1000.0, 1000.0 * uAspect)) / 3.6;
|
|
248
|
+
float d = length(fract(hp) - 0.5);
|
|
249
|
+
float r = sqrt(clamp(a * uInkStrength, 0.0, 1.0)) * 0.64;
|
|
250
|
+
float dotm = 1.0 - smoothstep(r - 0.07, r + 0.07, d);
|
|
251
|
+
a = mix(a, dotm * step(0.03, a), uHalftone * emb);
|
|
252
|
+
}
|
|
253
|
+
vec2 dir = vec2(cos(radians(uGradAngle)), sin(radians(uGradAngle)));
|
|
254
|
+
float gt = clamp(dot(vTuv - 0.5, dir) + 0.5, 0.0, 1.0);
|
|
255
|
+
vec3 base = mix(uColor, uColor2, uGradOn * gt);
|
|
256
|
+
vec3 col = toLin(base);
|
|
257
|
+
vec4 paperTex = texture(uPaper, vUv);
|
|
258
|
+
if (paperTex.a < 0.5 && lit > 0.5) discard;
|
|
259
|
+
vec3 paper = toLin(paperTex.rgb);
|
|
260
|
+
vec3 printed = mix(paper, blendWith(paper, col), uInkStrength);
|
|
261
|
+
col = mix(col, printed, prn * uPaperInf);
|
|
262
|
+
vec3 n = normalize(vN);
|
|
263
|
+
if (uEmboss > 0.0) {
|
|
264
|
+
float e = 1.5 / (uBlock.x);
|
|
265
|
+
float gx = alphaAt(tc + vec2(e * 2.0, 0.0), uLod + 1.0) - alphaAt(tc - vec2(e * 2.0, 0.0), uLod + 1.0);
|
|
266
|
+
float gy = alphaAt(tc + vec2(0.0, e * 2.0 * uBlock.x / uBlock.y), uLod + 1.0) - alphaAt(tc - vec2(0.0, e * 2.0 * uBlock.x / uBlock.y), uLod + 1.0);
|
|
267
|
+
vec3 t = normalize(dFdx(vW)), bt = normalize(dFdy(vW));
|
|
268
|
+
n = normalize(n - (t * gx - bt * gy) * uEmboss * emb * 0.8);
|
|
269
|
+
}
|
|
270
|
+
vec3 lit3 = shade(col, n, vW, vAttr.z, 0.03 + uGloss * 0.6, 1.0 - uGloss * 0.75, 0.2);
|
|
271
|
+
lit3 *= 1.0 - vAttr.y * 0.12 * lit;
|
|
272
|
+
vec3 Vt = normalize(uEye - vW);
|
|
273
|
+
lit3 += envAt(reflect(-Vt, n)) * fresnel(max(dot(n, Vt), 0.0), 0.04) * uGloss * 0.8;
|
|
274
|
+
vec3 disp = mix(base, toSrgb(tone(lit3)), clamp(lit * uContrast, 0.0, 1.0));
|
|
275
|
+
outColor = vec4(disp, a * uOpacity);
|
|
276
|
+
}
|
|
277
|
+
`;
|
|
278
|
+
|
|
279
|
+
export const DEPTH_VS = /* glsl */ `#version 300 es
|
|
280
|
+
layout(location = 0) in vec3 aPos;
|
|
281
|
+
layout(location = 3) in vec4 aAttr;
|
|
282
|
+
layout(location = 4) in vec2 aTuv;
|
|
283
|
+
uniform mat4 uVP;
|
|
284
|
+
out vec2 vTuv; out float vConform;
|
|
285
|
+
void main() { vTuv = aTuv; vConform = aAttr.x; gl_Position = uVP * vec4(aPos, 1.0); }
|
|
286
|
+
`;
|
|
287
|
+
|
|
288
|
+
export const DEPTH_FS = /* glsl */ `#version 300 es
|
|
289
|
+
precision highp float;
|
|
290
|
+
` + TEXT_ALPHA + /* glsl */ `
|
|
291
|
+
in vec2 vTuv; in float vConform;
|
|
292
|
+
uniform int uIsText;
|
|
293
|
+
uniform float uCast;
|
|
294
|
+
out vec4 outColor;
|
|
295
|
+
void main() {
|
|
296
|
+
if (uIsText == 1) {
|
|
297
|
+
if (vConform > 0.97) discard;
|
|
298
|
+
vec3 b = remap(vTuv * uBlock);
|
|
299
|
+
if (alphaAt(b.xy / uBlock, 0.0) * b.z * uCast < 0.4) discard;
|
|
300
|
+
}
|
|
301
|
+
outColor = vec4(1.0);
|
|
302
|
+
}
|
|
303
|
+
`;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/* eslint-disable comppack/no-raw-colour -- paper, film, cloth and backdrop colours are surface artwork, not theme colours. */
|
|
2
|
+
/**
|
|
3
|
+
* **Surfaces** — the physical things text meets. A surface is data: its size, how finely it is
|
|
4
|
+
* meshed, which artwork paints it, how it shades, and its named states. Only a few have their own
|
|
5
|
+
* shape (a pillow pack inflates, cloth drapes); everything else, folds, rolls,
|
|
6
|
+
* cylinders and crumples, comes from the shared operators in `ops.ts`, so a new surface gets every
|
|
7
|
+
* transformation, and the text on it, without touching the typography.
|
|
8
|
+
*
|
|
9
|
+
* To add one: `registerSurface({ id, name, width, height, grid, art, shading, table, states, … })`.
|
|
10
|
+
* Its `id` becomes a valid `surface.type`, and the renderer paints it with the named `art` (or a
|
|
11
|
+
* plain colour if it has no painter). Pure; no React.
|
|
12
|
+
*/
|
|
13
|
+
import type { TSDeformation, TSMaterial, TSSurfaceType, TSView } from './config';
|
|
14
|
+
import { smoothstep, type Vec3 } from './ops';
|
|
15
|
+
|
|
16
|
+
/** How the substrate itself shades. The renderer maps each to a lighting model. */
|
|
17
|
+
export type SurfaceShading = 'newsprint' | 'paper' | 'label' | 'film' | 'fabric';
|
|
18
|
+
/** What the object lies on. */
|
|
19
|
+
export type TableStyle = 'desk' | 'studio' | 'wood';
|
|
20
|
+
|
|
21
|
+
type DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
|
|
22
|
+
|
|
23
|
+
export type SurfaceState = { label: string; deformation: DeepPartial<TSDeformation>; view?: Partial<TSView> };
|
|
24
|
+
|
|
25
|
+
export type SurfaceDef = {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
blurb: string;
|
|
29
|
+
/** World units. The text's surface units map 1000 → `width`. */
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
/** Mesh vertices across and down. Enough for a crease a few cells wide. */
|
|
33
|
+
grid: [number, number];
|
|
34
|
+
/** The artwork painter (`art.ts`). An unknown name paints `color`. */
|
|
35
|
+
art: string;
|
|
36
|
+
shading: SurfaceShading;
|
|
37
|
+
table: TableStyle;
|
|
38
|
+
/** Backdrop gradient, top → bottom. */
|
|
39
|
+
backdrop: [string, string];
|
|
40
|
+
/** The surface's own colour where the artwork uses one (film, cloth). */
|
|
41
|
+
color: string;
|
|
42
|
+
/** The text material that suits it, and any material defaults. */
|
|
43
|
+
material: Partial<TSMaterial> & { type: TSMaterial['type'] };
|
|
44
|
+
/** `curve` wraps a cylinder of this radius (world) at 1… */
|
|
45
|
+
curveRadius: number;
|
|
46
|
+
/** …or, for a pack, inflates it (`shape` reads `curve`). */
|
|
47
|
+
curveMode: 'cylinder' | 'inflate';
|
|
48
|
+
/** Loose sheets stacked under this one (a newspaper's pages). */
|
|
49
|
+
stack?: { sheets: number; gap: number };
|
|
50
|
+
/** Another page lying on the table under it. */
|
|
51
|
+
looseSheet?: boolean;
|
|
52
|
+
/** A solid object the surface is wrapped on. */
|
|
53
|
+
prop?: 'bottle';
|
|
54
|
+
/** How much fine wrinkles lift the surface, as a share of its width. */
|
|
55
|
+
wrinkleDepth: number;
|
|
56
|
+
/** The surface's own shape, before the shared operators. `x, y` are sheet units (1 wide). */
|
|
57
|
+
shape?: (p: Vec3, x: number, y: number, d: TSDeformation, timeMs: number, motion: number) => void;
|
|
58
|
+
states: Record<string, SurfaceState>;
|
|
59
|
+
defaultState: string;
|
|
60
|
+
/** Degrees of camera tilt at perspective 0 and 1. */
|
|
61
|
+
camera: { flat: number; deep: number };
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/* ---------------- shapes ---------------- */
|
|
65
|
+
|
|
66
|
+
/** A newspaper remembers the fold it was delivered in: a faint ridge across the middle. */
|
|
67
|
+
const newspaperShape: SurfaceDef['shape'] = (p, _x, y) => {
|
|
68
|
+
p[2] += 0.0035 * (1 - smoothstep(0, 0.035, Math.abs(y)));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** A pillow pack: inflated body, flat crimped seals at both ends, film gathered into ribs near them. */
|
|
72
|
+
const wrapperShape: SurfaceDef['shape'] = (p, x, y, d) => {
|
|
73
|
+
const X = x / 0.5; // −1…1 across
|
|
74
|
+
const Y = y / (0.8 / 1.4 / 2); // −1…1 down (height/width = 0.8/1.4)
|
|
75
|
+
const ax = Math.abs(X);
|
|
76
|
+
const a = d.curve;
|
|
77
|
+
const body = 1 - smoothstep(0.7, 0.9, ax);
|
|
78
|
+
const seal = smoothstep(0.86, 0.92, ax);
|
|
79
|
+
const prof = Math.pow(Math.max(0, 1 - Y * Y), 0.62);
|
|
80
|
+
p[2] += a * 0.085 * prof * body;
|
|
81
|
+
// Inflation pulls the film in from the edges; the seals stay full height.
|
|
82
|
+
p[1] *= 1 - a * 0.12 * body * (1 - Y * Y * 0.3);
|
|
83
|
+
p[0] *= 1 - a * 0.035;
|
|
84
|
+
// Film gathered between body and seal: ribs that run toward the seal.
|
|
85
|
+
const gather = smoothstep(0.55, 0.8, ax) * (1 - seal);
|
|
86
|
+
p[2] += (a * 0.8 + d.wrinkle * 0.6) * 0.012 * gather * Math.sin(Y * 11 + x * 3) * (0.6 + 0.4 * Math.sin(Y * 23.7 + 1.3));
|
|
87
|
+
// The crimped seal: a fine serration.
|
|
88
|
+
p[2] += seal * 0.0045 * Math.sin(Y * 70);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** Cloth: rounded folds that mostly share a direction, gathering the cloth, drifting in a breeze. */
|
|
92
|
+
const fabricShape: SurfaceDef['shape'] = (p, x, y, d, timeMs, motion) => {
|
|
93
|
+
const w = d.wave;
|
|
94
|
+
if (w <= 0) return;
|
|
95
|
+
const t = (timeMs / 1000) * motion;
|
|
96
|
+
const folds: [number, number, number, number, number][] = [
|
|
97
|
+
// angle, frequency, amplitude, phase, drift
|
|
98
|
+
[1.35, 6.2, 1, 0.3, 0.35], [1.62, 9.4, 0.55, 1.7, -0.25], [1.1, 4.1, 0.8, 2.2, 0.18], [0.35, 7.3, 0.35, 0.9, 0.3],
|
|
99
|
+
];
|
|
100
|
+
let z = 0;
|
|
101
|
+
let gx = 0, gy = 0;
|
|
102
|
+
for (const [ang, f, amp, ph, drift] of folds) {
|
|
103
|
+
const dx = Math.cos(ang), dy = Math.sin(ang);
|
|
104
|
+
const s = (x * dx + y * dy) * f * 2.4 + ph + t * drift + 0.6 * Math.sin(x * 2.3 - y * 1.7 + ph);
|
|
105
|
+
const ridge = Math.pow(0.5 + 0.5 * Math.cos(s), 1.6);
|
|
106
|
+
z += amp * ridge;
|
|
107
|
+
gx += dx * amp * 0.5; gy += dy * amp * 0.5;
|
|
108
|
+
}
|
|
109
|
+
p[2] += w * 0.034 * z;
|
|
110
|
+
// Folds take up cloth across them.
|
|
111
|
+
const take = w * 0.05;
|
|
112
|
+
p[0] -= take * x * Math.abs(gx) * 0.5;
|
|
113
|
+
p[1] -= take * y * Math.abs(gy) * 0.5;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/* ---------------- states ---------------- */
|
|
117
|
+
|
|
118
|
+
const s = (label: string, deformation: SurfaceState['deformation'], view?: Partial<TSView>): SurfaceState => ({ label, deformation, view });
|
|
119
|
+
|
|
120
|
+
const PAPER_STATES: Record<string, SurfaceState> = {
|
|
121
|
+
flat: s('Flat', {}),
|
|
122
|
+
folded: s('Folded', { fold: { amount: 1, position: 0.5, direction: 'under', orientation: 'horizontal' } }),
|
|
123
|
+
'double-folded': s('Double folded', { fold: { amount: 1, position: 0.5, direction: 'under', orientation: 'horizontal' }, fold2: { amount: 1, position: 0.5, direction: 'under', orientation: 'vertical' } }),
|
|
124
|
+
rolled: s('Rolled', { roll: { amount: 1, edge: 'bottom', direction: 'under' } }),
|
|
125
|
+
'partially-folded': s('Partially folded', { fold: { amount: 0.55, position: 0.52, direction: 'over', orientation: 'vertical' } }),
|
|
126
|
+
'letter-folded': s('Letter folded (3 panels)', {
|
|
127
|
+
fold: { amount: 1, position: 0.667, direction: 'over', orientation: 'horizontal', side: 'far', width: 0.02 },
|
|
128
|
+
fold2: { amount: 1, position: 0.333, direction: 'over', orientation: 'horizontal', side: 'near', width: 0.02 },
|
|
129
|
+
}),
|
|
130
|
+
'folded-in-four': s('Folded four times', {
|
|
131
|
+
fold: { amount: 1, position: 0.5, direction: 'under', orientation: 'horizontal', width: 0.02 },
|
|
132
|
+
fold2: { amount: 1, position: 0.5, direction: 'under', orientation: 'vertical', width: 0.02 },
|
|
133
|
+
fold3: { amount: 1, position: 0.25, direction: 'under', orientation: 'vertical', side: 'near', width: 0.02 },
|
|
134
|
+
fold4: { amount: 0.5, position: 0.25, direction: 'over', orientation: 'horizontal', side: 'near', width: 0.02 },
|
|
135
|
+
}),
|
|
136
|
+
'wrapped-rod': s('Wrapped on rods', {
|
|
137
|
+
wrap1: { amount: 1, position: 0.78, radius: 0.05, angle: 200, direction: 'under', orientation: 'vertical', side: 'far' },
|
|
138
|
+
wrap2: { amount: 1, position: 0.22, radius: 0.05, angle: 200, direction: 'under', orientation: 'vertical', side: 'near' },
|
|
139
|
+
}),
|
|
140
|
+
crumpled: s('Crumpled', { crumple: { amount: 0.5 } }),
|
|
141
|
+
'heavily-crumpled': s('Heavily crumpled', { crumple: { amount: 1 } }),
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/* ---------------- the built-in surfaces ---------------- */
|
|
145
|
+
|
|
146
|
+
const newspaper: SurfaceDef = {
|
|
147
|
+
id: 'newspaper', name: 'Newspaper', blurb: 'A broadsheet page on a stack of pages: columns, photos, ads, grain and the fold it was delivered in.',
|
|
148
|
+
width: 1, height: 1.36, grid: [160, 218], art: 'newspaper', shading: 'newsprint', table: 'desk', backdrop: ['#2b2723', '#15130f'],
|
|
149
|
+
color: '#ECE6D6', material: { type: 'ink', halftone: 0.35 }, curveRadius: 0.16, curveMode: 'cylinder',
|
|
150
|
+
stack: { sheets: 2, gap: 0.0026 }, looseSheet: true, wrinkleDepth: 0.02, shape: newspaperShape,
|
|
151
|
+
states: PAPER_STATES, defaultState: 'flat', camera: { flat: 0, deep: 56 },
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const paper: SurfaceDef = {
|
|
155
|
+
id: 'paper', name: 'Paper', blurb: 'A plain letter sheet: fine tooth, a watermark, nothing printed but your words.',
|
|
156
|
+
width: 0.85, height: 1.1, grid: [140, 182], art: 'paper', shading: 'paper', table: 'wood', backdrop: ['#2f2a25', '#171411'],
|
|
157
|
+
color: '#F6F1E6', material: { type: 'ink', halftone: 0 }, curveRadius: 0.14, curveMode: 'cylinder', wrinkleDepth: 0.02,
|
|
158
|
+
states: PAPER_STATES, defaultState: 'flat', camera: { flat: 0, deep: 54 },
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const bottle: SurfaceDef = {
|
|
162
|
+
id: 'bottle', name: 'Bottle', blurb: 'A paper label on a dark glass wine bottle: the label wraps the cylinder, the text wraps with it.',
|
|
163
|
+
width: 1.81, height: 0.86, grid: [220, 96], art: 'label', shading: 'label', table: 'studio', backdrop: ['#d9dadc', '#b9bbbf'],
|
|
164
|
+
color: '#1A1512', material: { type: 'print', halftone: 0, grainInfluence: 0.25, paperInfluence: 0.35 }, curveRadius: 0.3625, curveMode: 'cylinder',
|
|
165
|
+
prop: 'bottle', wrinkleDepth: 0.004,
|
|
166
|
+
states: {
|
|
167
|
+
flat: s('Flat label', {}),
|
|
168
|
+
curved: s('Curving', { curve: 0.5 }),
|
|
169
|
+
wrapped: s('Wrapped', { curve: 1 }),
|
|
170
|
+
lying: s('Lying on the table', { curve: 1 }, { roll: -28 }),
|
|
171
|
+
},
|
|
172
|
+
defaultState: 'wrapped', camera: { flat: 0, deep: 48 },
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const wrapper: SurfaceDef = {
|
|
176
|
+
id: 'wrapper', name: 'Wrapper', blurb: 'A glossy pillow pack: an inflated body, crimped seals, film gathered into ribs.',
|
|
177
|
+
width: 1.4, height: 0.8, grid: [210, 120], art: 'wrapper', shading: 'film', table: 'studio', backdrop: ['#e8e2d8', '#c8c0b2'],
|
|
178
|
+
color: '#F2B705', material: { type: 'print', halftone: 0, grainInfluence: 0.1, paperInfluence: 0.25, gloss: 0.7 }, curveRadius: 0.4, curveMode: 'inflate',
|
|
179
|
+
wrinkleDepth: 0.012, shape: wrapperShape,
|
|
180
|
+
states: {
|
|
181
|
+
flat: s('Flat film', {}),
|
|
182
|
+
pillow: s('Inflated', { curve: 1 }),
|
|
183
|
+
folded: s('Folded end', { curve: 0.8, fold: { amount: 0.85, position: 0.8, angle: 160, direction: 'under', width: 0.05 } }),
|
|
184
|
+
wrinkled: s('Wrinkled', { curve: 1, wrinkle: 0.9, crumple: { amount: 0.12, scale: 0.7 } }),
|
|
185
|
+
},
|
|
186
|
+
defaultState: 'pillow', camera: { flat: 0, deep: 52 },
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const fabric: SurfaceDef = {
|
|
190
|
+
id: 'fabric', name: 'Fabric', blurb: 'Woven cotton lying in soft folds that drift in a breeze; the print moves with the cloth.',
|
|
191
|
+
width: 1.4, height: 1.1, grid: [180, 142], art: 'fabric', shading: 'fabric', table: 'wood', backdrop: ['#28231e', '#12100d'],
|
|
192
|
+
color: '#2F4A73', material: { type: 'print', halftone: 0, grainInfluence: 0.6, paperInfluence: 0.45, inkRoughness: 0.55 }, curveRadius: 0.3, curveMode: 'cylinder',
|
|
193
|
+
wrinkleDepth: 0.018, shape: fabricShape,
|
|
194
|
+
states: {
|
|
195
|
+
flat: s('Laid flat', {}),
|
|
196
|
+
draped: s('Soft folds', { wave: 0.7 }),
|
|
197
|
+
folded: s('Folded over', { wave: 0.45, fold: { amount: 0.8, position: 0.66, angle: 170, width: 0.07, direction: 'over' } }),
|
|
198
|
+
creased: s('Creased', { wave: 0.5, wrinkle: 0.8, crumple: { amount: 0.2, scale: 1.3 } }),
|
|
199
|
+
},
|
|
200
|
+
defaultState: 'draped', camera: { flat: 0, deep: 52 },
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const BUILT_IN: SurfaceDef[] = [newspaper, paper, bottle, wrapper, fabric];
|
|
204
|
+
const REGISTRY = new Map<string, SurfaceDef>(BUILT_IN.map((d) => [d.id, d]));
|
|
205
|
+
|
|
206
|
+
/** The built-in surfaces, by id. */
|
|
207
|
+
export const SURFACES: Readonly<Record<TSSurfaceType, SurfaceDef>> = Object.fromEntries(BUILT_IN.map((d) => [d.id, d])) as Record<TSSurfaceType, SurfaceDef>;
|
|
208
|
+
|
|
209
|
+
/** Add (or replace) a surface. Its id becomes a valid `surface.type`. */
|
|
210
|
+
export function registerSurface(def: SurfaceDef): SurfaceDef {
|
|
211
|
+
REGISTRY.set(def.id, def);
|
|
212
|
+
return def;
|
|
213
|
+
}
|
|
214
|
+
/** A surface by id; unknown ids fall back to the newspaper so something always draws. */
|
|
215
|
+
export function getSurface(id: string): SurfaceDef {
|
|
216
|
+
return REGISTRY.get(id) ?? newspaper;
|
|
217
|
+
}
|
|
218
|
+
export function hasSurface(id: string): boolean {
|
|
219
|
+
return REGISTRY.has(id);
|
|
220
|
+
}
|
|
221
|
+
export function listSurfaces(): SurfaceDef[] {
|
|
222
|
+
return [...REGISTRY.values()];
|
|
223
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The text raster.** The layout (`layout.ts`) drawn into a canvas as white letters on nothing:
|
|
3
|
+
* an alpha mask. Colour, gradient, blend mode and ink are applied by the renderer on top of it,
|
|
4
|
+
* so changing a colour never repaints, and changing a word repaints only this. Live fonts; never
|
|
5
|
+
* outlines. Browser-only; no React.
|
|
6
|
+
*/
|
|
7
|
+
import type { TSTypography } from './config';
|
|
8
|
+
import type { TSMeasurer, TSTextLayout } from './layout';
|
|
9
|
+
|
|
10
|
+
export const cssFont = (t: TSTypography, px: number) => `${t.fontStyle} ${t.fontWeight} ${px}px ${t.fontFamily}`;
|
|
11
|
+
|
|
12
|
+
let measureCtx: CanvasRenderingContext2D | null = null;
|
|
13
|
+
/** Width in surface units, measured by the browser at 100 px and scaled. */
|
|
14
|
+
export const canvasMeasurer: TSMeasurer = (text, t) => {
|
|
15
|
+
measureCtx ??= document.createElement('canvas').getContext('2d');
|
|
16
|
+
if (!measureCtx) return text.length * t.fontSize * 0.55;
|
|
17
|
+
measureCtx.font = cssFont(t, 100);
|
|
18
|
+
return (measureCtx.measureText(text).width / 100) * t.fontSize;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** Paint the layout. `maxPx` caps the longer side; returns the canvas and its pixels per unit. */
|
|
22
|
+
export function rasterText(layout: TSTextLayout, t: TSTypography, maxPx = 2048): { canvas: HTMLCanvasElement; ppu: number } {
|
|
23
|
+
const ppu = Math.min(4, maxPx / layout.width, maxPx / 2 / layout.height);
|
|
24
|
+
const c = document.createElement('canvas');
|
|
25
|
+
c.width = Math.max(4, Math.ceil(layout.width * ppu));
|
|
26
|
+
c.height = Math.max(4, Math.ceil(layout.height * ppu));
|
|
27
|
+
const ctx = c.getContext('2d')!;
|
|
28
|
+
ctx.fillStyle = 'white';
|
|
29
|
+
ctx.font = cssFont(t, t.fontSize * ppu);
|
|
30
|
+
ctx.textBaseline = 'alphabetic';
|
|
31
|
+
for (const line of layout.lines) {
|
|
32
|
+
for (const g of line.glyphs) if (g.ch !== ' ') ctx.fillText(g.ch, g.x0 * ppu, line.baseline * ppu);
|
|
33
|
+
}
|
|
34
|
+
return { canvas: c, ppu };
|
|
35
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The transformation timeline.** A config says how FAR each transformation goes (its sliders);
|
|
3
|
+
* its stages say WHEN. At progress p (0–1) a driven amount is `value × envelope(p)`: the envelope
|
|
4
|
+
* rises 0 → 1 between `start` and `end` and, for a stage with `outStart`/`outEnd`, falls back.
|
|
5
|
+
* Envelopes are eased and continuous, so scrubbing never jumps. Amounts no stage drives stay at
|
|
6
|
+
* their slider value the whole time.
|
|
7
|
+
*/
|
|
8
|
+
import { ease } from '../easing';
|
|
9
|
+
import { getPath, setPath, TS_ANIMATABLE_PATHS, type TSAnimatable, type TSStage, type TypeSurfaceConfig } from './config';
|
|
10
|
+
|
|
11
|
+
const clamp01 = (v: number) => (v < 0 ? 0 : v > 1 ? 1 : v);
|
|
12
|
+
const ramp = (p: number, a: number, b: number) => (b <= a ? (p >= b ? 1 : 0) : clamp01((p - a) / (b - a)));
|
|
13
|
+
|
|
14
|
+
/** 0–1: how far one stage has gone at progress `p`. */
|
|
15
|
+
export function stageEnvelope(stage: TSStage, p: number): number {
|
|
16
|
+
const curve = stage.easing ?? 'ease-in-out';
|
|
17
|
+
const up = ease(curve, ramp(p, stage.start, stage.end));
|
|
18
|
+
if (stage.outStart === undefined || stage.outEnd === undefined) return up;
|
|
19
|
+
return up * (1 - ease(curve, ramp(p, stage.outStart, stage.outEnd)));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The envelope of every driven amount at `p`. Several stages on one key combine by maximum, so a
|
|
24
|
+
* fold can come in, go out, and come in again.
|
|
25
|
+
*/
|
|
26
|
+
export function envelopes(stages: readonly TSStage[], p: number): Partial<Record<TSAnimatable, number>> {
|
|
27
|
+
const out: Partial<Record<TSAnimatable, number>> = {};
|
|
28
|
+
for (const s of stages) out[s.key] = Math.max(out[s.key] ?? 0, stageEnvelope(s, p));
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** The config as drawn at progress `p`: every driven amount scaled by its stage. Pure. */
|
|
33
|
+
export function configAt(config: TypeSurfaceConfig, p: number): TypeSurfaceConfig {
|
|
34
|
+
const env = envelopes(config.animation.stages, clamp01(p));
|
|
35
|
+
let out = config;
|
|
36
|
+
for (const [key, k] of Object.entries(env) as [TSAnimatable, number][]) {
|
|
37
|
+
const path = TS_ANIMATABLE_PATHS[key];
|
|
38
|
+
const v = getPath(config, path);
|
|
39
|
+
if (typeof v === 'number') out = setPath(out, path, v * k);
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The ordered labels a timeline shows: "FLAT → WRAP → FOLD → CRUMPLE → PRINT". */
|
|
45
|
+
export function stageLabels(stages: readonly TSStage[]): string[] {
|
|
46
|
+
return ['flat', ...[...stages].sort((a, b) => a.start - b.start).map((s) => s.label ?? s.key)];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Which stage is moving at `p` (for the playground's readout); null between stages. */
|
|
50
|
+
export function activeStage(stages: readonly TSStage[], p: number): TSStage | null {
|
|
51
|
+
let best: TSStage | null = null;
|
|
52
|
+
for (const s of stages) {
|
|
53
|
+
const inRamp = p >= s.start && p <= s.end;
|
|
54
|
+
const outRamp = s.outStart !== undefined && s.outEnd !== undefined && p >= s.outStart && p <= s.outEnd;
|
|
55
|
+
if ((inRamp || outRamp) && (!best || s.start > best.start)) best = s;
|
|
56
|
+
}
|
|
57
|
+
return best;
|
|
58
|
+
}
|