var draw = SVG('canvas').size(300, 300) var rect = draw.rect(100, 100).attr({ fill: '#f06' }); rect.animate().move(150, 150); rect.animate({ ease: '<', delay: 1500 }).attr({ fill: '#f03' });
SVG.extend(SVG.Shape, { paintRed: function() { return this.fill({ color: 'red' }) } }) SVG.extend(SVG.Ellipse, { paintRed: function() { return this.fill({ color: 'orangered' }) } })
Source: https://habr.com/ru/post/195184/