3 Star 14 Fork 2

月挂夜中央/animate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
2.html 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
wangpinghua 提交于 2019-05-31 10:40 . 修改
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>horse</title>
</head>
<body>
<canvas id="mycanvas" width="1500" height="280"></canvas>
<script type="text/javascript" src="js/easeljs.min.js"></script>
<script type="text/javascript">
var stage = new createjs.Stage("mycanvas")
createjs.Ticker.addEventListener("tick", stageBreakHandler);
var img = new Image()
img.src = "img/horse.png"
img.onload = function(){
var ss = new createjs.SpriteSheet({
"images": ["img/horse.png"],
"frames": [
[519,1352,468,225,0,-1539.5,-6.05],
[525,694,405,225,0,-1439.5,-6.05],
[402,1577,398,241,0,-1337.5,-9.05],
[0,1565,402,239,0,-1233.5,-8.05],
[521,920,430,233,0,-1123.5,-14.05],
[520,0,465,228,0,-907.5,-22.05],
[515,238,479,228,0,-808.5,-24.05],
[508,470,500,224,0,-702.5,-26.05],
[0,470,508,231,0,-605.5,-20.05],
[0,238,515,232,0,-509.5,-17.05],
[0,0,520,238,0,-412.5,-11.05],
[0,920,521,219,0,-318.5,-11.05],
[0,701,525,219,0,-218.5,-11.05],
[0,1352,519,213,0,-128.5,-10.05],
[0,1139,520,213,0,-28.5,-10.05]
],
"animations" : {
"run": [0,15,"run",0.5]
}
})
var sp = new createjs.Sprite(ss,"run")
stage.addChild(sp)
stage.update();
}
function stageBreakHandler(event){
stage.update();
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wphmoon/animate.git
git@gitee.com:wphmoon/animate.git
wphmoon
animate
animate
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385