popost 4.6.0 → 4.6.6
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/LICENSE +59 -3
- package/README.md +25 -10
- package/SKILL.md +48 -131
- package/THIRD_PARTY_NOTICES +524 -0
- package/agents/openai.yaml +2 -2
- package/assets/canvas/assets/{dist-Ag5yM9-G.js → dist-BmD8AP0A.js} +1 -1
- package/assets/canvas/assets/{es-DzkTYs_E.js → es-CC29Cabv.js} +1 -1
- package/assets/canvas/assets/{index-DjfLTPyx.js → index-DhwyFpu2.js} +6 -6
- package/assets/canvas/assets/{jszip.min-Cw2BF2G0.js → jszip.min-Bwf_yCrF.js} +1 -1
- package/assets/canvas/build-info.json +5 -5
- package/assets/canvas/index.html +1 -1
- package/assets/video/examples/audio-bars.html +125 -0
- package/assets/video/examples/bouncing-ball.html +182 -0
- package/assets/video/examples/card-flip.html +92 -0
- package/assets/video/examples/catalogue.json +16221 -0
- package/assets/video/examples/counter-stat.html +155 -0
- package/assets/video/examples/folding-doors.html +94 -0
- package/assets/video/examples/glitch-title.html +120 -0
- package/assets/video/examples/goo-blobs.html +127 -0
- package/assets/video/examples/grid-reveal.html +151 -0
- package/assets/video/examples/hf/agent-cursor.html +781 -0
- package/assets/video/examples/hf/ai-answer-rank.html +767 -0
- package/assets/video/examples/hf/ai-chat-reveal.html +1260 -0
- package/assets/video/examples/hf/animated-bar-chart.html +312 -0
- package/assets/video/examples/hf/app-showcase.html +1115 -0
- package/assets/video/examples/hf/apple-money-count.html +453 -0
- package/assets/video/examples/hf/arc-motion-path.html +303 -0
- package/assets/video/examples/hf/ascii-render-pass.html +728 -0
- package/assets/video/examples/hf/ascii-trail-reveal.html +595 -0
- package/assets/video/examples/hf/aurora-drift.html +439 -0
- package/assets/video/examples/hf/aurora.html +258 -0
- package/assets/video/examples/hf/avatar-cloud.html +667 -0
- package/assets/video/examples/hf/avatar-group-hover.html +342 -0
- package/assets/video/examples/hf/badge-pop.html +400 -0
- package/assets/video/examples/hf/bar-chart-race.html +795 -0
- package/assets/video/examples/hf/beat-accent.html +507 -0
- package/assets/video/examples/hf/beat-freeze-cut.html +1050 -0
- package/assets/video/examples/hf/beat-pulse-background.html +422 -0
- package/assets/video/examples/hf/beat-timeline.html +488 -0
- package/assets/video/examples/hf/before-after-wipe.html +681 -0
- package/assets/video/examples/hf/blob.html +258 -0
- package/assets/video/examples/hf/blue-sweater-intro-video.html +1656 -0
- package/assets/video/examples/hf/blur-in.html +624 -0
- package/assets/video/examples/hf/blur-out-up.html +350 -0
- package/assets/video/examples/hf/bottom-up-letters.html +335 -0
- package/assets/video/examples/hf/browser-device-stage.html +847 -0
- package/assets/video/examples/hf/camcorder-hud.html +371 -0
- package/assets/video/examples/hf/camera-dolly-zoom.html +485 -0
- package/assets/video/examples/hf/camera-rig-depth-stack.html +246 -0
- package/assets/video/examples/hf/camera-scan-gate.html +708 -0
- package/assets/video/examples/hf/camera-shake.html +989 -0
- package/assets/video/examples/hf/canopy-part-title.html +2549 -0
- package/assets/video/examples/hf/caption-blend-difference.html +247 -0
- package/assets/video/examples/hf/caption-camera-follow.html +537 -0
- package/assets/video/examples/hf/caption-clip-wipe.html +363 -0
- package/assets/video/examples/hf/caption-editorial-emphasis.html +615 -0
- package/assets/video/examples/hf/caption-emoji-pop.html +623 -0
- package/assets/video/examples/hf/caption-glitch-rgb.html +475 -0
- package/assets/video/examples/hf/caption-gradient-fill.html +392 -0
- package/assets/video/examples/hf/caption-highlight.html +433 -0
- package/assets/video/examples/hf/caption-kinetic-slam.html +334 -0
- package/assets/video/examples/hf/caption-matrix-decode.html +399 -0
- package/assets/video/examples/hf/caption-neon-accent.html +684 -0
- package/assets/video/examples/hf/caption-neon-glow.html +373 -0
- package/assets/video/examples/hf/caption-parallax-layers.html +530 -0
- package/assets/video/examples/hf/caption-particle-burst.html +454 -0
- package/assets/video/examples/hf/caption-pill-karaoke.html +517 -0
- package/assets/video/examples/hf/caption-texture.html +368 -0
- package/assets/video/examples/hf/caption-weight-shift.html +566 -0
- package/assets/video/examples/hf/card-resize.html +435 -0
- package/assets/video/examples/hf/caret-swap.html +601 -0
- package/assets/video/examples/hf/carousel-circle-1.html +1175 -0
- package/assets/video/examples/hf/carousel-circle-2.html +1175 -0
- package/assets/video/examples/hf/carousel-circle-3.html +1175 -0
- package/assets/video/examples/hf/carousel-circle-4.html +1175 -0
- package/assets/video/examples/hf/carousel-circle-5.html +1175 -0
- package/assets/video/examples/hf/carousel-orbit-1.html +1198 -0
- package/assets/video/examples/hf/carousel-orbit-2.html +1198 -0
- package/assets/video/examples/hf/carousel-orbit-3.html +1198 -0
- package/assets/video/examples/hf/carousel-orbit-4.html +1214 -0
- package/assets/video/examples/hf/carousel-orbit-5.html +1198 -0
- package/assets/video/examples/hf/carousel-path-1.html +1219 -0
- package/assets/video/examples/hf/carousel-path-2.html +1176 -0
- package/assets/video/examples/hf/carousel-path-3.html +1190 -0
- package/assets/video/examples/hf/carousel-path-4.html +1219 -0
- package/assets/video/examples/hf/carousel-path-5.html +1218 -0
- package/assets/video/examples/hf/carousel-vision-1.html +1180 -0
- package/assets/video/examples/hf/carousel-vision-2.html +1180 -0
- package/assets/video/examples/hf/carousel-vision-3.html +1180 -0
- package/assets/video/examples/hf/carousel-vision-4.html +1187 -0
- package/assets/video/examples/hf/carousel-vision-5.html +1180 -0
- package/assets/video/examples/hf/char-slam-explode.html +546 -0
- package/assets/video/examples/hf/chart-story.html +973 -0
- package/assets/video/examples/hf/chat-message.html +635 -0
- package/assets/video/examples/hf/chat-thread.html +953 -0
- package/assets/video/examples/hf/chatgpt-exchange.html +1620 -0
- package/assets/video/examples/hf/chromatic-radial-split.html +613 -0
- package/assets/video/examples/hf/chrome-orb.html +258 -0
- package/assets/video/examples/hf/cinemagraph.html +422 -0
- package/assets/video/examples/hf/cinematic-zoom.html +613 -0
- package/assets/video/examples/hf/claude-exchange.html +1845 -0
- package/assets/video/examples/hf/code-3d-extrude.html +755 -0
- package/assets/video/examples/hf/code-diff.html +956 -0
- package/assets/video/examples/hf/code-highlight.html +885 -0
- package/assets/video/examples/hf/code-morph.html +1357 -0
- package/assets/video/examples/hf/code-particle-assemble.html +622 -0
- package/assets/video/examples/hf/code-scroll.html +1700 -0
- package/assets/video/examples/hf/code-shader-dissolve.html +677 -0
- package/assets/video/examples/hf/code-slice-hero.html +1276 -0
- package/assets/video/examples/hf/code-snippet-apple-terminal-pro.html +388 -0
- package/assets/video/examples/hf/code-snippet-dark-2026.html +1231 -0
- package/assets/video/examples/hf/code-snippet-dark-modern.html +1227 -0
- package/assets/video/examples/hf/code-terminal-run.html +766 -0
- package/assets/video/examples/hf/code-typing.html +903 -0
- package/assets/video/examples/hf/color-wheel.html +258 -0
- package/assets/video/examples/hf/colorama-wipe.html +503 -0
- package/assets/video/examples/hf/comparison-split.html +657 -0
- package/assets/video/examples/hf/confetti.html +349 -0
- package/assets/video/examples/hf/conic-progress-ring.html +441 -0
- package/assets/video/examples/hf/constellation-hub.html +662 -0
- package/assets/video/examples/hf/cosmic-orb.html +643 -0
- package/assets/video/examples/hf/count-up.html +552 -0
- package/assets/video/examples/hf/cross-warp-morph.html +624 -0
- package/assets/video/examples/hf/cta-close.html +492 -0
- package/assets/video/examples/hf/cta-lockup.html +470 -0
- package/assets/video/examples/hf/cuboid-carousel.html +2385 -0
- package/assets/video/examples/hf/cursor-annotate.html +827 -0
- package/assets/video/examples/hf/cursor-context-menu.html +757 -0
- package/assets/video/examples/hf/cursor-drag-drop.html +656 -0
- package/assets/video/examples/hf/cursor-glyph-trail.html +904 -0
- package/assets/video/examples/hf/cursor-marquee-select.html +1266 -0
- package/assets/video/examples/hf/cursor-text-select.html +638 -0
- package/assets/video/examples/hf/cursor-zoom-follow.html +973 -0
- package/assets/video/examples/hf/curtain-reveal.html +590 -0
- package/assets/video/examples/hf/cut-the-curve.html +715 -0
- package/assets/video/examples/hf/dart-cursor.html +863 -0
- package/assets/video/examples/hf/data-chart.html +666 -0
- package/assets/video/examples/hf/decision-tree.html +655 -0
- package/assets/video/examples/hf/decline-chart.html +485 -0
- package/assets/video/examples/hf/device-frame-stage.html +661 -0
- package/assets/video/examples/hf/domain-warp-dissolve.html +627 -0
- package/assets/video/examples/hf/drift-hold.html +392 -0
- package/assets/video/examples/hf/dynamic-grid.html +336 -0
- package/assets/video/examples/hf/echo-smear.html +994 -0
- package/assets/video/examples/hf/echo-trail.html +557 -0
- package/assets/video/examples/hf/editorial-flash-overlay.html +337 -0
- package/assets/video/examples/hf/exploded-stack.html +761 -0
- package/assets/video/examples/hf/extended-keyframe.html +715 -0
- package/assets/video/examples/hf/extruded-logo.html +757 -0
- package/assets/video/examples/hf/facet-morph.html +746 -0
- package/assets/video/examples/hf/fade-through.html +443 -0
- package/assets/video/examples/hf/falling-lines.html +259 -0
- package/assets/video/examples/hf/filmed-screen.html +1065 -0
- package/assets/video/examples/hf/flash-through-white.html +613 -0
- package/assets/video/examples/hf/flowchart-vertical.html +631 -0
- package/assets/video/examples/hf/flowchart.html +630 -0
- package/assets/video/examples/hf/flowing-gradient.html +258 -0
- package/assets/video/examples/hf/focus-blur-resolve.html +321 -0
- package/assets/video/examples/hf/focus-rack.html +542 -0
- package/assets/video/examples/hf/focus-swap.html +496 -0
- package/assets/video/examples/hf/fractal-noise.html +258 -0
- package/assets/video/examples/hf/freeze-frame-dressing.html +357 -0
- package/assets/video/examples/hf/frost.html +258 -0
- package/assets/video/examples/hf/gabor-noise.html +258 -0
- package/assets/video/examples/hf/gallery-tunnel.html +652 -0
- package/assets/video/examples/hf/gesture-tap.html +604 -0
- package/assets/video/examples/hf/glass-hero.html +505 -0
- package/assets/video/examples/hf/glass-shard-title.html +1618 -0
- package/assets/video/examples/hf/glitch.html +613 -0
- package/assets/video/examples/hf/gloss-sweep.html +418 -0
- package/assets/video/examples/hf/godrays.html +257 -0
- package/assets/video/examples/hf/goo.html +258 -0
- package/assets/video/examples/hf/gooey-split.html +1092 -0
- package/assets/video/examples/hf/grain-field.html +377 -0
- package/assets/video/examples/hf/grain-overlay.html +295 -0
- package/assets/video/examples/hf/gravitational-lens.html +612 -0
- package/assets/video/examples/hf/grid-card-assemble.html +671 -0
- package/assets/video/examples/hf/grid-pixelate-wipe.html +314 -0
- package/assets/video/examples/hf/halftone-dissolve.html +696 -0
- package/assets/video/examples/hf/halftone-field.html +598 -0
- package/assets/video/examples/hf/headline-slam.html +455 -0
- package/assets/video/examples/hf/heatmap.html +258 -0
- package/assets/video/examples/hf/heygen-avatar-promo-card.html +627 -0
- package/assets/video/examples/hf/hologram.html +258 -0
- package/assets/video/examples/hf/holographic.html +258 -0
- package/assets/video/examples/hf/hw-arrow.html +835 -0
- package/assets/video/examples/hf/hw-boil.html +632 -0
- package/assets/video/examples/hf/hw-box-label.html +741 -0
- package/assets/video/examples/hf/hw-callout-circle.html +820 -0
- package/assets/video/examples/hf/hw-frame.html +455 -0
- package/assets/video/examples/hf/hw-path-text.html +349 -0
- package/assets/video/examples/hf/hw-pipeline.html +472 -0
- package/assets/video/examples/hf/hw-scribble-transition.html +291 -0
- package/assets/video/examples/hf/hw-text-cloud.html +439 -0
- package/assets/video/examples/hf/hw-title.html +412 -0
- package/assets/video/examples/hf/hw-underline.html +403 -0
- package/assets/video/examples/hf/hw-write-title.html +1389 -0
- package/assets/video/examples/hf/icon-morph-beat.html +463 -0
- package/assets/video/examples/hf/icon-swap.html +380 -0
- package/assets/video/examples/hf/ink-bleed-reveal.html +659 -0
- package/assets/video/examples/hf/inline-highlight.html +322 -0
- package/assets/video/examples/hf/input-feedback.html +419 -0
- package/assets/video/examples/hf/instagram-follow.html +460 -0
- package/assets/video/examples/hf/ios26-liquid-glass.html +1597 -0
- package/assets/video/examples/hf/iris-reveal.html +684 -0
- package/assets/video/examples/hf/keyframe-scrub-stack.html +326 -0
- package/assets/video/examples/hf/kinetic-center-build.html +538 -0
- package/assets/video/examples/hf/kinetic-type-swap.html +610 -0
- package/assets/video/examples/hf/kinetic-type.html +862 -0
- package/assets/video/examples/hf/lens-flare.html +258 -0
- package/assets/video/examples/hf/light-edge.html +259 -0
- package/assets/video/examples/hf/light-leak.html +612 -0
- package/assets/video/examples/hf/light-sweep-pass.html +684 -0
- package/assets/video/examples/hf/line-by-line-slide.html +345 -0
- package/assets/video/examples/hf/line-swap.html +526 -0
- package/assets/video/examples/hf/liquid-glass-notification.html +1898 -0
- package/assets/video/examples/hf/liquid-glass-widgets.html +2175 -0
- package/assets/video/examples/hf/liquid-metal.html +259 -0
- package/assets/video/examples/hf/locked-nucleus-orbit.html +564 -0
- package/assets/video/examples/hf/logo-brand-close.html +598 -0
- package/assets/video/examples/hf/logo-outro.html +397 -0
- package/assets/video/examples/hf/logo-sting.html +378 -0
- package/assets/video/examples/hf/logo-wall.html +502 -0
- package/assets/video/examples/hf/lottie-character-walk.html +407 -0
- package/assets/video/examples/hf/lt-accent-underline.html +247 -0
- package/assets/video/examples/hf/lt-bold-block.html +249 -0
- package/assets/video/examples/hf/lt-clean-bar.html +251 -0
- package/assets/video/examples/hf/lt-color-block.html +241 -0
- package/assets/video/examples/hf/lt-dark-card.html +251 -0
- package/assets/video/examples/hf/lt-kicker-name.html +254 -0
- package/assets/video/examples/hf/lt-mask-reveal.html +260 -0
- package/assets/video/examples/hf/lt-neon-border.html +604 -0
- package/assets/video/examples/hf/lt-side-rule.html +254 -0
- package/assets/video/examples/hf/lt-soft-pill.html +259 -0
- package/assets/video/examples/hf/lt-stack-bars.html +249 -0
- package/assets/video/examples/hf/macos-notification.html +372 -0
- package/assets/video/examples/hf/macos-tahoe-liquid-glass.html +1701 -0
- package/assets/video/examples/hf/magnetic-cursor.html +684 -0
- package/assets/video/examples/hf/marble.html +257 -0
- package/assets/video/examples/hf/marker-checklist-card.html +727 -0
- package/assets/video/examples/hf/marker-highlight.html +589 -0
- package/assets/video/examples/hf/match-cut.html +505 -0
- package/assets/video/examples/hf/matrix-decode.html +363 -0
- package/assets/video/examples/hf/menu-morph.html +420 -0
- package/assets/video/examples/hf/mesh-gradient-bg.html +329 -0
- package/assets/video/examples/hf/mesh-gradient.html +257 -0
- package/assets/video/examples/hf/message-thread-reveal.html +1913 -0
- package/assets/video/examples/hf/micro-transitions.html +631 -0
- package/assets/video/examples/hf/mk-background.html +376 -0
- package/assets/video/examples/hf/mk-callout-highlight.html +322 -0
- package/assets/video/examples/hf/mk-clone-wall-transition.html +364 -0
- package/assets/video/examples/hf/mk-emphasis-type.html +235 -0
- package/assets/video/examples/hf/mk-line-graph.html +432 -0
- package/assets/video/examples/hf/mk-placeholder-grid.html +373 -0
- package/assets/video/examples/hf/mk-progress-stat.html +324 -0
- package/assets/video/examples/hf/mk-specs-list.html +362 -0
- package/assets/video/examples/hf/mk-usage-arc.html +297 -0
- package/assets/video/examples/hf/modal-morph.html +727 -0
- package/assets/video/examples/hf/morph-swap.html +590 -0
- package/assets/video/examples/hf/morph-text.html +409 -0
- package/assets/video/examples/hf/multi-device-splay.html +934 -0
- package/assets/video/examples/hf/multiplayer-cursors.html +642 -0
- package/assets/video/examples/hf/native-notification-pop.html +670 -0
- package/assets/video/examples/hf/nebula.html +258 -0
- package/assets/video/examples/hf/news-ticker.html +548 -0
- package/assets/video/examples/hf/north-korea-locked-down.html +447 -0
- package/assets/video/examples/hf/notes-reveal.html +2028 -0
- package/assets/video/examples/hf/notes-typing.html +631 -0
- package/assets/video/examples/hf/notification-cascade.html +740 -0
- package/assets/video/examples/hf/notification-pileup.html +667 -0
- package/assets/video/examples/hf/notification-stack.html +610 -0
- package/assets/video/examples/hf/number-pop-in.html +362 -0
- package/assets/video/examples/hf/number-wheel.html +378 -0
- package/assets/video/examples/hf/nyc-paris-flight.html +659 -0
- package/assets/video/examples/hf/nyt-graph.html +715 -0
- package/assets/video/examples/hf/obsidian.html +258 -0
- package/assets/video/examples/hf/offset-path-traveler.html +511 -0
- package/assets/video/examples/hf/onboarding-stepper-flow.html +292 -0
- package/assets/video/examples/hf/orbit-card.html +2457 -0
- package/assets/video/examples/hf/ordered-dither-pass.html +753 -0
- package/assets/video/examples/hf/organic-light-leak-overlay.html +336 -0
- package/assets/video/examples/hf/oscilloscope-trace.html +718 -0
- package/assets/video/examples/hf/outline-draw.html +394 -0
- package/assets/video/examples/hf/oversized-cursor.html +851 -0
- package/assets/video/examples/hf/overwhelm-surround.html +557 -0
- package/assets/video/examples/hf/page-slide.html +377 -0
- package/assets/video/examples/hf/pan-stations.html +555 -0
- package/assets/video/examples/hf/panel-reveal.html +370 -0
- package/assets/video/examples/hf/paper-collage-reveal.html +737 -0
- package/assets/video/examples/hf/parallax-device-dive.html +647 -0
- package/assets/video/examples/hf/parallax-unzoom.html +499 -0
- package/assets/video/examples/hf/parallax-zoom.html +515 -0
- package/assets/video/examples/hf/particle-image-reveal.html +595 -0
- package/assets/video/examples/hf/particle-text-dissolve.html +615 -0
- package/assets/video/examples/hf/path-traced-3d.html +508 -0
- package/assets/video/examples/hf/pendulum-swing.html +364 -0
- package/assets/video/examples/hf/per-word-crossfade.html +398 -0
- package/assets/video/examples/hf/per-word-rise.html +556 -0
- package/assets/video/examples/hf/perspective-marquee.html +366 -0
- package/assets/video/examples/hf/physical-exit.html +459 -0
- package/assets/video/examples/hf/plasma.html +258 -0
- package/assets/video/examples/hf/plastic.html +258 -0
- package/assets/video/examples/hf/play-mode.html +1035 -0
- package/assets/video/examples/hf/press-ripple.html +675 -0
- package/assets/video/examples/hf/prism.html +258 -0
- package/assets/video/examples/hf/product-promo.html +1311 -0
- package/assets/video/examples/hf/product-turntable.html +4569 -0
- package/assets/video/examples/hf/pull-back-reveal.html +546 -0
- package/assets/video/examples/hf/pull-to-refresh.html +861 -0
- package/assets/video/examples/hf/push-in.html +379 -0
- package/assets/video/examples/hf/rack-focus.html +779 -0
- package/assets/video/examples/hf/radial-surround.html +653 -0
- package/assets/video/examples/hf/reddit-post.html +515 -0
- package/assets/video/examples/hf/rgb-glitch-text.html +353 -0
- package/assets/video/examples/hf/ridged-burn.html +624 -0
- package/assets/video/examples/hf/ripple-waves.html +613 -0
- package/assets/video/examples/hf/ripples.html +259 -0
- package/assets/video/examples/hf/rubber-band-bumper.html +534 -0
- package/assets/video/examples/hf/scan-band.html +415 -0
- package/assets/video/examples/hf/scramble-reveal.html +510 -0
- package/assets/video/examples/hf/screen-flow-carousel.html +779 -0
- package/assets/video/examples/hf/scroll-camera-story.html +988 -0
- package/assets/video/examples/hf/scroll-feed.html +602 -0
- package/assets/video/examples/hf/sdf-iris.html +613 -0
- package/assets/video/examples/hf/segmentation-flood.html +748 -0
- package/assets/video/examples/hf/separator.html +620 -0
- package/assets/video/examples/hf/settings-toggle-flow.html +286 -0
- package/assets/video/examples/hf/share-sheet-carousel.html +591 -0
- package/assets/video/examples/hf/shared-axis-y.html +370 -0
- package/assets/video/examples/hf/shared-axis-z.html +514 -0
- package/assets/video/examples/hf/sheet-spring-up.html +681 -0
- package/assets/video/examples/hf/shimmer-sweep.html +301 -0
- package/assets/video/examples/hf/signup-flow.html +276 -0
- package/assets/video/examples/hf/sine-wave.html +258 -0
- package/assets/video/examples/hf/skeleton-reveal.html +373 -0
- package/assets/video/examples/hf/slack-notification-ad.html +901 -0
- package/assets/video/examples/hf/slit-scan-reveal.html +540 -0
- package/assets/video/examples/hf/slot-machine-roll.html +391 -0
- package/assets/video/examples/hf/snow.html +499 -0
- package/assets/video/examples/hf/social-proof-card.html +534 -0
- package/assets/video/examples/hf/soft-blur-in.html +322 -0
- package/assets/video/examples/hf/spain-map.html +583 -0
- package/assets/video/examples/hf/spiral-galaxy.html +507 -0
- package/assets/video/examples/hf/spiral.html +258 -0
- package/assets/video/examples/hf/split-flap-board.html +537 -0
- package/assets/video/examples/hf/split-tilt-cards.html +775 -0
- package/assets/video/examples/hf/spotify-card.html +470 -0
- package/assets/video/examples/hf/spotlight-card.html +328 -0
- package/assets/video/examples/hf/spring-pop.html +406 -0
- package/assets/video/examples/hf/spring-stack-shuffle.html +791 -0
- package/assets/video/examples/hf/stagger-cascade.html +465 -0
- package/assets/video/examples/hf/stagger-lattice.html +278 -0
- package/assets/video/examples/hf/staggered-fade-up.html +368 -0
- package/assets/video/examples/hf/star-rating-fill.html +511 -0
- package/assets/video/examples/hf/starfield.html +450 -0
- package/assets/video/examples/hf/state-chip-rail.html +585 -0
- package/assets/video/examples/hf/sticky-mock-swap.html +664 -0
- package/assets/video/examples/hf/stitched-text-draw.html +1053 -0
- package/assets/video/examples/hf/stop-motion-cadence.html +670 -0
- package/assets/video/examples/hf/store-badge-lockup.html +521 -0
- package/assets/video/examples/hf/strands.html +258 -0
- package/assets/video/examples/hf/streaming-text.html +581 -0
- package/assets/video/examples/hf/strikethrough-replace.html +356 -0
- package/assets/video/examples/hf/stripes.html +258 -0
- package/assets/video/examples/hf/success-check.html +390 -0
- package/assets/video/examples/hf/sun-burst.html +258 -0
- package/assets/video/examples/hf/svg-line-draw-loader.html +257 -0
- package/assets/video/examples/hf/svg-mask-reveal.html +523 -0
- package/assets/video/examples/hf/svg-stroke-trace.html +465 -0
- package/assets/video/examples/hf/swipe-rail.html +564 -0
- package/assets/video/examples/hf/swirl-vortex.html +623 -0
- package/assets/video/examples/hf/swirl.html +258 -0
- package/assets/video/examples/hf/swiss-grid.html +837 -0
- package/assets/video/examples/hf/tabs-slide-indicator.html +424 -0
- package/assets/video/examples/hf/telemetry-hud.html +760 -0
- package/assets/video/examples/hf/terminal-simulator.html +293 -0
- package/assets/video/examples/hf/testimonial-card.html +545 -0
- package/assets/video/examples/hf/testimonial-proof-card.html +720 -0
- package/assets/video/examples/hf/text-match-cut.html +1345 -0
- package/assets/video/examples/hf/text-shimmer.html +394 -0
- package/assets/video/examples/hf/text-stagger.html +373 -0
- package/assets/video/examples/hf/text-state-swap.html +421 -0
- package/assets/video/examples/hf/thermal-distortion.html +624 -0
- package/assets/video/examples/hf/thin-film.html +258 -0
- package/assets/video/examples/hf/thread-message-stack.html +377 -0
- package/assets/video/examples/hf/three-orbiting-cards.html +322 -0
- package/assets/video/examples/hf/ticker-takeover.html +534 -0
- package/assets/video/examples/hf/tiktok-follow.html +435 -0
- package/assets/video/examples/hf/tilt-card.html +406 -0
- package/assets/video/examples/hf/titlecard-calm.html +388 -0
- package/assets/video/examples/hf/titlecard-lockup.html +546 -0
- package/assets/video/examples/hf/toggle-flip.html +601 -0
- package/assets/video/examples/hf/top-down-letters.html +326 -0
- package/assets/video/examples/hf/torn-paper-rip.html +762 -0
- package/assets/video/examples/hf/touch-indicator.html +777 -0
- package/assets/video/examples/hf/tracing-beam.html +608 -0
- package/assets/video/examples/hf/tracking-in.html +317 -0
- package/assets/video/examples/hf/transitions-3d.html +434 -0
- package/assets/video/examples/hf/transitions-blur.html +524 -0
- package/assets/video/examples/hf/transitions-cover.html +508 -0
- package/assets/video/examples/hf/transitions-destruction.html +551 -0
- package/assets/video/examples/hf/transitions-dissolve.html +529 -0
- package/assets/video/examples/hf/transitions-distortion.html +522 -0
- package/assets/video/examples/hf/transitions-grid.html +442 -0
- package/assets/video/examples/hf/transitions-light.html +528 -0
- package/assets/video/examples/hf/transitions-mechanical.html +560 -0
- package/assets/video/examples/hf/transitions-other.html +532 -0
- package/assets/video/examples/hf/transitions-push.html +520 -0
- package/assets/video/examples/hf/transitions-radial.html +492 -0
- package/assets/video/examples/hf/transitions-scale.html +487 -0
- package/assets/video/examples/hf/trust-strip.html +445 -0
- package/assets/video/examples/hf/typed-prompt.html +619 -0
- package/assets/video/examples/hf/typewriter.html +350 -0
- package/assets/video/examples/hf/typing-indicator.html +702 -0
- package/assets/video/examples/hf/ui-3d-reveal.html +2929 -0
- package/assets/video/examples/hf/ui-focus-zoom.html +786 -0
- package/assets/video/examples/hf/us-map-bubble.html +669 -0
- package/assets/video/examples/hf/us-map-flow.html +621 -0
- package/assets/video/examples/hf/us-map-hex.html +733 -0
- package/assets/video/examples/hf/us-map.html +591 -0
- package/assets/video/examples/hf/variable-font-flex.html +538 -0
- package/assets/video/examples/hf/vector-editor-rig.html +977 -0
- package/assets/video/examples/hf/vfx-anamorphic-flare.html +572 -0
- package/assets/video/examples/hf/vfx-iphone-device.html +1089 -0
- package/assets/video/examples/hf/vfx-liquid-background.html +1479 -0
- package/assets/video/examples/hf/vfx-liquid-glass.html +2054 -0
- package/assets/video/examples/hf/vfx-magnetic.html +660 -0
- package/assets/video/examples/hf/vfx-portal.html +1090 -0
- package/assets/video/examples/hf/vfx-shatter.html +1382 -0
- package/assets/video/examples/hf/vignette.html +385 -0
- package/assets/video/examples/hf/voronoi.html +258 -0
- package/assets/video/examples/hf/vox-annotate.html +707 -0
- package/assets/video/examples/hf/vpn-youtube-spot.html +1118 -0
- package/assets/video/examples/hf/water.html +258 -0
- package/assets/video/examples/hf/waveform.html +258 -0
- package/assets/video/examples/hf/week-in-merges.html +673 -0
- package/assets/video/examples/hf/weight-wave.html +531 -0
- package/assets/video/examples/hf/whip-pan-cut.html +668 -0
- package/assets/video/examples/hf/whip-pan.html +613 -0
- package/assets/video/examples/hf/whiteboard-ink.html +763 -0
- package/assets/video/examples/hf/wireframe-portal-title.html +3840 -0
- package/assets/video/examples/hf/wordmark-tiles.html +559 -0
- package/assets/video/examples/hf/world-map.html +623 -0
- package/assets/video/examples/hf/worley-noise.html +259 -0
- package/assets/video/examples/hf/x-follow-card.html +286 -0
- package/assets/video/examples/hf/x-post.html +611 -0
- package/assets/video/examples/hf/yt-camera-move.html +308 -0
- package/assets/video/examples/hf/yt-circle-pointer.html +301 -0
- package/assets/video/examples/hf/yt-comment-card.html +458 -0
- package/assets/video/examples/hf/yt-feather-highlight.html +279 -0
- package/assets/video/examples/hf/yt-lcd-background.html +446 -0
- package/assets/video/examples/hf/yt-logo-intro.html +390 -0
- package/assets/video/examples/hf/yt-lower-third.html +414 -0
- package/assets/video/examples/hf/yt-prism-title.html +343 -0
- package/assets/video/examples/hf/yt-screen-warp.html +257 -0
- package/assets/video/examples/hf/yt-vertical-fill.html +367 -0
- package/assets/video/examples/kinetic-type.html +137 -0
- package/assets/video/examples/motion-blur-streak.html +119 -0
- package/assets/video/examples/object-reveal.html +107 -0
- package/assets/video/examples/parallax-layers.html +130 -0
- package/assets/video/examples/particle-burst.html +157 -0
- package/assets/video/examples/pen-draw.html +146 -0
- package/assets/video/examples/shape-morph.html +151 -0
- package/assets/video/examples/slam-title.html +125 -0
- package/assets/video/examples/speed-lines.html +123 -0
- package/assets/video/examples/spring-pop.html +129 -0
- package/assets/video/examples/streak-wipe.html +78 -0
- package/assets/video/examples/three-chrome-knot.html +155 -0
- package/assets/video/examples/three-clay.html +138 -0
- package/assets/video/examples/three-cube-wave.html +140 -0
- package/assets/video/examples/three-extruded-shape.html +148 -0
- package/assets/video/examples/type-on.html +128 -0
- package/assets/video/motion.js +991 -0
- package/assets/video/screen.js +298 -0
- package/assets/video/sfx/catalogue.json +2283 -0
- package/dist/cli.js +38185 -3485
- package/dist/index.js +37910 -3428
- package/dist/types/args.d.ts +2 -0
- package/dist/types/broken-pipe.d.ts +13 -0
- package/dist/types/cloud/service.d.ts +13 -0
- package/dist/types/commands/usage.d.ts +2 -0
- package/dist/types/commands/video.d.ts +10 -0
- package/dist/types/core/error-text.d.ts +26 -0
- package/dist/types/core/errors.d.ts +5 -3
- package/dist/types/core/image-info.d.ts +1 -1
- package/dist/types/core/image.d.ts +3 -5
- package/dist/types/core/project.d.ts +8 -7
- package/dist/types/core/util.d.ts +1 -2
- package/dist/types/cpu-budget.d.ts +43 -0
- package/dist/types/credentials.d.ts +0 -10
- package/dist/types/editor/http-types.d.ts +1 -0
- package/dist/types/i18n.d.ts +11 -0
- package/dist/types/images/batch-jobs.d.ts +2 -0
- package/dist/types/images/batch-run.d.ts +2 -1
- package/dist/types/images/jobs.d.ts +7 -0
- package/dist/types/images/pending.d.ts +40 -0
- package/dist/types/images/retry.d.ts +4 -1
- package/dist/types/images/run.d.ts +9 -1
- package/dist/types/main.d.ts +4 -1
- package/dist/types/node-runtime.d.ts +6 -1
- package/dist/types/profile.d.ts +2 -0
- package/dist/types/providers/api-errors.d.ts +2 -2
- package/dist/types/providers/api.d.ts +13 -5
- package/dist/types/providers/base.d.ts +2 -0
- package/dist/types/providers/cli-generate.d.ts +5 -1
- package/dist/types/providers/cli-pending.d.ts +24 -0
- package/dist/types/providers/errors.d.ts +7 -2
- package/dist/types/providers/ledger.d.ts +10 -6
- package/dist/types/providers/popost-async.d.ts +35 -0
- package/dist/types/providers/popost-tasks.d.ts +16 -5
- package/dist/types/providers/popost-validate.d.ts +0 -1
- package/dist/types/providers/popost.d.ts +16 -1
- package/dist/types/providers/task.d.ts +43 -0
- package/dist/types/render/audit-script.d.ts +2 -1
- package/dist/types/render/audit.d.ts +2 -0
- package/dist/types/render/browser.d.ts +16 -2
- package/dist/types/runtime.d.ts +73 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/types/video/align/index.d.ts +43 -0
- package/dist/types/video/capture/director.d.ts +70 -0
- package/dist/types/video/capture/index.d.ts +141 -0
- package/dist/types/video/capture/stage.d.ts +99 -0
- package/dist/types/video/capture/steps.d.ts +138 -0
- package/dist/types/video/commands/cast.d.ts +3 -0
- package/dist/types/video/commands/clips.d.ts +2 -0
- package/dist/types/video/commands/compare-scope.d.ts +7 -0
- package/dist/types/video/commands/credits.d.ts +19 -0
- package/dist/types/video/commands/elements.d.ts +22 -0
- package/dist/types/video/commands/eval.d.ts +2 -0
- package/dist/types/video/commands/example.d.ts +1 -0
- package/dist/types/video/commands/generate.d.ts +14 -0
- package/dist/types/video/commands/loop-shared.d.ts +12 -0
- package/dist/types/video/commands/loop.d.ts +4 -0
- package/dist/types/video/commands/make.d.ts +9 -0
- package/dist/types/video/commands/materials.d.ts +1 -0
- package/dist/types/video/commands/measure.d.ts +2 -0
- package/dist/types/video/commands/media.d.ts +2 -0
- package/dist/types/video/commands/music-plan.d.ts +1 -0
- package/dist/types/video/commands/music.d.ts +2 -0
- package/dist/types/video/commands/read.d.ts +19 -0
- package/dist/types/video/commands/replication.d.ts +2 -0
- package/dist/types/video/commands/sfx-extract.d.ts +2 -0
- package/dist/types/video/commands/sfx-place.d.ts +3 -0
- package/dist/types/video/commands/sfx.d.ts +2 -0
- package/dist/types/video/commands/shared.d.ts +39 -0
- package/dist/types/video/commands/source.d.ts +2 -0
- package/dist/types/video/commands/speech-check.d.ts +1 -0
- package/dist/types/video/commands/speech-kind.d.ts +6 -0
- package/dist/types/video/commands/template.d.ts +10 -0
- package/dist/types/video/commands/voice-profile.d.ts +2 -0
- package/dist/types/video/commands/voice-sample.d.ts +1 -0
- package/dist/types/video/compile/footage.d.ts +36 -0
- package/dist/types/video/compile/index.d.ts +30 -0
- package/dist/types/video/compile/page-bundle.d.ts +1 -0
- package/dist/types/video/compile/page.d.ts +10 -0
- package/dist/types/video/compile/words.d.ts +9 -0
- package/dist/types/video/describe/aim.d.ts +20 -0
- package/dist/types/video/describe/beats.d.ts +53 -0
- package/dist/types/video/describe/curves.d.ts +27 -0
- package/dist/types/video/describe/frames.d.ts +62 -0
- package/dist/types/video/describe/index.d.ts +34 -0
- package/dist/types/video/describe/inset.d.ts +83 -0
- package/dist/types/video/describe/kind.d.ts +29 -0
- package/dist/types/video/describe/known.d.ts +31 -0
- package/dist/types/video/describe/movement.d.ts +17 -0
- package/dist/types/video/describe/parts.d.ts +50 -0
- package/dist/types/video/describe/paths.d.ts +21 -0
- package/dist/types/video/describe/speech-kind.d.ts +144 -0
- package/dist/types/video/describe/unrecovered.d.ts +29 -0
- package/dist/types/video/draft/build.d.ts +34 -0
- package/dist/types/video/draft/export.d.ts +19 -0
- package/dist/types/video/draft/lifecycle.d.ts +9 -0
- package/dist/types/video/draft/native.d.ts +27 -0
- package/dist/types/video/draft/schema.d.ts +316 -0
- package/dist/types/video/draft/targets.d.ts +19 -0
- package/dist/types/video/elements/caption-reading.d.ts +9 -0
- package/dist/types/video/elements/caption-roles.d.ts +6 -0
- package/dist/types/video/elements/carry.d.ts +45 -0
- package/dist/types/video/elements/check.d.ts +14 -0
- package/dist/types/video/elements/findings.d.ts +49 -0
- package/dist/types/video/elements/main.d.ts +54 -0
- package/dist/types/video/elements/picture.d.ts +31 -0
- package/dist/types/video/elements/questions.d.ts +35 -0
- package/dist/types/video/elements/read.d.ts +14 -0
- package/dist/types/video/elements/status.d.ts +23 -0
- package/dist/types/video/elements/types.d.ts +120 -0
- package/dist/types/video/eval/contrast.d.ts +136 -0
- package/dist/types/video/eval/dataset.d.ts +21 -0
- package/dist/types/video/eval/floor.d.ts +27 -0
- package/dist/types/video/eval/ledger.d.ts +27 -0
- package/dist/types/video/eval/legibility.d.ts +33 -0
- package/dist/types/video/eval/readback-frames.d.ts +41 -0
- package/dist/types/video/eval/readback-run.d.ts +54 -0
- package/dist/types/video/eval/readback.d.ts +48 -0
- package/dist/types/video/eval/roundtrip.d.ts +71 -0
- package/dist/types/video/generate/approved.d.ts +74 -0
- package/dist/types/video/generate/cast.d.ts +56 -0
- package/dist/types/video/generate/character.d.ts +14 -0
- package/dist/types/video/generate/clip-sound.d.ts +63 -0
- package/dist/types/video/generate/cloud-image.d.ts +12 -0
- package/dist/types/video/generate/cloud.d.ts +67 -0
- package/dist/types/video/generate/dialogue.d.ts +116 -0
- package/dist/types/video/generate/index.d.ts +265 -0
- package/dist/types/video/generate/provenance.d.ts +11 -0
- package/dist/types/video/generate/speech-lock.d.ts +4 -0
- package/dist/types/video/generate/speech.d.ts +20 -0
- package/dist/types/video/host.d.ts +42 -0
- package/dist/types/video/hosted-api.d.ts +161 -0
- package/dist/types/video/look/index.d.ts +67 -0
- package/dist/types/video/look/like.d.ts +18 -0
- package/dist/types/video/look/sheets.d.ts +58 -0
- package/dist/types/video/measure/align.d.ts +33 -0
- package/dist/types/video/measure/amount.d.ts +52 -0
- package/dist/types/video/measure/bars.d.ts +22 -0
- package/dist/types/video/measure/boundaries.d.ts +18 -0
- package/dist/types/video/measure/cache.d.ts +6 -0
- package/dist/types/video/measure/camera.d.ts +21 -0
- package/dist/types/video/measure/colour.d.ts +12 -0
- package/dist/types/video/measure/curve.d.ts +29 -0
- package/dist/types/video/measure/cuts.d.ts +17 -0
- package/dist/types/video/measure/easing.d.ts +52 -0
- package/dist/types/video/measure/fill.d.ts +20 -0
- package/dist/types/video/measure/fits.d.ts +80 -0
- package/dist/types/video/measure/gradual.d.ts +23 -0
- package/dist/types/video/measure/index.d.ts +28 -0
- package/dist/types/video/measure/kinds.d.ts +71 -0
- package/dist/types/video/measure/motion.d.ts +26 -0
- package/dist/types/video/measure/move.d.ts +90 -0
- package/dist/types/video/measure/moves.d.ts +22 -0
- package/dist/types/video/measure/orientation.d.ts +11 -0
- package/dist/types/video/measure/pixels.d.ts +41 -0
- package/dist/types/video/measure/profile.d.ts +53 -0
- package/dist/types/video/measure/reveal.d.ts +48 -0
- package/dist/types/video/measure/rhythm.d.ts +7 -0
- package/dist/types/video/measure/robust.d.ts +18 -0
- package/dist/types/video/measure/signals.d.ts +48 -0
- package/dist/types/video/measure/signature.d.ts +10 -0
- package/dist/types/video/measure/span.d.ts +28 -0
- package/dist/types/video/measure/still-shots.d.ts +40 -0
- package/dist/types/video/measure/switch.d.ts +101 -0
- package/dist/types/video/measure/tracks.d.ts +20 -0
- package/dist/types/video/measure/unmix.d.ts +20 -0
- package/dist/types/video/media/decode.d.ts +59 -0
- package/dist/types/video/media/ffmpeg.d.ts +48 -0
- package/dist/types/video/media/footage.d.ts +53 -0
- package/dist/types/video/media/screenshot.d.ts +26 -0
- package/dist/types/video/media/selection.d.ts +4 -0
- package/dist/types/video/media/wav.d.ts +26 -0
- package/dist/types/video/music/hosted.d.ts +110 -0
- package/dist/types/video/music/plan.d.ts +103 -0
- package/dist/types/video/music/provenance.d.ts +86 -0
- package/dist/types/video/page/apply.d.ts +9 -0
- package/dist/types/video/page/contract.d.ts +150 -0
- package/dist/types/video/page/css.d.ts +9 -0
- package/dist/types/video/page/dom.d.ts +51 -0
- package/dist/types/video/page/fit.d.ts +13 -0
- package/dist/types/video/page/layout.d.ts +8 -0
- package/dist/types/video/page/main.d.ts +1 -0
- package/dist/types/video/page/scene.d.ts +38 -0
- package/dist/types/video/page/texts.d.ts +10 -0
- package/dist/types/video/page/words.d.ts +39 -0
- package/dist/types/video/paid-download.d.ts +19 -0
- package/dist/types/video/plan/ask.d.ts +77 -0
- package/dist/types/video/plan/generated.d.ts +29 -0
- package/dist/types/video/plan/index.d.ts +6 -0
- package/dist/types/video/plan/materials.d.ts +22 -0
- package/dist/types/video/plan/model.d.ts +59 -0
- package/dist/types/video/plan/prompt.d.ts +41 -0
- package/dist/types/video/plan/see.d.ts +35 -0
- package/dist/types/video/presets/camera.d.ts +27 -0
- package/dist/types/video/presets/easing.d.ts +11 -0
- package/dist/types/video/presets/fill.d.ts +16 -0
- package/dist/types/video/presets/loop.d.ts +20 -0
- package/dist/types/video/presets/motion.d.ts +47 -0
- package/dist/types/video/presets/spoken.d.ts +35 -0
- package/dist/types/video/presets/text-styles.d.ts +44 -0
- package/dist/types/video/presets/transition.d.ts +66 -0
- package/dist/types/video/preview/cloud.d.ts +13 -0
- package/dist/types/video/preview/edit/check.d.ts +15 -0
- package/dist/types/video/preview/edit/editor.d.ts +52 -0
- package/dist/types/video/preview/edit/ops.d.ts +52 -0
- package/dist/types/video/preview/edit/render.d.ts +11 -0
- package/dist/types/video/preview/edit/retime.d.ts +2 -0
- package/dist/types/video/preview/edit/routes.d.ts +1106 -0
- package/dist/types/video/preview/export-settings.d.ts +25 -0
- package/dist/types/video/preview/files.d.ts +25 -0
- package/dist/types/video/preview/html.d.ts +9 -0
- package/dist/types/video/preview/index.d.ts +20 -0
- package/dist/types/video/preview/project.d.ts +48 -0
- package/dist/types/video/preview/protocol.d.ts +91 -0
- package/dist/types/video/preview/server.d.ts +21 -0
- package/dist/types/video/preview/shell/app.d.ts +81 -0
- package/dist/types/video/preview/shell/dom.d.ts +40 -0
- package/dist/types/video/preview/shell/edit/controller.d.ts +32 -0
- package/dist/types/video/preview/shell/edit/fields.d.ts +49 -0
- package/dist/types/video/preview/shell/edit/form-parts.d.ts +17 -0
- package/dist/types/video/preview/shell/edit/form.d.ts +17 -0
- package/dist/types/video/preview/shell/edit/inline.d.ts +4 -0
- package/dist/types/video/preview/shell/edit/lanes-edit.d.ts +31 -0
- package/dist/types/video/preview/shell/edit/layer-order.d.ts +4 -0
- package/dist/types/video/preview/shell/edit/remove.d.ts +4 -0
- package/dist/types/video/preview/shell/edit/reveal.d.ts +4 -0
- package/dist/types/video/preview/shell/edit/scenes.d.ts +7 -0
- package/dist/types/video/preview/shell/edit/schema.d.ts +30 -0
- package/dist/types/video/preview/shell/edit/source.d.ts +83 -0
- package/dist/types/video/preview/shell/edit/split.d.ts +8 -0
- package/dist/types/video/preview/shell/edit/stage-edit.d.ts +21 -0
- package/dist/types/video/preview/shell/edit/text-fit.d.ts +4 -0
- package/dist/types/video/preview/shell/edit/toolbar.d.ts +14 -0
- package/dist/types/video/preview/shell/footage.d.ts +6 -0
- package/dist/types/video/preview/shell/i18n.d.ts +176 -0
- package/dist/types/video/preview/shell/lanes.d.ts +2 -0
- package/dist/types/video/preview/shell/main.d.ts +1 -0
- package/dist/types/video/preview/shell/model.d.ts +85 -0
- package/dist/types/video/preview/shell/panel.d.ts +3 -0
- package/dist/types/video/preview/shell/readonly.d.ts +1 -0
- package/dist/types/video/preview/shell/stage.d.ts +7 -0
- package/dist/types/video/preview/shell/studio/audio.d.ts +3 -0
- package/dist/types/video/preview/shell/studio/cloud.d.ts +3 -0
- package/dist/types/video/preview/shell/studio/code.d.ts +6 -0
- package/dist/types/video/preview/shell/studio/copy.d.ts +159 -0
- package/dist/types/video/preview/shell/studio/draft-result.d.ts +3 -0
- package/dist/types/video/preview/shell/studio/export.d.ts +3 -0
- package/dist/types/video/preview/shell/studio/scene-selection.d.ts +19 -0
- package/dist/types/video/preview/shell/studio/sidebar.d.ts +27 -0
- package/dist/types/video/preview/shell/studio/style.d.ts +2 -0
- package/dist/types/video/preview/shell/studio/timeline.d.ts +3 -0
- package/dist/types/video/preview/shell/studio/ui.d.ts +16 -0
- package/dist/types/video/preview/shell/studio/workspace.d.ts +11 -0
- package/dist/types/video/preview/shell/style.d.ts +5 -0
- package/dist/types/video/preview/shell/transport.d.ts +6 -0
- package/dist/types/video/preview/shell-bundle.d.ts +1 -0
- package/dist/types/video/preview/studio-actions.d.ts +4 -0
- package/dist/types/video/preview/studio-data.d.ts +32 -0
- package/dist/types/video/preview/thumbnails.d.ts +5 -0
- package/dist/types/video/preview/watch.d.ts +23 -0
- package/dist/types/video/progress.d.ts +28 -0
- package/dist/types/video/project/check-camera.d.ts +8 -0
- package/dist/types/video/project/check-caption.d.ts +8 -0
- package/dist/types/video/project/check-common.d.ts +25 -0
- package/dist/types/video/project/check-footage.d.ts +22 -0
- package/dist/types/video/project/check-look.d.ts +19 -0
- package/dist/types/video/project/check-sound.d.ts +54 -0
- package/dist/types/video/project/check-span.d.ts +11 -0
- package/dist/types/video/project/check-tracks.d.ts +8 -0
- package/dist/types/video/project/check-transition.d.ts +11 -0
- package/dist/types/video/project/check-words.d.ts +32 -0
- package/dist/types/video/project/check.d.ts +42 -0
- package/dist/types/video/project/issues.d.ts +43 -0
- package/dist/types/video/project/schema.d.ts +2074 -0
- package/dist/types/video/project/suggest.d.ts +4 -0
- package/dist/types/video/project/words.d.ts +6 -0
- package/dist/types/video/render/browser-step.d.ts +5 -0
- package/dist/types/video/render/encode.d.ts +49 -0
- package/dist/types/video/render/index.d.ts +90 -0
- package/dist/types/video/render/layout.d.ts +26 -0
- package/dist/types/video/render/record.d.ts +80 -0
- package/dist/types/video/render/session.d.ts +64 -0
- package/dist/types/video/render/verify.d.ts +16 -0
- package/dist/types/video/replication/audio-provenance.d.ts +36 -0
- package/dist/types/video/replication/browser.d.ts +1 -0
- package/dist/types/video/replication/check.d.ts +19 -0
- package/dist/types/video/replication/contract.d.ts +683 -0
- package/dist/types/video/replication/io.d.ts +22 -0
- package/dist/types/video/replication/motion-bundle.d.ts +1 -0
- package/dist/types/video/replication/motion.d.ts +109 -0
- package/dist/types/video/replication/pairs.d.ts +69 -0
- package/dist/types/video/replication/prefill.d.ts +34 -0
- package/dist/types/video/replication/production.d.ts +163 -0
- package/dist/types/video/replication/revision.d.ts +2 -0
- package/dist/types/video/replication/schema.d.ts +56 -0
- package/dist/types/video/replication/source-clock.d.ts +24 -0
- package/dist/types/video/replication/speech-observed.d.ts +121 -0
- package/dist/types/video/replication/voice-spans.d.ts +3 -0
- package/dist/types/video/retarget/caption-look.d.ts +14 -0
- package/dist/types/video/retarget/fps.d.ts +7 -0
- package/dist/types/video/retarget/index.d.ts +248 -0
- package/dist/types/video/retarget/items.d.ts +44 -0
- package/dist/types/video/retarget/marks.d.ts +12 -0
- package/dist/types/video/retarget/pace.d.ts +36 -0
- package/dist/types/video/retarget/speak.d.ts +41 -0
- package/dist/types/video/retarget/tempo.d.ts +40 -0
- package/dist/types/video/retarget/titles.d.ts +76 -0
- package/dist/types/video/retarget/words.d.ts +39 -0
- package/dist/types/video/scene/author.d.ts +74 -0
- package/dist/types/video/scene/check.d.ts +64 -0
- package/dist/types/video/scene/copied.d.ts +30 -0
- package/dist/types/video/scene/cues.d.ts +40 -0
- package/dist/types/video/scene/examples.d.ts +129 -0
- package/dist/types/video/scene/findings.d.ts +71 -0
- package/dist/types/video/scene/fonts.d.ts +19 -0
- package/dist/types/video/scene/items.d.ts +23 -0
- package/dist/types/video/scene/library.d.ts +41 -0
- package/dist/types/video/scene/lint.d.ts +15 -0
- package/dist/types/video/scene/numbers.d.ts +39 -0
- package/dist/types/video/scene/pictures.d.ts +12 -0
- package/dist/types/video/scene/write.d.ts +41 -0
- package/dist/types/video/score/index.d.ts +13 -0
- package/dist/types/video/score/pair.d.ts +43 -0
- package/dist/types/video/score/picture.d.ts +14 -0
- package/dist/types/video/score/project-windows.d.ts +9 -0
- package/dist/types/video/score/shot-transition.d.ts +62 -0
- package/dist/types/video/score/shots.d.ts +101 -0
- package/dist/types/video/score/time.d.ts +22 -0
- package/dist/types/video/score/tracks.d.ts +42 -0
- package/dist/types/video/score/weights.d.ts +19 -0
- package/dist/types/video/sfx/cache.d.ts +16 -0
- package/dist/types/video/sfx/catalogue.d.ts +64 -0
- package/dist/types/video/sfx/extract.d.ts +65 -0
- package/dist/types/video/sfx/levels.d.ts +39 -0
- package/dist/types/video/sfx/library.d.ts +26 -0
- package/dist/types/video/sfx/place.d.ts +82 -0
- package/dist/types/video/sfx/project.d.ts +36 -0
- package/dist/types/video/sound/analysis.d.ts +46 -0
- package/dist/types/video/sound/breaks.d.ts +84 -0
- package/dist/types/video/sound/measure.d.ts +106 -0
- package/dist/types/video/sound/modes.d.ts +75 -0
- package/dist/types/video/sound/pcm.d.ts +21 -0
- package/dist/types/video/sound/reading.d.ts +124 -0
- package/dist/types/video/sound/speech-check.d.ts +76 -0
- package/dist/types/video/source/collect.d.ts +64 -0
- package/dist/types/video/source/read.d.ts +57 -0
- package/dist/types/video/source/used.d.ts +4 -0
- package/dist/types/video/speech/hosted.d.ts +36 -0
- package/dist/types/video/speech/index.d.ts +83 -0
- package/dist/types/video/speech/types.d.ts +41 -0
- package/dist/types/video/submit-retry.d.ts +15 -0
- package/dist/types/video/synth/generate.d.ts +53 -0
- package/dist/types/video/synth/truth.d.ts +8 -0
- package/dist/types/video/synth/write.d.ts +13 -0
- package/dist/types/video/template/capacity.d.ts +37 -0
- package/dist/types/video/template/card-elements.d.ts +17 -0
- package/dist/types/video/template/card.d.ts +22 -0
- package/dist/types/video/template/check-captions.d.ts +11 -0
- package/dist/types/video/template/check.d.ts +40 -0
- package/dist/types/video/template/facts.d.ts +90 -0
- package/dist/types/video/template/fill.d.ts +51 -0
- package/dist/types/video/template/fingerprint.d.ts +2 -0
- package/dist/types/video/template/fit.d.ts +60 -0
- package/dist/types/video/template/index.d.ts +8 -0
- package/dist/types/video/template/project.d.ts +21 -0
- package/dist/types/video/template/save.d.ts +52 -0
- package/dist/types/video/template/slots.d.ts +26 -0
- package/dist/types/video/template/speech-rules.d.ts +61 -0
- package/dist/types/video/template/split.d.ts +10 -0
- package/dist/types/video/template/structure.d.ts +81 -0
- package/dist/types/video/template/swap.d.ts +33 -0
- package/dist/types/video/template/types.d.ts +387 -0
- package/dist/types/video/text/bar.d.ts +63 -0
- package/dist/types/video/text/change.d.ts +19 -0
- package/dist/types/video/text/core.d.ts +25 -0
- package/dist/types/video/text/cues.d.ts +26 -0
- package/dist/types/video/text/fold.d.ts +9 -0
- package/dist/types/video/text/frame.d.ts +41 -0
- package/dist/types/video/text/highlight.d.ts +19 -0
- package/dist/types/video/text/index.d.ts +67 -0
- package/dist/types/video/text/letters.d.ts +85 -0
- package/dist/types/video/text/look.d.ts +53 -0
- package/dist/types/video/text/reader-command.d.ts +26 -0
- package/dist/types/video/text/reveal.d.ts +37 -0
- package/dist/types/video/text/rings.d.ts +39 -0
- package/dist/types/video/text/shadow.d.ts +44 -0
- package/dist/types/video/text/share.d.ts +2 -0
- package/dist/types/video/text/speech.d.ts +15 -0
- package/dist/types/video/text/strokes.d.ts +30 -0
- package/dist/types/video/text/types.d.ts +147 -0
- package/dist/types/video/timeline/cue-words.d.ts +27 -0
- package/dist/types/video/timeline/footage.d.ts +25 -0
- package/dist/types/video/timeline/frame.d.ts +55 -0
- package/dist/types/video/timeline/items.d.ts +28 -0
- package/dist/types/video/timeline/mix.d.ts +67 -0
- package/dist/types/video/timeline/resolve.d.ts +20 -0
- package/dist/types/video/timeline/spans.d.ts +32 -0
- package/dist/types/video/timeline/words.d.ts +64 -0
- package/dist/types/video/tool.d.ts +29 -0
- package/dist/types/video/types.d.ts +1057 -0
- package/dist/types/video/voice/create.d.ts +43 -0
- package/dist/types/video/voice/hosted.d.ts +36 -0
- package/dist/types/video/voice/index.d.ts +61 -0
- package/dist/types/video/voice/pace.d.ts +37 -0
- package/dist/types/video/voice/profile.d.ts +26 -0
- package/dist/types/video/voice/sample.d.ts +46 -0
- package/dist/types/video/wallet.d.ts +38 -0
- package/dist/types/video/work.d.ts +10 -0
- package/dist/types/workflow/build.d.ts +1 -1
- package/dist/types/workflow/errors.d.ts +1 -1
- package/dist/types/workflow/io.d.ts +1 -1
- package/dist/types/workflow/post-bundle.d.ts +8 -3
- package/dist/types/workflow/series-plan.d.ts +5 -2
- package/dist/types/workflow/template-plugins.d.ts +0 -8
- package/package.json +13 -4
- package/references/image-workflow.md +111 -0
- package/references/onboarding.md +50 -19
- package/references/post-bundle.md +2 -2
- package/references/providers.md +6 -3
- package/references/video-draft-export.md +13 -0
- package/references/video-editing.md +43 -0
- package/references/video-effects.md +605 -0
- package/references/video-elements.md +199 -0
- package/references/video-examples/showcase/assets/pattern.svg +18 -0
- package/references/video-examples/showcase/assets/voice.sbg +4 -0
- package/references/video-examples/showcase/assets/voice.words.json +68 -0
- package/references/video-examples/showcase/video.json +550 -0
- package/references/video-examples/template-demo/TEMPLATE.md +30 -0
- package/references/video-examples/template-demo/fill.json +29 -0
- package/references/video-examples/template-demo/slots.json +210 -0
- package/references/video-examples/template-demo/template.json +105 -0
- package/references/video-motion.md +315 -0
- package/references/video-native-observation.md +37 -0
- package/references/video-performers.md +86 -0
- package/references/video-project.md +63 -0
- package/references/video-replication.md +276 -0
- package/references/video-scenes.md +366 -0
- package/references/video-sfx.md +109 -0
- package/references/video-sound.md +207 -0
- package/references/video-templates.md +177 -0
- package/references/video-tools.md +560 -0
- package/references/video.md +756 -0
- package/templates/community/README.md +274 -1
- package/templates/community/index.json +3829 -0
- package/templates/community/instagram-age-expectations/README.md +14 -0
- package/templates/community/instagram-age-expectations/SKILL.md +52 -0
- package/templates/community/instagram-age-expectations/source.json +9 -0
- package/templates/community/instagram-age-expectations/template.json +53 -0
- package/templates/community/instagram-artwork-detail/README.md +19 -0
- package/templates/community/instagram-artwork-detail/SKILL.md +53 -0
- package/templates/community/instagram-artwork-detail/source.json +9 -0
- package/templates/community/instagram-artwork-detail/template.json +61 -0
- package/templates/community/instagram-balanced-traits/README.md +12 -0
- package/templates/community/instagram-balanced-traits/SKILL.md +52 -0
- package/templates/community/instagram-balanced-traits/source.json +9 -0
- package/templates/community/instagram-balanced-traits/template.json +53 -0
- package/templates/community/instagram-behind-the-scenes/README.md +12 -0
- package/templates/community/instagram-behind-the-scenes/SKILL.md +53 -0
- package/templates/community/instagram-behind-the-scenes/source.json +9 -0
- package/templates/community/instagram-behind-the-scenes/template.json +52 -0
- package/templates/community/instagram-brand-personification/README.md +26 -0
- package/templates/community/instagram-brand-personification/SKILL.md +53 -0
- package/templates/community/instagram-brand-personification/source.json +9 -0
- package/templates/community/instagram-brand-personification/template.json +66 -0
- package/templates/community/instagram-brand-system/README.md +17 -0
- package/templates/community/instagram-brand-system/SKILL.md +53 -0
- package/templates/community/instagram-brand-system/source.json +9 -0
- package/templates/community/instagram-brand-system/template.json +60 -0
- package/templates/community/instagram-calendar-cheat-sheet/README.md +8 -0
- package/templates/community/instagram-calendar-cheat-sheet/SKILL.md +53 -0
- package/templates/community/instagram-calendar-cheat-sheet/source.json +9 -0
- package/templates/community/instagram-calendar-cheat-sheet/template.json +47 -0
- package/templates/community/instagram-capacity-planning/README.md +12 -0
- package/templates/community/instagram-capacity-planning/SKILL.md +53 -0
- package/templates/community/instagram-capacity-planning/source.json +9 -0
- package/templates/community/instagram-capacity-planning/template.json +55 -0
- package/templates/community/instagram-category-use-guide/README.md +14 -0
- package/templates/community/instagram-category-use-guide/SKILL.md +53 -0
- package/templates/community/instagram-category-use-guide/source.json +9 -0
- package/templates/community/instagram-category-use-guide/template.json +55 -0
- package/templates/community/instagram-character-led-tour/README.md +17 -0
- package/templates/community/instagram-character-led-tour/SKILL.md +53 -0
- package/templates/community/instagram-character-led-tour/source.json +9 -0
- package/templates/community/instagram-character-led-tour/template.json +56 -0
- package/templates/community/instagram-comic-dialogue/README.md +16 -0
- package/templates/community/instagram-comic-dialogue/SKILL.md +53 -0
- package/templates/community/instagram-comic-dialogue/source.json +9 -0
- package/templates/community/instagram-comic-dialogue/template.json +59 -0
- package/templates/community/instagram-command-shortcuts/README.md +13 -0
- package/templates/community/instagram-command-shortcuts/SKILL.md +53 -0
- package/templates/community/instagram-command-shortcuts/source.json +9 -0
- package/templates/community/instagram-command-shortcuts/template.json +52 -0
- package/templates/community/instagram-context-changes-meaning/README.md +11 -0
- package/templates/community/instagram-context-changes-meaning/SKILL.md +53 -0
- package/templates/community/instagram-context-changes-meaning/source.json +9 -0
- package/templates/community/instagram-context-changes-meaning/template.json +54 -0
- package/templates/community/instagram-continuous-canvas/README.md +16 -0
- package/templates/community/instagram-continuous-canvas/SKILL.md +52 -0
- package/templates/community/instagram-continuous-canvas/source.json +9 -0
- package/templates/community/instagram-continuous-canvas/template.json +59 -0
- package/templates/community/instagram-conversation-questions/README.md +12 -0
- package/templates/community/instagram-conversation-questions/SKILL.md +52 -0
- package/templates/community/instagram-conversation-questions/source.json +9 -0
- package/templates/community/instagram-conversation-questions/template.json +51 -0
- package/templates/community/instagram-copy-alternatives/README.md +11 -0
- package/templates/community/instagram-copy-alternatives/SKILL.md +53 -0
- package/templates/community/instagram-copy-alternatives/source.json +9 -0
- package/templates/community/instagram-copy-alternatives/template.json +50 -0
- package/templates/community/instagram-copyable-notes/README.md +13 -0
- package/templates/community/instagram-copyable-notes/SKILL.md +52 -0
- package/templates/community/instagram-copyable-notes/source.json +9 -0
- package/templates/community/instagram-copyable-notes/template.json +51 -0
- package/templates/community/instagram-curated-resources/README.md +13 -0
- package/templates/community/instagram-curated-resources/SKILL.md +52 -0
- package/templates/community/instagram-curated-resources/source.json +9 -0
- package/templates/community/instagram-curated-resources/template.json +54 -0
- package/templates/community/instagram-destination-costs/README.md +17 -0
- package/templates/community/instagram-destination-costs/SKILL.md +52 -0
- package/templates/community/instagram-destination-costs/source.json +9 -0
- package/templates/community/instagram-destination-costs/template.json +56 -0
- package/templates/community/instagram-diagram-reference/README.md +10 -0
- package/templates/community/instagram-diagram-reference/SKILL.md +53 -0
- package/templates/community/instagram-diagram-reference/source.json +9 -0
- package/templates/community/instagram-diagram-reference/template.json +52 -0
- package/templates/community/instagram-different-perspectives/README.md +15 -0
- package/templates/community/instagram-different-perspectives/SKILL.md +53 -0
- package/templates/community/instagram-different-perspectives/source.json +9 -0
- package/templates/community/instagram-different-perspectives/template.json +55 -0
- package/templates/community/instagram-document-reveal/README.md +8 -0
- package/templates/community/instagram-document-reveal/SKILL.md +53 -0
- package/templates/community/instagram-document-reveal/source.json +9 -0
- package/templates/community/instagram-document-reveal/template.json +46 -0
- package/templates/community/instagram-effect-breakdown/README.md +14 -0
- package/templates/community/instagram-effect-breakdown/SKILL.md +53 -0
- package/templates/community/instagram-effect-breakdown/source.json +9 -0
- package/templates/community/instagram-effect-breakdown/template.json +55 -0
- package/templates/community/instagram-effort-and-outcome/README.md +13 -0
- package/templates/community/instagram-effort-and-outcome/SKILL.md +52 -0
- package/templates/community/instagram-effort-and-outcome/source.json +9 -0
- package/templates/community/instagram-effort-and-outcome/template.json +54 -0
- package/templates/community/instagram-emotion-and-meaning/README.md +16 -0
- package/templates/community/instagram-emotion-and-meaning/SKILL.md +52 -0
- package/templates/community/instagram-emotion-and-meaning/source.json +9 -0
- package/templates/community/instagram-emotion-and-meaning/template.json +56 -0
- package/templates/community/instagram-everyday-interface-story/README.md +12 -0
- package/templates/community/instagram-everyday-interface-story/SKILL.md +53 -0
- package/templates/community/instagram-everyday-interface-story/source.json +9 -0
- package/templates/community/instagram-everyday-interface-story/template.json +51 -0
- package/templates/community/instagram-everyday-photo-diary/README.md +16 -0
- package/templates/community/instagram-everyday-photo-diary/SKILL.md +52 -0
- package/templates/community/instagram-everyday-photo-diary/source.json +9 -0
- package/templates/community/instagram-everyday-photo-diary/template.json +61 -0
- package/templates/community/instagram-evidence-to-method/README.md +13 -0
- package/templates/community/instagram-evidence-to-method/SKILL.md +53 -0
- package/templates/community/instagram-evidence-to-method/source.json +9 -0
- package/templates/community/instagram-evidence-to-method/template.json +56 -0
- package/templates/community/instagram-expectation-reality-review/README.md +18 -0
- package/templates/community/instagram-expectation-reality-review/SKILL.md +53 -0
- package/templates/community/instagram-expectation-reality-review/source.json +9 -0
- package/templates/community/instagram-expectation-reality-review/template.json +57 -0
- package/templates/community/instagram-experiment-story/README.md +20 -0
- package/templates/community/instagram-experiment-story/SKILL.md +54 -0
- package/templates/community/instagram-experiment-story/source.json +9 -0
- package/templates/community/instagram-experiment-story/template.json +58 -0
- package/templates/community/instagram-fill-in-speech/README.md +14 -0
- package/templates/community/instagram-fill-in-speech/SKILL.md +53 -0
- package/templates/community/instagram-fill-in-speech/source.json +9 -0
- package/templates/community/instagram-fill-in-speech/template.json +53 -0
- package/templates/community/instagram-fill-in-workbook/README.md +16 -0
- package/templates/community/instagram-fill-in-workbook/SKILL.md +53 -0
- package/templates/community/instagram-fill-in-workbook/source.json +9 -0
- package/templates/community/instagram-fill-in-workbook/template.json +57 -0
- package/templates/community/instagram-font-pairing/README.md +14 -0
- package/templates/community/instagram-font-pairing/SKILL.md +52 -0
- package/templates/community/instagram-font-pairing/source.json +9 -0
- package/templates/community/instagram-font-pairing/template.json +53 -0
- package/templates/community/instagram-goal-benchmarks/README.md +12 -0
- package/templates/community/instagram-goal-benchmarks/SKILL.md +53 -0
- package/templates/community/instagram-goal-benchmarks/source.json +9 -0
- package/templates/community/instagram-goal-benchmarks/template.json +51 -0
- package/templates/community/instagram-identity-match/README.md +19 -0
- package/templates/community/instagram-identity-match/SKILL.md +52 -0
- package/templates/community/instagram-identity-match/source.json +9 -0
- package/templates/community/instagram-identity-match/template.json +64 -0
- package/templates/community/instagram-illustrated-opinion/README.md +16 -0
- package/templates/community/instagram-illustrated-opinion/SKILL.md +52 -0
- package/templates/community/instagram-illustrated-opinion/source.json +9 -0
- package/templates/community/instagram-illustrated-opinion/template.json +56 -0
- package/templates/community/instagram-illustrated-story-explainer/README.md +14 -0
- package/templates/community/instagram-illustrated-story-explainer/SKILL.md +53 -0
- package/templates/community/instagram-illustrated-story-explainer/source.json +9 -0
- package/templates/community/instagram-illustrated-story-explainer/template.json +55 -0
- package/templates/community/instagram-image-to-palette/README.md +17 -0
- package/templates/community/instagram-image-to-palette/SKILL.md +53 -0
- package/templates/community/instagram-image-to-palette/source.json +9 -0
- package/templates/community/instagram-image-to-palette/template.json +58 -0
- package/templates/community/instagram-incremental-assembly/README.md +15 -0
- package/templates/community/instagram-incremental-assembly/SKILL.md +52 -0
- package/templates/community/instagram-incremental-assembly/source.json +9 -0
- package/templates/community/instagram-incremental-assembly/template.json +55 -0
- package/templates/community/instagram-interview-storyboard/README.md +25 -0
- package/templates/community/instagram-interview-storyboard/SKILL.md +53 -0
- package/templates/community/instagram-interview-storyboard/source.json +9 -0
- package/templates/community/instagram-interview-storyboard/template.json +65 -0
- package/templates/community/instagram-launch-news/README.md +9 -0
- package/templates/community/instagram-launch-news/SKILL.md +53 -0
- package/templates/community/instagram-launch-news/source.json +9 -0
- package/templates/community/instagram-launch-news/template.json +55 -0
- package/templates/community/instagram-layout-anatomy/README.md +12 -0
- package/templates/community/instagram-layout-anatomy/SKILL.md +53 -0
- package/templates/community/instagram-layout-anatomy/source.json +9 -0
- package/templates/community/instagram-layout-anatomy/template.json +54 -0
- package/templates/community/instagram-learning-path/README.md +14 -0
- package/templates/community/instagram-learning-path/SKILL.md +53 -0
- package/templates/community/instagram-learning-path/source.json +9 -0
- package/templates/community/instagram-learning-path/template.json +55 -0
- package/templates/community/instagram-local-picks/README.md +16 -0
- package/templates/community/instagram-local-picks/SKILL.md +52 -0
- package/templates/community/instagram-local-picks/source.json +9 -0
- package/templates/community/instagram-local-picks/template.json +55 -0
- package/templates/community/instagram-matched-test/README.md +10 -0
- package/templates/community/instagram-matched-test/SKILL.md +53 -0
- package/templates/community/instagram-matched-test/source.json +9 -0
- package/templates/community/instagram-matched-test/template.json +49 -0
- package/templates/community/instagram-metric-formulas/README.md +15 -0
- package/templates/community/instagram-metric-formulas/SKILL.md +53 -0
- package/templates/community/instagram-metric-formulas/source.json +9 -0
- package/templates/community/instagram-metric-formulas/template.json +55 -0
- package/templates/community/instagram-milestones-and-feelings/README.md +13 -0
- package/templates/community/instagram-milestones-and-feelings/SKILL.md +52 -0
- package/templates/community/instagram-milestones-and-feelings/source.json +9 -0
- package/templates/community/instagram-milestones-and-feelings/template.json +56 -0
- package/templates/community/instagram-mistakes-and-alternatives/README.md +12 -0
- package/templates/community/instagram-mistakes-and-alternatives/SKILL.md +52 -0
- package/templates/community/instagram-mistakes-and-alternatives/source.json +9 -0
- package/templates/community/instagram-mistakes-and-alternatives/template.json +53 -0
- package/templates/community/instagram-myth-and-fact/README.md +12 -0
- package/templates/community/instagram-myth-and-fact/SKILL.md +53 -0
- package/templates/community/instagram-myth-and-fact/source.json +9 -0
- package/templates/community/instagram-myth-and-fact/template.json +51 -0
- package/templates/community/instagram-news-digest/README.md +13 -0
- package/templates/community/instagram-news-digest/SKILL.md +53 -0
- package/templates/community/instagram-news-digest/source.json +9 -0
- package/templates/community/instagram-news-digest/template.json +52 -0
- package/templates/community/instagram-numbers-at-human-scale/README.md +12 -0
- package/templates/community/instagram-numbers-at-human-scale/SKILL.md +53 -0
- package/templates/community/instagram-numbers-at-human-scale/source.json +9 -0
- package/templates/community/instagram-numbers-at-human-scale/template.json +52 -0
- package/templates/community/instagram-object-led-activities/README.md +16 -0
- package/templates/community/instagram-object-led-activities/SKILL.md +53 -0
- package/templates/community/instagram-object-led-activities/source.json +9 -0
- package/templates/community/instagram-object-led-activities/template.json +56 -0
- package/templates/community/instagram-object-name-origins/README.md +11 -0
- package/templates/community/instagram-object-name-origins/SKILL.md +52 -0
- package/templates/community/instagram-object-name-origins/source.json +9 -0
- package/templates/community/instagram-object-name-origins/template.json +52 -0
- package/templates/community/instagram-one-input-many-results/README.md +14 -0
- package/templates/community/instagram-one-input-many-results/SKILL.md +53 -0
- package/templates/community/instagram-one-input-many-results/source.json +9 -0
- package/templates/community/instagram-one-input-many-results/template.json +52 -0
- package/templates/community/instagram-one-variable-comparison/README.md +11 -0
- package/templates/community/instagram-one-variable-comparison/SKILL.md +53 -0
- package/templates/community/instagram-one-variable-comparison/source.json +9 -0
- package/templates/community/instagram-one-variable-comparison/template.json +52 -0
- package/templates/community/instagram-opportunity-guide/README.md +18 -0
- package/templates/community/instagram-opportunity-guide/SKILL.md +53 -0
- package/templates/community/instagram-opportunity-guide/source.json +9 -0
- package/templates/community/instagram-opportunity-guide/template.json +57 -0
- package/templates/community/instagram-palette-application-board/README.md +11 -0
- package/templates/community/instagram-palette-application-board/SKILL.md +52 -0
- package/templates/community/instagram-palette-application-board/source.json +9 -0
- package/templates/community/instagram-palette-application-board/template.json +52 -0
- package/templates/community/instagram-personal-budget-case/README.md +14 -0
- package/templates/community/instagram-personal-budget-case/SKILL.md +53 -0
- package/templates/community/instagram-personal-budget-case/source.json +9 -0
- package/templates/community/instagram-personal-budget-case/template.json +53 -0
- package/templates/community/instagram-personal-experiment/README.md +11 -0
- package/templates/community/instagram-personal-experiment/SKILL.md +53 -0
- package/templates/community/instagram-personal-experiment/source.json +9 -0
- package/templates/community/instagram-personal-experiment/template.json +52 -0
- package/templates/community/instagram-photo-and-technical-sketch/README.md +10 -0
- package/templates/community/instagram-photo-and-technical-sketch/SKILL.md +53 -0
- package/templates/community/instagram-photo-and-technical-sketch/source.json +9 -0
- package/templates/community/instagram-photo-and-technical-sketch/template.json +49 -0
- package/templates/community/instagram-photo-moment-story/README.md +12 -0
- package/templates/community/instagram-photo-moment-story/SKILL.md +53 -0
- package/templates/community/instagram-photo-moment-story/source.json +9 -0
- package/templates/community/instagram-photo-moment-story/template.json +53 -0
- package/templates/community/instagram-product-change/README.md +9 -0
- package/templates/community/instagram-product-change/SKILL.md +53 -0
- package/templates/community/instagram-product-change/source.json +10 -0
- package/templates/community/instagram-product-change/template.json +53 -0
- package/templates/community/instagram-prompt-result-reference/README.md +26 -0
- package/templates/community/instagram-prompt-result-reference/SKILL.md +53 -0
- package/templates/community/instagram-prompt-result-reference/source.json +9 -0
- package/templates/community/instagram-prompt-result-reference/template.json +68 -0
- package/templates/community/instagram-public-follow-up/README.md +15 -0
- package/templates/community/instagram-public-follow-up/SKILL.md +53 -0
- package/templates/community/instagram-public-follow-up/source.json +9 -0
- package/templates/community/instagram-public-follow-up/template.json +54 -0
- package/templates/community/instagram-reader-question-answer/README.md +10 -0
- package/templates/community/instagram-reader-question-answer/SKILL.md +53 -0
- package/templates/community/instagram-reader-question-answer/source.json +9 -0
- package/templates/community/instagram-reader-question-answer/template.json +48 -0
- package/templates/community/instagram-remaining-capacity/README.md +11 -0
- package/templates/community/instagram-remaining-capacity/SKILL.md +52 -0
- package/templates/community/instagram-remaining-capacity/source.json +9 -0
- package/templates/community/instagram-remaining-capacity/template.json +52 -0
- package/templates/community/instagram-research-brief/README.md +16 -0
- package/templates/community/instagram-research-brief/SKILL.md +53 -0
- package/templates/community/instagram-research-brief/source.json +9 -0
- package/templates/community/instagram-research-brief/template.json +54 -0
- package/templates/community/instagram-result-and-recipe/README.md +17 -0
- package/templates/community/instagram-result-and-recipe/SKILL.md +53 -0
- package/templates/community/instagram-result-and-recipe/source.json +9 -0
- package/templates/community/instagram-result-and-recipe/template.json +56 -0
- package/templates/community/instagram-result-to-steps/README.md +13 -0
- package/templates/community/instagram-result-to-steps/SKILL.md +53 -0
- package/templates/community/instagram-result-to-steps/source.json +9 -0
- package/templates/community/instagram-result-to-steps/template.json +51 -0
- package/templates/community/instagram-reverse-instruction/README.md +15 -0
- package/templates/community/instagram-reverse-instruction/SKILL.md +53 -0
- package/templates/community/instagram-reverse-instruction/source.json +9 -0
- package/templates/community/instagram-reverse-instruction/template.json +54 -0
- package/templates/community/instagram-said-and-meant/README.md +9 -0
- package/templates/community/instagram-said-and-meant/SKILL.md +52 -0
- package/templates/community/instagram-said-and-meant/source.json +10 -0
- package/templates/community/instagram-said-and-meant/template.json +46 -0
- package/templates/community/instagram-same-budget-choices/README.md +12 -0
- package/templates/community/instagram-same-budget-choices/SKILL.md +53 -0
- package/templates/community/instagram-same-budget-choices/source.json +9 -0
- package/templates/community/instagram-same-budget-choices/template.json +52 -0
- package/templates/community/instagram-screenshot-walkthrough/README.md +12 -0
- package/templates/community/instagram-screenshot-walkthrough/SKILL.md +53 -0
- package/templates/community/instagram-screenshot-walkthrough/source.json +9 -0
- package/templates/community/instagram-screenshot-walkthrough/template.json +58 -0
- package/templates/community/instagram-searchable-asset-index/README.md +13 -0
- package/templates/community/instagram-searchable-asset-index/SKILL.md +52 -0
- package/templates/community/instagram-searchable-asset-index/source.json +9 -0
- package/templates/community/instagram-searchable-asset-index/template.json +53 -0
- package/templates/community/instagram-similar-concepts/README.md +15 -0
- package/templates/community/instagram-similar-concepts/SKILL.md +52 -0
- package/templates/community/instagram-similar-concepts/source.json +9 -0
- package/templates/community/instagram-similar-concepts/template.json +54 -0
- package/templates/community/instagram-single-event-news/README.md +14 -0
- package/templates/community/instagram-single-event-news/SKILL.md +53 -0
- package/templates/community/instagram-single-event-news/source.json +9 -0
- package/templates/community/instagram-single-event-news/template.json +56 -0
- package/templates/community/instagram-style-assembly/README.md +13 -0
- package/templates/community/instagram-style-assembly/SKILL.md +53 -0
- package/templates/community/instagram-style-assembly/source.json +9 -0
- package/templates/community/instagram-style-assembly/template.json +53 -0
- package/templates/community/instagram-style-choice/README.md +14 -0
- package/templates/community/instagram-style-choice/SKILL.md +53 -0
- package/templates/community/instagram-style-choice/source.json +9 -0
- package/templates/community/instagram-style-choice/template.json +58 -0
- package/templates/community/instagram-symbolism-in-artifact/README.md +9 -0
- package/templates/community/instagram-symbolism-in-artifact/SKILL.md +52 -0
- package/templates/community/instagram-symbolism-in-artifact/source.json +9 -0
- package/templates/community/instagram-symbolism-in-artifact/template.json +47 -0
- package/templates/community/instagram-taste-matched-recommendations/README.md +17 -0
- package/templates/community/instagram-taste-matched-recommendations/SKILL.md +52 -0
- package/templates/community/instagram-taste-matched-recommendations/source.json +9 -0
- package/templates/community/instagram-taste-matched-recommendations/template.json +56 -0
- package/templates/community/instagram-then-now-pairs/README.md +14 -0
- package/templates/community/instagram-then-now-pairs/SKILL.md +52 -0
- package/templates/community/instagram-then-now-pairs/source.json +9 -0
- package/templates/community/instagram-then-now-pairs/template.json +52 -0
- package/templates/community/instagram-timed-action-plan/README.md +15 -0
- package/templates/community/instagram-timed-action-plan/SKILL.md +53 -0
- package/templates/community/instagram-timed-action-plan/source.json +9 -0
- package/templates/community/instagram-timed-action-plan/template.json +60 -0
- package/templates/community/instagram-tools-by-task/README.md +13 -0
- package/templates/community/instagram-tools-by-task/SKILL.md +53 -0
- package/templates/community/instagram-tools-by-task/source.json +9 -0
- package/templates/community/instagram-tools-by-task/template.json +57 -0
- package/templates/community/instagram-two-perspectives/README.md +8 -0
- package/templates/community/instagram-two-perspectives/SKILL.md +52 -0
- package/templates/community/instagram-two-perspectives/source.json +9 -0
- package/templates/community/instagram-two-perspectives/template.json +47 -0
- package/templates/community/instagram-two-views-one-dataset/README.md +8 -0
- package/templates/community/instagram-two-views-one-dataset/SKILL.md +53 -0
- package/templates/community/instagram-two-views-one-dataset/source.json +9 -0
- package/templates/community/instagram-two-views-one-dataset/template.json +51 -0
- package/templates/community/instagram-version-change-audit/README.md +10 -0
- package/templates/community/instagram-version-change-audit/SKILL.md +53 -0
- package/templates/community/instagram-version-change-audit/source.json +9 -0
- package/templates/community/instagram-version-change-audit/template.json +51 -0
- package/templates/community/instagram-visual-analogy/README.md +13 -0
- package/templates/community/instagram-visual-analogy/SKILL.md +53 -0
- package/templates/community/instagram-visual-analogy/source.json +9 -0
- package/templates/community/instagram-visual-analogy/template.json +53 -0
- package/templates/community/instagram-visual-guess/README.md +15 -0
- package/templates/community/instagram-visual-guess/SKILL.md +53 -0
- package/templates/community/instagram-visual-guess/source.json +9 -0
- package/templates/community/instagram-visual-guess/template.json +54 -0
- package/templates/community/instagram-visual-technique-reference/README.md +18 -0
- package/templates/community/instagram-visual-technique-reference/SKILL.md +53 -0
- package/templates/community/instagram-visual-technique-reference/source.json +9 -0
- package/templates/community/instagram-visual-technique-reference/template.json +60 -0
- package/templates/community/instagram-worked-examples/README.md +13 -0
- package/templates/community/instagram-worked-examples/SKILL.md +52 -0
- package/templates/community/instagram-worked-examples/source.json +9 -0
- package/templates/community/instagram-worked-examples/template.json +57 -0
|
@@ -0,0 +1,2054 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<!--
|
|
3
|
+
Adapted from HyperFrames (https://github.com/heygen-com/hyperframes), registry/blocks/vfx-liquid-glass, commit a8332860c396e9224d42b7ea2a9cc8f42918c961.
|
|
4
|
+
Copyright 2026 HeyGen, Inc. Licensed under the Apache License, Version 2.0; the licence text is in the popost
|
|
5
|
+
Skill's THIRD_PARTY_NOTICES. Changed for the popost Skill (tools/video/port-hyperframes.mjs): its comments removed; its fonts drawn by roles of the Skill's font library, linked from the project (../css/<role>.css); three.js addons (shaders/CopyShader, shaders/LuminosityHighPassShader, postprocessing/EffectComposer, postprocessing/ShaderPass, postprocessing/Pass, postprocessing/MaskPass, postprocessing/RenderPass, postprocessing/UnrealBloomPass) put into the page from three.js r147 (MIT); HTML drawn into a canvas (the experimental drawElementImage) from a picture of the element taken when the page has loaded, where the browser has no such API; its deferred calls (setTimeout) run when the page has loaded, before the first frame; GSAP loaded from the project (../lib/gsap.min.js) instead of a CDN; the 1920x1080 composition scaled into the scene's canvas (parameter "fit"); HyperFrames variables declared as parameters; its root-level clips laid out as HyperFrames lays them out; its clips shown and hidden from the scene's time; sound cues derived from its tweens.
|
|
6
|
+
-->
|
|
7
|
+
<html lang="en">
|
|
8
|
+
<head>
|
|
9
|
+
<script>
|
|
10
|
+
/* popost: deferred calls (setTimeout) run in order when the page has loaded, before the first frame. */
|
|
11
|
+
(function () {
|
|
12
|
+
var queue = [], n = 0, done = false;
|
|
13
|
+
var flush = function () { for (var k = 0; queue.length && k < 100000; k++) { var c = queue.shift(); if (!c.cancelled) c.f.apply(null, c.args); } };
|
|
14
|
+
window.__popostLater = function (f, ms) { var c = { f: typeof f === 'function' ? f : function () {}, args: Array.prototype.slice.call(arguments, 2), id: ++n }; queue.push(c); if (done) flush(); return c.id; };
|
|
15
|
+
window.__popostCancel = function (id) { queue.forEach(function (c) { if (c.id === id) c.cancelled = true; }); };
|
|
16
|
+
window.addEventListener('load', function () { done = true; flush(); });
|
|
17
|
+
})();
|
|
18
|
+
</script>
|
|
19
|
+
<script>
|
|
20
|
+
/* popost: HTML drawn into a canvas from a picture of the element taken when the page has loaded. */
|
|
21
|
+
(function () {
|
|
22
|
+
var C2 = window.CanvasRenderingContext2D && CanvasRenderingContext2D.prototype;
|
|
23
|
+
if (!C2 || typeof C2.drawElementImage === 'function') return;
|
|
24
|
+
if (!('layoutSubtree' in HTMLCanvasElement.prototype)) Object.defineProperty(HTMLCanvasElement.prototype, 'layoutSubtree', { configurable: true, get: function () { return this.hasAttribute('layoutsubtree'); }, set: function (v) { if (v) this.setAttribute('layoutsubtree', ''); else this.removeAttribute('layoutsubtree'); } });
|
|
25
|
+
var shots = new Map();
|
|
26
|
+
var inline = function (from, to) {
|
|
27
|
+
var cs = getComputedStyle(from), out = '';
|
|
28
|
+
for (var i = 0; i < cs.length; i++) out += cs[i] + ':' + cs.getPropertyValue(cs[i]) + ';';
|
|
29
|
+
to.setAttribute('style', out);
|
|
30
|
+
for (var k = 0; k < from.children.length; k++) inline(from.children[k], to.children[k]);
|
|
31
|
+
};
|
|
32
|
+
var picture = function (el) {
|
|
33
|
+
var c = el.closest('canvas'), w = (c && c.width) || 1920, h = (c && c.height) || 1080;
|
|
34
|
+
var clone = el.cloneNode(true);
|
|
35
|
+
inline(el, clone);
|
|
36
|
+
clone.style.position = 'absolute'; clone.style.left = '0px'; clone.style.top = '0px'; clone.style.visibility = 'visible';
|
|
37
|
+
var xml = new XMLSerializer().serializeToString(clone);
|
|
38
|
+
var svg = '<svg xmlns="http://www.w3.org/2000/svg" width="' + w + '" height="' + h + '"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="position:relative;width:' + w + 'px;height:' + h + 'px;overflow:hidden">' + xml + '</div></foreignObject></svg>';
|
|
39
|
+
var img = new Image(w, h);
|
|
40
|
+
img.alt = '';
|
|
41
|
+
img.style.cssText = 'position:absolute;left:-99999px;top:0;width:1px;height:1px;opacity:0;pointer-events:none';
|
|
42
|
+
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
|
|
43
|
+
document.body.appendChild(img);
|
|
44
|
+
return img;
|
|
45
|
+
};
|
|
46
|
+
var shotOf = function (el) { if (!shots.has(el)) shots.set(el, picture(el)); return shots.get(el); };
|
|
47
|
+
var take = function () { document.querySelectorAll('canvas[layoutsubtree] > *').forEach(shotOf); };
|
|
48
|
+
window.addEventListener('DOMContentLoaded', take);
|
|
49
|
+
var when = function (img, draw) { if (img.complete && img.naturalWidth) draw(); else img.decode().then(draw, function () {}); };
|
|
50
|
+
C2.drawElementImage = function (el, x, y, w, h) {
|
|
51
|
+
var ctx = this, img = shotOf(el);
|
|
52
|
+
when(img, function () { ctx.drawImage(img, x || 0, y || 0, w || img.naturalWidth, h || img.naturalHeight); });
|
|
53
|
+
};
|
|
54
|
+
var GL = window.WebGL2RenderingContext && WebGL2RenderingContext.prototype;
|
|
55
|
+
if (GL) GL.texElementImage2D = function (target, level, ifmt, fmt, type, el) {
|
|
56
|
+
var gl = this, img = shotOf(el), tex = gl.getParameter(target === gl.TEXTURE_CUBE_MAP ? gl.TEXTURE_BINDING_CUBE_MAP : gl.TEXTURE_BINDING_2D);
|
|
57
|
+
when(img, function () { var was = gl.getParameter(gl.TEXTURE_BINDING_2D); gl.bindTexture(gl.TEXTURE_2D, tex); gl.texImage2D(target, level, ifmt, fmt, type, img); gl.bindTexture(gl.TEXTURE_2D, was); });
|
|
58
|
+
};
|
|
59
|
+
HTMLCanvasElement.prototype.requestPaint = function () {
|
|
60
|
+
var c = this, imgs = Array.prototype.map.call(c.children, shotOf);
|
|
61
|
+
Promise.all(imgs.map(function (i) { return i.decode().catch(function () {}); })).then(function () { var e = new Event('paint'); if (typeof c.onpaint === 'function') c.onpaint(e); c.dispatchEvent(e); });
|
|
62
|
+
};
|
|
63
|
+
})();
|
|
64
|
+
</script>
|
|
65
|
+
<meta charset="utf-8" />
|
|
66
|
+
<meta name="viewport" content="width=1920, height=1080" />
|
|
67
|
+
<title>Liquid Glass Parallax</title>
|
|
68
|
+
|
|
69
|
+
<script src="../lib/gsap.min.js"></script>
|
|
70
|
+
<script src="../lib/three.min.js"></script>
|
|
71
|
+
<script>
|
|
72
|
+
( function () {
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Full-screen textured quad shader
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
const CopyShader = {
|
|
79
|
+
uniforms: {
|
|
80
|
+
'tDiffuse': {
|
|
81
|
+
value: null
|
|
82
|
+
},
|
|
83
|
+
'opacity': {
|
|
84
|
+
value: 1.0
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
vertexShader: /* glsl */`
|
|
88
|
+
|
|
89
|
+
varying vec2 vUv;
|
|
90
|
+
|
|
91
|
+
void main() {
|
|
92
|
+
|
|
93
|
+
vUv = uv;
|
|
94
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
95
|
+
|
|
96
|
+
}`,
|
|
97
|
+
fragmentShader: /* glsl */`
|
|
98
|
+
|
|
99
|
+
uniform float opacity;
|
|
100
|
+
|
|
101
|
+
uniform sampler2D tDiffuse;
|
|
102
|
+
|
|
103
|
+
varying vec2 vUv;
|
|
104
|
+
|
|
105
|
+
void main() {
|
|
106
|
+
|
|
107
|
+
gl_FragColor = texture2D( tDiffuse, vUv );
|
|
108
|
+
gl_FragColor.a *= opacity;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
}`
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
THREE.CopyShader = CopyShader;
|
|
115
|
+
|
|
116
|
+
} )();
|
|
117
|
+
|
|
118
|
+
</script>
|
|
119
|
+
<script>
|
|
120
|
+
( function () {
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Luminosity
|
|
124
|
+
* http://en.wikipedia.org/wiki/Luminosity
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
const LuminosityHighPassShader = {
|
|
128
|
+
shaderID: 'luminosityHighPass',
|
|
129
|
+
uniforms: {
|
|
130
|
+
'tDiffuse': {
|
|
131
|
+
value: null
|
|
132
|
+
},
|
|
133
|
+
'luminosityThreshold': {
|
|
134
|
+
value: 1.0
|
|
135
|
+
},
|
|
136
|
+
'smoothWidth': {
|
|
137
|
+
value: 1.0
|
|
138
|
+
},
|
|
139
|
+
'defaultColor': {
|
|
140
|
+
value: new THREE.Color( 0x000000 )
|
|
141
|
+
},
|
|
142
|
+
'defaultOpacity': {
|
|
143
|
+
value: 0.0
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
vertexShader: /* glsl */`
|
|
147
|
+
|
|
148
|
+
varying vec2 vUv;
|
|
149
|
+
|
|
150
|
+
void main() {
|
|
151
|
+
|
|
152
|
+
vUv = uv;
|
|
153
|
+
|
|
154
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
155
|
+
|
|
156
|
+
}`,
|
|
157
|
+
fragmentShader: /* glsl */`
|
|
158
|
+
|
|
159
|
+
uniform sampler2D tDiffuse;
|
|
160
|
+
uniform vec3 defaultColor;
|
|
161
|
+
uniform float defaultOpacity;
|
|
162
|
+
uniform float luminosityThreshold;
|
|
163
|
+
uniform float smoothWidth;
|
|
164
|
+
|
|
165
|
+
varying vec2 vUv;
|
|
166
|
+
|
|
167
|
+
void main() {
|
|
168
|
+
|
|
169
|
+
vec4 texel = texture2D( tDiffuse, vUv );
|
|
170
|
+
|
|
171
|
+
vec3 luma = vec3( 0.299, 0.587, 0.114 );
|
|
172
|
+
|
|
173
|
+
float v = dot( texel.xyz, luma );
|
|
174
|
+
|
|
175
|
+
vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );
|
|
176
|
+
|
|
177
|
+
float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );
|
|
178
|
+
|
|
179
|
+
gl_FragColor = mix( outputColor, texel, alpha );
|
|
180
|
+
|
|
181
|
+
}`
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
THREE.LuminosityHighPassShader = LuminosityHighPassShader;
|
|
185
|
+
|
|
186
|
+
} )();
|
|
187
|
+
|
|
188
|
+
</script>
|
|
189
|
+
<script>
|
|
190
|
+
( function () {
|
|
191
|
+
|
|
192
|
+
class Pass {
|
|
193
|
+
|
|
194
|
+
constructor() {
|
|
195
|
+
|
|
196
|
+
// if set to true, the pass is processed by the composer
|
|
197
|
+
this.enabled = true;
|
|
198
|
+
|
|
199
|
+
// if set to true, the pass indicates to swap read and write buffer after rendering
|
|
200
|
+
this.needsSwap = true;
|
|
201
|
+
|
|
202
|
+
// if set to true, the pass clears its buffer before rendering
|
|
203
|
+
this.clear = false;
|
|
204
|
+
|
|
205
|
+
// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.
|
|
206
|
+
this.renderToScreen = false;
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
setSize() {}
|
|
210
|
+
render() {
|
|
211
|
+
|
|
212
|
+
console.error( 'THREE.Pass: .render() must be implemented in derived pass.' );
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
dispose() {}
|
|
216
|
+
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Helper for passes that need to fill the viewport with a single quad.
|
|
220
|
+
|
|
221
|
+
const _camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
|
|
222
|
+
|
|
223
|
+
// https://github.com/mrdoob/three.js/pull/21358
|
|
224
|
+
|
|
225
|
+
const _geometry = new THREE.BufferGeometry();
|
|
226
|
+
_geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );
|
|
227
|
+
_geometry.setAttribute( 'uv', new THREE.Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );
|
|
228
|
+
class FullScreenQuad {
|
|
229
|
+
|
|
230
|
+
constructor( material ) {
|
|
231
|
+
|
|
232
|
+
this._mesh = new THREE.Mesh( _geometry, material );
|
|
233
|
+
|
|
234
|
+
}
|
|
235
|
+
dispose() {
|
|
236
|
+
|
|
237
|
+
this._mesh.geometry.dispose();
|
|
238
|
+
|
|
239
|
+
}
|
|
240
|
+
render( renderer ) {
|
|
241
|
+
|
|
242
|
+
renderer.render( this._mesh, _camera );
|
|
243
|
+
|
|
244
|
+
}
|
|
245
|
+
get material() {
|
|
246
|
+
|
|
247
|
+
return this._mesh.material;
|
|
248
|
+
|
|
249
|
+
}
|
|
250
|
+
set material( value ) {
|
|
251
|
+
|
|
252
|
+
this._mesh.material = value;
|
|
253
|
+
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
THREE.FullScreenQuad = FullScreenQuad;
|
|
259
|
+
THREE.Pass = Pass;
|
|
260
|
+
|
|
261
|
+
} )();
|
|
262
|
+
|
|
263
|
+
</script><script>
|
|
264
|
+
( function () {
|
|
265
|
+
|
|
266
|
+
class ShaderPass extends THREE.Pass {
|
|
267
|
+
|
|
268
|
+
constructor( shader, textureID ) {
|
|
269
|
+
|
|
270
|
+
super();
|
|
271
|
+
this.textureID = textureID !== undefined ? textureID : 'tDiffuse';
|
|
272
|
+
if ( shader instanceof THREE.ShaderMaterial ) {
|
|
273
|
+
|
|
274
|
+
this.uniforms = shader.uniforms;
|
|
275
|
+
this.material = shader;
|
|
276
|
+
|
|
277
|
+
} else if ( shader ) {
|
|
278
|
+
|
|
279
|
+
this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );
|
|
280
|
+
this.material = new THREE.ShaderMaterial( {
|
|
281
|
+
defines: Object.assign( {}, shader.defines ),
|
|
282
|
+
uniforms: this.uniforms,
|
|
283
|
+
vertexShader: shader.vertexShader,
|
|
284
|
+
fragmentShader: shader.fragmentShader
|
|
285
|
+
} );
|
|
286
|
+
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
this.fsQuad = new THREE.FullScreenQuad( this.material );
|
|
290
|
+
|
|
291
|
+
}
|
|
292
|
+
render( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {
|
|
293
|
+
|
|
294
|
+
if ( this.uniforms[ this.textureID ] ) {
|
|
295
|
+
|
|
296
|
+
this.uniforms[ this.textureID ].value = readBuffer.texture;
|
|
297
|
+
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
this.fsQuad.material = this.material;
|
|
301
|
+
if ( this.renderToScreen ) {
|
|
302
|
+
|
|
303
|
+
renderer.setRenderTarget( null );
|
|
304
|
+
this.fsQuad.render( renderer );
|
|
305
|
+
|
|
306
|
+
} else {
|
|
307
|
+
|
|
308
|
+
renderer.setRenderTarget( writeBuffer );
|
|
309
|
+
// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600
|
|
310
|
+
if ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );
|
|
311
|
+
this.fsQuad.render( renderer );
|
|
312
|
+
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
}
|
|
316
|
+
dispose() {
|
|
317
|
+
|
|
318
|
+
this.material.dispose();
|
|
319
|
+
this.fsQuad.dispose();
|
|
320
|
+
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
THREE.ShaderPass = ShaderPass;
|
|
326
|
+
|
|
327
|
+
} )();
|
|
328
|
+
|
|
329
|
+
</script><script>
|
|
330
|
+
( function () {
|
|
331
|
+
|
|
332
|
+
class MaskPass extends THREE.Pass {
|
|
333
|
+
|
|
334
|
+
constructor( scene, camera ) {
|
|
335
|
+
|
|
336
|
+
super();
|
|
337
|
+
this.scene = scene;
|
|
338
|
+
this.camera = camera;
|
|
339
|
+
this.clear = true;
|
|
340
|
+
this.needsSwap = false;
|
|
341
|
+
this.inverse = false;
|
|
342
|
+
|
|
343
|
+
}
|
|
344
|
+
render( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {
|
|
345
|
+
|
|
346
|
+
const context = renderer.getContext();
|
|
347
|
+
const state = renderer.state;
|
|
348
|
+
|
|
349
|
+
// don't update color or depth
|
|
350
|
+
|
|
351
|
+
state.buffers.color.setMask( false );
|
|
352
|
+
state.buffers.depth.setMask( false );
|
|
353
|
+
|
|
354
|
+
// lock buffers
|
|
355
|
+
|
|
356
|
+
state.buffers.color.setLocked( true );
|
|
357
|
+
state.buffers.depth.setLocked( true );
|
|
358
|
+
|
|
359
|
+
// set up stencil
|
|
360
|
+
|
|
361
|
+
let writeValue, clearValue;
|
|
362
|
+
if ( this.inverse ) {
|
|
363
|
+
|
|
364
|
+
writeValue = 0;
|
|
365
|
+
clearValue = 1;
|
|
366
|
+
|
|
367
|
+
} else {
|
|
368
|
+
|
|
369
|
+
writeValue = 1;
|
|
370
|
+
clearValue = 0;
|
|
371
|
+
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
state.buffers.stencil.setTest( true );
|
|
375
|
+
state.buffers.stencil.setOp( context.REPLACE, context.REPLACE, context.REPLACE );
|
|
376
|
+
state.buffers.stencil.setFunc( context.ALWAYS, writeValue, 0xffffffff );
|
|
377
|
+
state.buffers.stencil.setClear( clearValue );
|
|
378
|
+
state.buffers.stencil.setLocked( true );
|
|
379
|
+
|
|
380
|
+
// draw into the stencil buffer
|
|
381
|
+
|
|
382
|
+
renderer.setRenderTarget( readBuffer );
|
|
383
|
+
if ( this.clear ) renderer.clear();
|
|
384
|
+
renderer.render( this.scene, this.camera );
|
|
385
|
+
renderer.setRenderTarget( writeBuffer );
|
|
386
|
+
if ( this.clear ) renderer.clear();
|
|
387
|
+
renderer.render( this.scene, this.camera );
|
|
388
|
+
|
|
389
|
+
// unlock color and depth buffer for subsequent rendering
|
|
390
|
+
|
|
391
|
+
state.buffers.color.setLocked( false );
|
|
392
|
+
state.buffers.depth.setLocked( false );
|
|
393
|
+
|
|
394
|
+
// only render where stencil is set to 1
|
|
395
|
+
|
|
396
|
+
state.buffers.stencil.setLocked( false );
|
|
397
|
+
state.buffers.stencil.setFunc( context.EQUAL, 1, 0xffffffff ); // draw if == 1
|
|
398
|
+
state.buffers.stencil.setOp( context.KEEP, context.KEEP, context.KEEP );
|
|
399
|
+
state.buffers.stencil.setLocked( true );
|
|
400
|
+
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
}
|
|
404
|
+
class ClearMaskPass extends THREE.Pass {
|
|
405
|
+
|
|
406
|
+
constructor() {
|
|
407
|
+
|
|
408
|
+
super();
|
|
409
|
+
this.needsSwap = false;
|
|
410
|
+
|
|
411
|
+
}
|
|
412
|
+
render( renderer /*, writeBuffer, readBuffer, deltaTime, maskActive */ ) {
|
|
413
|
+
|
|
414
|
+
renderer.state.buffers.stencil.setLocked( false );
|
|
415
|
+
renderer.state.buffers.stencil.setTest( false );
|
|
416
|
+
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
THREE.ClearMaskPass = ClearMaskPass;
|
|
422
|
+
THREE.MaskPass = MaskPass;
|
|
423
|
+
|
|
424
|
+
} )();
|
|
425
|
+
|
|
426
|
+
</script><script>
|
|
427
|
+
( function () {
|
|
428
|
+
|
|
429
|
+
class EffectComposer {
|
|
430
|
+
|
|
431
|
+
constructor( renderer, renderTarget ) {
|
|
432
|
+
|
|
433
|
+
this.renderer = renderer;
|
|
434
|
+
if ( renderTarget === undefined ) {
|
|
435
|
+
|
|
436
|
+
const size = renderer.getSize( new THREE.Vector2() );
|
|
437
|
+
this._pixelRatio = renderer.getPixelRatio();
|
|
438
|
+
this._width = size.width;
|
|
439
|
+
this._height = size.height;
|
|
440
|
+
renderTarget = new THREE.WebGLRenderTarget( this._width * this._pixelRatio, this._height * this._pixelRatio );
|
|
441
|
+
renderTarget.texture.name = 'EffectComposer.rt1';
|
|
442
|
+
|
|
443
|
+
} else {
|
|
444
|
+
|
|
445
|
+
this._pixelRatio = 1;
|
|
446
|
+
this._width = renderTarget.width;
|
|
447
|
+
this._height = renderTarget.height;
|
|
448
|
+
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
this.renderTarget1 = renderTarget;
|
|
452
|
+
this.renderTarget2 = renderTarget.clone();
|
|
453
|
+
this.renderTarget2.texture.name = 'EffectComposer.rt2';
|
|
454
|
+
this.writeBuffer = this.renderTarget1;
|
|
455
|
+
this.readBuffer = this.renderTarget2;
|
|
456
|
+
this.renderToScreen = true;
|
|
457
|
+
this.passes = [];
|
|
458
|
+
|
|
459
|
+
// dependencies
|
|
460
|
+
|
|
461
|
+
if ( THREE.CopyShader === undefined ) {
|
|
462
|
+
|
|
463
|
+
console.error( 'THREE.EffectComposer relies on THREE.CopyShader' );
|
|
464
|
+
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if ( THREE.ShaderPass === undefined ) {
|
|
468
|
+
|
|
469
|
+
console.error( 'THREE.EffectComposer relies on THREE.ShaderPass' );
|
|
470
|
+
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
this.copyPass = new THREE.ShaderPass( THREE.CopyShader );
|
|
474
|
+
this.clock = new THREE.Clock();
|
|
475
|
+
|
|
476
|
+
}
|
|
477
|
+
swapBuffers() {
|
|
478
|
+
|
|
479
|
+
const tmp = this.readBuffer;
|
|
480
|
+
this.readBuffer = this.writeBuffer;
|
|
481
|
+
this.writeBuffer = tmp;
|
|
482
|
+
|
|
483
|
+
}
|
|
484
|
+
addPass( pass ) {
|
|
485
|
+
|
|
486
|
+
this.passes.push( pass );
|
|
487
|
+
pass.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );
|
|
488
|
+
|
|
489
|
+
}
|
|
490
|
+
insertPass( pass, index ) {
|
|
491
|
+
|
|
492
|
+
this.passes.splice( index, 0, pass );
|
|
493
|
+
pass.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );
|
|
494
|
+
|
|
495
|
+
}
|
|
496
|
+
removePass( pass ) {
|
|
497
|
+
|
|
498
|
+
const index = this.passes.indexOf( pass );
|
|
499
|
+
if ( index !== - 1 ) {
|
|
500
|
+
|
|
501
|
+
this.passes.splice( index, 1 );
|
|
502
|
+
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
}
|
|
506
|
+
isLastEnabledPass( passIndex ) {
|
|
507
|
+
|
|
508
|
+
for ( let i = passIndex + 1; i < this.passes.length; i ++ ) {
|
|
509
|
+
|
|
510
|
+
if ( this.passes[ i ].enabled ) {
|
|
511
|
+
|
|
512
|
+
return false;
|
|
513
|
+
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return true;
|
|
519
|
+
|
|
520
|
+
}
|
|
521
|
+
render( deltaTime ) {
|
|
522
|
+
|
|
523
|
+
// deltaTime value is in seconds
|
|
524
|
+
|
|
525
|
+
if ( deltaTime === undefined ) {
|
|
526
|
+
|
|
527
|
+
deltaTime = this.clock.getDelta();
|
|
528
|
+
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
const currentRenderTarget = this.renderer.getRenderTarget();
|
|
532
|
+
let maskActive = false;
|
|
533
|
+
for ( let i = 0, il = this.passes.length; i < il; i ++ ) {
|
|
534
|
+
|
|
535
|
+
const pass = this.passes[ i ];
|
|
536
|
+
if ( pass.enabled === false ) continue;
|
|
537
|
+
pass.renderToScreen = this.renderToScreen && this.isLastEnabledPass( i );
|
|
538
|
+
pass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive );
|
|
539
|
+
if ( pass.needsSwap ) {
|
|
540
|
+
|
|
541
|
+
if ( maskActive ) {
|
|
542
|
+
|
|
543
|
+
const context = this.renderer.getContext();
|
|
544
|
+
const stencil = this.renderer.state.buffers.stencil;
|
|
545
|
+
|
|
546
|
+
//context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );
|
|
547
|
+
stencil.setFunc( context.NOTEQUAL, 1, 0xffffffff );
|
|
548
|
+
this.copyPass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime );
|
|
549
|
+
|
|
550
|
+
//context.stencilFunc( context.EQUAL, 1, 0xffffffff );
|
|
551
|
+
stencil.setFunc( context.EQUAL, 1, 0xffffffff );
|
|
552
|
+
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
this.swapBuffers();
|
|
556
|
+
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
if ( THREE.MaskPass !== undefined ) {
|
|
560
|
+
|
|
561
|
+
if ( pass instanceof THREE.MaskPass ) {
|
|
562
|
+
|
|
563
|
+
maskActive = true;
|
|
564
|
+
|
|
565
|
+
} else if ( pass instanceof THREE.ClearMaskPass ) {
|
|
566
|
+
|
|
567
|
+
maskActive = false;
|
|
568
|
+
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
this.renderer.setRenderTarget( currentRenderTarget );
|
|
576
|
+
|
|
577
|
+
}
|
|
578
|
+
reset( renderTarget ) {
|
|
579
|
+
|
|
580
|
+
if ( renderTarget === undefined ) {
|
|
581
|
+
|
|
582
|
+
const size = this.renderer.getSize( new THREE.Vector2() );
|
|
583
|
+
this._pixelRatio = this.renderer.getPixelRatio();
|
|
584
|
+
this._width = size.width;
|
|
585
|
+
this._height = size.height;
|
|
586
|
+
renderTarget = this.renderTarget1.clone();
|
|
587
|
+
renderTarget.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );
|
|
588
|
+
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
this.renderTarget1.dispose();
|
|
592
|
+
this.renderTarget2.dispose();
|
|
593
|
+
this.renderTarget1 = renderTarget;
|
|
594
|
+
this.renderTarget2 = renderTarget.clone();
|
|
595
|
+
this.writeBuffer = this.renderTarget1;
|
|
596
|
+
this.readBuffer = this.renderTarget2;
|
|
597
|
+
|
|
598
|
+
}
|
|
599
|
+
setSize( width, height ) {
|
|
600
|
+
|
|
601
|
+
this._width = width;
|
|
602
|
+
this._height = height;
|
|
603
|
+
const effectiveWidth = this._width * this._pixelRatio;
|
|
604
|
+
const effectiveHeight = this._height * this._pixelRatio;
|
|
605
|
+
this.renderTarget1.setSize( effectiveWidth, effectiveHeight );
|
|
606
|
+
this.renderTarget2.setSize( effectiveWidth, effectiveHeight );
|
|
607
|
+
for ( let i = 0; i < this.passes.length; i ++ ) {
|
|
608
|
+
|
|
609
|
+
this.passes[ i ].setSize( effectiveWidth, effectiveHeight );
|
|
610
|
+
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
}
|
|
614
|
+
setPixelRatio( pixelRatio ) {
|
|
615
|
+
|
|
616
|
+
this._pixelRatio = pixelRatio;
|
|
617
|
+
this.setSize( this._width, this._height );
|
|
618
|
+
|
|
619
|
+
}
|
|
620
|
+
dispose() {
|
|
621
|
+
|
|
622
|
+
this.renderTarget1.dispose();
|
|
623
|
+
this.renderTarget2.dispose();
|
|
624
|
+
this.copyPass.dispose();
|
|
625
|
+
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
}
|
|
629
|
+
class Pass {
|
|
630
|
+
|
|
631
|
+
constructor() {
|
|
632
|
+
|
|
633
|
+
// if set to true, the pass is processed by the composer
|
|
634
|
+
this.enabled = true;
|
|
635
|
+
|
|
636
|
+
// if set to true, the pass indicates to swap read and write buffer after rendering
|
|
637
|
+
this.needsSwap = true;
|
|
638
|
+
|
|
639
|
+
// if set to true, the pass clears its buffer before rendering
|
|
640
|
+
this.clear = false;
|
|
641
|
+
|
|
642
|
+
// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.
|
|
643
|
+
this.renderToScreen = false;
|
|
644
|
+
|
|
645
|
+
}
|
|
646
|
+
setSize() {}
|
|
647
|
+
render() {
|
|
648
|
+
|
|
649
|
+
console.error( 'THREE.Pass: .render() must be implemented in derived pass.' );
|
|
650
|
+
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// Helper for passes that need to fill the viewport with a single quad.
|
|
656
|
+
|
|
657
|
+
const _camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
|
|
658
|
+
|
|
659
|
+
// https://github.com/mrdoob/three.js/pull/21358
|
|
660
|
+
|
|
661
|
+
const _geometry = new THREE.BufferGeometry();
|
|
662
|
+
_geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );
|
|
663
|
+
_geometry.setAttribute( 'uv', new THREE.Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );
|
|
664
|
+
class FullScreenQuad {
|
|
665
|
+
|
|
666
|
+
constructor( material ) {
|
|
667
|
+
|
|
668
|
+
this._mesh = new THREE.Mesh( _geometry, material );
|
|
669
|
+
|
|
670
|
+
}
|
|
671
|
+
dispose() {
|
|
672
|
+
|
|
673
|
+
this._mesh.geometry.dispose();
|
|
674
|
+
|
|
675
|
+
}
|
|
676
|
+
render( renderer ) {
|
|
677
|
+
|
|
678
|
+
renderer.render( this._mesh, _camera );
|
|
679
|
+
|
|
680
|
+
}
|
|
681
|
+
get material() {
|
|
682
|
+
|
|
683
|
+
return this._mesh.material;
|
|
684
|
+
|
|
685
|
+
}
|
|
686
|
+
set material( value ) {
|
|
687
|
+
|
|
688
|
+
this._mesh.material = value;
|
|
689
|
+
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
THREE.EffectComposer = EffectComposer;
|
|
695
|
+
THREE.FullScreenQuad = FullScreenQuad;
|
|
696
|
+
THREE.Pass = Pass;
|
|
697
|
+
|
|
698
|
+
} )();
|
|
699
|
+
|
|
700
|
+
</script>
|
|
701
|
+
<script>
|
|
702
|
+
( function () {
|
|
703
|
+
|
|
704
|
+
class RenderPass extends THREE.Pass {
|
|
705
|
+
|
|
706
|
+
constructor( scene, camera, overrideMaterial, clearColor, clearAlpha ) {
|
|
707
|
+
|
|
708
|
+
super();
|
|
709
|
+
this.scene = scene;
|
|
710
|
+
this.camera = camera;
|
|
711
|
+
this.overrideMaterial = overrideMaterial;
|
|
712
|
+
this.clearColor = clearColor;
|
|
713
|
+
this.clearAlpha = clearAlpha !== undefined ? clearAlpha : 0;
|
|
714
|
+
this.clear = true;
|
|
715
|
+
this.clearDepth = false;
|
|
716
|
+
this.needsSwap = false;
|
|
717
|
+
this._oldClearColor = new THREE.Color();
|
|
718
|
+
|
|
719
|
+
}
|
|
720
|
+
render( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {
|
|
721
|
+
|
|
722
|
+
const oldAutoClear = renderer.autoClear;
|
|
723
|
+
renderer.autoClear = false;
|
|
724
|
+
let oldClearAlpha, oldOverrideMaterial;
|
|
725
|
+
if ( this.overrideMaterial !== undefined ) {
|
|
726
|
+
|
|
727
|
+
oldOverrideMaterial = this.scene.overrideMaterial;
|
|
728
|
+
this.scene.overrideMaterial = this.overrideMaterial;
|
|
729
|
+
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
if ( this.clearColor ) {
|
|
733
|
+
|
|
734
|
+
renderer.getClearColor( this._oldClearColor );
|
|
735
|
+
oldClearAlpha = renderer.getClearAlpha();
|
|
736
|
+
renderer.setClearColor( this.clearColor, this.clearAlpha );
|
|
737
|
+
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
if ( this.clearDepth ) {
|
|
741
|
+
|
|
742
|
+
renderer.clearDepth();
|
|
743
|
+
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
|
|
747
|
+
|
|
748
|
+
// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600
|
|
749
|
+
if ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );
|
|
750
|
+
renderer.render( this.scene, this.camera );
|
|
751
|
+
if ( this.clearColor ) {
|
|
752
|
+
|
|
753
|
+
renderer.setClearColor( this._oldClearColor, oldClearAlpha );
|
|
754
|
+
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
if ( this.overrideMaterial !== undefined ) {
|
|
758
|
+
|
|
759
|
+
this.scene.overrideMaterial = oldOverrideMaterial;
|
|
760
|
+
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
renderer.autoClear = oldAutoClear;
|
|
764
|
+
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
THREE.RenderPass = RenderPass;
|
|
770
|
+
|
|
771
|
+
} )();
|
|
772
|
+
|
|
773
|
+
</script>
|
|
774
|
+
|
|
775
|
+
<script>
|
|
776
|
+
( function () {
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* UnrealBloomPass is inspired by the bloom pass of Unreal Engine. It creates a
|
|
780
|
+
* mip map chain of bloom textures and blurs them with different radii. Because
|
|
781
|
+
* of the weighted combination of mips, and because larger blurs are done on
|
|
782
|
+
* higher mips, this effect provides good quality and performance.
|
|
783
|
+
*
|
|
784
|
+
* Reference:
|
|
785
|
+
* - https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/
|
|
786
|
+
*/
|
|
787
|
+
class UnrealBloomPass extends THREE.Pass {
|
|
788
|
+
|
|
789
|
+
constructor( resolution, strength, radius, threshold ) {
|
|
790
|
+
|
|
791
|
+
super();
|
|
792
|
+
this.strength = strength !== undefined ? strength : 1;
|
|
793
|
+
this.radius = radius;
|
|
794
|
+
this.threshold = threshold;
|
|
795
|
+
this.resolution = resolution !== undefined ? new THREE.Vector2( resolution.x, resolution.y ) : new THREE.Vector2( 256, 256 );
|
|
796
|
+
|
|
797
|
+
// create color only once here, reuse it later inside the render function
|
|
798
|
+
this.clearColor = new THREE.Color( 0, 0, 0 );
|
|
799
|
+
|
|
800
|
+
// render targets
|
|
801
|
+
this.renderTargetsHorizontal = [];
|
|
802
|
+
this.renderTargetsVertical = [];
|
|
803
|
+
this.nMips = 5;
|
|
804
|
+
let resx = Math.round( this.resolution.x / 2 );
|
|
805
|
+
let resy = Math.round( this.resolution.y / 2 );
|
|
806
|
+
this.renderTargetBright = new THREE.WebGLRenderTarget( resx, resy );
|
|
807
|
+
this.renderTargetBright.texture.name = 'UnrealBloomPass.bright';
|
|
808
|
+
this.renderTargetBright.texture.generateMipmaps = false;
|
|
809
|
+
for ( let i = 0; i < this.nMips; i ++ ) {
|
|
810
|
+
|
|
811
|
+
const renderTargetHorizonal = new THREE.WebGLRenderTarget( resx, resy );
|
|
812
|
+
renderTargetHorizonal.texture.name = 'UnrealBloomPass.h' + i;
|
|
813
|
+
renderTargetHorizonal.texture.generateMipmaps = false;
|
|
814
|
+
this.renderTargetsHorizontal.push( renderTargetHorizonal );
|
|
815
|
+
const renderTargetVertical = new THREE.WebGLRenderTarget( resx, resy );
|
|
816
|
+
renderTargetVertical.texture.name = 'UnrealBloomPass.v' + i;
|
|
817
|
+
renderTargetVertical.texture.generateMipmaps = false;
|
|
818
|
+
this.renderTargetsVertical.push( renderTargetVertical );
|
|
819
|
+
resx = Math.round( resx / 2 );
|
|
820
|
+
resy = Math.round( resy / 2 );
|
|
821
|
+
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
// luminosity high pass material
|
|
825
|
+
|
|
826
|
+
if ( THREE.LuminosityHighPassShader === undefined ) console.error( 'THREE.UnrealBloomPass relies on THREE.LuminosityHighPassShader' );
|
|
827
|
+
const highPassShader = THREE.LuminosityHighPassShader;
|
|
828
|
+
this.highPassUniforms = THREE.UniformsUtils.clone( highPassShader.uniforms );
|
|
829
|
+
this.highPassUniforms[ 'luminosityThreshold' ].value = threshold;
|
|
830
|
+
this.highPassUniforms[ 'smoothWidth' ].value = 0.01;
|
|
831
|
+
this.materialHighPassFilter = new THREE.ShaderMaterial( {
|
|
832
|
+
uniforms: this.highPassUniforms,
|
|
833
|
+
vertexShader: highPassShader.vertexShader,
|
|
834
|
+
fragmentShader: highPassShader.fragmentShader,
|
|
835
|
+
defines: {}
|
|
836
|
+
} );
|
|
837
|
+
|
|
838
|
+
// Gaussian Blur Materials
|
|
839
|
+
this.separableBlurMaterials = [];
|
|
840
|
+
const kernelSizeArray = [ 3, 5, 7, 9, 11 ];
|
|
841
|
+
resx = Math.round( this.resolution.x / 2 );
|
|
842
|
+
resy = Math.round( this.resolution.y / 2 );
|
|
843
|
+
for ( let i = 0; i < this.nMips; i ++ ) {
|
|
844
|
+
|
|
845
|
+
this.separableBlurMaterials.push( this.getSeperableBlurMaterial( kernelSizeArray[ i ] ) );
|
|
846
|
+
this.separableBlurMaterials[ i ].uniforms[ 'texSize' ].value = new THREE.Vector2( resx, resy );
|
|
847
|
+
resx = Math.round( resx / 2 );
|
|
848
|
+
resy = Math.round( resy / 2 );
|
|
849
|
+
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// Composite material
|
|
853
|
+
this.compositeMaterial = this.getCompositeMaterial( this.nMips );
|
|
854
|
+
this.compositeMaterial.uniforms[ 'blurTexture1' ].value = this.renderTargetsVertical[ 0 ].texture;
|
|
855
|
+
this.compositeMaterial.uniforms[ 'blurTexture2' ].value = this.renderTargetsVertical[ 1 ].texture;
|
|
856
|
+
this.compositeMaterial.uniforms[ 'blurTexture3' ].value = this.renderTargetsVertical[ 2 ].texture;
|
|
857
|
+
this.compositeMaterial.uniforms[ 'blurTexture4' ].value = this.renderTargetsVertical[ 3 ].texture;
|
|
858
|
+
this.compositeMaterial.uniforms[ 'blurTexture5' ].value = this.renderTargetsVertical[ 4 ].texture;
|
|
859
|
+
this.compositeMaterial.uniforms[ 'bloomStrength' ].value = strength;
|
|
860
|
+
this.compositeMaterial.uniforms[ 'bloomRadius' ].value = 0.1;
|
|
861
|
+
this.compositeMaterial.needsUpdate = true;
|
|
862
|
+
const bloomFactors = [ 1.0, 0.8, 0.6, 0.4, 0.2 ];
|
|
863
|
+
this.compositeMaterial.uniforms[ 'bloomFactors' ].value = bloomFactors;
|
|
864
|
+
this.bloomTintColors = [ new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 1, 1, 1 ) ];
|
|
865
|
+
this.compositeMaterial.uniforms[ 'bloomTintColors' ].value = this.bloomTintColors;
|
|
866
|
+
|
|
867
|
+
// copy material
|
|
868
|
+
if ( THREE.CopyShader === undefined ) {
|
|
869
|
+
|
|
870
|
+
console.error( 'THREE.UnrealBloomPass relies on THREE.CopyShader' );
|
|
871
|
+
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
const copyShader = THREE.CopyShader;
|
|
875
|
+
this.copyUniforms = THREE.UniformsUtils.clone( copyShader.uniforms );
|
|
876
|
+
this.copyUniforms[ 'opacity' ].value = 1.0;
|
|
877
|
+
this.materialCopy = new THREE.ShaderMaterial( {
|
|
878
|
+
uniforms: this.copyUniforms,
|
|
879
|
+
vertexShader: copyShader.vertexShader,
|
|
880
|
+
fragmentShader: copyShader.fragmentShader,
|
|
881
|
+
blending: THREE.AdditiveBlending,
|
|
882
|
+
depthTest: false,
|
|
883
|
+
depthWrite: false,
|
|
884
|
+
transparent: true
|
|
885
|
+
} );
|
|
886
|
+
this.enabled = true;
|
|
887
|
+
this.needsSwap = false;
|
|
888
|
+
this._oldClearColor = new THREE.Color();
|
|
889
|
+
this.oldClearAlpha = 1;
|
|
890
|
+
this.basic = new THREE.MeshBasicMaterial();
|
|
891
|
+
this.fsQuad = new THREE.FullScreenQuad( null );
|
|
892
|
+
|
|
893
|
+
}
|
|
894
|
+
dispose() {
|
|
895
|
+
|
|
896
|
+
for ( let i = 0; i < this.renderTargetsHorizontal.length; i ++ ) {
|
|
897
|
+
|
|
898
|
+
this.renderTargetsHorizontal[ i ].dispose();
|
|
899
|
+
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
for ( let i = 0; i < this.renderTargetsVertical.length; i ++ ) {
|
|
903
|
+
|
|
904
|
+
this.renderTargetsVertical[ i ].dispose();
|
|
905
|
+
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
this.renderTargetBright.dispose();
|
|
909
|
+
|
|
910
|
+
//
|
|
911
|
+
|
|
912
|
+
for ( let i = 0; i < this.separableBlurMaterials.length; i ++ ) {
|
|
913
|
+
|
|
914
|
+
this.separableBlurMaterials[ i ].dispose();
|
|
915
|
+
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
this.compositeMaterial.dispose();
|
|
919
|
+
this.materialCopy.dispose();
|
|
920
|
+
this.basic.dispose();
|
|
921
|
+
|
|
922
|
+
//
|
|
923
|
+
|
|
924
|
+
this.fsQuad.dispose();
|
|
925
|
+
|
|
926
|
+
}
|
|
927
|
+
setSize( width, height ) {
|
|
928
|
+
|
|
929
|
+
let resx = Math.round( width / 2 );
|
|
930
|
+
let resy = Math.round( height / 2 );
|
|
931
|
+
this.renderTargetBright.setSize( resx, resy );
|
|
932
|
+
for ( let i = 0; i < this.nMips; i ++ ) {
|
|
933
|
+
|
|
934
|
+
this.renderTargetsHorizontal[ i ].setSize( resx, resy );
|
|
935
|
+
this.renderTargetsVertical[ i ].setSize( resx, resy );
|
|
936
|
+
this.separableBlurMaterials[ i ].uniforms[ 'texSize' ].value = new THREE.Vector2( resx, resy );
|
|
937
|
+
resx = Math.round( resx / 2 );
|
|
938
|
+
resy = Math.round( resy / 2 );
|
|
939
|
+
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
}
|
|
943
|
+
render( renderer, writeBuffer, readBuffer, deltaTime, maskActive ) {
|
|
944
|
+
|
|
945
|
+
renderer.getClearColor( this._oldClearColor );
|
|
946
|
+
this.oldClearAlpha = renderer.getClearAlpha();
|
|
947
|
+
const oldAutoClear = renderer.autoClear;
|
|
948
|
+
renderer.autoClear = false;
|
|
949
|
+
renderer.setClearColor( this.clearColor, 0 );
|
|
950
|
+
if ( maskActive ) renderer.state.buffers.stencil.setTest( false );
|
|
951
|
+
|
|
952
|
+
// Render input to screen
|
|
953
|
+
|
|
954
|
+
if ( this.renderToScreen ) {
|
|
955
|
+
|
|
956
|
+
this.fsQuad.material = this.basic;
|
|
957
|
+
this.basic.map = readBuffer.texture;
|
|
958
|
+
renderer.setRenderTarget( null );
|
|
959
|
+
renderer.clear();
|
|
960
|
+
this.fsQuad.render( renderer );
|
|
961
|
+
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
// 1. Extract Bright Areas
|
|
965
|
+
|
|
966
|
+
this.highPassUniforms[ 'tDiffuse' ].value = readBuffer.texture;
|
|
967
|
+
this.highPassUniforms[ 'luminosityThreshold' ].value = this.threshold;
|
|
968
|
+
this.fsQuad.material = this.materialHighPassFilter;
|
|
969
|
+
renderer.setRenderTarget( this.renderTargetBright );
|
|
970
|
+
renderer.clear();
|
|
971
|
+
this.fsQuad.render( renderer );
|
|
972
|
+
|
|
973
|
+
// 2. Blur All the mips progressively
|
|
974
|
+
|
|
975
|
+
let inputRenderTarget = this.renderTargetBright;
|
|
976
|
+
for ( let i = 0; i < this.nMips; i ++ ) {
|
|
977
|
+
|
|
978
|
+
this.fsQuad.material = this.separableBlurMaterials[ i ];
|
|
979
|
+
this.separableBlurMaterials[ i ].uniforms[ 'colorTexture' ].value = inputRenderTarget.texture;
|
|
980
|
+
this.separableBlurMaterials[ i ].uniforms[ 'direction' ].value = UnrealBloomPass.BlurDirectionX;
|
|
981
|
+
renderer.setRenderTarget( this.renderTargetsHorizontal[ i ] );
|
|
982
|
+
renderer.clear();
|
|
983
|
+
this.fsQuad.render( renderer );
|
|
984
|
+
this.separableBlurMaterials[ i ].uniforms[ 'colorTexture' ].value = this.renderTargetsHorizontal[ i ].texture;
|
|
985
|
+
this.separableBlurMaterials[ i ].uniforms[ 'direction' ].value = UnrealBloomPass.BlurDirectionY;
|
|
986
|
+
renderer.setRenderTarget( this.renderTargetsVertical[ i ] );
|
|
987
|
+
renderer.clear();
|
|
988
|
+
this.fsQuad.render( renderer );
|
|
989
|
+
inputRenderTarget = this.renderTargetsVertical[ i ];
|
|
990
|
+
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
// Composite All the mips
|
|
994
|
+
|
|
995
|
+
this.fsQuad.material = this.compositeMaterial;
|
|
996
|
+
this.compositeMaterial.uniforms[ 'bloomStrength' ].value = this.strength;
|
|
997
|
+
this.compositeMaterial.uniforms[ 'bloomRadius' ].value = this.radius;
|
|
998
|
+
this.compositeMaterial.uniforms[ 'bloomTintColors' ].value = this.bloomTintColors;
|
|
999
|
+
renderer.setRenderTarget( this.renderTargetsHorizontal[ 0 ] );
|
|
1000
|
+
renderer.clear();
|
|
1001
|
+
this.fsQuad.render( renderer );
|
|
1002
|
+
|
|
1003
|
+
// Blend it additively over the input texture
|
|
1004
|
+
|
|
1005
|
+
this.fsQuad.material = this.materialCopy;
|
|
1006
|
+
this.copyUniforms[ 'tDiffuse' ].value = this.renderTargetsHorizontal[ 0 ].texture;
|
|
1007
|
+
if ( maskActive ) renderer.state.buffers.stencil.setTest( true );
|
|
1008
|
+
if ( this.renderToScreen ) {
|
|
1009
|
+
|
|
1010
|
+
renderer.setRenderTarget( null );
|
|
1011
|
+
this.fsQuad.render( renderer );
|
|
1012
|
+
|
|
1013
|
+
} else {
|
|
1014
|
+
|
|
1015
|
+
renderer.setRenderTarget( readBuffer );
|
|
1016
|
+
this.fsQuad.render( renderer );
|
|
1017
|
+
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
// Restore renderer settings
|
|
1021
|
+
|
|
1022
|
+
renderer.setClearColor( this._oldClearColor, this.oldClearAlpha );
|
|
1023
|
+
renderer.autoClear = oldAutoClear;
|
|
1024
|
+
|
|
1025
|
+
}
|
|
1026
|
+
getSeperableBlurMaterial( kernelRadius ) {
|
|
1027
|
+
|
|
1028
|
+
return new THREE.ShaderMaterial( {
|
|
1029
|
+
defines: {
|
|
1030
|
+
'KERNEL_RADIUS': kernelRadius,
|
|
1031
|
+
'SIGMA': kernelRadius
|
|
1032
|
+
},
|
|
1033
|
+
uniforms: {
|
|
1034
|
+
'colorTexture': {
|
|
1035
|
+
value: null
|
|
1036
|
+
},
|
|
1037
|
+
'texSize': {
|
|
1038
|
+
value: new THREE.Vector2( 0.5, 0.5 )
|
|
1039
|
+
},
|
|
1040
|
+
'direction': {
|
|
1041
|
+
value: new THREE.Vector2( 0.5, 0.5 )
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
vertexShader: `varying vec2 vUv;
|
|
1045
|
+
void main() {
|
|
1046
|
+
vUv = uv;
|
|
1047
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
1048
|
+
}`,
|
|
1049
|
+
fragmentShader: `#include <common>
|
|
1050
|
+
varying vec2 vUv;
|
|
1051
|
+
uniform sampler2D colorTexture;
|
|
1052
|
+
uniform vec2 texSize;
|
|
1053
|
+
uniform vec2 direction;
|
|
1054
|
+
|
|
1055
|
+
float gaussianPdf(in float x, in float sigma) {
|
|
1056
|
+
return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
|
|
1057
|
+
}
|
|
1058
|
+
void main() {
|
|
1059
|
+
vec2 invSize = 1.0 / texSize;
|
|
1060
|
+
float fSigma = float(SIGMA);
|
|
1061
|
+
float weightSum = gaussianPdf(0.0, fSigma);
|
|
1062
|
+
vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;
|
|
1063
|
+
for( int i = 1; i < KERNEL_RADIUS; i ++ ) {
|
|
1064
|
+
float x = float(i);
|
|
1065
|
+
float w = gaussianPdf(x, fSigma);
|
|
1066
|
+
vec2 uvOffset = direction * invSize * x;
|
|
1067
|
+
vec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;
|
|
1068
|
+
vec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;
|
|
1069
|
+
diffuseSum += (sample1 + sample2) * w;
|
|
1070
|
+
weightSum += 2.0 * w;
|
|
1071
|
+
}
|
|
1072
|
+
gl_FragColor = vec4(diffuseSum/weightSum, 1.0);
|
|
1073
|
+
}`
|
|
1074
|
+
} );
|
|
1075
|
+
|
|
1076
|
+
}
|
|
1077
|
+
getCompositeMaterial( nMips ) {
|
|
1078
|
+
|
|
1079
|
+
return new THREE.ShaderMaterial( {
|
|
1080
|
+
defines: {
|
|
1081
|
+
'NUM_MIPS': nMips
|
|
1082
|
+
},
|
|
1083
|
+
uniforms: {
|
|
1084
|
+
'blurTexture1': {
|
|
1085
|
+
value: null
|
|
1086
|
+
},
|
|
1087
|
+
'blurTexture2': {
|
|
1088
|
+
value: null
|
|
1089
|
+
},
|
|
1090
|
+
'blurTexture3': {
|
|
1091
|
+
value: null
|
|
1092
|
+
},
|
|
1093
|
+
'blurTexture4': {
|
|
1094
|
+
value: null
|
|
1095
|
+
},
|
|
1096
|
+
'blurTexture5': {
|
|
1097
|
+
value: null
|
|
1098
|
+
},
|
|
1099
|
+
'bloomStrength': {
|
|
1100
|
+
value: 1.0
|
|
1101
|
+
},
|
|
1102
|
+
'bloomFactors': {
|
|
1103
|
+
value: null
|
|
1104
|
+
},
|
|
1105
|
+
'bloomTintColors': {
|
|
1106
|
+
value: null
|
|
1107
|
+
},
|
|
1108
|
+
'bloomRadius': {
|
|
1109
|
+
value: 0.0
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
vertexShader: `varying vec2 vUv;
|
|
1113
|
+
void main() {
|
|
1114
|
+
vUv = uv;
|
|
1115
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
1116
|
+
}`,
|
|
1117
|
+
fragmentShader: `varying vec2 vUv;
|
|
1118
|
+
uniform sampler2D blurTexture1;
|
|
1119
|
+
uniform sampler2D blurTexture2;
|
|
1120
|
+
uniform sampler2D blurTexture3;
|
|
1121
|
+
uniform sampler2D blurTexture4;
|
|
1122
|
+
uniform sampler2D blurTexture5;
|
|
1123
|
+
uniform float bloomStrength;
|
|
1124
|
+
uniform float bloomRadius;
|
|
1125
|
+
uniform float bloomFactors[NUM_MIPS];
|
|
1126
|
+
uniform vec3 bloomTintColors[NUM_MIPS];
|
|
1127
|
+
|
|
1128
|
+
float lerpBloomFactor(const in float factor) {
|
|
1129
|
+
float mirrorFactor = 1.2 - factor;
|
|
1130
|
+
return mix(factor, mirrorFactor, bloomRadius);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
void main() {
|
|
1134
|
+
gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +
|
|
1135
|
+
lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +
|
|
1136
|
+
lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
|
|
1137
|
+
lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
|
|
1138
|
+
lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
|
|
1139
|
+
}`
|
|
1140
|
+
} );
|
|
1141
|
+
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
}
|
|
1145
|
+
UnrealBloomPass.BlurDirectionX = new THREE.Vector2( 1.0, 0.0 );
|
|
1146
|
+
UnrealBloomPass.BlurDirectionY = new THREE.Vector2( 0.0, 1.0 );
|
|
1147
|
+
|
|
1148
|
+
THREE.UnrealBloomPass = UnrealBloomPass;
|
|
1149
|
+
|
|
1150
|
+
} )();
|
|
1151
|
+
|
|
1152
|
+
</script>
|
|
1153
|
+
<style>
|
|
1154
|
+
*,
|
|
1155
|
+
*::before,
|
|
1156
|
+
*::after {
|
|
1157
|
+
margin: 0;
|
|
1158
|
+
padding: 0;
|
|
1159
|
+
box-sizing: border-box;
|
|
1160
|
+
}
|
|
1161
|
+
body {
|
|
1162
|
+
background: #030407;
|
|
1163
|
+
overflow: hidden;
|
|
1164
|
+
font-family: "Inter", system-ui, sans-serif;
|
|
1165
|
+
}
|
|
1166
|
+
#root {
|
|
1167
|
+
position: relative;
|
|
1168
|
+
width: 1920px;
|
|
1169
|
+
height: 1080px;
|
|
1170
|
+
overflow: hidden;
|
|
1171
|
+
background: #030407;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
.text-source {
|
|
1175
|
+
width: 1920px;
|
|
1176
|
+
height: 1080px;
|
|
1177
|
+
display: flex;
|
|
1178
|
+
flex-direction: column;
|
|
1179
|
+
align-items: center;
|
|
1180
|
+
justify-content: center;
|
|
1181
|
+
background: linear-gradient(160deg, #030407 0%, #0a1020 40%, #070910 70%, #030407 100%);
|
|
1182
|
+
text-align: center;
|
|
1183
|
+
padding: 0 120px;
|
|
1184
|
+
gap: 32px;
|
|
1185
|
+
position: relative;
|
|
1186
|
+
overflow: hidden;
|
|
1187
|
+
}
|
|
1188
|
+
.text-source::before {
|
|
1189
|
+
content: "";
|
|
1190
|
+
position: absolute;
|
|
1191
|
+
width: 700px;
|
|
1192
|
+
height: 700px;
|
|
1193
|
+
border-radius: 50%;
|
|
1194
|
+
background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
|
|
1195
|
+
top: -150px;
|
|
1196
|
+
right: -100px;
|
|
1197
|
+
pointer-events: none;
|
|
1198
|
+
}
|
|
1199
|
+
.text-source::after {
|
|
1200
|
+
content: "";
|
|
1201
|
+
position: absolute;
|
|
1202
|
+
width: 500px;
|
|
1203
|
+
height: 500px;
|
|
1204
|
+
border-radius: 50%;
|
|
1205
|
+
background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
|
|
1206
|
+
bottom: -100px;
|
|
1207
|
+
left: -50px;
|
|
1208
|
+
pointer-events: none;
|
|
1209
|
+
}
|
|
1210
|
+
.badge {
|
|
1211
|
+
font-size: 14px;
|
|
1212
|
+
font-weight: 600;
|
|
1213
|
+
letter-spacing: 3px;
|
|
1214
|
+
text-transform: uppercase;
|
|
1215
|
+
color: rgba(0, 212, 255, 0.8);
|
|
1216
|
+
}
|
|
1217
|
+
.text-source h1 {
|
|
1218
|
+
font-size: 148px;
|
|
1219
|
+
font-weight: 900;
|
|
1220
|
+
line-height: 0.9;
|
|
1221
|
+
color: rgba(248, 249, 253, 0.96);
|
|
1222
|
+
text-shadow: 0 0 60px rgba(255, 255, 255, 0.15);
|
|
1223
|
+
letter-spacing: -5px;
|
|
1224
|
+
max-width: 1400px;
|
|
1225
|
+
}
|
|
1226
|
+
.text-source h1 span {
|
|
1227
|
+
background: linear-gradient(135deg, #00d4ff, #a855f7);
|
|
1228
|
+
-webkit-background-clip: text;
|
|
1229
|
+
-webkit-text-fill-color: transparent;
|
|
1230
|
+
}
|
|
1231
|
+
.subtitle {
|
|
1232
|
+
font-size: 28px;
|
|
1233
|
+
font-weight: 400;
|
|
1234
|
+
color: rgba(255, 255, 255, 0.35);
|
|
1235
|
+
max-width: 800px;
|
|
1236
|
+
line-height: 1.5;
|
|
1237
|
+
}
|
|
1238
|
+
.stats {
|
|
1239
|
+
display: flex;
|
|
1240
|
+
gap: 48px;
|
|
1241
|
+
margin-top: 16px;
|
|
1242
|
+
}
|
|
1243
|
+
.stat {
|
|
1244
|
+
text-align: center;
|
|
1245
|
+
}
|
|
1246
|
+
.stat-val {
|
|
1247
|
+
font-size: 42px;
|
|
1248
|
+
font-weight: 800;
|
|
1249
|
+
color: #00d4ff;
|
|
1250
|
+
letter-spacing: -1px;
|
|
1251
|
+
}
|
|
1252
|
+
.stat-label {
|
|
1253
|
+
font-size: 12px;
|
|
1254
|
+
font-weight: 600;
|
|
1255
|
+
color: rgba(255, 255, 255, 0.3);
|
|
1256
|
+
text-transform: uppercase;
|
|
1257
|
+
letter-spacing: 2px;
|
|
1258
|
+
margin-top: 4px;
|
|
1259
|
+
}
|
|
1260
|
+
</style>
|
|
1261
|
+
<link rel="stylesheet" href="../css/latin-inter.css" />
|
|
1262
|
+
<style id="popost-fonts">
|
|
1263
|
+
@font-face {
|
|
1264
|
+
font-family: "Inter";
|
|
1265
|
+
font-style: normal;
|
|
1266
|
+
font-display: swap;
|
|
1267
|
+
font-weight: 100 900;
|
|
1268
|
+
src: url("../fonts/latin-inter/inter-latin-ext-wght-normal.woff2") format('woff2-variations');
|
|
1269
|
+
unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
|
|
1270
|
+
}
|
|
1271
|
+
@font-face {
|
|
1272
|
+
font-family: "Inter";
|
|
1273
|
+
font-style: normal;
|
|
1274
|
+
font-display: swap;
|
|
1275
|
+
font-weight: 100 900;
|
|
1276
|
+
src: url("../fonts/latin-inter/inter-latin-wght-normal.woff2") format('woff2-variations');
|
|
1277
|
+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
|
1278
|
+
}
|
|
1279
|
+
@font-face {
|
|
1280
|
+
font-family: "Inter";
|
|
1281
|
+
font-style: italic;
|
|
1282
|
+
font-display: swap;
|
|
1283
|
+
font-weight: 100 900;
|
|
1284
|
+
src: url("../fonts/latin-inter/inter-latin-ext-wght-italic.woff2") format('woff2-variations');
|
|
1285
|
+
unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
|
|
1286
|
+
}
|
|
1287
|
+
@font-face {
|
|
1288
|
+
font-family: "Inter";
|
|
1289
|
+
font-style: italic;
|
|
1290
|
+
font-display: swap;
|
|
1291
|
+
font-weight: 100 900;
|
|
1292
|
+
src: url("../fonts/latin-inter/inter-latin-wght-italic.woff2") format('woff2-variations');
|
|
1293
|
+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
|
1294
|
+
}
|
|
1295
|
+
</style>
|
|
1296
|
+
<style id="popost-fit">
|
|
1297
|
+
html, body { margin: 0 !important; width: 1280px; height: 720px; overflow: hidden !important; }
|
|
1298
|
+
:where(html, body) { background: #000000; }
|
|
1299
|
+
#popost-stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; }
|
|
1300
|
+
</style>
|
|
1301
|
+
<script type="application/json" id="popost-params">
|
|
1302
|
+
{
|
|
1303
|
+
"about": "VFX composition block",
|
|
1304
|
+
"class": "3d",
|
|
1305
|
+
"tags": [
|
|
1306
|
+
"html-in-canvas",
|
|
1307
|
+
"webgl"
|
|
1308
|
+
],
|
|
1309
|
+
"seconds": 20,
|
|
1310
|
+
"params": [
|
|
1311
|
+
{
|
|
1312
|
+
"name": "fit",
|
|
1313
|
+
"type": "choice",
|
|
1314
|
+
"default": "contain",
|
|
1315
|
+
"options": [
|
|
1316
|
+
"contain",
|
|
1317
|
+
"cover"
|
|
1318
|
+
],
|
|
1319
|
+
"what": "how the 1920x1080 composition is fitted into the canvas: whole with bars, or filling it and cropped"
|
|
1320
|
+
}
|
|
1321
|
+
],
|
|
1322
|
+
"values": {}
|
|
1323
|
+
}
|
|
1324
|
+
</script>
|
|
1325
|
+
<script>
|
|
1326
|
+
/* popost: the scene's parameters stand in for HyperFrames variables; random numbers are seeded; the composition is
|
|
1327
|
+
scaled into the canvas; clips are shown and hidden from the scene's time. */
|
|
1328
|
+
(function () {
|
|
1329
|
+
var block = document.getElementById('popost-params');
|
|
1330
|
+
var values = block ? (JSON.parse(block.textContent).values || {}) : {};
|
|
1331
|
+
var vars = {};
|
|
1332
|
+
Object.keys(values).forEach(function (k) { if (k !== 'fit') vars[k] = values[k] === 'true' ? true : values[k] === 'false' ? false : values[k]; });
|
|
1333
|
+
window.__hyperframes = { getVariables: function () { return vars; } };
|
|
1334
|
+
var seed = 20240229;
|
|
1335
|
+
window.__popostRandom = function () { seed = (seed + 0x6d2b79f5) >>> 0; var t = seed; t = Math.imul(t ^ (t >>> 15), t | 1); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; };
|
|
1336
|
+
// HyperFrames variables as CSS custom properties (runtime/getVariables.ts, compositionLoader.ts). A mounted
|
|
1337
|
+
// composition's host lists its variables (data-popost-variables, written by the port): before the composition's
|
|
1338
|
+
// scripts run it gets those no rule gives it yet (an inherited value counts), and after them the rest; a value given
|
|
1339
|
+
// by a parameter always wins.
|
|
1340
|
+
var cssName = function (id) { return '--' + (String(id).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') || 'node'); };
|
|
1341
|
+
var givenId = function (n) { return Object.keys(values).filter(function (id) { return id !== 'fit' && cssName(id) === n; })[0]; };
|
|
1342
|
+
var hostVars = function (h, early) {
|
|
1343
|
+
(h.getAttribute('data-popost-variables') || '').split(';').forEach(function (d) {
|
|
1344
|
+
var i = d.indexOf(':'), n = d.slice(0, i).trim(), k = givenId(n);
|
|
1345
|
+
if (i < 0 || !n) return;
|
|
1346
|
+
if (k !== undefined) h.style.setProperty(n, String(vars[k]));
|
|
1347
|
+
else if (!(h.style.getPropertyValue(n) || (early ? getComputedStyle(h).getPropertyValue(n) : '')).trim()) h.style.setProperty(n, d.slice(i + 1).trim());
|
|
1348
|
+
});
|
|
1349
|
+
};
|
|
1350
|
+
// Root-level clips laid out as HyperFrames lays them out (runtime/init.ts, applyCompositionSizing and applyClipLayout):
|
|
1351
|
+
// its root composition (one marked data-root="true", else the first element with a data-composition-id, which is the
|
|
1352
|
+
// page's <html> when that has one) gets its declared size, a position and overflow hidden; each child of it with a
|
|
1353
|
+
// data-start is placed absolute unless it is absolute or fixed already, and given its declared size, or 100% where it
|
|
1354
|
+
// measures 0. A composition box deeper in the page keeps the position its page gives it.
|
|
1355
|
+
var layout = function () {
|
|
1356
|
+
var hroot = document.querySelector('[data-composition-id][data-root="true"]') || document.querySelector('[data-composition-id]');
|
|
1357
|
+
if (!hroot) return;
|
|
1358
|
+
var px = function (v) { var n = parseFloat(v); return isFinite(n) && n > 0 ? n + 'px' : null; };
|
|
1359
|
+
var rw = px(hroot.getAttribute('data-width')), rh = px(hroot.getAttribute('data-height'));
|
|
1360
|
+
if (rw) { hroot.style.width = rw; hroot.style.setProperty('--comp-width', rw); }
|
|
1361
|
+
if (rh) { hroot.style.height = rh; hroot.style.setProperty('--comp-height', rh); }
|
|
1362
|
+
if (!hroot.style.position) hroot.style.position = 'relative';
|
|
1363
|
+
hroot.style.overflow = 'hidden';
|
|
1364
|
+
Array.prototype.forEach.call(hroot.children, function (el) {
|
|
1365
|
+
if (/^(SCRIPT|STYLE|LINK|META)$/.test(el.tagName) || !el.hasAttribute('data-start')) return;
|
|
1366
|
+
var none = el.style.getPropertyValue('display') === 'none', priority = el.style.getPropertyPriority('display');
|
|
1367
|
+
if (none) el.style.removeProperty('display');
|
|
1368
|
+
var cs = getComputedStyle(el);
|
|
1369
|
+
if (cs.position !== 'absolute' && cs.position !== 'fixed') el.style.position = 'absolute';
|
|
1370
|
+
if (el.tagName !== 'AUDIO') {
|
|
1371
|
+
var byFile = /^(IMG|VIDEO)$/.test(el.tagName), fw = px(el.getAttribute('data-width')), fh = px(el.getAttribute('data-height'));
|
|
1372
|
+
if (fw) { if (!el.style.width && (cs.width === '0px' || cs.width === 'auto')) el.style.width = fw; } else if (!byFile && !el.style.width && cs.width === '0px') el.style.width = '100%';
|
|
1373
|
+
if (fh) { if (!el.style.height && (cs.height === '0px' || cs.height === 'auto')) el.style.height = fh; } else if (!byFile && !el.style.height && cs.height === '0px') el.style.height = '100%';
|
|
1374
|
+
}
|
|
1375
|
+
if (none) el.style.setProperty('display', 'none', priority);
|
|
1376
|
+
});
|
|
1377
|
+
};
|
|
1378
|
+
// HyperFrames loads a mounted composition after it has laid out the page, so its scripts see the host placed: each
|
|
1379
|
+
// script of a mounted composition calls this first (the port puts the call there).
|
|
1380
|
+
window.__popostMount = function (script) {
|
|
1381
|
+
var h = script && script.closest ? script.closest('[data-popost-host]') : null;
|
|
1382
|
+
if (!h || h.__popostMounted) return;
|
|
1383
|
+
h.__popostMounted = true;
|
|
1384
|
+
layout();
|
|
1385
|
+
hostVars(h, true);
|
|
1386
|
+
};
|
|
1387
|
+
window.__popostFit = function () {
|
|
1388
|
+
// The canvas, from the size this file declares: a scene of a later shot loads in a layer that is not displayed, where the page measures 0.
|
|
1389
|
+
var size = /width: (\d+)px; height: (\d+)px;/.exec(document.getElementById('popost-fit').textContent);
|
|
1390
|
+
var W = 1920, H = 1080, s = document.getElementById('popost-stage'), cw = Number(size[1]), ch = Number(size[2]);
|
|
1391
|
+
var k = (values.fit === 'cover' ? Math.max : Math.min)(cw / W, ch / H);
|
|
1392
|
+
s.style.transform = 'translate(' + (cw - W * k) / 2 + 'px,' + (ch - H * k) / 2 + 'px) scale(' + k + ')';
|
|
1393
|
+
// The page's own declared variables on its root element (runtime/getVariables.ts, injectCompositionCssVariables):
|
|
1394
|
+
// each default where no rule defines its property, a value given by a parameter always.
|
|
1395
|
+
Array.prototype.forEach.call(document.querySelectorAll('[data-popost-host]'), function (h) { hostVars(h, false); });
|
|
1396
|
+
layout();
|
|
1397
|
+
// Timed elements as HyperFrames has them (runtime/clipTree.ts, clipWindow.ts): every element with a data-start but the
|
|
1398
|
+
// root composition, from its start plus the starts of the compositions it sits in, for its data-duration (a
|
|
1399
|
+
// composition without one: its timeline's length); one that runs to the end of the root keeps its last frame.
|
|
1400
|
+
var root = s.querySelector('[data-composition-id]');
|
|
1401
|
+
var clips = Array.prototype.slice.call(s.querySelectorAll('[data-start]')).filter(function (c) { return (root ? c !== root : c.parentNode !== s) && !/^(SCRIPT|STYLE|LINK|META|TEMPLATE|NOSCRIPT)$/.test(c.tagName) && isFinite(parseFloat(c.getAttribute('data-start'))); });
|
|
1402
|
+
var windows = clips.map(function (c) {
|
|
1403
|
+
var a = parseFloat(c.getAttribute('data-start')), d = parseFloat(c.getAttribute('data-duration')), id = c.getAttribute('data-composition-id');
|
|
1404
|
+
for (var p = c.parentElement; p && p !== s; p = p.parentElement) if (p !== root && p.hasAttribute('data-composition-id') && isFinite(parseFloat(p.getAttribute('data-start')))) a += parseFloat(p.getAttribute('data-start'));
|
|
1405
|
+
var tl = !(d > 0) && id && window.__timelines && window.__timelines[id];
|
|
1406
|
+
return [a, d > 0 ? d : tl && tl.duration ? tl.duration() : Infinity];
|
|
1407
|
+
});
|
|
1408
|
+
var rootLength = parseFloat(root && root.getAttribute('data-duration'));
|
|
1409
|
+
// A mounted composition that starts later in its host runs on its own time.
|
|
1410
|
+
[].forEach(function (m) {
|
|
1411
|
+
var tl = window.__timelines && window.__timelines[m.id];
|
|
1412
|
+
if (tl) window.__timelines[m.id] = { pause: function () { tl.pause(); }, seek: function (t) { tl.seek(Math.max(0, t - m.start)); }, duration: function () { return tl.duration() + m.start; } };
|
|
1413
|
+
});
|
|
1414
|
+
var scene = (window.__popostScene = window.__popostScene || {}), before = scene.render;
|
|
1415
|
+
scene.render = function (seconds, fps) {
|
|
1416
|
+
if (before) before(seconds, fps);
|
|
1417
|
+
for (var i = 0; i < clips.length; i++) {
|
|
1418
|
+
var a = windows[i][0], end = a + windows[i][1];
|
|
1419
|
+
clips[i].style.visibility = seconds >= a - 1e-6 && (seconds < end - 1e-6 || end >= rootLength - 1e-6) ? 'visible' : 'hidden';
|
|
1420
|
+
}
|
|
1421
|
+
};
|
|
1422
|
+
};
|
|
1423
|
+
})();
|
|
1424
|
+
</script>
|
|
1425
|
+
<script type="application/json" id="popost-cues">[{"at":0,"cue":"swish","gain":0.4}]</script>
|
|
1426
|
+
</head>
|
|
1427
|
+
<body>
|
|
1428
|
+
<div id="popost-stage">
|
|
1429
|
+
<div
|
|
1430
|
+
id="root"
|
|
1431
|
+
data-composition-id="liquid-glass"
|
|
1432
|
+
data-width="1920"
|
|
1433
|
+
data-height="1080"
|
|
1434
|
+
data-start="0"
|
|
1435
|
+
data-duration="20"
|
|
1436
|
+
data-root="true"
|
|
1437
|
+
>
|
|
1438
|
+
<canvas
|
|
1439
|
+
id="cap-text"
|
|
1440
|
+
layoutsubtree
|
|
1441
|
+
width="1920"
|
|
1442
|
+
height="1080"
|
|
1443
|
+
style="
|
|
1444
|
+
position: absolute;
|
|
1445
|
+
top: 0;
|
|
1446
|
+
left: 0;
|
|
1447
|
+
width: 1920px;
|
|
1448
|
+
height: 1080px;
|
|
1449
|
+
z-index: -1;
|
|
1450
|
+
pointer-events: none;
|
|
1451
|
+
"
|
|
1452
|
+
>
|
|
1453
|
+
<div class="text-source">
|
|
1454
|
+
<div class="badge">Write HTML → Render Video</div>
|
|
1455
|
+
<h1>Ship videos <span>10x faster</span></h1>
|
|
1456
|
+
<div class="subtitle">
|
|
1457
|
+
HTML is the source of truth for video. No timeline editors, no After Effects — just
|
|
1458
|
+
code.
|
|
1459
|
+
</div>
|
|
1460
|
+
<div class="stats">
|
|
1461
|
+
<div class="stat">
|
|
1462
|
+
<div class="stat-val">47x</div>
|
|
1463
|
+
<div class="stat-label">Faster than AE</div>
|
|
1464
|
+
</div>
|
|
1465
|
+
<div class="stat">
|
|
1466
|
+
<div class="stat-val">12.4K</div>
|
|
1467
|
+
<div class="stat-label">Creators</div>
|
|
1468
|
+
</div>
|
|
1469
|
+
<div class="stat">
|
|
1470
|
+
<div class="stat-val">2.4M</div>
|
|
1471
|
+
<div class="stat-label">Videos Rendered</div>
|
|
1472
|
+
</div>
|
|
1473
|
+
</div>
|
|
1474
|
+
</div>
|
|
1475
|
+
</canvas>
|
|
1476
|
+
|
|
1477
|
+
<canvas
|
|
1478
|
+
id="theater"
|
|
1479
|
+
width="1920"
|
|
1480
|
+
height="1080"
|
|
1481
|
+
style="position: absolute; top: 0; left: 0; width: 1920px; height: 1080px"
|
|
1482
|
+
></canvas>
|
|
1483
|
+
|
|
1484
|
+
<div
|
|
1485
|
+
id="driver"
|
|
1486
|
+
class="clip"
|
|
1487
|
+
data-start="0"
|
|
1488
|
+
data-duration="20"
|
|
1489
|
+
data-track-index="0"
|
|
1490
|
+
style="position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none"
|
|
1491
|
+
></div>
|
|
1492
|
+
</div>
|
|
1493
|
+
|
|
1494
|
+
<script>
|
|
1495
|
+
var W = 1920,
|
|
1496
|
+
H = 1080,
|
|
1497
|
+
DURATION = 20,
|
|
1498
|
+
ASPECT = W / H;
|
|
1499
|
+
var TEXT_Z = -3.08;
|
|
1500
|
+
|
|
1501
|
+
// ── Seeded PRNG ────────────────────────────────────────────────────
|
|
1502
|
+
function seededRandom(seed) {
|
|
1503
|
+
var v = seed >>> 0;
|
|
1504
|
+
return function () {
|
|
1505
|
+
v += 0x6d2b79f5;
|
|
1506
|
+
var m = v;
|
|
1507
|
+
m = Math.imul(m ^ (m >>> 15), m | 1);
|
|
1508
|
+
m ^= m + Math.imul(m ^ (m >>> 7), m | 61);
|
|
1509
|
+
return ((m ^ (m >>> 14)) >>> 0) / 4294967296;
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
// ── Voronoi (self-contained, no d3) ────────────────────────────────
|
|
1514
|
+
function polygonArea(pts) {
|
|
1515
|
+
var a = 0;
|
|
1516
|
+
for (var i = 0; i < pts.length; i++) {
|
|
1517
|
+
var j = (i + 1) % pts.length;
|
|
1518
|
+
a += pts[i][0] * pts[j][1] - pts[j][0] * pts[i][1];
|
|
1519
|
+
}
|
|
1520
|
+
return a * 0.5;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
function polygonCentroid(pts) {
|
|
1524
|
+
var sa = polygonArea(pts) || 1;
|
|
1525
|
+
var cx = 0,
|
|
1526
|
+
cy = 0;
|
|
1527
|
+
for (var i = 0; i < pts.length; i++) {
|
|
1528
|
+
var j = (i + 1) % pts.length;
|
|
1529
|
+
var f = pts[i][0] * pts[j][1] - pts[j][0] * pts[i][1];
|
|
1530
|
+
cx += (pts[i][0] + pts[j][0]) * f;
|
|
1531
|
+
cy += (pts[i][1] + pts[j][1]) * f;
|
|
1532
|
+
}
|
|
1533
|
+
return { x: cx / (6 * sa), y: cy / (6 * sa) };
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
function clipPoly(poly, px, py, nx, ny) {
|
|
1537
|
+
var out = [];
|
|
1538
|
+
for (var i = 0; i < poly.length; i++) {
|
|
1539
|
+
var c = poly[i],
|
|
1540
|
+
n = poly[(i + 1) % poly.length];
|
|
1541
|
+
var dc = (c[0] - px) * nx + (c[1] - py) * ny;
|
|
1542
|
+
var dn = (n[0] - px) * nx + (n[1] - py) * ny;
|
|
1543
|
+
if (dc <= 0) out.push(c);
|
|
1544
|
+
if (dc <= 0 !== dn <= 0) {
|
|
1545
|
+
var t = dc / (dc - dn);
|
|
1546
|
+
out.push([c[0] + t * (n[0] - c[0]), c[1] + t * (n[1] - c[1])]);
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
return out;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
function computeVoronoi(points, xmin, ymin, xmax, ymax) {
|
|
1553
|
+
var cells = [];
|
|
1554
|
+
for (var i = 0; i < points.length; i++) {
|
|
1555
|
+
var px = points[i][0],
|
|
1556
|
+
py = points[i][1];
|
|
1557
|
+
var poly = [
|
|
1558
|
+
[xmin, ymin],
|
|
1559
|
+
[xmax, ymin],
|
|
1560
|
+
[xmax, ymax],
|
|
1561
|
+
[xmin, ymax],
|
|
1562
|
+
];
|
|
1563
|
+
for (var j = 0; j < points.length; j++) {
|
|
1564
|
+
if (i === j) continue;
|
|
1565
|
+
var qx = points[j][0],
|
|
1566
|
+
qy = points[j][1];
|
|
1567
|
+
var mx = (px + qx) * 0.5,
|
|
1568
|
+
my = (py + qy) * 0.5;
|
|
1569
|
+
poly = clipPoly(poly, mx, my, qx - px, qy - py);
|
|
1570
|
+
if (poly.length < 3) break;
|
|
1571
|
+
}
|
|
1572
|
+
cells.push(poly.length >= 3 ? poly : null);
|
|
1573
|
+
}
|
|
1574
|
+
return cells;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
// ── Feature Detection ──────────────────────────────────────────────
|
|
1578
|
+
function canCapture() {
|
|
1579
|
+
var tc = document.createElement("canvas");
|
|
1580
|
+
if (!("layoutSubtree" in tc)) return false;
|
|
1581
|
+
tc.setAttribute("layoutsubtree", "");
|
|
1582
|
+
var ctx = tc.getContext("2d");
|
|
1583
|
+
return ctx && typeof ctx.drawElementImage === "function";
|
|
1584
|
+
}
|
|
1585
|
+
var apiOk = canCapture();
|
|
1586
|
+
|
|
1587
|
+
// ── Capture backdrop ───────────────────────────────────────────────
|
|
1588
|
+
var capCanvas = document.getElementById("cap-text");
|
|
1589
|
+
var capCtx = capCanvas.getContext("2d");
|
|
1590
|
+
var textEl = capCanvas.querySelector(".text-source");
|
|
1591
|
+
|
|
1592
|
+
function captureBackdrop() {
|
|
1593
|
+
capCtx.clearRect(0, 0, W, H);
|
|
1594
|
+
if (apiOk) {
|
|
1595
|
+
capCtx.drawElementImage(textEl, 0, 0, W, H);
|
|
1596
|
+
} else {
|
|
1597
|
+
var g = capCtx.createLinearGradient(0, 0, W, H);
|
|
1598
|
+
g.addColorStop(0, "#030407");
|
|
1599
|
+
g.addColorStop(0.5, "#070910");
|
|
1600
|
+
g.addColorStop(1, "#030407");
|
|
1601
|
+
capCtx.fillStyle = g;
|
|
1602
|
+
capCtx.fillRect(0, 0, W, H);
|
|
1603
|
+
capCtx.textAlign = "center";
|
|
1604
|
+
capCtx.textBaseline = "middle";
|
|
1605
|
+
capCtx.font = "900 172px Inter, system-ui, sans-serif";
|
|
1606
|
+
capCtx.shadowColor = "rgba(255,255,255,0.22)";
|
|
1607
|
+
capCtx.shadowBlur = 20;
|
|
1608
|
+
capCtx.fillStyle = "rgba(248,249,253,0.94)";
|
|
1609
|
+
capCtx.fillText("Liquid Glass", W / 2, H / 2 - 80);
|
|
1610
|
+
capCtx.fillText("Design", W / 2, H / 2 + 90);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
// ── Three.js Renderer ──────────────────────────────────────────────
|
|
1615
|
+
var theaterCanvas = document.getElementById("theater");
|
|
1616
|
+
var renderer = new THREE.WebGLRenderer({
|
|
1617
|
+
canvas: theaterCanvas,
|
|
1618
|
+
antialias: true,
|
|
1619
|
+
alpha: false,
|
|
1620
|
+
powerPreference: "high-performance",
|
|
1621
|
+
preserveDrawingBuffer: true,
|
|
1622
|
+
});
|
|
1623
|
+
renderer.setSize(W, H, false);
|
|
1624
|
+
renderer.setPixelRatio(1);
|
|
1625
|
+
renderer.outputEncoding = THREE.sRGBEncoding;
|
|
1626
|
+
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
|
1627
|
+
renderer.toneMappingExposure = 1.08;
|
|
1628
|
+
renderer.setClearColor(0x030407, 1);
|
|
1629
|
+
|
|
1630
|
+
var scene = new THREE.Scene();
|
|
1631
|
+
scene.background = new THREE.Color(0x030407);
|
|
1632
|
+
|
|
1633
|
+
// ── Environment Map (procedural) ───────────────────────────────────
|
|
1634
|
+
var envCanvas = document.createElement("canvas");
|
|
1635
|
+
envCanvas.width = 1024;
|
|
1636
|
+
envCanvas.height = 512;
|
|
1637
|
+
var ectx = envCanvas.getContext("2d");
|
|
1638
|
+
var eg = ectx.createLinearGradient(0, 0, 1024, 512);
|
|
1639
|
+
eg.addColorStop(0, "#020307");
|
|
1640
|
+
eg.addColorStop(0.18, "#ffffff");
|
|
1641
|
+
eg.addColorStop(0.24, "#7fdcff");
|
|
1642
|
+
eg.addColorStop(0.42, "#07101c");
|
|
1643
|
+
eg.addColorStop(0.58, "#ffffff");
|
|
1644
|
+
eg.addColorStop(0.64, "#ffc4a6");
|
|
1645
|
+
eg.addColorStop(0.82, "#0b0c12");
|
|
1646
|
+
eg.addColorStop(1, "#020307");
|
|
1647
|
+
ectx.fillStyle = eg;
|
|
1648
|
+
ectx.fillRect(0, 0, 1024, 512);
|
|
1649
|
+
ectx.globalCompositeOperation = "screen";
|
|
1650
|
+
var envRng = seededRandom(999);
|
|
1651
|
+
for (var ei = 0; ei < 9; ei++) {
|
|
1652
|
+
var ey = 36 + ei * 52;
|
|
1653
|
+
ectx.fillStyle = "rgba(255,255,255," + (ei % 3 === 0 ? 0.22 : 0.1) + ")";
|
|
1654
|
+
ectx.fillRect((ei % 2) * 120, ey, 1024 * 0.72, 4 + (ei % 3) * 2);
|
|
1655
|
+
}
|
|
1656
|
+
var envTex = new THREE.CanvasTexture(envCanvas);
|
|
1657
|
+
envTex.mapping = THREE.EquirectangularReflectionMapping;
|
|
1658
|
+
var pmrem = new THREE.PMREMGenerator(renderer);
|
|
1659
|
+
var envMap = pmrem.fromEquirectangular(envTex);
|
|
1660
|
+
scene.environment = envMap.texture;
|
|
1661
|
+
envTex.dispose();
|
|
1662
|
+
pmrem.dispose();
|
|
1663
|
+
|
|
1664
|
+
// ── Camera ─────────────────────────────────────────────────────────
|
|
1665
|
+
var CAM_Z = 9.35;
|
|
1666
|
+
var camera = new THREE.PerspectiveCamera(34, ASPECT, 0.1, 80);
|
|
1667
|
+
camera.position.set(0, 0, CAM_Z);
|
|
1668
|
+
|
|
1669
|
+
// ── Scene Groups ───────────────────────────────────────────────────
|
|
1670
|
+
var rig = new THREE.Group();
|
|
1671
|
+
scene.add(rig);
|
|
1672
|
+
var textRig = new THREE.Group();
|
|
1673
|
+
rig.add(textRig);
|
|
1674
|
+
|
|
1675
|
+
// ── Backdrop Plane (text behind glass) ─────────────────────────────
|
|
1676
|
+
var backdropTex = new THREE.CanvasTexture(capCanvas);
|
|
1677
|
+
backdropTex.minFilter = THREE.LinearFilter;
|
|
1678
|
+
backdropTex.magFilter = THREE.LinearFilter;
|
|
1679
|
+
backdropTex.generateMipmaps = false;
|
|
1680
|
+
|
|
1681
|
+
function viewportAtZ(z) {
|
|
1682
|
+
var d = camera.position.z - z;
|
|
1683
|
+
var h = 2 * Math.tan(THREE.MathUtils.degToRad(camera.fov * 0.5)) * d;
|
|
1684
|
+
return { w: h * camera.aspect, h: h };
|
|
1685
|
+
}
|
|
1686
|
+
var vp = viewportAtZ(TEXT_Z);
|
|
1687
|
+
var backdropMesh = new THREE.Mesh(
|
|
1688
|
+
new THREE.PlaneGeometry(vp.w * 1.18, vp.h * 1.18),
|
|
1689
|
+
new THREE.MeshBasicMaterial({ map: backdropTex, depthWrite: true, depthTest: true }),
|
|
1690
|
+
);
|
|
1691
|
+
backdropMesh.position.z = TEXT_Z;
|
|
1692
|
+
backdropMesh.renderOrder = -4;
|
|
1693
|
+
textRig.add(backdropMesh);
|
|
1694
|
+
|
|
1695
|
+
// ── Light Bands ────────────────────────────────────────────────────
|
|
1696
|
+
var bandSpecs = [
|
|
1697
|
+
[-2.8, 1.45, -1.78, 3.2, 0.035, 0.13, 0x9edaff, 0.24],
|
|
1698
|
+
[2.7, -1.24, -1.76, 3.0, 0.032, -0.1, 0xffd1b5, 0.18],
|
|
1699
|
+
[0.0, 2.05, -1.82, 5.2, 0.026, 0.02, 0xffffff, 0.13],
|
|
1700
|
+
[-0.55, -1.92, -1.8, 4.2, 0.024, -0.03, 0xc7f6ff, 0.1],
|
|
1701
|
+
];
|
|
1702
|
+
bandSpecs.forEach(function (s) {
|
|
1703
|
+
var m = new THREE.Mesh(
|
|
1704
|
+
new THREE.PlaneGeometry(s[3], s[4]),
|
|
1705
|
+
new THREE.MeshBasicMaterial({
|
|
1706
|
+
color: s[6],
|
|
1707
|
+
transparent: true,
|
|
1708
|
+
opacity: s[7],
|
|
1709
|
+
blending: THREE.AdditiveBlending,
|
|
1710
|
+
depthWrite: false,
|
|
1711
|
+
}),
|
|
1712
|
+
);
|
|
1713
|
+
m.position.set(s[0], s[1], s[2]);
|
|
1714
|
+
m.rotation.z = s[5];
|
|
1715
|
+
rig.add(m);
|
|
1716
|
+
});
|
|
1717
|
+
|
|
1718
|
+
// ── Glass Shards (Voronoi fracture) ────────────────────────────────
|
|
1719
|
+
var LAYOUT = { width: 9.7, height: 5.78, cols: 9, rows: 6, seed: 5297 };
|
|
1720
|
+
var rng = seededRandom(LAYOUT.seed);
|
|
1721
|
+
var seedPoints = [];
|
|
1722
|
+
var cw = LAYOUT.width / LAYOUT.cols,
|
|
1723
|
+
ch = LAYOUT.height / LAYOUT.rows;
|
|
1724
|
+
|
|
1725
|
+
for (var row = 0; row < LAYOUT.rows; row++) {
|
|
1726
|
+
for (var col = 0; col < LAYOUT.cols; col++) {
|
|
1727
|
+
var cp =
|
|
1728
|
+
1 -
|
|
1729
|
+
Math.min(
|
|
1730
|
+
0.62,
|
|
1731
|
+
Math.hypot((col + 0.5) / LAYOUT.cols - 0.5, (row + 0.5) / LAYOUT.rows - 0.5),
|
|
1732
|
+
);
|
|
1733
|
+
var jx = (rng() - 0.5) * cw * (0.58 + cp * 0.16);
|
|
1734
|
+
var jy = (rng() - 0.5) * ch * (0.58 + cp * 0.16);
|
|
1735
|
+
seedPoints.push([(col + 0.5) * cw + jx, (row + 0.5) * ch + jy]);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
var voronoiCells = computeVoronoi(seedPoints, 0, 0, LAYOUT.width, LAYOUT.height);
|
|
1740
|
+
|
|
1741
|
+
var glassRig = new THREE.Group();
|
|
1742
|
+
glassRig.scale.setScalar(1.025);
|
|
1743
|
+
glassRig.position.set(0, 0, 0.08);
|
|
1744
|
+
rig.add(glassRig);
|
|
1745
|
+
|
|
1746
|
+
var panes = [];
|
|
1747
|
+
var GAP_SCALE = 0.954;
|
|
1748
|
+
|
|
1749
|
+
for (var pi = 0; pi < voronoiCells.length; pi++) {
|
|
1750
|
+
var cell = voronoiCells[pi];
|
|
1751
|
+
if (!cell || cell.length < 3) continue;
|
|
1752
|
+
|
|
1753
|
+
var worldPts = cell.map(function (p) {
|
|
1754
|
+
return [p[0] - LAYOUT.width / 2, LAYOUT.height / 2 - p[1]];
|
|
1755
|
+
});
|
|
1756
|
+
var area = Math.abs(polygonArea(worldPts));
|
|
1757
|
+
if (area < 0.034) continue;
|
|
1758
|
+
|
|
1759
|
+
var cent = polygonCentroid(worldPts);
|
|
1760
|
+
var rad = new THREE.Vector2(cent.x, cent.y);
|
|
1761
|
+
var radLen = Math.max(rad.length(), 0.001);
|
|
1762
|
+
rad.divideScalar(radLen);
|
|
1763
|
+
|
|
1764
|
+
var localPts = worldPts.map(function (p) {
|
|
1765
|
+
return [(p[0] - cent.x) * GAP_SCALE, (p[1] - cent.y) * GAP_SCALE];
|
|
1766
|
+
});
|
|
1767
|
+
var outward = 0.046 + rng() * 0.105;
|
|
1768
|
+
var depthLift = (area / (LAYOUT.width * LAYOUT.height)) * 1.42;
|
|
1769
|
+
var phase = pi * 0.71 + rng() * 4;
|
|
1770
|
+
var depth = 0.18 + rng() * 0.1;
|
|
1771
|
+
var bevel = Math.min(0.108, Math.sqrt(area) * 0.095);
|
|
1772
|
+
var roughness = pi % 7 === 0 ? 0.08 + rng() * 0.035 : 0.012 + rng() * 0.038;
|
|
1773
|
+
var thickness = 1.45 + rng() * 1.25;
|
|
1774
|
+
|
|
1775
|
+
// Geometry
|
|
1776
|
+
var shape = new THREE.Shape();
|
|
1777
|
+
localPts.forEach(function (p, idx) {
|
|
1778
|
+
idx === 0 ? shape.moveTo(p[0], p[1]) : shape.lineTo(p[0], p[1]);
|
|
1779
|
+
});
|
|
1780
|
+
shape.closePath();
|
|
1781
|
+
var geo = new THREE.ExtrudeGeometry(shape, {
|
|
1782
|
+
depth: depth,
|
|
1783
|
+
bevelEnabled: true,
|
|
1784
|
+
bevelThickness: bevel,
|
|
1785
|
+
bevelSize: bevel,
|
|
1786
|
+
bevelSegments: 9,
|
|
1787
|
+
curveSegments: 2,
|
|
1788
|
+
steps: 2,
|
|
1789
|
+
});
|
|
1790
|
+
geo.center();
|
|
1791
|
+
geo.computeVertexNormals();
|
|
1792
|
+
|
|
1793
|
+
// Material
|
|
1794
|
+
var mat = new THREE.MeshPhysicalMaterial({
|
|
1795
|
+
color: 0xf7fbff,
|
|
1796
|
+
metalness: 0,
|
|
1797
|
+
roughness: roughness,
|
|
1798
|
+
transmission: 1,
|
|
1799
|
+
thickness: thickness,
|
|
1800
|
+
ior: 1.55,
|
|
1801
|
+
attenuationColor: new THREE.Color(0xe5f8ff),
|
|
1802
|
+
attenuationDistance: 12,
|
|
1803
|
+
clearcoat: 1,
|
|
1804
|
+
clearcoatRoughness: Math.min(0.12, roughness + 0.035),
|
|
1805
|
+
specularIntensity: 1,
|
|
1806
|
+
envMapIntensity: 2.1,
|
|
1807
|
+
transparent: true,
|
|
1808
|
+
opacity: 0.76,
|
|
1809
|
+
side: THREE.DoubleSide,
|
|
1810
|
+
});
|
|
1811
|
+
|
|
1812
|
+
var pane = new THREE.Group();
|
|
1813
|
+
var mesh = new THREE.Mesh(geo, mat);
|
|
1814
|
+
mesh.renderOrder = 4 + pi;
|
|
1815
|
+
pane.add(mesh);
|
|
1816
|
+
|
|
1817
|
+
// Edge highlights (white + cyan + pink for chromatic aberration look)
|
|
1818
|
+
var edgeGeo = new THREE.EdgesGeometry(geo, 18);
|
|
1819
|
+
var whiteEdge = new THREE.LineSegments(
|
|
1820
|
+
edgeGeo,
|
|
1821
|
+
new THREE.LineBasicMaterial({
|
|
1822
|
+
color: 0xffffff,
|
|
1823
|
+
transparent: true,
|
|
1824
|
+
opacity: roughness > 0.08 ? 0.32 : 0.44,
|
|
1825
|
+
blending: THREE.AdditiveBlending,
|
|
1826
|
+
depthWrite: false,
|
|
1827
|
+
}),
|
|
1828
|
+
);
|
|
1829
|
+
pane.add(whiteEdge);
|
|
1830
|
+
var cyanEdge = new THREE.LineSegments(
|
|
1831
|
+
edgeGeo.clone(),
|
|
1832
|
+
new THREE.LineBasicMaterial({
|
|
1833
|
+
color: 0x72e8ff,
|
|
1834
|
+
transparent: true,
|
|
1835
|
+
opacity: 0.18,
|
|
1836
|
+
blending: THREE.AdditiveBlending,
|
|
1837
|
+
depthWrite: false,
|
|
1838
|
+
}),
|
|
1839
|
+
);
|
|
1840
|
+
cyanEdge.position.set(0.008, -0.002, -0.008);
|
|
1841
|
+
pane.add(cyanEdge);
|
|
1842
|
+
var pinkEdge = new THREE.LineSegments(
|
|
1843
|
+
edgeGeo.clone(),
|
|
1844
|
+
new THREE.LineBasicMaterial({
|
|
1845
|
+
color: 0xff6f8d,
|
|
1846
|
+
transparent: true,
|
|
1847
|
+
opacity: 0.14,
|
|
1848
|
+
blending: THREE.AdditiveBlending,
|
|
1849
|
+
depthWrite: false,
|
|
1850
|
+
}),
|
|
1851
|
+
);
|
|
1852
|
+
pinkEdge.position.set(-0.009, 0.003, 0.006);
|
|
1853
|
+
pane.add(pinkEdge);
|
|
1854
|
+
|
|
1855
|
+
var basePos = new THREE.Vector3(
|
|
1856
|
+
cent.x + rad.x * outward,
|
|
1857
|
+
cent.y + rad.y * outward,
|
|
1858
|
+
0.28 + depthLift + rng() * 0.18,
|
|
1859
|
+
);
|
|
1860
|
+
var baseRot = new THREE.Euler(
|
|
1861
|
+
(rng() - 0.5) * 0.074,
|
|
1862
|
+
(rng() - 0.5) * 0.086,
|
|
1863
|
+
(rng() - 0.5) * 0.052,
|
|
1864
|
+
);
|
|
1865
|
+
pane.position.copy(basePos);
|
|
1866
|
+
pane.rotation.copy(baseRot);
|
|
1867
|
+
|
|
1868
|
+
pane.userData = {
|
|
1869
|
+
basePos: basePos.clone(),
|
|
1870
|
+
baseRot: { x: baseRot.x, y: baseRot.y, z: baseRot.z },
|
|
1871
|
+
phase: phase,
|
|
1872
|
+
speed: 0.28 + rng() * 0.16,
|
|
1873
|
+
drift: new THREE.Vector3(
|
|
1874
|
+
0.02 + rng() * 0.026,
|
|
1875
|
+
0.018 + rng() * 0.024,
|
|
1876
|
+
0.068 + rng() * 0.092,
|
|
1877
|
+
),
|
|
1878
|
+
rotDrift: new THREE.Vector3(
|
|
1879
|
+
0.016 + rng() * 0.026,
|
|
1880
|
+
0.018 + rng() * 0.03,
|
|
1881
|
+
0.008 + rng() * 0.016,
|
|
1882
|
+
),
|
|
1883
|
+
ptrWeight: 0.04 + rng() * 0.052,
|
|
1884
|
+
rad: rad.clone(),
|
|
1885
|
+
baseOpacity: 0.76,
|
|
1886
|
+
baseRoughness: roughness,
|
|
1887
|
+
glassMat: mat,
|
|
1888
|
+
edgeW: whiteEdge.material,
|
|
1889
|
+
edgeC: cyanEdge.material,
|
|
1890
|
+
edgeP: pinkEdge.material,
|
|
1891
|
+
edgeWBase: whiteEdge.material.opacity,
|
|
1892
|
+
edgeCBase: cyanEdge.material.opacity,
|
|
1893
|
+
edgePBase: pinkEdge.material.opacity,
|
|
1894
|
+
};
|
|
1895
|
+
|
|
1896
|
+
panes.push(pane);
|
|
1897
|
+
glassRig.add(pane);
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
// ── Lighting ───────────────────────────────────────────────────────
|
|
1901
|
+
scene.add(new THREE.HemisphereLight(0xe8f0ff, 0x07040b, 1.1));
|
|
1902
|
+
var keyLight = new THREE.DirectionalLight(0xffffff, 3.4);
|
|
1903
|
+
keyLight.position.set(-3.8, 4.4, 5.6);
|
|
1904
|
+
scene.add(keyLight);
|
|
1905
|
+
var edgeLight = new THREE.PointLight(0x8bdcff, 14, 12);
|
|
1906
|
+
edgeLight.position.set(3.1, 1.4, 3.4);
|
|
1907
|
+
scene.add(edgeLight);
|
|
1908
|
+
var warmLight = new THREE.PointLight(0xffc8a8, 7, 12);
|
|
1909
|
+
warmLight.position.set(-4.4, -2.2, 3.2);
|
|
1910
|
+
scene.add(warmLight);
|
|
1911
|
+
|
|
1912
|
+
// ── Post-Processing ────────────────────────────────────────────────
|
|
1913
|
+
var GrainShader = {
|
|
1914
|
+
uniforms: { tDiffuse: { value: null }, time: { value: 0 }, strength: { value: 0.024 } },
|
|
1915
|
+
vertexShader:
|
|
1916
|
+
"varying vec2 vUv; void main(){ vUv=uv; gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0); }",
|
|
1917
|
+
fragmentShader: [
|
|
1918
|
+
"uniform sampler2D tDiffuse; uniform float time; uniform float strength; varying vec2 vUv;",
|
|
1919
|
+
"float n(vec2 v){ return fract(sin(dot(v+time,vec2(12.9898,78.233)))*43758.5453); }",
|
|
1920
|
+
"void main(){",
|
|
1921
|
+
" vec4 c=texture2D(tDiffuse,vUv);",
|
|
1922
|
+
" c.rgb+=(n(vUv*vec2(1520.0,940.0))-0.5)*strength;",
|
|
1923
|
+
" c.rgb=pow(max(c.rgb,vec3(0.0)),vec3(0.985));",
|
|
1924
|
+
" gl_FragColor=c;",
|
|
1925
|
+
"}",
|
|
1926
|
+
].join("\n"),
|
|
1927
|
+
};
|
|
1928
|
+
|
|
1929
|
+
var composer = new THREE.EffectComposer(renderer);
|
|
1930
|
+
composer.addPass(new THREE.RenderPass(scene, camera));
|
|
1931
|
+
var bloomPass = new THREE.UnrealBloomPass(new THREE.Vector2(W, H), 0.32, 0.4, 0.86);
|
|
1932
|
+
composer.addPass(bloomPass);
|
|
1933
|
+
var grainPass = new THREE.ShaderPass(GrainShader);
|
|
1934
|
+
composer.addPass(grainPass);
|
|
1935
|
+
|
|
1936
|
+
// ── Pointer State (GSAP-animated, replaces mouse) ──────────────────
|
|
1937
|
+
var ptr = { x: 0.16, y: 0.04 };
|
|
1938
|
+
var REVEAL_R = 2.18;
|
|
1939
|
+
var PTR_WORLD = new THREE.Vector2();
|
|
1940
|
+
|
|
1941
|
+
function updatePtrWorld() {
|
|
1942
|
+
PTR_WORLD.set(ptr.x * 4.86, ptr.y * 2.84);
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
// ── Render Function (deterministic, seekable) ──────────────────────
|
|
1946
|
+
function renderScene(elapsed) {
|
|
1947
|
+
updatePtrWorld();
|
|
1948
|
+
|
|
1949
|
+
camera.position.x = ptr.x * 0.38;
|
|
1950
|
+
camera.position.y = -ptr.y * 0.27;
|
|
1951
|
+
camera.position.z = CAM_Z;
|
|
1952
|
+
camera.lookAt(0, 0, 0);
|
|
1953
|
+
|
|
1954
|
+
textRig.position.x = -ptr.x * 0.56;
|
|
1955
|
+
textRig.position.y = ptr.y * 0.36;
|
|
1956
|
+
textRig.position.z = Math.sin(elapsed * 0.28) * 0.018;
|
|
1957
|
+
textRig.rotation.x = ptr.y * 0.028;
|
|
1958
|
+
textRig.rotation.y = ptr.x * 0.042;
|
|
1959
|
+
|
|
1960
|
+
glassRig.rotation.x = -ptr.y * 0.064;
|
|
1961
|
+
glassRig.rotation.y = ptr.x * 0.078;
|
|
1962
|
+
|
|
1963
|
+
edgeLight.position.x = 3.1 + ptr.x * 0.9;
|
|
1964
|
+
edgeLight.position.y = 1.4 + ptr.y * 0.55;
|
|
1965
|
+
warmLight.position.x = -4.4 - ptr.x * 0.65;
|
|
1966
|
+
|
|
1967
|
+
for (var i = 0; i < panes.length; i++) {
|
|
1968
|
+
var pane = panes[i];
|
|
1969
|
+
var d = pane.userData;
|
|
1970
|
+
var t = elapsed * d.speed + d.phase;
|
|
1971
|
+
var ptrDist = PTR_WORLD.distanceTo(new THREE.Vector2(d.basePos.x, d.basePos.y));
|
|
1972
|
+
var reveal = Math.pow(Math.max(0, 1 - ptrDist / REVEAL_R), 2);
|
|
1973
|
+
var shatter = reveal * 0.36;
|
|
1974
|
+
var awayX = d.basePos.x - PTR_WORLD.x;
|
|
1975
|
+
var awayY = d.basePos.y - PTR_WORLD.y;
|
|
1976
|
+
var awayLen = Math.max(Math.hypot(awayX, awayY), 0.001);
|
|
1977
|
+
var revealSpread = reveal * 0.24;
|
|
1978
|
+
var shatterSpread = shatter * 0.68;
|
|
1979
|
+
var pSlide = d.ptrWeight * 1.9;
|
|
1980
|
+
|
|
1981
|
+
pane.position.x =
|
|
1982
|
+
d.basePos.x +
|
|
1983
|
+
Math.sin(t * 0.42) * d.drift.x +
|
|
1984
|
+
ptr.x * pSlide +
|
|
1985
|
+
(awayX / awayLen) * (revealSpread + shatterSpread);
|
|
1986
|
+
pane.position.y =
|
|
1987
|
+
d.basePos.y +
|
|
1988
|
+
Math.cos(t * 0.38) * d.drift.y -
|
|
1989
|
+
ptr.y * pSlide * 0.72 +
|
|
1990
|
+
(awayY / awayLen) * (revealSpread + shatterSpread * 0.84);
|
|
1991
|
+
pane.position.z =
|
|
1992
|
+
d.basePos.z + Math.sin(t * 0.52 + i) * d.drift.z + reveal * 0.32 + shatter * 0.74;
|
|
1993
|
+
|
|
1994
|
+
pane.rotation.x =
|
|
1995
|
+
d.baseRot.x +
|
|
1996
|
+
Math.sin(t * 0.46) * d.rotDrift.x -
|
|
1997
|
+
ptr.y * d.ptrWeight * 1.15 +
|
|
1998
|
+
reveal * (awayY / awayLen) * 0.16 +
|
|
1999
|
+
shatter * (awayY / awayLen) * 0.58;
|
|
2000
|
+
pane.rotation.y =
|
|
2001
|
+
d.baseRot.y +
|
|
2002
|
+
Math.cos(t * 0.43) * d.rotDrift.y +
|
|
2003
|
+
ptr.x * d.ptrWeight * 1.38 -
|
|
2004
|
+
reveal * (awayX / awayLen) * 0.2 -
|
|
2005
|
+
shatter * (awayX / awayLen) * 0.66;
|
|
2006
|
+
pane.rotation.z =
|
|
2007
|
+
d.baseRot.z +
|
|
2008
|
+
Math.sin(t * 0.34) * d.rotDrift.z +
|
|
2009
|
+
reveal * Math.sin(t + i) * 0.028 +
|
|
2010
|
+
shatter * (d.rad.x * awayY - d.rad.y * awayX) * 0.18;
|
|
2011
|
+
|
|
2012
|
+
d.glassMat.opacity = d.baseOpacity + shatter * 0.14;
|
|
2013
|
+
d.glassMat.roughness = Math.min(0.14, d.baseRoughness + shatter * 0.048);
|
|
2014
|
+
d.edgeW.opacity = d.edgeWBase + shatter * 0.34;
|
|
2015
|
+
d.edgeC.opacity = d.edgeCBase + shatter * 0.22;
|
|
2016
|
+
d.edgeP.opacity = d.edgePBase + shatter * 0.2;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
grainPass.uniforms.time.value = elapsed;
|
|
2020
|
+
composer.render();
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
// ── GSAP Timeline ──────────────────────────────────────────────────
|
|
2024
|
+
window.__timelines = window.__timelines || {};
|
|
2025
|
+
var tl = gsap.timeline({ paused: true });
|
|
2026
|
+
|
|
2027
|
+
tl.to({ _: 0 }, { _: 1, duration: DURATION, ease: "none" }, 0);
|
|
2028
|
+
|
|
2029
|
+
// Pointer choreography — smooth wandering reveal
|
|
2030
|
+
tl.set(ptr, { x: 0.16, y: 0.04 }, 0);
|
|
2031
|
+
tl.to(ptr, { x: 0.45, y: -0.15, duration: 3.5, ease: "sine.inOut" }, 0.5);
|
|
2032
|
+
tl.to(ptr, { x: -0.35, y: 0.25, duration: 3.5, ease: "sine.inOut" }, 4);
|
|
2033
|
+
tl.to(ptr, { x: 0.15, y: -0.35, duration: 3, ease: "sine.inOut" }, 7.5);
|
|
2034
|
+
tl.to(ptr, { x: -0.45, y: 0.05, duration: 3, ease: "sine.inOut" }, 10.5);
|
|
2035
|
+
tl.to(ptr, { x: 0.3, y: 0.2, duration: 3, ease: "sine.inOut" }, 13.5);
|
|
2036
|
+
tl.to(ptr, { x: -0.1, y: -0.1, duration: 2.5, ease: "sine.inOut" }, 16.5);
|
|
2037
|
+
tl.to(ptr, { x: 0.16, y: 0.04, duration: 1, ease: "power2.inOut" }, 19);
|
|
2038
|
+
|
|
2039
|
+
tl.eventCallback("onUpdate", function () {
|
|
2040
|
+
renderScene(tl.time());
|
|
2041
|
+
});
|
|
2042
|
+
|
|
2043
|
+
window.__timelines["liquid-glass"] = tl;
|
|
2044
|
+
|
|
2045
|
+
window.__popostLater(function () {
|
|
2046
|
+
captureBackdrop();
|
|
2047
|
+
backdropTex.needsUpdate = true;
|
|
2048
|
+
tl.seek(0);
|
|
2049
|
+
}, 0);
|
|
2050
|
+
</script>
|
|
2051
|
+
</div>
|
|
2052
|
+
<script>window.__popostFit();</script>
|
|
2053
|
+
</body>
|
|
2054
|
+
</html>
|