diff --git a/src/nodes/core/NodeCache.js b/src/nodes/core/NodeCache.js index 73134eef9b9278..6e6861bba6c4e1 100644 --- a/src/nodes/core/NodeCache.js +++ b/src/nodes/core/NodeCache.js @@ -24,7 +24,7 @@ class NodeCache { /** * A weak map for managing node data. * - * @type {WeakMap} + * @type {WeakMap} */ this.nodesData = new WeakMap(); diff --git a/src/nodes/core/NodeFrame.js b/src/nodes/core/NodeFrame.js index e9140d72f0408f..57588d063627c6 100644 --- a/src/nodes/core/NodeFrame.js +++ b/src/nodes/core/NodeFrame.js @@ -48,21 +48,21 @@ class NodeFrame { /** * Used to control the {@link Node#update} call. * - * @type {WeakMap} + * @type {WeakMap} */ this.updateMap = new WeakMap(); /** * Used to control the {@link Node#updateBefore} call. * - * @type {WeakMap} + * @type {WeakMap} */ this.updateBeforeMap = new WeakMap(); /** * Used to control the {@link Node#updateAfter} call. * - * @type {WeakMap} + * @type {WeakMap} */ this.updateAfterMap = new WeakMap(); @@ -113,7 +113,7 @@ class NodeFrame { * is used to correctly call node update methods per frame or render. * * @private - * @param {WeakMap} referenceMap - The reference weak map. + * @param {WeakMap} referenceMap - The reference weak map. * @param {Node} nodeRef - The reference to the current node. * @return {Object} The dictionary. */ diff --git a/src/nodes/core/ParameterNode.js b/src/nodes/core/ParameterNode.js index 744d453a035349..9f265b91a8adc5 100644 --- a/src/nodes/core/ParameterNode.js +++ b/src/nodes/core/ParameterNode.js @@ -51,4 +51,10 @@ class ParameterNode extends PropertyNode { export default ParameterNode; +/** + * + * @param {string} type + * @param {string?} [name=null] + * @returns {ShaderNodeObject} + */ export const parameter = ( type, name ) => nodeObject( new ParameterNode( type, name ) ); diff --git a/src/nodes/core/TempNode.js b/src/nodes/core/TempNode.js index 53a0bea55aaea2..d3b8d6a504a44a 100644 --- a/src/nodes/core/TempNode.js +++ b/src/nodes/core/TempNode.js @@ -19,11 +19,11 @@ class TempNode extends Node { /** * Constructs a temp node. * - * @param {String} type - The node type. + * @param {String?} nodeType - The node type. */ - constructor( type ) { + constructor( nodeType = null ) { - super( type ); + super( nodeType ); /** * This flag can be used for type testing. diff --git a/src/nodes/display/ToonOutlinePassNode.js b/src/nodes/display/ToonOutlinePassNode.js index 9f1d2880d5fc13..127d60d78acf04 100644 --- a/src/nodes/display/ToonOutlinePassNode.js +++ b/src/nodes/display/ToonOutlinePassNode.js @@ -68,7 +68,7 @@ class ToonOutlinePassNode extends PassNode { * An internal material cache. * * @private - * @type {WeakMap} + * @type {WeakMap} */ this._materialCache = new WeakMap(); diff --git a/src/nodes/pmrem/PMREMNode.js b/src/nodes/pmrem/PMREMNode.js index ec14b1a3e99162..a72dbaec579b1a 100644 --- a/src/nodes/pmrem/PMREMNode.js +++ b/src/nodes/pmrem/PMREMNode.js @@ -127,7 +127,7 @@ class PMREMNode extends TempNode { * Reference to the generated PMREM. * * @private - * @type {Texture} + * @type {Texture | null} * @default null */ this._pmrem = null; diff --git a/src/nodes/utils/LoopNode.js b/src/nodes/utils/LoopNode.js index 9b2bb128d85046..c6c0e1da05a7d7 100644 --- a/src/nodes/utils/LoopNode.js +++ b/src/nodes/utils/LoopNode.js @@ -58,7 +58,7 @@ class LoopNode extends Node { */ getVarName( index ) { - return String.fromCharCode( 'i'.charCodeAt() + index ); + return String.fromCharCode( 'i'.charCodeAt( 0 ) + index ); } diff --git a/src/nodes/utils/RTTNode.js b/src/nodes/utils/RTTNode.js index 8ba77872a123c1..ca81720d82b408 100644 --- a/src/nodes/utils/RTTNode.js +++ b/src/nodes/utils/RTTNode.js @@ -17,7 +17,7 @@ const _size = /*@__PURE__*/ new Vector2(); * texture input for their effects. With the helper function `convertToTexture()` which is based * on this module, the node system can automatically ensure texture input if required. * - * @augments Node + * @augments TextureNode */ class RTTNode extends TextureNode { diff --git a/src/nodes/utils/ReflectorNode.js b/src/nodes/utils/ReflectorNode.js index 8ee3eee6e60966..c6bd6e1b5d35f5 100644 --- a/src/nodes/utils/ReflectorNode.js +++ b/src/nodes/utils/ReflectorNode.js @@ -267,7 +267,7 @@ class ReflectorBaseNode extends Node { /** * Weak map for managing render targets. * - * @type {WeakMap} + * @type {WeakMap} */ this.renderTargets = new WeakMap(); @@ -299,7 +299,7 @@ class ReflectorBaseNode extends Node { } /** - * Returns a virtual camera for the given camera. The virutal camera is used to + * Returns a virtual camera for the given camera. The virtual camera is used to * render the scene from the reflector's view so correct reflections can be produced. * * @param {Camera} camera - The scene's camera.