-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmouselock.html
84 lines (60 loc) · 1.92 KB
/
mouselock.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE HTML>
<!--
this file is from https://github.com/nickshin/CheatSheets/
this file contains some HTML5 snippets on:
- mouselock
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reference sources:
+ http://hacks.mozilla.org/2011/12/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-apis/
o http://humphd.github.com/mozilla-central/mouselock/
+ http://www.html5rocks.com/en/tutorials/pointerlock/intro/
+ https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API
+
DEMO!!!
+
notes:
- this is still TBD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
best viewed in editor with tab stops set to 4
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-->
<!-- ================================================== -->
<!-- START OF HTML -->
<html>
<head>
<title>Mouse Lock : HTML5 test code</title>
<!-- ================================================== -->
<!-- Javascript {{{ -->
<!-- ================================================== -->
<!-- .................................................. -->
<!-- mouselock {{{2 -->
<!-- .................................................. -->
<script>
function mouselock_onload() {
}
</script>
<!-- .................................................. -->
<!-- mouselock }}}2 -->
<!-- this document {{{2 -->
<!-- .................................................. -->
<script>
onload = onload_handler;
function onload_handler() {
mouselock_onload();
}
</script>
<!-- .................................................. -->
<!-- this document }}}2 -->
<!-- Javascript }}} -->
<!-- ================================================== -->
</head>
<!-- ================================================== -->
<!-- START OF BODY -->
<body>
Coming soon!
<p>
This is still a moving target.<br>
Please view source for notes.
<!-- ================================================== -->
</body>
</html>