1
0

Typescript conversion

This commit is contained in:
Aiden
2026-06-10 10:35:14 +10:00
parent 91b612785b
commit d24e2021f2
17 changed files with 3609 additions and 1684 deletions

View File

@@ -7,7 +7,7 @@ The player supports two projection modes:
- `plane`: a flat stereoscopic video plane in WebXR, with a normal flat left-eye fallback on non-XR browsers.
## How to use it
Include the module script from your CDN. The script automatically loads its matching CSS file and image assets from the same folder.
Host the whole `vr180player/` directory on your CDN, then include the module script. The script automatically loads its matching CSS file and image assets from the same folder, and it imports its helper modules with relative module paths.
```html
<div data-vr-web-player data-projection="vr180">
@@ -43,3 +43,13 @@ When the page loads, the video is embedded normally with a play button over the
## Demo
Open this repository's `index.html` through a local web server and switch `data-projection` between `vr180` and `plane` to test both modes.
## Development
The player source is TypeScript in `src/vr180player/`. Build the CDN-ready JavaScript files into `vr180player/` with:
```sh
npm install
npm run build
```
Edit the TypeScript source files rather than the generated JavaScript files in `vr180player/`.