1
0

10 Commits

Author SHA1 Message Date
Verdi
40e3711925 Resolve image paths relative to script URL for CDN support 2026-02-19 12:15:36 -06:00
Verdi
bebcb3d355 Fix stereo eye detection with multiple fallback methods
- Replace onBeforeRender stereo detection to use cascading fallbacks:
  1. Direct xrCamera.cameras[0]/[1] comparison
  2. View matrix matrixWorldInverse.elements[12] with 0.001 threshold
  3. Projection matrix elements[8] as last resort
- Add video texture sync in renderXR before render call

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 23:27:45 -06:00
Michael Verdi
38200c82f2 Revert "Fix stereo rendering glitches on Meta Quest browsers" 2026-01-26 23:12:43 -06:00
Verdi
4183ae2530 Fix stereo rendering glitches on Meta Quest browsers
Replace camera reference comparison with view matrix eye detection
for more reliable left/right eye identification. Recent Quest Browser
updates (Chromium 138/140, Horizon OS v83) changed WebXR multiview
behavior, causing the previous xrCamera.cameras[0]/[1] comparison
to fail intermittently on the left eye.

The new approach uses activeCamera.matrixWorldInverse.elements[12]
(the X translation in the view matrix) which reliably indicates:
- Negative value = left eye
- Positive value = right eye

This method is consistent across both Quest Browser and Safari/VisionOS.

Also adds explicit video texture synchronization in the render loop
to prevent timing-related glitches.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 18:20:13 -06:00
Michael Verdi
d869f75e1e Update vr180-player.js
Updated threejs CDN link with one that updates to latest version.
2026-01-26 11:07:07 -06:00
Michael Verdi
85baf3cd79 Fix 2D canvas positioning bug
- Changed canvas positioning from absolute to relative in start2DMode()
- Resolves issue where content below video was hidden underneath canvas
- Fixes canvas disappearing during page resize and fullscreen operations
- Canvas now properly flows within document layout
2025-08-01 15:22:26 -05:00
Michael Verdi
0ef4ca56a5 Update HTML, CSS, and video file
- Updated index.html with latest changes
- Updated vr180player/vr180-player.css with styling improvements
- Updated sbs-video.mp4 with new video content
2025-08-01 14:38:42 -05:00
Michael Verdi
3472e2a385 Fix canvas resizing bug in 2D mode
- Fixed onWindowResize() to use container dimensions instead of hidden video element
- Updated start2DMode() to use consistent container-based sizing logic
- Added fullscreen event listeners to handle resize during fullscreen transitions
- Added minimum dimension constraints to prevent zero-sized canvas
- Canvas now maintains proper dimensions during window resize and fullscreen operations
2025-08-01 12:27:39 -05:00
Michael Verdi
896777ac30 Implement dynamic UI creation for VR180 player
- Remove static HTML elements (play button and control panel) from index.html
- Add createPlayButton() and create2DControlPanel() functions to dynamically generate UI
- Update DOMContentLoaded handler to create and insert UI elements on page load
- Maintain all existing functionality while making player more modular and self-contained
- UI elements are now created entirely by JavaScript, making the player easier to integrate
- Tested and verified: play button appears correctly, 2D mode works, controls function properly
2025-07-31 22:41:14 -05:00
Michael Verdi
07611f8a1d Reorganize repository structure and move poster.jpg back to root
- Create vr180player/ folder with organized structure:
  - vr180player/images/ for all UI control images
  - vr180player/vr180-player.js and vr180player/vr180-player.css
- Move poster.jpg back to root level alongside main content files
- Update all file references in index.html and CSS files
- Maintain clean separation between main content and player components
- All functionality preserved with improved organization
2025-07-31 22:33:41 -05:00