Last active
December 15, 2015 01:39
-
-
Save eduardo-matos/5181284 to your computer and use it in GitHub Desktop.
Playing with DojoX GFX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="surface"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require([ | |
'dojox/gfx', | |
'dojox/gfx/fx', | |
'dojo/fx/easing' | |
], function (gfx, Fxg, easing) { | |
var surface = gfx.createSurface('surface', 400, 400); | |
var circle = surface.createCircle({ cx: 100, cy: 100, r:50 }) | |
.setFill("#FC97C0") | |
.setStroke({color: "#E01B6A", width: 10}); | |
new Fxg.animateTransform({ | |
duration: 3200, | |
shape: circle, | |
easing: easing.bounceOut, | |
transform: [{ | |
name: "rotategAt", | |
start: [0,150,150], | |
end: [360,150,150] | |
}] | |
}).play(); | |
new Fxg.animateStroke({ | |
duration: 2200, | |
shape: circle, | |
color: {start: '#e01b6a', end: '#75193E'} | |
}).play(); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment