Skip to content

Commit

Permalink
🐛 fix|Deprecations|Stop using canvas.effects.visibility
Browse files Browse the repository at this point in the history
As of v12, now `canvas.visibility`.
  • Loading branch information
caewok committed Jul 23, 2024
1 parent ea2090f commit c79d516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pathfinding/pathfinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export function fogIsExploredFn() {
const tex = canvas.fog.exploration?.getTexture();
if ( !tex || !tex.valid ) return undefined;

const { width, height } = canvas.effects.visibility.textureConfiguration;
const { width, height } = canvas.visibility.textureConfiguration;
const cache = CONFIG.GeometryLib.PixelCache.fromTexture(tex, { width, height });
return (x, y) => cache.pixelAtCanvas(x, y) > 128;
}

0 comments on commit c79d516

Please sign in to comment.