Skip to content

Commit 234945c

Browse files
s-rigaudSamuel Rigaud
andauthored
Node: Improve some types (#30110)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent 78edc1c commit 234945c

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

src/cameras/PerspectiveCamera.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class PerspectiveCamera extends Camera {
113113
* Sets minTarget and maxTarget to the coordinates of the lower-left and upper-right corners of the view rectangle.
114114
*
115115
* @param {number} distance
116-
* @param {number} minTarget
117-
* @param {number} maxTarget
116+
* @param {Vector2} minTarget
117+
* @param {Vector2} maxTarget
118118
*/
119119
getViewBounds( distance, minTarget, maxTarget ) {
120120

src/nodes/display/ColorSpaceNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ class ColorSpaceNode extends TempNode {
4646
/**
4747
* The source color space.
4848
*
49-
* @type {Node}
49+
* @type {String}
5050
*/
5151
this.source = source;
5252

5353
/**
5454
* The target color space.
5555
*
56-
* @type {Node}
56+
* @type {String}
5757
*/
5858
this.target = target;
5959

src/nodes/display/ToneMappingNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ToneMappingNode extends TempNode {
4949
/**
5050
* Represents the color to process.
5151
*
52-
* @type {Node}
52+
* @type {Node?}
5353
* @default null
5454
*/
5555
this.colorNode = colorNode;

src/nodes/lighting/AONode.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AONode extends LightingNode {
1818
/**
1919
* Constructs a new AO node.
2020
*
21-
* @param {Node<float>} aoNode - The ambient occlusion node.
21+
* @param {Node<float>?} [aoNode=null] - The ambient occlusion node.
2222
*/
2323
constructor( aoNode = null ) {
2424

@@ -27,7 +27,8 @@ class AONode extends LightingNode {
2727
/**
2828
* The ambient occlusion node.
2929
*
30-
* @type {Node<float>}
30+
* @type {Node<float>?}
31+
* @default null
3132
*/
3233
this.aoNode = aoNode;
3334

src/nodes/lighting/BasicLightMapNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class BasicLightMapNode extends LightingNode {
1919
/**
2020
* Constructs a new basic light map node.
2121
*
22-
* @param {Node<vec3>} lightMapNode - The light map node.
22+
* @param {Node<vec3>?} [lightMapNode=null] - The light map node.
2323
*/
2424
constructor( lightMapNode = null ) {
2525

@@ -28,7 +28,7 @@ class BasicLightMapNode extends LightingNode {
2828
/**
2929
* The light map node.
3030
*
31-
* @type {Node<vec3>}
31+
* @type {Node<vec3>?}
3232
*/
3333
this.lightMapNode = lightMapNode;
3434

src/nodes/lighting/EnvironmentNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class EnvironmentNode extends LightingNode {
3838
/**
3939
* A node representing the environment.
4040
*
41-
* @type {Node}
41+
* @type {Node?}
4242
* @default null
4343
*/
4444
this.envNode = envNode;

src/nodes/lighting/LightingContextNode.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class LightingContextNode extends ContextNode {
2020
* Constructs a new lighting context node.
2121
*
2222
* @param {LightsNode} node - The lights node.
23-
* @param {LightingModel} [lightingModel=null] - The current lighting model.
24-
* @param {Node<vec3>} [backdropNode=null] - A backdrop node.
25-
* @param {Node<float>} [backdropAlphaNode=null] - A backdrop alpha node.
23+
* @param {LightingModel?} [lightingModel=null] - The current lighting model.
24+
* @param {Node<vec3>?} [backdropNode=null] - A backdrop node.
25+
* @param {Node<float>?} [backdropAlphaNode=null] - A backdrop alpha node.
2626
*/
2727
constructor( node, lightingModel = null, backdropNode = null, backdropAlphaNode = null ) {
2828

@@ -31,23 +31,23 @@ class LightingContextNode extends ContextNode {
3131
/**
3232
* The current lighting model.
3333
*
34-
* @type {LightingModel}
34+
* @type {LightingModel?}
3535
* @default null
3636
*/
3737
this.lightingModel = lightingModel;
3838

3939
/**
4040
* A backdrop node.
4141
*
42-
* @type {Node<vec3>}
42+
* @type {Node<vec3>?}
4343
* @default null
4444
*/
4545
this.backdropNode = backdropNode;
4646

4747
/**
4848
* A backdrop alpha node.
4949
*
50-
* @type {Node<float>}
50+
* @type {Node<float>?}
5151
* @default null
5252
*/
5353
this.backdropAlphaNode = backdropAlphaNode;

src/nodes/math/ConditionalNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class ConditionalNode extends Node {
5353
/**
5454
* The node that is evaluate when the condition ends up `false`.
5555
*
56-
* @type {Node}
56+
* @type {Node?}
57+
* @default null
5758
*/
5859
this.elseNode = elseNode;
5960

0 commit comments

Comments
 (0)