Capítulo 190 de 859

Chapter 190: NodeLoader

Core Idea

A loader for loading node objects in the three.js JSON Object/Scene format.

Key Concepts

  • nodes : Object.<string, Node.constructor>: Represents a dictionary of node types.
  • textures : Object.<string, Texture>: Represents a dictionary of textures.

Reference Tables

Constructor

Signature
new NodeLoader( manager : LoadingManager )

Properties

PropertyDescription
.nodes : Object.<string, Node.constructor>Represents a dictionary of node types.
.textures : Object.<string, Texture>Represents a dictionary of textures.

Methods

MethodDescription
.createNodeFromType( type : string ) : NodeCreates a node object from the given type.
.load( url : string, onLoad : function, onProgress : function, onError : function )Loads the node definitions from the given URL.
.parse( json : Object ) : NodeParses the node from the given JSON.
.parseNodes( json : Array.<Object> ) : Object.<string, Node>Parse the node dependencies for the loaded node.
.setNodes( value : Object.<string, Node.constructor> ) : NodeLoaderDefines the dictionary of node types.
.setTextures( value : Object.<string, Texture> ) : NodeLoaderDefines the dictionary of textures.

Key Takeaways

  1. NodeLoader extends: Loader
  2. Most relevant properties: nodes, textures.
  3. Key methods: createNodeFromType, load, parse, parseNodes.

Connects To