-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.html
More file actions
30 lines (27 loc) · 1.07 KB
/
demo.html
File metadata and controls
30 lines (27 loc) · 1.07 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A demo of A-Frame-By-Code</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://faace.github.io/aFrameByCode/dist/aFrameByCode.min.js"></script>
</head>
<body>
<script>
AFRAME.createAScene({
id: 'scene1',
onInit: function (scene) {
scene.addEntities({
'a-box': { position: "-1 0.5 -3", rotation: "0 45 0", color: "#4CC3D9" },
'a-sphere': { position: "0 1.25 -5", radius: "1.25", color: "#EF2D5E" },
'a-cylinder': { position: "1 0.75 -3", radius: "0.5", height: "1.5", color: "#FFC65D" },
'a-plane': { position: "0 0 -4", rotation: "-90 0 0", width: "4", height: "4", color: "#7BC8A4" },
'a-sky': { color: "#ECECEC" },
});
},
});
AFRAME.loadScene('scene1');
</script>
</body>
</html>