foundry-vtt-types
foundry-vtt-types copied to clipboard
Refactored `client/pixi/webgl/shaders/**`
trafficstars
Couple concerns:
- Typed a lot of
static override fragmentShaderin subclasses asstring | ((...args: any[]) => string)instead of juststring, which matches theAbstractBaseShadertyping, but I don't know if it's necessary if the subclass is providing a string. Went with what seemed 'more correct', in case there's further subclassing;fragmentShaderis a method that takes args in a few places. OccludableSamplerShaderandDepthSamplerShaderboth provide@typedefs in the foundry code for extensions toPIXI.IBatchableElement, but if I try to change the signatures (_packInterleavedGeometry) that appear (they're just marked@inheritdoc, so there's inference here, but its pretty solid looking at the code) to take them instead of the parent type, TS doesn't like that: https://i.imgur.com/7Z92cDX.pngVisionMaskFiltertries to override theenabledproperty fromPIXI.Filterwith a getter (and a setter that does nothing). This is supposedly cleaned up according to Foundry #11050, so I'm leaving it with a slightly inaccurate typing and hoping it fixes itself in 12.329