From ce8688040b00b555d54fa31cc9f580b0a672499e Mon Sep 17 00:00:00 2001
From: Brandon Jones
Date: Mon, 5 Aug 2019 12:58:00 -0700
Subject: [PATCH] Update the samples to match the VR Complete version of the
spec (#37)
Very large squashed commit to bring the samples up-to-date with the "VR Complete" version of the spec. The primary changes include:
- All samples updated to conform to the latest WebXR spec
- Samples run on Chrome 76+'s WebXR implementation (via a minor shim) and any WebVR-compatible browsers via the most recent polyfill work by @jacobcdewitt.
- Running with the polyfill is now the main mode, with a link to explicitly run without the polyfill provided.
- New samples for gamepad state and teleportation, based on samples built to test Chrome by @klausw and @jacobcdewitt.
- Click-and-drag viewing for all inline samples.
- General code cleanup to try and make reading the samples a bit easier.
- The "Cottontail" library has been renamed to simply "renderer" (to prevent confusion).
- All samples use JS modules to import the renderer and other utility libraries now, eliminating the previous build step required to use them. (All modern browser support JS modules at this point).
- Some of the test pages now use a new WebXRSampleApp class to simplify the page code while still allowing whatever sample-specific code needs to be shown.
- New logo!
Co-Authored-By: jacobcdewitt
Co-Authored-By: Klaus Weidner
---
360-photos.html | 113 +-
controller-state.html | 368 +
explainer.html | 3 +
fallback-rendering.html | 252 -
favicon-32x32.png | Bin 1270 -> 1080 bytes
favicon-96x96.png | Bin 2011 -> 3254 bytes
favicon.ico | Bin 1150 -> 1150 bytes
framebuffer-scaling.html | 64 +-
...entation.html => immersive-vr-session.html | 67 +-
index.html | 83 +-
inline-session.html | 346 +
input-selection.html | 142 +-
input-tracking.html | 188 +-
js/cottontail/.eslintrc.json | 20 -
js/cottontail/.gitignore | 2 -
js/cottontail/LICENSE.md | 18 -
js/cottontail/README.md | 47 -
js/cottontail/TODOs.md | 15 -
js/cottontail/build/cottontail.debug.js | 15198 ----------------
js/cottontail/build/cottontail.debug.js.map | 1 -
js/cottontail/build/cottontail.js | 22 -
js/cottontail/package.json | 30 -
js/cottontail/src/cottontail.js | 43 -
js/cottontail/src/util/fallback-helper.js | 144 -
js/cottontail/webpack.config.debug.js | 54 -
js/cottontail/webpack.config.js | 53 -
js/render/README.md | 23 +
.../src => render}/core/material.js | 0
js/{cottontail/src => render}/core/node.js | 13 +-
.../src => render}/core/primitive.js | 0
js/{cottontail/src => render}/core/program.js | 0
.../src => render}/core/renderer.js | 32 +-
js/{cottontail/src => render}/core/texture.js | 0
.../src => render}/geometry/box-builder.js | 0
.../src => render}/geometry/cone-builder.js | 0
.../geometry/primitive-stream.js | 0
.../src => render}/loaders/gltf2.js | 0
.../src => render}/materials/pbr.js | 0
.../src => render}/math/gl-matrix.js | 20 +-
js/{cottontail/src => render}/math/ray.js | 6 +-
.../src => render}/nodes/bounds-renderer.js | 59 +-
js/{cottontail/src => render}/nodes/button.js | 0
.../src => render}/nodes/cube-sea.js | 0
.../src => render}/nodes/drop-shadow.js | 0
js/{cottontail/src => render}/nodes/gltf2.js | 0
.../src => render}/nodes/input-renderer.js | 4 +-
.../nodes/seven-segment-text.js | 0
js/{cottontail/src => render}/nodes/skybox.js | 0
.../src => render}/nodes/stats-viewer.js | 0
js/{cottontail/src => render}/nodes/video.js | 0
js/{cottontail/src => render}/scenes/scene.js | 128 +-
js/third-party/gl-matrix/LICENSE.md | 19 +
js/third-party/gl-matrix/src/gl-matrix.js | 17 +
.../gl-matrix/src/gl-matrix/common.js | 42 +
.../gl-matrix/src/gl-matrix/mat2.js | 415 +
.../gl-matrix/src/gl-matrix/mat2d.js | 448 +
.../gl-matrix/src/gl-matrix/mat3.js | 747 +
.../gl-matrix/src/gl-matrix/mat4.js | 1715 ++
.../gl-matrix/src/gl-matrix/quat.js | 631 +
.../gl-matrix/src/gl-matrix/quat2.js | 854 +
.../gl-matrix/src/gl-matrix/vec2.js | 625 +
.../gl-matrix/src/gl-matrix/vec3.js | 769 +
.../gl-matrix/src/gl-matrix/vec4.js | 602 +
js/third-party/webxr-polyfill/LICENSE | 202 +
.../build/webxr-polyfill.module.js} | 5160 +++---
js/util/inline-viewer-helper.js | 140 +
js/{cottontail/src => }/util/query-args.js | 0
js/{ => util}/webxr-button.js | 8 +-
js/webxr-sample-app.js | 190 +
js/webxr-version-shim.js | 527 -
magic-window.html | 215 -
media/logo/webxr-logo-mark.svg | 197 +
media/logo/webxr-logo-square.svg | 228 +
media/logo/webxr-logo.svg | 219 +
media/textures/cube-sea.png | Bin 44498 -> 29646 bytes
mirroring.html | 199 -
module-tester.html | 301 -
positional-audio.html | 151 +-
proposals/index.html | 20 +-
proposals/phone-ar-hit-test.html | 86 +-
proposals/phone-ar.html | 44 +-
reduced-bind-rendering.html | 115 +-
room-scale.html | 174 +-
spectator-mode.html | 152 +-
stereo-video.html | 116 +-
teleportation.html | 416 +
tests/cube-sea.html | 118 +-
tests/index.html | 29 +-
tests/offscreen-canvas.html | 160 +-
tests/permission-request.html | 301 +-
tests/pointer-painter.html | 278 +-
tests/sponza.html | 194 +-
viewport-scaling.html | 226 -
xr-barebones.html | 55 +-
94 files changed, 12864 insertions(+), 21799 deletions(-)
create mode 100644 controller-state.html
delete mode 100644 fallback-rendering.html
rename xr-presentation.html => immersive-vr-session.html (77%)
create mode 100644 inline-session.html
delete mode 100644 js/cottontail/.eslintrc.json
delete mode 100644 js/cottontail/.gitignore
delete mode 100644 js/cottontail/LICENSE.md
delete mode 100644 js/cottontail/README.md
delete mode 100644 js/cottontail/TODOs.md
delete mode 100644 js/cottontail/build/cottontail.debug.js
delete mode 100644 js/cottontail/build/cottontail.debug.js.map
delete mode 100644 js/cottontail/build/cottontail.js
delete mode 100644 js/cottontail/package.json
delete mode 100644 js/cottontail/src/cottontail.js
delete mode 100644 js/cottontail/src/util/fallback-helper.js
delete mode 100644 js/cottontail/webpack.config.debug.js
delete mode 100644 js/cottontail/webpack.config.js
create mode 100644 js/render/README.md
rename js/{cottontail/src => render}/core/material.js (100%)
rename js/{cottontail/src => render}/core/node.js (96%)
rename js/{cottontail/src => render}/core/primitive.js (100%)
rename js/{cottontail/src => render}/core/program.js (100%)
rename js/{cottontail/src => render}/core/renderer.js (97%)
rename js/{cottontail/src => render}/core/texture.js (100%)
rename js/{cottontail/src => render}/geometry/box-builder.js (100%)
rename js/{cottontail/src => render}/geometry/cone-builder.js (100%)
rename js/{cottontail/src => render}/geometry/primitive-stream.js (100%)
rename js/{cottontail/src => render}/loaders/gltf2.js (100%)
rename js/{cottontail/src => render}/materials/pbr.js (100%)
rename js/{cottontail/src => render}/math/gl-matrix.js (61%)
rename js/{cottontail/src => render}/math/ray.js (97%)
rename js/{cottontail/src => render}/nodes/bounds-renderer.js (69%)
rename js/{cottontail/src => render}/nodes/button.js (100%)
rename js/{cottontail/src => render}/nodes/cube-sea.js (100%)
rename js/{cottontail/src => render}/nodes/drop-shadow.js (100%)
rename js/{cottontail/src => render}/nodes/gltf2.js (100%)
rename js/{cottontail/src => render}/nodes/input-renderer.js (99%)
rename js/{cottontail/src => render}/nodes/seven-segment-text.js (100%)
rename js/{cottontail/src => render}/nodes/skybox.js (100%)
rename js/{cottontail/src => render}/nodes/stats-viewer.js (100%)
rename js/{cottontail/src => render}/nodes/video.js (100%)
rename js/{cottontail/src => render}/scenes/scene.js (66%)
create mode 100644 js/third-party/gl-matrix/LICENSE.md
create mode 100644 js/third-party/gl-matrix/src/gl-matrix.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/common.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/mat2.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/mat2d.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/mat3.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/mat4.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/quat.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/quat2.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/vec2.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/vec3.js
create mode 100644 js/third-party/gl-matrix/src/gl-matrix/vec4.js
create mode 100644 js/third-party/webxr-polyfill/LICENSE
rename js/{webxr-polyfill.js => third-party/webxr-polyfill/build/webxr-polyfill.module.js} (51%)
create mode 100644 js/util/inline-viewer-helper.js
rename js/{cottontail/src => }/util/query-args.js (100%)
rename js/{ => util}/webxr-button.js (99%)
create mode 100644 js/webxr-sample-app.js
delete mode 100644 js/webxr-version-shim.js
delete mode 100644 magic-window.html
create mode 100644 media/logo/webxr-logo-mark.svg
create mode 100644 media/logo/webxr-logo-square.svg
create mode 100644 media/logo/webxr-logo.svg
delete mode 100644 mirroring.html
delete mode 100644 module-tester.html
create mode 100644 teleportation.html
delete mode 100644 viewport-scaling.html
diff --git a/360-photos.html b/360-photos.html
index 892e5cd66..80f7f51e6 100644
--- a/360-photos.html
+++ b/360-photos.html
@@ -25,27 +25,12 @@
-
-
-
+
+
360 Photos
-
-
-
-
-
-
-
-
-
-
-
-