Install
Upload it under Plugins β Add New Plugin β Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/psydreamer-3d/blender-node-diagram/releases/download/v1.0.0/blender-node-diagram.zipBlender Node Diagram β WordPress Block Plugin
Two Gutenberg blocks for rendering Blender shader node diagrams as interactive, scrollable SVGs. Ships with three Blinn-Phong presets, a full-screen visual diagram builder for custom node networks, and a static N/L/V/H concept illustration block.
Blocks
1. Blender Node Diagram (blender-node-diagram/diagram)
A data-driven SVG renderer. Three preset variations appear directly in the block inserter under the Media category:
| Variation | Preset key | Diagram width |
|---|---|---|
| Blinn-Phong Node Chain | blinn |
~1 710 px |
| Sharpness Sub-Network | sharp |
~930 px |
| Full NPR Glossy Group | group |
~2 260 px |
All diagrams scroll horizontally inside a dot-grid container that matches
Blender's node editor aesthetic. The frontend renderer (view.js) is only
enqueued on pages that contain the block β no overhead on unrelated pages.
Switching the type to Custom (JSON) adds two options in the inspector:
- Open Diagram Builder β full-screen visual node editor (see below)
- Raw JSON textarea β paste/edit the
{ nodes, connections }object directly
2. Blinn-Phong Vector Diagram (blender-node-diagram/concept)
A static illustration of the N, L, V, H vector geometry at a shading point. The SVG is embedded directly in the post HTML at save time β no frontend script needed. The only editable attribute is the caption text.
Diagram Builder
The visual editor opens full-screen as a WordPress Modal.
ββ Left panel (380 px) βββββββββββββ¬β Right panel (flex) ββββββββββββββββ
β NODES (3) [Auto-layout] β β
β ββββββββββββββββββββββββββββββ β Live dot-grid SVG preview β
β β geo (geometry) [Edit][β] β β Re-renders in real-time as β
β β βΎ accordion edit form β β you edit each node β
β β ID / Type / Label / X,Y β β β
β β Inputs [+ Add] β β β
β β Outputs [+ Add] β β β
β ββββββββββββββββββββββββββββββ β β
β β β
β CONNECTIONS (2) β β
β geo[0] β dot[0] [β] β β
β ββ Add Connection ββββββββββββ β β
β β From node Out # β β β
β β To node In # [Add] β β β
β ββββββββββββββββββββββββββββββ β β
ββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββ€
β 3 nodes / 2 connections [Cancel] [Apply to Block] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Editing a node opens an accordion form covering:
- ID β the string key used in connections
- Type β controls header colour
- Label β use
\nfor a two-line header - X / Y β explicit position (Auto-layout resets these)
- Input / Output sockets β label + type selector with a live colour dot
Auto-layout runs topological BFS and spaces nodes left-to-right by connection depth (190 px horizontal, 160 px vertical per slot).
Add Connection validates that the output/input indices are in range before adding, and reports the error inline if they are not.
Apply to Block writes the finished JSON to customData and closes the
modal. The in-editor SVG preview updates immediately.
Custom JSON format
{
"nodes": [
{
"id": "geo",
"type": "geometry",
"label": "Geometry",
"x": 10,
"y": 80,
"inputs": [],
"outputs": [
{ "label": "Normal", "type": "vector" },
{ "label": "Incoming", "type": "vector" }
]
}
],
"connections": [
{ "from": "geo", "fromOut": 0, "to": "dot", "toIn": 0 }
]
}
Node types β header colours
type |
Colour |
|---|---|
geometry |
Teal |
vectorMath |
Blue |
math |
Green |
value |
Grey |
emission |
Purple |
output |
Dark red |
groupIn |
Amber |
groupOut |
Amber |
Socket types β wire colours
type |
Colour |
|---|---|
vector |
Purple |
value |
Grey |
shader |
Green |
color |
Gold |
Installation (no build step needed)
- Download
blender-node-diagram.zip - WordPress admin β Plugins β Add New β Upload Plugin
- Activate
Development
npm install
npm run build # production build β build/
npm run start # watch mode
Requires Node.js 20+.
File structure
blender-node-diagram/
βββ blender-node-diagram.php Plugin entry β registers both blocks
βββ block.json Diagram block metadata
βββ concept-block.json Concept block metadata
βββ package.json
βββ webpack.config.js
βββ src/
β βββ index.js Block registration + variation declarations
β βββ edit.js Diagram block editor component
β βββ save.js Diagram block save function
β βββ view.js Frontend renderer init
β βββ renderer.js SVG rendering engine (no WP dependencies)
β βββ diagrams.js Preset data + getDiagramData()
β βββ constants.js Node/socket type maps and colours
β βββ diagram-builder.js Full-screen visual diagram builder modal
β βββ concept-edit.js Concept block editor component
β βββ concept-save.js Concept block save function
β βββ concept-svg.js Static N/L/V/H SVG as a React component
β βββ frontend.css Shared styles (frontend + editor canvas)
β βββ editor.css Editor-only overrides
βββ build/ Pre-built; included in zip
βββ index.js Editor bundle (~31 KB)
βββ view.js Frontend bundle (~10 KB)
βββ frontend.css Shared styles
βββ frontend-rtl.css RTL variant
βββ editor.css Editor-only styles
βββ *.asset.php WordPress dependency manifests
Adding a new preset
- Export the diagram data object from
src/diagrams.jsand add it toPRESETS. - Add a
registerBlockVariationcall insrc/index.js. npm run build.
Using the renderer standalone
src/renderer.js has zero WordPress or React dependencies:
import { renderDiagram } from './renderer';
renderDiagram( svgElement, { nodes: [...], connections: [...] } );
Requirements
- WordPress 6.3+
- PHP 8.0+
- Node.js 20+ (development only)
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.