🔧 FIX: Hide Polaroid frame during glitch!
✅ GLITCH TRANSITION FIXED: - Frame fades out FIRST (100ms) - Then photo glitches alone - Chromatic aberration on photo only - Final photo fade out NO MORE WHITE SQUARE DURING GLITCH! 🎆 Next: Adding audio files...
This commit is contained in:
@@ -573,18 +573,33 @@ class IntroScene extends Phaser.Scene {
|
||||
// GLITCH-OUT transition for next shot
|
||||
this.time.delayedCall(duration - 500, () => {
|
||||
if (this.currentPolaroid) {
|
||||
// Glitch effect before fade
|
||||
// First, quickly fade out the frame (so it doesn't show during glitch!)
|
||||
this.tweens.add({
|
||||
targets: [photo, frame],
|
||||
targets: frame,
|
||||
alpha: 0,
|
||||
duration: 100
|
||||
});
|
||||
|
||||
// Then glitch effect on photo only
|
||||
this.tweens.add({
|
||||
targets: photo,
|
||||
x: { from: photo.x - 10, to: photo.x + 10 },
|
||||
duration: 50,
|
||||
repeat: 5,
|
||||
yoyo: true,
|
||||
onComplete: () => {
|
||||
// Chromatic aberration effect
|
||||
// Chromatic aberration effect (RGB flash)
|
||||
photo.setTint(0xff0000);
|
||||
this.time.delayedCall(50, () => photo.setTint(0x00ff00));
|
||||
this.time.delayedCall(100, () => photo.setTint(0x0000ff));
|
||||
this.time.delayedCall(150, () => {
|
||||
// Final fade out
|
||||
this.tweens.add({
|
||||
targets: photo,
|
||||
alpha: 0,
|
||||
duration: 200
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user