Skip to content

Commit

Permalink
Tidy up assets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Nov 12, 2024
1 parent 75ea5c2 commit 65e4fd3
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<pc-asset id="orbit-camera" src="scripts/orbit-camera.mjs" preload></pc-asset>
<pc-asset id="shadow-catcher" src="scripts/shadow-catcher.mjs" preload></pc-asset>
<pc-asset id="lake-bed" src="assets/sky/dry-lake-bed-2k.hdr" preload></pc-asset>
<pc-asset id="t-rex" src="assets/t-rex.glb" preload></pc-asset>
<pc-asset id="t-rex" src="assets/models/t-rex.glb" preload></pc-asset>
<!-- Scene -->
<pc-scene>
<!-- Sky -->
Expand Down
Binary file removed examples/assets/frak.mp3
Binary file not shown.
Binary file added examples/assets/models/nyan-cat.glb
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added examples/assets/sounds/nyan-cat.mp3
Binary file not shown.
Binary file added examples/assets/sounds/nyan-catx.mp3
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/glb.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<pc-asset id="orbit-camera" src="scripts/orbit-camera.mjs" preload></pc-asset>
<pc-asset id="rotate" src="scripts/rotate.mjs" preload></pc-asset>
<pc-asset id="studio" src="assets/sky/octagon-lamps-photo-studio-2k.hdr" preload></pc-asset>
<pc-asset id="cube" src="assets/playcanvas-cube.glb" preload></pc-asset>
<pc-asset id="cube" src="assets/models/playcanvas-cube.glb" preload></pc-asset>
<!-- Scene -->
<pc-scene>
<!-- Sky -->
Expand Down
2 changes: 1 addition & 1 deletion examples/physics.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<pc-asset id="grid" src="scripts/grid.mjs" preload></pc-asset>
<pc-asset id="orbit-camera" src="scripts/orbit-camera.mjs" preload></pc-asset>
<pc-asset id="studio" src="assets/sky/octagon-lamps-photo-studio-2k.hdr" preload></pc-asset>
<pc-asset id="cube" src="assets/playcanvas-cube.glb" preload></pc-asset>
<pc-asset id="cube" src="assets/models/playcanvas-cube.glb" preload></pc-asset>
<!-- Scene -->
<pc-scene>
<!-- Sky -->
Expand Down
19 changes: 19 additions & 0 deletions examples/scripts/vr.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Add VR support
document.addEventListener('DOMContentLoaded', async () => {
const camera = await document.querySelector('pc-camera').ready();

if (camera.xrAvailable) {
const button = document.getElementById('xr-button');
button.style.display = 'block';

button.addEventListener('click', () => {
camera.startXr('immersive-vr', 'local-floor');
});

window.addEventListener('keydown', (event) => {
if (event.key === 'Escape') {
camera.endXr();
}
});
}
});
2 changes: 1 addition & 1 deletion examples/splat.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<pc-app>
<!-- Assets -->
<pc-asset id="orbit-camera" src="scripts/orbit-camera.mjs" preload></pc-asset>
<pc-asset id="angel" src="assets/angel.compressed.ply" preload></pc-asset>
<pc-asset id="angel" src="assets/splats/angel.compressed.ply" preload></pc-asset>
<pc-asset id="rotunda" src="assets/sky/sepulchral-chapel-rotunda-8k.webp" preload></pc-asset>
<!-- Scene -->
<pc-scene>
Expand Down

0 comments on commit 65e4fd3

Please sign in to comment.