Bodylight.jsBodylight.js Docs GitHub

Bodylight.js 2.0

Simulators for the modern web

Demo: DEMO
Prototypes: Scenarios Physiome Apps1.0 PV loops1.0 VirtualBodyWebGL Virtual Reality - breathingWebXR
Selected topics of human physiology with simulators: Hemodynamics
(CZ only)
Iron Metabolism
(CZ only)
Blood Gases
Physiolibrary v3.0(CZ only)

Blood Gases
new - pure Modelica
Pharmacokinetic and pharmacodynamic
model demoBodylight v1.0
Docs: Documentation - Reference Guide Tutorial Tools: Editor Composer1.0

Powered by Modelica

Write models using Modelica language.

Executed in WebAssembly

Compile models to WebAssembly bringing near native speed of model simulation in browsers.

Designed in Adobe® Animate

Create complex animations in Adobe® Animate and export them to Create.js

Distributed as Web Components

Enrich HTML or Markdown with custom elements of Bodylight.js.

Ready for WebGL

WebGL API brings powerful 2D and 3D visualisation without plugins into web browser. See demos below bringing simulators into 3D scene. Supported by majority of web browsers.

Ready for WebXR

WebXR API brings virtual reality and augmented reality into web browsers. See demos below bringing simulators in VR/AR. Supported by web browsers in appropriate HW platforms (tested in MS Hololens 2, Oculus Quest 2).

Bodylight-Virtual Machine

Reference installation of bodylight-tools powered by Virtualbox and VagrantUp.


Scripts facilitating compilation of FMU file (with source codes in C of compiled Modelica model and solver) to Javascript with embedded WebAssembly. Such compiled javascript allows to access model simulation via FMI API v 2.0 as specified in FMI standard. Use this compiler in virtual machine or in docker container.


Static web application - create a web simulator using Bodylight.js2.0 components. Web simulator can be written in HTML or Markdown. This Bodylight editor may help to bind model variables and animation objects. Editor uses generic ACE editor with markdown-it renderer with live-preview of web simulators.


Static web application - create a web simulator using Bodylight.js1.0 in Composer, It allows you to visually create an HTML/JS/CSS simulator embeded in single HTML file. We are using the wonderful project GrapesJS to provide the layouting engine, Adobe® Animate to create interactive animations and Modelica to make it all run on models you write yourself.


Step by step tutorial to create simple and advanced web simulator from Modelica model source code to functional interactive web simulator using Bodylight toolchain 2.0(Bodylight.js FMU Compiler, Editor, Bodylight.js-Components). Following the tutorial, you will get set of files in HTML,JS and MARKDOWN format ready to be deployed as a static web page.


Selected scenarios of physiology and pathophysiology: Hemodynamics of cardiovascular system, metabolism of iron, gas transport, ... powered by Physiolibrary and Bodylight.js2.0 technology in single or multipage web-simulators. See at Bodylight-Scenarios.


Demo of interactive 3D visualisation of human body using WebGL standard with 2D panels with selected interactive web simulators. Can be viewed in web browsers (Chrome 88.x, Firefox 86.x, Ms edge 88.x, Safari 14.x) on desktop, tablet or mobile device. Additionally, Text2Speech api is demonstrated for reporting the status of virtual patient. See demo version at Bodylight-VirtualBody.

Physiome Apps1.0

Set of web simulator developed in Bodylight.js1.0 technology include simple non-pulsatile circulation simulator, Nephron kidney simulator and simulator of Iron Metabolism.
Previous version of Bodylight.js framework.
Papers and presentation