Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #410 from 3DStreet/fix-camera-tiles
Browse files Browse the repository at this point in the history
fix camera tiles
  • Loading branch information
kfarr authored Mar 29, 2024
2 parents 4c66ecd + d4fe1f3 commit f69542d
Show file tree
Hide file tree
Showing 6 changed files with 15,896 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/3dstreet-editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/3dstreet-editor.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>

<!-- 3dstreet -->
<script src="https://cdn.jsdelivr.net/npm/[email protected].11/dist/aframe-street-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].12/dist/aframe-street-component.min.js"></script>

<!-- user controls - vr teleport -->

<!-- mapbox -->
<script src="https://github.3dstreet.org/src/lib/aframe-mapbox-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/3dstreet@0.4.12/src/lib/aframe-mapbox-component.min.js"></script>

<!-- 3d tiles -->
<script src="./src/lib/aframe-loader-3dtiles-component.min.js"></script>

<title>3DStreet</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico" />
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ Inspector.prototype = {
this.sceneEl.resize();
Shortcuts.disable();
document.activeElement.blur();

// quick solution to change 3d tiles camera
const tilesElem = document.querySelector('a-entity[loader-3dtiles]');
if (tilesElem) {
tilesElem.emit('cameraChange', AFRAME.scenes[0].camera);
}
}
};

Expand Down
Loading

0 comments on commit f69542d

Please sign in to comment.