import React from 'react'; import { useStore } from '@nanostores/react'; import { uiState, hideHelp } from '../stores/ui'; export function HelpPopup() { const ui = useStore(uiState); const handleBackdropClick = (e: React.MouseEvent) => { if (e.target === e.currentTarget) { hideHelp(); } }; if (!ui.helpPopupOpen) return null; return (
Ctrl+Enter - Execute shader code
F11 - Toggle fullscreen
H - Hide/show UI
R - Generate random shader
S - Share current shader (copy URL)
? - Show this help
x, y - Pixel coordinates
t - Time (enables animation)
i - Pixel index
r - Distance from center
a - Angle from center (radians)
u, v - Normalized coordinates (0.0 to 1.0)
c - Normalized center distance (0.0 to 1.0)
f - Frame count (discrete timing)
d - Manhattan distance from center
n - Noise value (0.0 to 1.0)
b - Previous frame's value (feedback)
mouseX, mouseY - Mouse position (0.0 to 1.0)
mousePressed - Mouse button down (true/false)
mouseVX, mouseVY - Mouse velocity
mouseClickTime - Time since last click (ms)
touchCount - Number of active touches
touch0X, touch0Y - Primary touch position
touch1X, touch1Y - Secondary touch position
pinchScale - Pinch zoom scale factor
pinchRotation - Pinch rotation angle
accelX, accelY, accelZ - Accelerometer data
gyroX, gyroY, gyroZ - Gyroscope rotation rates
audioLevel - Overall audio volume (0.0-1.0)
bassLevel - Low frequencies (0.0-1.0)
midLevel - Mid frequencies (0.0-1.0)
trebleLevel - High frequencies (0.0-1.0)
Click "Enable Audio" to activate microphone
^ & | - XOR, AND, OR
<< >> - Bit shift left/right
+ - * / % - Math operations
== != < > - Comparisons (return 0/1)
? : - Ternary operator (condition ? true : false)
~ ** - Bitwise NOT, exponentiation
sin, cos, tan - Trigonometric functions
abs, sqrt, pow - Absolute, square root, power
floor, ceil, round - Rounding functions
min, max - Minimum and maximum
random - Random number 0-1
log, exp - Natural logarithm, exponential
PI, E - Math constants
Use without Math. prefix: sin(x) not{' '}
Math.sin(x)
Integer (0-255): Traditional mode for large values
Float (0.0-1.0): Bitfield shader mode, inverts and clamps values
Polar (angle-based): Spiral patterns combining angle and radius
Distance (radial): Concentric wave rings with variable frequency
Wave (ripple): Multi-source interference with amplitude falloff
Each mode transforms your expression differently!
Array indexing: [1,2,4,8][floor(t%4)]
Complex expressions:{' '}
x>y ? sin(x) : cos(y)
Nested functions:{' '}
pow(sin(x), abs(y-x))
Logical operators: x&&y,{' '}
x||y
No character or length limits - use any JavaScript!
Hover over the left edge of the screen to access the shader library
Save shaders with custom names and search through them
Use edit to rename, del to delete
Classic - Original colorful mode
Grayscale - Black and white
Red/Green/Blue - Single color channels
HSV - Hue-based coloring
Rainbow - Spectrum coloring
Export PNG - Save current frame as image
Bitfielder - Interactive bitfield shader editor
Created by BuboBubo (Raphaƫl Forment)
Website:{' '} raphaelforment.fr
Source:{' '} git.raphaelforment.fr
License: AGPL 3.0