Main Page

From Geometry API Community Group
Jump to: navigation, search

For SVG, Canvas, and even CSS or HTML, there would be a benefit to having a native-code geometry API for the Open Web Platform.

There are numerous JavaScript libraries that provide various geometric functions and features, but having the most common and computationally expensive operations available as low-level native-code (e.g., browser) would relieve the burden of finding and including the right script library, decrease file sizes and download times, substantially improve performance of applications, and make it easier to learn and use the platform.

Much of the functionality of this geometry API could even be patched using a polyfill while the spec is being developed (and before in is implemented natively), so it could be deployed in backwards- and forwards-compatible way by developers.

Note: this is a rough first draft, please edit!!


  • points
  • vectors
  • matrixes (3x3, 4x4)
  • intersection points between different shapes
  • "containment" of shapes
  • centroids
  • bounding boxes
  • area
  • transforms

Use Cases

  • Finding intersection is commonly used for drawing and prototyping applications such as Adobe Illustrator to "snap" objects email


Note: see Audio WG UCRs for formatting inspiration.


  • "(Intersections are) a very hard thing to implement correctly for all cases, and a call might be rather expensive. I worry that different implementations will give different answers under surprisingly simple situations." email


Script Libraries