Skip to content
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

rename layers-2 entity #326

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<a-entity id="default-street" street streetmix-loader set-loader-from-hash></a-entity>
</a-entity>

<a-entity id="layers-2d" data-layer-name="2D Street Layers" data-layer-show-children>
<a-entity id="reference-layers" data-layer-name="Reference Layers" data-layer-show-children>

</a-scene>
</body>
Expand Down
2 changes: 1 addition & 1 deletion mapbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

</a-entity>

<a-entity id="layers-2d" data-layer-name="2D Street Layers" data-layer-show-children>
<a-entity id="reference-layers" data-layer-name="Reference Layers" data-layer-show-children>
<a-entity
data-layer-name="Mapbox Satellite Streets"
geometry="primitive: plane; width: 512; height: 512;"
Expand Down
6 changes: 3 additions & 3 deletions src/json-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ and returns a Javascript object
function convertDOMElToObject (entity) {
const data = [];
const environmentElement = document.querySelector('#environment');
const layers2DElement = document.querySelector('#layers-2d');
const sceneEntities = [entity, environmentElement, layers2DElement];
const referenceEntities = document.querySelector('#reference-layers');
const sceneEntities = [entity, environmentElement, referenceEntities];

for (const entry of sceneEntities) {
const entityData = getElementData(entry);
Expand Down Expand Up @@ -285,7 +285,7 @@ function getModifiedProperty (entity, componentName) {

function createEntities (entitiesData, parentEl) {
const sceneElement = document.querySelector('a-scene');
const removeEntities = ['environment', 'layers-2d'];
const removeEntities = ['environment', 'reference-layers'];
for (const entityData of entitiesData) {
if (entityData.id === 'street-container' &&
entityData.children &&
Expand Down
Loading