@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,603 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The geometry engine.** One surface, one mesh, evaluated for a config at a moment:
|
|
3
|
+
*
|
|
4
|
+
* sheet the surface through its own shape → wrinkles → crumple → folds → roll → cylinder,
|
|
5
|
+
* then the rigid turns of the whole object (horizontal/vertical distortion)
|
|
6
|
+
* stack the pages under a newspaper's top sheet, offset along its normals
|
|
7
|
+
* text a mesh made of the SHEET'S OWN CELLS under the text block. Each vertex blends from
|
|
8
|
+
* its floating position (flat, above everything) to the sheet vertex it belongs to, so
|
|
9
|
+
* conformed letters lie on exactly the paper's triangles, crease for crease
|
|
10
|
+
* prop a solid the surface wraps (the bottle)
|
|
11
|
+
* guides fold lines, the roll line, the text outline and baselines, for the debug view
|
|
12
|
+
*
|
|
13
|
+
* Everything is written into buffers allocated once per surface, so a frame allocates nothing.
|
|
14
|
+
* Pure: no DOM, no React. The renderer uploads what this returns.
|
|
15
|
+
*/
|
|
16
|
+
import { DEFAULT_TYPE_SURFACE, TS_FOLD_KEYS, TS_WRAP_KEYS } from './config';
|
|
17
|
+
import { glyphAt, morphGap } from './layout';
|
|
18
|
+
import { bend, bendDistance, crumpleCreases, crumpleField, cylinder, roll, rotate, smoothstep } from './ops';
|
|
19
|
+
const DEG = Math.PI / 180;
|
|
20
|
+
const clamp01 = (v) => (v < 0 ? 0 : v > 1 ? 1 : v);
|
|
21
|
+
const sstep = (v) => { const t = clamp01(v); return t * t * (3 - 2 * t); };
|
|
22
|
+
/** Normals by central differences over a grid, and cavity (how much a vertex sits in a valley). */
|
|
23
|
+
function gridNormals(pos, nrm, ni, nj, cav, cavStride, cavOffset, h) {
|
|
24
|
+
for (let j = 0; j < nj; j++) {
|
|
25
|
+
const jp = j > 0 ? j - 1 : j, jm = j < nj - 1 ? j + 1 : j;
|
|
26
|
+
for (let i = 0; i < ni; i++) {
|
|
27
|
+
const ip = i < ni - 1 ? i + 1 : i, im = i > 0 ? i - 1 : i;
|
|
28
|
+
const a = (j * ni + ip) * 3, b = (j * ni + im) * 3, c = (jp * ni + i) * 3, d = (jm * ni + i) * 3;
|
|
29
|
+
const tx0 = pos[a] - pos[b], tx1 = pos[a + 1] - pos[b + 1], tx2 = pos[a + 2] - pos[b + 2];
|
|
30
|
+
const ty0 = pos[c] - pos[d], ty1 = pos[c + 1] - pos[d + 1], ty2 = pos[c + 2] - pos[d + 2];
|
|
31
|
+
let nx = tx1 * ty2 - tx2 * ty1, ny = tx2 * ty0 - tx0 * ty2, nz = tx0 * ty1 - tx1 * ty0;
|
|
32
|
+
const l = Math.hypot(nx, ny, nz) || 1;
|
|
33
|
+
nx /= l;
|
|
34
|
+
ny /= l;
|
|
35
|
+
nz /= l;
|
|
36
|
+
const k = (j * ni + i) * 3;
|
|
37
|
+
nrm[k] = nx;
|
|
38
|
+
nrm[k + 1] = ny;
|
|
39
|
+
nrm[k + 2] = nz;
|
|
40
|
+
if (cav) {
|
|
41
|
+
let v = 0;
|
|
42
|
+
if (i > 0 && i < ni - 1 && j > 0 && j < nj - 1) {
|
|
43
|
+
const lx = (pos[a] + pos[b] + pos[c] + pos[d]) / 4 - pos[k];
|
|
44
|
+
const ly = (pos[a + 1] + pos[b + 1] + pos[c + 1] + pos[d + 1]) / 4 - pos[k + 1];
|
|
45
|
+
const lz = (pos[a + 2] + pos[b + 2] + pos[c + 2] + pos[d + 2]) / 4 - pos[k + 2];
|
|
46
|
+
v = Math.max(-1, Math.min(1, ((lx * nx + ly * ny + lz * nz) / h) * 2.5));
|
|
47
|
+
}
|
|
48
|
+
cav[(j * ni + i) * cavStride + cavOffset] = v;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** Two triangles per cell; the diagonal alternates by the SHEET's cell parity, so a sub-grid shares it. */
|
|
54
|
+
function gridIndices(ni, nj, i0, j0, out) {
|
|
55
|
+
const idx = out ?? new Uint32Array((ni - 1) * (nj - 1) * 6);
|
|
56
|
+
let o = 0;
|
|
57
|
+
for (let j = 0; j < nj - 1; j++) {
|
|
58
|
+
for (let i = 0; i < ni - 1; i++) {
|
|
59
|
+
const a = j * ni + i, b = a + 1, c = a + ni, d = c + 1;
|
|
60
|
+
if (((i + i0 + j + j0) & 1) === 1) {
|
|
61
|
+
idx[o++] = a;
|
|
62
|
+
idx[o++] = c;
|
|
63
|
+
idx[o++] = b;
|
|
64
|
+
idx[o++] = b;
|
|
65
|
+
idx[o++] = c;
|
|
66
|
+
idx[o++] = d;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
idx[o++] = a;
|
|
70
|
+
idx[o++] = c;
|
|
71
|
+
idx[o++] = d;
|
|
72
|
+
idx[o++] = a;
|
|
73
|
+
idx[o++] = d;
|
|
74
|
+
idx[o++] = b;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return idx;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A wine bottle of glass radius `radius`, revolved about the LABEL's axis (parallel to y at z = −axis),
|
|
82
|
+
* so a wrapped label sits exactly `axis − radius` off the glass all the way round.
|
|
83
|
+
*/
|
|
84
|
+
function bottleMesh(radius, axis) {
|
|
85
|
+
// (r, y) from the centre of the base to the centre of the lip, label-centred coordinates, drawn at
|
|
86
|
+
// a 0.36 body radius and scaled to `radius`.
|
|
87
|
+
const scale = radius / 0.36;
|
|
88
|
+
const key = [
|
|
89
|
+
[0, -0.93], [0.2, -0.95], [0.31, -0.955], [0.345, -0.94], [0.36, -0.9], [0.36, 0.7], [0.352, 0.8], [0.32, 0.9], [0.26, 0.98], [0.19, 1.05],
|
|
90
|
+
[0.145, 1.12], [0.128, 1.2], [0.125, 1.3], [0.126, 1.55], [0.14, 1.565], [0.142, 1.63], [0.12, 1.645], [0, 1.65],
|
|
91
|
+
];
|
|
92
|
+
// Densify so the shoulder is smooth.
|
|
93
|
+
const prof = [];
|
|
94
|
+
for (let k = 0; k < key.length - 1; k++) {
|
|
95
|
+
const [r0, y0] = key[k], [r1, y1] = key[k + 1];
|
|
96
|
+
const steps = Math.max(1, Math.round(Math.hypot(r1 - r0, y1 - y0) / 0.04));
|
|
97
|
+
for (let s = 0; s < steps; s++)
|
|
98
|
+
prof.push([r0 + ((r1 - r0) * s) / steps, y0 + ((y1 - y0) * s) / steps]);
|
|
99
|
+
}
|
|
100
|
+
prof.push(key[key.length - 1]);
|
|
101
|
+
const segs = 96;
|
|
102
|
+
const np = prof.length;
|
|
103
|
+
const count = np * (segs + 1);
|
|
104
|
+
const positions = new Float32Array(count * 3), normals = new Float32Array(count * 3), attrs = new Float32Array(count * 4);
|
|
105
|
+
for (let p = 0; p < np; p++) {
|
|
106
|
+
const r = prof[p][0] * scale, y = prof[p][1];
|
|
107
|
+
const [ra, ya] = prof[Math.max(0, p - 1)], [rb, yb] = prof[Math.min(np - 1, p + 1)];
|
|
108
|
+
let n0 = yb - ya, n1 = -(rb - ra);
|
|
109
|
+
const l = Math.hypot(n0, n1) || 1;
|
|
110
|
+
n0 /= l;
|
|
111
|
+
n1 /= l;
|
|
112
|
+
for (let q = 0; q <= segs; q++) {
|
|
113
|
+
const a = (q / segs) * Math.PI * 2;
|
|
114
|
+
const k = p * (segs + 1) + q;
|
|
115
|
+
positions[k * 3] = r * Math.sin(a);
|
|
116
|
+
positions[k * 3 + 1] = y;
|
|
117
|
+
positions[k * 3 + 2] = -axis + r * Math.cos(a);
|
|
118
|
+
normals[k * 3] = n0 * Math.sin(a);
|
|
119
|
+
normals[k * 3 + 1] = n1;
|
|
120
|
+
normals[k * 3 + 2] = n0 * Math.cos(a);
|
|
121
|
+
attrs[k * 4] = y > 1.2 ? 1 : 0; // 1: foil capsule
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const idx = [];
|
|
125
|
+
for (let p = 0; p < np - 1; p++) {
|
|
126
|
+
for (let q = 0; q < segs; q++) {
|
|
127
|
+
const a = p * (segs + 1) + q, b = a + 1, c = a + segs + 1, d = c + 1;
|
|
128
|
+
idx.push(a, b, c, b, d, c);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return { positions, normals, attrs, indices: new Uint32Array(idx), count };
|
|
132
|
+
}
|
|
133
|
+
/** Build the engine for one surface. Allocates its buffers once. */
|
|
134
|
+
export function createGeometryEngine(def) {
|
|
135
|
+
const [nu, nv] = def.grid;
|
|
136
|
+
const N = nu * nv;
|
|
137
|
+
const W = def.width;
|
|
138
|
+
const Hs = def.height / def.width;
|
|
139
|
+
const h = W / (nu - 1);
|
|
140
|
+
const sx = new Float32Array(N), sy = new Float32Array(N);
|
|
141
|
+
const uvs = new Float32Array(N * 2);
|
|
142
|
+
for (let j = 0; j < nv; j++) {
|
|
143
|
+
for (let i = 0; i < nu; i++) {
|
|
144
|
+
const k = j * nu + i;
|
|
145
|
+
sx[k] = i / (nu - 1) - 0.5;
|
|
146
|
+
sy[k] = (0.5 - j / (nv - 1)) * Hs;
|
|
147
|
+
uvs[k * 2] = i / (nu - 1);
|
|
148
|
+
uvs[k * 2 + 1] = j / (nv - 1);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const indices = gridIndices(nu, nv, 0, 0);
|
|
152
|
+
const pos = new Float32Array(N * 3), nrm = new Float32Array(N * 3), attrs = new Float32Array(N * 4);
|
|
153
|
+
const stack = Array.from({ length: def.stack?.sheets ?? 0 }, () => new Float32Array(N * 3));
|
|
154
|
+
// Crumple fields, cached per (seed, scale): a whole-sheet evaluation is ~20 ms, a frame reuses it.
|
|
155
|
+
const fieldCache = new Map();
|
|
156
|
+
const fieldFor = (seed, scale) => {
|
|
157
|
+
const key = `${seed}:${scale.toFixed(3)}`;
|
|
158
|
+
let f = fieldCache.get(key);
|
|
159
|
+
if (!f) {
|
|
160
|
+
const creases = crumpleCreases(seed, scale, Hs);
|
|
161
|
+
const full = new Float32Array(N * 3), fine = new Float32Array(N);
|
|
162
|
+
const o = [0, 0, 0];
|
|
163
|
+
for (let k = 0; k < N; k++) {
|
|
164
|
+
crumpleField(creases, sx[k], sy[k], o);
|
|
165
|
+
full[k * 3] = o[0];
|
|
166
|
+
full[k * 3 + 1] = o[1];
|
|
167
|
+
full[k * 3 + 2] = o[2];
|
|
168
|
+
crumpleField(creases, sx[k], sy[k], o, true);
|
|
169
|
+
fine[k] = o[2];
|
|
170
|
+
}
|
|
171
|
+
if (fieldCache.size > 6)
|
|
172
|
+
fieldCache.clear();
|
|
173
|
+
f = { creases, full, fine };
|
|
174
|
+
fieldCache.set(key, f);
|
|
175
|
+
}
|
|
176
|
+
return f;
|
|
177
|
+
};
|
|
178
|
+
const text = {
|
|
179
|
+
positions: new Float32Array(N * 3), normals: new Float32Array(N * 3), uvs: new Float32Array(N * 2), tuv: new Float32Array(N * 2),
|
|
180
|
+
attrs: new Float32Array(N * 4), indices: new Uint32Array((nu - 1) * (nv - 1) * 6), vertexCount: 0, indexCount: 0, indexVersion: 0,
|
|
181
|
+
};
|
|
182
|
+
let textRect = '';
|
|
183
|
+
const bottle = def.prop === 'bottle' ? bottleMesh(def.curveRadius - 0.0025, def.curveRadius) : null;
|
|
184
|
+
const prop = bottle
|
|
185
|
+
? { positions: new Float32Array(bottle.count * 3), normals: new Float32Array(bottle.count * 3), attrs: bottle.attrs, indices: bottle.indices, vertexCount: bottle.count }
|
|
186
|
+
: null;
|
|
187
|
+
const loose = def.looseSheet
|
|
188
|
+
? { positions: new Float32Array(12), normals: new Float32Array([0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1]), uvs: new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]), indices: new Uint32Array([0, 2, 1, 1, 2, 3]) }
|
|
189
|
+
: null;
|
|
190
|
+
// ---- the frame's parameters, set by `evaluate`, read by `pipe` ----
|
|
191
|
+
let F = {
|
|
192
|
+
d: DEFAULT_TYPE_SURFACE.deformation, t: 0, motion: 1, skew: 0, crumpleA: 0, shrink: 1, bowl: 0, wrinkleA: 0,
|
|
193
|
+
bends: [], roll: null, kappa: 0, spin: 0,
|
|
194
|
+
rotA: 0, rotB: 0, rotC: 0, shiftX: 0, shiftY: 0,
|
|
195
|
+
creases: [],
|
|
196
|
+
};
|
|
197
|
+
/** One sheet point through the surface's operators (before the object's rigid turns). Returns crease light. */
|
|
198
|
+
const pipe = (x0, y0, fx, fy, fz, gz, p) => {
|
|
199
|
+
const x = x0 * W, y = y0 * W;
|
|
200
|
+
p[0] = x + F.skew * 0.35 * y;
|
|
201
|
+
p[1] = y;
|
|
202
|
+
p[2] = 0;
|
|
203
|
+
def.shape?.(p, x0, y0, F.d, F.t, F.motion);
|
|
204
|
+
if (F.wrinkleA)
|
|
205
|
+
p[2] += gz * W * F.wrinkleA;
|
|
206
|
+
if (F.crumpleA) {
|
|
207
|
+
p[0] += fx * W * F.crumpleA;
|
|
208
|
+
p[1] += fy * W * F.crumpleA;
|
|
209
|
+
p[2] += fz * W * F.crumpleA;
|
|
210
|
+
p[0] *= F.shrink;
|
|
211
|
+
p[1] *= F.shrink;
|
|
212
|
+
if (F.bowl)
|
|
213
|
+
p[2] += F.bowl * W * ((p[0] / W) ** 2 + (p[1] / W) ** 2);
|
|
214
|
+
}
|
|
215
|
+
let crease = 0;
|
|
216
|
+
for (const s of F.bends) {
|
|
217
|
+
const dist = bendDistance(p[0], p[1], s.b);
|
|
218
|
+
crease += s.infl * Math.exp(-((dist / s.zone) ** 2));
|
|
219
|
+
bend(p, s.b);
|
|
220
|
+
}
|
|
221
|
+
if (F.roll)
|
|
222
|
+
roll(p, F.roll);
|
|
223
|
+
if (F.kappa) {
|
|
224
|
+
cylinder(p, F.kappa);
|
|
225
|
+
if (F.spin) {
|
|
226
|
+
const R = def.curveRadius;
|
|
227
|
+
const zz = p[2] + R, c = Math.cos(F.spin), s = Math.sin(F.spin);
|
|
228
|
+
const xx = p[0] * c + zz * s;
|
|
229
|
+
p[2] = -p[0] * s + zz * c - R;
|
|
230
|
+
p[0] = xx;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return crease;
|
|
234
|
+
};
|
|
235
|
+
const place = (p) => {
|
|
236
|
+
rotate(p, F.rotA, F.rotB, F.rotC);
|
|
237
|
+
p[0] += F.shiftX;
|
|
238
|
+
p[1] += F.shiftY;
|
|
239
|
+
};
|
|
240
|
+
const fieldAt = (x0, y0, o, g) => {
|
|
241
|
+
if (F.crumpleA)
|
|
242
|
+
crumpleField(F.creases, x0, y0, o);
|
|
243
|
+
else {
|
|
244
|
+
o[0] = 0;
|
|
245
|
+
o[1] = 0;
|
|
246
|
+
o[2] = 0;
|
|
247
|
+
}
|
|
248
|
+
if (F.wrinkleA)
|
|
249
|
+
crumpleField(F.creases, x0, y0, g, true);
|
|
250
|
+
else
|
|
251
|
+
g[2] = 0;
|
|
252
|
+
};
|
|
253
|
+
const mapSheet = (x0, y0, out) => {
|
|
254
|
+
const o = [0, 0, 0], g = [0, 0, 0];
|
|
255
|
+
fieldAt(x0, y0, o, g);
|
|
256
|
+
pipe(x0, y0, o[0], o[1], o[2], g[2], out);
|
|
257
|
+
place(out);
|
|
258
|
+
return out;
|
|
259
|
+
};
|
|
260
|
+
/** A crease line; `near` flips which side moves. */
|
|
261
|
+
const creaseLine = (position, orientation, side, shrink) => {
|
|
262
|
+
const flip = side === 'near' ? -1 : 1;
|
|
263
|
+
return orientation === 'vertical'
|
|
264
|
+
? { px: (position - 0.5) * W * shrink, py: 0, dx: 0, dy: flip }
|
|
265
|
+
: { px: 0, py: (0.5 - position) * def.height * shrink, dx: flip, dy: 0 };
|
|
266
|
+
};
|
|
267
|
+
const foldBend = (f, shrink) => {
|
|
268
|
+
if (f.amount <= 0.0005)
|
|
269
|
+
return null;
|
|
270
|
+
const theta = f.angle * f.amount * DEG * (f.direction === 'over' ? 1 : -1);
|
|
271
|
+
const width = Math.max(0.002, f.width * W);
|
|
272
|
+
const b = { ...creaseLine(f.position, f.orientation, f.side ?? 'far', shrink), theta, width };
|
|
273
|
+
return { b, infl: f.influence * Math.min(1, f.amount * 2.5), zone: width * 0.8 + 0.004 };
|
|
274
|
+
};
|
|
275
|
+
/** A wrap is a bend whose zone is a rod: its width grows with the angle so the radius stays put. */
|
|
276
|
+
const wrapBend = (w, shrink) => {
|
|
277
|
+
if (w.amount <= 0.0005)
|
|
278
|
+
return null;
|
|
279
|
+
const turn = w.angle * w.amount * DEG;
|
|
280
|
+
const theta = turn * (w.direction === 'over' ? 1 : -1);
|
|
281
|
+
const b = { ...creaseLine(w.position, w.orientation, w.side ?? 'far', shrink), theta, width: Math.max(0.002, turn * w.radius * W) };
|
|
282
|
+
return { b, infl: 0, zone: 1 };
|
|
283
|
+
};
|
|
284
|
+
const scratch = [0, 0, 0];
|
|
285
|
+
const evaluate = (cfg, timeMs, layout, opts) => {
|
|
286
|
+
const d = cfg.deformation;
|
|
287
|
+
const c = d.crumple.amount;
|
|
288
|
+
const field = c > 0 || d.wrinkle > 0 ? fieldFor(cfg.surface.seed, d.crumple.scale) : null;
|
|
289
|
+
const shrink = 1 - 0.06 * c - 0.2 * smoothstep(0.55, 1, c);
|
|
290
|
+
const bends = [...TS_FOLD_KEYS.map((k) => foldBend(d[k], shrink)), ...TS_WRAP_KEYS.map((k) => wrapBend(d[k], shrink))].filter((x) => !!x);
|
|
291
|
+
// A later crease in the same direction wraps the layers the earlier one laid on its inner side.
|
|
292
|
+
for (let i = 1; i < bends.length; i++) {
|
|
293
|
+
for (let k = 0; k < i; k++) {
|
|
294
|
+
const a = bends[k].b, b = bends[i].b;
|
|
295
|
+
if (Math.sign(a.theta) === Math.sign(b.theta))
|
|
296
|
+
b.core = (b.core ?? 0) + (2 * a.width / Math.abs(a.theta)) * Math.min(1, Math.abs(a.theta) / Math.PI);
|
|
297
|
+
else if (Math.abs(a.theta) > Math.PI)
|
|
298
|
+
b.core = (b.core ?? 0) + (a.width / Math.abs(a.theta)) * 2;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
let rl = null;
|
|
302
|
+
if (d.roll.amount > 0.0005) {
|
|
303
|
+
const edge = d.roll.edge;
|
|
304
|
+
const vertical = edge === 'bottom' || edge === 'top';
|
|
305
|
+
const len = (vertical ? def.height : W) * shrink;
|
|
306
|
+
const sgn = edge === 'bottom' || edge === 'left' ? -1 : 1;
|
|
307
|
+
const radius = d.roll.radius * W;
|
|
308
|
+
rl = {
|
|
309
|
+
ox: vertical ? 0 : (sgn * W * shrink) / 2, oy: vertical ? (sgn * def.height * shrink) / 2 : 0,
|
|
310
|
+
ex: vertical ? 0 : -sgn, ey: vertical ? -sgn : 0,
|
|
311
|
+
reach: d.roll.amount * len, radius, inner: radius * 0.45, length: len, sign: d.roll.direction === 'under' ? -1 : 1,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
const kappa = def.curveMode === 'cylinder' && d.curve > 0.0005 ? d.curve / def.curveRadius : 0;
|
|
315
|
+
F = {
|
|
316
|
+
d, t: timeMs, motion: cfg.view.motion, skew: d.skew,
|
|
317
|
+
crumpleA: c > 0 ? c * (0.5 + 0.5 * smoothstep(0.5, 1, c)) : 0, shrink: c > 0 ? shrink : 1, bowl: 0.35 * smoothstep(0.55, 1, c),
|
|
318
|
+
wrinkleA: d.wrinkle > 0 ? d.wrinkle * def.wrinkleDepth * 60 : 0,
|
|
319
|
+
bends, roll: rl, kappa,
|
|
320
|
+
spin: def.prop === 'bottle' ? d.curve * cfg.view.motion * 0.5 * Math.sin((2 * Math.PI * timeMs) / 10000) : 0,
|
|
321
|
+
rotA: d.tiltX * 0.6, rotB: -d.tiltY * 0.6, rotC: cfg.view.roll * DEG, shiftX: 0, shiftY: 0,
|
|
322
|
+
creases: field?.creases ?? [],
|
|
323
|
+
};
|
|
324
|
+
// ---- the sheet ----
|
|
325
|
+
let zTop = -Infinity;
|
|
326
|
+
const min = [Infinity, Infinity, Infinity], max = [-Infinity, -Infinity, -Infinity];
|
|
327
|
+
for (let k = 0; k < N; k++) {
|
|
328
|
+
const x0 = sx[k], y0 = sy[k];
|
|
329
|
+
const crease = pipe(x0, y0, field ? field.full[k * 3] : 0, field ? field.full[k * 3 + 1] : 0, field ? field.full[k * 3 + 2] : 0, field ? field.fine[k] : 0, scratch);
|
|
330
|
+
if (scratch[2] > zTop)
|
|
331
|
+
zTop = scratch[2];
|
|
332
|
+
const fxw = x0 * W + F.skew * 0.35 * y0 * W;
|
|
333
|
+
attrs[k * 4] = Math.min(1, crease);
|
|
334
|
+
attrs[k * 4 + 2] = Math.hypot(scratch[0] - fxw, scratch[1] - y0 * W, scratch[2]) / W;
|
|
335
|
+
rotate(scratch, F.rotA, F.rotB, F.rotC);
|
|
336
|
+
pos[k * 3] = scratch[0];
|
|
337
|
+
pos[k * 3 + 1] = scratch[1];
|
|
338
|
+
pos[k * 3 + 2] = scratch[2];
|
|
339
|
+
for (let a = 0; a < 3; a++) {
|
|
340
|
+
const v = scratch[a];
|
|
341
|
+
if (v < min[a])
|
|
342
|
+
min[a] = v;
|
|
343
|
+
if (v > max[a])
|
|
344
|
+
max[a] = v;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (prop && bottle) {
|
|
348
|
+
for (let k = 0; k < bottle.count; k++) {
|
|
349
|
+
scratch[0] = bottle.positions[k * 3];
|
|
350
|
+
scratch[1] = bottle.positions[k * 3 + 1];
|
|
351
|
+
scratch[2] = bottle.positions[k * 3 + 2];
|
|
352
|
+
rotate(scratch, F.rotA, F.rotB, F.rotC);
|
|
353
|
+
prop.positions.set(scratch, k * 3);
|
|
354
|
+
for (let a = 0; a < 3; a++) {
|
|
355
|
+
const v = scratch[a];
|
|
356
|
+
if (v < min[a])
|
|
357
|
+
min[a] = v;
|
|
358
|
+
if (v > max[a])
|
|
359
|
+
max[a] = v;
|
|
360
|
+
}
|
|
361
|
+
scratch[0] = bottle.normals[k * 3];
|
|
362
|
+
scratch[1] = bottle.normals[k * 3 + 1];
|
|
363
|
+
scratch[2] = bottle.normals[k * 3 + 2];
|
|
364
|
+
rotate(scratch, F.rotA, F.rotB, F.rotC);
|
|
365
|
+
prop.normals.set(scratch, k * 3);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (cfg.view.autoCenter) {
|
|
369
|
+
F.shiftX = -(min[0] + max[0]) / 2;
|
|
370
|
+
F.shiftY = -(min[1] + max[1]) / 2;
|
|
371
|
+
for (let k = 0; k < N; k++) {
|
|
372
|
+
pos[k * 3] = pos[k * 3] + F.shiftX;
|
|
373
|
+
pos[k * 3 + 1] = pos[k * 3 + 1] + F.shiftY;
|
|
374
|
+
}
|
|
375
|
+
if (prop)
|
|
376
|
+
for (let k = 0; k < prop.vertexCount; k++) {
|
|
377
|
+
prop.positions[k * 3] = prop.positions[k * 3] + F.shiftX;
|
|
378
|
+
prop.positions[k * 3 + 1] = prop.positions[k * 3 + 1] + F.shiftY;
|
|
379
|
+
}
|
|
380
|
+
min[0] += F.shiftX;
|
|
381
|
+
max[0] += F.shiftX;
|
|
382
|
+
min[1] += F.shiftY;
|
|
383
|
+
max[1] += F.shiftY;
|
|
384
|
+
}
|
|
385
|
+
gridNormals(pos, nrm, nu, nv, attrs, 4, 1, h);
|
|
386
|
+
// ---- the pages under it: offset along the normal, edges not quite aligned ----
|
|
387
|
+
const st = def.stack;
|
|
388
|
+
stack.forEach((out, si) => {
|
|
389
|
+
const gap = (st?.gap ?? 0.003) * (si + 1);
|
|
390
|
+
const ext = si === 0 ? [0.004, 0.007, 0.003, 0.009] : [0.009, 0.003, 0.006, 0.004]; // left, right, top, bottom
|
|
391
|
+
for (let j = 0; j < nv; j++) {
|
|
392
|
+
for (let i = 0; i < nu; i++) {
|
|
393
|
+
const k = j * nu + i;
|
|
394
|
+
let x = pos[k * 3] - nrm[k * 3] * gap, y = pos[k * 3 + 1] - nrm[k * 3 + 1] * gap, z = pos[k * 3 + 2] - nrm[k * 3 + 2] * gap;
|
|
395
|
+
const push = (to, e) => {
|
|
396
|
+
const tx = pos[k * 3] - pos[to * 3], ty = pos[k * 3 + 1] - pos[to * 3 + 1], tz = pos[k * 3 + 2] - pos[to * 3 + 2];
|
|
397
|
+
const l = Math.hypot(tx, ty, tz) || 1;
|
|
398
|
+
x += (tx / l) * e * W;
|
|
399
|
+
y += (ty / l) * e * W;
|
|
400
|
+
z += (tz / l) * e * W;
|
|
401
|
+
};
|
|
402
|
+
if (i === 0)
|
|
403
|
+
push(k + 1, ext[0]);
|
|
404
|
+
if (i === nu - 1)
|
|
405
|
+
push(k - 1, ext[1]);
|
|
406
|
+
if (j === 0)
|
|
407
|
+
push(k + nu, ext[2]);
|
|
408
|
+
if (j === nv - 1)
|
|
409
|
+
push(k - nu, ext[3]);
|
|
410
|
+
out[k * 3] = x;
|
|
411
|
+
out[k * 3 + 1] = y;
|
|
412
|
+
out[k * 3 + 2] = z;
|
|
413
|
+
if (z < min[2])
|
|
414
|
+
min[2] = z;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
const tableZ = min[2] - 0.004 * W;
|
|
419
|
+
if (loose) {
|
|
420
|
+
const a = -7 * DEG, cx = 0.2 * W + (cfg.view.autoCenter ? F.shiftX : 0), cy = -0.12 * W + (cfg.view.autoCenter ? F.shiftY : 0);
|
|
421
|
+
const hw = W / 2, hh = def.height / 2;
|
|
422
|
+
const corners = [[-hw, hh], [hw, hh], [-hw, -hh], [hw, -hh]];
|
|
423
|
+
corners.forEach(([x, y], k) => {
|
|
424
|
+
loose.positions[k * 3] = cx + x * Math.cos(a) - y * Math.sin(a);
|
|
425
|
+
loose.positions[k * 3 + 1] = cy + x * Math.sin(a) + y * Math.cos(a);
|
|
426
|
+
loose.positions[k * 3 + 2] = tableZ + 0.0008;
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
// ---- the text: the sheet's own cells under the block ----
|
|
430
|
+
let textOut = null;
|
|
431
|
+
if (layout) {
|
|
432
|
+
const pl = cfg.placement;
|
|
433
|
+
const fs = layout.fontSize;
|
|
434
|
+
const gap = morphGap(d.morph, layout);
|
|
435
|
+
const most = Math.max(1, ...layout.lines.map((l) => l.glyphs.length));
|
|
436
|
+
const spread = (gap * (most - 1)) / 2 + fs * 0.1;
|
|
437
|
+
const rot = pl.rotation * DEG;
|
|
438
|
+
const ax = [Math.cos(rot), -Math.sin(rot)], ay = [-Math.sin(rot), -Math.cos(rot)]; // block x, block y (down) on the sheet
|
|
439
|
+
const cx = pl.x - 0.5, cy = (0.5 - pl.y) * Hs;
|
|
440
|
+
const bw = layout.width, bh = layout.height;
|
|
441
|
+
let iMin = nu, iMax = 0, jMin = nv, jMax = 0;
|
|
442
|
+
for (const [bx, by] of [[-spread, 0], [bw + spread, 0], [-spread, bh], [bw + spread, bh]]) {
|
|
443
|
+
const ux = cx + (ax[0] * (bx - bw / 2) + ay[0] * (by - bh / 2)) / 1000;
|
|
444
|
+
const uy = cy + (ax[1] * (bx - bw / 2) + ay[1] * (by - bh / 2)) / 1000;
|
|
445
|
+
const fi = (ux + 0.5) * (nu - 1), fj = (0.5 - uy / Hs) * (nv - 1);
|
|
446
|
+
iMin = Math.min(iMin, Math.floor(fi) - 1);
|
|
447
|
+
iMax = Math.max(iMax, Math.ceil(fi) + 1);
|
|
448
|
+
jMin = Math.min(jMin, Math.floor(fj) - 1);
|
|
449
|
+
jMax = Math.max(jMax, Math.ceil(fj) + 1);
|
|
450
|
+
}
|
|
451
|
+
iMin = Math.max(0, iMin);
|
|
452
|
+
jMin = Math.max(0, jMin);
|
|
453
|
+
iMax = Math.min(nu - 1, iMax);
|
|
454
|
+
jMax = Math.min(nv - 1, jMax);
|
|
455
|
+
if (iMax > iMin && jMax > jMin) {
|
|
456
|
+
const ni = iMax - iMin + 1, nj = jMax - jMin + 1;
|
|
457
|
+
const rect = `${iMin},${jMin},${ni},${nj}`;
|
|
458
|
+
if (rect !== textRect) {
|
|
459
|
+
textRect = rect;
|
|
460
|
+
gridIndices(ni, nj, iMin, jMin, text.indices);
|
|
461
|
+
text.indexCount = (ni - 1) * (nj - 1) * 6;
|
|
462
|
+
text.indexVersion++;
|
|
463
|
+
}
|
|
464
|
+
text.vertexCount = ni * nj;
|
|
465
|
+
const liftH = cfg.material.lift * W;
|
|
466
|
+
const eps = 0.0009 * W;
|
|
467
|
+
const S = 1.6;
|
|
468
|
+
const denom = Math.max(1, layout.glyphCount - 1);
|
|
469
|
+
const rp = text.positions, rn = text.normals;
|
|
470
|
+
for (let j = 0; j < nj; j++) {
|
|
471
|
+
for (let i = 0; i < ni; i++) {
|
|
472
|
+
const t = j * ni + i;
|
|
473
|
+
const k = (j + jMin) * nu + (i + iMin);
|
|
474
|
+
const rx = sx[k] - cx, ry = sy[k] - cy;
|
|
475
|
+
const bx = (rx * ax[0] + ry * ax[1]) * 1000 + bw / 2;
|
|
476
|
+
const by = (rx * ay[0] + ry * ay[1]) * 1000 + bh / 2;
|
|
477
|
+
const tu = bx / bw, tv = by / bh;
|
|
478
|
+
text.tuv[t * 2] = tu;
|
|
479
|
+
text.tuv[t * 2 + 1] = tv;
|
|
480
|
+
text.uvs[t * 2] = uvs[k * 2];
|
|
481
|
+
text.uvs[t * 2 + 1] = uvs[k * 2 + 1];
|
|
482
|
+
const wrapW = sstep(d.wrap * 1.3 - clamp01(tu) * 0.3);
|
|
483
|
+
let mg = 0;
|
|
484
|
+
if (d.morph > 0) {
|
|
485
|
+
const g = glyphAt(layout, bx, by, gap);
|
|
486
|
+
const o = g ? Math.min(1, g.glyph.order / denom) : 0;
|
|
487
|
+
mg = sstep(d.morph * (1 + S) - o * S);
|
|
488
|
+
}
|
|
489
|
+
const w = 1 - (1 - wrapW) * (1 - mg);
|
|
490
|
+
const flight = 4 * mg * (1 - mg) * (1 - wrapW);
|
|
491
|
+
// Floating position: the flat sheet, lifted above everything, then the same rigid turns.
|
|
492
|
+
scratch[0] = sx[k] * W + F.skew * 0.35 * sy[k] * W;
|
|
493
|
+
scratch[1] = sy[k] * W;
|
|
494
|
+
scratch[2] = zTop + liftH * (1 + flight * 0.6);
|
|
495
|
+
place(scratch);
|
|
496
|
+
const sxp = pos[k * 3] + nrm[k * 3] * eps, syp = pos[k * 3 + 1] + nrm[k * 3 + 1] * eps, szp = pos[k * 3 + 2] + nrm[k * 3 + 2] * eps;
|
|
497
|
+
rp[t * 3] = scratch[0] + (sxp - scratch[0]) * w;
|
|
498
|
+
rp[t * 3 + 1] = scratch[1] + (syp - scratch[1]) * w;
|
|
499
|
+
rp[t * 3 + 2] = scratch[2] + (szp - scratch[2]) * w;
|
|
500
|
+
text.attrs[t * 4] = w;
|
|
501
|
+
text.attrs[t * 4 + 1] = attrs[k * 4];
|
|
502
|
+
text.attrs[t * 4 + 2] = attrs[k * 4 + 1];
|
|
503
|
+
text.attrs[t * 4 + 3] = flight;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
gridNormals(rp, rn, ni, nj, null, 0, 0, h);
|
|
507
|
+
textOut = text;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
// ---- debug guides ----
|
|
511
|
+
let guides = null;
|
|
512
|
+
if (opts?.guides) {
|
|
513
|
+
const line = (from, to, steps = 80) => {
|
|
514
|
+
const out = new Float32Array((steps + 1) * 3);
|
|
515
|
+
const p = [0, 0, 0];
|
|
516
|
+
for (let s = 0; s <= steps; s++) {
|
|
517
|
+
const f = s / steps;
|
|
518
|
+
mapSheet(from[0] + (to[0] - from[0]) * f, from[1] + (to[1] - from[1]) * f, p);
|
|
519
|
+
out.set(p, s * 3);
|
|
520
|
+
}
|
|
521
|
+
return out;
|
|
522
|
+
};
|
|
523
|
+
const half = Hs / 2;
|
|
524
|
+
const folds = [], zones = [];
|
|
525
|
+
const anchors = [];
|
|
526
|
+
for (const f of [...TS_FOLD_KEYS.map((k) => d[k]), ...TS_WRAP_KEYS.map((k) => ({ ...d[k], width: d[k].angle * DEG * d[k].amount * d[k].radius }))]) {
|
|
527
|
+
if (f.amount <= 0.0005)
|
|
528
|
+
continue;
|
|
529
|
+
const wz = f.width * ((f.side ?? 'far') === 'near' ? -1 : 1);
|
|
530
|
+
if (f.orientation === 'vertical') {
|
|
531
|
+
const x = f.position - 0.5;
|
|
532
|
+
folds.push(line([x, -half], [x, half]));
|
|
533
|
+
zones.push(line([x + wz, -half], [x + wz, half]));
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
const y = (0.5 - f.position) * Hs;
|
|
537
|
+
folds.push(line([-0.5, y], [0.5, y]));
|
|
538
|
+
zones.push(line([-0.5, y - wz], [0.5, y - wz]));
|
|
539
|
+
}
|
|
540
|
+
const fl = folds[folds.length - 1];
|
|
541
|
+
anchors.push(fl[0], fl[1], fl[2], fl[fl.length - 3], fl[fl.length - 2], fl[fl.length - 1]);
|
|
542
|
+
}
|
|
543
|
+
let rollLine = null;
|
|
544
|
+
if (d.roll.amount > 0.0005) {
|
|
545
|
+
const e = d.roll.edge, a = d.roll.amount;
|
|
546
|
+
rollLine = e === 'bottom' ? line([-0.5, -half + a * Hs], [0.5, -half + a * Hs]) : e === 'top' ? line([-0.5, half - a * Hs], [0.5, half - a * Hs])
|
|
547
|
+
: e === 'left' ? line([-0.5 + a, -half], [-0.5 + a, half]) : line([0.5 - a, -half], [0.5 - a, half]);
|
|
548
|
+
}
|
|
549
|
+
let outline = null;
|
|
550
|
+
const baselines = [];
|
|
551
|
+
if (layout) {
|
|
552
|
+
const pl = cfg.placement, rot = pl.rotation * DEG;
|
|
553
|
+
const ax = [Math.cos(rot), -Math.sin(rot)], ay = [-Math.sin(rot), -Math.cos(rot)];
|
|
554
|
+
const cx = pl.x - 0.5, cy = (0.5 - pl.y) * Hs;
|
|
555
|
+
const toSheet = (bx, by) => [
|
|
556
|
+
cx + (ax[0] * (bx - layout.width / 2) + ay[0] * (by - layout.height / 2)) / 1000,
|
|
557
|
+
cy + (ax[1] * (bx - layout.width / 2) + ay[1] * (by - layout.height / 2)) / 1000,
|
|
558
|
+
];
|
|
559
|
+
const p = layout.pad;
|
|
560
|
+
const c0 = toSheet(p, p), c1 = toSheet(layout.width - p, p), c2 = toSheet(layout.width - p, layout.height - p), c3 = toSheet(p, layout.height - p);
|
|
561
|
+
const parts = [line(c0, c1, 40), line(c1, c2, 20), line(c2, c3, 40), line(c3, c0, 20)];
|
|
562
|
+
outline = new Float32Array(parts.reduce((n, a) => n + a.length, 0));
|
|
563
|
+
let o = 0;
|
|
564
|
+
for (const a of parts) {
|
|
565
|
+
outline.set(a, o);
|
|
566
|
+
o += a.length;
|
|
567
|
+
}
|
|
568
|
+
for (const l of layout.lines)
|
|
569
|
+
baselines.push(line(toSheet(l.left, l.baseline), toSheet(l.left + l.width, l.baseline), 40));
|
|
570
|
+
const mid = mapSheet(cx, cy, [0, 0, 0]);
|
|
571
|
+
anchors.push(...mid, ...outline.subarray(0, 3));
|
|
572
|
+
}
|
|
573
|
+
guides = { folds, foldZones: zones, roll: rollLine, textOutline: outline, baselines, anchors: new Float32Array(anchors) };
|
|
574
|
+
}
|
|
575
|
+
const radius = def.prop === 'bottle' ? 1.45 : 0.5 * Math.hypot(W, def.height) * 1.04;
|
|
576
|
+
return {
|
|
577
|
+
def, nu, nv, uvs, indices,
|
|
578
|
+
sheet: { positions: pos, normals: nrm, attrs },
|
|
579
|
+
stack, loose, text: textOut, prop,
|
|
580
|
+
bounds: { min, max }, tableZ,
|
|
581
|
+
target: [0, 0, (min[2] + max[2]) / 2],
|
|
582
|
+
radius, guides,
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
return {
|
|
586
|
+
def,
|
|
587
|
+
evaluate,
|
|
588
|
+
mapUv: (u, v, out = [0, 0, 0]) => mapSheet(u - 0.5, (0.5 - v) * Hs, out),
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
/** Which sheet vertex a text vertex sits on (exposed for tests: conformed text is the sheet). */
|
|
592
|
+
export function textVertexOnSheet(geometry, textVertex) {
|
|
593
|
+
const t = geometry.text;
|
|
594
|
+
if (!t)
|
|
595
|
+
return -1;
|
|
596
|
+
// The text mesh is a sub-grid; recover its origin from its first uv.
|
|
597
|
+
const i0 = Math.round(t.uvs[0] * (geometry.nu - 1)), j0 = Math.round(t.uvs[1] * (geometry.nv - 1));
|
|
598
|
+
const iEnd = Math.round(t.uvs[(t.vertexCount - 1) * 2] * (geometry.nu - 1));
|
|
599
|
+
const ni = iEnd - i0 + 1;
|
|
600
|
+
const i = textVertex % ni, j = Math.floor(textVertex / ni);
|
|
601
|
+
return (j + j0) * geometry.nu + (i + i0);
|
|
602
|
+
}
|
|
603
|
+
//# sourceMappingURL=engine.js.map
|