You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These problems could be alleviated if toFloat32Array or toFloat64Array methods would accept a target array to write to, making it easy to clone matrices without allocating new arrays:
constarray=newFloat32Array(16)matrix.toFloat32Array(array)// provide an array to write to (instead of it creating a new one)constnewMatrix=newDOMMatrix(array)
(to this end, it should also just have toArray to return (or write to) a regular array)
The text was updated successfully, but these errors were encountered:
trusktr
changed the title
[geometry-1] What's the point of DOMMatrixInit if the constructor cannot accept such a value?
[geometry-1] DOMMatrixInit is not too useful if a DOMMatrixconstructor cannot accept such a value
Dec 27, 2024
You'd think this should be possible:
Instead, one has to do this:
which is more cumbersome and also more wasteful (an extra array is created just to create a new DOMMatrix), or this:
which is also not as simple as it could be.
These problems could be alleviated if
toFloat32Array
ortoFloat64Array
methods would accept a target array to write to, making it easy to clone matrices without allocating new arrays:(to this end, it should also just have
toArray
to return (or write to) a regular array)The text was updated successfully, but these errors were encountered: