The IDE
A self-contained editor + canvas window for iterating on sketches without a separate build step — not a thin wrapper around the library, but a purpose-built environment: diagnostics as you type, code navigation, an AI assistant with its own tools, packages resolved from a single comment, more than 60 ready-made examples, and a one-click path to a standalone app.
On this page · 14 entries
SketchCompiler.Compile
SketchCompiler.Compile(string sourceCode) → CompileResult
Parses the editor's text with Roslyn, compiles it in memory, and instantiates the first Sketch found — this is what pressing Run does, start to finish, well under a second for a typical sketch.
SkiaSharp.dll — sketch code never needs to know SkiaSharp exists.SketchEditorView
A tabbed code editor with C# syntax highlighting, live Roslyn diagnostics, and autocomplete.
SketchCompiler uses, underlined directly in the editor as you type — no need to press Run to find a typo. They're listed in the bottom panel's Live errors tab — click one and the caret jumps straight to it. The editor waits until you stop typing for about a second before checking again, so a line you're still writing (a field without its ; yet) doesn't light up halfway through.Sketch API — every method documented on this page shows up as you type, with the same signatures.Code navigation
Standard IDE navigation, backed by the same Roslyn semantic model live diagnostics use — scoped to the one sketch you're editing, since each sketch is its own independent compilation rather than part of a larger project.
| Action | Shortcut |
|---|---|
| Find in file | Ctrl+F |
| Go to Definition | F12 |
| Go to Implementation | Ctrl+F12 |
| Find All References | Shift+F12 |
| Save (also triggers Hot Reload, see below) | Ctrl+S |
And the shortcuts for the live, generative and day-to-day tools:
| Action | Shortcut |
|---|---|
| Stop the sketch and its sound (the Run button while live) | Shift+F5 |
| Performance panel (over the canvas) | F3 |
| Run again with a new seed 🎲 | F6 |
| Performance mode | F11 |
| Variations sheet | Ctrl+Shift+V |
| Export for print / plotter | Ctrl+Shift+E |
| Code time machine | Ctrl+Shift+H |
The three jump-to-X actions are also on the editor's right-click menu, next to Cut/Copy/Paste. References resolve within the one open sketch; a symbol from DanaProcessing itself (like Circle or PVector) is compiled with no attached source, so Go to Definition reports "no source available" for it instead of guessing at a location.
Hot Reload
Recompiles the running sketch and swaps it in without re-running Setup() or losing its current state, as long as every field still lines up (same names, same types) between the old and new version — falls back to a full restart otherwise, with the reason shown in the output panel. Triggers automatically whenever you Ctrl+S the sketch that's currently running; Sketch → Hot reload (Ctrl+Shift+R, also in the ▾ next to Run) does the same thing on demand.
▶ Run / ■ Stop one switch · Shift+F5
Run is a switch. Stopped, it says ▶ Run; while a sketch is live the same button turns dark, a small dot breathes and it says ■ Stop · 1:42 — how long the sketch has been running. Click it (or Shift+F5) and the sketch stops for good: no more frames or input, its OnStop() runs — so the camera, the microphone, MIDI and serial ports are let go — and every live loop and voice goes silent. The last frame stays on the canvas. To start over without stopping first, use Ctrl+R or ↻ Restart from scratch in the ▾ next to it. Switching to the code, resizing to the narrow layout or minimizing the IDE never pauses anything: only this switch stops a sketch.
Run in a separate window
Sketch → Run in a separate window (Ctrl+F5, also in the ▾ next to Run) compiles the active sketch the same way Run does, but opens the result in its own window instead of the embedded canvas — no editor, no IDE chrome around it, the way Processing's own Run button works. Fully independent of the main window's Run/Hot Reload state; pressing it again replaces the previous window instead of stacking a new one on top.
Agent mode
An AI assistant, opened from the ✦ Assistant title-bar button (or Tools → Assistant, Ctrl+I), with four tools scoped to the sketch you're working on: read the current source, replace it, compile & run it (compile errors and runtime exceptions are reported straight back to the model so it can react), and search this API reference. Needs your own API key for whichever provider you set up in Settings — the IDE doesn't include or pay for one, and the key stays local, never sent anywhere but that provider.
NuGet packages in a sketch
Drop a // nuget: comment at the top of a sketch and pressing Run resolves, downloads (cached under %AppData%\DanaProcessingIde), and links the package before compiling — no .csproj to create or edit.
// nuget: Newtonsoft.Json, 13.0.3 public class MySketch : Sketch { public override void Setup() => Size(600, 400); }
Sketch → NuGet Packages opens a Browse/Installed package manager (search NuGet.org, pick a version, install/update/remove) that writes these directives for you.
Example gallery
More than 60 built-in sample sketches, open via Sketch → Examples. The window has a search box (accent- and case-insensitive; it also searches inside the code, so PVector or Sphere finds the samples that use them), topic tags with filter chips (2D, 3D, Audio, ML.NET, Particles, Games…), and a code preview; ↑/↓ and Enter work from the keyboard — 2D and 3D, from a minimal Setup()/Draw() to a live-coded beat with the audio engine, an orbiting camera, a GPU-uploaded 3D swarm, parallel prime search, a live-training ML.NET color field, a reinforcement-learning self-play demo, and PDF export. Each one is commented to explain not just what it draws but why it's built that way — a working answer to "how would I actually do X" for most of the API on this page.
Standalone export
File → Export sketch (Ctrl+E) packages the active sketch as a single, self-contained, double-clickable executable via dotnet publish — no .NET runtime install required on the machine that opens it, nothing to explain to whoever you send it to. An optional "modo gadget" (windowless) mode drops the OS title bar entirely — drag it with Alt+click, close it with Alt+F4 — for running the exported sketch as a desktop widget instead of a regular app window.
Crash reporting & feedback
Opt-in, off by default (Settings → Reporte de errores). When enabled, an unhandled exception writes a local crash report; on the next startup, the IDE offers to open a prefilled GitHub issue for it — you review and submit it yourself, nothing is sent automatically or silently. The Help menu also has a standing Report a problem item for general feedback, with no crash required to use it.
Settings
Tools → Settings (Ctrl+,) opens a Settings window with one short page per topic, picked from the list on the left, so you only see the options you came for. Colors preview live while you choose; nothing is kept until Save, and Cancel puts everything back. When a change needs a restart (language, corners, fonts) the footer says so and offers Save and restart.
| Page | Controls |
|---|---|
| General | Interface language (Spanish or English, on the next start), whether the IDE checks GitHub for a newer release, and opt-in crash reporting (see above, off by default). |
| Appearance | Six accent colors to pick from, the background and text colors, and one Roundness slider for every corner. Show all opens the full list: every ClayTheme color, each corner radius and the font stacks. |
| Running sketches | 2D smoothing (supersampling, up to 4×) and 3D smoothing (MSAA, up to 8×), applied on the next Run. And Optimized code: compiles the sketch with the C# optimizer, so heavy math (simulations, thousands of particles) runs up to twice as fast; off by default, because when a sketch crashes the line it marks can then be a little off. |
| Performance mode | How see-through the code is over the visuals (20–100% visible), how dark the band behind it is, and its size, with a small preview of the stage. The same values change live on stage with the keys in Performance mode, and are remembered either way. |
| Assistant | Provider, API key, and model for Agent mode (see above). |
MainWindow
The full IDE shell: editor and canvas side by side on a wide window, a single "Código"/"Resultado" toggle on a narrow one, a custom title bar, status bar, and error panel. A sketch keeps running until you stop it — while you type in the editor, on the "Código" pane of a narrow window, with the IDE minimized — so the visuals stay in step with the music, which never stops either. While the canvas can't be seen its frames are drawn offscreen and show up the moment you look again. To lower the cost while you type, the 2D supersampling drops to 1x until you pause.
ClayTheme
The IDE's visual language — warm off-white surfaces, soft shadows, and an ember-orange accent — driven by the Settings window's Appearance page above.