• Creates a custom world with the provided physics, renderer, timer and console .

    A world is responsible for managing the physics, rendering, timing and console of the simulation. It also manages the controllers that are added to the world, ensuring that the appropriate functions are called at the correct time.

    The returned World object is designed to be returned by the init_simulation callback.

    You can add controllers to the world using addControllerToWorld.

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

    Parameters

    Returns World

    World

    Example

    An empty simulation

    init_simulation(() => {
    const physics = createPhysics();
    const renderer = createRenderer();
    const timer = createTimer();
    const robot_console = createRobotConsole();
    const world = createWorld(physics, renderer, timer, robot_console);

    return world;
    });