Web APIs

Geometry Interfaces API

Checking compatibility...

Work with 2D and 3D graphics transformations and coordinates.

DOMPoint

Create and manipulate 2D or 3D points in a coordinate system, with values for coordinates in up to three dimensions and an optional perspective value. DOMPoint is commonly used in graphics operations and spatial calculations.

=
=
=
=
=
=

Output

Click Run to see output...

DOMRect

Represent the size and position of a rectangle with properties for position (x, y) and dimensions (width, height). DOMRect is commonly used for layout calculations, hit-testing, and representing element boundaries in the DOM.

=
=
=
=
=
=

Output

Click Run to see output...

DOMMatrix

Represent transformation matrices for operations that translate/move, scale, rotate, skew/shear/slant, and flip graphics. DOMMatrix also supports multiplying/chaining and inverting/undoing these operations, making it essential for complex graphics transformations.

=
=
=
=
=
=

Output

Click Run to see output...

DOMQuad

Represent a collection of four DOMPoint objects defining the corners of a quadrilateral. DOMQuad is useful for perspective transformations, texture mapping, and representing arbitrary four-sided shapes in 2D or 3D space.

=
=
=
=
=
=

Output

Click Run to see output...