src/views/screen/components/screen-map-three/experience/utils/time.js
@@ -6,6 +6,7 @@ this.current = this.start; this.elapsed = 0; this.delta = 16; // 合适的时机执行loop循环 window.requestAnimationFrame(() => { this.tick(); }); @@ -17,9 +18,14 @@ this.current = currentTime; this.elapsed = this.current - this.start; this.trigger('tick'); window.requestAnimationFrame(() => { this.loopId = window.requestAnimationFrame(() => { this.tick(); }); } destroy() { window.cancelAnimationFrame(this.loopId); this.off('tick'); } }