update documentation
This commit is contained in:
parent
8d124330d5
commit
839dad5f36
|
@ -7,7 +7,7 @@ This is a library of useful AFRAME components which can be used in any AFRAME ap
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.jsdelivr.net/gh/coderofsalvation/webxros-apps/helloworld.js"/>
|
<script src="https://coderofsalvation.github.io/webxros-apps/helloworld.js"/>
|
||||||
|
|
||||||
<a-entity helloworld="foo:1" class="cubes" name="box">
|
<a-entity helloworld="foo:1" class="cubes" name="box">
|
||||||
```
|
```
|
||||||
|
|
|
@ -8,7 +8,7 @@ AFRAME.registerComponent('helloworld', {
|
||||||
let scene = document.querySelector('a-scene').object3D
|
let scene = document.querySelector('a-scene').object3D
|
||||||
|
|
||||||
// webxros events are optional, but can be listed here
|
// webxros events are optional, but can be listed here
|
||||||
scene.addEventListener('tty', (tty) = > {
|
scene.addEventListener('tty', (tty) => {
|
||||||
tty.write("hello terminal from XR")
|
tty.write("hello terminal from XR")
|
||||||
tty.on('stdout', (data) => {
|
tty.on('stdout', (data) => {
|
||||||
// react to data being spoken/typed into the terminal
|
// react to data being spoken/typed into the terminal
|
||||||
|
|
Loading…
Reference in New Issue