Function NodeMaterialParseFromFileAsync
-
NodeMaterialParseFromFileAsync(
name: string,
url: string,
scene: Scene,
rootUrl?: string,
skipBuild?: boolean,
targetMaterial?: NodeMaterial,
urlRewriter?: (url: string) => string,
options?: Partial<INodeMaterialOptions>,
): Promise<NodeMaterial>Parameters
- name: string
defines the name of the material to create
- url: string
defines the url to load from
- scene: Scene
defines the hosting scene
- rootUrl: string = ""
defines the root URL for nested url in the node material
- skipBuild: boolean = false
defines whether to build the node material
OptionaltargetMaterial: NodeMaterialdefines a material to use instead of creating a new one
OptionalurlRewriter: (url: string) => stringdefines a function used to rewrite urls
Optionaloptions: Partial<INodeMaterialOptions>defines options to be used with the node material
Returns Promise<NodeMaterial>
a promise that will resolve to the new node material
- name: string
Creates a node material from a snippet saved in a remote file