Exporting effects
While you design an effect it is stored in the editor's own binary format, which only the editor understands. To use an effect in a game or on a website you have to export it into source code (currently C# or JavaScript) that simulates the effect frame by frame. Export happens through your neutrinoparticles.com account: the editor sends the effect to the site, the site exports it and sends the result back, and the editor writes the exported files to disk. The effect itself is never stored on the server.
Export settings
Each project has its own export settings, one set per target (for example JS or the various C# targets). They control where exported files are written and how the exported code is generated — for example the JavaScript module type, a capacity scale, whether textures are copied, and an optional post-export command. You edit them in the project's export settings dialog.
When an effect needs exporting
The editor tracks, per effect and per target, whether the exported file on disk is still up to date. An effect is flagged as needing export when:
- the effect was changed in a way that affects the exported output;
- it has never been exported for that target;
- the exporter's settings that affect the output were changed — for example the capacity scale, the JavaScript module type, the textures option or the post-export command. Changing only the output folder does not flag the effect, because that does not change the generated code.
Effects exported by an older editor (before settings were tracked this way) are flagged for export once, the first time you open the project in a newer editor. Re-exporting them clears the flag.
Exporting from the project tree
Exportable effects, folders and the project root all show an Export button in the project tree when something below them still needs exporting:
- On an effect, the button exports that effect.
- On a folder (including the project root), the button exports everything that still needs export anywhere inside that folder, in one step.
Right-clicking an effect or a folder adds two actions:
- Export — the same as the button: exports everything that needs export inside the selection. It is disabled when there is nothing to export.
- Re-export — re-exports every effect inside the selection, whether or not it currently needs exporting. Use it when you want to regenerate all files, for example after changing a setting that you want applied everywhere.
Both menu actions work over a multi-selection: select several effects and/or folders and the action is applied to all of them at once.
JavaScript export versions
The JavaScript target offers several versions, chosen in the export settings. Effects exported with one version are self-contained with respect to that version, so existing exports keep working when you switch: only effects you export again use the newly selected version.
- v1.0 and v1.1 — the established lines. An exported effect uses the shared NeutrinoParticles JavaScript runtime library, which you ship alongside your effects.
- v2.0 — a newer line in which each exported effect embeds everything it needs, so there is no separate runtime library to ship. Its render adapter support is narrower than v1.1's, so pick it when your integration matches what it supports.
The preview follows the selected version
When the preview runs on the CPU renderer, it plays your effect through the runtime of the selected JavaScript version — select v2.0 and the preview simulates with the same 2.0 runtime an export would embed, so what you see is what that line will play. The renderer pill in the top-left corner of the preview names the line it is running (CPU · JS 1.1 or CPU · JS 2.0 — see Timeline preview), and switching the version in the export settings rebuilds the preview immediately, without reopening the effect.
A few details worth knowing:
- v1.0 previews through the v1.1 runtime — the v1.0 line has no preview runtime of its own, and this has always been the case.
- With no JavaScript export enabled at all, the preview plays the newest line (currently v2.0) — nothing ties such a project to an older runtime.
- The GPU renderer does not depend on this choice: it plays the effect through its own pipeline, whatever JavaScript version is selected.
Minifying the exported JavaScript (v2.0)
Because a v2.0 effect carries its own runtime and reaches the outside world through only a handful of calls, it can be minified on its own. Tick Mangle exported effect in the JavaScript export settings and the exporter shortens names and strips whitespace before writing the file, typically making it several times smaller. The effect behaves identically — only its source text changes.
The option is only available for v2.0. A v1.x effect refers to the shared runtime library by name, so minifying such an effect on its own would break those references.
Minifying uses a fixed, bundled version of the terser minifier and requires Node.js on your machine for local exports. If it is missing, or anything else prevents minification, the export fails with an error explaining why. It never quietly writes a non-minified file: that would hand you a different result than the one you asked for, without telling you.
Turning the option on or off counts as a change that affects the output, so effects already exported are flagged as needing export again.