Feature: more laser patterns
This commit is contained in:
parent
862acfd07f
commit
d00cf96ed7
@ -189,7 +189,7 @@ export class StageLasers extends SceneFeature {
|
|||||||
|
|
||||||
// --- Pattern Logic ---
|
// --- Pattern Logic ---
|
||||||
if (time - this.lastPatternChange > 8) { // Change every 8 seconds
|
if (time - this.lastPatternChange > 8) { // Change every 8 seconds
|
||||||
this.pattern = (this.pattern + 1) % 4;
|
this.pattern = (this.pattern + 1) % 8;
|
||||||
this.lastPatternChange = time;
|
this.lastPatternChange = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,6 +285,24 @@ export class StageLasers extends SceneFeature {
|
|||||||
yaw = Math.sin(t * 3 + idx) * 0.6;
|
yaw = Math.sin(t * 3 + idx) * 0.6;
|
||||||
pitch = Math.cos(t * 2.5 + idx * 2) * 0.4;
|
pitch = Math.cos(t * 2.5 + idx * 2) * 0.4;
|
||||||
break;
|
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
|
// Apply rotation
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user