-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge main into sweep/use-aframe-anisotropy
- Loading branch information
Showing
8 changed files
with
104 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ The 3DStreet codebase is offered under the GNU Affero General Public License v3, | |
|
||
Assets such as 3D models, textures, and audio are offered under the [Creative Commons By Attribution Non-Commercial License](https://creativecommons.org/licenses/by-nc/4.0/), unless a more specific license is specified for each asset in the documentation on this page. | ||
|
||
Contact [[email protected]](mailto:[email protected]) for commercial licensing. | ||
Contact [[email protected]](mailto:[email protected]) for commercial licensing. | ||
|
||
### Developer Docs | ||
See [this link for more information](src/README.md) about the custom components developed and modified for the project. | ||
|
@@ -184,4 +184,7 @@ See [this link for more information](src/README.md) about the custom components | |
* Tram pass https://www.soundsnap.com/tram_pass_by_fast_wav | ||
* Historic streetcar pass https://www.soundsnap.com/streetcar_passing_by_smoothly | ||
|
||
### Skybox credits | ||
* Most skybox images (c) Polyhaven CC0 license polyhaven.com [individual credits](https://github.com/3DStreet/3dstreet/issues/360#issue-1910580549) | ||
|
||
<img src="https://raw.githubusercontent.com/kfarr/3dstreet/master/ui_assets/streetmix3d-banner.jpg" /> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,27 @@ | |
<!-- ocean --> | ||
<script src="./src/components/ocean-plane.js"></script> | ||
|
||
<!-- vr teleport controls --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/aframe-blink-controls.min.js"></script> | ||
|
||
<script> | ||
// this makes the same camera rig setup work in VR and desktop modes | ||
// this could be a new component, such as "swap desktop and vr controls" and put in init section | ||
window.addEventListener("DOMContentLoaded", function() { | ||
const sceneEl = document.querySelector("a-scene"); | ||
sceneEl.addEventListener("enter-vr", function() { | ||
document.querySelector('#cameraRig').removeAttribute('look-controls') | ||
document.querySelector('#cameraRig').removeAttribute('wasd-controls') | ||
document.querySelector('#cameraRig').removeAttribute('cursor-teleport') | ||
document.querySelector('#cameraRig').setAttribute('position', '0 0 0') | ||
}); | ||
sceneEl.addEventListener("exit-vr", function() { | ||
document.querySelector('#cameraRig').setAttribute('cursor-teleport', "cameraRig: #cameraRig; cameraHead: #camera;") | ||
document.querySelector('#cameraRig').setAttribute('look-controls', "reverseMouseDrag: true;") | ||
document.querySelector('#cameraRig').setAttribute('wasd-controls', "enabled: true") | ||
}); | ||
}) | ||
</script> | ||
<title>3DStreet</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="icon" type="image/x-icon" href="ui_assets/favicon.ico"> | ||
|
@@ -36,17 +57,19 @@ | |
<li onclick="inputStreetmix()"> <a class="load" href="#"> <span> Load Streetmix URL </span> <img src="ui_assets/streetmix-logo.svg"> </a></li> | ||
<!-- <li onclick="inputJSON()"> <a class="load" href="#"> <span> Load JSON String </span> <img src="assets/ui_assets/upload-icon.svg"> </a></li> --> | ||
<li><a class="load"> <label for="inputfile" style="display: inherit; align-items: center; cursor: pointer"> <input type="file" id="inputfile" style="display:none" accept=".js, .json, .txt"> <span> Load JSON File </span> <img src="ui_assets/upload-icon.svg"></label></a></li> | ||
<li> <a id="custom-enter-vr-button" class="vr" href="#"> <span class="vr">Enter VR mode</span> <img src="ui_assets/vr-icon.svg"> </a></li> | ||
<li> <a id="custom-enter-vr-button" class="vr" href="#"> <span class="vr">Enter VR mode</span> <img src="ui_assets/vr.svg"> </a></li> | ||
<li> <a id="custom-enter-ar-button" class="ar" href="#"> <span class="ar">Enter AR mode</span> <img src="ui_assets/ar.svg"> </a></li> | ||
</ul> | ||
</div> | ||
|
||
<a-scene | ||
vr-mode-ui="enterVRButton: #custom-enter-vr-button;" | ||
vr-mode-ui="enterVRButton: #custom-enter-vr-button; enterARButton: #custom-enter-ar-button;" | ||
vr-mode-ui-if-headset | ||
renderer="colorManagement: true; physicallyCorrectLights: true; anisotropy: 16" | ||
inspector="url: //3dstreet.app/dist/3dstreet-editor.js" | ||
notify | ||
metadata | ||
scene-title | ||
> | ||
<a-assets> | ||
<!-- uncomment the line below to load assets from local github submodule --> | ||
|
@@ -59,8 +82,8 @@ | |
|
||
<a-entity id="cameraRig" position="0 10 30" data-layer-name="Viewer" cursor-teleport="cameraRig: #cameraRig; cameraHead: #camera;" look-controls="reverseMouseDrag: true" wasd-controls="enabled: true"> | ||
<a-entity id="camera" camera="far: 1000" position="0 1.6 0" ></a-entity> | ||
<a-entity id="leftHand" hand-controls="hand: left; handModelStyle: lowPoly; color: #ffccff"></a-entity> | ||
<a-entity id="rightHand" hand-controls="hand: right; handModelStyle: lowPoly; color: #ffccff"></a-entity> | ||
<a-entity id="leftHand" hand-controls="hand: left;" blink-controls="cameraRig: #cameraRig; teleportOrigin: #camera; rotateOnTeleport:false;"></a-entity> | ||
<a-entity id="rightHand" hand-controls="hand: right" blink-controls="cameraRig: #cameraRig; teleportOrigin: #camera; rotateOnTeleport:false;"></a-entity> | ||
<a-entity id="screenshot" class="no-pause" screentock visible="false"></a-entity> | ||
</a-entity> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.