disabled other menuitems
This commit is contained in:
parent
98c3adb791
commit
658e113853
|
@ -37,7 +37,7 @@ if( typeof AFRAME != 'undefined '){
|
||||||
transparent: { type:'boolean', "default":false } // need good gpu
|
transparent: { type:'boolean', "default":false } // need good gpu
|
||||||
},
|
},
|
||||||
|
|
||||||
init: function(){
|
init: async function(){
|
||||||
this.el.object3D.visible = false
|
this.el.object3D.visible = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -107,21 +107,7 @@ if( typeof AFRAME != 'undefined '){
|
||||||
`
|
`
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initTerminal: async function(){
|
||||||
events:{
|
|
||||||
|
|
||||||
// combined AFRAME+DOM reactive events
|
|
||||||
click: function(e){ }, //
|
|
||||||
keydown: function(e){ },
|
|
||||||
|
|
||||||
// reactive events for this.data updates
|
|
||||||
myvalue: function(e){ this.el.dom.querySelector('b').innerText = this.data.myvalue },
|
|
||||||
|
|
||||||
ready: function( ){
|
|
||||||
this.el.dom.style.display = 'none'
|
|
||||||
},
|
|
||||||
|
|
||||||
launcher: async function(){
|
|
||||||
if( this.instance ){
|
if( this.instance ){
|
||||||
const el = document.querySelector('.isoterminal')
|
const el = document.querySelector('.isoterminal')
|
||||||
return console.warn('TODO: allow multiple terminals (see v86 examples)')
|
return console.warn('TODO: allow multiple terminals (see v86 examples)')
|
||||||
|
@ -186,6 +172,24 @@ if( typeof AFRAME != 'undefined '){
|
||||||
this.el.sceneEl.addEventListener('enter-ar', focus )
|
this.el.sceneEl.addEventListener('enter-ar', focus )
|
||||||
|
|
||||||
instance.object3D.quaternion.copy( AFRAME.scenes[0].camera.quaternion ) // face towards camera
|
instance.object3D.quaternion.copy( AFRAME.scenes[0].camera.quaternion ) // face towards camera
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
events:{
|
||||||
|
|
||||||
|
// combined AFRAME+DOM reactive events
|
||||||
|
click: function(e){ }, //
|
||||||
|
keydown: function(e){ },
|
||||||
|
|
||||||
|
// reactive events for this.data updates
|
||||||
|
myvalue: function(e){ this.el.dom.querySelector('b').innerText = this.data.myvalue },
|
||||||
|
|
||||||
|
ready: function( ){
|
||||||
|
this.el.dom.style.display = 'none'
|
||||||
|
},
|
||||||
|
|
||||||
|
launcher: async function(){
|
||||||
|
this.initTerminal()
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -244,20 +248,4 @@ if( typeof AFRAME != 'undefined '){
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// reflect HTML changes to /dev/browser/html
|
|
||||||
AFRAME.registerSystem('isoterminal',{
|
|
||||||
|
|
||||||
init: function(){
|
|
||||||
this.components = []
|
|
||||||
// observe HTML changes in <a-scene>
|
|
||||||
observer = new MutationObserver( (a,b) => {
|
|
||||||
|
|
||||||
console.log("change")
|
|
||||||
})
|
|
||||||
observer.observe( this.sceneEl, {characterData: false, childList: true, attributes: false});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ source /mnt/profile.xrsh
|
||||||
source /mnt/profile.sh
|
source /mnt/profile.sh
|
||||||
|
|
||||||
# source js functions
|
# source js functions
|
||||||
js "$(cat ~/.profile.js)" &>/dev/null &
|
./.profile.js
|
||||||
|
|
||||||
## forward not-found commands to javascript (via jsh)
|
## forward not-found commands to javascript (via jsh)
|
||||||
command_not_found_handle(){
|
command_not_found_handle(){
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/bin/js
|
||||||
|
|
||||||
window.helloworld = function(){
|
window.helloworld = function(){
|
||||||
alert("hello world")
|
alert("hello world")
|
||||||
return "hello world"
|
return "hello world"
|
||||||
|
|
|
@ -15,6 +15,8 @@ test -d /dev/browser || {
|
||||||
ln -s /mnt/profile.browser ~/.profile.browser
|
ln -s /mnt/profile.browser ~/.profile.browser
|
||||||
ln -s /mnt/profile.sh ~/.profile.sh
|
ln -s /mnt/profile.sh ~/.profile.sh
|
||||||
ln -s /mnt/motd ~/.motd
|
ln -s /mnt/motd ~/.motd
|
||||||
|
ln -s ~/.profile.js ~/index.js
|
||||||
|
chmod +x ~/.profile.js
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_browser_dev(){
|
setup_browser_dev(){
|
||||||
|
|
|
@ -45,9 +45,12 @@ AFRAME.registerComponent('launcher', {
|
||||||
cols: { type:"number", "default": 5 }
|
cols: { type:"number", "default": 5 }
|
||||||
},
|
},
|
||||||
|
|
||||||
dependencies:['dom'],
|
dependencies:{
|
||||||
|
dom: "com/dom.js"
|
||||||
|
},
|
||||||
|
|
||||||
init: async function () {
|
init: async function () {
|
||||||
|
await AFRAME.utils.require(this.dependencies)
|
||||||
this.worldPosition = new THREE.Vector3()
|
this.worldPosition = new THREE.Vector3()
|
||||||
|
|
||||||
await AFRAME.utils.require({
|
await AFRAME.utils.require({
|
||||||
|
@ -377,7 +380,7 @@ AFRAME.registerSystem('launcher',{
|
||||||
|
|
||||||
updateLauncher: function(){
|
updateLauncher: function(){
|
||||||
let launcher = document.querySelector('[launcher]')
|
let launcher = document.querySelector('[launcher]')
|
||||||
if( launcher ) launcher.components['launcher'].render()
|
if( launcher ) launcher.components.launcher.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue