Skip to content

1681-engine / index / PolygonShape

Interface: PolygonShape ​

Defined in: src/physics/types.ts:31

A convex polygon, its vertices relative to the body's position, which must be the polygon's centroid (make one with polygonShape, which orders the points and moves them there). Up to MAX_POLYGON_VERTICES corners.

Properties ​

kind ​

ts
readonly kind: "polygon";

Defined in: src/physics/types.ts:32


vertices ​

ts
readonly vertices: readonly Vec2[];

Defined in: src/physics/types.ts:33

Released under the MIT License.