Mars

Home to both the Solar System's highest mountain (Olympus Mons), and deepest canyon (Valles Marineris), Mars is the also the planet most likely to support life outside of Earth; seasonal methane plumes observed over several decades have yet to be explained.

After addressing 3D space and lighting, I rather rushed to the end of the previous article in order to gain a rendered image. In this piece I’ll backtrack a little, covering threeJS objects and materials in detail, before re-approaching the rendering process.

Streaks of red light on a road, caught in a long-expose photograph

Being confronted with a series of numbers and having to find the largest or smallest in the set is a common coding task. While it’s entirely possible to use a mathematical operator in JavaScript to find an answer, or even a series of if statements, the Math.max function (and it’s opposite, Math.min) are more effective and efficient.

Viewport

Screen

Judging screen sizes and resolution with JavaScript can be difficult, not least because it can be challenging determining just what you’re measuring… and because, historically, different browsers measured different qualities of the screen using different properties.

Today, those properties are mostly standardized; it’s just a matter of learning the terms associated with each.