Animations Within the Web Browser? Look No Further than CSS

Modern web design sensibilities call for most of a website's animated elements to be handled within the client's web browser instead of supplied as self-contained files that the client has to spend time loading. Animated aesthetic elements that give the impression of having been exported out of dedicated animation software can be emulated by the right arrangements of syntax within the website's HTML source code and connected CSS and JavaScript files. To the surprise of former web designers who may have dropped out of web design years years ago, CSS files are capable of producing enough animation-related syntax that there is not even any need for a JavaScript file for a website to create an interactive simulation of a rendered, three-dimensional polygon.

A project uploaded to codepen.io by one Yusuke Nakaya uses nothing more than a rather large CSS file and a small amount of HTML code to instruct the viewer's browser to render a scene centered on a set of three-dimensional geometric shapes arranged as a spacecraft. The craft is a direct recreation of a design featured in the Nintendo video game Star Fox, and the CSS code transforms each shape in such a way that the craft gives the impression of bobbing and flying through space at irregular speeds. An endless stream of transforming and disappearing rectangles is routinely generated out of the craft's "exhaust port" to simulate a propulsion system, and holding the mouse button spins the craft around in a motion popularly called a "barrel roll."

In another impressive function, moving the mouse cursor across the window dynamically adjusts the spacecraft's position so that its model is viewable from a different perspective. As the codepen project's "editor view" mode reveals, this piece of interactivity does not even use JavaScript to execute itself, which would often be the case for websites that dynamically execute functions based on the cursor's position. The structure of the CSS syntax achieves this effect in part because it divides the window into an invisible grid with four hundred cells, each of which uniquely adjusts the spacecraft's position when rolled over. For more information click here https://codepen.io/YusukeNakaya/pen/LvePgj.