MCPcopy Index your code
hub / github.com/clips/pattern / splash

Function splash

pattern/canvas.js:3416–3426  ·  view source on GitHub ↗
(img, dx, dy, radius)

Source from the content-addressed store, hash-verified

3414}
3415
3416function splash(img, dx, dy, radius) {
3417 /* Returns the image with a light-tunnel distortion applied to it.
3418 * - dx: horizontal offset (in pixels) of the effect.
3419 * - dy: vertical offset (in pixels) of the effect.
3420 * - radius: the radius of the unaffected area in pixels.
3421 */
3422 var m = radius || 0;
3423 return polar(img, dx, dy, function(d, a) {
3424 return [(d > m)? m : d, a];
3425 });
3426}
3427
3428function twirl(img, dx, dy, radius, angle) {
3429 /* Returns the image with a twirl distortion applied to it.

Callers 1

distortFunction · 0.85

Calls 1

polarFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…