paperjs / paper.js

The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey
http://paperjs.org
Other
14.5k stars 1.23k forks source link

Feature Request: fadeIn() and fadeOut() for Raster #667

Open shivanraptor opened 9 years ago

shivanraptor commented 9 years ago

Currently I have to use the following codes to fade in or out images ( Raster ).

var raster = new Raster('mona');
raster.position = view.center;
function onFrame(event) {
    if(raster.opacity > 0.01) {
        raster.opacity -= 0.01;
    } else {
        raster.opacity = 0;
    }
}

It's hoped that fadeIn() and fadeOut() are available for Raster class.

s-light commented 7 years ago

@shivanraptor have a look at https://github.com/Eartz/animatePaper.js its a great library for animations in paper.js

eeropic commented 5 years ago

http://paperjs.org/reference/tween/