Skip to content

Commit

Permalink
Renderer: move .nodes.library -> .library
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag committed Oct 13, 2024
1 parent 0220bf6 commit 05c4cd2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/nodes/core/NodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ class NodeBuilder {

if ( material !== null ) {

let nodeMaterial = renderer.nodes.library.fromMaterial( material );
let nodeMaterial = renderer.library.fromMaterial( material );

if ( nodeMaterial === null ) {

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/display/ColorSpaceNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ColorSpaceNode extends TempNode {

let outputNode = null;

const colorSpaceFn = renderer.nodes.library.getColorSpaceFunction( colorSpace );
const colorSpaceFn = renderer.library.getColorSpaceFunction( colorSpace );

if ( colorSpaceFn !== null ) {

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/display/ToneMappingNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ToneMappingNode extends TempNode {

let outputNode = null;

const toneMappingFn = builder.renderer.nodes.library.getToneMappingFunction( toneMapping );
const toneMappingFn = builder.renderer.library.getToneMappingFunction( toneMapping );

if ( toneMappingFn !== null ) {

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/lighting/LightsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class LightsNode extends Node {
const previousLightNodes = this._lightNodes;

const lights = sortLights( this._lights );
const nodeLibrary = builder.renderer.nodes.library;
const nodeLibrary = builder.renderer.library;

for ( const light of lights ) {

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ class Renderer {
this.info = new Info();

this.nodes = {
library: new NodeLibrary(),
modelViewMatrix: null,
modelNormalViewMatrix: null
};

this.library = new NodeLibrary();
// internals

this._getFallback = getFallback;
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgpu/WebGPURenderer.Nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class WebGPURenderer extends Renderer {

super( backend, parameters );

this.nodes.library = new BasicNodeLibrary();
this.library = new BasicNodeLibrary();

this.isWebGPURenderer = true;

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgpu/WebGPURenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class WebGPURenderer extends Renderer {
//super( new Proxy( backend, debugHandler ) );
super( backend, parameters );

this.nodes.library = new StandardNodeLibrary();
this.library = new StandardNodeLibrary();

this.isWebGPURenderer = true;

Expand Down

0 comments on commit 05c4cd2

Please sign in to comment.