ShapeType

View source

Selects the geometric representation stored by a Collider2D.

Use ShapeType.POLYGON for vertex-based polygon shapes and ShapeType.Circle for the center-and-radius circle representation.

Examples

import { Collider2D, ShapeType } from '@wimaengine/narrowphase'

const collider = Collider2D.circle(1)
const isCircle = collider.type === ShapeType.Circle

Variants