Bodylight.js 2.0 - Web components for FMU simulation, visualisation and animation in standard web browser


  • Tomas Kulhanek
  • Arnost Mladek
  • Jiri Kofranek
  • Filip Jezek



Modelica, JavaScript, WebAssembly, in-browser simulator, web components


Simulators used in teaching and education comprises a mathematical model of the system under study and user interface that allows to control model inputs and visualize model state and results in an intuitive way. This paper presents web components - that can be used to build in-browser web simulator. The models used for the web simulators must be written in standard Modelica language and compiled as standard FMU (Functional mockup unit). The toolchain version Bodylight.js 2.0 contains tools to compile FMU into WebAssembly language able to be executed directly by web browser. Bodylight.js 2.0 web components can be then used to combine model, interactive animation and charts into rich web document in HTML or Markdown syntax only without any other programming or scripting.