-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
34 lines (31 loc) · 827 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" charset="utf-8" async="" src="build/lightsp.min.js"></script>
</head>
<body>
<script>
window.onload = function(){
var manager = LightManager.create({fps:25, stage: {width: 200, height:200, canvas:document.getElementById('myCanvas')}});
var sprites = LightSpritesheet.create({
cols: 9,
frames: {count: 9, width: 50, height: 72, src: "dude_animation_sheet.png"},
loop:true,
x: 0,
y: 0
});
var sprites2 = Object.create(sprites);
sprites2.x = 100;
var sprites3 = Object.create(sprites2);
sprites3.y = 100;
manager.add(sprites);
manager.add(sprites2);
manager.add(sprites3);
manager.start();
}
</script>
<canvas id="myCanvas" width="200" height="200"></canvas>
</body>
</html>