Ver código fonte

A-Frame plugin: tweaks to the docs

customisations
alemart 6 meses atrás
pai
commit
c973bae73a
1 arquivos alterados com 7 adições e 13 exclusões
  1. 7
    13
      docs/api/plugin-aframe.md

+ 7
- 13
docs/api/plugin-aframe.md Ver arquivo

@@ -211,12 +211,10 @@ The `<ar-sources>` primitive is used to specify the [sources of data](./source.m
211 211
 ...
212 212
 
213 213
 <!-- External assets -->
214
-<a-assets>
215
-    <video id="my-video" hidden muted loop playsinline autoplay>
216
-        <source src="my-video.webm" type="video/webm" />
217
-        <source src="my-video.mp4" type="video/mp4" />
218
-    </video>
219
-</a-assets>
214
+<video id="my-video" hidden muted loop playsinline autoplay>
215
+    <source src="my-video.webm" type="video/webm" />
216
+    <source src="my-video.mp4" type="video/mp4" />
217
+</video>
220 218
 ```
221 219
 
222 220
 ### ar-canvas-source
@@ -334,7 +332,8 @@ AFRAME.registerComponent('my-component', {
334 332
 
335 333
     tick()
336 334
     {
337
-        const ar = this.ar;
335
+        const scene = this.el.sceneEl;
336
+        const ar = scene.systems.ar;
338 337
         const session = ar.session;
339 338
 
340 339
         // ...
@@ -342,11 +341,6 @@ AFRAME.registerComponent('my-component', {
342 341
 
343 342
     // ...
344 343
 
345
-    get ar()
346
-    {
347
-        return this.el.sceneEl.systems.ar;
348
-    }
349
-
350 344
 });
351 345
 ```
352 346
 
@@ -460,4 +454,4 @@ The `ar-started` event is emitted when the main loop of the AR scene is set up,
460 454
 
461 455
 **Details**
462 456
 
463
-* `ar: object`. A reference to the [ar](#ar) system.
457
+* `ar: object`. A reference to the [ar](#ar) system.

Carregando…
Cancelar
Salvar