A框架:从<a-videosphere>内部的池中获取球体不可见

时间:2019-06-26 08:42:37

标签: javascript aframe pool

此处示例与Q绑定的内容     https://jsfiddle.net/91zcdm5r/1/

Exact problem: entity is adding from pool well, but it is not showing inside videsphere.

Looks like if videosphere have something like z-index 9999 , it is overlapping a-sphere entity. (not literally but looks like)    

想想主要原因是因为无法在a球体内添加a球吗?

示例:

AFRAME.registerComponent('mainvideo', {
    init: function() {
  //....



        let intersection = this.raycaster.components.raycaster.getIntersection(this.el);
        sphere.setAttribute('position', intersection.point)

 console.log('sphere', sphere) //logs entity ok
//but it is not showing here

/* If try to add explit way like this: 
     //   doc.querySelector('a-scene').appendChild(sphere)
      //fall with core error             
*/

      })

在此处可以执行哪些操作以显示实体a球可见。 请检查Piotr分叉的js小提琴 https://jsfiddle.net/91zcdm5r/1/

ps:上一个问号。 How is properly to make pool with 10 <a-sphere>s A-frame

1 个答案:

答案 0 :(得分:0)

球体太小而看不见。您可以通过以下任一方法进行检查:
a)将<a-videosphere>的半径从900更改为100
b)将球面比例从0.1 0.1 0.1更改为5 5 5

提琴here(案例b)。