Closed plurry closed 7 months ago
This bug isn't there with Pixi 7 and Filters 5: https://jsfiddle.net/buo96kmv/
I haven't built it and made sure that this is the problem, but It looks like it's a degrees-to-radians conversion bug. rotation
is multiplied by DEG_TO_RAD
once when it's initialized: https://github.com/pixijs/filters/blob/ca0c344fb8ea32c1b7f855dc2a64a78b698130dd/src/bevel/BevelFilter.ts#L82
and then again when Object.assign
calls the setter: https://github.com/pixijs/filters/blob/ca0c344fb8ea32c1b7f855dc2a64a78b698130dd/src/bevel/BevelFilter.ts#L125 https://github.com/pixijs/filters/blob/ca0c344fb8ea32c1b7f855dc2a64a78b698130dd/src/bevel/BevelFilter.ts#L133-L137
Good catch.
The constructor ignores the rotation value, but setting it after initialization works: https://jsfiddle.net/3anhs0pw/
Also, to be consistent, I think
rotation
values should be in radians like in Pixi, whileangle
values would be in degrees.