-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest.html
40 lines (32 loc) · 897 Bytes
/
test.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
<!DOCTYPE html>
<!-- CopyRight (c) 2013 John Robinson - http://www.storminthecastle.com -->
<html>
<head>
<title>Goo Events!</title>
<link href="../style/style.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<script src="../build/goo.min.js"></script>
<script>
window.onload = function() {
var g = new Goo({width:300, height:300,
container: document.getElementById("events"),
onMouseMove: function(g){
console.log("onMouseMove: ", [g.mouseX, g.mouseY]);
},
onKeyDown: function(g){
console.log("onKeyDown: ", [g.keyCode]);
},
onMouseDown: function(g){
console.log("onMouseMove: ", [g.mouseX, g.mouseY]);
},
});
}
</script>
<body>
<h1>Goo Events!</h1>
<a href="../">by John Robinson</a><br/><br/>
<div id="events" width="300" height="300"></div>
Demo: Try mousing around, clicking, dragging and typing on your keyboard.<br/>
<br/>
</body>
</html>