intel / node-realsense

MIT License
24 stars 21 forks source link

Why define Point2D #199

Open kenchris opened 7 years ago

kenchris commented 7 years ago

So this is a general issue on the web platform right now.

Browsers seem to be adding geometry interfaces like DOMPoint, which is very similar

https://www.w3.org/TR/geometry-1/#DOMPoint

While many developers use glMatrix for these use-cases with WebGL etc.

Personally I think that DOMPoint etc are a bit too tied to the CSS use cases and that they can easily be constructed from existing data, ie using arrays like Web GL.

glMatrix consists of free functions which can work on any array type.

Ie. I could use a Float32Array or size 2 instead of a specific Point2D class which will probably be hard to standardize. Also it should have all methods like distance.