Last active
August 29, 2015 13:59
-
-
Save inoh/10775444 to your computer and use it in GitHub Desktop.
初めてのCreateJS
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
<!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