Shader Mesh Background
BackgroundShaderMesh
Backgrounds & Effects JavaScript
Slow-moving WebGL gradient mesh behind the site, coloured from the season palette.
Published · by Christopher Alberto
Live demo
Open full screenAt a glance
- Component
BackgroundShaderMesh- Category
- Backgrounds & Effects
- Used as
- Animated site background (Global Options)
- Built with
- PHP, Twig, SCSS, JavaScript
- Platform
- WordPress · Flynt theme · Timber/Twig · ACF Pro
About this component
A WebGL “mesh drift” shader that renders a soft, slowly shifting gradient behind every page. The shader is unchanged from its source; only the bootstrapping and the palette (read from the season colours) were adapted.
How to enable
Not a page block: choose it under Global Options → Site Background → Effect. Only one background runs at a time, site-wide, and it honours prefers-reduced-motion.
Under the hood
Components/BackgroundShaderMesh/
-
_style.scssStyles (SCSS) 15 lines -
functions.phpFields & data (PHP) 3 lines -
index.twigMarkup (Twig) 3 lines -
script.jsBehaviour (JavaScript) 663 lines