Capítulo 191 de 859

Chapter 191: NodeMaterialLoader

Core Idea

A special type of material loader for loading node materials.

Key Concepts

  • nodeMaterials : Object.<string, NodeMaterial.constructor>: Represents a dictionary of node material types.
  • nodes : Object.<string, Node.constructor>: Represents a dictionary of node types.

Reference Tables

Constructor

Signature
new NodeMaterialLoader( manager : LoadingManager )

Properties

PropertyDescription
.nodeMaterials : Object.<string, NodeMaterial.constructor>Represents a dictionary of node material types.
.nodes : Object.<string, Node.constructor>Represents a dictionary of node types.

Methods

MethodDescription
.createMaterialFromType( type : string ) : NodeCreates a node material from the given type.
.parse( json : Object ) : NodeMaterialParses the node material from the given JSON.
.setNodeMaterials( value : Object.<string, NodeMaterial.constructor> ) : NodeLoaderDefines the dictionary of node material types.
.setNodes( value : Object.<string, Node.constructor> ) : NodeLoaderDefines the dictionary of node types.

Key Takeaways

  1. NodeMaterialLoader extends: Loader → MaterialLoader
  2. Most relevant properties: nodeMaterials, nodes.
  3. Key methods: createMaterialFromType, parse, setNodeMaterials, setNodes.

Connects To