@vysmo/transitions 0.1.0
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 +21 -0
- package/README.md +618 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/inputs/normalize.d.ts +2 -0
- package/dist/inputs/normalize.d.ts.map +1 -0
- package/dist/inputs/normalize.js +2 -0
- package/dist/inputs/normalize.js.map +1 -0
- package/dist/runner/gl.d.ts +7 -0
- package/dist/runner/gl.d.ts.map +1 -0
- package/dist/runner/gl.js +59 -0
- package/dist/runner/gl.js.map +1 -0
- package/dist/runner/mesh.d.ts +28 -0
- package/dist/runner/mesh.d.ts.map +1 -0
- package/dist/runner/mesh.js +96 -0
- package/dist/runner/mesh.js.map +1 -0
- package/dist/runner/runner.d.ts +107 -0
- package/dist/runner/runner.d.ts.map +1 -0
- package/dist/runner/runner.js +410 -0
- package/dist/runner/runner.js.map +1 -0
- package/dist/transitions/all.d.ts +9 -0
- package/dist/transitions/all.d.ts.map +1 -0
- package/dist/transitions/all.js +129 -0
- package/dist/transitions/all.js.map +1 -0
- package/dist/transitions/bloom-reveal.d.ts +27 -0
- package/dist/transitions/bloom-reveal.d.ts.map +1 -0
- package/dist/transitions/bloom-reveal.js +106 -0
- package/dist/transitions/bloom-reveal.js.map +1 -0
- package/dist/transitions/chromatic-pulse.d.ts +4 -0
- package/dist/transitions/chromatic-pulse.d.ts.map +1 -0
- package/dist/transitions/chromatic-pulse.js +40 -0
- package/dist/transitions/chromatic-pulse.js.map +1 -0
- package/dist/transitions/clock-wipe.d.ts +6 -0
- package/dist/transitions/clock-wipe.d.ts.map +1 -0
- package/dist/transitions/clock-wipe.js +33 -0
- package/dist/transitions/clock-wipe.js.map +1 -0
- package/dist/transitions/color-phase.d.ts +10 -0
- package/dist/transitions/color-phase.d.ts.map +1 -0
- package/dist/transitions/color-phase.js +24 -0
- package/dist/transitions/color-phase.js.map +1 -0
- package/dist/transitions/colour-distance.d.ts.map +1 -0
- package/dist/transitions/cross-warp.d.ts.map +1 -0
- package/dist/transitions/cross-zoom.d.ts +5 -0
- package/dist/transitions/cross-zoom.d.ts.map +1 -0
- package/dist/transitions/cross-zoom.js +59 -0
- package/dist/transitions/cross-zoom.js.map +1 -0
- package/dist/transitions/crosshatch.d.ts +12 -0
- package/dist/transitions/crosshatch.d.ts.map +1 -0
- package/dist/transitions/crosshatch.js +49 -0
- package/dist/transitions/crosshatch.js.map +1 -0
- package/dist/transitions/define.d.ts +35 -0
- package/dist/transitions/define.d.ts.map +1 -0
- package/dist/transitions/define.js +37 -0
- package/dist/transitions/define.js.map +1 -0
- package/dist/transitions/directional-burn.d.ts +14 -0
- package/dist/transitions/directional-burn.d.ts.map +1 -0
- package/dist/transitions/directional-burn.js +67 -0
- package/dist/transitions/directional-burn.js.map +1 -0
- package/dist/transitions/directional-warp.d.ts +12 -0
- package/dist/transitions/directional-warp.d.ts.map +1 -0
- package/dist/transitions/directional-warp.js +46 -0
- package/dist/transitions/directional-warp.js.map +1 -0
- package/dist/transitions/dissolve.d.ts +2 -0
- package/dist/transitions/dissolve.d.ts.map +1 -0
- package/dist/transitions/dissolve.js +16 -0
- package/dist/transitions/dissolve.js.map +1 -0
- package/dist/transitions/dreamy-zoom.d.ts +25 -0
- package/dist/transitions/dreamy-zoom.d.ts.map +1 -0
- package/dist/transitions/dreamy-zoom.js +66 -0
- package/dist/transitions/dreamy-zoom.js.map +1 -0
- package/dist/transitions/dreamy.d.ts +8 -0
- package/dist/transitions/dreamy.d.ts.map +1 -0
- package/dist/transitions/dreamy.js +26 -0
- package/dist/transitions/dreamy.js.map +1 -0
- package/dist/transitions/drip-wipe.d.ts +22 -0
- package/dist/transitions/drip-wipe.d.ts.map +1 -0
- package/dist/transitions/drip-wipe.js +109 -0
- package/dist/transitions/drip-wipe.js.map +1 -0
- package/dist/transitions/ember-scatter.d.ts +22 -0
- package/dist/transitions/ember-scatter.d.ts.map +1 -0
- package/dist/transitions/ember-scatter.js +94 -0
- package/dist/transitions/ember-scatter.js.map +1 -0
- package/dist/transitions/film-burn.d.ts +17 -0
- package/dist/transitions/film-burn.d.ts.map +1 -0
- package/dist/transitions/film-burn.js +101 -0
- package/dist/transitions/film-burn.js.map +1 -0
- package/dist/transitions/film-grain.d.ts +24 -0
- package/dist/transitions/film-grain.d.ts.map +1 -0
- package/dist/transitions/film-grain.js +78 -0
- package/dist/transitions/film-grain.js.map +1 -0
- package/dist/transitions/flow-warp.d.ts +20 -0
- package/dist/transitions/flow-warp.d.ts.map +1 -0
- package/dist/transitions/flow-warp.js +51 -0
- package/dist/transitions/flow-warp.js.map +1 -0
- package/dist/transitions/fluid-flow.d.ts +26 -0
- package/dist/transitions/fluid-flow.d.ts.map +1 -0
- package/dist/transitions/fluid-flow.js +94 -0
- package/dist/transitions/fluid-flow.js.map +1 -0
- package/dist/transitions/fly-eye.d.ts.map +1 -0
- package/dist/transitions/fly-eye.js +58 -0
- package/dist/transitions/fly-eye.js.map +1 -0
- package/dist/transitions/glass-shatter.d.ts +25 -0
- package/dist/transitions/glass-shatter.d.ts.map +1 -0
- package/dist/transitions/glass-shatter.js +86 -0
- package/dist/transitions/glass-shatter.js.map +1 -0
- package/dist/transitions/glitch.d.ts +6 -0
- package/dist/transitions/glitch.d.ts.map +1 -0
- package/dist/transitions/glitch.js +59 -0
- package/dist/transitions/glitch.js.map +1 -0
- package/dist/transitions/god-rays-reveal.d.ts +32 -0
- package/dist/transitions/god-rays-reveal.d.ts.map +1 -0
- package/dist/transitions/god-rays-reveal.js +110 -0
- package/dist/transitions/god-rays-reveal.js.map +1 -0
- package/dist/transitions/gravity-pull.d.ts +16 -0
- package/dist/transitions/gravity-pull.d.ts.map +1 -0
- package/dist/transitions/gravity-pull.js +65 -0
- package/dist/transitions/gravity-pull.js.map +1 -0
- package/dist/transitions/grid-reveal.d.ts +12 -0
- package/dist/transitions/grid-reveal.d.ts.map +1 -0
- package/dist/transitions/grid-reveal.js +53 -0
- package/dist/transitions/grid-reveal.js.map +1 -0
- package/dist/transitions/heat-haze.d.ts +13 -0
- package/dist/transitions/heat-haze.d.ts.map +1 -0
- package/dist/transitions/heat-haze.js +51 -0
- package/dist/transitions/heat-haze.js.map +1 -0
- package/dist/transitions/index.d.ts +64 -0
- package/dist/transitions/index.d.ts.map +1 -0
- package/dist/transitions/index.js +63 -0
- package/dist/transitions/index.js.map +1 -0
- package/dist/transitions/ink-bloom.d.ts +15 -0
- package/dist/transitions/ink-bloom.d.ts.map +1 -0
- package/dist/transitions/ink-bloom.js +76 -0
- package/dist/transitions/ink-bloom.js.map +1 -0
- package/dist/transitions/ink-diffuse.d.ts +26 -0
- package/dist/transitions/ink-diffuse.d.ts.map +1 -0
- package/dist/transitions/ink-diffuse.js +90 -0
- package/dist/transitions/ink-diffuse.js.map +1 -0
- package/dist/transitions/iris-zoom.d.ts +13 -0
- package/dist/transitions/iris-zoom.d.ts.map +1 -0
- package/dist/transitions/iris-zoom.js +67 -0
- package/dist/transitions/iris-zoom.js.map +1 -0
- package/dist/transitions/kinetic-bands.d.ts +7 -0
- package/dist/transitions/kinetic-bands.d.ts.map +1 -0
- package/dist/transitions/kinetic-bands.js +58 -0
- package/dist/transitions/kinetic-bands.js.map +1 -0
- package/dist/transitions/lenticular-flip.d.ts +22 -0
- package/dist/transitions/lenticular-flip.d.ts.map +1 -0
- package/dist/transitions/lenticular-flip.js +73 -0
- package/dist/transitions/lenticular-flip.js.map +1 -0
- package/dist/transitions/light-leak.d.ts +7 -0
- package/dist/transitions/light-leak.d.ts.map +1 -0
- package/dist/transitions/light-leak.js +43 -0
- package/dist/transitions/light-leak.js.map +1 -0
- package/dist/transitions/lightning-strike.d.ts +22 -0
- package/dist/transitions/lightning-strike.d.ts.map +1 -0
- package/dist/transitions/lightning-strike.js +90 -0
- package/dist/transitions/lightning-strike.js.map +1 -0
- package/dist/transitions/linear-blur.d.ts +11 -0
- package/dist/transitions/linear-blur.d.ts.map +1 -0
- package/dist/transitions/linear-blur.js +40 -0
- package/dist/transitions/linear-blur.js.map +1 -0
- package/dist/transitions/liquid-chrome.d.ts +22 -0
- package/dist/transitions/liquid-chrome.d.ts.map +1 -0
- package/dist/transitions/liquid-chrome.js +114 -0
- package/dist/transitions/liquid-chrome.js.map +1 -0
- package/dist/transitions/liquid-morph.d.ts +6 -0
- package/dist/transitions/liquid-morph.d.ts.map +1 -0
- package/dist/transitions/liquid-morph.js +50 -0
- package/dist/transitions/liquid-morph.js.map +1 -0
- package/dist/transitions/lumina-melt.d.ts +11 -0
- package/dist/transitions/lumina-melt.d.ts.map +1 -0
- package/dist/transitions/lumina-melt.js +36 -0
- package/dist/transitions/lumina-melt.js.map +1 -0
- package/dist/transitions/mosaic.d.ts +13 -0
- package/dist/transitions/mosaic.d.ts.map +1 -0
- package/dist/transitions/mosaic.js +58 -0
- package/dist/transitions/mosaic.js.map +1 -0
- package/dist/transitions/noise-dissolve.d.ts +5 -0
- package/dist/transitions/noise-dissolve.d.ts.map +1 -0
- package/dist/transitions/noise-dissolve.js +41 -0
- package/dist/transitions/noise-dissolve.js.map +1 -0
- package/dist/transitions/page-curl.d.ts +32 -0
- package/dist/transitions/page-curl.d.ts.map +1 -0
- package/dist/transitions/page-curl.js +165 -0
- package/dist/transitions/page-curl.js.map +1 -0
- package/dist/transitions/paint-bleed.d.ts +12 -0
- package/dist/transitions/paint-bleed.d.ts.map +1 -0
- package/dist/transitions/paint-bleed.js +59 -0
- package/dist/transitions/paint-bleed.js.map +1 -0
- package/dist/transitions/particle-assemble.d.ts +23 -0
- package/dist/transitions/particle-assemble.d.ts.map +1 -0
- package/dist/transitions/particle-assemble.js +65 -0
- package/dist/transitions/particle-assemble.js.map +1 -0
- package/dist/transitions/pinwheel.d.ts +11 -0
- package/dist/transitions/pinwheel.d.ts.map +1 -0
- package/dist/transitions/pinwheel.js +40 -0
- package/dist/transitions/pinwheel.js.map +1 -0
- package/dist/transitions/pixelate.d.ts +4 -0
- package/dist/transitions/pixelate.d.ts.map +1 -0
- package/dist/transitions/pixelate.js +26 -0
- package/dist/transitions/pixelate.js.map +1 -0
- package/dist/transitions/plasma-pulse.d.ts.map +1 -0
- package/dist/transitions/plasma-pulse.js +92 -0
- package/dist/transitions/plasma-pulse.js.map +1 -0
- package/dist/transitions/polka-dots-curtain.d.ts +13 -0
- package/dist/transitions/polka-dots-curtain.d.ts.map +1 -0
- package/dist/transitions/polka-dots-curtain.js +46 -0
- package/dist/transitions/polka-dots-curtain.js.map +1 -0
- package/dist/transitions/polygon-flip.d.ts +27 -0
- package/dist/transitions/polygon-flip.d.ts.map +1 -0
- package/dist/transitions/polygon-flip.js +97 -0
- package/dist/transitions/polygon-flip.js.map +1 -0
- package/dist/transitions/portal-dive.d.ts +18 -0
- package/dist/transitions/portal-dive.d.ts.map +1 -0
- package/dist/transitions/portal-dive.js +83 -0
- package/dist/transitions/portal-dive.js.map +1 -0
- package/dist/transitions/prism-split.d.ts +12 -0
- package/dist/transitions/prism-split.d.ts.map +1 -0
- package/dist/transitions/prism-split.js +52 -0
- package/dist/transitions/prism-split.js.map +1 -0
- package/dist/transitions/push.d.ts +4 -0
- package/dist/transitions/push.d.ts.map +1 -0
- package/dist/transitions/push.js +34 -0
- package/dist/transitions/push.js.map +1 -0
- package/dist/transitions/radial-reveal.d.ts +5 -0
- package/dist/transitions/radial-reveal.d.ts.map +1 -0
- package/dist/transitions/radial-reveal.js +31 -0
- package/dist/transitions/radial-reveal.js.map +1 -0
- package/dist/transitions/ripple-wave.d.ts +24 -0
- package/dist/transitions/ripple-wave.d.ts.map +1 -0
- package/dist/transitions/ripple-wave.js +135 -0
- package/dist/transitions/ripple-wave.js.map +1 -0
- package/dist/transitions/ripple.d.ts +7 -0
- package/dist/transitions/ripple.d.ts.map +1 -0
- package/dist/transitions/ripple.js +43 -0
- package/dist/transitions/ripple.js.map +1 -0
- package/dist/transitions/shape-reveal.d.ts +12 -0
- package/dist/transitions/shape-reveal.d.ts.map +1 -0
- package/dist/transitions/shape-reveal.js +53 -0
- package/dist/transitions/shape-reveal.js.map +1 -0
- package/dist/transitions/shockwave.d.ts +10 -0
- package/dist/transitions/shockwave.d.ts.map +1 -0
- package/dist/transitions/shockwave.js +56 -0
- package/dist/transitions/shockwave.js.map +1 -0
- package/dist/transitions/singularity.d.ts +22 -0
- package/dist/transitions/singularity.d.ts.map +1 -0
- package/dist/transitions/singularity.js +59 -0
- package/dist/transitions/singularity.js.map +1 -0
- package/dist/transitions/slide.d.ts +10 -0
- package/dist/transitions/slide.d.ts.map +1 -0
- package/dist/transitions/slide.js +76 -0
- package/dist/transitions/slide.js.map +1 -0
- package/dist/transitions/smoldering-edge.d.ts +15 -0
- package/dist/transitions/smoldering-edge.d.ts.map +1 -0
- package/dist/transitions/smoldering-edge.js +74 -0
- package/dist/transitions/smoldering-edge.js.map +1 -0
- package/dist/transitions/split.d.ts +14 -0
- package/dist/transitions/split.d.ts.map +1 -0
- package/dist/transitions/split.js +53 -0
- package/dist/transitions/split.js.map +1 -0
- package/dist/transitions/swirl.d.ts +12 -0
- package/dist/transitions/swirl.d.ts.map +1 -0
- package/dist/transitions/swirl.js +42 -0
- package/dist/transitions/swirl.js.map +1 -0
- package/dist/transitions/tangent-motion-blur.d.ts +13 -0
- package/dist/transitions/tangent-motion-blur.d.ts.map +1 -0
- package/dist/transitions/tangent-motion-blur.js +58 -0
- package/dist/transitions/tangent-motion-blur.js.map +1 -0
- package/dist/transitions/tile-scatter.d.ts +22 -0
- package/dist/transitions/tile-scatter.d.ts.map +1 -0
- package/dist/transitions/tile-scatter.js +122 -0
- package/dist/transitions/tile-scatter.js.map +1 -0
- package/dist/transitions/tilt-sweep.d.ts +11 -0
- package/dist/transitions/tilt-sweep.d.ts.map +1 -0
- package/dist/transitions/tilt-sweep.js +31 -0
- package/dist/transitions/tilt-sweep.js.map +1 -0
- package/dist/transitions/warp-zoom.d.ts +7 -0
- package/dist/transitions/warp-zoom.d.ts.map +1 -0
- package/dist/transitions/warp-zoom.js +70 -0
- package/dist/transitions/warp-zoom.js.map +1 -0
- package/dist/transitions/wave-stripes.d.ts +16 -0
- package/dist/transitions/wave-stripes.d.ts.map +1 -0
- package/dist/transitions/wave-stripes.js +55 -0
- package/dist/transitions/wave-stripes.js.map +1 -0
- package/dist/transitions/wave-wipe.d.ts +23 -0
- package/dist/transitions/wave-wipe.d.ts.map +1 -0
- package/dist/transitions/wave-wipe.js +84 -0
- package/dist/transitions/wave-wipe.js.map +1 -0
- package/dist/transitions/wind.d.ts +9 -0
- package/dist/transitions/wind.d.ts.map +1 -0
- package/dist/transitions/wind.js +48 -0
- package/dist/transitions/wind.js.map +1 -0
- package/dist/transitions/window-slice.d.ts +11 -0
- package/dist/transitions/window-slice.d.ts.map +1 -0
- package/dist/transitions/window-slice.js +34 -0
- package/dist/transitions/window-slice.js.map +1 -0
- package/dist/transitions/wipe-directional.d.ts +5 -0
- package/dist/transitions/wipe-directional.d.ts.map +1 -0
- package/dist/transitions/wipe-directional.js +26 -0
- package/dist/transitions/wipe-directional.js.map +1 -0
- package/dist/types.d.ts +78 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -0
- package/src/__tests__/__screenshots__/endpoint-correctness.test.ts/endpoint-correctness---every-transition-must-be-pixel-pure-from-to-at-progress-0-1-rippleWave-at-progress-0-is-pure--from--1.png +0 -0
- package/src/__tests__/__screenshots__/endpoint-correctness.test.ts/endpoint-correctness---every-transition-must-be-pixel-pure-from-to-at-progress-0-1-rippleWave-at-progress-1-is-pure--to--1.png +0 -0
- package/src/__tests__/endpoint-correctness.test.ts +161 -0
- package/src/__tests__/readme.test.ts +39 -0
- package/src/__tests__/ssr.test.ts +45 -0
- package/src/index.ts +75 -0
- package/src/inputs/normalize.ts +1 -0
- package/src/runner/__tests__/__screenshots__/mesh.test.ts/buildSubdividedPlane-centroid-is-shared-across-a-face-and-equals-mean-of-its-3-positions-1.png +0 -0
- package/src/runner/__tests__/__screenshots__/mesh.test.ts/buildSubdividedPlane-uv-matches-aPosition---0-5---0-5-1.png +0 -0
- package/src/runner/__tests__/mesh.test.ts +128 -0
- package/src/runner/gl.ts +69 -0
- package/src/runner/mesh.ts +135 -0
- package/src/runner/runner.ts +528 -0
- package/src/transitions/all.ts +131 -0
- package/src/transitions/bloom-reveal.ts +106 -0
- package/src/transitions/chromatic-pulse.ts +40 -0
- package/src/transitions/clock-wipe.ts +33 -0
- package/src/transitions/color-phase.ts +24 -0
- package/src/transitions/cross-zoom.ts +59 -0
- package/src/transitions/crosshatch.ts +49 -0
- package/src/transitions/define.ts +56 -0
- package/src/transitions/directional-burn.ts +67 -0
- package/src/transitions/directional-warp.ts +46 -0
- package/src/transitions/dissolve.ts +16 -0
- package/src/transitions/dreamy-zoom.ts +66 -0
- package/src/transitions/dreamy.ts +26 -0
- package/src/transitions/drip-wipe.ts +109 -0
- package/src/transitions/ember-scatter.ts +94 -0
- package/src/transitions/film-burn.ts +101 -0
- package/src/transitions/film-grain.ts +78 -0
- package/src/transitions/flow-warp.ts +51 -0
- package/src/transitions/fluid-flow.ts +94 -0
- package/src/transitions/glass-shatter.ts +86 -0
- package/src/transitions/glitch.ts +59 -0
- package/src/transitions/god-rays-reveal.ts +110 -0
- package/src/transitions/gravity-pull.ts +65 -0
- package/src/transitions/grid-reveal.ts +53 -0
- package/src/transitions/heat-haze.ts +51 -0
- package/src/transitions/index.ts +63 -0
- package/src/transitions/ink-bloom.ts +76 -0
- package/src/transitions/ink-diffuse.ts +90 -0
- package/src/transitions/iris-zoom.ts +67 -0
- package/src/transitions/kinetic-bands.ts +58 -0
- package/src/transitions/lenticular-flip.ts +73 -0
- package/src/transitions/light-leak.ts +43 -0
- package/src/transitions/linear-blur.ts +40 -0
- package/src/transitions/liquid-chrome.ts +114 -0
- package/src/transitions/liquid-morph.ts +50 -0
- package/src/transitions/lumina-melt.ts +36 -0
- package/src/transitions/mosaic.ts +58 -0
- package/src/transitions/noise-dissolve.ts +41 -0
- package/src/transitions/page-curl.ts +165 -0
- package/src/transitions/paint-bleed.ts +59 -0
- package/src/transitions/pinwheel.ts +40 -0
- package/src/transitions/pixelate.ts +26 -0
- package/src/transitions/polka-dots-curtain.ts +46 -0
- package/src/transitions/polygon-flip.ts +97 -0
- package/src/transitions/portal-dive.ts +83 -0
- package/src/transitions/prism-split.ts +52 -0
- package/src/transitions/push.ts +34 -0
- package/src/transitions/radial-reveal.ts +31 -0
- package/src/transitions/ripple-wave.ts +135 -0
- package/src/transitions/ripple.ts +43 -0
- package/src/transitions/shape-reveal.ts +53 -0
- package/src/transitions/shockwave.ts +56 -0
- package/src/transitions/singularity.ts +59 -0
- package/src/transitions/slide.ts +76 -0
- package/src/transitions/smoldering-edge.ts +74 -0
- package/src/transitions/split.ts +53 -0
- package/src/transitions/swirl.ts +42 -0
- package/src/transitions/tangent-motion-blur.ts +58 -0
- package/src/transitions/tile-scatter.ts +122 -0
- package/src/transitions/warp-zoom.ts +70 -0
- package/src/transitions/wave-stripes.ts +55 -0
- package/src/transitions/wind.ts +48 -0
- package/src/transitions/wipe-directional.ts +26 -0
- package/src/types.ts +87 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { defineTransition } from "./define.js";
|
|
2
|
+
/**
|
|
3
|
+
* Multi-pass transition. As to reveals through a noise mask, its
|
|
4
|
+
* bright highlights emit volumetric-looking light shafts toward a
|
|
5
|
+
* source point, built up by iterative radial blur — each pass samples
|
|
6
|
+
* from the previous pass's output at progressively finer steps along
|
|
7
|
+
* the ray from every pixel to the source. Impossible single-pass: a
|
|
8
|
+
* full-length radial streak would need ~30 samples across the ray,
|
|
9
|
+
* and after five iterations of 6 samples each, the shafts have
|
|
10
|
+
* progressively-refined spatial frequencies that a one-pass sampling
|
|
11
|
+
* of the source texture cannot produce.
|
|
12
|
+
*
|
|
13
|
+
* pass 0 — seed: to-highlights gated by the reveal
|
|
14
|
+
* mask AND a 4·p·(1-p) envelope.
|
|
15
|
+
* pass 1..passCount-2 — iterative radial blur. Pass i samples 6
|
|
16
|
+
* points along uv→source at step = 1/(5 · 2^(i-1)),
|
|
17
|
+
* reading from uPrevious so the shafts
|
|
18
|
+
* accumulate across passes.
|
|
19
|
+
* final pass — composite = mix(from, to, mask) +
|
|
20
|
+
* rays * intensity.
|
|
21
|
+
*
|
|
22
|
+
* Endpoints: seed envelope is 0 at progress 0 and 1, so the blur
|
|
23
|
+
* chain carries zeros and the composite resolves to pure from/to.
|
|
24
|
+
*/
|
|
25
|
+
export const godRaysReveal = defineTransition({
|
|
26
|
+
name: "god-rays-reveal",
|
|
27
|
+
passes: 7,
|
|
28
|
+
defaults: {
|
|
29
|
+
scale: 5,
|
|
30
|
+
softness: 0.08,
|
|
31
|
+
threshold: 0.45,
|
|
32
|
+
intensity: 1.6,
|
|
33
|
+
decay: 0.92,
|
|
34
|
+
source: [0.5, 0.5],
|
|
35
|
+
},
|
|
36
|
+
glsl: `
|
|
37
|
+
uniform float uScale;
|
|
38
|
+
uniform float uSoftness;
|
|
39
|
+
uniform float uThreshold;
|
|
40
|
+
uniform float uIntensity;
|
|
41
|
+
uniform float uDecay;
|
|
42
|
+
uniform vec2 uSource;
|
|
43
|
+
|
|
44
|
+
float hash21(vec2 p) {
|
|
45
|
+
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
float valNoise(vec2 p) {
|
|
49
|
+
vec2 i = floor(p);
|
|
50
|
+
vec2 f = fract(p);
|
|
51
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
52
|
+
float a = hash21(i);
|
|
53
|
+
float b = hash21(i + vec2(1.0, 0.0));
|
|
54
|
+
float c = hash21(i + vec2(0.0, 1.0));
|
|
55
|
+
float d = hash21(i + vec2(1.0, 1.0));
|
|
56
|
+
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
float fbm(vec2 p) {
|
|
60
|
+
return valNoise(p) * 0.55 +
|
|
61
|
+
valNoise(p * 2.1) * 0.28 +
|
|
62
|
+
valNoise(p * 4.3) * 0.17;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
float revealMask(vec2 uv) {
|
|
66
|
+
float safeLow = uSoftness + 0.005;
|
|
67
|
+
float safeHigh = 1.0 - uSoftness - 0.005;
|
|
68
|
+
float n = mix(safeLow, safeHigh, clamp(fbm(uv * uScale), 0.0, 1.0));
|
|
69
|
+
return smoothstep(n - uSoftness, n + uSoftness, uProgress);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
vec4 transition(vec2 uv) {
|
|
73
|
+
// Final pass: composite rays on top of the from→to reveal.
|
|
74
|
+
if (uPass == uPassCount - 1) {
|
|
75
|
+
vec3 rays = getPrevious(uv).rgb;
|
|
76
|
+
float mask = revealMask(uv);
|
|
77
|
+
vec3 base = mix(getFromColor(uv).rgb, getToColor(uv).rgb, mask);
|
|
78
|
+
return vec4(base + rays * uIntensity, 1.0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Seed pass: bright highlights of to, gated by reveal mask and
|
|
82
|
+
// a 4·p·(1-p) envelope so endpoints contribute zero.
|
|
83
|
+
if (uPass == 0) {
|
|
84
|
+
vec3 toC = getToColor(uv).rgb;
|
|
85
|
+
float lum = dot(toC, vec3(0.299, 0.587, 0.114));
|
|
86
|
+
float bright = smoothstep(uThreshold - 0.1, uThreshold + 0.1, lum);
|
|
87
|
+
float mask = revealMask(uv);
|
|
88
|
+
float envelope = 4.0 * uProgress * (1.0 - uProgress);
|
|
89
|
+
return vec4(toC * bright * mask * envelope, 1.0);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Iterative radial blur: each pass samples 6 points along uv→source
|
|
93
|
+
// with step shrinking by 2× each pass. Over 5 passes, shafts span
|
|
94
|
+
// the full ray with well-refined density.
|
|
95
|
+
vec2 toSource = uSource - uv;
|
|
96
|
+
float passStep = 1.0 / (5.0 * pow(2.0, float(uPass - 1)));
|
|
97
|
+
|
|
98
|
+
vec3 accum = vec3(0.0);
|
|
99
|
+
float weightSum = 0.0;
|
|
100
|
+
for (int i = 0; i < 6; i++) {
|
|
101
|
+
float t = passStep * float(i);
|
|
102
|
+
float w = pow(uDecay, float(i));
|
|
103
|
+
accum += getPrevious(uv + toSource * t).rgb * w;
|
|
104
|
+
weightSum += w;
|
|
105
|
+
}
|
|
106
|
+
return vec4(accum / weightSum, 1.0);
|
|
107
|
+
}
|
|
108
|
+
`,
|
|
109
|
+
});
|
|
110
|
+
//# sourceMappingURL=god-rays-reveal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"god-rays-reveal.js","sourceRoot":"","sources":["../../src/transitions/god-rays-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;IAC5C,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE;QACR,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,GAAG;QACd,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;KACnB;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEP;CACA,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Port of akella demo8. Pixels are pulled vertically toward `center` over
|
|
3
|
+
* the transition: from-image moves toward center by `progress * intensity`,
|
|
4
|
+
* to-image starts displaced AWAY from center and converges back. A fine
|
|
5
|
+
* noise field perturbs the magnitude per pixel so the pull reads as
|
|
6
|
+
* organic. Crossfade is linear so there's no freeze through the midpoint.
|
|
7
|
+
*
|
|
8
|
+
* Shrink-to-center: at midpoint the canvas samples from a smaller central
|
|
9
|
+
* region so the to-image's away-from-center displacement never samples
|
|
10
|
+
* outside `[0,1]` and clamps into vertical bars at the top/bottom edges.
|
|
11
|
+
*/
|
|
12
|
+
export declare const gravityPull: import("../types.js").Transition<import("@vysmo/gl-core").Widen<{
|
|
13
|
+
readonly center: readonly [0.5, 0.5];
|
|
14
|
+
readonly intensity: 0.15;
|
|
15
|
+
}>>;
|
|
16
|
+
//# sourceMappingURL=gravity-pull.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gravity-pull.d.ts","sourceRoot":"","sources":["../../src/transitions/gravity-pull.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW;;;GAmDtB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineTransition } from "./define.js";
|
|
2
|
+
/**
|
|
3
|
+
* Port of akella demo8. Pixels are pulled vertically toward `center` over
|
|
4
|
+
* the transition: from-image moves toward center by `progress * intensity`,
|
|
5
|
+
* to-image starts displaced AWAY from center and converges back. A fine
|
|
6
|
+
* noise field perturbs the magnitude per pixel so the pull reads as
|
|
7
|
+
* organic. Crossfade is linear so there's no freeze through the midpoint.
|
|
8
|
+
*
|
|
9
|
+
* Shrink-to-center: at midpoint the canvas samples from a smaller central
|
|
10
|
+
* region so the to-image's away-from-center displacement never samples
|
|
11
|
+
* outside `[0,1]` and clamps into vertical bars at the top/bottom edges.
|
|
12
|
+
*/
|
|
13
|
+
export const gravityPull = defineTransition({
|
|
14
|
+
name: "gravity-pull",
|
|
15
|
+
defaults: {
|
|
16
|
+
center: [0.5, 0.5],
|
|
17
|
+
intensity: 0.15,
|
|
18
|
+
},
|
|
19
|
+
glsl: `
|
|
20
|
+
uniform vec2 uCenter;
|
|
21
|
+
uniform float uIntensity;
|
|
22
|
+
|
|
23
|
+
float hash21(vec2 p) {
|
|
24
|
+
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
float valueNoise(vec2 p) {
|
|
28
|
+
vec2 i = floor(p);
|
|
29
|
+
vec2 f = fract(p);
|
|
30
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
31
|
+
float a = hash21(i);
|
|
32
|
+
float b = hash21(i + vec2(1.0, 0.0));
|
|
33
|
+
float c = hash21(i + vec2(0.0, 1.0));
|
|
34
|
+
float d = hash21(i + vec2(1.0, 1.0));
|
|
35
|
+
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
vec4 transition(vec2 uv) {
|
|
39
|
+
float env = 4.0 * uProgress * (1.0 - uProgress);
|
|
40
|
+
float n = valueNoise(uv * 10.0);
|
|
41
|
+
|
|
42
|
+
// Vertical signed unit vector pointing toward the center.
|
|
43
|
+
vec2 toCenter = uCenter - uv;
|
|
44
|
+
float lenTC = length(toCenter);
|
|
45
|
+
float dy = lenTC > 0.001 ? toCenter.y / lenTC : 0.0;
|
|
46
|
+
vec2 d = vec2(0.0, dy);
|
|
47
|
+
|
|
48
|
+
float pullMag = uIntensity * (1.0 + n * 0.5);
|
|
49
|
+
|
|
50
|
+
// Shrink-to-center at midpoint so the away-from-center displacement
|
|
51
|
+
// stays in source bounds. At endpoints env=0 → shrunkUv=uv (no zoom),
|
|
52
|
+
// so endpoints are pixel-pure. Capped to keep image visible at high
|
|
53
|
+
// intensities.
|
|
54
|
+
float maxPull = uIntensity * 1.5;
|
|
55
|
+
float shrinkAmount = max(1.0 - env * 2.0 * maxPull, 0.2);
|
|
56
|
+
vec2 shrunkUv = (uv - 0.5) * shrinkAmount + 0.5;
|
|
57
|
+
|
|
58
|
+
vec2 fromUv = clamp(shrunkUv + d * uProgress * pullMag, 0.0, 1.0);
|
|
59
|
+
vec2 toUv = clamp(shrunkUv - d * (1.0 - uProgress) * pullMag, 0.0, 1.0);
|
|
60
|
+
|
|
61
|
+
return mix(getFromColor(fromUv), getToColor(toUv), uProgress);
|
|
62
|
+
}
|
|
63
|
+
`,
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=gravity-pull.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gravity-pull.js","sourceRoot":"","sources":["../../src/transitions/gravity-pull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAC1C,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE;QACR,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;QAClB,SAAS,EAAE,IAAI;KAChB;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CP;CACA,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern values:
|
|
3
|
+
* 0 = sequential (left-to-right, top-to-bottom)
|
|
4
|
+
* 1 = radial (from center outward)
|
|
5
|
+
* 2 = pseudo-random
|
|
6
|
+
*/
|
|
7
|
+
export declare const gridReveal: import("../types.js").Transition<import("@vysmo/gl-core").Widen<{
|
|
8
|
+
readonly count: 8;
|
|
9
|
+
readonly stagger: 0.7;
|
|
10
|
+
readonly pattern: 1;
|
|
11
|
+
}>>;
|
|
12
|
+
//# sourceMappingURL=grid-reveal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-reveal.d.ts","sourceRoot":"","sources":["../../src/transitions/grid-reveal.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;GA4CrB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineTransition } from "./define.js";
|
|
2
|
+
/**
|
|
3
|
+
* Pattern values:
|
|
4
|
+
* 0 = sequential (left-to-right, top-to-bottom)
|
|
5
|
+
* 1 = radial (from center outward)
|
|
6
|
+
* 2 = pseudo-random
|
|
7
|
+
*/
|
|
8
|
+
export const gridReveal = defineTransition({
|
|
9
|
+
name: "grid-reveal",
|
|
10
|
+
defaults: {
|
|
11
|
+
count: 8,
|
|
12
|
+
stagger: 0.7,
|
|
13
|
+
pattern: 1,
|
|
14
|
+
},
|
|
15
|
+
glsl: `
|
|
16
|
+
uniform float uCount;
|
|
17
|
+
uniform float uStagger;
|
|
18
|
+
uniform float uPattern;
|
|
19
|
+
|
|
20
|
+
float hash21(vec2 p) {
|
|
21
|
+
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
vec4 transition(vec2 uv) {
|
|
25
|
+
// 1×1 is a fade and 2×2 is a quad-split — neither reads as "grid".
|
|
26
|
+
// Clamp here so the transition is reliable regardless of caller input.
|
|
27
|
+
float count = max(uCount, 3.0);
|
|
28
|
+
vec2 cell = floor(uv * count);
|
|
29
|
+
|
|
30
|
+
float priority;
|
|
31
|
+
if (uPattern < 0.5) {
|
|
32
|
+
// Sequential left-to-right, top-to-bottom
|
|
33
|
+
priority = (cell.y * count + cell.x) / (count * count);
|
|
34
|
+
} else if (uPattern < 1.5) {
|
|
35
|
+
// Radial from center of the grid
|
|
36
|
+
vec2 center = vec2(count * 0.5 - 0.5);
|
|
37
|
+
float dist = length(cell - center);
|
|
38
|
+
float maxDist = length(center);
|
|
39
|
+
priority = dist / max(maxDist, 0.0001);
|
|
40
|
+
} else {
|
|
41
|
+
// Pseudo-random per cell
|
|
42
|
+
priority = hash21(cell);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
float start = priority * uStagger;
|
|
46
|
+
float window = max(0.0001, 1.0 - uStagger);
|
|
47
|
+
float localProgress = clamp((uProgress - start) / window, 0.0, 1.0);
|
|
48
|
+
|
|
49
|
+
return mix(getFromColor(uv), getToColor(uv), localProgress);
|
|
50
|
+
}
|
|
51
|
+
`,
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=grid-reveal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-reveal.js","sourceRoot":"","sources":["../../src/transitions/grid-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;IACzC,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE;QACR,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,CAAC;KACX;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCP;CACA,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heat-haze shimmer: horizontal displacement driven by an animated noise
|
|
3
|
+
* field that flows upward over progress, simulating the look-through-
|
|
4
|
+
* hot-air effect. Both images receive the same displacement so they
|
|
5
|
+
* blend through a shared shimmer at the midpoint. Displacement envelope
|
|
6
|
+
* gates the effect to zero at endpoints.
|
|
7
|
+
*/
|
|
8
|
+
export declare const heatHaze: import("../types.js").Transition<import("@vysmo/gl-core").Widen<{
|
|
9
|
+
readonly intensity: 0.04;
|
|
10
|
+
readonly frequency: 14;
|
|
11
|
+
readonly flow: 5;
|
|
12
|
+
}>>;
|
|
13
|
+
//# sourceMappingURL=heat-haze.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heat-haze.d.ts","sourceRoot":"","sources":["../../src/transitions/heat-haze.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;GAyCnB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineTransition } from "./define.js";
|
|
2
|
+
/**
|
|
3
|
+
* Heat-haze shimmer: horizontal displacement driven by an animated noise
|
|
4
|
+
* field that flows upward over progress, simulating the look-through-
|
|
5
|
+
* hot-air effect. Both images receive the same displacement so they
|
|
6
|
+
* blend through a shared shimmer at the midpoint. Displacement envelope
|
|
7
|
+
* gates the effect to zero at endpoints.
|
|
8
|
+
*/
|
|
9
|
+
export const heatHaze = defineTransition({
|
|
10
|
+
name: "heat-haze",
|
|
11
|
+
defaults: {
|
|
12
|
+
intensity: 0.04,
|
|
13
|
+
frequency: 14,
|
|
14
|
+
flow: 5.0,
|
|
15
|
+
},
|
|
16
|
+
glsl: `
|
|
17
|
+
uniform float uIntensity;
|
|
18
|
+
uniform float uFrequency;
|
|
19
|
+
uniform float uFlow;
|
|
20
|
+
|
|
21
|
+
float hash21(vec2 p) {
|
|
22
|
+
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
float valueNoise(vec2 p) {
|
|
26
|
+
vec2 i = floor(p);
|
|
27
|
+
vec2 f = fract(p);
|
|
28
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
29
|
+
float a = hash21(i);
|
|
30
|
+
float b = hash21(i + vec2(1.0, 0.0));
|
|
31
|
+
float c = hash21(i + vec2(0.0, 1.0));
|
|
32
|
+
float d = hash21(i + vec2(1.0, 1.0));
|
|
33
|
+
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
vec4 transition(vec2 uv) {
|
|
37
|
+
float env = 4.0 * uProgress * (1.0 - uProgress);
|
|
38
|
+
|
|
39
|
+
// Horizontal column noise that drifts upward over progress (noise sampled
|
|
40
|
+
// at uv.y - progress*flow → rising pattern). Vertical frequency lower so
|
|
41
|
+
// bands are tall and column-like, matching real heat-haze.
|
|
42
|
+
float n = valueNoise(vec2(uv.x * uFrequency, uv.y * uFrequency * 0.4 - uProgress * uFlow));
|
|
43
|
+
float disp = (n - 0.5) * uIntensity * env;
|
|
44
|
+
|
|
45
|
+
vec2 sampleUv = clamp(vec2(uv.x + disp, uv.y), 0.0, 1.0);
|
|
46
|
+
|
|
47
|
+
return mix(getFromColor(sampleUv), getToColor(sampleUv), uProgress);
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=heat-haze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heat-haze.js","sourceRoot":"","sources":["../../src/transitions/heat-haze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE;QACR,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,EAAE;QACb,IAAI,EAAE,GAAG;KACV;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCP;CACA,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export { dissolve } from "./dissolve.js";
|
|
2
|
+
export { wipeDirectional } from "./wipe-directional.js";
|
|
3
|
+
export { slide } from "./slide.js";
|
|
4
|
+
export { radialReveal } from "./radial-reveal.js";
|
|
5
|
+
export { crossZoom } from "./cross-zoom.js";
|
|
6
|
+
export { glitch } from "./glitch.js";
|
|
7
|
+
export { noiseDissolve } from "./noise-dissolve.js";
|
|
8
|
+
export { clockWipe } from "./clock-wipe.js";
|
|
9
|
+
export { ripple } from "./ripple.js";
|
|
10
|
+
export { pixelate } from "./pixelate.js";
|
|
11
|
+
export { kineticBands } from "./kinetic-bands.js";
|
|
12
|
+
export { lightLeak } from "./light-leak.js";
|
|
13
|
+
export { liquidMorph } from "./liquid-morph.js";
|
|
14
|
+
export { gridReveal } from "./grid-reveal.js";
|
|
15
|
+
export { warpZoom } from "./warp-zoom.js";
|
|
16
|
+
export { chromaticPulse } from "./chromatic-pulse.js";
|
|
17
|
+
export { push } from "./push.js";
|
|
18
|
+
export { shapeReveal } from "./shape-reveal.js";
|
|
19
|
+
export { paintBleed } from "./paint-bleed.js";
|
|
20
|
+
export { shockwave } from "./shockwave.js";
|
|
21
|
+
export { swirl } from "./swirl.js";
|
|
22
|
+
export { split } from "./split.js";
|
|
23
|
+
export { directionalWarp } from "./directional-warp.js";
|
|
24
|
+
export { wind } from "./wind.js";
|
|
25
|
+
export { linearBlur } from "./linear-blur.js";
|
|
26
|
+
export { luminaMelt } from "./lumina-melt.js";
|
|
27
|
+
export { pinwheel } from "./pinwheel.js";
|
|
28
|
+
export { dreamy } from "./dreamy.js";
|
|
29
|
+
export { tangentMotionBlur } from "./tangent-motion-blur.js";
|
|
30
|
+
export { colorPhase } from "./color-phase.js";
|
|
31
|
+
export { filmBurn } from "./film-burn.js";
|
|
32
|
+
export { mosaic } from "./mosaic.js";
|
|
33
|
+
export { emberScatter } from "./ember-scatter.js";
|
|
34
|
+
export { directionalBurn } from "./directional-burn.js";
|
|
35
|
+
export { inkBloom } from "./ink-bloom.js";
|
|
36
|
+
export { smolderingEdge } from "./smoldering-edge.js";
|
|
37
|
+
export { polkaDotsCurtain } from "./polka-dots-curtain.js";
|
|
38
|
+
export { crosshatch } from "./crosshatch.js";
|
|
39
|
+
export { dreamyZoom } from "./dreamy-zoom.js";
|
|
40
|
+
export { heatHaze } from "./heat-haze.js";
|
|
41
|
+
export { prismSplit } from "./prism-split.js";
|
|
42
|
+
export { irisZoom } from "./iris-zoom.js";
|
|
43
|
+
export { gravityPull } from "./gravity-pull.js";
|
|
44
|
+
export { waveStripes } from "./wave-stripes.js";
|
|
45
|
+
export { flowWarp } from "./flow-warp.js";
|
|
46
|
+
export { dripWipe } from "./drip-wipe.js";
|
|
47
|
+
export { portalDive } from "./portal-dive.js";
|
|
48
|
+
export { liquidChrome } from "./liquid-chrome.js";
|
|
49
|
+
export { glassShatter } from "./glass-shatter.js";
|
|
50
|
+
export { inkDiffuse } from "./ink-diffuse.js";
|
|
51
|
+
export { bloomReveal } from "./bloom-reveal.js";
|
|
52
|
+
export { godRaysReveal } from "./god-rays-reveal.js";
|
|
53
|
+
export { fluidFlow } from "./fluid-flow.js";
|
|
54
|
+
export { lenticularFlip } from "./lenticular-flip.js";
|
|
55
|
+
export { filmGrain } from "./film-grain.js";
|
|
56
|
+
export { singularity } from "./singularity.js";
|
|
57
|
+
export { polygonFlip } from "./polygon-flip.js";
|
|
58
|
+
export { pageCurl } from "./page-curl.js";
|
|
59
|
+
export { rippleWave } from "./ripple-wave.js";
|
|
60
|
+
export { tileScatter } from "./tile-scatter.js";
|
|
61
|
+
export { defineTransition } from "./define.js";
|
|
62
|
+
export type { DefineTransitionSpec } from "./define.js";
|
|
63
|
+
export { ALL_TRANSITIONS } from "./all.js";
|
|
64
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transitions/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export { dissolve } from "./dissolve.js";
|
|
2
|
+
export { wipeDirectional } from "./wipe-directional.js";
|
|
3
|
+
export { slide } from "./slide.js";
|
|
4
|
+
export { radialReveal } from "./radial-reveal.js";
|
|
5
|
+
export { crossZoom } from "./cross-zoom.js";
|
|
6
|
+
export { glitch } from "./glitch.js";
|
|
7
|
+
export { noiseDissolve } from "./noise-dissolve.js";
|
|
8
|
+
export { clockWipe } from "./clock-wipe.js";
|
|
9
|
+
export { ripple } from "./ripple.js";
|
|
10
|
+
export { pixelate } from "./pixelate.js";
|
|
11
|
+
export { kineticBands } from "./kinetic-bands.js";
|
|
12
|
+
export { lightLeak } from "./light-leak.js";
|
|
13
|
+
export { liquidMorph } from "./liquid-morph.js";
|
|
14
|
+
export { gridReveal } from "./grid-reveal.js";
|
|
15
|
+
export { warpZoom } from "./warp-zoom.js";
|
|
16
|
+
export { chromaticPulse } from "./chromatic-pulse.js";
|
|
17
|
+
export { push } from "./push.js";
|
|
18
|
+
export { shapeReveal } from "./shape-reveal.js";
|
|
19
|
+
export { paintBleed } from "./paint-bleed.js";
|
|
20
|
+
export { shockwave } from "./shockwave.js";
|
|
21
|
+
export { swirl } from "./swirl.js";
|
|
22
|
+
export { split } from "./split.js";
|
|
23
|
+
export { directionalWarp } from "./directional-warp.js";
|
|
24
|
+
export { wind } from "./wind.js";
|
|
25
|
+
export { linearBlur } from "./linear-blur.js";
|
|
26
|
+
export { luminaMelt } from "./lumina-melt.js";
|
|
27
|
+
export { pinwheel } from "./pinwheel.js";
|
|
28
|
+
export { dreamy } from "./dreamy.js";
|
|
29
|
+
export { tangentMotionBlur } from "./tangent-motion-blur.js";
|
|
30
|
+
export { colorPhase } from "./color-phase.js";
|
|
31
|
+
export { filmBurn } from "./film-burn.js";
|
|
32
|
+
export { mosaic } from "./mosaic.js";
|
|
33
|
+
export { emberScatter } from "./ember-scatter.js";
|
|
34
|
+
export { directionalBurn } from "./directional-burn.js";
|
|
35
|
+
export { inkBloom } from "./ink-bloom.js";
|
|
36
|
+
export { smolderingEdge } from "./smoldering-edge.js";
|
|
37
|
+
export { polkaDotsCurtain } from "./polka-dots-curtain.js";
|
|
38
|
+
export { crosshatch } from "./crosshatch.js";
|
|
39
|
+
export { dreamyZoom } from "./dreamy-zoom.js";
|
|
40
|
+
export { heatHaze } from "./heat-haze.js";
|
|
41
|
+
export { prismSplit } from "./prism-split.js";
|
|
42
|
+
export { irisZoom } from "./iris-zoom.js";
|
|
43
|
+
export { gravityPull } from "./gravity-pull.js";
|
|
44
|
+
export { waveStripes } from "./wave-stripes.js";
|
|
45
|
+
export { flowWarp } from "./flow-warp.js";
|
|
46
|
+
export { dripWipe } from "./drip-wipe.js";
|
|
47
|
+
export { portalDive } from "./portal-dive.js";
|
|
48
|
+
export { liquidChrome } from "./liquid-chrome.js";
|
|
49
|
+
export { glassShatter } from "./glass-shatter.js";
|
|
50
|
+
export { inkDiffuse } from "./ink-diffuse.js";
|
|
51
|
+
export { bloomReveal } from "./bloom-reveal.js";
|
|
52
|
+
export { godRaysReveal } from "./god-rays-reveal.js";
|
|
53
|
+
export { fluidFlow } from "./fluid-flow.js";
|
|
54
|
+
export { lenticularFlip } from "./lenticular-flip.js";
|
|
55
|
+
export { filmGrain } from "./film-grain.js";
|
|
56
|
+
export { singularity } from "./singularity.js";
|
|
57
|
+
export { polygonFlip } from "./polygon-flip.js";
|
|
58
|
+
export { pageCurl } from "./page-curl.js";
|
|
59
|
+
export { rippleWave } from "./ripple-wave.js";
|
|
60
|
+
export { tileScatter } from "./tile-scatter.js";
|
|
61
|
+
export { defineTransition } from "./define.js";
|
|
62
|
+
export { ALL_TRANSITIONS } from "./all.js";
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transitions/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cold fluid sibling to film-burn: a radial bloom expands from a center
|
|
3
|
+
* point with a dark deeply-tinted ring at the advancing boundary instead
|
|
4
|
+
* of a bright flame. Feels like ink diffusing through water. The ink
|
|
5
|
+
* color tint is multiplicative (darkens toward uInkColor) rather than
|
|
6
|
+
* additive bright glow.
|
|
7
|
+
*/
|
|
8
|
+
export declare const inkBloom: import("../types.js").Transition<import("@vysmo/gl-core").Widen<{
|
|
9
|
+
readonly center: readonly [0.5, 0.5];
|
|
10
|
+
readonly scale: 5;
|
|
11
|
+
readonly edgeWidth: 0.07;
|
|
12
|
+
readonly bloomWidth: 0.12;
|
|
13
|
+
readonly inkColor: readonly [0.25, 0.08, 0.45];
|
|
14
|
+
}>>;
|
|
15
|
+
//# sourceMappingURL=ink-bloom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink-bloom.d.ts","sourceRoot":"","sources":["../../src/transitions/ink-bloom.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;;;GAkEnB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineTransition } from "./define.js";
|
|
2
|
+
/**
|
|
3
|
+
* Cold fluid sibling to film-burn: a radial bloom expands from a center
|
|
4
|
+
* point with a dark deeply-tinted ring at the advancing boundary instead
|
|
5
|
+
* of a bright flame. Feels like ink diffusing through water. The ink
|
|
6
|
+
* color tint is multiplicative (darkens toward uInkColor) rather than
|
|
7
|
+
* additive bright glow.
|
|
8
|
+
*/
|
|
9
|
+
export const inkBloom = defineTransition({
|
|
10
|
+
name: "ink-bloom",
|
|
11
|
+
defaults: {
|
|
12
|
+
center: [0.5, 0.5],
|
|
13
|
+
scale: 5,
|
|
14
|
+
edgeWidth: 0.07,
|
|
15
|
+
bloomWidth: 0.12,
|
|
16
|
+
inkColor: [0.25, 0.08, 0.45],
|
|
17
|
+
},
|
|
18
|
+
glsl: `
|
|
19
|
+
uniform vec2 uCenter;
|
|
20
|
+
uniform float uScale;
|
|
21
|
+
uniform float uEdgeWidth;
|
|
22
|
+
uniform float uBloomWidth;
|
|
23
|
+
uniform vec3 uInkColor;
|
|
24
|
+
|
|
25
|
+
float hash21(vec2 p) {
|
|
26
|
+
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
float valueNoise(vec2 p) {
|
|
30
|
+
vec2 i = floor(p);
|
|
31
|
+
vec2 f = fract(p);
|
|
32
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
33
|
+
float a = hash21(i);
|
|
34
|
+
float b = hash21(i + vec2(1.0, 0.0));
|
|
35
|
+
float c = hash21(i + vec2(0.0, 1.0));
|
|
36
|
+
float d = hash21(i + vec2(1.0, 1.0));
|
|
37
|
+
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
vec4 transition(vec2 uv) {
|
|
41
|
+
vec2 pixel = uv * uResolution;
|
|
42
|
+
vec2 centerPx = uCenter * uResolution;
|
|
43
|
+
float dist = distance(pixel, centerPx);
|
|
44
|
+
float maxDist = max(
|
|
45
|
+
max(length(centerPx), length(centerPx - vec2(uResolution.x, 0.0))),
|
|
46
|
+
max(length(centerPx - vec2(0.0, uResolution.y)), length(centerPx - uResolution))
|
|
47
|
+
);
|
|
48
|
+
float normalizedDist = dist / max(maxDist, 0.0001);
|
|
49
|
+
|
|
50
|
+
// Soft/low-frequency noise for fluid-like edge deformation.
|
|
51
|
+
float noiseStrength = 0.18;
|
|
52
|
+
float n = valueNoise(uv * uScale);
|
|
53
|
+
float perturbed = normalizedDist - (n - 0.5) * noiseStrength;
|
|
54
|
+
|
|
55
|
+
float totalEdge = uEdgeWidth + noiseStrength * 0.5;
|
|
56
|
+
float bloomRadius = uProgress * (1.0 + 2.0 * totalEdge) - totalEdge;
|
|
57
|
+
float signedDist = perturbed - bloomRadius;
|
|
58
|
+
|
|
59
|
+
float w = smoothstep(-uEdgeWidth, uEdgeWidth, -signedDist);
|
|
60
|
+
vec4 base = mix(getFromColor(uv), getToColor(uv), w);
|
|
61
|
+
|
|
62
|
+
// Wide dark bloom band — uBloomWidth controls how far the tint diffuses
|
|
63
|
+
// off the hard edge. env-gated so endpoints remain untouched.
|
|
64
|
+
float bandX = signedDist / max(uBloomWidth, 0.0001);
|
|
65
|
+
float bloomBand = exp(-bandX * bandX * 1.5);
|
|
66
|
+
float env = 4.0 * uProgress * (1.0 - uProgress);
|
|
67
|
+
float tint = bloomBand * env * 0.85;
|
|
68
|
+
|
|
69
|
+
vec3 darkened = base.rgb * uInkColor;
|
|
70
|
+
vec3 result = mix(base.rgb, darkened, tint);
|
|
71
|
+
|
|
72
|
+
return vec4(result, base.a);
|
|
73
|
+
}
|
|
74
|
+
`,
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=ink-bloom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink-bloom.js","sourceRoot":"","sources":["../../src/transitions/ink-bloom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE;QACR,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;QAClB,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;KAC7B;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDP;CACA,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-pass transition. A noise-seeded mask grows outward via iterated
|
|
3
|
+
* dilation with an expanding kernel, producing an ink-in-water spread
|
|
4
|
+
* that can't be computed in a single pass (each pixel has to read its
|
|
5
|
+
* neighbours' mask values from the previous iteration).
|
|
6
|
+
*
|
|
7
|
+
* pass 0 — seed the mask by thresholding a noise field
|
|
8
|
+
* against progress. At progress 0 all zero;
|
|
9
|
+
* at progress 1 all one; in between, a noisy
|
|
10
|
+
* boundary seeded where noise ≈ progress.
|
|
11
|
+
* pass 1..passCount-2 — dilate the mask with an expanding kernel
|
|
12
|
+
* (step doubles each pass: 1, 2, 4, 8, 16 px),
|
|
13
|
+
* biased with a light smoothing so edges
|
|
14
|
+
* stay organic.
|
|
15
|
+
* final pass — use the diffused mask to mix from → to.
|
|
16
|
+
*
|
|
17
|
+
* Endpoints: seed saturates to 0 at progress 0 and 1 at progress 1
|
|
18
|
+
* regardless of the noise field. Dilation is monotone on constants,
|
|
19
|
+
* so the mask stays saturated through every pass, and the final
|
|
20
|
+
* composition resolves to pure from / to.
|
|
21
|
+
*/
|
|
22
|
+
export declare const inkDiffuse: import("../types.js").Transition<import("@vysmo/gl-core").Widen<{
|
|
23
|
+
readonly scale: 7;
|
|
24
|
+
readonly softness: 0.08;
|
|
25
|
+
}>>;
|
|
26
|
+
//# sourceMappingURL=ink-diffuse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink-diffuse.d.ts","sourceRoot":"","sources":["../../src/transitions/ink-diffuse.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,UAAU;;;GAkErB,CAAC"}
|