-
Notifications
You must be signed in to change notification settings - Fork 69
/
extended-wasd-controls.html
43 lines (34 loc) · 1 KB
/
extended-wasd-controls.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
<!DOCTYPE html>
<html>
<head>
<title>A-Frame: Extended WASD Controls</title>
<meta name="description" content="A-Frame Examples">
<script src="js/aframe-master-v1.3.0.min.js"></script>
<script src="js/aframe-environment-component.min.js"></script>
<script src="js/extended-wasd-controls.js"></script>
</head>
<body>
<script>
</script>
<!--
disable press "F" to enter fullscreen mode.
-->
<a-scene environment="preset: arches; shadow: true;"
keyboard-shortcuts="enterVR: false;">
<a-assets>
<img id="crate" src="images/crate.jpg" />
</a-assets>
<!--
create a camera entity; not adding default wasd-controls.
if desired, look-controls component can be added to camera,
which automatically sets turnEnabled/lookEnabled to false
-->
<a-entity id="camera" camera
position="0 1.6 0"
extended-wasd-controls="flyEnabled: true; turnEnabled: true; lookEnabled: true; maxLookAngle: 60;">
</a-entity>
<a-box position="0 0.5 -5" material="src:#crate;" shadow>
</a-box>
</a-scene>
</body>
</html>