完善地图交互、动画与罗盘调试
This commit is contained in:
@@ -135,12 +135,16 @@ export class WebGLMapRenderer implements MapRenderer {
|
||||
this.scheduleRender()
|
||||
}
|
||||
|
||||
this.animationTimer = setTimeout(tick, ANIMATION_FRAME_MS) as unknown as number
|
||||
this.animationTimer = setTimeout(tick, this.getAnimationFrameMs()) as unknown as number
|
||||
}
|
||||
|
||||
tick()
|
||||
}
|
||||
|
||||
getAnimationFrameMs(): number {
|
||||
return this.scene && this.scene.animationLevel === 'lite' ? 48 : ANIMATION_FRAME_MS
|
||||
}
|
||||
|
||||
scheduleRender(): void {
|
||||
if (this.renderTimer || !this.scene || this.destroyed) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user