fix hex wave not fully exiting screen before loop restart
This commit is contained in:
parent
e30cae5c7f
commit
84d1ad1f18
1 changed files with 6 additions and 4 deletions
|
|
@ -19,7 +19,9 @@ Item {
|
|||
fragmentShader: Quickshell.shellPath("modules/hex_wave.frag.qsb")
|
||||
|
||||
property real uSize: 50.0
|
||||
property real uWavePhase: -200
|
||||
// Gaussian tail margin: exp(-m²/40000) < 0.01 at m=500
|
||||
readonly property real _waveMargin: 500
|
||||
property real uWavePhase: -_waveMargin
|
||||
property real uBreath: 0
|
||||
property real uGlitch: 0
|
||||
property real uGlitchSeed: 0.0
|
||||
|
|
@ -32,7 +34,7 @@ Item {
|
|||
target: root
|
||||
function onRunningChanged() {
|
||||
if (!root.running) {
|
||||
fx.uWavePhase = -200;
|
||||
fx.uWavePhase = -fx._waveMargin;
|
||||
fx.uBreath = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -43,8 +45,8 @@ Item {
|
|||
loops: Animation.Infinite
|
||||
running: root.running && !root.reducedMotion
|
||||
NumberAnimation {
|
||||
from: -200
|
||||
to: fx.width + 200
|
||||
from: -fx._waveMargin
|
||||
to: fx.width + fx._waveMargin
|
||||
duration: 6000
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue