Class Circle

collider - circle

Hierarchy (view full)

Implements

Constructors

Properties

angle: number

for compatibility reasons circle has angle

bbox: BBox

bounding box cache, without padding

dirty: boolean = false

was the polygon modified and needs update in the next checkCollision

isCentered: true = true

always centered

isConvex: true = true

flag to show is it a convex body or non convex polygon

isStatic: boolean

static bodies don't move but they collide

isTrigger: boolean

trigger bodies move but are like ghosts

maxX: number

maximum x bound of body

maxY: number

maximum y bound of body

minX: number

minimum x bound of body

minY: number

minimum y bound of body

offset: SATVector

offset

offsetCopy: Vector = ...

offset copy without angle applied

padding: number

bodies are not reinserted during update if their bbox didnt move outside bbox + padding

pos: SATVector
r: number
system?: BaseSystem<Body>

reference to collision system

type: Circle = BodyType.Circle

circle type

unscaledRadius: number

saved initial radius - internal

Accessors

  • get scaleX(): number
  • scaleX = scale in case of Circles

    Returns number

  • get scaleY(): number
  • scaleY = scale in case of Circles

    Returns number

Methods

  • Draws collider on a CanvasRenderingContext2D's current path

    Parameters

    • context: CanvasRenderingContext2D

    Returns void

  • update instantly or mark as dirty

    Parameters

    • update: boolean = false

    Returns void

  • inner function for after position change update aabb in system

    Parameters

    • update: boolean = ...

    Returns void

Generated using TypeDoc