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
constmat=newDOMMatrix()constmovement=newDOMPoint(10,20,30)// This can be used like a "Vector3" or "vec3" in other librariesmat.translateSelf(movement.x,movement.y,movement.z)
To simplify things, especially once we add more methods that can help people do more things with matrices and points (i.e. vectors), it would be nice to be able to simply pass points around where they can be used:
constmat=newDOMMatrix()constmovement=newDOMPoint(10,20,30)// This can be used like a "Vector3" or "vec3" in other librariesmat.translateSelf(movement)// new option: pass a DOMPoint directly.
If the first parameter to translateSelf can accept a DOMPointInit, then it can accept a POJO as well as an actual DOMPoint instance to match with patterns of other methods (for example those that accept DOMMatrixInit), and we would similarly upddate for other methods that accept individual vector values to also accept DOMPointInit values.
The text was updated successfully, but these errors were encountered:
trusktr
changed the title
[geometry-1] propose adding DOMPoint as an argument for DOMMatrix that accepts vectors.
[geometry-1] propose adding DOMPoint as an argument for DOMMatrix that accepts vectors.
Dec 28, 2024
For example we can currently do this:
and this:
To simplify things, especially once we add more methods that can help people do more things with matrices and points (i.e. vectors), it would be nice to be able to simply pass points around where they can be used:
If the first parameter to
translateSelf
can accept aDOMPointInit
, then it can accept a POJO as well as an actualDOMPoint
instance to match with patterns of other methods (for example those that acceptDOMMatrixInit
), and we would similarly upddate for other methods that accept individual vector values to also acceptDOMPointInit
values.The text was updated successfully, but these errors were encountered: