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")
|
fragmentShader: Quickshell.shellPath("modules/hex_wave.frag.qsb")
|
||||||
|
|
||||||
property real uSize: 50.0
|
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 uBreath: 0
|
||||||
property real uGlitch: 0
|
property real uGlitch: 0
|
||||||
property real uGlitchSeed: 0.0
|
property real uGlitchSeed: 0.0
|
||||||
|
|
@ -32,7 +34,7 @@ Item {
|
||||||
target: root
|
target: root
|
||||||
function onRunningChanged() {
|
function onRunningChanged() {
|
||||||
if (!root.running) {
|
if (!root.running) {
|
||||||
fx.uWavePhase = -200;
|
fx.uWavePhase = -fx._waveMargin;
|
||||||
fx.uBreath = 0;
|
fx.uBreath = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -43,8 +45,8 @@ Item {
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: root.running && !root.reducedMotion
|
running: root.running && !root.reducedMotion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
from: -200
|
from: -fx._waveMargin
|
||||||
to: fx.width + 200
|
to: fx.width + fx._waveMargin
|
||||||
duration: 6000
|
duration: 6000
|
||||||
easing.type: Easing.InOutSine
|
easing.type: Easing.InOutSine
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue