Three Compile
Ship your whole 3D scene as a webpage anyone can open
- app
- file
- entries
Here's the party trick of the whole WAS Three.js suite: you can build a 3D scene in ComfyUI, then hand it to Three Compile and get back a zip containing a web page that runs on its own. Unzip it, double-click index.html, and the scene draws - camera orbitable and all - with no ComfyUI running, no server, and nothing fetched over the network. Every other node in the suite renders inside your ComfyUI browser tab; this one renders anywhere, which makes it the natural way to share a scene with someone who doesn't know what ComfyUI is.
The mechanism follows directly from how the suite is built. Because your graph only ever described the scene (geometry, materials, lights, settings) rather than rendering it, that description is portable. Three Compile bundles three.js itself, the scene description, and every texture into one archive, rewriting each texture address to point at its in-archive copy, so the result is genuinely self-contained. Three.js ships inside the pack precisely so a page like this never has to fetch it from a CDN.
Inputs are few. app takes the assembled app from Three App (scene, camera, renderer settings). filename_prefix is the start of the archive's name - three_scene by default, and a / in it creates sub-folders under the chosen root. root picks which of ComfyUI's folders it's written into (output or temp), and title is the browser tab title. Outputs tell you where it went: file is the written path and entries counts how many files went into the archive, textures included.
The caveat is the one that runs through the whole custom-JS family of Three nodes: if your scene used Three Custom Geometry, Three Custom Material, Three Custom Object, Three Custom Update or a Three Script Module, the JavaScript travels into the page too. The archive is code as well as data, so it inherits the trust question - only compile and hand around scenes whose custom code you wrote or know. A scene built purely from the standard nodes carries no custom code, and that's the clean version to share widely.
Installing it
It's in WAS Node Suite v3 - install the pack via ComfyUI Manager (search WAS Node Suite v3) or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
Restart; needs ComfyUI 0.14.0+ / Python 3.10+. Nothing installs and nothing downloads. If the Three menu is missing, set features.threejs: true in <ComfyUI user dir>/was-node-suite/config.yaml.
If it looks wrong
Unlike Three Render, this one doesn't need a live browser tab doing the drawing - it just writes files, so it plays fine in a headless queue. If opening index.html shows nothing, check that the whole zip was unpacked (the textures and index.html live side by side) and that you opened the index.html at the archive root, not a stray file.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| app | THREE_APP | The scene, camera and renderer settings, from Three App. | |
| filename_prefix | STRING | three_scene | Leading part of the file name, as `three_scene`. A `/` in it makes sub-folders under the chosen root. |
| root | COMBO | output | Which of ComfyUI's folders the archive is written into, as `output` or `temp`. |
| title | STRING | Three.js scene | Title the page carries, shown in the browser tab. `Three.js scene` by default. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| file | STRING | Where the archive was written, as a path. |
| entries | INT | How many files went into the archive, textures included. |