Last active
August 6, 2017 19:47
-
-
Save adamauckland/d71e545140780a40c6b5d81c01b11604 to your computer and use it in GitHub Desktop.
This file contains 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
var stage = new createjs.Stage("canvas"); | |
createjs.Ticker.addEventListener("tick", tick); | |
function shapey(x, y, angule) { | |
var shape2 = new createjs.Shape().set({x:x, y:y}); | |
shape2.graphics.s("#fdd").ss(20, "round"); | |
stage.addChild(shape2); | |
var startAngle = -90 * Math.PI/180; | |
var endAngle = 270 * Math.PI/180;; | |
shape2.graphics.arc(0,0,50,startAngle,endAngle); | |
// Create the Shape | |
var shape = new createjs.Shape().set({x:x, y:y}); | |
shape.graphics.s("#f10").ss(20, "round"); | |
stage.addChild(shape); | |
var startAngle = -90 * Math.PI/180; | |
var endAngle =angule * Math.PI/180;; | |
shape.graphics.arc(0,0,50,startAngle,endAngle); | |
} | |
shapey(100, 100, 100); | |
shapey(300, 100, 80); | |
shapey(500, 100, 190); | |
shapey(700, 100, 30); | |
shapey(100, 300, 100); | |
shapey(300, 300, 80); | |
shapey(500, 300, 190); | |
shapey(700, 300, 30); | |
function tick(event) { | |
stage.update(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment