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
I suggest to add the detection filter temporarily in Token#render instead of adding the detection filter to the mesh's filters in the detectionFilter setter. This ensures that the detection filter is applied last. There isn't a chance that a module that adds filters to the token's mesh changes this order or even removes the detection filter accidently.
/** * The filter to use for detection. * @type {PIXI.Filter|null} filter */detectionFilter=null;// no need for a setter/** @override */render(renderer){if(this.#detectionFilter){this.mesh.filters??=[];this.mesh.filters.push(this.#detectionFilter);/* render... */this.mesh.filters.pop();}super.render(renderer);}
What ways of accessing Foundry can you encounter this issue in?
Native App (Electron)
Chrome
Firefox
Safari
Other
Reproduction Steps
.
What core version are you reporting this for?
Version 11 Prototype 2 (build 293)
Relevant log output
No response
Bug Checklist
The issue occurs while all Modules are disabled
The text was updated successfully, but these errors were encountered:
Feu-Secret
changed the title
Token#detectionFilter doesn't have a getter
Simplify the activation of the detection filter on the token mesh.
Mar 10, 2023
What happened?
I suggest to add the detection filter temporarily in
Token#render
instead of adding the detection filter to the mesh's filters in thedetectionFilter
setter. This ensures that the detection filter is applied last. There isn't a chance that a module that adds filters to the token's mesh changes this order or even removes the detection filter accidently.What ways of accessing Foundry can you encounter this issue in?
Reproduction Steps
.
What core version are you reporting this for?
Version 11 Prototype 2 (build 293)
Relevant log output
No response
Bug Checklist
The text was updated successfully, but these errors were encountered: