Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Multiple shapes rotating at different speeds.
# createjs/demo/rotating_shapes.html
<html>
<head>
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
</head>
<body>
<canvas id="demoCanvas" width="800" height="600"></canvas>
<script>
const stage = new createjs.Stage('demoCanvas');
const shapes = [];
for(let i=0; i<3; i++) {
const s = new createjs.Shape();
s.graphics.beginFill(['red','green','blue'][i]).drawRect(-25,-25,50,50);
s.x = 200 + i*200;
s.y = 300;
stage.addChild(s);
shapes.push({shape: s, speed: i+1});
}
createjs.Ticker.framerate = 60;
createjs.Ticker.addEventListener('tick', () => {
shapes.forEach(s => s.shape.rotation += s.speed);
stage.update();
});
</script>
</body>
</html>CreateJS is a suite of modular JavaScript libraries and tools designed to facilitate rich interactive content via HTML5 Canvas, supporting animation, sound, and UI interaction.
Origin & Creator
CreateJS was developed by gskinner.com (Grant Skinner) starting around 2010, evolving from earlier Flash-to-HTML5 tooling.
Industrial Note
CreateJS is widely used for browser-based games, HTML5 banner ads, interactive infographics, and multimedia-rich web applications.