pixijs icon indicating copy to clipboard operation
pixijs copied to clipboard

Bug: Setting value to a uniform with type vec[2, 3, 4] throws an error

Open ZackMercury opened this issue 7 months ago • 2 comments

Current Behavior

When attempting to set a uniform of type vec, according to the documentation example (https://pixijs.download/release/docs/rendering.Shader.html#constructor) This way: uColor: [1, 0, 0] The following error is being thrown:

[TypeError] Cannot create property 'name' on number '1'

Expected Behavior

Being able to set vec uniforms without errors

Steps to Reproduce

Example

const shader = Shader.from({
    gl: {
      vertex,
      fragment
    },
    resources: {
      uTexture: texture.source,
      uColor: [1, 0, 0, 1]
    }
  });

Environment

Possible Solution

No response

Additional Information

No response

### Tasks
- [ ] Update documentation for PIXI.Shader

ZackMercury avatar Aug 03 '24 10:08 ZackMercury