Why Physics?
Physics allow nodes to respond to forces as if they were objects in the real world. This is useful for creating realistic animations and interactions.
Physics are an advanced feature and not necessary for most assessments. If you are just starting out, you can skip this section!
The m2c2kit physics functionality uses the Matter.js physics engine. Matter.js is a powerful physics engine, and m2c2kit uses only a subset of its features.
In the below example, press the "Go" button to show how the labels are affected by gravity and interactions with each other. Press "Reset" to put the labels back in their original positions.
If you run the example multiple times, you will get slightly different results in the labels' movements . This is because the Matter.js engine is non-deterministic.
Physics in m2c2kit is experimental, and the API may change in the future.