Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/exzenter/pink-floyd-block/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Pink Floyd Prism Block
Calculate the dark side of your DOM. A WordPress block that simulates light refraction through a prism using the HTML5 Canvas API, featuring interactive physics and "Pink Floyd" style aesthetics.
Features
- Interactive Prism Physics: Real-time simulation of light refraction (Snell's Law) and dispersion.
- Interactive Controls:
- Control beam entry position and angle.
- Adjust indices of refraction and dispersion.
- Toggle between "Boxed" and "Fullwidth" modes.
- DOM Rainbow Extension: Rainbow rays can "escape" the canvas and extend across the entire webpage (DOM elements), scrolling with the content.
- Stylized Aesthetics: Custom "grain" rendering, glow effects, and faithful album art color palettes.
Installation
- Clone this repository into your WordPress plugins directory.
- Run
npm installto install dependencies. - Run
npm startto compile the block for development.
Development
src/: Source files for the block (React/JSX and logic).prism-canvas.js: Core physics engine and rendering logic.edit.js: Editor interface and controls.view.js: Frontend initialization.
build/: Compiled assets (generated by@wordpress/scripts).
Usage
Insert the "Pink Floyd Prism" block in the Gutenberg editor. Use the inspector controls to adjust the physics simulation parameters.
License
GPLv2 or later.