Implemented a comprehensive 360° panorama viewing system based on the ComfyUI_preview360panorama reference implementation. This adds interactive visualization capabilities to the LatLong node pack.
Changes:
- Added PanoramaViewerNode: Interactive single-image 360° viewer with pan and zoom controls
- Added PanoramaVideoViewerNode: Frame-by-frame 360° video panorama player
- Created JavaScript viewer using Three.js for WebGL-based equirectangular rendering
- Added required Pillow dependency for image encoding
- Updated .gitignore to allow js/lib/ directory
Features:
- Mouse drag to look around the panorama
- Mouse wheel to zoom in/out (FOV adjustment)
- Base64-encoded PNG delivery for seamless integration
- Automatic image resizing for performance optimization
- Support for grayscale to RGB conversion
- Batch processing support (uses first image from batch)
Technical Implementation:
- js/pano_viewer.js: Three.js-based viewer with MinimalPanoViewer and MinimalPanoVideoViewer classes
- js/lib/three.module.min.js: Three.js library loaded from CDN
- nodes.py: Added viewer node classes with proper OUTPUT_NODE configuration
- __init__.py: Registered new nodes and added WEB_DIRECTORY for JavaScript loading
The viewer integrates seamlessly with ComfyUI's node system and provides an intuitive interface for exploring equirectangular panoramas directly within the workflow.