修改
This commit is contained in:
@ -384,13 +384,15 @@ class Submerge extends Tools {
|
||||
|
||||
|
||||
move() {
|
||||
if (this.TweenAnimate) {
|
||||
TWEEN.remove(this.TweenAnimate)
|
||||
// if (this.TweenAnimate) {
|
||||
// TWEEN.remove(this.TweenAnimate)
|
||||
// }
|
||||
if (!this.TweenAnimate) {
|
||||
let totalTime = ((this.options.maxWaterLevel - this.options.minWaterLevel) / this.options.risingSpeed) * 1000
|
||||
this.TweenAnimate = new TWEEN.Tween({ waterLevel: this.options.minWaterLevel }).to({ waterLevel: this.options.maxWaterLevel }, totalTime).delay(this.delay).easing(TWEEN.Easing.Linear.None).onUpdate(async (r, a) => {
|
||||
this.currentWaterLaver = r.waterLevel
|
||||
}).start()
|
||||
}
|
||||
let totalTime = ((this.options.maxWaterLevel - this.options.minWaterLevel) / this.options.risingSpeed) * 1000
|
||||
this.TweenAnimate = new TWEEN.Tween({ waterLevel: this.options.minWaterLevel }).to({ waterLevel: this.options.maxWaterLevel }, totalTime).delay(this.delay).easing(TWEEN.Easing.Linear.None).onUpdate(async (r, a) => {
|
||||
this.currentWaterLaver = r.waterLevel
|
||||
}).start()
|
||||
// let contentElm = this._DialogObject._element.body
|
||||
// let pauseBtn = contentElm.getElementsByClassName('pause')[0];
|
||||
// let startBtn = contentElm.getElementsByClassName('start')[0];
|
||||
@ -409,9 +411,9 @@ class Submerge extends Tools {
|
||||
this.TweenAnimate = new TWEEN.Tween({ waterLevel: this.options.minWaterLevel }).to({ waterLevel: this.options.maxWaterLevel }, totalTime).delay(this.delay).easing(TWEEN.Easing.Linear.None).onUpdate(async (r, a) => {
|
||||
this.currentWaterLaver = r.waterLevel
|
||||
}).start()
|
||||
if (isPaused) {
|
||||
this.pause()
|
||||
}
|
||||
// if (isPaused) {
|
||||
this.pause()
|
||||
// }
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
Reference in New Issue
Block a user