diff --git a/src/data/bucket/line_attributes.js b/src/data/bucket/line_attributes.js index 563d0786c13..0fb8d61682e 100644 --- a/src/data/bucket/line_attributes.js +++ b/src/data/bucket/line_attributes.js @@ -13,5 +13,4 @@ export const linePatternAttributes = createLayout([ {name: 'a_pattern_to', components: 4, type: 'Float32'} ]); -export default lineLayoutAttributes; export const {members, size, alignment} = lineLayoutAttributes; diff --git a/src/data/program_configuration.js b/src/data/program_configuration.js index 94e9bde8be9..60fe1e53724 100644 --- a/src/data/program_configuration.js +++ b/src/data/program_configuration.js @@ -504,16 +504,16 @@ export default class ProgramConfiguration { } keys.push(`/u_${property}`); } else if (property.match(/line-pattern/)) { - const structArrayLayout = layoutType(property, type, 'source'); - self.binders[property] = new PatternCompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, structArrayLayout); + const StructArrayLayout = layoutType(property, type, 'source'); + self.binders[property] = new PatternCompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, StructArrayLayout); keys.push(`/p_${property}`); } else if (value.value.kind === 'source') { - const structArrayLayout = layoutType(property, type, 'source'); - self.binders[property] = new SourceExpressionBinder(value.value, names, type, structArrayLayout); + const StructArrayLayout = layoutType(property, type, 'source'); + self.binders[property] = new SourceExpressionBinder(value.value, names, type, StructArrayLayout); keys.push(`/a_${property}`); } else { - const structArrayLayout = layoutType(property, type, 'composite'); - self.binders[property] = new CompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, structArrayLayout); + const StructArrayLayout = layoutType(property, type, 'composite'); + self.binders[property] = new CompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, StructArrayLayout); keys.push(`/z_${property}`); } } diff --git a/src/render/image_atlas.js b/src/render/image_atlas.js index 07b1d98e266..b03a755a88a 100644 --- a/src/render/image_atlas.js +++ b/src/render/image_atlas.js @@ -51,6 +51,7 @@ export class ImagePosition { export default class ImageAtlas { image: RGBAImage; positions: {[string]: ImagePosition}; + uploaded: ?boolean; constructor(images: {[string]: StyleImage}) { const image = new RGBAImage({width: 0, height: 0}); diff --git a/src/source/tile.js b/src/source/tile.js index 99313153f43..378029831b2 100644 --- a/src/source/tile.js +++ b/src/source/tile.js @@ -224,9 +224,9 @@ class Tile { } const gl = context.gl; - - if (this.iconAtlas) { + if (this.iconAtlas && !this.iconAtlas.uploaded) { this.iconAtlasTexture = new Texture(context, this.iconAtlas.image, gl.RGBA); + this.iconAtlas.uploaded = true; } if (this.glyphAtlasImage) { diff --git a/src/style/properties.js b/src/style/properties.js index 0055a89fe9a..4341a15a2dd 100644 --- a/src/style/properties.js +++ b/src/style/properties.js @@ -624,8 +624,8 @@ export class CrossFadedDataDrivenProperty extends DataDrivenProperty parameters.zoomHistory.lastIntegerZoom ? - { from: min, to: mid, min: min, mid: mid, max: max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } : - { from: max, to: mid, min: min, mid: mid, max: max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction }; + { from: min, to: mid, min, mid, max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } : + { from: max, to: mid, min, mid, max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction }; } interpolate(a: PossiblyEvaluatedPropertyValue>): PossiblyEvaluatedPropertyValue> { @@ -666,8 +666,8 @@ export class CrossFadedProperty implements Property> { const fraction = z - Math.floor(z); const t = parameters.crossFadingFactor(); return z > parameters.zoomHistory.lastIntegerZoom ? - { from: min, to: mid, min: min, mid: mid, max: max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } : - { from: max, to: mid, min: min, mid: mid, max: max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction }; + { from: min, to: mid, min, mid, max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } : + { from: max, to: mid, min, mid, max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction }; } interpolate(a: ?CrossFaded): ?CrossFaded {