Skip to content

Commit

Permalink
Docs: Clean up. (#30272)
Browse files Browse the repository at this point in the history
* Docs: Clean up.

* Update ChainMap.js
  • Loading branch information
Mugen87 authored Jan 6, 2025
1 parent c8662a2 commit 9f2dc5d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/nodes/accessors/MaterialNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,15 +520,15 @@ export const materialReflectivity = /*@__PURE__*/ nodeImmutable( MaterialNode, M

/**
* TSL object that represents the roughness of the current material.
* The value is composed via `roughness` * `roughnessMap.g`
* The value is composed via `roughness` * `roughnessMap.g`.
*
* @type {Node<float>}
*/
export const materialRoughness = /*@__PURE__*/ nodeImmutable( MaterialNode, MaterialNode.ROUGHNESS );

/**
* TSL object that represents the metalness of the current material.
* The value is composed via `metalness` * `metalnessMap.b`
* The value is composed via `metalness` * `metalnessMap.b`.
*
* @type {Node<float>}
*/
Expand All @@ -552,7 +552,7 @@ export const materialClearcoat = /*@__PURE__*/ nodeImmutable( MaterialNode, Mate

/**
* TSL object that represents the clearcoat roughness of the current material.
* The value is composed via `clearcoatRoughness` * `clearcoatRoughnessMap.r`
* The value is composed via `clearcoatRoughness` * `clearcoatRoughnessMap.r`.
*
* @type {Node<float>}
*/
Expand Down Expand Up @@ -583,7 +583,7 @@ export const materialSheen = /*@__PURE__*/ nodeImmutable( MaterialNode, Material

/**
* TSL object that represents the sheen roughness of the current material.
* The value is composed via `sheenRoughness` * `sheenRoughnessMap.a` .
* The value is composed via `sheenRoughness` * `sheenRoughnessMap.a`.
*
* @type {Node<float>}
*/
Expand Down
12 changes: 6 additions & 6 deletions src/nodes/display/BumpMapNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class BumpMapNode extends TempNode {
/**
* Constructs a new bump map node.
*
* @param {Node} textureNode - Represents the bump map data.
* @param {Node?} [scaleNode=null] - Controls the intensity of the bump effect.
* @param {Node<float>} textureNode - Represents the bump map data.
* @param {Node<float>?} [scaleNode=null] - Controls the intensity of the bump effect.
*/
constructor( textureNode, scaleNode = null ) {

Expand All @@ -76,14 +76,14 @@ class BumpMapNode extends TempNode {
/**
* Represents the bump map data.
*
* @type {Node}
* @type {Node<float>}
*/
this.textureNode = textureNode;

/**
* Controls the intensity of the bump effect.
*
* @type {Node?}
* @type {Node<float>?}
* @default null
*/
this.scaleNode = scaleNode;
Expand Down Expand Up @@ -111,8 +111,8 @@ export default BumpMapNode;
* TSL function for creating a bump map node.
*
* @function
* @param {Node} textureNode - Represents the bump map data.
* @param {Node?} [scaleNode=null] - Controls the intensity of the bump effect.
* @param {Node<float>} textureNode - Represents the bump map data.
* @param {Node<float>?} [scaleNode=null] - Controls the intensity of the bump effect.
* @returns {BumpMapNode}
*/
export const bumpMap = /*@__PURE__*/ nodeProxy( BumpMapNode );
12 changes: 6 additions & 6 deletions src/nodes/display/NormalMapNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class NormalMapNode extends TempNode {
/**
* Constructs a new normal map node.
*
* @param {Node} node - Represents the normal map data.
* @param {Node?} [scaleNode=null] - Controls the intensity of the effect.
* @param {Node<vec3>} node - Represents the normal map data.
* @param {Node<vec2>?} [scaleNode=null] - Controls the intensity of the effect.
*/
constructor( node, scaleNode = null ) {

Expand All @@ -69,14 +69,14 @@ class NormalMapNode extends TempNode {
/**
* Represents the normal map data.
*
* @type {Node}
* @type {Node<vec3>}
*/
this.node = node;

/**
* Controls the intensity of the effect.
*
* @type {Node?}
* @type {Node<vec2>?}
* @default null
*/
this.scaleNode = scaleNode;
Expand Down Expand Up @@ -142,8 +142,8 @@ export default NormalMapNode;
* TSL function for creating a normal map node.
*
* @function
* @param {Node} node - Represents the normal map data.
* @param {Node?} [scaleNode=null] - Controls the intensity of the effect.
* @param {Node<vec3>} node - Represents the normal map data.
* @param {Node<vec2>?} [scaleNode=null] - Controls the intensity of the effect.
* @returns {NormalMapNode}
*/
export const normalMap = /*@__PURE__*/ nodeProxy( NormalMapNode );
6 changes: 3 additions & 3 deletions src/renderers/common/ChainMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Data structure for the renderer. It allows defining values
* with chained, hierarchical keys. Keys are meant to be
* objects since the module internally works with Weak Maps
* for perforamnce reasons.
* for performance reasons.
*
* @private
*/
class ChainMap {

/**
* Constructs a new chained map.
* Constructs a new Chain Map.
*/
constructor() {

Expand Down Expand Up @@ -49,7 +49,7 @@ class ChainMap {
*
* @param {Array<Object>} keys - List of keys.
* @param {Any} value - The value to set.
* @return {ChainMap} A reference to this chain map.
* @return {ChainMap} A reference to this Chain Map.
*/
set( keys, value ) {

Expand Down
9 changes: 8 additions & 1 deletion utils/docs/jsdoc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"encoding": "utf8",
"package": "package.json",
"recurse": true,
"template": "node_modules/clean-jsdoc-theme"
"template": "node_modules/clean-jsdoc-theme",
"theme_opts": {
"homepageTitle": "three.js docs"
}
},
"plugins": [ "plugins/markdown" ],
"source": {
Expand All @@ -16,5 +19,9 @@
"src/renderers/common",
"src/renderers/webgpu"
]
},
"markdown": {
"hardwrap": false,
"idInHeadings": true
}
}

0 comments on commit 9f2dc5d

Please sign in to comment.