work in progress [might break]

This commit is contained in:
Leon van Kammen 2023-11-02 13:46:53 +01:00
parent 3f62d6566c
commit 786e57ccbd
1 changed files with 19 additions and 0 deletions

19
boot.js Normal file
View File

@ -0,0 +1,19 @@
AFRAME.registerComponent('boot', {
init: function ( ) {
let scene = document.querySelector('a-scene').object3D
// webxros events are optional, but can be listed here
scene.addEventListener('tty', (tty) => {
tty.write("hello terminal from XR")
tty.on('stdout', (data) => {
// react to data being spoken/typed into the terminal
// (spatial prompting like 'open foo.gltf', 'component helloworld' e.g.)
})
})
console.log("this is the boot component which initializes other components")
},
});