Skip to content

Commit 17c0082

Browse files
authored
ContextNode: Rename .context -> .value (#29131)
1 parent 27f38e3 commit 17c0082

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/nodes/core/ContextNode.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { addNodeElement, nodeProxy } from '../shadernode/ShaderNode.js';
33

44
class ContextNode extends Node {
55

6-
constructor( node, context = {} ) {
6+
constructor( node, value = {} ) {
77

88
super();
99

1010
this.isContextNode = true;
1111

1212
this.node = node;
13-
this.context = context;
13+
this.value = value;
1414

1515
}
1616

@@ -30,7 +30,7 @@ class ContextNode extends Node {
3030

3131
const previousContext = builder.getContext();
3232

33-
builder.setContext( { ...builder.context, ...this.context } );
33+
builder.setContext( { ...builder.context, ...this.value } );
3434

3535
const node = this.node.build( builder );
3636

@@ -44,7 +44,7 @@ class ContextNode extends Node {
4444

4545
const previousContext = builder.getContext();
4646

47-
builder.setContext( { ...builder.context, ...this.context } );
47+
builder.setContext( { ...builder.context, ...this.value } );
4848

4949
const snippet = this.node.build( builder, output );
5050

src/nodes/lighting/LightingContextNode.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class LightingContextNode extends ContextNode {
1212
this.backdropNode = backdropNode;
1313
this.backdropAlphaNode = backdropAlphaNode;
1414

15-
this._context = null;
15+
this._value = null;
1616

1717
}
1818

@@ -48,8 +48,8 @@ class LightingContextNode extends ContextNode {
4848

4949
setup( builder ) {
5050

51-
this.context = this._context || ( this._context = this.getContext() );
52-
this.context.lightingModel = this.lightingModel || builder.context.lightingModel;
51+
this.value = this._value || ( this._value = this.getContext() );
52+
this.value.lightingModel = this.lightingModel || builder.context.lightingModel;
5353

5454
return super.setup( builder );
5555

0 commit comments

Comments
 (0)