AFRAME.registerComponent('temp', {
init: function () {
var el = this.el;
var camera = this.el.getObject3D('camera');
console.log("CAMERA: "+camera);
}
});
I have an aframe scene with just a box and an a-camera object. I am trying to get a reference to the camera's object3D however, whenever I try, I am getting an undefined object. In addition to above, I have tried doing document.querySelector("#camera").object3D and that does not work either.
答案 0 :(得分:2)
您正试图在其中一个A-Frame示例(https://aframe.io/aframe/examples/boilerplate/hello-world/)上完成此任务:
handleClickLogo = () => {
this.props.children.props.history.push('/');
};