work in progress [might break]
This commit is contained in:
parent
796790990d
commit
07ab3d5715
2 changed files with 4 additions and 3 deletions
|
|
@ -38,10 +38,10 @@ window.AFRAME.registerComponent('xrf', {
|
|||
mesh.material.visible = false
|
||||
let el = document.createElement("a-entity")
|
||||
el.setAttribute("xrf-get", mesh.name )
|
||||
el.setAttribute("class","floor ray")
|
||||
el.setAttribute("class","floor")
|
||||
$('a-scene').appendChild(el)
|
||||
})
|
||||
blinkControls = blinkControls.components['blink-controls'].update({collisionEntities:true})
|
||||
blinkControls.components['blink-controls'].update({collisionEntities:true})
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,10 @@ window.AFRAME.registerComponent('xrf-get', {
|
|||
|
||||
setTimeout( () => {
|
||||
|
||||
if( !this.mesh && this.el.className.match(/ray/) ){
|
||||
if( !this.mesh ){
|
||||
let scene = AFRAME.XRF.scene
|
||||
let mesh = this.mesh = scene.getObjectByName(meshname);
|
||||
if( !this.el.className.match(/ray/) ) this.el.className += " ray"
|
||||
if (!mesh){
|
||||
console.error("mesh with name '"+meshname+"' not found in model")
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue