Skip to content

Commit

Permalink
do not allow transform of intersection children
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Dec 7, 2024
1 parent e4f56e5 commit 8de7d73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/intersection.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ AFRAME.registerComponent('intersection', {
`repeat: ${repeatCountInter[0]} ${repeatCountInter[1]}`
);
sd.setAttribute('data-layer-name', 'Sidewalk • ' + displayName);
sd.setAttribute('data-no-transform', '');
el.appendChild(sd);
}

Expand Down Expand Up @@ -237,6 +238,7 @@ AFRAME.registerComponent('intersection', {
stopSignEl.setAttribute('mixin', 'stop_sign');
stopSignEl.classList.add('autocreated');
stopSignEl.setAttribute('data-layer-name', 'Traffic Control • Stop Sign');
stopSignEl.setAttribute('data-no-transform');
return stopSignEl;
}

Expand Down Expand Up @@ -331,6 +333,7 @@ AFRAME.registerComponent('intersection', {
trafficSignalEl.setAttribute('position', params[side].position);
trafficSignalEl.setAttribute('rotation', params[side].rotation);
trafficSignalEl.setAttribute('mixin', `signal_${side}`);
trafficSignalEl.setAttribute('data-no-transform', '');
trafficSignalEl.classList.add('autocreated');
trafficSignalEl.setAttribute(
'data-layer-name',
Expand All @@ -354,6 +357,7 @@ AFRAME.registerComponent('intersection', {
cw1.setAttribute('scale', { y: intersectDepth / 12 });
cw1.setAttribute('mixin', 'markings crosswalk-zebra');
cw1.setAttribute('data-layer-name', 'Crosswalk • West');
cw1.setAttribute('data-no-transform', '');
cw1.classList.add('autocreated');
el.appendChild(cw1);
}
Expand All @@ -364,6 +368,7 @@ AFRAME.registerComponent('intersection', {
cw2.setAttribute('scale', { y: intersectDepth / 12 });
cw2.setAttribute('mixin', 'markings crosswalk-zebra');
cw2.setAttribute('data-layer-name', 'Crosswalk • East');
cw2.setAttribute('data-no-transform', '');
cw2.classList.add('autocreated');
el.appendChild(cw2);
}
Expand All @@ -374,13 +379,15 @@ AFRAME.registerComponent('intersection', {
cw3.setAttribute('scale', { y: intersectWidth / 12 });
cw3.setAttribute('mixin', 'markings crosswalk-zebra');
cw3.setAttribute('data-layer-name', 'Crosswalk • North');
cw3.setAttribute('data-no-transform', '');
cw3.classList.add('autocreated');
el.appendChild(cw3);
}
if (crosswalklArray[3]) {
const cw4 = document.createElement('a-entity');
cw4.setAttribute('position', { y: -intersectDepth / 2 + 2, z: 0.11 });
cw4.setAttribute('data-layer-name', 'Crosswalk • South');
cw4.setAttribute('data-no-transform', '');
cw4.setAttribute('rotation', { x: 0, y: 0, z: 90 });
cw4.setAttribute('scale', { y: intersectWidth / 12 });
cw4.setAttribute('mixin', 'markings crosswalk-zebra');
Expand Down

0 comments on commit 8de7d73

Please sign in to comment.