tehdoctor
Hello Brandon and welcome to our forum 🙂
If you just want to multiply a colors, you can use the skeleton.color
. Just access the skeleton and use the set
method of color
: skeleton.color.set(1, 0, 0, 1)
to color the skeleton in red.
If this is not enough, currently there is no clean method to customize the shader since all accessors to the instantiated shader are private.
The only thing you can do is to monkey patch the shader used by the widget.
Before the widget is initialized you can do something like this:
const myShader = (context: ManagedWebGLRenderingContext | WebGLRenderingContext): Shader => new Shader(context, vs, fs);
Shader.newTwoColoredTextured = myShader;
However, you cannot pass additional attributes/uniforms since there's no way to provide them later.