Skip to content

Commit

Permalink
clean dynamic mode init
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Dec 3, 2024
1 parent 67b1c81 commit 827f17c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/display/src/displays/webgl/buffer/FeatureFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {GradientFactory} from '../GradientFactory';
import {HeatmapBuffer} from './templates/HeatmapBuffer';
import {TextureAtlasManager} from '../TextureAtlasManager';
import {LineBuffer} from './templates/LineBuffer';
import {Color as ColorUtils, Expression} from '@here/xyz-maps-common';
import {Color as ColorUtils, Expression, ExpressionMode} from '@here/xyz-maps-common';

const {toRGB} = ColorUtils;
type RGBA = ColorUtils.RGBA;
Expand Down Expand Up @@ -136,7 +136,7 @@ export type GroupMap = { [zIndex: string]: ZDrawGroup };
export const isDynamicProperty = (prop: any) => prop instanceof Expression;
// const isDynamicProperty = (prop: any) => typeof prop == 'function';

const DYNAMIC_MODE = 1;
const DYNAMIC_MODE = ExpressionMode.dynamic;
const PIXEL_UNITS = ['px', 'px'];

export class FeatureFactory {
Expand Down
4 changes: 0 additions & 4 deletions packages/display/src/displays/webgl/buffer/createBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,10 @@ const createBuffer = (
if (shared.strokeDasharray) {
geoBuffer.type = 'DashedLine';

// if (isDynamicProperty(shared.strokeDasharray)) {
// geoBuffer.addUniform('u_dashUnit', [0, 0]);
// } else {
geoBuffer.addUniform('u_dashUnit', [
shared.strokeDasharray.units[0] == 'm' ? meterToPixel : 0,
shared.strokeDasharray.units[1] == 'm' ? meterToPixel : 0
]);
// }
}
// scissor un-clipped geometry in any case...(huge geometry possible)
// otherwise clipping can be skipped to avoid strokeWidth cutoffs close to tile edges
Expand Down

0 comments on commit 827f17c

Please sign in to comment.