1
コンポーネント内からシーンを取得する方法.init()
はAフレーム内で機能しますか?Aフレーム内のコンポーネント内からシーンにアクセスする方法は?
AFRAME.registerComponent('foo', {
init: function() {
// ?
}
});
コンポーネント内からシーンを取得する方法.init()
はAフレーム内で機能しますか?Aフレーム内のコンポーネント内からシーンにアクセスする方法は?
AFRAME.registerComponent('foo', {
init: function() {
// ?
}
});
https://aframe.io/docs/0.4.0/core/component.html#component-prototype-properties
AFRAME.registerComponent('foo', {
init: function() {
console.log(this.el.sceneEl);
},
update: function() {
console.log(this.el.sceneEl);
}
});