Skip to content

Engine configuration

xam4lor edited this page Jun 10, 2020 · 12 revisions

This page describes how setEngineConfig and addObjects should be used, and what are all of their parameters. To understand were to use them, please read the corresponding wiki page.


The setEngineConfig function

Inside the runSimulator(simulator) function (more infos in the pSEngine basics wiki page, you can use the simulator.setEngineConfig function to change the engine configuration based on what your simulation requires.

To explain how to do that, lets admit that there is a parameter called plotter.scale.x and that to set his value to 4. To do that, you will need to use the following function:

function runSimulator(simulator) {
   simulator.setEngineConfig((engineConf) => {
      engineConf.plotter.scale.x = 4;
   });
}

Here below, you can find every possible configuration parameter of the engine, sorted in function of their use.


The runner configuration


Previous (Using animations) - Back to wiki home

Clone this wiki locally