-
Notifications
You must be signed in to change notification settings - Fork 1
/
a-frame.html
108 lines (86 loc) · 4.32 KB
/
a-frame.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<html>
<head>
<!-- the aframe standard lib -->
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<!--
the aframe environment lib
https://github.com/supermedium/aframe-environment-component
-->
<script src="https://unpkg.com/aframe-environment-component@1.1.0/dist/aframe-environment-component.min.js">
</script>
<!--
the aframe paeticle system lib
https://github.com/IdeaSpaceVR/aframe-particle-system-component
-->
<script src="https://unpkg.com/aframe-particle-system-component@1.0.x/dist/aframe-particle-system-component.min.js">
</script>
<!-- the aframe physics
https://github.com/donmccurdy/aframe-physics-system
-->
<script src="//cdn.rawgit.com/donmccurdy/aframe-physics-system/v4.0.1/dist/aframe-physics-system.min.js"></script>
<!-- https://github.com/donmccurdy/aframe-extras -->
<script src="//cdn.rawgit.com/donmccurdy/aframe-extras/v6.0.0/dist/aframe-extras.min.js"></script>
<!-- https://github.com/fernandojsg/aframe-teleport-controls -->
<script src="https://rawgit.com/fernandojsg/aframe-teleport-controls/master/dist/aframe-teleport-controls.min.js">
</script>
<!-- https://github.com/wmurphyrd/aframe-super-hands-component -->
<script src="https://unpkg.com/super-hands@3.0.0/dist/super-hands.min.js"></script>
<!-- Multiuser: https://github.com/networked-aframe/networked-aframe-->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js"></script>
<script src="easyrtc/easyrtc.js"></script>
<script src="https://unpkg.com/networked-aframe/dist/networked-aframe.min.js"></script> -->
</head>
<body>
<a-scene physics="debug: true">
<!-- networked-scene="
serverURL: /;
app: testapp;
room: testroom;
connectOnLoad: true;
onConnect: onConnect;
adapter: wseasyrtc;
audio: false;
debug: false;
"> -->
<!-- some assets -->
<a-assets>
<!-- the nultiplayer avatar -->
<template id="avatar-template">
<a-sphere></a-sphere>
</template>
</a-assets>
<!-- the aframe standard lib -->
<a-box position="-1 0.7 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
<a-sphere position="0 1.45 -5" radius="1.25" color="#EF2D5E"></a-sphere>
<a-cylinder position="1 0.79 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
<a-plane static-body position="0 0.2 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-sky color="#ECECEC"></a-sky>
<!-- the aframe environment lib -->
<a-entity environment="preset: forest;"></a-entity>
<!-- physics example -->
<a-box dynamic-body position="0 5 -2" width="1" height="1" depth="1"></a-box>
<!-- superhand box -->
<a-box hoverable grabbable stretchable draggable dropppable color="blue" position="-10.7 0 -1"></a-box>
<!-- aframe extras -->
<a-ocean position="0 0.3 0" width="100" depth="100"></a-ocean>
<!-- teleport system -->
<a-entity id="cameraRig">
<!-- camera -->
<a-entity id="head" camera wasd-controls look-controls></a-entity>
<!-- <a-entity id="player" networked="template:#avatar-template;attachTemplateToLocal:false;"></a-entity> -->
<!-- the cursor for mobiles -->
<a-cursor id="cursor" cursor="fuse: true; fuseTimeout: 500" position="0 0 -1"
geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03" material="color: black; shader: flat">
</a-cursor>
<!-- hand controls -->
<!-- super hand controls -->
<a-entity sphere-collider="objects: a-box" super-hands hand-controls="left"
teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head; button: thumbstick"></a-entity>
<a-entity sphere-collider="objects: a-box" super-hands hand-controls="right"
teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head; button: thumbstick"></a-entity>
</a-entity>
<!-- Particle system uses 'default' preset, setting custom colors. -->
<a-entity position="0 2.25 -15" particle-system="preset: snow, particleCount:1000;"></a-entity>
</a-scene>
</body>
</html>