1、CreateJS介绍-EaselJS

需要在html5文件中引入的CreateJS库文件是easeljs-0.7.1.min.js

HTML5文件如下:

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>1、CreateJS介绍-EaselJS</title>
 6     <script src="easeljs-0.7.1.min.js"></script>
 7 </head>
 8 <body>
 9     <canvas id="gameView" width="400px" height="400px" style="background-color:#cccccc;"></canvas>
10     <script src="app.js"></script>
11 </body>
12 </html>

在HTML5文件中引入的app.js文件源码如下:

 1 /**
 2  * create 1、CreateJS介绍-EaselJS-app.js by dpp on 2016/1/4
 3  * @authors Your Name (you@example.org)
 4  * @date    2016-01-04 01:06:54
 5  * @version $Id$
 6  */
 7 
 8 var stage = new createjs.Stage('gameView');
 9 
10 var text = new createjs.Text('Hello easeljs' , '36px Arial' , '#777');
11 
12 stage.addChild(text);
13 
14 stage.update();

例子"1、CreateJS介绍-EaselJS"的源码地址:https://github.com/daipianpian/CreateJS-Study/tree/master/1%E3%80%81CreateJS%E4%BB%8B%E7%BB%8D/L01_EaselJS

 

posted @ 2016-01-12 12:45  竹立荷塘  阅读(736)  评论(0编辑  收藏  举报