[fxtf-drafts] [geometry-1] propose adding DOMPoint as an argument for DOMMatrix that accepts vectors. (#585)

trusktr has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [geometry-1] propose adding DOMPoint as an argument for DOMMatrix that accepts vectors. ==
For example we can currently do this:

```js
const mat = new DOMMatrix()

mat.translateSelf(10, 20, 30)
```

and this:

```js
const mat = new DOMMatrix()
const movement = new DOMPoint(10, 20, 30) // This can be used like a "Vector3" or "vec3" in other libraries

mat.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:

```js
const mat = new DOMMatrix()
const movement = new DOMPoint(10, 20, 30) // This can be used like a "Vector3" or "vec3" in other libraries

mat.translateSelf(movement) // new option: pass a DOMPoint directly.
```

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/585 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 28 December 2024 00:43:22 UTC