Rename _ol_render_webgl_TextureReplay_ to WebGLTextureReplay
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/webgl/ImageReplay
|
||||
*/
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_render_webgl_TextureReplay_ from '../webgl/TextureReplay.js';
|
||||
import WebGLTextureReplay from '../webgl/TextureReplay.js';
|
||||
import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@ import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
|
||||
* @struct
|
||||
*/
|
||||
const WebGLImageReplay = function(tolerance, maxExtent) {
|
||||
_ol_render_webgl_TextureReplay_.call(this, tolerance, maxExtent);
|
||||
WebGLTextureReplay.call(this, tolerance, maxExtent);
|
||||
|
||||
/**
|
||||
* @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
|
||||
@@ -41,7 +41,7 @@ const WebGLImageReplay = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
inherits(WebGLImageReplay, _ol_render_webgl_TextureReplay_);
|
||||
inherits(WebGLImageReplay, WebGLTextureReplay);
|
||||
|
||||
|
||||
/**
|
||||
@@ -98,7 +98,7 @@ WebGLImageReplay.prototype.finish = function(context) {
|
||||
|
||||
this.images_ = null;
|
||||
this.hitDetectionImages_ = null;
|
||||
_ol_render_webgl_TextureReplay_.prototype.finish.call(this, context);
|
||||
WebGLTextureReplay.prototype.finish.call(this, context);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import GeometryType from '../../geom/GeometryType.js';
|
||||
import _ol_has_ from '../../has.js';
|
||||
import _ol_render_replay_ from '../replay.js';
|
||||
import _ol_render_webgl_ from '../webgl.js';
|
||||
import _ol_render_webgl_TextureReplay_ from '../webgl/TextureReplay.js';
|
||||
import WebGLTextureReplay from '../webgl/TextureReplay.js';
|
||||
import AtlasManager from '../../style/AtlasManager.js';
|
||||
import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
|
||||
|
||||
@@ -20,7 +20,7 @@ import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
|
||||
* @struct
|
||||
*/
|
||||
const _ol_render_webgl_TextReplay_ = function(tolerance, maxExtent) {
|
||||
_ol_render_webgl_TextureReplay_.call(this, tolerance, maxExtent);
|
||||
WebGLTextureReplay.call(this, tolerance, maxExtent);
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -114,7 +114,7 @@ const _ol_render_webgl_TextReplay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
inherits(_ol_render_webgl_TextReplay_, _ol_render_webgl_TextureReplay_);
|
||||
inherits(_ol_render_webgl_TextReplay_, WebGLTextureReplay);
|
||||
|
||||
|
||||
/**
|
||||
@@ -340,7 +340,7 @@ _ol_render_webgl_TextReplay_.prototype.finish = function(context) {
|
||||
this.images_ = null;
|
||||
this.atlases_ = {};
|
||||
this.currAtlas_ = undefined;
|
||||
_ol_render_webgl_TextureReplay_.prototype.finish.call(this, context);
|
||||
WebGLTextureReplay.prototype.finish.call(this, context);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import _ol_webgl_Context_ from '../../webgl/Context.js';
|
||||
* @param {ol.Extent} maxExtent Max extent.
|
||||
* @struct
|
||||
*/
|
||||
const _ol_render_webgl_TextureReplay_ = function(tolerance, maxExtent) {
|
||||
const WebGLTextureReplay = function(tolerance, maxExtent) {
|
||||
_ol_render_webgl_Replay_.call(this, tolerance, maxExtent);
|
||||
|
||||
/**
|
||||
@@ -112,13 +112,13 @@ const _ol_render_webgl_TextureReplay_ = function(tolerance, maxExtent) {
|
||||
this.width = undefined;
|
||||
};
|
||||
|
||||
inherits(_ol_render_webgl_TextureReplay_, _ol_render_webgl_Replay_);
|
||||
inherits(WebGLTextureReplay, _ol_render_webgl_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.getDeleteResourcesFunction = function(context) {
|
||||
WebGLTextureReplay.prototype.getDeleteResourcesFunction = function(context) {
|
||||
const verticesBuffer = this.verticesBuffer;
|
||||
const indicesBuffer = this.indicesBuffer;
|
||||
const textures = this.getTextures(true);
|
||||
@@ -144,7 +144,7 @@ _ol_render_webgl_TextureReplay_.prototype.getDeleteResourcesFunction = function(
|
||||
* @return {number} My end.
|
||||
* @protected
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.drawCoordinates = function(flatCoordinates, offset, end, stride) {
|
||||
WebGLTextureReplay.prototype.drawCoordinates = function(flatCoordinates, offset, end, stride) {
|
||||
const anchorX = /** @type {number} */ (this.anchorX);
|
||||
const anchorY = /** @type {number} */ (this.anchorY);
|
||||
const height = /** @type {number} */ (this.height);
|
||||
@@ -247,7 +247,7 @@ _ol_render_webgl_TextureReplay_.prototype.drawCoordinates = function(flatCoordin
|
||||
* @param {Object.<string, WebGLTexture>} texturePerImage Texture cache.
|
||||
* @param {WebGLRenderingContext} gl Gl.
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.createTextures = function(textures, images, texturePerImage, gl) {
|
||||
WebGLTextureReplay.prototype.createTextures = function(textures, images, texturePerImage, gl) {
|
||||
let texture, image, uid, i;
|
||||
const ii = images.length;
|
||||
for (i = 0; i < ii; ++i) {
|
||||
@@ -269,7 +269,7 @@ _ol_render_webgl_TextureReplay_.prototype.createTextures = function(textures, im
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
|
||||
WebGLTextureReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
|
||||
// get the program
|
||||
const fragmentShader = _ol_render_webgl_texturereplay_defaultshader_.fragment;
|
||||
const vertexShader = _ol_render_webgl_texturereplay_defaultshader_.vertex;
|
||||
@@ -315,7 +315,7 @@ _ol_render_webgl_TextureReplay_.prototype.setUpProgram = function(gl, context, s
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.shutDownProgram = function(gl, locations) {
|
||||
WebGLTextureReplay.prototype.shutDownProgram = function(gl, locations) {
|
||||
gl.disableVertexAttribArray(locations.a_position);
|
||||
gl.disableVertexAttribArray(locations.a_offsets);
|
||||
gl.disableVertexAttribArray(locations.a_texCoord);
|
||||
@@ -327,7 +327,7 @@ _ol_render_webgl_TextureReplay_.prototype.shutDownProgram = function(gl, locatio
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
|
||||
WebGLTextureReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
|
||||
const textures = hitDetection ? this.getHitDetectionTextures() : this.getTextures();
|
||||
const groupIndices = hitDetection ? this.hitDetectionGroupIndices : this.groupIndices;
|
||||
|
||||
@@ -372,7 +372,7 @@ _ol_render_webgl_TextureReplay_.prototype.drawReplay = function(gl, context, ski
|
||||
* @param {Array.<WebGLTexture>} textures Textures.
|
||||
* @param {Array.<number>} groupIndices Texture group indices.
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.drawReplaySkipping = function(gl, context, skippedFeaturesHash, textures,
|
||||
WebGLTextureReplay.prototype.drawReplaySkipping = function(gl, context, skippedFeaturesHash, textures,
|
||||
groupIndices) {
|
||||
let featureIndex = 0;
|
||||
|
||||
@@ -419,7 +419,7 @@ _ol_render_webgl_TextureReplay_.prototype.drawReplaySkipping = function(gl, cont
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
|
||||
WebGLTextureReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
|
||||
featureCallback, opt_hitExtent) {
|
||||
let i, groupStart, start, end, feature, featureUid;
|
||||
let featureIndex = this.startIndices.length - 1;
|
||||
@@ -461,7 +461,7 @@ _ol_render_webgl_TextureReplay_.prototype.drawHitDetectionReplayOneByOne = funct
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.finish = function(context) {
|
||||
WebGLTextureReplay.prototype.finish = function(context) {
|
||||
this.anchorX = undefined;
|
||||
this.anchorY = undefined;
|
||||
this.height = undefined;
|
||||
@@ -485,7 +485,7 @@ _ol_render_webgl_TextureReplay_.prototype.finish = function(context) {
|
||||
* @param {boolean=} opt_all Return hit detection textures with regular ones.
|
||||
* @returns {Array.<WebGLTexture>} Textures.
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.getTextures = function(opt_all) {};
|
||||
WebGLTextureReplay.prototype.getTextures = function(opt_all) {};
|
||||
|
||||
|
||||
/**
|
||||
@@ -493,5 +493,5 @@ _ol_render_webgl_TextureReplay_.prototype.getTextures = function(opt_all) {};
|
||||
* @protected
|
||||
* @returns {Array.<WebGLTexture>} Textures.
|
||||
*/
|
||||
_ol_render_webgl_TextureReplay_.prototype.getHitDetectionTextures = function() {};
|
||||
export default _ol_render_webgl_TextureReplay_;
|
||||
WebGLTextureReplay.prototype.getHitDetectionTextures = function() {};
|
||||
export default WebGLTextureReplay;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_render_webgl_TextureReplay_ from '../../../../../src/ol/render/webgl/TextureReplay.js';
|
||||
import WebGLTextureReplay from '../../../../../src/ol/render/webgl/TextureReplay.js';
|
||||
import _ol_render_webgl_texturereplay_defaultshader_ from '../../../../../src/ol/render/webgl/texturereplay/defaultshader.js';
|
||||
import _ol_render_webgl_texturereplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/texturereplay/defaultshader/Locations.js';
|
||||
|
||||
@@ -8,7 +8,7 @@ describe('ol.render.webgl.TextureReplay', function() {
|
||||
beforeEach(function() {
|
||||
const tolerance = 0.1;
|
||||
const maxExtent = [-10000, -20000, 10000, 20000];
|
||||
replay = new _ol_render_webgl_TextureReplay_(tolerance, maxExtent);
|
||||
replay = new WebGLTextureReplay(tolerance, maxExtent);
|
||||
});
|
||||
|
||||
describe('#setUpProgram', function() {
|
||||
|
||||
Reference in New Issue
Block a user