Skip to content

Docs: fix types #30791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/jsm/lines/LineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LineGeometry extends LineSegmentsGeometry {
/**
* Sets the given line positions for this geometry.
*
* @param {Float32|Array} array - The position data to set.
* @param {Float32Array|Array<number>} array - The position data to set.
* @return {LineGeometry} A reference to this geometry.
*/
setPositions( array ) {
Expand Down Expand Up @@ -74,7 +74,7 @@ class LineGeometry extends LineSegmentsGeometry {
/**
* Sets the given line colors for this geometry.
*
* @param {Float32|Array} array - The position data to set.
* @param {Float32Array|Array<number>} array - The position data to set.
* @return {LineGeometry} A reference to this geometry.
*/
setColors( array ) {
Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/lines/LineSegmentsGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {
* Sets the given line positions for this geometry. The length must be a multiple of six since
* each line segment is defined by a start end vertex in the pattern `(xyz xyz)`.
*
* @param {Float32|Array} array - The position data to set.
* @param {Float32Array|Array<number>} array - The position data to set.
* @return {LineSegmentsGeometry} A reference to this geometry.
*/
setPositions( array ) {
Expand Down Expand Up @@ -127,7 +127,7 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {
* Sets the given line colors for this geometry. The length must be a multiple of six since
* each line segment is defined by a start end color in the pattern `(rgb rgb)`.
*
* @param {Float32|Array} array - The position data to set.
* @param {Float32Array|Array<number>} array - The position data to set.
* @return {LineSegmentsGeometry} A reference to this geometry.
*/
setColors( array ) {
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/loaders/RGBMLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class RGBMLoader extends DataTextureLoader {
/**
* Sets the maximum range.
*
* @param {number} value - The maximum range to set.
* @param {(7|16)} value - The maximum range to set.
* @return {RGBMLoader} A reference to this loader.
*/
setMaxRange( value ) {
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/postprocessing/TAARenderPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TAARenderPass extends SSAARenderPass {
* @param {number} deltaTime - The delta time in seconds.
* @param {boolean} maskActive - Whether masking is active or not.
*/
render( renderer, writeBuffer, readBuffer, deltaTime ) {
render( renderer, writeBuffer, readBuffer, deltaTime/*, maskActive*/ ) {

if ( this.accumulate === false ) {

Expand Down
6 changes: 5 additions & 1 deletion src/loaders/nodes/NodeLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class NodeLoader extends Loader {
/**
* Parse the node dependencies for the loaded node.
*
* @param {Object} json - The JSON definition
* @param {Array<Object>} [json] - The JSON definition
* @return {Object<string,Node>} A dictionary with node dependencies.
*/
parseNodes( json ) {
Expand Down Expand Up @@ -119,6 +119,10 @@ class NodeLoader extends Loader {
* Parses the node from the given JSON.
*
* @param {Object} json - The JSON definition
* @param {string} json.type - The node type.
* @param {string} json.uuid - The node UUID.
* @param {Array<Object>} [json.nodes] - The node dependencies.
* @param {Object} [json.meta] - The meta data.
* @return {Node} The parsed node.
*/
parse( json ) {
Expand Down
6 changes: 3 additions & 3 deletions src/materials/Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Material extends EventDispatcher {
* Defines the blending equation.
*
* @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)}
* @default OneMinusSrcAlphaFactor
* @default AddEquation
*/
this.blendEquation = AddEquation;

Expand All @@ -174,8 +174,8 @@ class Material extends EventDispatcher {
/**
* Defines the blending equation of the alpha channel.
*
* @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)}
* @default OneMinusSrcAlphaFactor
* @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)}
* @default null
*/
this.blendEquationAlpha = null;

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/XRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class XRManager extends EventDispatcher {
/**
* Returns the environment blend mode from the current XR session.
*
* @return {?('opaque'|'additive'|'alpha-blend')} The environment blend mode. Returns `null` when used outside of a XR session.
* @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session.
*/
getEnvironmentBlendMode() {

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webxr/WebXRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class WebXRManager extends EventDispatcher {
/**
* Returns the environment blend mode from the current XR session.
*
* @return {?('opaque'|'additive'|'alpha-blend')} The environment blend mode. Returns `null` when used outside of a XR session.
* @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session.
*/
this.getEnvironmentBlendMode = function () {

Expand Down