fix(material): 总图焊缝(带头)与线速度跟随实际在产卷进度,不再自走动画
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -654,14 +654,15 @@ export default {
|
||||
},
|
||||
tick() {
|
||||
this.now = Date.now()
|
||||
this.weld.position = (this.weld.position + 0.012) % 1
|
||||
// 新一卷开始时滚动卷号
|
||||
if (this.weld.position < 0.012) {
|
||||
this.prev_coil_no = this.current.coil_no
|
||||
const n = parseInt(this.current.coil_no || '26053552', 10) + 1
|
||||
this.current.coil_no = String(n)
|
||||
// 焊缝(带头)位置与线速度跟随实际在产卷进度(带头 = run_length / 2000)
|
||||
const pp = this.producingPlan
|
||||
if (pp) {
|
||||
this.weld.position = Math.max(0, Math.min(1, this.prodLength / 2000))
|
||||
this.current.speed = pp.run_speed || 0
|
||||
} else {
|
||||
this.weld.position = 0
|
||||
this.current.speed = 0
|
||||
}
|
||||
this.current.speed = Math.max(0, rnd(this.current.speed, 4))
|
||||
|
||||
const wig = (o, key, amp) => { o[key] = rnd(o[key], amp) }
|
||||
wig(this.uncoiler, 'tension', 0.4); wig(this.uncoiler, 'speed', 2)
|
||||
|
||||
Reference in New Issue
Block a user