Use named exports from ol/index.js
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
// FIXME add rotation
|
||||
|
||||
import _ol_ from '../index.js';
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_Disposable_ from '../Disposable.js';
|
||||
import _ol_geom_Polygon_ from '../geom/Polygon.js';
|
||||
|
||||
@@ -48,7 +48,7 @@ var _ol_render_Box_ = function(className) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_Box_, _ol_Disposable_);
|
||||
inherits(_ol_render_Box_, _ol_Disposable_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/Event
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_events_Event_ from '../events/Event.js';
|
||||
|
||||
/**
|
||||
@@ -52,5 +52,5 @@ var _ol_render_Event_ = function(
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_Event_, _ol_events_Event_);
|
||||
inherits(_ol_render_Event_, _ol_events_Event_);
|
||||
export default _ol_render_Event_;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/Feature
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {nullFunction} from '../index.js';
|
||||
import _ol_array_ from '../array.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
|
||||
@@ -244,7 +244,7 @@ _ol_render_Feature_.prototype.getStride = function() {
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
_ol_render_Feature_.prototype.getStyleFunction = _ol_.nullFunction;
|
||||
_ol_render_Feature_.prototype.getStyleFunction = nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/canvas/ImageReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_render_canvas_Instruction_ from '../canvas/Instruction.js';
|
||||
import _ol_render_canvas_Replay_ from '../canvas/Replay.js';
|
||||
|
||||
@@ -107,7 +107,7 @@ var _ol_render_canvas_ImageReplay_ = function(
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_ImageReplay_, _ol_render_canvas_Replay_);
|
||||
inherits(_ol_render_canvas_ImageReplay_, _ol_render_canvas_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// FIXME need to handle large thick features (where pixel size matters)
|
||||
// FIXME add offset and end to ol.geom.flat.transform.transform2D?
|
||||
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_colorlike_ from '../../colorlike.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -238,7 +238,7 @@ var _ol_render_canvas_Immediate_ = function(context, pixelRatio, extent, transfo
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_Immediate_, _ol_render_VectorContext_);
|
||||
inherits(_ol_render_canvas_Immediate_, _ol_render_VectorContext_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/canvas/LineStringReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_render_canvas_Instruction_ from '../canvas/Instruction.js';
|
||||
import _ol_render_canvas_Replay_ from '../canvas/Replay.js';
|
||||
|
||||
@@ -22,7 +22,7 @@ var _ol_render_canvas_LineStringReplay_ = function(
|
||||
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_LineStringReplay_, _ol_render_canvas_Replay_);
|
||||
inherits(_ol_render_canvas_LineStringReplay_, _ol_render_canvas_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/canvas/PolygonReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_color_ from '../../color.js';
|
||||
import _ol_geom_flat_simplify_ from '../../geom/flat/simplify.js';
|
||||
import _ol_render_canvas_ from '../canvas.js';
|
||||
@@ -25,7 +25,7 @@ var _ol_render_canvas_PolygonReplay_ = function(
|
||||
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_PolygonReplay_, _ol_render_canvas_Replay_);
|
||||
inherits(_ol_render_canvas_PolygonReplay_, _ol_render_canvas_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/canvas/Replay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits, nullFunction} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_colorlike_ from '../../colorlike.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -167,7 +167,7 @@ var _ol_render_canvas_Replay_ = function(tolerance, maxExtent, resolution, pixel
|
||||
this.resetTransform_ = _ol_transform_.create();
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_Replay_, _ol_render_VectorContext_);
|
||||
inherits(_ol_render_canvas_Replay_, _ol_render_VectorContext_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -584,7 +584,7 @@ _ol_render_canvas_Replay_.prototype.replay_ = function(
|
||||
case _ol_render_canvas_Instruction_.BEGIN_GEOMETRY:
|
||||
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
|
||||
if ((skipFeatures &&
|
||||
skippedFeaturesHash[_ol_.getUid(feature).toString()]) ||
|
||||
skippedFeaturesHash[getUid(feature).toString()]) ||
|
||||
!feature.getGeometry()) {
|
||||
i = /** @type {number} */ (instruction[2]);
|
||||
} else if (opt_hitExtent !== undefined && !_ol_extent_.intersects(
|
||||
@@ -1048,7 +1048,7 @@ _ol_render_canvas_Replay_.prototype.endGeometry = function(geometry, feature) {
|
||||
/**
|
||||
* FIXME empty description for jsdoc
|
||||
*/
|
||||
_ol_render_canvas_Replay_.prototype.finish = _ol_.nullFunction;
|
||||
_ol_render_canvas_Replay_.prototype.finish = nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/canvas/ReplayGroup
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_dom_ from '../../dom.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -102,7 +102,7 @@ var _ol_render_canvas_ReplayGroup_ = function(
|
||||
this.hitDetectionTransform_ = _ol_transform_.create();
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_ReplayGroup_, _ol_render_ReplayGroup_);
|
||||
inherits(_ol_render_canvas_ReplayGroup_, _ol_render_ReplayGroup_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/canvas/TextReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_colorlike_ from '../../colorlike.js';
|
||||
import _ol_dom_ from '../../dom.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -134,7 +134,7 @@ var _ol_render_canvas_TextReplay_ = function(
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_canvas_TextReplay_, _ol_render_canvas_Replay_);
|
||||
inherits(_ol_render_canvas_TextReplay_, _ol_render_canvas_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -533,13 +533,13 @@ _ol_render_canvas_TextReplay_.prototype.setTextStyle = function(textStyle, declu
|
||||
this.textRotation_ = textRotation === undefined ? 0 : textRotation;
|
||||
|
||||
this.strokeKey_ = strokeState ?
|
||||
(typeof strokeState.strokeStyle == 'string' ? strokeState.strokeStyle : _ol_.getUid(strokeState.strokeStyle)) +
|
||||
(typeof strokeState.strokeStyle == 'string' ? strokeState.strokeStyle : getUid(strokeState.strokeStyle)) +
|
||||
strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +
|
||||
strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :
|
||||
'';
|
||||
this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');
|
||||
this.fillKey_ = fillState ?
|
||||
(typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + _ol_.getUid(fillState.fillStyle))) :
|
||||
(typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + getUid(fillState.fillStyle))) :
|
||||
'';
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/CircleReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_color_ from '../../color.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -68,7 +68,7 @@ var _ol_render_webgl_CircleReplay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_CircleReplay_, _ol_render_webgl_Replay_);
|
||||
inherits(_ol_render_webgl_CircleReplay_, _ol_render_webgl_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -285,7 +285,7 @@ _ol_render_webgl_CircleReplay_.prototype.drawHitDetectionReplayOneByOne = functi
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
start = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid] === undefined &&
|
||||
feature.getGeometry() &&
|
||||
@@ -331,7 +331,7 @@ _ol_render_webgl_CircleReplay_.prototype.drawReplaySkipping_ = function(gl, cont
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
featureStart = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid]) {
|
||||
if (start !== end) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/ImageReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_render_webgl_TextureReplay_ from '../webgl/TextureReplay.js';
|
||||
import _ol_webgl_Buffer_ from '../../webgl/Buffer.js';
|
||||
|
||||
@@ -41,7 +41,7 @@ var _ol_render_webgl_ImageReplay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_ImageReplay_, _ol_render_webgl_TextureReplay_);
|
||||
inherits(_ol_render_webgl_ImageReplay_, _ol_render_webgl_TextureReplay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -122,7 +122,7 @@ _ol_render_webgl_ImageReplay_.prototype.setImageStyle = function(imageStyle) {
|
||||
this.images_.push(image);
|
||||
} else {
|
||||
currentImage = this.images_[this.images_.length - 1];
|
||||
if (_ol_.getUid(currentImage) != _ol_.getUid(image)) {
|
||||
if (getUid(currentImage) != getUid(image)) {
|
||||
this.groupIndices.push(this.indices.length);
|
||||
this.images_.push(image);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ _ol_render_webgl_ImageReplay_.prototype.setImageStyle = function(imageStyle) {
|
||||
} else {
|
||||
currentImage =
|
||||
this.hitDetectionImages_[this.hitDetectionImages_.length - 1];
|
||||
if (_ol_.getUid(currentImage) != _ol_.getUid(hitDetectionImage)) {
|
||||
if (getUid(currentImage) != getUid(hitDetectionImage)) {
|
||||
this.hitDetectionGroupIndices.push(this.indices.length);
|
||||
this.hitDetectionImages_.push(hitDetectionImage);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/Immediate
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
import _ol_geom_GeometryType_ from '../../geom/GeometryType.js';
|
||||
import _ol_render_ReplayType_ from '../ReplayType.js';
|
||||
@@ -84,7 +84,7 @@ var _ol_render_webgl_Immediate_ = function(context, center, resolution, rotation
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_Immediate_, _ol_render_VectorContext_);
|
||||
inherits(_ol_render_webgl_Immediate_, _ol_render_VectorContext_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/LineStringReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_color_ from '../../color.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -68,7 +68,7 @@ var _ol_render_webgl_LineStringReplay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_LineStringReplay_, _ol_render_webgl_Replay_);
|
||||
inherits(_ol_render_webgl_LineStringReplay_, _ol_render_webgl_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -551,7 +551,7 @@ _ol_render_webgl_LineStringReplay_.prototype.drawReplaySkipping_ = function(gl,
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
featureStart = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid]) {
|
||||
if (start !== end) {
|
||||
@@ -589,7 +589,7 @@ _ol_render_webgl_LineStringReplay_.prototype.drawHitDetectionReplayOneByOne = fu
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
start = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid] === undefined &&
|
||||
feature.getGeometry() &&
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/PolygonReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_color_ from '../../color.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -63,7 +63,7 @@ var _ol_render_webgl_PolygonReplay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_PolygonReplay_, _ol_render_webgl_Replay_);
|
||||
inherits(_ol_render_webgl_PolygonReplay_, _ol_render_webgl_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -966,7 +966,7 @@ _ol_render_webgl_PolygonReplay_.prototype.drawHitDetectionReplayOneByOne = funct
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
start = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid] === undefined &&
|
||||
feature.getGeometry() &&
|
||||
@@ -1010,7 +1010,7 @@ _ol_render_webgl_PolygonReplay_.prototype.drawReplaySkipping_ = function(gl, con
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
featureStart = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid]) {
|
||||
if (start !== end) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/Replay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
import _ol_render_VectorContext_ from '../VectorContext.js';
|
||||
import _ol_transform_ from '../../transform.js';
|
||||
@@ -113,7 +113,7 @@ var _ol_render_webgl_Replay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_Replay_, _ol_render_VectorContext_);
|
||||
inherits(_ol_render_webgl_Replay_, _ol_render_VectorContext_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/ReplayGroup
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
import _ol_obj_ from '../../obj.js';
|
||||
@@ -51,7 +51,7 @@ var _ol_render_webgl_ReplayGroup_ = function(tolerance, maxExtent, opt_renderBuf
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_ReplayGroup_, _ol_render_ReplayGroup_);
|
||||
inherits(_ol_render_webgl_ReplayGroup_, _ol_render_ReplayGroup_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/TextReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_colorlike_ from '../../colorlike.js';
|
||||
import _ol_dom_ from '../../dom.js';
|
||||
import _ol_geom_GeometryType_ from '../../geom/GeometryType.js';
|
||||
@@ -114,7 +114,7 @@ var _ol_render_webgl_TextReplay_ = function(tolerance, maxExtent) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_TextReplay_, _ol_render_webgl_TextureReplay_);
|
||||
inherits(_ol_render_webgl_TextReplay_, _ol_render_webgl_TextureReplay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -189,7 +189,7 @@ _ol_render_webgl_TextReplay_.prototype.drawText = function(geometry, feature) {
|
||||
this.images_.push(image);
|
||||
} else {
|
||||
currentImage = this.images_[this.images_.length - 1];
|
||||
if (_ol_.getUid(currentImage) != _ol_.getUid(image)) {
|
||||
if (getUid(currentImage) != getUid(image)) {
|
||||
this.groupIndices.push(this.indices.length);
|
||||
this.images_.push(image);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/render/webgl/TextureReplay
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
import _ol_obj_ from '../../obj.js';
|
||||
import _ol_render_webgl_texturereplay_defaultshader_ from '../webgl/texturereplay/defaultshader.js';
|
||||
@@ -112,7 +112,7 @@ var _ol_render_webgl_TextureReplay_ = function(tolerance, maxExtent) {
|
||||
this.width = undefined;
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_render_webgl_TextureReplay_, _ol_render_webgl_Replay_);
|
||||
inherits(_ol_render_webgl_TextureReplay_, _ol_render_webgl_Replay_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -253,7 +253,7 @@ _ol_render_webgl_TextureReplay_.prototype.createTextures = function(textures, im
|
||||
for (i = 0; i < ii; ++i) {
|
||||
image = images[i];
|
||||
|
||||
uid = _ol_.getUid(image).toString();
|
||||
uid = getUid(image).toString();
|
||||
if (uid in texturePerImage) {
|
||||
texture = texturePerImage[uid];
|
||||
} else {
|
||||
@@ -388,7 +388,7 @@ _ol_render_webgl_TextureReplay_.prototype.drawReplaySkipping = function(gl, cont
|
||||
this.startIndices[featureIndex] <= groupEnd) {
|
||||
var feature = this.startIndicesFeature[featureIndex];
|
||||
|
||||
var featureUid = _ol_.getUid(feature).toString();
|
||||
var featureUid = getUid(feature).toString();
|
||||
if (skippedFeaturesHash[featureUid] !== undefined) {
|
||||
// feature should be skipped
|
||||
if (start !== end) {
|
||||
@@ -434,7 +434,7 @@ _ol_render_webgl_TextureReplay_.prototype.drawHitDetectionReplayOneByOne = funct
|
||||
this.startIndices[featureIndex] >= groupStart) {
|
||||
start = this.startIndices[featureIndex];
|
||||
feature = this.startIndicesFeature[featureIndex];
|
||||
featureUid = _ol_.getUid(feature).toString();
|
||||
featureUid = getUid(feature).toString();
|
||||
|
||||
if (skippedFeaturesHash[featureUid] === undefined &&
|
||||
feature.getGeometry() &&
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// This file is automatically generated, do not edit.
|
||||
// Run `make shaders` to generate, and commit the result.
|
||||
|
||||
import _ol_ from '../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../index.js';
|
||||
import _ol_webgl_Fragment_ from '../../../webgl/Fragment.js';
|
||||
import _ol_webgl_Vertex_ from '../../../webgl/Vertex.js';
|
||||
var _ol_render_webgl_circlereplay_defaultshader_ = {};
|
||||
|
||||
_ol_render_webgl_circlereplay_defaultshader_.fragment = new _ol_webgl_Fragment_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_render_webgl_circlereplay_defaultshader_.fragment = new _ol_webgl_Fragment_(DEBUG_WEBGL ?
|
||||
'precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n float radius = length(windowCenter - windowOffset);\n float dist = length(windowCenter - gl_FragCoord.xy);\n if (dist > radius + v_halfWidth) {\n if (u_strokeColor.a == 0.0) {\n gl_FragColor = u_fillColor;\n } else {\n gl_FragColor = u_strokeColor;\n }\n gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n } else if (u_fillColor.a == 0.0) {\n // Hooray, no fill, just stroke. We can use real antialiasing.\n gl_FragColor = u_strokeColor;\n if (dist < radius - v_halfWidth) {\n gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n }\n } else {\n gl_FragColor = u_fillColor;\n float strokeDist = radius - v_halfWidth;\n float antialias = 2.0 * v_pixelRatio;\n if (dist > strokeDist) {\n gl_FragColor = u_strokeColor;\n } else if (dist >= strokeDist - antialias) {\n float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n }\n }\n gl_FragColor.a = gl_FragColor.a * u_opacity;\n if (gl_FragColor.a <= 0.0) {\n discard;\n }\n}\n' :
|
||||
'precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}');
|
||||
|
||||
_ol_render_webgl_circlereplay_defaultshader_.vertex = new _ol_webgl_Vertex_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_render_webgl_circlereplay_defaultshader_.vertex = new _ol_webgl_Vertex_(DEBUG_WEBGL ?
|
||||
'varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n v_pixelRatio = u_pixelRatio;\n float lineWidth = u_lineWidth * u_pixelRatio;\n v_halfWidth = lineWidth / 2.0;\n if (lineWidth == 0.0) {\n lineWidth = 2.0 * u_pixelRatio;\n }\n vec2 offset;\n // Radius with anitaliasing (roughly).\n float radius = a_radius + 3.0 * u_pixelRatio;\n // Until we get gl_VertexID in WebGL, we store an instruction.\n if (a_instruction == 0.0) {\n // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n offset = vec2(-1.0, 1.0);\n } else if (a_instruction == 1.0) {\n offset = vec2(-1.0, -1.0);\n } else if (a_instruction == 2.0) {\n offset = vec2(1.0, -1.0);\n } else {\n offset = vec2(1.0, 1.0);\n }\n\n gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n 0.0, 1.0)).xy;\n\n if (distance(v_center, v_offset) > 20000.0) {\n gl_Position = vec4(v_center, 0.0, 1.0);\n }\n}\n\n\n' :
|
||||
'varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;//Until we get gl_VertexID in WebGL,we store an instruction.if(f==0.0){//Offsetting the edges of the triangle by lineWidth/2 is necessary,however//we should also leave some space for the antialiasing,thus we offset by lineWidth.offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/webgl/circlereplay/defaultshader/Locations
|
||||
*/
|
||||
// This file is automatically generated, do not edit
|
||||
import _ol_ from '../../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../../index.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -16,73 +16,73 @@ var _ol_render_webgl_circlereplay_defaultshader_Locations_ = function(gl, progra
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_projectionMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
|
||||
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetScaleMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
|
||||
program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetRotateMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
|
||||
program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_lineWidth = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
|
||||
program, DEBUG_WEBGL ? 'u_lineWidth' : 'k');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_pixelRatio = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_pixelRatio' : 'l');
|
||||
program, DEBUG_WEBGL ? 'u_pixelRatio' : 'l');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_opacity = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_opacity' : 'm');
|
||||
program, DEBUG_WEBGL ? 'u_opacity' : 'm');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_fillColor = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_fillColor' : 'n');
|
||||
program, DEBUG_WEBGL ? 'u_fillColor' : 'n');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_strokeColor = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_strokeColor' : 'o');
|
||||
program, DEBUG_WEBGL ? 'u_strokeColor' : 'o');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_size = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_size' : 'p');
|
||||
program, DEBUG_WEBGL ? 'u_size' : 'p');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_position' : 'e');
|
||||
program, DEBUG_WEBGL ? 'a_position' : 'e');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_instruction = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_instruction' : 'f');
|
||||
program, DEBUG_WEBGL ? 'a_instruction' : 'f');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_radius = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_radius' : 'g');
|
||||
program, DEBUG_WEBGL ? 'a_radius' : 'g');
|
||||
};
|
||||
|
||||
export default _ol_render_webgl_circlereplay_defaultshader_Locations_;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/webgl/linestringreplay/defaultshader/Locations
|
||||
*/
|
||||
// This file is automatically generated, do not edit
|
||||
import _ol_ from '../../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../../index.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -16,79 +16,79 @@ var _ol_render_webgl_linestringreplay_defaultshader_Locations_ = function(gl, pr
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_projectionMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
|
||||
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetScaleMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
|
||||
program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetRotateMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
|
||||
program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_lineWidth = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
|
||||
program, DEBUG_WEBGL ? 'u_lineWidth' : 'k');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_miterLimit = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_miterLimit' : 'l');
|
||||
program, DEBUG_WEBGL ? 'u_miterLimit' : 'l');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_opacity = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_opacity' : 'm');
|
||||
program, DEBUG_WEBGL ? 'u_opacity' : 'm');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_color = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_color' : 'n');
|
||||
program, DEBUG_WEBGL ? 'u_color' : 'n');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_size = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_size' : 'o');
|
||||
program, DEBUG_WEBGL ? 'u_size' : 'o');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_pixelRatio = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_pixelRatio' : 'p');
|
||||
program, DEBUG_WEBGL ? 'u_pixelRatio' : 'p');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_lastPos = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_lastPos' : 'd');
|
||||
program, DEBUG_WEBGL ? 'a_lastPos' : 'd');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_position' : 'e');
|
||||
program, DEBUG_WEBGL ? 'a_position' : 'e');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_nextPos = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_nextPos' : 'f');
|
||||
program, DEBUG_WEBGL ? 'a_nextPos' : 'f');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_direction = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_direction' : 'g');
|
||||
program, DEBUG_WEBGL ? 'a_direction' : 'g');
|
||||
};
|
||||
|
||||
export default _ol_render_webgl_linestringreplay_defaultshader_Locations_;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// This file is automatically generated, do not edit.
|
||||
// Run `make shaders` to generate, and commit the result.
|
||||
|
||||
import _ol_ from '../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../index.js';
|
||||
import _ol_webgl_Fragment_ from '../../../webgl/Fragment.js';
|
||||
import _ol_webgl_Vertex_ from '../../../webgl/Vertex.js';
|
||||
var _ol_render_webgl_polygonreplay_defaultshader_ = {};
|
||||
|
||||
_ol_render_webgl_polygonreplay_defaultshader_.fragment = new _ol_webgl_Fragment_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_render_webgl_polygonreplay_defaultshader_.fragment = new _ol_webgl_Fragment_(DEBUG_WEBGL ?
|
||||
'precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n' :
|
||||
'precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');
|
||||
|
||||
_ol_render_webgl_polygonreplay_defaultshader_.vertex = new _ol_webgl_Vertex_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_render_webgl_polygonreplay_defaultshader_.vertex = new _ol_webgl_Vertex_(DEBUG_WEBGL ?
|
||||
'\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n' :
|
||||
'attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/webgl/polygonreplay/defaultshader/Locations
|
||||
*/
|
||||
// This file is automatically generated, do not edit
|
||||
import _ol_ from '../../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../../index.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -16,37 +16,37 @@ var _ol_render_webgl_polygonreplay_defaultshader_Locations_ = function(gl, progr
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_projectionMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');
|
||||
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetScaleMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');
|
||||
program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetRotateMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');
|
||||
program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_color = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_color' : 'e');
|
||||
program, DEBUG_WEBGL ? 'u_color' : 'e');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_opacity = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_opacity' : 'f');
|
||||
program, DEBUG_WEBGL ? 'u_opacity' : 'f');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_position' : 'a');
|
||||
program, DEBUG_WEBGL ? 'a_position' : 'a');
|
||||
};
|
||||
|
||||
export default _ol_render_webgl_polygonreplay_defaultshader_Locations_;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// This file is automatically generated, do not edit.
|
||||
// Run `make shaders` to generate, and commit the result.
|
||||
|
||||
import _ol_ from '../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../index.js';
|
||||
import _ol_webgl_Fragment_ from '../../../webgl/Fragment.js';
|
||||
import _ol_webgl_Vertex_ from '../../../webgl/Vertex.js';
|
||||
var _ol_render_webgl_texturereplay_defaultshader_ = {};
|
||||
|
||||
_ol_render_webgl_texturereplay_defaultshader_.fragment = new _ol_webgl_Fragment_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_render_webgl_texturereplay_defaultshader_.fragment = new _ol_webgl_Fragment_(DEBUG_WEBGL ?
|
||||
'precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n float alpha = texColor.a * v_opacity * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n' :
|
||||
'precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');
|
||||
|
||||
_ol_render_webgl_texturereplay_defaultshader_.vertex = new _ol_webgl_Vertex_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_render_webgl_texturereplay_defaultshader_.vertex = new _ol_webgl_Vertex_(DEBUG_WEBGL ?
|
||||
'varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n if (a_rotateWithView == 1.0) {\n offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n }\n vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n v_texCoord = a_texCoord;\n v_opacity = a_opacity;\n}\n\n\n' :
|
||||
'varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/webgl/texturereplay/defaultshader/Locations
|
||||
*/
|
||||
// This file is automatically generated, do not edit
|
||||
import _ol_ from '../../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../../index.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -16,61 +16,61 @@ var _ol_render_webgl_texturereplay_defaultshader_Locations_ = function(gl, progr
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_projectionMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
|
||||
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetScaleMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
|
||||
program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_offsetRotateMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
|
||||
program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_opacity = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_opacity' : 'k');
|
||||
program, DEBUG_WEBGL ? 'u_opacity' : 'k');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_image = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_image' : 'l');
|
||||
program, DEBUG_WEBGL ? 'u_image' : 'l');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_position' : 'c');
|
||||
program, DEBUG_WEBGL ? 'a_position' : 'c');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_texCoord = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_texCoord' : 'd');
|
||||
program, DEBUG_WEBGL ? 'a_texCoord' : 'd');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_offsets = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_offsets' : 'e');
|
||||
program, DEBUG_WEBGL ? 'a_offsets' : 'e');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_opacity = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_opacity' : 'f');
|
||||
program, DEBUG_WEBGL ? 'a_opacity' : 'f');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_rotateWithView = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
|
||||
program, DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
|
||||
};
|
||||
|
||||
export default _ol_render_webgl_texturereplay_defaultshader_Locations_;
|
||||
|
||||
Reference in New Issue
Block a user