Skip to content

Commit 76904ca

Browse files
authored
Fixed various small errors in examples (#5343)
Co-authored-by: Noeri Huisman <mrxz@users.noreply.github.com>
1 parent d54421f commit 76904ca

File tree

15 files changed

+27
-78
lines changed

15 files changed

+27
-78
lines changed

examples/animation/pivots/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<body>
1010
<a-scene>
1111
<a-assets>
12-
<a-mixin id="cylinder" geometry="primitive: cylinder; height: 2; openEnded: true; radius: 2" material="side: double">
12+
<a-mixin id="cylinder" geometry="primitive: cylinder; height: 2; openEnded: true; radius: 2" material="side: double"></a-mixin>
1313
<a-mixin id="scaleAnimation" animation="property: object3D.scale.y; from: 1.125; to: 0.0001; dur: 2000"></a-mixin>
1414
<img id="background" src="../../assets/img/gray-gradient.jpg">
1515
</a-assets>

examples/boilerplate/flythrough/index.html

Lines changed: 0 additions & 38 deletions
This file was deleted.

examples/performance/set-attribute/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@
4444
</head>
4545
<body>
4646
<a-scene>
47-
<a-mixin id="foo" dummy__1="foo: 1"></a-mixin>
48-
<a-mixin id="bar" dummy__1="foo: 2"></a-mixin>
49-
<a-mixin id="baz" dummy__1="foo: 3"></a-mixin>
47+
<a-assets>
48+
<a-mixin id="foo" dummy__1="foo: 1"></a-mixin>
49+
<a-mixin id="bar" dummy__1="foo: 2"></a-mixin>
50+
<a-mixin id="baz" dummy__1="foo: 3"></a-mixin>
51+
</a-assets>
5052

5153
<a-entity mixin="foo bar baz" dummy__1="a: false; b: false; c: false; d: false; e: false; f: false; g: false" set-attribute-test></a-entity>
5254
</a-scene>

examples/primitives/boxes/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<a-box mixin="box" position="0 -0.2 0" color="#4CC3D9"></a-box>
4444
<a-box mixin="box" position="0.5 -0.2 0.5" color="#93648D"></a-box>
4545
<a-box mixin="box" position="0 0 2" color="#7BC8A4"></a-box>
46-
<a-box mixin="box" position="-0.5 -0,5 3" color="#FFC65D"></a-box>
46+
<a-box mixin="box" position="-0.5 -0.5 3" color="#FFC65D"></a-box>
4747
<a-box mixin="box" position="0 0 4" color="#F16745"></a-box>
4848
<a-box mixin="box" position="-0.2 -0.4 5" color="#FFC65D"></a-box>
4949
<a-box mixin="box" position="0 0 6" color="#4CC3D9"></a-box>

examples/showcase/anime-UI/index.html

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,9 @@
66
<meta name="description" content="Anime UI — A-Frame">
77
<script src="../../../dist/aframe-master.js"></script>
88
<script src="https://unpkg.com/aframe-event-set-component@4.2.1/dist/aframe-event-set-component.min.js"></script>
9-
<script>
10-
AFRAME.registerComponent('hide-in-ar-mode', {
11-
// Set this object invisible while in AR mode.
12-
// TODO: could this be replaced with bind="visible: !ar-mode"
13-
// with https://www.npmjs.com/package/aframe-state-component ?
14-
init: function () {
15-
this.el.sceneEl.addEventListener('enter-vr', (ev) => {
16-
if (this.el.sceneEl.is('ar-mode')) {
17-
this.el.setAttribute('visible', false);
18-
}
19-
});
20-
this.el.sceneEl.addEventListener('exit-vr', (ev) => {
21-
this.el.setAttribute('visible', true);
22-
});
23-
}
24-
})
25-
</script>
269
</head>
2710
<body>
28-
<a-scene renderer="colorManagement: true;">
11+
<a-scene renderer="colorManagement: true;" vr-mode-ui="enterAREnabled: true">
2912
<a-assets>
3013
<a-asset-item id="engine" src="models/engine.glb"></a-asset-item>
3114
<a-mixin id="image" geometry="height: 2; width: 2"></a-mixin>
@@ -53,11 +36,11 @@
5336
<a-camera position="0 0 0" near="0.1"></a-camera>
5437
</a-entity>
5538

56-
<a-entity position="0 0 -3" hide-in-ar-mode>
39+
<a-entity position="0 0 -3" hide-on-enter-ar>
5740
<a-gltf-model src="#engine" rotation="90 0 0" scale="18 18 18"></a-gltf-model>
5841
</a-entity>
5942

60-
<a-entity id="wall-lights" position="-7.25 1.5 2.9" rotation="0 90 0" scale="1.25 1.25 1.25">
43+
<a-entity id="wall-lights" position="-7.25 1.5 2.9" rotation="0 90 0" scale="1.25 1.25 1.25" hide-on-enter-ar>
6144
<a-entity position="0 0 0" scale="0.05 0.05 0.05">
6245
<a-plane mixin="delayVisible" width="1" height="4" shader="flat" color="#B4E2F8" event-set__loaded="_delay: 350"></a-plane>
6346
<a-plane width="6" height="4" color="#586266" opacity="0.6" position="0 0 -.01"></a-plane>

examples/showcase/hand-tracking/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<a-entity slider position="0 0.10 0"></a-entity>
5555
<a-entity id="sphereButton" button="label: sphere" position="-0.15 0 0"></a-entity>
5656
<a-entity id="boxButton" button="label: box" position="0 0 0"></a-entity>
57-
<a-entity id="torusButton"button="label: torus" position="0.15 0 0"></a-entity>
57+
<a-entity id="torusButton" button="label: torus" position="0.15 0 0"></a-entity>
5858
<a-entity id="darkModeButton" button="label: Dark Mode; width: 0.20; toggable: true" position="0 -0.10 0"></a-entity>
5959
</a-entity>
6060
<a-entity hand-tracking-controls="hand: left"></a-entity>

examples/showcase/spheres-and-fog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<!-- Orange -->
2222
<a-entity position="0 0 -5">
2323
<a-sphere position="0 4.2 0" radius="4.2" color="#F16745"
24-
roughness="0.8" width-segments="52" height-segments="52"></a-sphere>
24+
roughness="0.8" segments-width="52" segments-height="52"></a-sphere>
2525
<a-image src="#shadow3" rotation="-90 0 0" scale="3 3 3"></a-image>
2626
</a-entity>
2727

examples/test/animation-color/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<body>
3030
<a-scene pulse stats>
3131
<a-assets>
32-
<a-mixin id="box" geometry="primitive: box; depth: 0.5; height: 1; width: 0.5" material="color: #2D4659">
32+
<a-mixin id="box" geometry="primitive: box; depth: 0.5; height: 1; width: 0.5" material="color: #2D4659"></a-mixin>
3333
<a-mixin id="pulse" animation="property: components.material.material.color; type: color; from: #FDFBDA; to: #2D4659; dur: 1000; startEvents: pulse"></a-mixin>
3434
</a-assets>
3535

examples/test/embedded-cursor/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</style>
1717
</head>
1818
<body>
19-
<a-scene backround="color: #FBE0D8" embedded="true">
19+
<a-scene background="color: #FBE0D8" embedded="true">
2020
<a-assets>
2121
<audio id="blip1" src="../../showcase/anime-UI/audio/321103__nsstudios__blip1.wav"></audio>
2222
<audio id="blip2" src="../../showcase/anime-UI/audio/321104__nsstudios__blip2.wav"></audio>
@@ -32,7 +32,7 @@
3232
<a-mixin id="sphere" geometry="primitive: sphere"></a-mixin>
3333
</a-assets>
3434

35-
<a-entity cursor="rayOrigin: mouse; objects: .intersectable; far: 30"></a-entity>
35+
<a-entity cursor="rayOrigin: mouse" raycaster="objects: .intersectable; far: 30"></a-entity>
3636

3737
<a-camera position="0 .6 4"></a-camera>
3838

@@ -46,6 +46,7 @@
4646
<a-entity position="0 1 1">
4747
<a-entity id="invisibleCube"
4848
mixin="cube"
49+
class="intersectable"
4950
material="color: grey; opacity: 0.3; transparent: true"
5051
scale="1 1 0.1"
5152
animation="startEvents: click; property: rotation; to: 0 360 0; easing: linear; dur: 2000">
@@ -64,6 +65,7 @@
6465

6566
<a-entity position="1 1 0">
6667
<a-entity mixin="yellow cube"
68+
class="intersectable"
6769
sound__1="on: click; src: #shot; poolSize: 6"
6870
sound__2="src: #blip2; autoplay: true"
6971
animation="startEvents: click; property: scale; to: 1.2 1.2 1.2; easing: linear; dur: 200">

examples/test/geometry-gallery/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</a-mixin>
2020
<a-mixin id="cylinder"
2121
geometry="primitive: cylinder; radius: 0.2; height: .5;
22-
segmentsRadial: 50; segmentsHeight: 50:
22+
segmentsRadial: 50; segmentsHeight: 50;
2323
openEnded: true; thetaStart: 0; thetaLength: 360">
2424
</a-mixin>
2525
<a-mixin id="ring"
@@ -84,9 +84,9 @@
8484
<a-entity position="-2.5 0 1">
8585
<a-entity mixin="column">
8686
<a-entity mixin="column-light"></a-entity>
87-
<a-entity mixin="object-on-column color box spin" animation__spin="to: 360 360 0"></a-entity>
88-
<a-entity mixin="object-on-column color box spin" position=".18 1.2 .1" animation__spin="to: 360 360 0"></a-entity>
89-
<a-entity mixin="object-on-column color box spin" position="-.18 1.2 -.2" animation__spin="to: 360 360 0"></a-entity>
87+
<a-entity mixin="object-on-column color box spin" animation__spin="to: 360"></a-entity>
88+
<a-entity mixin="object-on-column color box spin" position=".18 1.2 .1" animation__spin="to: 360"></a-entity>
89+
<a-entity mixin="object-on-column color box spin" position="-.18 1.2 -.2" animation__spin="to: 360"></a-entity>
9090
</a-entity>
9191
<a-entity mixin="column-bottom"></a-entity>
9292
</a-entity>

0 commit comments

Comments
 (0)