-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (55 loc) · 1.57 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!doctype html>
<html>
<head>
</head>
<body>
<h1>
Kagura.js develop page.
</h1>
<noscript>
This browser is not working JavaScript.
</noscript>
<div id="log">
</div>
<canvas width="480" height="360" id="test">
</canvas>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.9/lodash.min.js"></script>
<script src="kagura.js"></script>
<script>
class Test extends kagura.Scene{
constructor(){
super()
const text=new kagura.obj.Text({
text:"aajhiugiui"
}).addChildTo(this)
text.text="a"
new kagura.obj.shape.Ellipse({
x:100,
y:100
}).addChildTo(this)
const lin=new kagura.obj.shape.Line({
}).addChildTo(this)
lin.color=0xff0000
new kagura.obj.shape.Rect({
})
}
update(a){
//console.log(a.keys)
}
}
const app=new kagura.Kagura({
element:document.getElementById("test"),
width:480,
height:360,
StartScene:Test
})
app.mainroop()
console.log("aa")
document.getElementById("test").addEventListener("touchend",function(){
kagura.fullscreen(document.getElementById("test"))
})
</script>
<a href="test/api/sounder.html">sounder</a>
</body>
</html>