Skip to content

Commit

Permalink
add inputStreetmix function to global STREET also
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Feb 1, 2024
1 parent 6539209 commit 8500040
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="right-fixed">
<ul class="right-menu">
<li onclick="buttonScreenshotTock()"> <a class="camera" href="#"> <span> Capture image as PNG </span> <img src="ui_assets/camera-icon.svg"> </a></li>
<li onclick="inputStreetmix()"> <a class="load" href="#"> <span> Load Streetmix URL </span> <img src="ui_assets/streetmix-logo.svg"> </a></li>
<li onclick="STREET.utils.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>
</ul>
Expand Down
2 changes: 2 additions & 0 deletions src/json-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ function inputStreetmix () {
'""></a-entity>';
}

STREET.utils.inputStreetmix = inputStreetmix;

// JSON loading starts here
function getValidJSON (stringJSON) {
// Preserve newlines, etc. - use valid JSON
Expand Down

0 comments on commit 8500040

Please sign in to comment.