API

Variable ShaderMaterialCreateFromSnippetAsyncConst

ShaderMaterialCreateFromSnippetAsync: (
    this: void | typeof ShaderMaterial,
    snippetId: string,
    scene: Scene,
    rootUrl?: string,
) => Promise<ShaderMaterial> = ShaderMaterialParseFromSnippetAsync

Creates a ShaderMaterial from a snippet saved by the Inspector

Type Declaration

    • (
          this: void | typeof ShaderMaterial,
          snippetId: string,
          scene: Scene,
          rootUrl?: string,
      ): Promise<ShaderMaterial>
    • Creates a ShaderMaterial from a snippet saved by the Inspector

      Parameters

      • this: void | typeof ShaderMaterial
      • snippetId: string

        defines the snippet to load

      • 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

Please use ShaderMaterialParseFromSnippetAsync instead

defines the snippet to load

defines the hosting scene

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

a promise that will resolve to the new ShaderMaterial