LiveLocation.js 883 B

1234567891011121314
  1. export default class LiveLocation{update(){}
  2. uiLocation(){}
  3. dispose(){}
  4. isBlackboxed(){}}
  5. export class LiveLocationWithPool{constructor(updateDelegate,locationPool){this._updateDelegate=updateDelegate;this._locationPool=locationPool;this._locationPool._add(this);}
  6. update(){this._updateDelegate(this);}
  7. uiLocation(){throw'Not implemented';}
  8. dispose(){this._locationPool._delete(this);this._updateDelegate=null;}
  9. isBlackboxed(){throw'Not implemented';}}
  10. export class LiveLocationPool{constructor(){this._locations=new Set();}
  11. _add(location){this._locations.add(location);}
  12. _delete(location){this._locations.delete(location);}
  13. disposeAll(){for(const location of this._locations){location.dispose();}}}
  14. self.Bindings=self.Bindings||{};Bindings=Bindings||{};Bindings.LiveLocation=LiveLocation;Bindings.LiveLocationWithPool=LiveLocationWithPool;Bindings.LiveLocationPool=LiveLocationPool;