2.9.4
Faster wind animation and wind gusts
This commit is contained in:
@@ -909,14 +909,15 @@ export function ScopeReticle({ value, cat, loading, elev = 0, dt = new Date(), g
|
||||
const fx = fxRef.current;
|
||||
ctx.clearRect(0, 0, w, hgt);
|
||||
// Wind — base speed with random gust pulses ramping up to gust speed.
|
||||
if (fx.wind > 3 && Math.random() < 0.006 + fx.wind * 0.0006) gustPulse = 1;
|
||||
gustPulse = Math.max(0, gustPulse - 0.012);
|
||||
// gustPulse snaps to 1 on trigger then decays quickly so gusts feel punchy.
|
||||
if (fx.wind > 3 && Math.random() < 0.005 + fx.wind * 0.001) gustPulse = 1;
|
||||
gustPulse = Math.max(0, gustPulse - 0.022);
|
||||
const effWind = fx.wind + gustPulse * Math.max(0, fx.gust - fx.wind);
|
||||
const hv = fx.windH * effWind * 0.22; // horizontal px/frame
|
||||
const hv = fx.windH * effWind * 0.5; // horizontal px/frame
|
||||
// Wind particles — faint horizontal streaks drifting across the lens,
|
||||
// stretching and brightening during gusts.
|
||||
const windTarget = fx.wind > 1.5 ? Math.min(4, Math.round(fx.wind * 0.35)) : 0;
|
||||
while (winds.length < windTarget) winds.push({ x: Math.random() * w, y: Math.random() * hgt, r: 1.4 + Math.random() * 1.2, spd: 0.7 + Math.random() * 0.6, ph: Math.random() * 6.28 });
|
||||
const windTarget = fx.wind > 1.5 ? Math.min(6, Math.round(fx.wind * 0.45)) : 0;
|
||||
while (winds.length < windTarget) winds.push({ x: Math.random() * w, y: Math.random() * hgt, r: 1.6 + Math.random() * 1.4, spd: 0.7 + Math.random() * 0.6, ph: Math.random() * 6.28 });
|
||||
if (winds.length > windTarget) winds.length = windTarget;
|
||||
if (winds.length) {
|
||||
ctx.fillStyle = 'rgba(236,243,251,' + (0.22 + gustPulse * 0.22).toFixed(3) + ')';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Deny from all
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"2026-06-07": {
|
||||
"visits": 1,
|
||||
"profiles": {
|
||||
"showall": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user