-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call json-utils.js from index.js #468
Merged
kfarr
merged 7 commits into
mapbox-and-custom-svg-epic
from
load-jsonutils-from-indexjs
Feb 23, 2024
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6539209
call json-utils.js from index.js
Algorush 8500040
add inputStreetmix function to global STREET also
Algorush 05fc582
add createEntities function to STREET global
Algorush 4e9deaa
remove unnecessary attributes from filterJSONstreet func
Algorush 9e3943f
call json-utils function from STREET.utils (inside component)
Algorush 0212fb5
change filterJSON function for correct save/load
Algorush 1fdb988
Merge branch 'mapbox-and-custom-svg-epic' into load-jsonutils-from-in…
kfarr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -10,9 +10,6 @@ | |
<!-- mapbox --> | ||
<script src="./src/lib/aframe-mapbox-component.min.js"></script> | ||
|
||
<!-- save / load --> | ||
<script src="./src/json-utils.js"></script> | ||
|
||
<!-- vr teleport controls --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/aframe-blink-controls.min.js"></script> | ||
|
||
|
@@ -68,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> | ||
|
@@ -123,7 +120,7 @@ | |
<script> | ||
|
||
document.getElementById('inputfile') | ||
.addEventListener('change', fileJSON); | ||
.addEventListener('change', STREET.utils.fileJSON); | ||
|
||
function buttonScreenshotTock() { | ||
const screenshotEl = document.getElementById('screenshot'); | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this function called from 3dstreet editor? it may cause this error
https://github.com/3DStreet/3dstreet-editor/blob/f763a949ce4cd643573ac7f3f7e321d8bbfa8c6a/src/components/scenegraph/Toolbar.js#L130C26-L130C37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is why this PR should be applied to editor after to prevent that error:
3DStreet/3dstreet-editor#387