W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > January 2017

Re: [mediacapture-image] Use DOMPoint instead of Point2D?

From: Miguel Casas-Sanchez via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Jan 2017 17:49:47 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-271939814-1484156985-sysbot+gh@w3.org>
[`DOMPoint`](http://www.w3.org/TR/geometry-1/#DOMPoint) is an 
interface needing all its attributes `x`,`y`,`z`,`w` (I don't see any 
indication of `z` and `w` being not required), whereas `Point2D` is a 
dictionary with just `x` and `y`.

Moreover, [`DOMPoint`](http://www.w3.org/TR/geometry-1/#DOMPoint)  is 
not 'just' a cartesian point but a 3D point with a perspective `w` 
attached to it (although this is by default `1.0`) --The reason for 
this pseudo-quaternion situation is that `DOMPoint` is meant to play 
nicely with transformation `DOMMatrix`es.

Using `DOMPoint` would be confusing for users, since two of the said 
`DOMPoint` attributes are not used in this case but they actually 
relate to the mathematics of perspective cameras.  Perhaps `DOMPoint` 
should be renamed to `DOMPoint3D` and a `DOMPoint2D` added to the 
Geometry interfaces Spec.  

Finally, if any of the Geometry Interfaces would be needed, 
[`DOMRect`](https://www.w3.org/TR/geometry-1/#DOMRect) would be the 
least removed one.

GitHub Notification of comment by miguelao
Please view or discuss this issue at 
 using your GitHub account
Received on Wednesday, 11 January 2017 17:49:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:31 UTC