Feature: more laser patterns

This commit is contained in:
Dejvino 2026-01-06 21:41:22 +00:00
parent 862acfd07f
commit d00cf96ed7

View File

@ -189,7 +189,7 @@ export class StageLasers extends SceneFeature {
// --- Pattern Logic ---
if (time - this.lastPatternChange > 8) { // Change every 8 seconds
this.pattern = (this.pattern + 1) % 4;
this.pattern = (this.pattern + 1) % 8;
this.lastPatternChange = time;
}
@ -285,6 +285,24 @@ export class StageLasers extends SceneFeature {
yaw = Math.sin(t * 3 + idx) * 0.6;
pitch = Math.cos(t * 2.5 + idx * 2) * 0.4;
break;
case 4: // Vertical Wave
yaw = 0;
pitch = Math.sin(t * 2 + idx * 0.3) * 0.5;
break;
case 5: // Cross
yaw = Math.sin(t) * 0.5 * (idx % 2 === 0 ? 1 : -1);
pitch = Math.cos(t) * 0.2;
break;
case 6: // Expanding Circle
const r6 = (Math.sin(t) + 1.2) * 0.3;
const a6 = (Math.PI * 2 / l.totalInBank) * idx + t;
yaw = Math.cos(a6) * r6;
pitch = Math.sin(a6) * r6;
break;
case 7: // Fan Sweep
yaw = Math.sin(t) * 0.8 + ((idx / l.totalInBank) - 0.5) * 0.5;
pitch = 0;
break;
}
// Apply rotation