API

Function NodeMaterialParseFromFileAsync

  • Creates a node material from a snippet saved in a remote file

    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: NodeMaterial

      defines a material to use instead of creating a new one

    • OptionalurlRewriter: (url: string) => string

      defines 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