greggman / wgpu-matrix

Fast WebGPU 3d math library
https://wgpu-matrix.org
MIT License
311 stars 16 forks source link

feat: a wider BaseArgType #34

Closed iwoplaza closed 3 weeks ago

iwoplaza commented 4 weeks ago

Hi! First of all, awesome library 👏!

We are currently working on improving interop between TypeGPU and wgpu-matrix, and to do that, we plan to expose an arrayView property on our vectors and matrix primitives that gives access to the underlying data in the form of a flat array of numbers. Since its just a view, we only wanted to expose the necessities, like a length property, and getters/setters for numeric properties. (Relevant issue)

To make this possible, I was wondering if wgpu-matrix could have a wider type restriction, since it seems to operate solely on the length prop and numeric properties.

greggman commented 3 weeks ago

sgtm