API

Function ShaderMaterialParseFromFileAsync

  • Creates a new ShaderMaterial from a snippet saved in a remote file

    Parameters

    • name: Nullable<string>

      defines the name of the ShaderMaterial to create (can be null or empty to use the one from the json data)

    • url: string

      defines the url to load from

    • scene: Scene

      defines the hosting scene

    • rootUrl: string = ""

      defines the root URL to use to load textures and relative dependencies

    Returns Promise<ShaderMaterial>

    a promise that will resolve to the new ShaderMaterial