Rotating Ball Background
BackgroundRotatingBall
Backgrounds & Effects JavaScript
Point-cloud sphere spinning behind the site, built from a Fibonacci sphere.
Published · by Christopher Alberto
Live demo
Open full screenAt a glance
- Component
BackgroundRotatingBall- 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
Points are spread evenly over a sphere (Fibonacci-sphere method), projected through a simple perspective camera and spun around a tilted axis, in the season’s accent colour.
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/BackgroundRotatingBall/
-
_style.scssStyles (SCSS) 15 lines -
functions.phpFields & data (PHP) 11 lines -
index.twigMarkup (Twig) 9 lines -
script.jsBehaviour (JavaScript) 153 lines