Use named exports from ol/index.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/renderer/webgl/ImageLayer
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {ENABLE_RASTER_REPROJECTION, inherits, nullFunction} from '../../index.js';
|
||||
import _ol_LayerType_ from '../../LayerType.js';
|
||||
import _ol_ViewHint_ from '../../ViewHint.js';
|
||||
import _ol_dom_ from '../../dom.js';
|
||||
@@ -45,7 +45,7 @@ var _ol_renderer_webgl_ImageLayer_ = function(mapRenderer, imageLayer) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_renderer_webgl_ImageLayer_, _ol_renderer_webgl_Layer_);
|
||||
inherits(_ol_renderer_webgl_ImageLayer_, _ol_renderer_webgl_Layer_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ _ol_renderer_webgl_ImageLayer_.prototype.prepareFrame = function(frameState, lay
|
||||
if (!hints[_ol_ViewHint_.ANIMATING] && !hints[_ol_ViewHint_.INTERACTING] &&
|
||||
!_ol_extent_.isEmpty(renderedExtent)) {
|
||||
var projection = viewState.projection;
|
||||
if (!_ol_.ENABLE_RASTER_REPROJECTION) {
|
||||
if (!ENABLE_RASTER_REPROJECTION) {
|
||||
var sourceProjection = imageSource.getProjection();
|
||||
if (sourceProjection) {
|
||||
projection = sourceProjection;
|
||||
@@ -248,7 +248,7 @@ _ol_renderer_webgl_ImageLayer_.prototype.forEachLayerAtPixel = function(pixel, f
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== _ol_.nullFunction) {
|
||||
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== nullFunction) {
|
||||
// for ImageCanvas sources use the original hit-detection logic,
|
||||
// so that for example also transparent polygons are detected
|
||||
var coordinate = _ol_transform_.apply(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/renderer/webgl/Layer
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_render_Event_ from '../../render/Event.js';
|
||||
import _ol_render_EventType_ from '../../render/EventType.js';
|
||||
import _ol_render_webgl_Immediate_ from '../../render/webgl/Immediate.js';
|
||||
@@ -86,7 +86,7 @@ var _ol_renderer_webgl_Layer_ = function(mapRenderer, layer) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_renderer_webgl_Layer_, _ol_renderer_Layer_);
|
||||
inherits(_ol_renderer_webgl_Layer_, _ol_renderer_Layer_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
// FIXME check against gl.getParameter(webgl.MAX_TEXTURE_SIZE)
|
||||
|
||||
import _ol_ from '../../index.js';
|
||||
import {WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK, inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import _ol_css_ from '../../css.js';
|
||||
import _ol_dom_ from '../../dom.js';
|
||||
@@ -160,7 +160,7 @@ var _ol_renderer_webgl_Map_ = function(container, map) {
|
||||
this.initializeGL_();
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_renderer_webgl_Map_, _ol_renderer_Map_);
|
||||
inherits(_ol_renderer_webgl_Map_, _ol_renderer_Map_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -308,7 +308,7 @@ _ol_renderer_webgl_Map_.prototype.expireCache_ = function(map, frameState) {
|
||||
var gl = this.getGL();
|
||||
var textureCacheEntry;
|
||||
while (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
|
||||
_ol_.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
|
||||
WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
|
||||
textureCacheEntry = this.textureCache_.peekLast();
|
||||
if (!textureCacheEntry) {
|
||||
if (+this.textureCache_.peekLastKey() == frameState.index) {
|
||||
@@ -480,7 +480,7 @@ _ol_renderer_webgl_Map_.prototype.renderFrame = function(frameState) {
|
||||
this.calculateMatrices2D(frameState);
|
||||
|
||||
if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
|
||||
_ol_.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
|
||||
WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
|
||||
frameState.postRenderFunctions.push(
|
||||
/** @type {ol.PostRenderFunction} */ (this.expireCache_.bind(this))
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// FIXME large resolutions lead to too large framebuffers :-(
|
||||
// FIXME animated shaders! check in redraw
|
||||
|
||||
import _ol_ from '../../index.js';
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_LayerType_ from '../../LayerType.js';
|
||||
import _ol_TileRange_ from '../../TileRange.js';
|
||||
import _ol_TileState_ from '../../TileState.js';
|
||||
@@ -86,7 +86,7 @@ var _ol_renderer_webgl_TileLayer_ = function(mapRenderer, tileLayer) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_renderer_webgl_TileLayer_, _ol_renderer_webgl_Layer_);
|
||||
inherits(_ol_renderer_webgl_TileLayer_, _ol_renderer_webgl_Layer_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/renderer/webgl/VectorLayer
|
||||
*/
|
||||
import _ol_ from '../../index.js';
|
||||
import {getUid, inherits} from '../../index.js';
|
||||
import _ol_LayerType_ from '../../LayerType.js';
|
||||
import _ol_ViewHint_ from '../../ViewHint.js';
|
||||
import _ol_extent_ from '../../extent.js';
|
||||
@@ -67,7 +67,7 @@ var _ol_renderer_webgl_VectorLayer_ = function(mapRenderer, vectorLayer) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_renderer_webgl_VectorLayer_, _ol_renderer_webgl_Layer_);
|
||||
inherits(_ol_renderer_webgl_VectorLayer_, _ol_renderer_webgl_Layer_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -154,7 +154,7 @@ _ol_renderer_webgl_VectorLayer_.prototype.forEachFeatureAtCoordinate = function(
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
var key = _ol_.getUid(feature).toString();
|
||||
var key = getUid(feature).toString();
|
||||
if (!(key in features)) {
|
||||
features[key] = true;
|
||||
return callback.call(thisArg, feature, layer);
|
||||
|
||||
@@ -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_renderer_webgl_defaultmapshader_ = {};
|
||||
|
||||
_ol_renderer_webgl_defaultmapshader_.fragment = new _ol_webgl_Fragment_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_renderer_webgl_defaultmapshader_.fragment = new _ol_webgl_Fragment_(DEBUG_WEBGL ?
|
||||
'precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_texture, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n gl_FragColor.a = texColor.a * u_opacity;\n}\n' :
|
||||
'precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}');
|
||||
|
||||
_ol_renderer_webgl_defaultmapshader_.vertex = new _ol_webgl_Vertex_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_renderer_webgl_defaultmapshader_.vertex = new _ol_webgl_Vertex_(DEBUG_WEBGL ?
|
||||
'varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n' :
|
||||
'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/renderer/webgl/defaultmapshader/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_renderer_webgl_defaultmapshader_Locations_ = function(gl, program) {
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_texCoordMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');
|
||||
program, DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_projectionMatrix = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');
|
||||
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_opacity = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_opacity' : 'f');
|
||||
program, DEBUG_WEBGL ? 'u_opacity' : 'f');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_texture = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_texture' : 'g');
|
||||
program, DEBUG_WEBGL ? 'u_texture' : 'g');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_position' : 'b');
|
||||
program, DEBUG_WEBGL ? 'a_position' : 'b');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_texCoord = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_texCoord' : 'c');
|
||||
program, DEBUG_WEBGL ? 'a_texCoord' : 'c');
|
||||
};
|
||||
|
||||
export default _ol_renderer_webgl_defaultmapshader_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_renderer_webgl_tilelayershader_ = {};
|
||||
|
||||
_ol_renderer_webgl_tilelayershader_.fragment = new _ol_webgl_Fragment_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_renderer_webgl_tilelayershader_.fragment = new _ol_webgl_Fragment_(DEBUG_WEBGL ?
|
||||
'precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n' :
|
||||
'precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}');
|
||||
|
||||
_ol_renderer_webgl_tilelayershader_.vertex = new _ol_webgl_Vertex_(_ol_.DEBUG_WEBGL ?
|
||||
_ol_renderer_webgl_tilelayershader_.vertex = new _ol_webgl_Vertex_(DEBUG_WEBGL ?
|
||||
'varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n v_texCoord = a_texCoord;\n}\n\n\n' :
|
||||
'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/renderer/webgl/tilelayershader/Locations
|
||||
*/
|
||||
// This file is automatically generated, do not edit
|
||||
import _ol_ from '../../../index.js';
|
||||
import {DEBUG_WEBGL} from '../../../index.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -16,25 +16,25 @@ var _ol_renderer_webgl_tilelayershader_Locations_ = function(gl, program) {
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_tileOffset = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_tileOffset' : 'd');
|
||||
program, DEBUG_WEBGL ? 'u_tileOffset' : 'd');
|
||||
|
||||
/**
|
||||
* @type {WebGLUniformLocation}
|
||||
*/
|
||||
this.u_texture = gl.getUniformLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'u_texture' : 'e');
|
||||
program, DEBUG_WEBGL ? 'u_texture' : 'e');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_position = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_position' : 'b');
|
||||
program, DEBUG_WEBGL ? 'a_position' : 'b');
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.a_texCoord = gl.getAttribLocation(
|
||||
program, _ol_.DEBUG_WEBGL ? 'a_texCoord' : 'c');
|
||||
program, DEBUG_WEBGL ? 'a_texCoord' : 'c');
|
||||
};
|
||||
|
||||
export default _ol_renderer_webgl_tilelayershader_Locations_;
|
||||
|
||||
Reference in New Issue
Block a user