Type alias BaseShape

BaseShape: {
    bodyId?: number;
    boundingBox: Vector2;
    bounds: number;
    center: Vector2;
    id: number;
    inertia: number;
    sensor: boolean;
    sensorColliding: boolean;
    type: ShapeType;
}

Type declaration

  • Optional bodyId?: number

    The ID of the body this shape is part of

  • boundingBox: Vector2

    The boding box around the body - used for efficient bounds tests

  • bounds: number

    The radius of a bounding circle around the body

  • center: Vector2

    The center of the body

  • id: number

    The id given to this shape

  • inertia: number

    The inertia applied when this shape is colliding

  • sensor: boolean

    True if this a sensor not a real body shape

  • sensorColliding: boolean

    True if this sensor is currently triggered

  • type: ShapeType

    The shape type of the body