paper-motion

Crossfade

crossfade

A dissolves into B.

Install
$ npx paper-motion add crossfade

Copies the code to moves/ in your project, yours to edit.

Tune it, then add it to your kit
0.0s
Parameters
curve
import { crossfade } from './moves/crossfade.js';

// in s.update(t)
crossfade(a, b, p);
Defaults

Notes

  • At p = 0 only A shows, at p = 1 only B; keep B above A (z-index).

Spec

Id
crossfade
Type
Transitions
Version
1.0.0
Engine
>=0.2.0
License
MIT

Related