Skip to content

Instantly share code, notes, and snippets.

@inoh
Last active August 29, 2015 13:59
Show Gist options
  • Save inoh/10775444 to your computer and use it in GitHub Desktop.
Save inoh/10775444 to your computer and use it in GitHub Desktop.
初めてのCreateJS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CreateJS test</title>
<script>
createjs = window;
var app = {
initialize: function () {
var stage = new Stage("sampleCanvas");
var bitmap = new Bitmap("sample.jpg");
bitmap.alpha = 0;
stage.addChild(bitmap);
Ticker.addEventListener("tick", function (e) {
if (bitmap.alpha < 1) {
bitmap.alpha += 0.02;
}
stage.update();
});
}
}
</script>
<script src="easeljs-0.7.1.min.js"></script>
<script src="tweenjs-0.5.1.min.js"></script>
</head>
<body onload="app.initialize();">
<canvas id="sampleCanvas" height="500px;" width="1000px;"></canvas>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment