Spaces:
Running
Running
Update index.html
Browse files- index.html +102 -21
index.html
CHANGED
@@ -1,24 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
</html>
|
|
|
1 |
+
Hugging Face's logo
|
2 |
+
Hugging Face
|
3 |
+
Search models, datasets, users...
|
4 |
+
Models
|
5 |
+
Datasets
|
6 |
+
Spaces
|
7 |
+
Docs
|
8 |
+
Solutions
|
9 |
+
Pricing
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
Spaces:
|
14 |
+
|
15 |
+
AI-Zero-to-Hero
|
16 |
+
/
|
17 |
+
02-H5-AR-VR-IOT Copied
|
18 |
+
like
|
19 |
+
1
|
20 |
+
View logs
|
21 |
+
App
|
22 |
+
Files and versions
|
23 |
+
Community
|
24 |
+
Settings
|
25 |
+
02-H5-AR-VR-IOT
|
26 |
+
/
|
27 |
+
index.html
|
28 |
+
awacke1's picture
|
29 |
+
awacke1
|
30 |
+
Update index.html
|
31 |
+
a28fff6
|
32 |
+
about 21 hours ago
|
33 |
+
raw
|
34 |
+
history
|
35 |
+
blame
|
36 |
+
edit
|
37 |
+
delete
|
38 |
+
Safe
|
39 |
+
2.51 kB
|
40 |
<!DOCTYPE html>
|
41 |
<html>
|
42 |
+
<head>
|
43 |
+
<title>Dynamic Lights - A-Frame</title>
|
44 |
+
<meta name="description" content="Dynamic Lights - A-Frame">
|
45 |
+
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
|
46 |
+
<script src="https://unpkg.com/aframe-randomizer-components@3.0.2/dist/aframe-randomizer-components.min.js"></script>
|
47 |
+
<script src="https://unpkg.com/aframe-entity-generator-component@3.0.1/dist/aframe-entity-generator-component.min.js"></script>
|
48 |
+
<script>
|
49 |
+
AFRAME.registerComponent('random-material', {
|
50 |
+
init: function () {
|
51 |
+
this.el.setAttribute('material', {
|
52 |
+
color: this.getRandomColor(),
|
53 |
+
metalness: Math.random(),
|
54 |
+
roughness: Math.random()
|
55 |
+
});
|
56 |
+
},
|
57 |
+
getRandomColor: function () {
|
58 |
+
var letters = '0123456789ABCDEF'.split('');
|
59 |
+
var color = '#';
|
60 |
+
for (var i = 0; i < 6; i++) {
|
61 |
+
color += letters[Math.floor(Math.random() * 16)];
|
62 |
+
}
|
63 |
+
return color;
|
64 |
+
}
|
65 |
+
});
|
66 |
+
AFRAME.registerComponent('random-torus-knot', {
|
67 |
+
init: function () {
|
68 |
+
this.el.setAttribute('geometry', {
|
69 |
+
primitive: 'torusKnot',
|
70 |
+
radius: Math.random() * 10,
|
71 |
+
radiusTubular: Math.random() * .75,
|
72 |
+
p: Math.round(Math.random() * 10),
|
73 |
+
q: Math.round(Math.random() * 10)
|
74 |
+
});
|
75 |
+
}
|
76 |
+
});
|
77 |
+
</script>
|
78 |
+
</head>
|
79 |
+
<body>
|
80 |
+
<a-scene background="color: #111">
|
81 |
+
<a-assets>
|
82 |
+
<a-mixin id="light"
|
83 |
+
geometry="primitive: sphere; radius: 1.5"
|
84 |
+
material="color: #FFF; shader: flat"
|
85 |
+
light="color: #DDDDFF; distance: 120; intensity: 2; type: point"></a-mixin>
|
86 |
+
<a-mixin id="torusKnot"
|
87 |
+
random-torus-knot
|
88 |
+
random-material
|
89 |
+
random-position="min: -60 -60 -80; max: 60 60 40"></a-mixin>
|
90 |
+
</a-assets>
|
91 |
+
|
92 |
+
<!-- Use entity-generator component to generate 120 entities with the torusKnot mixin. -->
|
93 |
+
<a-entity entity-generator="mixin: torusKnot; num: 120"></a-entity>
|
94 |
+
|
95 |
+
<!-- Lights. -->
|
96 |
+
<a-entity animation="property: rotation; to: 0 0 360; dur: 4000; easing: linear; loop: true">
|
97 |
+
<a-entity mixin="light" position="30 0 0"></a-entity>
|
98 |
+
</a-entity>
|
99 |
+
|
100 |
+
<a-entity animation="property: rotation; to: 360 0 0; dur: 4000; easing: linear; loop: true">
|
101 |
+
<a-entity mixin="light" position="0 0 40"></a-entity>
|
102 |
+
</a-entity>
|
103 |
+
</a-scene>
|
104 |
+
</body>
|
105 |
</html>
|