Move jsdoc constructor comments
This commit is contained in:
@@ -12,39 +12,39 @@ const BufferUsage = {
|
||||
DYNAMIC_DRAW: DYNAMIC_DRAW
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Array.<number>=} opt_arr Array.
|
||||
* @param {number=} opt_usage Usage.
|
||||
* @struct
|
||||
*/
|
||||
|
||||
class WebGLBuffer {
|
||||
|
||||
/**
|
||||
* @param {Array.<number>=} opt_arr Array.
|
||||
* @param {number=} opt_usage Usage.
|
||||
*/
|
||||
constructor(opt_arr, opt_usage) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.arr_ = opt_arr !== undefined ? opt_arr : [];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.usage_ = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Array.<number>} Array.
|
||||
*/
|
||||
* @return {Array.<number>} Array.
|
||||
*/
|
||||
getArray() {
|
||||
return this.arr_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number} Usage.
|
||||
*/
|
||||
* @return {number} Usage.
|
||||
*/
|
||||
getUsage() {
|
||||
return this.usage_;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@ import ContextEventType from '../webgl/ContextEventType.js';
|
||||
* @classdesc
|
||||
* A WebGL context for accessing low-level WebGL capabilities.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/Disposable}
|
||||
* @param {HTMLCanvasElement} canvas Canvas.
|
||||
* @param {WebGLRenderingContext} gl GL.
|
||||
*/
|
||||
class WebGLContext {
|
||||
|
||||
/**
|
||||
* @param {HTMLCanvasElement} canvas Canvas.
|
||||
* @param {WebGLRenderingContext} gl GL.
|
||||
*/
|
||||
constructor(canvas, gl) {
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,19 +6,20 @@ import {FRAGMENT_SHADER} from '../webgl.js';
|
||||
import WebGLShader from '../webgl/Shader.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {module:ol/webgl/Shader}
|
||||
* @param {string} source Source.
|
||||
* @struct
|
||||
*/
|
||||
class WebGLFragment {
|
||||
|
||||
/**
|
||||
* @param {string} source Source.
|
||||
*/
|
||||
constructor(source) {
|
||||
WebGLShader.call(this, source);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
* @inheritDoc
|
||||
*/
|
||||
getType() {
|
||||
return FRAGMENT_SHADER;
|
||||
}
|
||||
|
||||
@@ -4,31 +4,32 @@
|
||||
import {FALSE} from '../functions.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @param {string} source Source.
|
||||
* @struct
|
||||
*/
|
||||
class WebGLShader {
|
||||
|
||||
/**
|
||||
* @param {string} source Source.
|
||||
*/
|
||||
constructor(source) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
*/
|
||||
* @private
|
||||
* @type {string}
|
||||
*/
|
||||
this.source_ = source;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @return {number} Type.
|
||||
*/
|
||||
* @abstract
|
||||
* @return {number} Type.
|
||||
*/
|
||||
getType() {}
|
||||
|
||||
/**
|
||||
* @return {string} Source.
|
||||
*/
|
||||
* @return {string} Source.
|
||||
*/
|
||||
getSource() {
|
||||
return this.source_;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,20 @@ import {VERTEX_SHADER} from '../webgl.js';
|
||||
import WebGLShader from '../webgl/Shader.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {module:ol/webgl/Shader}
|
||||
* @param {string} source Source.
|
||||
* @struct
|
||||
*/
|
||||
class WebGLVertex {
|
||||
|
||||
/**
|
||||
* @param {string} source Source.
|
||||
*/
|
||||
constructor(source) {
|
||||
WebGLShader.call(this, source);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
* @inheritDoc
|
||||
*/
|
||||
getType() {
|
||||
return VERTEX_SHADER;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,12 @@
|
||||
|
||||
import {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {WebGLRenderingContext} gl GL.
|
||||
* @param {WebGLProgram} program Program.
|
||||
* @struct
|
||||
*/
|
||||
class Locations {
|
||||
|
||||
/**
|
||||
* @param {WebGLRenderingContext} gl GL.
|
||||
* @param {WebGLProgram} program Program.
|
||||
*/
|
||||
constructor(gl, program) {
|
||||
{{#uniforms}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user