-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
also add google maps to alpha labs
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 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 |
---|---|---|
|
@@ -80,4 +80,22 @@ newEl.setAttribute('data-layer-name', 'Plane Geometry • Traffic Circle Asphalt | |
newEl.setAttribute('material', 'src: #asphalt-texture; repeat: 5 5;') | ||
parentEl = document.querySelector('#street-container') | ||
parentEl.appendChild(newEl) | ||
``` | ||
|
||
## Google 3D Map Tiles | ||
|
||
This code snippet adds an entity to load and display 3d tiles from Google Maps Tiles API 3D Tiles endpoint. This will break your scene and you cannot save it yet, so beware before testing. | ||
|
||
``` | ||
document.body.appendChild(document.createElement('script')).src = 'https://cdn.jsdelivr.net/npm/[email protected]/src/lib/aframe-loader-3dtiles-component.min.js'; | ||
document.querySelector('#reference-layers').innerHTML = ` | ||
<a-entity id="tileset" data-no-pause | ||
data-layer-name="Aerial Imagery • Google 3D Tiles" | ||
loader-3dtiles=" | ||
lat: 37.77522354250163; | ||
long: -122.41931773049723; | ||
height: -16.5; | ||
url: https://tile.googleapis.com/v1/3dtiles/root.json; googleApiKey: AIzaSyAQshwLVKTpwTfPJxFEkEzOdP_cgmixTCQ; geoTransform: WGS84Cartesian; maximumSSE: 48; maximumMem: 400; cameraEl: #camera"> | ||
</a-entity>` | ||
document.querySelector('#tileset').play() | ||
``` |
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