Skip to content

Commit

Permalink
Merge branch 'new-street-parser-structure' of https://github.com/3DSt…
Browse files Browse the repository at this point in the history
…reet/3dstreet into new-street-parser-structure
  • Loading branch information
Algorush committed Nov 4, 2023
2 parents 41b1c03 + bcf6fff commit 4e116f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@
<street-assets categories="loud-bicycle sidewalk-props people vehicles vehicles-rigged buildings segment-textures segment-colors lane-separator stencils vehicles-transit dividers sky grounds"></street-assets>
</a-assets>

<a-entity id="street-container" data-layer-name="3D Street Layers" data-layer-show-children>
<a-entity id="default-street" street streetmix-loader set-loader-from-hash></a-entity>
</a-entity>

<a-entity id="reference-layers" data-layer-name="Reference Layers" data-layer-show-children></a-entity>

<a-entity id="environment" data-layer-name="Environment" street-environment="preset: day;"></a-entity>

<a-entity id="cameraRig" position="0 10 30" data-layer-name="Viewer" cursor-teleport="cameraRig: #cameraRig; cameraHead: #camera;" look-controls="reverseMouseDrag: true" wasd-controls="enabled: true">
<a-entity id="camera" camera="far: 1000" position="0 1.6 0" ></a-entity>
<a-entity id="leftHand" hand-controls="hand: left;" blink-controls="cameraRig: #cameraRig; teleportOrigin: #camera; rotateOnTeleport:false;"></a-entity>
<a-entity id="rightHand" hand-controls="hand: right" blink-controls="cameraRig: #cameraRig; teleportOrigin: #camera; rotateOnTeleport:false;"></a-entity>
<a-entity id="screenshot" class="no-pause" screentock visible="false"></a-entity>
</a-entity>

<a-entity id="environment" data-layer-name="Environment" street-environment="preset: day;"></a-entity>

<a-entity id="street-container" data-layer-name="3D Street Layers" data-layer-show-children>
<a-entity id="default-street" street streetmix-loader set-loader-from-hash></a-entity>
</a-entity>

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

</a-scene>
</body>
<script>
Expand Down
1 change: 1 addition & 0 deletions src/aframe-streetmix-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ function processSegments (segments, showStriping, length, globalAnimated, showVe
// create and center offset to center the street around global x position of 0
var streetParentEl = createCenteredStreetElement(segments);
streetParentEl.classList.add('street-parent');
streetParentEl.setAttribute('data-layer-name', 'Street Segment Container');

var cumulativeWidthInMeters = 0;
for (var i = 0; i < segments.length; i++) {
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ AFRAME.registerComponent('streetmix-loader', {
console.log('therefore setting metadata sceneTitle as streetmixName', streetmixName);
}

el.setAttribute('data-layer-name', 'Streetmix: ' + streetmixName);

if (data.showBuildings) {
el.setAttribute('street', 'right', streetmixResponseObject.data.street.rightBuildingVariant);
el.setAttribute('street', 'left', streetmixResponseObject.data.street.leftBuildingVariant);
Expand Down

0 comments on commit 4e116f5

Please sign in to comment.