awacke1 commited on
Commit
468af3e
·
1 Parent(s): f6682ef

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +28 -16
index.html CHANGED
@@ -1,19 +1,31 @@
1
  <!DOCTYPE html>
2
  <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!DOCTYPE html>
2
  <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>A-Frame GLB Loader Demo</title>
6
+ <script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
7
+ <script src="https://cdn.jsdelivr.net/npm/aframe-animation-component/dist/aframe-animation-component.min.js"></script>
8
+ </head>
9
+ <body>
10
+ <a-scene>
11
+ <!-- Load the first GLB file -->
12
+ <a-gltf-model id="model1" src="model1.glb" position="-2 0 -5" animation-mixer></a-gltf-model>
13
+
14
+ <!-- Load the second GLB file -->
15
+ <a-gltf-model id="model2" src="model2.glb" position="2 0 -5" animation-mixer></a-gltf-model>
16
+
17
+ <!-- Add a ground plane for the models to stand on -->
18
+ <a-plane position="0 -1 -5" rotation="-90 0 0" width="10" height="10" color="#7BC8A4"></a-plane>
19
+
20
+ <!-- Create an interface for moving the models around -->
21
+ <a-entity id="controller" laser-controls="hand: right" raycaster="objects: .movable">
22
+ <a-entity id="model1-handle" class="movable" position="-2 0 -5" rotation="0 45 0" scale="0.5 0.5 0.5">
23
+ <a-entity gltf-model="#model1" animation-mixer></a-entity>
24
+ </a-entity>
25
+ <a-entity id="model2-handle" class="movable" position="2 0 -5" rotation="0 -45 0" scale="0.5 0.5 0.5">
26
+ <a-entity gltf-model="#model2" animation-mixer></a-entity>
27
+ </a-entity>
28
+ </a-entity>
29
+ </a-scene>
30
+ </body>
31
  </html>