Added drop shadow to pieces that are unmatched

This commit is contained in:
Brian Fertig 2026-04-06 19:22:59 -06:00
parent eeebed10c0
commit ada2535b62
1 changed files with 10 additions and 0 deletions

View File

@ -1172,6 +1172,16 @@ class PuzzleScene extends Phaser.Scene {
if (po.image.texture.key !== expectedKey && this.textures.exists(expectedKey)) {
po.image.setTexture(expectedKey);
}
// Contour-following drop shadow via preFX (Phaser 3.60+)
if (po.image.preFX) {
if (!isMerged && !po._shadowFX) {
po._shadowFX = po.image.preFX.addShadow(2, 2, 0.06, 1, 0x000000, 6);
} else if (isMerged && po._shadowFX) {
po.image.preFX.remove(po._shadowFX);
po._shadowFX = null;
}
}
});
});
}