TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

Allow use of readonly number arrays with WebGL methods.

Open jameswilddev opened this issue 3 years ago • 3 comments

This PR changes the Float32List type to accept readonly arrays as well as mutable arrays.

The Float32List type is used as an argument to the following methods (all of which only read from the value, they do not mutate its contents):

  • clearBufferfv
  • uniformMatrix2x3fv
  • uniformMatrix2x4fv
  • uniformMatrix3x2fv
  • uniformMatrix3x4fv
  • uniformMatrix4x2fv
  • uniformMatrix4x3fv
  • uniform1fv
  • uniform2fv
  • uniform3fv
  • uniform4fv
  • uniformMatrix2fv
  • uniformMatrix3fv
  • uniformMatrix4fv
  • vertexAttrib1fv
  • vertexAttrib2fv
  • vertexAttrib3fv
  • vertexAttrib4fv
  • uniform1fv
  • uniform2fv
  • uniform3fv
  • uniform4fv
  • uniformMatrix2fv
  • uniformMatrix3fv
  • uniformMatrix4fv

jameswilddev avatar Feb 15 '22 20:02 jameswilddev

CLA assistant check
All CLA requirements met.

ghost avatar Feb 15 '22 20:02 ghost

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

github-actions[bot] avatar Feb 15 '22 20:02 github-actions[bot]

This also sounds fair but I wonder how libraries are currently using them. Perhaps this one is right enough to cause some breaking change? (This allows more things when used in arguments, but when accessing such argument in a third party library, it then gets additional constraints)

Pinging @orta.

saschanaz avatar Feb 25 '22 13:02 saschanaz