此处示例与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
答案 0 :(得分:0)
球体太小而看不见。您可以通过以下任一方法进行检查:
a)将<a-videosphere>
的半径从900
更改为100
b)将球面比例从0.1 0.1 0.1
更改为5 5 5
提琴here(案例b)。