From 883f0c697292fe46e3cd4a84de912c587c981c17 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Sat, 11 Nov 2023 18:14:59 -0800 Subject: [PATCH] add support for arcade and compound-wall --- src/aframe-streetmix-parsers.js | 15 ++++++++++++--- src/assets.js | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/aframe-streetmix-parsers.js b/src/aframe-streetmix-parsers.js index 6fe2952f4..68dcde30e 100644 --- a/src/aframe-streetmix-parsers.js +++ b/src/aframe-streetmix-parsers.js @@ -1143,6 +1143,8 @@ function processBuildings (left, right, streetWidth, showGround, length) { residential: 'ground-grass-material', narrow: 'ground-asphalt-material', wide: 'ground-asphalt-material', + arcade: 'ground-tiled-concrete-material', + 'compound-wall': 'ground-asphalt-material' } if (currentValue === 'waterfront') { @@ -1208,15 +1210,22 @@ function processBuildings (left, right, streetWidth, showGround, length) { newBuildings.setAttribute('position', buildingPos); buildingElement.append(newBuildings); - if (currentValue === 'waterfront') { + if (currentValue === 'waterfront' || currentValue === 'compound-wall') { const objectPositionX = buildingPositionX - (sideMultiplier * 150 / 2); const placedObjectEl = document.createElement('a-entity'); placedObjectEl.setAttribute('class', 'seawall-parent'); - placedObjectEl.setAttribute('position', objectPositionX + ' 0 4.5'); // position="1.043 0.100 -3.463" + placedObjectEl.setAttribute('position', {x: objectPositionX, z: 4.5}); // position="1.043 0.100 -3.463" + let rotationCloneY; + if (currentValue === 'compound-wall') { + placedObjectEl.setAttribute('position', {y: 3}); + placedObjectEl.setAttribute('position', {x: objectPositionX + 1.5 * sideMultiplier}); + rotationCloneY = (side === 'left') ? 90 : -90; + } else { + rotationCloneY = (side === 'left') ? -90 : 90; + } placedObjectEl.classList.add('seawall-parent-' + side); buildingElement.appendChild(placedObjectEl); // clone a bunch of seawalls under the parent - const rotationCloneY = (side === 'left') ? -90 : 90; cloneMixinAsChildren({ objectMixinId: 'seawall', parentEl: placedObjectEl, rotation: '0 ' + rotationCloneY + ' 0', step: 15, radius: clonedObjectRadius }); } diff --git a/src/assets.js b/src/assets.js index 5459de942..1d1e3e101 100644 --- a/src/assets.js +++ b/src/assets.js @@ -217,7 +217,7 @@ function buildAssetHTML (assetUrl, categories) { - +