You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webpack with optimization / minimize enabled breaks masking.
Example Test Code
// Black overlay
const graphics = scene.add.graphics();
graphics.fillStyle(0x000000, 0.8);
graphics.fillRect(0, 0, 800, 600);
// Objects for mask
const data = scene.add.graphics();
data.fillStyle(0x000000);
data.setVisible(false);
// Mask
const mask = data.createGeometryMask();
mask.invertAlpha = true;
// Set mask
graphics.setMask(mask);
// Some kind of loop
loop() {
data.clear();
data.fillRect(100, 100, 200, 200);
}
This code works fine on local production environment, but after running production version via webpack with enabled optimization, whole screen is filled with graphics (0x000000, 0.8) only - mask doesn't work. Disabling optimization fixes the issue:
Version
Description
Webpack with
optimization / minimize
enabled breaks masking.Example Test Code
This code works fine on local production environment, but after running production version via webpack with enabled optimization, whole screen is filled with graphics (0x000000, 0.8) only - mask doesn't work. Disabling optimization fixes the issue:
Optimization / minimize: false

Optimization / minimize: true

The text was updated successfully, but these errors were encountered: