Christopher Shank
03/06/2025, 1:45 AMKartik Agaram
John Christensen (JohnnyC1423)
03/06/2025, 2:15 AMTom Larkworthy
03/06/2025, 7:19 AMTom Larkworthy
03/06/2025, 7:24 AMTom Larkworthy
03/06/2025, 7:34 AMChristopher Shank
03/06/2025, 7:38 AMChristopher Shank
03/06/2025, 7:40 AMTom Larkworthy
03/06/2025, 7:42 AMChristopher Shank
03/06/2025, 7:44 AMChristopher Shank
03/06/2025, 7:44 AMTom Larkworthy
03/06/2025, 7:47 AMTom Larkworthy
03/06/2025, 7:51 AM[
[1, 0, dx]
[0, 1, dy]
[0, 0, 1]
]
its good to do the steps manually and you will see how the extra 1 hits the last column and manipulates the real coordinates directly.
The resultant of multiplying [x, y, 1] with the above transform is
[x + dx, y + dy, 1] i.e. its original coordinate + dy, dy.Tom Larkworthy
03/06/2025, 7:58 AMChristopher Shank
03/06/2025, 8:03 AMconst projectedPoint = matrix.inverse().transformPoint({x: pointerEvent.pageX, y: pointerEvent.pageY })
Christopher Shank
03/06/2025, 8:04 AMmatrix
is a DOMMatrix
of the transformed plane. From what i can tell this only works when the planes are parallel to each otherTom Larkworthy
03/06/2025, 8:09 AMDOMMatrix
constructor creates a new DOMMatrix
object which represents 4x4 matrices, suitable for 2D and 3D operations.
so if you are working with 3d spatial transforms, you need a 4x4 matrix which is instanciated with 16 elementsChristopher Shank
03/06/2025, 8:09 AMTom Larkworthy
03/06/2025, 8:11 AMDuncan Cragg
03/06/2025, 8:52 AMOrion Reed
03/06/2025, 3:07 PMOrion Reed
03/06/2025, 7:49 PMOrion Reed
03/06/2025, 8:02 PMTom Larkworthy
03/06/2025, 10:04 PMTom Larkworthy
03/06/2025, 10:09 PMTom Larkworthy
03/06/2025, 10:13 PMTom Larkworthy
03/06/2025, 10:20 PMTom Larkworthy
03/06/2025, 11:47 PMOrion Reed
03/07/2025, 3:03 PMTom Larkworthy
03/07/2025, 3:31 PMOrion Reed
03/07/2025, 3:50 PMMarek Rogalski
03/07/2025, 6:14 PMTom Larkworthy
03/07/2025, 6:27 PMTom Larkworthy
03/11/2025, 8:56 AMOrion Reed
03/11/2025, 11:55 AM