赞
踩
在VSCode里,直接F5打开html页面,并且可以在编辑器里编辑代码
安装vs code (在官网下载)
安装nodejs : 输入npm install node
安装canvas:输入npm install canvas
安装easeljs:输入 npm install easeljs
VSCode 上装一个插件:Debugger for Chrome.
<html> <head> <title>动画特效</title> <script src="C:\Users\Administrator\node_modules\easeljs\lib\easeljs.js" charset="utf-8"></script> </head> <body onload="init();"> <canvas id="demoCanvas" width="500" height="300"></canvas> <script> function init() { var stage = new createjs.Stage("demoCanvas"); var circle = new createjs.Shape(); circle.graphics.beginFill("DeepSkyBlue").drawCircle(0, 0, 50); circle.x = 100; circle.y = 100; stage.addChild(circle); stage.update(); } </script> </body> </html>
参考
1.H5动画入门 Easeljs篇(学习笔记)https://www.jianshu.com/p/93e12e9102de
2.使用VSCode 断点调试 js项目,html页面https://blog.csdn.net/arvin0/article/details/53673351
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。