如何从 A-Frame 中的组件访问场景?

How to access the scene from within a component in A-Frame?

如何从 A-Frame 中的组件 .init() 函数中获取场景?

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);
  }
});