Preview Mesh Dual (fields overlay):
- The overlay now renders from the TWO per-mesh files (already exported every
run) as two actors in one renderer, replacing the combined-file single
actor. Per-mesh opacity finally works for real (the old path could only
apply the AVERAGE of both opacities to one merged actor).
- New color pickers (1: / 2:) next to the opacity inputs in the bar, overlay
only. Colors + opacities are pure client-side (viewerState-persisted,
re-posted on change); defaults red/blue match the old baked colors.
- Viewer (viewer_dual.html): second overlay actor; layout-aware mapper +
render helpers (mapper1Active/mapper2Active/renderActiveViews) so field
selection, colormaps, and edge toggles now work in overlay too (previously
field application only targeted the side-by-side mappers); settings apply
point size/edges/representation to both overlay actors (color stays
per-mesh). Legacy combined-file overlay path kept for old widgets; the
textured overlay still uses the combined GLB (colors don't apply to
textures).
Preview Mesh (VTK): Mode selector removed from the JS bar -- the node's own
`mode` input is the only control (bar keeps just the fullscreen button).
ComfyUI auto-imports every web/**/*.js into the shared main page; the four
big bundles (three, vtk-gltf, viewer-bundle-vtk, gsplat) only ever run
inside the viewer iframes but were getting pulled into the main document
too, where they wrote window.THREE / window.vtk / globalThis.* and could
collide with any other 3D pack. The **/*.js glob only matches .js, so
renaming to .mjs drops them from the auto-import while the iframes still
load them via classic <script src> (mime resolves to text/javascript).
window.* pollution from these bundles is gone from the main realm.
The viewer JS/HTML/bundles are now committed in javascript/ (declared via
pyproject [tool.comfy] web = "javascript") instead of being copied from the
shared comfy-3d-viewers pip package at prestartup. Consequences:
- requirements.txt is now just comfy-env (host env installs nothing else,
per the never-touch-the-host-env principle)
- prestartup_script.py no longer copies viewers or web_src; it keeps only
setup_env() and the input-asset copies
- WEB_DIRECTORY attribute removed; the pyproject declaration is the single
source (served at /extensions/comfyui-geometrypack/, keyed by project name)
- web_src/ deleted; its 6 widgets now live in javascript/js/ as the tracked
source, edited directly
- viewer_pbr.html hardcoded-fallback URL updated to the new mount name
Iframe URLs auto-detect the mount from import.meta.url, so the folder rename
and mount-name change are transparent at runtime.