Harmonize jsdoc

This commit is contained in:
Simon Seyock
2021-02-02 11:44:44 +01:00
parent d6d18d46a8
commit f590cb3473
26 changed files with 86 additions and 86 deletions
+2 -2
View File
@@ -160,10 +160,10 @@ class ImageStyle {
return abstract();
}
/*
/**
* Get the image pixel ratio.
* @param {number} pixelRatio Pixel ratio.
* */
*/
getPixelRatio(pixelRatio) {
return 1;
}
+3 -3
View File
@@ -240,10 +240,10 @@ class RegularShape extends ImageStyle {
return this.canvas_[pixelRatio || 1];
}
/*
/**
* Get the image pixel ratio.
* @param {number} pixelRatio Pixel ratio.
* */
*/
getPixelRatio(pixelRatio) {
return pixelRatio;
}
@@ -339,7 +339,7 @@ class RegularShape extends ImageStyle {
unlistenImageChange(listener) {}
/**
* @returns {RenderOptions} The render options
* @return {RenderOptions} The render options
* @protected
*/
createRenderOptions() {
+7 -7
View File
@@ -110,7 +110,7 @@ export const Operators = {};
* Returns the possible types for a given value (each type being a binary flag)
* To test a value use e.g. `getValueType(v) & ValueTypes.BOOLEAN`
* @param {ExpressionValue} value Value
* @returns {ValueTypes|number} Type or types inferred from the value
* @return {ValueTypes|number} Type or types inferred from the value
*/
export function getValueType(value) {
if (typeof value === 'number') {
@@ -175,7 +175,7 @@ export function isTypeUnique(valueType) {
/**
* Will return the number as a float with a dot separator, which is required by GLSL.
* @param {number} v Numerical value.
* @returns {string} The value as string.
* @return {string} The value as string.
*/
export function numberToGlsl(v) {
const s = v.toString();
@@ -185,7 +185,7 @@ export function numberToGlsl(v) {
/**
* Will return the number array as a float with a dot separator, concatenated with ', '.
* @param {Array<number>} array Numerical values array.
* @returns {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.
* @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.
*/
export function arrayToGlsl(array) {
if (array.length < 2 || array.length > 4) {
@@ -201,7 +201,7 @@ export function arrayToGlsl(array) {
* @param {string|import("../color.js").Color} color Color either in string format or [r, g, b, a] array format,
* with RGB components in the 0..255 range and the alpha component in the 0..1 range.
* Note that the final array will always have 4 components.
* @returns {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.
* @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.
*/
export function colorToGlsl(color) {
const array = asArray(color).slice();
@@ -219,7 +219,7 @@ export function colorToGlsl(color) {
* Returns a stable equivalent number for the string literal.
* @param {ParsingContext} context Parsing context
* @param {string} string String literal value
* @returns {number} Number equivalent
* @return {number} Number equivalent
*/
export function getStringNumberEquivalent(context, string) {
if (context.stringLiteralsMap[string] === undefined) {
@@ -235,7 +235,7 @@ export function getStringNumberEquivalent(context, string) {
* converted to be a GLSL-compatible string.
* @param {ParsingContext} context Parsing context
* @param {string} string String literal value
* @returns {string} GLSL-compatible string containing a number
* @return {string} GLSL-compatible string containing a number
*/
export function stringToGlsl(context, string) {
return numberToGlsl(getStringNumberEquivalent(context, string));
@@ -247,7 +247,7 @@ export function stringToGlsl(context, string) {
* @param {ParsingContext} context Parsing context
* @param {ExpressionValue} value Value
* @param {ValueTypes|number} [typeHint] Hint for the expected final type (can be several types combined)
* @returns {string} GLSL-compatible output
* @return {string} GLSL-compatible output
*/
export function expressionToGlsl(context, value, typeHint) {
// operator