Skip to content

Commit

Permalink
working with new texture
Browse files Browse the repository at this point in the history
also revert bus
  • Loading branch information
kfarr committed Jan 17, 2024
1 parent abeb161 commit 6fa49c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/aframe-streetmix-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ function processSegments (segments, showStriping, length, globalAnimated, showVe
// add the safehits to the segment parent
segmentParentEl.append(safehitsParentEl);
repeatCount[0] = 1;
repeatCount[1] = parseInt(length);
repeatCount[1] = parseInt(length) / 4;
} else if (segments[i].type === 'divider' && variantList[0] === 'flowers') {
groundMixinId = 'grass';
segmentParentEl.append(createDividerVariant('flowers', clonedObjectRadius, 2.25));
Expand Down Expand Up @@ -913,17 +913,17 @@ function processSegments (segments, showStriping, length, globalAnimated, showVe
let reusableObjectStencilsParentEl;

reusableObjectStencilsParentEl = createStencilsParentElement({ y: elevationPosY + 0.015 });
cloneMixinAsChildren({ objectMixinId: 'stencils hash-left', parentEl: reusableObjectStencilsParentEl, rotation: '-90 ' + rotationY + ' 0', step: 50, radius: clonedObjectRadius });
cloneMixinAsChildren({ objectMixinId: 'stencils word-bus', parentEl: reusableObjectStencilsParentEl, rotation: '-90 ' + rotationY + ' 0', step: 50, radius: clonedObjectRadius });
// add this stencil stuff to the segment parent
segmentParentEl.append(reusableObjectStencilsParentEl);

reusableObjectStencilsParentEl = createStencilsParentElement({ y: elevationPosY + 0.015, z: 10 });
cloneMixinAsChildren({ objectMixinId: 'stencils hash-right', parentEl: reusableObjectStencilsParentEl, rotation: '-90 ' + rotationY + ' 0', step: 50, radius: clonedObjectRadius });
cloneMixinAsChildren({ objectMixinId: 'stencils word-taxi', parentEl: reusableObjectStencilsParentEl, rotation: '-90 ' + rotationY + ' 0', step: 50, radius: clonedObjectRadius });
// add this stencil stuff to the segment parent
segmentParentEl.append(reusableObjectStencilsParentEl);

reusableObjectStencilsParentEl = createStencilsParentElement({ y: elevationPosY + 0.015, z: 20 });
cloneMixinAsChildren({ objectMixinId: 'stencils hash-chevron', parentEl: reusableObjectStencilsParentEl, rotation: '-90 ' + rotationY + ' 0', step: 50, radius: clonedObjectRadius });
cloneMixinAsChildren({ objectMixinId: 'stencils word-only', parentEl: reusableObjectStencilsParentEl, rotation: '-90 ' + rotationY + ' 0', step: 50, radius: clonedObjectRadius });
// add this stencil stuff to the segment parent
segmentParentEl.append(reusableObjectStencilsParentEl);
} else if (segments[i].type === 'drive-lane') {
Expand Down
5 changes: 2 additions & 3 deletions src/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,14 @@ function buildAssetHTML (assetUrl, categories) {
<!-- segment mixins with textures -->
<img id="seamless-road" src="${assetUrl}materials/TexturesCom_Roads0086_1_seamless_S_rotate.jpg" crossorigin="anonymous">
<img id="seamless-bright-road" src="${assetUrl}materials/asphalthd_Base_Color.jpg" crossorigin="anonymous">
<img id="hatched-base" src="${assetUrl}materials/hatched_Base_Color.jpg" crossorigin="anonymous">
<img id="hatched-normal" src="${assetUrl}materials/hatched_Normal.jpg" crossorigin="anonymous">
<img id="seamless-sidewalk" src="${assetUrl}materials/TexturesCom_FloorsRegular0301_1_seamless_S.jpg" crossorigin="anonymous">
<img id="seamless-hatch-half" src="${assetUrl}materials/seamless-lane-with-hatch-half.jpg" crossorigin="anonymous">
<a-mixin shadow="cast: false" id="drive-lane" geometry="width:3;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:0.3 25;offset:0.55 0;src:#seamless-road;"></a-mixin>
<a-mixin shadow="cast: false" id="bright-lane" geometry="width:3;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:0.6 50;offset:0.55 0;src:#seamless-bright-road;color:#dddddd"></a-mixin>
<a-mixin shadow="cast: false" id="bike-lane" geometry="width:1.8;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:0.3 25;offset:0.55 0;metalness:0;src:#seamless-road;"></a-mixin>
<a-mixin shadow id="sidewalk" anisotropy geometry="width:3;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:1.5 75;src:#seamless-sidewalk;"></a-mixin>
<a-mixin shadow="cast: false" id="bus-lane" geometry="width:3;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:0.3 25;offset:0.55 0;src:#seamless-road;"></a-mixin>
<a-mixin shadow="cast: false" id="divider" geometry="width:0.3;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:1 150;offset:0.415 0;normalTextureOffset:0.415 0;src:#hatched-base;normalTextureRepeat:0.21 150;normalMap:#hatched-normal"></a-mixin>
<a-mixin shadow="cast: false" id="divider" geometry="width:0.3;height:150;primitive:plane" material="roughness:${surfacesRoughness};src:#seamless-hatch-half;"></a-mixin>
<a-mixin shadow="cast: false" id="grass" geometry="width:0.3;height:150;primitive:plane" material="roughness:${surfacesRoughness};repeat:1 150;offset:0.415 0;src:#grass-texture;"></a-mixin>
`,
'segment-colors': `
Expand Down

0 comments on commit 6fa49c8

Please sign in to comment.