Commit 75fabd7b authored by Flemming Stäbler's avatar Flemming Stäbler
Browse files

Fix Positionservice Initialization

parent be24d8c0
......@@ -123,13 +123,16 @@ export class PositionService extends EventTarget{
}
}
constructor(){
timebaseservice: FlexibleTimeBaseService = null;
constructor(tbs: FlexibleTimeBaseService){
super();
this.timebaseservice = tbs;
}
//Ported
public filterUpdate() {
let animT = ((Services.FlexibleTimeBaseService.now() / 1000) - this.animStart) * ANIM_SPEED;
let animT = ((this.timebaseservice.now() / 1000) - this.animStart) * ANIM_SPEED;
this.world_rotation_filtered = (new Quaternion(
this.evalAnimPolynomial(this.world_rotation_pw, animT),
......@@ -461,7 +464,7 @@ export class PositionService extends EventTarget{
//Ported
updateCameraPolynomials(){
let n = Services.FlexibleTimeBaseService.now();
let n = this.timebaseservice.now();
let animT = ((n / 1000) - this.animStart) * ANIM_SPEED;
this.animStart = n / 1000;
......
......@@ -79,7 +79,7 @@ class ServicesClass{
this.SettingsService = new SettingsService();
this.ProgressReportingDownloadService = new ProgressReportingDownloadService();
this.ParameterBroadcastService = new ParameterBroadcastService();
this.PositionService = new PositionService();
this.PositionService = new PositionService(this.FlexibleTimeBaseService);
this.LayerMetadataService = new LayerMetaDataService();
this.InitializationService = new InitializationService(this.PositionService);
this.InteractionService = new InteractionService();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment