Rename _ol_render_webgl_Replay_ to WebGLReplay

This commit is contained in:
Frederic Junod
2018-01-15 10:02:37 +01:00
parent 0f313f4d69
commit f89d82088a
6 changed files with 27 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ import _ol_obj_ from '../../obj.js';
import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
import _ol_render_webgl_circlereplay_defaultshader_ from '../webgl/circlereplay/defaultshader.js';
import _ol_render_webgl_circlereplay_defaultshader_Locations_ from '../webgl/circlereplay/defaultshader/Locations.js';
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_render_webgl_ from '../webgl.js';
import _ol_webgl_ from '../../webgl.js';
import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
@@ -22,7 +22,7 @@ import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
* @struct
*/
const WebGLCircleReplay = function(tolerance, maxExtent) {
_ol_render_webgl_Replay_.call(this, tolerance, maxExtent);
WebGLReplay.call(this, tolerance, maxExtent);
/**
* @private
@@ -68,7 +68,7 @@ const WebGLCircleReplay = function(tolerance, maxExtent) {
};
inherits(WebGLCircleReplay, _ol_render_webgl_Replay_);
inherits(WebGLCircleReplay, WebGLReplay);
/**

View File

@@ -10,7 +10,7 @@ import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
import _ol_geom_flat_topology_ from '../../geom/flat/topology.js';
import _ol_obj_ from '../../obj.js';
import _ol_render_webgl_ from '../webgl.js';
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_render_webgl_linestringreplay_defaultshader_ from '../webgl/linestringreplay/defaultshader.js';
import _ol_render_webgl_linestringreplay_defaultshader_Locations_ from '../webgl/linestringreplay/defaultshader/Locations.js';
import _ol_webgl_ from '../../webgl.js';
@@ -24,7 +24,7 @@ import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
* @struct
*/
const _ol_render_webgl_LineStringReplay_ = function(tolerance, maxExtent) {
_ol_render_webgl_Replay_.call(this, tolerance, maxExtent);
WebGLReplay.call(this, tolerance, maxExtent);
/**
* @private
@@ -68,7 +68,7 @@ const _ol_render_webgl_LineStringReplay_ = function(tolerance, maxExtent) {
};
inherits(_ol_render_webgl_LineStringReplay_, _ol_render_webgl_Replay_);
inherits(_ol_render_webgl_LineStringReplay_, WebGLReplay);
/**

View File

@@ -12,7 +12,7 @@ import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
import _ol_render_webgl_polygonreplay_defaultshader_ from '../webgl/polygonreplay/defaultshader.js';
import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../webgl/polygonreplay/defaultshader/Locations.js';
import _ol_render_webgl_LineStringReplay_ from '../webgl/LineStringReplay.js';
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_render_webgl_ from '../webgl.js';
import Stroke from '../../style/Stroke.js';
import LinkedList from '../../structs/LinkedList.js';
@@ -28,7 +28,7 @@ import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
* @struct
*/
const _ol_render_webgl_PolygonReplay_ = function(tolerance, maxExtent) {
_ol_render_webgl_Replay_.call(this, tolerance, maxExtent);
WebGLReplay.call(this, tolerance, maxExtent);
this.lineStringReplay = new _ol_render_webgl_LineStringReplay_(
tolerance, maxExtent);
@@ -63,7 +63,7 @@ const _ol_render_webgl_PolygonReplay_ = function(tolerance, maxExtent) {
};
inherits(_ol_render_webgl_PolygonReplay_, _ol_render_webgl_Replay_);
inherits(_ol_render_webgl_PolygonReplay_, WebGLReplay);
/**

View File

@@ -16,7 +16,7 @@ import _ol_webgl_ from '../../webgl.js';
* @param {ol.Extent} maxExtent Max extent.
* @struct
*/
const _ol_render_webgl_Replay_ = function(tolerance, maxExtent) {
const WebGLReplay = function(tolerance, maxExtent) {
VectorContext.call(this);
/**
@@ -113,7 +113,7 @@ const _ol_render_webgl_Replay_ = function(tolerance, maxExtent) {
};
inherits(_ol_render_webgl_Replay_, VectorContext);
inherits(WebGLReplay, VectorContext);
/**
@@ -121,14 +121,14 @@ inherits(_ol_render_webgl_Replay_, VectorContext);
* @param {ol.webgl.Context} context WebGL context.
* @return {function()} Delete resources function.
*/
_ol_render_webgl_Replay_.prototype.getDeleteResourcesFunction = function(context) {};
WebGLReplay.prototype.getDeleteResourcesFunction = function(context) {};
/**
* @abstract
* @param {ol.webgl.Context} context Context.
*/
_ol_render_webgl_Replay_.prototype.finish = function(context) {};
WebGLReplay.prototype.finish = function(context) {};
/**
@@ -143,7 +143,7 @@ _ol_render_webgl_Replay_.prototype.finish = function(context) {};
ol.render.webgl.polygonreplay.defaultshader.Locations|
ol.render.webgl.texturereplay.defaultshader.Locations} Locations.
*/
_ol_render_webgl_Replay_.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
/**
@@ -155,7 +155,7 @@ _ol_render_webgl_Replay_.prototype.setUpProgram = function(gl, context, size, pi
ol.render.webgl.polygonreplay.defaultshader.Locations|
ol.render.webgl.texturereplay.defaultshader.Locations} locations Locations.
*/
_ol_render_webgl_Replay_.prototype.shutDownProgram = function(gl, locations) {};
WebGLReplay.prototype.shutDownProgram = function(gl, locations) {};
/**
@@ -167,7 +167,7 @@ _ol_render_webgl_Replay_.prototype.shutDownProgram = function(gl, locations) {};
* to skip.
* @param {boolean} hitDetection Hit detection mode.
*/
_ol_render_webgl_Replay_.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {};
WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {};
/**
@@ -183,7 +183,7 @@ _ol_render_webgl_Replay_.prototype.drawReplay = function(gl, context, skippedFea
* @return {T|undefined} Callback result.
* @template T
*/
_ol_render_webgl_Replay_.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {};
WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {};
/**
@@ -199,7 +199,7 @@ _ol_render_webgl_Replay_.prototype.drawHitDetectionReplayOneByOne = function(gl,
* @return {T|undefined} Callback result.
* @template T
*/
_ol_render_webgl_Replay_.prototype.drawHitDetectionReplay = function(gl, context, skippedFeaturesHash,
WebGLReplay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeaturesHash,
featureCallback, oneByOne, opt_hitExtent) {
if (!oneByOne) {
// draw all hit-detection features in "once" (by texture group)
@@ -223,7 +223,7 @@ _ol_render_webgl_Replay_.prototype.drawHitDetectionReplay = function(gl, context
* @return {T|undefined} Callback result.
* @template T
*/
_ol_render_webgl_Replay_.prototype.drawHitDetectionReplayAll = function(gl, context, skippedFeaturesHash,
WebGLReplay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedFeaturesHash,
featureCallback) {
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
this.drawReplay(gl, context, skippedFeaturesHash, true);
@@ -254,7 +254,7 @@ _ol_render_webgl_Replay_.prototype.drawHitDetectionReplayAll = function(gl, cont
* @return {T|undefined} Callback result.
* @template T
*/
_ol_render_webgl_Replay_.prototype.replay = function(context,
WebGLReplay.prototype.replay = function(context,
center, resolution, rotation, size, pixelRatio,
opacity, skippedFeaturesHash,
featureCallback, oneByOne, opt_hitExtent) {
@@ -350,7 +350,7 @@ _ol_render_webgl_Replay_.prototype.replay = function(context,
* @param {number} start Start index.
* @param {number} end End index.
*/
_ol_render_webgl_Replay_.prototype.drawElements = function(
WebGLReplay.prototype.drawElements = function(
gl, context, start, end) {
const elementType = context.hasOESElementIndexUint ?
_ol_webgl_.UNSIGNED_INT : _ol_webgl_.UNSIGNED_SHORT;
@@ -360,4 +360,4 @@ _ol_render_webgl_Replay_.prototype.drawElements = function(
const offsetInBytes = start * elementSize;
gl.drawElements(_ol_webgl_.TRIANGLES, numItems, elementType, offsetInBytes);
};
export default _ol_render_webgl_Replay_;
export default WebGLReplay;

View File

@@ -6,7 +6,7 @@ import {intersects} from '../../extent.js';
import _ol_obj_ from '../../obj.js';
import _ol_render_webgl_texturereplay_defaultshader_ from '../webgl/texturereplay/defaultshader.js';
import _ol_render_webgl_texturereplay_defaultshader_Locations_ from '../webgl/texturereplay/defaultshader/Locations.js';
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
import WebGLReplay from '../webgl/Replay.js';
import _ol_webgl_ from '../../webgl.js';
import _ol_webgl_Context_ from '../../webgl/Context.js';
@@ -19,7 +19,7 @@ import _ol_webgl_Context_ from '../../webgl/Context.js';
* @struct
*/
const WebGLTextureReplay = function(tolerance, maxExtent) {
_ol_render_webgl_Replay_.call(this, tolerance, maxExtent);
WebGLReplay.call(this, tolerance, maxExtent);
/**
* @type {number|undefined}
@@ -112,7 +112,7 @@ const WebGLTextureReplay = function(tolerance, maxExtent) {
this.width = undefined;
};
inherits(WebGLTextureReplay, _ol_render_webgl_Replay_);
inherits(WebGLTextureReplay, WebGLReplay);
/**

View File

@@ -1,9 +1,9 @@
import _ol_render_webgl_Replay_ from '../../../../../src/ol/render/webgl/Replay.js';
import WebGLReplay from '../../../../../src/ol/render/webgl/Replay.js';
describe('ol.render.Replay', function() {
let replay;
beforeEach(function() {
replay = new _ol_render_webgl_Replay_(5, [-180, -90, 180, 90]);
replay = new WebGLReplay(5, [-180, -90, 180, 90]);
});