Skip to content

Commit

Permalink
rename program configuration methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Nov 7, 2016
1 parent 01dc4fe commit 382f70a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/data/program_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class ProgramConfiguration {
const name = attribute.name.slice(2);

if (layer.isPaintValueFeatureConstant(attribute.property)) {
self.addZoomDrivenAttribute(name, attribute);
self.addZoomAttribute(name, attribute);
} else if (layer.isPaintValueZoomConstant(attribute.property)) {
self.addDataDrivenAttribute(name, attribute);
self.addPropertyAttribute(name, attribute);
} else {
self.addDataAndZoomDrivenAttribute(name, attribute, layer, zoom);
self.addZoomAndPropertyAttribute(name, attribute, layer, zoom);
}
}
self.PaintVertexArray = createVertexArrayType(self.attributes);
Expand All @@ -67,12 +67,12 @@ class ProgramConfiguration {
this.cacheKey += `/u_${name}`;
}

addZoomDrivenAttribute(name, attribute) {
addZoomAttribute(name, attribute) {
this.uniforms.push(attribute);
this.addUniform(name, attribute.name);
}

addDataDrivenAttribute(name, attribute) {
addPropertyAttribute(name, attribute) {
const pragmas = this.getPragmas(name);

this.attributes.push(attribute);
Expand All @@ -85,7 +85,7 @@ class ProgramConfiguration {
this.cacheKey += `/a_${name}`;
}

addDataAndZoomDrivenAttribute(name, attribute, layer, zoom) {
addZoomAndPropertyAttribute(name, attribute, layer, zoom) {
const pragmas = this.getPragmas(name);

pragmas.define.push(`varying {precision} {type} ${name};`);
Expand Down

0 comments on commit 382f70a

Please sign in to comment.