• Create a physics engine with the provided gravity and timestep. A physics engine with default gravity and timestep can be created using createPhysics.

    The returned Physics object is designed to be passed into createWorld.

    This is a configuration function and should be called within init_simulation.

    Parameters

    • gravity: number

      The gravity of the world

    • timestep: number

      The timestep of the world

    Returns Physics

    Physics