Skip to main content

Shader Mesh Background

BackgroundShaderMesh Backgrounds & Effects JavaScript

Slow-moving WebGL gradient mesh behind the site, coloured from the season palette.

Published · by Christopher Alberto

Open full screen

At 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.

Options

This component isn't added as a page block, so it has no per-page fields — see "About this component" for where it is configured.

Under the hood

Components/BackgroundShaderMesh/

  • _style.scss Styles (SCSS) 15 lines
  • functions.php Fields & data (PHP) 3 lines
  • index.twig Markup (Twig) 3 lines
  • script.js Behaviour (JavaScript) 663 lines