export class SceneAssetsController {
  constructor() {
    this._params_by_id = new Map();
    this._assets_root = null;
  }
  register_param(param) {
    this._params_by_id.set(param.graphNodeId(), param);
  }
  deregister_param(param) {
    this._params_by_id.delete(param.graphNodeId());
  }
  traverse_params(callback) {
    this._params_by_id.forEach((param, id) => {
      callback(param);
    });
  }
  root() {
    return this._assets_root;
  }
  setRoot(url) {
    if (url == "") {
      url = null;
    }
    this._assets_root = url;
  }
}
