Consistent use of Array and Object types
This commit is contained in:
@@ -52,7 +52,7 @@ class ZoomSlider extends Control {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {!Array.<import("../events.js").EventsKey>}
|
* @type {!Array<import("../events.js").EventsKey>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.dragListenerKeys_ = [];
|
this.dragListenerKeys_ = [];
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export class SelectEvent extends Event {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Original feature styles to reset to when features are no longer selected.
|
* Original feature styles to reset to when features are no longer selected.
|
||||||
* @type {Object.<number, import("../style/Style.js").default|Array.<import("../style/Style.js").default>|import("../style/Style.js").StyleFunction>}
|
* @type {Object<number, import("../style/Style.js").default|Array<import("../style/Style.js").default>|import("../style/Style.js").StyleFunction>}
|
||||||
*/
|
*/
|
||||||
const originalFeatureStyles = {};
|
const originalFeatureStyles = {};
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ class Select extends Interaction {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {import("../style/Style.js").default|Array.<import("../style/Style.js").default>|import("../style/Style.js").StyleFunction|null}
|
* @type {import("../style/Style.js").default|Array<import("../style/Style.js").default>|import("../style/Style.js").StyleFunction|null}
|
||||||
*/
|
*/
|
||||||
this.style_ =
|
this.style_ =
|
||||||
options.style !== undefined ? options.style : getDefaultStyleFunction();
|
options.style !== undefined ? options.style : getDefaultStyleFunction();
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ export const WebGLWorkerMessageType = {
|
|||||||
* the main canvas that will then be sampled up (useful for saving resource on blur steps).
|
* the main canvas that will then be sampled up (useful for saving resource on blur steps).
|
||||||
* @property {string} [vertexShader] Vertex shader source
|
* @property {string} [vertexShader] Vertex shader source
|
||||||
* @property {string} [fragmentShader] Fragment shader source
|
* @property {string} [fragmentShader] Fragment shader source
|
||||||
* @property {Object.<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process step
|
* @property {Object<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process step
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.
|
* @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.
|
||||||
* @property {Object.<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process steps
|
* @property {Object<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process steps
|
||||||
* @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions
|
* @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import {listen, unlistenByKey} from '../../events.js';
|
|||||||
* @property {string} fragmentShader Fragment shader source, mandatory.
|
* @property {string} fragmentShader Fragment shader source, mandatory.
|
||||||
* @property {string} [hitVertexShader] Vertex shader source for hit detection rendering.
|
* @property {string} [hitVertexShader] Vertex shader source for hit detection rendering.
|
||||||
* @property {string} [hitFragmentShader] Fragment shader source for hit detection rendering.
|
* @property {string} [hitFragmentShader] Fragment shader source for hit detection rendering.
|
||||||
* @property {Object.<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process steps
|
* @property {Object<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process steps
|
||||||
* Please note that `u_texture` is reserved for the main texture slot.
|
* Please note that `u_texture` is reserved for the main texture slot.
|
||||||
* @property {Array<import("./Layer").PostProcessesOptions>} [postProcesses] Post-processes definitions
|
* @property {Array<import("./Layer").PostProcessesOptions>} [postProcesses] Post-processes definitions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export class Processor extends Disposable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Run operation on input data.
|
* Run operation on input data.
|
||||||
* @param {Array.<Array|ImageData>} inputs Array of pixels or image data
|
* @param {Array<Array|ImageData>} inputs Array of pixels or image data
|
||||||
* (depending on the operation type).
|
* (depending on the operation type).
|
||||||
* @param {Object} meta A user data object. This is passed to all operations
|
* @param {Object} meta A user data object. This is passed to all operations
|
||||||
* and must be serializable.
|
* and must be serializable.
|
||||||
|
|||||||
@@ -92,12 +92,12 @@ export const AttributeType = {
|
|||||||
* the main canvas which will then be sampled up (useful for saving resource on blur steps).
|
* the main canvas which will then be sampled up (useful for saving resource on blur steps).
|
||||||
* @property {string} [vertexShader] Vertex shader source
|
* @property {string} [vertexShader] Vertex shader source
|
||||||
* @property {string} [fragmentShader] Fragment shader source
|
* @property {string} [fragmentShader] Fragment shader source
|
||||||
* @property {Object.<string,UniformValue>} [uniforms] Uniform definitions for the post process step
|
* @property {Object<string,UniformValue>} [uniforms] Uniform definitions for the post process step
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {Object.<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform
|
* @property {Object<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform
|
||||||
* names in the provided or default shaders.
|
* names in the provided or default shaders.
|
||||||
* @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions
|
* @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions
|
||||||
*/
|
*/
|
||||||
@@ -311,13 +311,13 @@ class WebGLHelper extends Disposable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {Object.<string, WebGLUniformLocation>}
|
* @type {Object<string, WebGLUniformLocation>}
|
||||||
*/
|
*/
|
||||||
this.uniformLocations_ = {};
|
this.uniformLocations_ = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {Object.<string, number>}
|
* @type {Object<string, number>}
|
||||||
*/
|
*/
|
||||||
this.attribLocations_ = {};
|
this.attribLocations_ = {};
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const DEFAULT_FRAGMENT_SHADER = `
|
|||||||
* the main canvas that will then be sampled up (useful for saving resource on blur steps).
|
* the main canvas that will then be sampled up (useful for saving resource on blur steps).
|
||||||
* @property {string} [vertexShader] Vertex shader source
|
* @property {string} [vertexShader] Vertex shader source
|
||||||
* @property {string} [fragmentShader] Fragment shader source
|
* @property {string} [fragmentShader] Fragment shader source
|
||||||
* @property {Object.<string,import("./Helper").UniformValue>} [uniforms] Uniform definitions for the post process step
|
* @property {Object<string,import("./Helper").UniformValue>} [uniforms] Uniform definitions for the post process step
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ ${hitDetectionBypass}
|
|||||||
/**
|
/**
|
||||||
* @typedef {Object} StyleParseResult
|
* @typedef {Object} StyleParseResult
|
||||||
* @property {ShaderBuilder} builder Shader builder pre-configured according to a given style
|
* @property {ShaderBuilder} builder Shader builder pre-configured according to a given style
|
||||||
* @property {Object.<string,import("./Helper").UniformValue>} uniforms Uniform definitions.
|
* @property {Object<string,import("./Helper").UniformValue>} uniforms Uniform definitions.
|
||||||
* @property {Array<import("../renderer/webgl/PointsLayer").CustomAttribute>} attributes Attribute descriptions.
|
* @property {Array<import("../renderer/webgl/PointsLayer").CustomAttribute>} attributes Attribute descriptions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -522,7 +522,7 @@ export function parseLiteralStyle(style) {
|
|||||||
builder.setFragmentDiscardExpression(`!${parsedFilter}`);
|
builder.setFragmentDiscardExpression(`!${parsedFilter}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {Object.<string,import("../webgl/Helper").UniformValue>} */
|
/** @type {Object<string,import("../webgl/Helper").UniformValue>} */
|
||||||
const uniforms = {};
|
const uniforms = {};
|
||||||
|
|
||||||
// define one uniform per variable
|
// define one uniform per variable
|
||||||
|
|||||||
Reference in New Issue
Block a user