Capítulo 192 de 859

Chapter 192: NodeObjectLoader

Core Idea

A special type of object loader for loading 3D objects using 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 NodeObjectLoader( 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
.parse( json : Object, onLoad : function ) : Object3DParses the node objects from the given JSON.
.parseAsync( json : Object ) : Promise.<Object3D> (async)Async version of NodeObjectLoader#parse.
.parseMaterials( json : Object, textures : Object.<string, Texture> ) : Object.<string, NodeMaterial>Parses the node objects from the given JSON and textures.
.parseNodes( json : Array.<Object>, textures : Object.<string, Texture> ) : Object.<string, Node>Parses the node objects from the given JSON and textures.
.setNodeMaterials( value : Object.<string, NodeMaterial.constructor> ) : NodeObjectLoaderDefines the dictionary of node material types.
.setNodes( value : Object.<string, Node.constructor> ) : NodeObjectLoaderDefines the dictionary of node types.

Key Takeaways

  1. NodeObjectLoader extends: Loader → ObjectLoader
  2. Most relevant properties: nodeMaterials, nodes.
  3. Key methods: parse, parseAsync, parseMaterials, parseNodes.

Connects To