This repository was archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy pathmaterials.html
34 lines (32 loc) · 1.74 KB
/
materials.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
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Materials</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://rawgit.com/feiss/aframe-environment-component/master/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.rawgit.com/donmccurdy/aframe-extras/v3.2.5/dist/components/sphere-collider.js"></script>
<script src="../dist/aframe-physics-system.js"></script>
<script src="components/force-pushable.js"></script>
</head>
<body>
<a-scene stats="true"
environment
physics="driver: worker; restitution: 1;">
<!-- Player -->
<a-entity camera="userHeight: 1.6" look-controls wasd-controls position="0 0.1 0">
<a-entity cursor
position="0 0 -0.5"
geometry="primitive: circle; radius: 0.01; segments: 4;"
material="color: #FF4444; shader: flat"></a-entity>
</a-entity>
<a-entity static-body="shape: sphere; sphereRadius: 0.02;" hand-controls="hand: left" sphere-collider="objects: [dynamic-body];" grab></a-entity>
<a-entity static-body="shape: sphere; sphereRadius: 0.02;" hand-controls="hand: right" sphere-collider="objects: [dynamic-body];" grab></a-entity>
<!-- Terrain -->
<a-box width="75" height="0.1" depth="75" static-body visible="false"></a-box>
<!-- Blocks -->
<a-sphere radius="0.25" position="0 4 -2" color="red" dynamic-body force-pushable></a-sphere>
</a-scene>
</body>
</html>