From 786e57ccbd0ba8786d0c494bbb2577bb1382e2d0 Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Thu, 2 Nov 2023 13:46:53 +0100 Subject: [PATCH] work in progress [might break] --- boot.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 boot.js diff --git a/boot.js b/boot.js new file mode 100644 index 0000000..3a2a2ad --- /dev/null +++ b/boot.js @@ -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") + + }, + +});