SoundTab.ts 744 B

1234567891011121314151617181920212223242526
  1. module INSPECTOR {
  2. export class SoundTab extends PropertyTab {
  3. constructor(tabbar: TabBar, inspector: Inspector) {
  4. super(tabbar, 'Audio', inspector);
  5. }
  6. /* Overrides super */
  7. protected _getTree(): Array<TreeItem> {
  8. let arr = new Array<TreeItem>();
  9. // get all cameras from the first scene
  10. let instances = this._inspector.scene;
  11. for (let sounds of instances.soundTracks) {
  12. let sound = sounds.soundCollection;
  13. sound.forEach(element => {
  14. arr.push(new TreeItem(this, new SoundAdapter(element)));
  15. });
  16. }
  17. return arr;
  18. }
  19. }
  20. }