-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into notify-methods-in-STREET
- Loading branch information
Showing
18 changed files
with
674 additions
and
181 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
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
<html> | ||
<head> | ||
<!-- aframe --> | ||
<script src="https://aframe.io/releases/1.4.2/aframe.min.js"></script> | ||
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script> | ||
|
||
<!-- 3dstreet --> | ||
<script src="./dist/aframe-street-component.js"></script> | ||
|
@@ -13,9 +13,6 @@ | |
<!-- save / load --> | ||
<script src="./src/json-utils.js"></script> | ||
|
||
<!-- ocean --> | ||
<script src="./src/components/ocean.js"></script> | ||
|
||
<!-- vr teleport controls --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/aframe-blink-controls.min.js"></script> | ||
|
||
|
@@ -44,6 +41,23 @@ | |
</head> | ||
|
||
<body> | ||
<!-- loading animation start --> | ||
<div class="loader__wrapper"> | ||
<div class="loader"> | ||
<div class="entities"> | ||
<img src="./ui_assets/loader/entities.svg" alt="entities" /> | ||
</div> | ||
<div class="transport"> | ||
<div class="wrapper__transport"> | ||
<img src="./ui_assets/loader/car.svg" class="car" alt="car" /> | ||
<img src="./ui_assets/loader/bus.svg" class="bus" alt="bus" /> | ||
<img src="./ui_assets/loader/bike.svg" class="bike" alt="bike" /> | ||
</div> | ||
</div> | ||
<div class="road">Loading 3DStreet</div> | ||
</div> | ||
</div> | ||
|
||
<!-- viewer ui start --> | ||
<div class="viewer-header-wrapper"> | ||
<button class="viewer-logo-start-editor-button" onclick="startEditor()"> | ||
|
@@ -57,15 +71,11 @@ | |
<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.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; enterARButton: #custom-enter-ar-button;" | ||
vr-mode-ui-if-headset | ||
renderer="colorManagement: true; physicallyCorrectLights: true;" | ||
renderer="colorManagement: true; physicallyCorrectLights: true; anisotropy: 16;" | ||
inspector="url: //3dstreet.app/dist/3dstreet-editor.js" | ||
notify | ||
metadata | ||
|
@@ -78,11 +88,11 @@ | |
<!-- uncomment the line below to load all possible asset categories --> | ||
<!-- <street-assets categories="sidewalk-props people people-rigged vehicles vehicles-rigged buildings intersection-props segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets> --> | ||
<!-- a reduced set of assets for non-animated streetmix streets without intersections --> | ||
<street-assets categories="loud-bicycle sidewalk-props people-rigged vehicles vehicles-rigged buildings segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets> | ||
<street-assets categories="loud-bicycle sidewalk-props people vehicles vehicles-rigged buildings segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets> | ||
</a-assets> | ||
|
||
<a-entity id="street-container" data-layer-name="3D Street Layers" data-layer-show-children> | ||
<a-entity id="default-street" street="length: 60; globalAnimated: true;" streetmix-loader set-loader-from-hash></a-entity> | ||
<a-entity id="default-street" street streetmix-loader set-loader-from-hash></a-entity> | ||
</a-entity> | ||
|
||
<a-entity id="reference-layers" data-layer-name="Reference Layers" data-layer-show-children></a-entity> | ||
|
@@ -98,21 +108,23 @@ | |
|
||
</a-scene> | ||
</body> | ||
<script> | ||
/* loading animation script */ | ||
document.addEventListener('DOMContentLoaded', function () { | ||
const scene = document.querySelector('a-scene'); | ||
const splash = document.querySelector('.loader__wrapper'); | ||
scene.addEventListener('loaded', function (e) { | ||
setTimeout(() => { | ||
splash.style.display = 'none'; | ||
}, 1000); | ||
}); | ||
}); | ||
</script> | ||
<script> | ||
|
||
document.getElementById('inputfile') | ||
.addEventListener('change', fileJSON); | ||
|
||
// only show VR button if headset connected | ||
AFRAME.registerComponent('vr-mode-ui-if-headset', { | ||
dependencies: ['vr-mode-ui'], | ||
init: function () { | ||
if (!AFRAME.utils.device.checkHeadsetConnected()) { | ||
this.el.setAttribute('vr-mode-ui', 'enabled', false); | ||
} | ||
} | ||
}) | ||
|
||
function buttonScreenshotTock() { | ||
const screenshotEl = document.getElementById('screenshot'); | ||
screenshotEl.play(); // double check playing in case we're in editor mode | ||
|
Oops, something went wrong.