@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,666 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
/* eslint-disable comppack/no-raw-colour -- the backdrop fallback is scene content. */
|
|
3
|
+
/**
|
|
4
|
+
* **The WebGL2 renderer.** Draws what the geometry engine returns: table, loose page, the stack,
|
|
5
|
+
* the sheet, a prop, then the letters on top (depth-tested, so folds hide them), after a shadow
|
|
6
|
+
* pass from the key light. Textures are cached: the artwork per (surface, seed), the text raster
|
|
7
|
+
* per (text, typography, width). A colour or a slider never repaints anything; only new words or
|
|
8
|
+
* a new font repaint the text raster. Browser-only; no React.
|
|
9
|
+
*/
|
|
10
|
+
import { ART_FONTS, paintGrain, paintSurfaceArt } from './art';
|
|
11
|
+
import { TS_BLEND_MODES } from './config';
|
|
12
|
+
import { createGeometryEngine } from './engine';
|
|
13
|
+
import { layoutText, morphGap, glyphShift } from './layout';
|
|
14
|
+
import { DEPTH_FS, DEPTH_VS, SURFACE_FS, SURFACE_VS, TEXT_FS, TEXT_VS } from './shaders';
|
|
15
|
+
import { getSurface } from './surfaces';
|
|
16
|
+
import { canvasMeasurer, cssFont, rasterText } from './text';
|
|
17
|
+
const m4 = () => new Float32Array(16);
|
|
18
|
+
function mul(a, b, o = m4()) {
|
|
19
|
+
for (let i = 0; i < 4; i++)
|
|
20
|
+
for (let j = 0; j < 4; j++) {
|
|
21
|
+
let s = 0;
|
|
22
|
+
for (let k = 0; k < 4; k++)
|
|
23
|
+
s += a[k * 4 + j] * b[i * 4 + k];
|
|
24
|
+
o[i * 4 + j] = s;
|
|
25
|
+
}
|
|
26
|
+
return o;
|
|
27
|
+
}
|
|
28
|
+
function perspective(fovy, aspect, near, far) {
|
|
29
|
+
const f = 1 / Math.tan(fovy / 2), o = m4();
|
|
30
|
+
o[0] = f / aspect;
|
|
31
|
+
o[5] = f;
|
|
32
|
+
o[10] = (far + near) / (near - far);
|
|
33
|
+
o[11] = -1;
|
|
34
|
+
o[14] = (2 * far * near) / (near - far);
|
|
35
|
+
return o;
|
|
36
|
+
}
|
|
37
|
+
function ortho(r, near, far) {
|
|
38
|
+
const o = m4();
|
|
39
|
+
o[0] = 1 / r;
|
|
40
|
+
o[5] = 1 / r;
|
|
41
|
+
o[10] = -2 / (far - near);
|
|
42
|
+
o[14] = -(far + near) / (far - near);
|
|
43
|
+
o[15] = 1;
|
|
44
|
+
return o;
|
|
45
|
+
}
|
|
46
|
+
const sub = (a, b) => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
|
|
47
|
+
const cross = (a, b) => [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
|
|
48
|
+
const norm = (a) => { const l = Math.hypot(a[0], a[1], a[2]) || 1; return [a[0] / l, a[1] / l, a[2] / l]; };
|
|
49
|
+
const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
50
|
+
function lookAt(eye, at, up) {
|
|
51
|
+
const z = norm(sub(eye, at)), x = norm(cross(up, z)), y = cross(z, x), o = m4();
|
|
52
|
+
o[0] = x[0];
|
|
53
|
+
o[4] = x[1];
|
|
54
|
+
o[8] = x[2];
|
|
55
|
+
o[1] = y[0];
|
|
56
|
+
o[5] = y[1];
|
|
57
|
+
o[9] = y[2];
|
|
58
|
+
o[2] = z[0];
|
|
59
|
+
o[6] = z[1];
|
|
60
|
+
o[10] = z[2];
|
|
61
|
+
o[12] = -dot(x, eye);
|
|
62
|
+
o[13] = -dot(y, eye);
|
|
63
|
+
o[14] = -dot(z, eye);
|
|
64
|
+
o[15] = 1;
|
|
65
|
+
return o;
|
|
66
|
+
}
|
|
67
|
+
const hexRgb = (h) => {
|
|
68
|
+
const s = h.length === 4 ? h.slice(1).split('').map((c) => c + c).join('') : h.slice(1);
|
|
69
|
+
const n = parseInt(s, 16);
|
|
70
|
+
return Number.isFinite(n) ? [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255] : [0, 0, 0];
|
|
71
|
+
};
|
|
72
|
+
const TABLES = { desk: 0, studio: 1, wood: 3 };
|
|
73
|
+
/** How each substrate shades: specular, roughness, light through the sheet, and the shader's model. */
|
|
74
|
+
const SHADING = {
|
|
75
|
+
newsprint: { spec: 0.035, rough: 0.92, translucent: 0.18, model: 0 },
|
|
76
|
+
paper: { spec: 0.04, rough: 0.9, translucent: 0.2, model: 0 },
|
|
77
|
+
label: { spec: 0.12, rough: 0.55, translucent: 0, model: 1 },
|
|
78
|
+
film: { spec: 0.9, rough: 0.1, translucent: 0, model: 2 },
|
|
79
|
+
fabric: { spec: 0.02, rough: 0.95, translucent: 0.08, model: 3 },
|
|
80
|
+
};
|
|
81
|
+
/** The camera for a config and geometry: perspective sets tilt and field of view together (a dolly zoom). */
|
|
82
|
+
export function cameraFor(config, def, g, aspect) {
|
|
83
|
+
const p = config.deformation.perspective;
|
|
84
|
+
const pitch = Math.min(80, Math.max(0, def.camera.flat + (def.camera.deep - def.camera.flat) * p + config.view.pitch)) * (Math.PI / 180);
|
|
85
|
+
const yaw = config.view.yaw * (Math.PI / 180);
|
|
86
|
+
const fov = (10 + 18 * p) * (Math.PI / 180);
|
|
87
|
+
const fit = aspect < 1 ? 1 / aspect : 1;
|
|
88
|
+
const dist = (g.radius / Math.sin(fov / 2)) * 0.92 * fit / config.view.zoom;
|
|
89
|
+
const t = g.target;
|
|
90
|
+
const dir = [Math.sin(pitch) * Math.sin(yaw), -Math.sin(pitch) * Math.cos(yaw), Math.cos(pitch)];
|
|
91
|
+
const eye = [t[0] + dir[0] * dist, t[1] + dir[1] * dist, t[2] + dir[2] * dist];
|
|
92
|
+
const up = [-Math.cos(pitch) * Math.sin(yaw), Math.cos(pitch) * Math.cos(yaw), Math.sin(pitch)];
|
|
93
|
+
// Near and far hug the object: with a narrow lens the camera is far away, and a loose near plane
|
|
94
|
+
// would leave too little depth precision to keep a label 2.5 mm off its bottle.
|
|
95
|
+
const reach = g.radius * 3;
|
|
96
|
+
return { eye, target: t, up, fov, near: Math.max(dist * 0.05, dist - reach), far: dist + reach * 2 };
|
|
97
|
+
}
|
|
98
|
+
export class TypeSurfaceRenderer {
|
|
99
|
+
canvas;
|
|
100
|
+
ok;
|
|
101
|
+
error = null;
|
|
102
|
+
gl;
|
|
103
|
+
progSurf;
|
|
104
|
+
progText;
|
|
105
|
+
progDepth;
|
|
106
|
+
engines = new Map();
|
|
107
|
+
art = new Map();
|
|
108
|
+
grain;
|
|
109
|
+
textTex = null;
|
|
110
|
+
textKey = '';
|
|
111
|
+
layout = null;
|
|
112
|
+
layoutKey = '';
|
|
113
|
+
bufs = new Map();
|
|
114
|
+
shadowFbo;
|
|
115
|
+
shadowTex;
|
|
116
|
+
shadowSize = 2048;
|
|
117
|
+
indexVersions = new Map();
|
|
118
|
+
viewProj = m4();
|
|
119
|
+
fontsVersion = 0;
|
|
120
|
+
lastGeometry = null;
|
|
121
|
+
propUv = null;
|
|
122
|
+
onFonts = () => { this.fontsVersion++; };
|
|
123
|
+
constructor(canvas) {
|
|
124
|
+
this.canvas = canvas;
|
|
125
|
+
const gl = canvas.getContext('webgl2', { antialias: true, preserveDrawingBuffer: true, alpha: false, depth: true });
|
|
126
|
+
if (!gl) {
|
|
127
|
+
this.ok = false;
|
|
128
|
+
this.error = 'This browser has no WebGL2, which the surface lab needs.';
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
this.gl = gl;
|
|
132
|
+
try {
|
|
133
|
+
this.progSurf = this.program(SURFACE_VS, SURFACE_FS);
|
|
134
|
+
this.progText = this.program(TEXT_VS, TEXT_FS);
|
|
135
|
+
this.progDepth = this.program(DEPTH_VS, DEPTH_FS);
|
|
136
|
+
}
|
|
137
|
+
catch (e) {
|
|
138
|
+
this.ok = false;
|
|
139
|
+
this.error = e.message;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.grain = this.texture(paintGrain(3), true, true);
|
|
143
|
+
this.shadowTex = gl.createTexture();
|
|
144
|
+
gl.bindTexture(gl.TEXTURE_2D, this.shadowTex);
|
|
145
|
+
gl.texStorage2D(gl.TEXTURE_2D, 1, gl.DEPTH_COMPONENT24, this.shadowSize, this.shadowSize);
|
|
146
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
147
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
148
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);
|
|
149
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
150
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
151
|
+
this.shadowFbo = gl.createFramebuffer();
|
|
152
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, this.shadowFbo);
|
|
153
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, this.shadowTex, 0);
|
|
154
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
155
|
+
document.fonts?.addEventListener?.('loadingdone', this.onFonts);
|
|
156
|
+
for (const f of ART_FONTS)
|
|
157
|
+
void document.fonts?.load?.(f).catch(() => undefined);
|
|
158
|
+
this.ok = true;
|
|
159
|
+
}
|
|
160
|
+
dispose() {
|
|
161
|
+
document.fonts?.removeEventListener?.('loadingdone', this.onFonts);
|
|
162
|
+
this.gl?.getExtension('WEBGL_lose_context')?.loseContext();
|
|
163
|
+
}
|
|
164
|
+
program(vs, fs) {
|
|
165
|
+
const gl = this.gl;
|
|
166
|
+
const sh = (type, src) => {
|
|
167
|
+
const s = gl.createShader(type);
|
|
168
|
+
gl.shaderSource(s, src);
|
|
169
|
+
gl.compileShader(s);
|
|
170
|
+
if (!gl.getShaderParameter(s, gl.COMPILE_STATUS))
|
|
171
|
+
throw new Error(`Shader: ${gl.getShaderInfoLog(s)}`);
|
|
172
|
+
return s;
|
|
173
|
+
};
|
|
174
|
+
const p = gl.createProgram();
|
|
175
|
+
gl.attachShader(p, sh(gl.VERTEX_SHADER, vs));
|
|
176
|
+
gl.attachShader(p, sh(gl.FRAGMENT_SHADER, fs));
|
|
177
|
+
gl.linkProgram(p);
|
|
178
|
+
if (!gl.getProgramParameter(p, gl.LINK_STATUS))
|
|
179
|
+
throw new Error(`Link: ${gl.getProgramInfoLog(p)}`);
|
|
180
|
+
return { p, u: new Map() };
|
|
181
|
+
}
|
|
182
|
+
loc(pr, name) {
|
|
183
|
+
if (!pr.u.has(name))
|
|
184
|
+
pr.u.set(name, this.gl.getUniformLocation(pr.p, name));
|
|
185
|
+
return pr.u.get(name) ?? null;
|
|
186
|
+
}
|
|
187
|
+
texture(src, mip, repeat = false) {
|
|
188
|
+
const gl = this.gl;
|
|
189
|
+
const t = gl.createTexture();
|
|
190
|
+
gl.bindTexture(gl.TEXTURE_2D, t);
|
|
191
|
+
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
|
192
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src);
|
|
193
|
+
if (mip)
|
|
194
|
+
gl.generateMipmap(gl.TEXTURE_2D);
|
|
195
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, mip ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);
|
|
196
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
197
|
+
const wrap = repeat ? gl.REPEAT : gl.CLAMP_TO_EDGE;
|
|
198
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrap);
|
|
199
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrap);
|
|
200
|
+
const aniso = gl.getExtension('EXT_texture_filter_anisotropic');
|
|
201
|
+
if (aniso && mip)
|
|
202
|
+
gl.texParameterf(gl.TEXTURE_2D, aniso.TEXTURE_MAX_ANISOTROPY_EXT, 8);
|
|
203
|
+
return t;
|
|
204
|
+
}
|
|
205
|
+
buffer(key, data, target, count) {
|
|
206
|
+
const gl = this.gl;
|
|
207
|
+
let b = this.bufs.get(key);
|
|
208
|
+
const bytes = (count ?? data.length) * 4;
|
|
209
|
+
if (!b || b.size < bytes) {
|
|
210
|
+
if (b)
|
|
211
|
+
gl.deleteBuffer(b.buf);
|
|
212
|
+
b = { buf: gl.createBuffer(), size: data.byteLength };
|
|
213
|
+
gl.bindBuffer(target, b.buf);
|
|
214
|
+
gl.bufferData(target, data.byteLength, gl.DYNAMIC_DRAW);
|
|
215
|
+
this.bufs.set(key, b);
|
|
216
|
+
}
|
|
217
|
+
gl.bindBuffer(target, b.buf);
|
|
218
|
+
gl.bufferSubData(target, 0, data, 0, count ?? data.length);
|
|
219
|
+
return b.buf;
|
|
220
|
+
}
|
|
221
|
+
attr(loc, key, data, size, count) {
|
|
222
|
+
const gl = this.gl;
|
|
223
|
+
this.buffer(key, data, gl.ARRAY_BUFFER, count === undefined ? undefined : count * size);
|
|
224
|
+
gl.enableVertexAttribArray(loc);
|
|
225
|
+
gl.vertexAttribPointer(loc, size, gl.FLOAT, false, 0, 0);
|
|
226
|
+
}
|
|
227
|
+
attrKeep(loc, key, size) {
|
|
228
|
+
const gl = this.gl;
|
|
229
|
+
const b = this.bufs.get(key);
|
|
230
|
+
if (!b)
|
|
231
|
+
return;
|
|
232
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, b.buf);
|
|
233
|
+
gl.enableVertexAttribArray(loc);
|
|
234
|
+
gl.vertexAttribPointer(loc, size, gl.FLOAT, false, 0, 0);
|
|
235
|
+
}
|
|
236
|
+
elements(key, data, count, version) {
|
|
237
|
+
const gl = this.gl;
|
|
238
|
+
if (this.indexVersions.get(key) !== version || !this.bufs.has(key)) {
|
|
239
|
+
this.buffer(key, data, gl.ELEMENT_ARRAY_BUFFER, count);
|
|
240
|
+
this.indexVersions.set(key, version);
|
|
241
|
+
}
|
|
242
|
+
else
|
|
243
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.bufs.get(key).buf);
|
|
244
|
+
}
|
|
245
|
+
engine(def) {
|
|
246
|
+
let e = this.engines.get(def.id);
|
|
247
|
+
if (!e) {
|
|
248
|
+
e = createGeometryEngine(def);
|
|
249
|
+
this.engines.set(def.id, e);
|
|
250
|
+
}
|
|
251
|
+
return e;
|
|
252
|
+
}
|
|
253
|
+
artFor(def, seed, color) {
|
|
254
|
+
const key = `${def.id}:${seed}:${color}:${this.fontsVersion}`;
|
|
255
|
+
let a = this.art.get(key);
|
|
256
|
+
if (!a) {
|
|
257
|
+
const aspect = def.height / def.width;
|
|
258
|
+
const { front, back, inner } = paintSurfaceArt(def.art, seed, aspect, color);
|
|
259
|
+
for (const [k, v] of this.art)
|
|
260
|
+
if (k.startsWith(`${def.id}:`)) {
|
|
261
|
+
this.gl.deleteTexture(v.front);
|
|
262
|
+
this.gl.deleteTexture(v.back);
|
|
263
|
+
this.gl.deleteTexture(v.inner);
|
|
264
|
+
this.art.delete(k);
|
|
265
|
+
}
|
|
266
|
+
a = { front: this.texture(front, true), back: this.texture(back, true), inner: this.texture(inner, true), aspect };
|
|
267
|
+
this.art.set(key, a);
|
|
268
|
+
}
|
|
269
|
+
return a;
|
|
270
|
+
}
|
|
271
|
+
/** The text layout for a config (cached); null for empty text. */
|
|
272
|
+
layoutFor(config) {
|
|
273
|
+
const t = config.typography;
|
|
274
|
+
const key = `${config.text}|${cssFont(t, 100)}|${t.letterSpacing}|${t.lineHeight}|${t.align}|${config.placement.maxWidth}|${this.fontsVersion}`;
|
|
275
|
+
if (key !== this.layoutKey) {
|
|
276
|
+
this.layoutKey = key;
|
|
277
|
+
this.layout = config.text.trim() ? layoutText(config.text, t, config.placement.maxWidth, canvasMeasurer) : null;
|
|
278
|
+
void document.fonts?.load?.(cssFont(t, 100), config.text).catch(() => undefined);
|
|
279
|
+
}
|
|
280
|
+
return this.layout;
|
|
281
|
+
}
|
|
282
|
+
textTexture(config, layout) {
|
|
283
|
+
if (this.layoutKey !== this.textKey) {
|
|
284
|
+
this.textKey = this.layoutKey;
|
|
285
|
+
if (this.textTex)
|
|
286
|
+
this.gl.deleteTexture(this.textTex);
|
|
287
|
+
this.textTex = this.texture(rasterText(layout, config.typography).canvas, true);
|
|
288
|
+
}
|
|
289
|
+
return this.textTex;
|
|
290
|
+
}
|
|
291
|
+
/** Where a world point lands on the canvas, in CSS pixels (for the debug overlay and picking). */
|
|
292
|
+
project(p, o = 0) {
|
|
293
|
+
const m = this.viewProj;
|
|
294
|
+
const x = p[o], y = p[o + 1], z = p[o + 2];
|
|
295
|
+
const cx = m[0] * x + m[4] * y + m[8] * z + m[12];
|
|
296
|
+
const cy = m[1] * x + m[5] * y + m[9] * z + m[13];
|
|
297
|
+
const cw = m[3] * x + m[7] * y + m[11] * z + m[15];
|
|
298
|
+
const w = this.canvas.clientWidth, h = this.canvas.clientHeight;
|
|
299
|
+
return [((cx / cw) * 0.5 + 0.5) * w, (1 - ((cy / cw) * 0.5 + 0.5)) * h, cw];
|
|
300
|
+
}
|
|
301
|
+
get geometry() { return this.lastGeometry; }
|
|
302
|
+
/** Draw `config` (already at its timeline moment) at `timeMs`. */
|
|
303
|
+
render(config, timeMs, debug = {}) {
|
|
304
|
+
if (!this.ok)
|
|
305
|
+
return null;
|
|
306
|
+
const gl = this.gl;
|
|
307
|
+
const cv = this.canvas;
|
|
308
|
+
const dpr = Math.min(2, window.devicePixelRatio || 1);
|
|
309
|
+
const W = Math.max(2, Math.round(cv.clientWidth * dpr)), H = Math.max(2, Math.round(cv.clientHeight * dpr));
|
|
310
|
+
if (cv.width !== W || cv.height !== H) {
|
|
311
|
+
cv.width = W;
|
|
312
|
+
cv.height = H;
|
|
313
|
+
}
|
|
314
|
+
const def = getSurface(config.surface.type);
|
|
315
|
+
const layout = this.layoutFor(config);
|
|
316
|
+
const g = this.engine(def).evaluate(config, timeMs, layout, { guides: !!(debug.folds || debug.bounds || debug.baseline || debug.controls) });
|
|
317
|
+
this.lastGeometry = g;
|
|
318
|
+
const art = this.artFor(def, config.surface.seed, def.prop ? def.color : config.surface.color ?? def.color);
|
|
319
|
+
const textTex = layout && g.text ? this.textTexture(config, layout) : null;
|
|
320
|
+
const cam = cameraFor(config, def, g, W / H);
|
|
321
|
+
const view = lookAt(cam.eye, cam.target, cam.up);
|
|
322
|
+
const proj = perspective(cam.fov, W / H, cam.near, cam.far);
|
|
323
|
+
mul(proj, view, this.viewProj);
|
|
324
|
+
const L = norm([-0.55, 0.62, 0.56]);
|
|
325
|
+
const lr = g.radius * 1.9;
|
|
326
|
+
const lightEye = [g.target[0] + L[0] * 6, g.target[1] + L[1] * 6, g.target[2] + L[2] * 6];
|
|
327
|
+
const lightVP = mul(ortho(lr, 0.1, 14), lookAt(lightEye, g.target, [0, 1, 0]));
|
|
328
|
+
const backdrop = hexRgb(def.backdrop[1]);
|
|
329
|
+
const tableQuad = new Float32Array([-9, 9, g.tableZ, 9, 9, g.tableZ, -9, -9, g.tableZ, 9, -9, g.tableZ]);
|
|
330
|
+
const up4 = new Float32Array([0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1]);
|
|
331
|
+
const tuv4 = new Float32Array(8);
|
|
332
|
+
const zeros = new Float32Array(16);
|
|
333
|
+
const quadIdx = new Uint32Array([0, 2, 1, 1, 2, 3]);
|
|
334
|
+
// Glyph remap data (letters spread mid-morph).
|
|
335
|
+
const gap = layout ? morphGap(config.deformation.morph, layout) : 0;
|
|
336
|
+
const glyphs = new Float32Array(96 * 4), lines = new Float32Array(8 * 4);
|
|
337
|
+
let glyphTotal = 0;
|
|
338
|
+
if (layout) {
|
|
339
|
+
layout.lines.slice(0, 8).forEach((l, li) => {
|
|
340
|
+
lines[li * 4] = li === 0 ? -1e6 : l.top;
|
|
341
|
+
lines[li * 4 + 2] = glyphTotal;
|
|
342
|
+
let c = 0;
|
|
343
|
+
l.glyphs.forEach((gl2, i) => { if (glyphTotal < 96) {
|
|
344
|
+
glyphs.set([gl2.x0, gl2.x1, glyphShift(l, i, gap), 0], glyphTotal * 4);
|
|
345
|
+
glyphTotal++;
|
|
346
|
+
c++;
|
|
347
|
+
} });
|
|
348
|
+
lines[li * 4 + 3] = c;
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
const gapOn = layout && glyphTotal < 96 ? gap : 0;
|
|
352
|
+
const setTextAlpha = (pr) => {
|
|
353
|
+
gl.uniform2f(this.loc(pr, 'uBlock'), layout.width, layout.height);
|
|
354
|
+
gl.uniform1f(this.loc(pr, 'uGap'), gapOn);
|
|
355
|
+
gl.uniform4fv(this.loc(pr, 'uGlyphs'), glyphs);
|
|
356
|
+
gl.uniform4fv(this.loc(pr, 'uLines'), lines);
|
|
357
|
+
gl.uniform1i(this.loc(pr, 'uLineCount'), Math.min(8, layout.lines.length));
|
|
358
|
+
gl.activeTexture(gl.TEXTURE3);
|
|
359
|
+
gl.bindTexture(gl.TEXTURE_2D, textTex);
|
|
360
|
+
gl.uniform1i(this.loc(pr, 'uText'), 3);
|
|
361
|
+
};
|
|
362
|
+
// Upload geometry.
|
|
363
|
+
const bindSheet = (positionsKey, positions) => {
|
|
364
|
+
this.attr(0, positionsKey, positions, 3);
|
|
365
|
+
this.attrKeep(1, 'sheet.n', 3);
|
|
366
|
+
this.attrKeep(2, `sheet.uv:${def.id}`, 2);
|
|
367
|
+
this.attrKeep(3, 'sheet.a', 4);
|
|
368
|
+
gl.disableVertexAttribArray(4);
|
|
369
|
+
this.elements(`sheet.i:${def.id}`, g.indices, g.indices.length, 1);
|
|
370
|
+
};
|
|
371
|
+
this.buffer('sheet.n', g.sheet.normals, gl.ARRAY_BUFFER);
|
|
372
|
+
this.buffer('sheet.a', g.sheet.attrs, gl.ARRAY_BUFFER);
|
|
373
|
+
if (!this.bufs.has(`sheet.uv:${def.id}`))
|
|
374
|
+
this.buffer(`sheet.uv:${def.id}`, g.uvs, gl.ARRAY_BUFFER);
|
|
375
|
+
const bindProp = () => {
|
|
376
|
+
const pr = g.prop;
|
|
377
|
+
this.attr(0, 'prop.p', pr.positions, 3);
|
|
378
|
+
this.attr(1, 'prop.n', pr.normals, 3);
|
|
379
|
+
this.propUv = this.propUv?.length === pr.vertexCount * 2 ? this.propUv : new Float32Array(pr.vertexCount * 2);
|
|
380
|
+
this.attr(2, 'prop.uv', this.propUv, 2);
|
|
381
|
+
this.attr(3, 'prop.a', pr.attrs, 4);
|
|
382
|
+
gl.disableVertexAttribArray(4);
|
|
383
|
+
this.elements(`prop.i:${def.id}`, pr.indices, pr.indices.length, 1);
|
|
384
|
+
};
|
|
385
|
+
const drawSheetGeom = () => gl.drawElements(gl.TRIANGLES, g.indices.length, gl.UNSIGNED_INT, 0);
|
|
386
|
+
const bindText = () => {
|
|
387
|
+
const t = g.text;
|
|
388
|
+
this.attr(0, 'text.p', t.positions, 3, t.vertexCount);
|
|
389
|
+
this.attr(1, 'text.n', t.normals, 3, t.vertexCount);
|
|
390
|
+
this.attr(2, 'text.uv', t.uvs, 2, t.vertexCount);
|
|
391
|
+
this.attr(3, 'text.a', t.attrs, 4, t.vertexCount);
|
|
392
|
+
this.attr(4, 'text.tuv', t.tuv, 2, t.vertexCount);
|
|
393
|
+
this.elements('text.i', t.indices, t.indexCount, t.indexVersion * 100000 + t.indexCount);
|
|
394
|
+
};
|
|
395
|
+
const bindQuad = (key, pos, uvs) => {
|
|
396
|
+
this.attr(0, `${key}.p`, pos, 3);
|
|
397
|
+
this.attr(1, 'quad.n', up4, 3);
|
|
398
|
+
this.attr(2, `${key}.uv`, uvs, 2);
|
|
399
|
+
this.attr(3, 'quad.a', zeros, 4);
|
|
400
|
+
this.attr(4, 'quad.tuv', tuv4, 2);
|
|
401
|
+
this.elements('quad.i', quadIdx, 6, 1);
|
|
402
|
+
};
|
|
403
|
+
// ---- shadow pass ----
|
|
404
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, this.shadowFbo);
|
|
405
|
+
gl.viewport(0, 0, this.shadowSize, this.shadowSize);
|
|
406
|
+
gl.clear(gl.DEPTH_BUFFER_BIT);
|
|
407
|
+
gl.enable(gl.DEPTH_TEST);
|
|
408
|
+
gl.disable(gl.CULL_FACE);
|
|
409
|
+
gl.enable(gl.POLYGON_OFFSET_FILL);
|
|
410
|
+
gl.polygonOffset(2, 4);
|
|
411
|
+
const dp = this.progDepth;
|
|
412
|
+
gl.useProgram(dp.p);
|
|
413
|
+
gl.uniformMatrix4fv(this.loc(dp, 'uVP'), false, lightVP);
|
|
414
|
+
gl.uniform1i(this.loc(dp, 'uIsText'), 0);
|
|
415
|
+
if (!debug.noShadows) {
|
|
416
|
+
bindSheet('sheet.p', g.sheet.positions);
|
|
417
|
+
drawSheetGeom();
|
|
418
|
+
}
|
|
419
|
+
if (!debug.noShadows)
|
|
420
|
+
g.stack.forEach((s, i) => { bindSheet(`stack${i}.p`, s); drawSheetGeom(); });
|
|
421
|
+
if (g.prop && !debug.noShadows) {
|
|
422
|
+
bindProp();
|
|
423
|
+
gl.drawElements(gl.TRIANGLES, g.prop.indices.length, gl.UNSIGNED_INT, 0);
|
|
424
|
+
}
|
|
425
|
+
if (layout && g.text && textTex && config.material.shadow > 0.02 && !debug.noShadows) {
|
|
426
|
+
gl.uniform1i(this.loc(dp, 'uIsText'), 1);
|
|
427
|
+
gl.uniform1f(this.loc(dp, 'uCast'), 0.4 + config.material.shadow);
|
|
428
|
+
setTextAlpha(dp);
|
|
429
|
+
bindText();
|
|
430
|
+
gl.drawElements(gl.TRIANGLES, g.text.indexCount, gl.UNSIGNED_INT, 0);
|
|
431
|
+
}
|
|
432
|
+
gl.disable(gl.POLYGON_OFFSET_FILL);
|
|
433
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
434
|
+
// ---- main pass ----
|
|
435
|
+
gl.viewport(0, 0, W, H);
|
|
436
|
+
gl.clearColor(backdrop[0], backdrop[1], backdrop[2], 1);
|
|
437
|
+
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
|
438
|
+
const sp = this.progSurf;
|
|
439
|
+
gl.useProgram(sp.p);
|
|
440
|
+
const common = (pr) => {
|
|
441
|
+
gl.uniformMatrix4fv(this.loc(pr, 'uVP'), false, this.viewProj);
|
|
442
|
+
gl.uniformMatrix4fv(this.loc(pr, 'uLightVP'), false, lightVP);
|
|
443
|
+
gl.uniform3fv(this.loc(pr, 'uLightDir'), L);
|
|
444
|
+
gl.uniform3fv(this.loc(pr, 'uEye'), cam.eye);
|
|
445
|
+
gl.uniform3f(this.loc(pr, 'uKey'), 1.28, 1.23, 1.13);
|
|
446
|
+
gl.uniform1f(this.loc(pr, 'uAmb'), 0.55);
|
|
447
|
+
gl.uniform3fv(this.loc(pr, 'uBackdrop'), backdrop);
|
|
448
|
+
gl.uniform3fv(this.loc(pr, 'uTarget'), g.target);
|
|
449
|
+
gl.uniform1f(this.loc(pr, 'uRadius'), g.radius);
|
|
450
|
+
gl.uniform1f(this.loc(pr, 'uAspect'), art.aspect);
|
|
451
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
452
|
+
gl.bindTexture(gl.TEXTURE_2D, this.shadowTex);
|
|
453
|
+
gl.uniform1i(this.loc(pr, 'uShadow'), 0);
|
|
454
|
+
gl.activeTexture(gl.TEXTURE4);
|
|
455
|
+
gl.bindTexture(gl.TEXTURE_2D, this.grain);
|
|
456
|
+
gl.uniform1i(this.loc(pr, 'uGrain'), 4);
|
|
457
|
+
};
|
|
458
|
+
common(sp);
|
|
459
|
+
const tex = (front, back) => {
|
|
460
|
+
gl.activeTexture(gl.TEXTURE1);
|
|
461
|
+
gl.bindTexture(gl.TEXTURE_2D, front);
|
|
462
|
+
gl.uniform1i(this.loc(sp, 'uFront'), 1);
|
|
463
|
+
gl.activeTexture(gl.TEXTURE2);
|
|
464
|
+
gl.bindTexture(gl.TEXTURE_2D, back);
|
|
465
|
+
gl.uniform1i(this.loc(sp, 'uBackTex'), 2);
|
|
466
|
+
};
|
|
467
|
+
const look = SHADING[def.shading];
|
|
468
|
+
gl.uniform1f(this.loc(sp, 'uSpec'), look.spec);
|
|
469
|
+
gl.uniform1f(this.loc(sp, 'uRough'), look.rough);
|
|
470
|
+
gl.uniform1f(this.loc(sp, 'uTranslucent'), look.translucent);
|
|
471
|
+
gl.uniform1i(this.loc(sp, 'uShading'), look.model);
|
|
472
|
+
gl.uniform3fv(this.loc(sp, 'uPropColor'), hexRgb(config.surface.color ?? def.color));
|
|
473
|
+
gl.uniform3fv(this.loc(sp, 'uCapColor'), hexRgb('#E0431B'));
|
|
474
|
+
gl.uniform1i(this.loc(sp, 'uDebug'), 0);
|
|
475
|
+
// Table.
|
|
476
|
+
gl.uniform1i(this.loc(sp, 'uMode'), 1);
|
|
477
|
+
gl.uniform1i(this.loc(sp, 'uTable'), TABLES[def.table]);
|
|
478
|
+
tex(art.inner, art.inner);
|
|
479
|
+
bindQuad('table', tableQuad, new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]));
|
|
480
|
+
gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_INT, 0);
|
|
481
|
+
gl.uniform1i(this.loc(sp, 'uMode'), 0);
|
|
482
|
+
if (g.loose) {
|
|
483
|
+
tex(art.inner, art.back);
|
|
484
|
+
bindQuad('loose', g.loose.positions, g.loose.uvs);
|
|
485
|
+
gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_INT, 0);
|
|
486
|
+
}
|
|
487
|
+
tex(art.inner, art.back);
|
|
488
|
+
g.stack.forEach((s, i) => { bindSheet(`stack${i}.p`, s); drawSheetGeom(); });
|
|
489
|
+
gl.uniform1i(this.loc(sp, 'uDebug'), debug.deformation ? 1 : debug.mapping ? 2 : 0);
|
|
490
|
+
tex(art.front, art.back);
|
|
491
|
+
bindSheet('sheet.p', g.sheet.positions);
|
|
492
|
+
drawSheetGeom();
|
|
493
|
+
if (g.prop) {
|
|
494
|
+
gl.uniform1i(this.loc(sp, 'uMode'), 2);
|
|
495
|
+
gl.uniform1i(this.loc(sp, 'uDebug'), 0);
|
|
496
|
+
bindProp();
|
|
497
|
+
gl.drawElements(gl.TRIANGLES, g.prop.indices.length, gl.UNSIGNED_INT, 0);
|
|
498
|
+
gl.uniform1i(this.loc(sp, 'uMode'), 0);
|
|
499
|
+
}
|
|
500
|
+
// ---- letters ----
|
|
501
|
+
if (layout && g.text && textTex && g.text.indexCount > 0) {
|
|
502
|
+
const tp = this.progText;
|
|
503
|
+
gl.useProgram(tp.p);
|
|
504
|
+
common(tp);
|
|
505
|
+
setTextAlpha(tp);
|
|
506
|
+
gl.activeTexture(gl.TEXTURE1);
|
|
507
|
+
gl.bindTexture(gl.TEXTURE_2D, art.front);
|
|
508
|
+
gl.uniform1i(this.loc(tp, 'uPaper'), 1);
|
|
509
|
+
const ty = config.typography, m = config.material;
|
|
510
|
+
gl.uniform3fv(this.loc(tp, 'uColor'), hexRgb(ty.color));
|
|
511
|
+
gl.uniform3fv(this.loc(tp, 'uColor2'), hexRgb(ty.gradient.to));
|
|
512
|
+
if (ty.gradient.enabled)
|
|
513
|
+
gl.uniform3fv(this.loc(tp, 'uColor'), hexRgb(ty.gradient.from));
|
|
514
|
+
gl.uniform1f(this.loc(tp, 'uGradOn'), ty.gradient.enabled ? 1 : 0);
|
|
515
|
+
gl.uniform1f(this.loc(tp, 'uGradAngle'), ty.gradient.angle);
|
|
516
|
+
gl.uniform1f(this.loc(tp, 'uOpacity'), ty.opacity);
|
|
517
|
+
gl.uniform1i(this.loc(tp, 'uBlendMode'), Math.max(0, TS_BLEND_MODES.indexOf(ty.blendMode)));
|
|
518
|
+
gl.uniform1i(this.loc(tp, 'uMat'), 0);
|
|
519
|
+
gl.uniform1f(this.loc(tp, 'uBlendAmt'), m.blend);
|
|
520
|
+
gl.uniform1f(this.loc(tp, 'uInkStrength'), m.inkStrength);
|
|
521
|
+
gl.uniform1f(this.loc(tp, 'uSpread'), m.inkSpread);
|
|
522
|
+
gl.uniform1f(this.loc(tp, 'uRough'), m.inkRoughness);
|
|
523
|
+
gl.uniform1f(this.loc(tp, 'uPaperInf'), m.paperInfluence);
|
|
524
|
+
gl.uniform1f(this.loc(tp, 'uGrainInf'), m.grainInfluence);
|
|
525
|
+
gl.uniform1f(this.loc(tp, 'uHalftone'), m.halftone);
|
|
526
|
+
gl.uniform1f(this.loc(tp, 'uDisp'), m.displacement);
|
|
527
|
+
gl.uniform1f(this.loc(tp, 'uContrast'), m.surfaceContrast);
|
|
528
|
+
gl.uniform1f(this.loc(tp, 'uGloss'), m.gloss);
|
|
529
|
+
gl.uniform1f(this.loc(tp, 'uEmboss'), m.type === 'emboss' ? m.emboss : m.emboss * 0.25);
|
|
530
|
+
gl.uniform1f(this.loc(tp, 'uLod'), 0);
|
|
531
|
+
bindText();
|
|
532
|
+
gl.enable(gl.BLEND);
|
|
533
|
+
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
|
534
|
+
gl.enable(gl.POLYGON_OFFSET_FILL);
|
|
535
|
+
gl.polygonOffset(-1, -2);
|
|
536
|
+
gl.depthMask(false);
|
|
537
|
+
gl.drawElements(gl.TRIANGLES, g.text.indexCount, gl.UNSIGNED_INT, 0);
|
|
538
|
+
gl.depthMask(true);
|
|
539
|
+
gl.disable(gl.POLYGON_OFFSET_FILL);
|
|
540
|
+
gl.disable(gl.BLEND);
|
|
541
|
+
}
|
|
542
|
+
return g;
|
|
543
|
+
}
|
|
544
|
+
/** The nearest sheet vertex to a canvas point (CSS px): its uv, or null off the surface. */
|
|
545
|
+
pick(x, y) {
|
|
546
|
+
const g = this.lastGeometry;
|
|
547
|
+
if (!g)
|
|
548
|
+
return null;
|
|
549
|
+
let best = Infinity, bi = -1;
|
|
550
|
+
const pos = g.sheet.positions;
|
|
551
|
+
const step = 2;
|
|
552
|
+
for (let k = 0; k < g.nu * g.nv; k += step) {
|
|
553
|
+
const [px, py, w] = this.project(pos, k * 3);
|
|
554
|
+
if (w <= 0)
|
|
555
|
+
continue;
|
|
556
|
+
const d = (px - x) ** 2 + (py - y) ** 2;
|
|
557
|
+
if (d < best) {
|
|
558
|
+
best = d;
|
|
559
|
+
bi = k;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (bi < 0 || best > 40 * 40)
|
|
563
|
+
return null;
|
|
564
|
+
return { u: g.uvs[bi * 2], v: g.uvs[bi * 2 + 1] };
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
/** Draw the debug overlay (mesh, folds, bounds, baselines, normals, control points) on a 2D canvas. */
|
|
568
|
+
export function drawDebugOverlay(ctx, r, debug) {
|
|
569
|
+
const g = r.geometry;
|
|
570
|
+
const c = ctx.canvas;
|
|
571
|
+
const dpr = Math.min(2, window.devicePixelRatio || 1);
|
|
572
|
+
const w = Math.round(c.clientWidth * dpr), h = Math.round(c.clientHeight * dpr);
|
|
573
|
+
if (c.width !== w || c.height !== h) {
|
|
574
|
+
c.width = w;
|
|
575
|
+
c.height = h;
|
|
576
|
+
}
|
|
577
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
578
|
+
ctx.clearRect(0, 0, c.clientWidth, c.clientHeight);
|
|
579
|
+
if (!g)
|
|
580
|
+
return;
|
|
581
|
+
const poly = (pts, color, width = 1, dash = []) => {
|
|
582
|
+
ctx.strokeStyle = color;
|
|
583
|
+
ctx.lineWidth = width;
|
|
584
|
+
ctx.setLineDash(dash);
|
|
585
|
+
ctx.beginPath();
|
|
586
|
+
for (let k = 0; k < pts.length / 3; k++) {
|
|
587
|
+
const [x, y] = r.project(pts, k * 3);
|
|
588
|
+
if (k)
|
|
589
|
+
ctx.lineTo(x, y);
|
|
590
|
+
else
|
|
591
|
+
ctx.moveTo(x, y);
|
|
592
|
+
}
|
|
593
|
+
ctx.stroke();
|
|
594
|
+
ctx.setLineDash([]);
|
|
595
|
+
};
|
|
596
|
+
if (debug.mesh) {
|
|
597
|
+
const pos = g.sheet.positions;
|
|
598
|
+
ctx.strokeStyle = 'rgba(80,200,255,0.45)';
|
|
599
|
+
ctx.lineWidth = 0.6;
|
|
600
|
+
const step = 6;
|
|
601
|
+
for (let j = 0; j < g.nv; j += step) {
|
|
602
|
+
ctx.beginPath();
|
|
603
|
+
for (let i = 0; i < g.nu; i++) {
|
|
604
|
+
const [x, y] = r.project(pos, (j * g.nu + i) * 3);
|
|
605
|
+
if (i)
|
|
606
|
+
ctx.lineTo(x, y);
|
|
607
|
+
else
|
|
608
|
+
ctx.moveTo(x, y);
|
|
609
|
+
}
|
|
610
|
+
ctx.stroke();
|
|
611
|
+
}
|
|
612
|
+
for (let i = 0; i < g.nu; i += step) {
|
|
613
|
+
ctx.beginPath();
|
|
614
|
+
for (let j = 0; j < g.nv; j++) {
|
|
615
|
+
const [x, y] = r.project(pos, (j * g.nu + i) * 3);
|
|
616
|
+
if (j)
|
|
617
|
+
ctx.lineTo(x, y);
|
|
618
|
+
else
|
|
619
|
+
ctx.moveTo(x, y);
|
|
620
|
+
}
|
|
621
|
+
ctx.stroke();
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if (debug.normals) {
|
|
625
|
+
const pos = g.sheet.positions, n = g.sheet.normals;
|
|
626
|
+
ctx.strokeStyle = 'rgba(120,255,140,0.8)';
|
|
627
|
+
ctx.lineWidth = 1;
|
|
628
|
+
const len = g.def.width * 0.035;
|
|
629
|
+
for (let j = 0; j < g.nv; j += 12)
|
|
630
|
+
for (let i = 0; i < g.nu; i += 12) {
|
|
631
|
+
const k = (j * g.nu + i) * 3;
|
|
632
|
+
const [x0, y0] = r.project(pos, k);
|
|
633
|
+
const [x1, y1] = r.project([pos[k] + n[k] * len, pos[k + 1] + n[k + 1] * len, pos[k + 2] + n[k + 2] * len]);
|
|
634
|
+
ctx.beginPath();
|
|
635
|
+
ctx.moveTo(x0, y0);
|
|
636
|
+
ctx.lineTo(x1, y1);
|
|
637
|
+
ctx.stroke();
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
const gd = g.guides;
|
|
641
|
+
if (gd) {
|
|
642
|
+
if (debug.folds) {
|
|
643
|
+
gd.folds.forEach((f) => poly(f, '#ffd23f', 2, [6, 4]));
|
|
644
|
+
gd.foldZones.forEach((f) => poly(f, 'rgba(255,210,63,0.5)', 1, [2, 3]));
|
|
645
|
+
if (gd.roll)
|
|
646
|
+
poly(gd.roll, '#ff8c3f', 2, [6, 4]);
|
|
647
|
+
}
|
|
648
|
+
if (debug.bounds && gd.textOutline)
|
|
649
|
+
poly(gd.textOutline, '#ff4fd8', 1.5);
|
|
650
|
+
if (debug.baseline)
|
|
651
|
+
gd.baselines.forEach((b) => poly(b, '#4fe3ff', 1.5));
|
|
652
|
+
if (debug.controls) {
|
|
653
|
+
for (let k = 0; k < gd.anchors.length / 3; k++) {
|
|
654
|
+
const [x, y] = r.project(gd.anchors, k * 3);
|
|
655
|
+
ctx.fillStyle = '#fff';
|
|
656
|
+
ctx.strokeStyle = '#111';
|
|
657
|
+
ctx.lineWidth = 1.5;
|
|
658
|
+
ctx.beginPath();
|
|
659
|
+
ctx.arc(x, y, 5, 0, Math.PI * 2);
|
|
660
|
+
ctx.fill();
|
|
661
|
+
ctx.stroke();
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
//# sourceMappingURL=renderer.js.map
|