Webgl / minor function renaming

This commit is contained in:
Olivier Guyot
2019-05-15 11:29:54 +02:00
parent c705775d75
commit e11e3c5f6e
3 changed files with 13 additions and 13 deletions

View File

@@ -61,7 +61,7 @@ class WebGLLayerRenderer extends LayerRenderer {
/**
* Pushes vertices and indices in the given buffers using the geometry coordinates and the following properties
* Pushes vertices and indices to the given buffers using the geometry coordinates and the following properties
* from the feature:
* - `color`
* - `opacity`
@@ -79,13 +79,13 @@ class WebGLLayerRenderer extends LayerRenderer {
* feature and pushed in the buffer in the given order. Note: attributes can only be numerical! Any other type or
* NaN will result in `0` being pushed in the buffer.
*/
export function pushFeatureInBuffer(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes) {
export function pushFeatureToBuffer(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes) {
if (!geojsonFeature.geometry) {
return;
}
switch (geojsonFeature.geometry.type) {
case 'Point':
pushPointGeomInBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes);
pushPointFeatureToBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes);
return;
default:
return;
@@ -102,7 +102,7 @@ const tmpArray_ = [];
* @param {Array<string>} [opt_attributes] Custom attributes
* @private
*/
function pushPointGeomInBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes) {
function pushPointFeatureToBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes) {
const stride = 12 + (opt_attributes !== undefined ? opt_attributes.length : 0);
const x = geojsonFeature.geometry.coordinates[0];