Skip to content

Commit

Permalink
Merge pull request #624 from 3DStreet/3dtiles-load-fixing
Browse files Browse the repository at this point in the history
fix 3dtiles loading
  • Loading branch information
kfarr authored Jun 14, 2024
2 parents 004c2f4 + d2268f3 commit 91d59ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/street-geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@ AFRAME.registerComponent('street-geo', {
copyrightEl: '#map-copyright'
});
google3dElement.classList.add('autocreated');

if (AFRAME.INSPECTOR && AFRAME.INSPECTOR.opened) {
// emit play event to start loading tiles in Editor mode
google3dElement.addEventListener(
'loaded',
() => {
google3dElement.play();
},
{ once: true }
);
}
google3dElement.setAttribute('data-ignore-raycaster', '');
el.appendChild(google3dElement);
self['google3d'] = google3dElement;
Expand Down

0 comments on commit 91d59ff

Please sign in to comment.