Function createWorld

  • Create a new world for bodies to live in

    Parameters

    • Optional gravity: Vector2

      The gravity to apply to bodies in this system

    • restTime: number = 1

      The time it takes for a body to go into "resting" state (default 1=second)

    Returns World

    The newly created world