points | Array<{ x: number; y: number; curveType?: number; tension?: number; lockX?: number; lockY?: number; }> | | External point array, as the GPU editor's — and a point may carry its own curveType and tension, which this editor takes over the curve mode when present (componentDidUpdate's sync). |
onPointWheel | (index: number, deltaY: number, shiftKey: boolean, ctrlKey: boolean, altKey: boolean) => void | | Wheel over a point. |
onHoverChanged | (index: number) => void | | The hovered point changed (-1 = none). |
onPointReset | (index: number) => void | | When set, a right-clicked point's context menu gains a "Reset point" item that calls this with the point's index. |
pointMenuCount | number | | Up to eight extra items for a right-clicked point's menu, as SCALAR labels; an empty one is skipped. |
pointMenuItem0 | string | | |
pointMenuItem1 | string | | |
pointMenuItem2 | string | | |
pointMenuItem3 | string | | |
pointMenuItem4 | string | | |
pointMenuItem5 | string | | |
pointMenuItem6 | string | | |
pointMenuItem7 | string | | |
onPointMenuAction | (index: number, itemIndex: number) => void | | Which extra item was picked, for the point the menu was opened on. |
fixedCurves | number | 0 | 1: every segment's curve type and tension are the host's, passed in `points` — the menu offers no curve type, tension or "Set All Segments" items, and Alt+wheel bends nothing, so the picture shows only what the host gave it (ADSREnvelope's exact mode, where the curves are a synth's parameters). |
onSegmentBend | (index: number, tension: number) => void | | Given, a press on an Exponential (mode 9) segment, within 10 px of its curve and away from its points, bends it: as the pointer moves, the segment's tension becomes its tension at the press less twice the move along the segment's rise as a share of that rise, held to -1..1 — so a drag toward the segment's end draws its middle toward that end, as in Serum. |
pointOutlineWidth | number | 0 | Outline width around each control point in pixels (0 = off). |
pointOutlineR | number | 0 | Point outline color R |
pointOutlineG | number | 0 | Point outline color G |
pointOutlineB | number | 0 | Point outline color B |
markerSegment | number | | A dot on the curve where something is along it, such as a voice along its envelope: on segment `markerSegment` (0 runs from point 0 to point 1; -1, the default, draws none), `markerAlong` of the way, 0..1, measured in the segment's own rise: the place where the curve has gone that share of the way from its start height to its end height, so the dot sits on the curve as drawn, whatever its shape. |
markerAlong | number | | |
width | number | 400 | Canvas width in pixels. |
height | number | 200 | Canvas height in pixels. |
curveMode | number | 'linear' | 'smooth' | 'step' | 'hold' | 1 | Interpolation mode (sent as int to shader). 0 | 'linear' — straight lines 1 | 'smooth' — catmull-rom spline 2 | 'step' — instant jump 3 | 'hold' — hold previous value |
gridX | number | 8 | Vertical grid divisions. 0 = no grid. |
gridY | number | 4 | Horizontal grid divisions. 0 = no grid. |
gridOpacity | number | 0.15 | Grid line opacity (0–1). |
gridColorR | number | 0.25 | Grid line color R 0-1 |
gridColorG | number | 0.25 | Grid line color G 0-1 |
gridColorB | number | 0.25 | Grid line color B 0-1 |
bgGradTopR | number | 0.12 | BG gradient top color R |
bgGradTopG | number | 0.12 | BG gradient top color G |
bgGradTopB | number | 0.12 | BG gradient top color B |
bgGradBotR | number | 0.08 | BG gradient bottom color R |
bgGradBotG | number | 0.08 | BG gradient bottom color G |
bgGradBotB | number | 0.08 | BG gradient bottom color B |
curveR | number | 1.0 | Curve color R |
curveG | number | 1.0 | Curve color G |
curveB | number | 1.0 | Curve color B |
curveWidth | number | 1.5 | Curve line thickness in pixels. |
curveGradient | number | 0 | Enable gradient from curveGradStart → curveGradEnd based on Y. |
curveGradStartR | number | 1.0 | Gradient start R (at Y=0) |
curveGradStartG | number | 0.2 | Gradient start G |
curveGradStartB | number | 0.4 | Gradient start B |
curveGradEndR | number | 0.2 | Gradient end R (at Y=1) |
curveGradEndG | number | 0.6 | Gradient end G |
curveGradEndB | number | 1.0 | Gradient end B |
glowIntensity | number | 0 | Glow intensity around the curve (0 = off). |
glowRadius | number | 0 | Glow falloff radius in pixels. |
glowR | number | same as curveR | Glow color R |
glowG | number | same as curveG | Glow color G |
glowB | number | same as curveB | Glow color B |
fillOpacity | number | 0 | Fill opacity under the curve (0 = off). |
pointSize | number | 4.0 | Point radius in pixels. |
pointR | number | 1.0 | Point color R |
pointG | number | 1.0 | Point color G |
pointB | number | 1.0 | Point color B |
pointGlow | number | 0 | Point glow intensity (0 = off). |
pointGlowR | number | same as curveR | Point glow color R |
pointGlowG | number | same as curveG | Point glow color G |
pointGlowB | number | same as curveB | Point glow color B |
readOnly | boolean | false | Read-only mode. |
minPoints | number | 2 | Minimum number of points. |
disableTension | number | 0 | Disable per-point tension adjustment. |
disableExtendedCurveTypes | number | 0 | Disable per-point curve type switching beyond the default `curveMode` (linear/smooth/step). |
useNativeContextMenu | boolean | number | false (custom overlay) | Use OS-native context menu (NSMenu/Win32) instead of custom overlay. |
zoomDisabled | number | 0 (enabled) | Disable zoom (Cmd/Ctrl + scroll). |
panDisabled | number | 0 (enabled) | Disable pan (scroll, Shift+scroll, middle-drag). |
minX | number | 0 | Minimum X value (domain start). |
maxX | number | 1 | Maximum X value (domain end). |
minY | number | 0 | Minimum Y value (range start). |
maxY | number | 1 | Maximum Y value (range end). |
shadowOpacity | number | 0 | Curve shadow opacity (0 = off). |
shadowOffsetX | number | 2 | Shadow offset X in pixels. |
shadowOffsetY | number | 2 | Shadow offset Y in pixels. |
shadowBlur | number | 4 | Shadow blur radius. |
shadowR | number | 0 | Shadow color R |
shadowG | number | 0 | Shadow color G |
shadowB | number | 0 | Shadow color B |
embossStrength | number | 0 | Emboss strength (0 = off). |
embossHighR | number | 1 | Emboss highlight color R |
embossHighG | number | 1 | Emboss highlight color G |
embossHighB | number | 1 | Emboss highlight color B |
embossShadowR | number | 0 | Emboss shadow color R |
embossShadowG | number | 0 | Emboss shadow color G |
embossShadowB | number | 0 | Emboss shadow color B |
embossAngle | number | 135 | Emboss light angle in degrees |
metallicIntensity | number | 0 | Metallic shine intensity (0 = off). |
metallicSize | number | 0.3 | Metallic specular size (0-1). |
metallicR | number | 0.7 | Metallic base color R |
metallicG | number | 0.7 | Metallic base color G |
metallicB | number | 0.8 | Metallic base color B |
woodGrain | number | 0 | Wood grain intensity (0 = off). |
woodBaseR | number | 0.4 | Wood base color R |
woodBaseG | number | 0.26 | Wood base color G |
woodBaseB | number | 0.13 | Wood base color B |
woodGrainR | number | 0.3 | Wood grain color R |
woodGrainG | number | 0.18 | Wood grain color G |
woodGrainB | number | 0.08 | Wood grain color B |
woodScale | number | 20 | Wood grain scale |
noiseIntensity | number | 0 | Noise texture intensity (0 = off). |
noiseScale | number | 50 | Noise scale/frequency |
noiseMono | number | 1 | Noise is monochrome (1) or colored (0). |
innerGlowIntensity | number | 0 | Inner glow intensity (0 = off). |
innerGlowR | number | 1 | Inner glow color R |
innerGlowG | number | 1 | Inner glow color G |
innerGlowB | number | 1 | Inner glow color B |
innerGlowRadius | number | 10 | Inner glow radius |
outlineWidth | number | 0 | Outer outline width (0 = off). |
outlineR | number | 0 | Outline color R |
outlineG | number | 0 | Outline color G |
outlineB | number | 0 | Outline color B |
scanlineIntensity | number | 0 | Scanline intensity (0 = off). |
scanlineSpacing | number | 2 | Scanline spacing in pixels |
scanlineAngle | number | 0 | Scanline angle in degrees (0=horizontal) |
fillGradientMode | number | 0 | Fill gradient mode: 0=solid, 1=vertical, 2=horizontal, 3=radial |
fillGradStartR | number | same as curveR | Fill gradient start color R |
fillGradStartG | number | same as curveG | Fill gradient start G |
fillGradStartB | number | same as curveB | Fill gradient start B |
fillGradEndR | number | 0 | Fill gradient end color R |
fillGradEndG | number | 0 | Fill gradient end G |
fillGradEndB | number | 0 | Fill gradient end B |
borderWidth | number | 0 | Border width around canvas (0 = off). |
borderR | number | 0.3 | Border color R |
borderG | number | 0.3 | Border color G |
borderB | number | 0.3 | Border color B |
borderRadius | number | 0 | Border corner radius |
vignetteIntensity | number | 0 | Vignette intensity (0 = off). |
vignetteSize | number | 0.5 | Vignette size (0-1). |
vignetteSoftness | number | 0.5 | Vignette softness |
pointStyle | number | 0 | Control point shape. 0 = filled circle (default), 1 = ring/hollow, 2 = square, 3 = diamond |
curveAlpha | number | 1.0 | Curve line opacity (0–1). |
gridStyle | number | 0 | Grid line rendering style. 0 = solid (default), 1 = dashed, 2 = dotted |
bgFlat | number | 0 | Use flat color instead of gradient (1 = flat, uses bgGradTop). |
fillPosition | number | 0 | Fill area: 0 = below curve (default), 1 = above curve. |
dynBgSpeed | number | 1.0 | Dynamic bg animation speed multiplier. |
dynBgIntensity | number | 0.5 | Dynamic bg intensity / blend amount (0-1). |
dynBgScale | number | 1.0 | Dynamic bg scale / zoom factor. |
dynBgColor1R | number | 0.2 | Dynamic bg primary color R |
dynBgColor1G | number | 0.5 | Dynamic bg primary color G |
dynBgColor1B | number | 1.0 | Dynamic bg primary color B |
dynBgColor2R | number | 1.0 | Dynamic bg secondary color R |
dynBgColor2G | number | 0.2 | Dynamic bg secondary color G |
dynBgColor2B | number | 0.5 | Dynamic bg secondary color B |
dynBgColor3R | number | 0.0 | Dynamic bg tertiary color R |
dynBgColor3G | number | 1.0 | Dynamic bg tertiary color G |
dynBgColor3B | number | 0.5 | Dynamic bg tertiary color B |
dynBgDistort | number | 0.0 | Dynamic bg distortion / warp amount. |
dynBgComplexity | number | 3.0 | Dynamic bg complexity / octaves. |
dynBgShader | string | ICurveEditorShader | | WGSL shader body for the dynamic background. |
dynBgReactStrength | number | 0.6 | Strength of the reactive effect. |
dynBgReactRadius | number | 0.25 | Radius of influence around each point (normalised). |
dynBgReactDecay | number | 2.0 | How quickly effect fades with distance. |
dynBgReactColor1R | number | 0.0 | Reactive colour 1 R. |
dynBgReactColor1G | number | 0.5 | Reactive colour 1 G. |
dynBgReactColor1B | number | 1.0 | Reactive colour 1 B. |
dynBgReactColor2R | number | 1.0 | Reactive colour 2 R. |
dynBgReactColor2G | number | 0.3 | Reactive colour 2 G. |
dynBgReactColor2B | number | 0.5 | Reactive colour 2 B. |
dynBgReactSmooth | number | 0.5 | Smoothing / blend factor for reactive effect. |
dynBgReactFreq | number | 4.0 | Frequency / detail of reactive pattern. |
dynBgReactPhase | number | 0.0 | Phase offset for timing. |
dynBgReactShader | string | ICurveEditorShader | | WGSL shader body for the reactive background. |
dynBgData | number[] | | Per-frame floats for the background shaders, read in WGSL as getData(i) with getDataCount() entries: a spectrum, a meter history, a sampled response curve. |
dynBgDataCount | number | 0 | How many entries of dynBgData are valid. |
playheadX | number | -1 | Playhead X position (0-1 in curve space). |
playheadR | number | 1.0 | Playhead color R |
playheadG | number | 1.0 | Playhead color G |
playheadB | number | 1.0 | Playhead color B |
playheadAlpha | number | 0.8 | Playhead opacity (0-1). |
playheadWidth | number | 2 | Playhead line width in pixels. |
pointsKey | number | | Key to detect when external points change. |
snap | number | 0 | Enable snap-to-grid (0=off, 1=on). |
snapX | number | 8 | Snap X divisions (e.g. 8 = snap to 1/8 increments). |
snapY | number | 4 | Snap Y divisions (e.g. 4 = snap to 1/4 increments). |
staticPoints | number | 0 | Static points mode (0=off, 1=on). |
pointsIndependent | number | 0 | The points are THINGS, not the knots of a curve. |
renderBackground | (ctx: CanvasRenderingContext2D, width: number, height: number) => void | | Custom background render callback. |
animate | boolean | | Declare this editor's shader background ANIMATED OVER TIME — forwarded to `<Canvas animate>`, and the only thing that feeds the frame clock `t` to `dynBgShader` / `dynBgReactShader`. |
pointColors | Array<{ r: number; g: number; b: number; }> | | Per-point color overrides. |
onPointsChanged | (points: Array<{ x: number; y: number; lockX?: number; lockY?: number; }>) => void | | Called when points change (add, delete, drag). |
bgMenuCount | number | 0 | Items for a right-click that lands on NO point — the editor's background. |
bgMenuItem0 | string | | |
bgMenuItem1 | string | | |
bgMenuItem2 | string | | |
bgMenuItem3 | string | | |
onBgMenuAction | (itemIndex: number) => void | | Chosen item from the background menu. |
bgColor | string | | Background color (hex string like '#1a0a0a'). |
curveColor | string | | Curve color (hex string). |
gridColor | string | | Grid color (hex string). |
pointColor | string | | Point color (hex string). |