Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Particle

Index

Constructors

constructor

  • new Particle(x: number, y: number): Particle
  • Parameters

    • x: number
    • y: number

    Returns Particle

Properties

mass

mass: number = 1

position

position: Vector

previousPosition

previousPosition: Vector

radius

radius: number = 1

Methods

addForce

  • Parameters

    Returns void

addVelocity

  • addVelocity(v: Vector): void
  • Parameters

    Returns void

bounce

  • bounce(rect: Rect): void
  • Parameters

    Returns void

bounds

clearForce

  • clearForce(): void
  • Returns void

clearVelocity

  • clearVelocity(): void
  • Returns void

fix

  • fix(): void
  • Returns void

unfix

  • unfix(): void
  • Returns void

update

  • update(friction?: number): void
  • Parameters

    • friction: number = 1

    Returns void

velocity