The physics engine of the world. See createPhysics
The renderer engine of the world. See createRenderer
The timer of the world. See createTimer
The console of the world. See createRobotConsole
World
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;
});
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.