Skip to content

thomasrynne/SolarSystemScaleModel

Repository files navigation

#Solar System Scale Model

This is an small experimental project to create a functional UI using scalajs and Mithril.

It wraps pure Scala classes which represent a scale model of the solar system but rather than using a mutable 'solar system model' with listeners to update the DOM when values change the model is immutable and the view representation of the model is re-generated after every change.

Rather than actually replacing the DOM every time a change is made (which is slow, causes flicker and breaks focus) Mithril is used to generate a virtual DOM and only apply the changes to the real browser DOM.

A new scalatags backend is use for the html generation.

This approach does seem particularly suited to Scala and would be especially useful if there are many parts of the page to keep in sync.

About

An experiment to create a functional UI with ScalaJS and Mithril

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published