Online tool for Kerbal Space Program that helps players determine delta-v requirements for a mission, and what type of comms dishes a certain satellite requires.
Current camera logic determine where planets/moons are place by adjusting their left: 420px and top: 69px CSS values. This is affected by camera position and scale, meaning that every object in universe is update when the camera moves.
A possibly more efficient way of handling this by using multiple layers of position: absolute and position: relative, and setting the position of planets with a left: 42% to position them on the camera backboard layer
When the camera moves, only the singular layer element moves around
When the camera zooms (scales) it affects the size of said element. This should automatically move the elements by ratio of their set percentage values.
By deferring this logic to the CSS engine, simple camera updates could become smoother on Firefox and mobile.
Current camera logic determine where planets/moons are place by adjusting their
left: 420px
andtop: 69px
CSS values. This is affected by camera position and scale, meaning that every object in universe is update when the camera moves.A possibly more efficient way of handling this by using multiple layers of
position: absolute
andposition: relative
, and setting the position of planets with aleft: 42%
to position them on the camera backboard layerBy deferring this logic to the CSS engine, simple camera updates could become smoother on Firefox and mobile.
Some pseudo code of how this fits together: