@casual-simulation/aux-vm-client
Version:
A set of utilities required to securely run an AUX as a client.
34 lines • 982 B
JavaScript
import { BaseSimulation, LoginManager } from '@casual-simulation/aux-vm';
import { PortalManager } from '@casual-simulation/aux-vm/managers';
/**
* Defines a class that provides an implementation of RemoteSimulation.
*/
export class RemoteSimulationImpl extends BaseSimulation {
get login() {
return this._login;
}
get portals() {
return this._portals;
}
constructor(id, origin, vm) {
super(vm);
this._origin = origin;
this._login = new LoginManager(this._vm);
}
get origin() {
return this._origin;
}
get recordName() {
return this.origin.recordName;
}
get inst() {
var _a;
return (_a = this.origin.inst) !== null && _a !== void 0 ? _a : this.id;
}
_beforeVmInit() {
super._beforeVmInit();
this._portals = new PortalManager(this._vm);
this._subscriptions.push(this._portals);
}
}
//# sourceMappingURL=RemoteSimulationImpl.js.map