Different Syntax Can Create Animated Effects Using HTML and PUG

Different Syntax Can Create Animated Effects Using HTML and PUG

Modern web browsers are capable of directly rendering animated images that resemble three-dimensional models that would previously have been created and saved within formal animation software. These images are dictated through HTML, CSS, and JavaScript code instead of contained within potentially large media files. Many contemporary websites use natively rendered SVG content because their rankings in SERPs are likely to suffer if it takes a long time for users to load them on account of such files.

However, it is quite difficult to directly write SVG-based code that can successfully animate a sophisticated visual element as intended if one is not essentially having functioning code generated on their behalf by specialized engines. An engine named "Pug" lets the user dictate the HTML portion of a web page's functionality in terms of selecting and applying easy-to-read templates that stand in for their own previously completed bundles of syntax. Meanwhile, a page's CSS portion can support additional and specialized syntax if it is accompanied by a "pre-processor" supporting SCSS.

The linked project posted on codepen.io demonstrates an elaborate three-dimensional polygon model resembling a paper bird that is being animated and rotated purely through CSS and HTML syntax. The syntax shown in the site's Editor View mode can be freely changed by users so that the effects of the changes will be reflected in real time. While many codepen projects simply populate their HTML and CSS segments with traditional syntax, this project specifies that these segments are using the Pug engine and an SCSS-compatible pre-processor.

The HTML section in particular shows that the contents of the hypothetical HTML file responsible for the effect bears little resemblance to traditional HTML code that would be enclosed in tags. This is syntax for Pug that is effectively standing in for such code; what these concisely organized lines of code represent can be displayed instead by clicking the nearby drop-down menu and selecting "View Compiled HTML." It becomes apparent that these lines of PUG code convert into fully functioning "div" tags with equivalent names so that the author does not have to manually write each one. For more information click here https://codepen.io/YusukeNakaya/pen/BwBgvq.

Syntax HTML PUG