In the first article of this series I introduced the very basics of threeJS, including setting up a camera and integrating a WebGL scene with web page content. In this entry we’ll position that camera in 3D space, point it at an object, and light it. Before doing any of that, we have to understand the nature of that 3D space:
“Last” CSS pseudo-selectors are another useful way of detaching presentation from markup: rather than littering our HTML with classes to try to define what happens to the last instance of elements inside them, which would force us to move and reapply those classes when the content changes, we use a selector that will only ever be applied to the last element without changing our markup at all.
By definition, stylesheet development involves setting CSS properties to new values. Complex stylesheets will eventually grow to the point at which CSS values need to be “wiped clean”, i.e. reset to their initial values. In some cases, those initial values are well-known and easy to remember; for other properties, they are not. Thankfully, modern CSS gives us an easy way to reset properties.