work in progress [might break]
This commit is contained in:
parent
76e3244a1a
commit
544a2be784
|
@ -3,21 +3,21 @@ AFRAME.registerComponent('helloworld', {
|
||||||
|
|
||||||
init: function () {
|
init: function () {
|
||||||
|
|
||||||
// entrypoint for single-file webxros/AFRAME components
|
// entrypoint for single-file xrshell/AFRAME components
|
||||||
this.addEventListener('webxros', (opts) => {
|
this.addEventListener('xrshell', (opts) => {
|
||||||
this.require({
|
const require = AFRAME.components.xrshell.require // available by adding <a-scene xrshell>
|
||||||
"superclipboard": { required: false, repo: "https://github.com/Utopiah/aframe-components" },
|
"superclipboard": { required: false, repo: "https://github.com/Utopiah/aframe-components" },
|
||||||
"spatialeditor": { required: false, repo: "https://github.com/coderofsalvation/webxros-apps" },
|
"spatialeditor": { required: false, repo: "https://github.com/coderofsalvation/xrshell-apps" },
|
||||||
"jsonform": { required: false, repo: "https://github.com/coderofsalvation/webxros-apps" },
|
"jsonform": { required: false, repo: "https://github.com/coderofsalvation/xrshell-apps" },
|
||||||
"speech-controls": { required: false, url: "https://rawgit.com/Utopiah/aframe-speech-controls-component/master/dist/aframe-speech-controls-component.min.js"},
|
"speech-controls": { required: false, url: "https://rawgit.com/Utopiah/aframe-speech-controls-component/master/dist/aframe-speech-controls-component.min.js"},
|
||||||
"ISOterminal": { required: false }
|
"ISOterminal": { required: false }
|
||||||
})
|
})
|
||||||
// the components above get saved cached/to the browser (IndexedDB) filesystem (so the ISOterminal can read/edit them as well in realtime)
|
// the components above get saved cached/to the browser (IndexedDB) filesystem (so the ISOterminal can read/edit them as well in realtime)
|
||||||
|
// when a required component cannot be included, then this (helloworld) component will be removed and
|
||||||
|
// errors will show up in the javascript browser and XR terminal consoles.
|
||||||
})
|
})
|
||||||
|
|
||||||
this.addEventListener('microgesture-auth', (com) => { // component was mounted
|
this.addEventListener('ISOterminal', (term) => { // act when component gets mounted
|
||||||
this.addEventListener('superclipboard', (com) => { // component was mounted
|
|
||||||
this.addEventListener('ISOterminal', (term) => {
|
|
||||||
// 'term' is basically AFRAME.components.ISOterminal
|
// 'term' is basically AFRAME.components.ISOterminal
|
||||||
term.write('hello to XR linux terminal from AFRAME')
|
term.write('hello to XR linux terminal from AFRAME')
|
||||||
term.on('stdout', (data) => {
|
term.on('stdout', (data) => {
|
||||||
|
|
Loading…
Reference in New Issue