MaterialXMaterials 0.0.1
Utilities for retrieving materials from remote servers
|
Class to download MaterialX materials from the GPUOpen material database. More...
Public Member Functions | |
constructor () | |
Constructor for the JsGPUOpenMaterialLoader class. | |
getMaterialList () | |
Return downloaded material list. | |
getMaterialNames () | |
Return downloaded material names. | |
async | getMaterials (batchSize=50) |
Get lists of materials from the GPUOpen material database. | |
async | downloadPackage (listNumber, materialNumber, packageId=0) |
Download a material package from the GPUOpen material database. | |
findMaterialsByName (materialName) | |
Find materials by name. | |
async | downloadPackageByExpression (searchExpr, packageId=0) |
Download a material package by string expression. | |
Class to download MaterialX materials from the GPUOpen material database.
The class provides methods to fetch materials and download material packages. The class uses the fetch API to make HTTP requests. The class is intended to be used in a Node.js environment.
Definition at line 8 of file JsGPUOpenLoader.js.
JsGPUOpenMaterialLoader::constructor | ( | ) |
Constructor for the JsGPUOpenMaterialLoader class.
Definition at line 12 of file JsGPUOpenLoader.js.
async JsGPUOpenMaterialLoader::downloadPackage | ( | listNumber, | |
materialNumber, | |||
packageId = 0 ) |
Download a material package from the GPUOpen material database.
{number} | listNumber - Index of the material list |
{number} | materialNumber - Index of the material in the list |
{number} | packageId - Index of the package in the material |
Definition at line 122 of file JsGPUOpenLoader.js.
async JsGPUOpenMaterialLoader::downloadPackageByExpression | ( | searchExpr, | |
packageId = 0 ) |
Download a material package by string expression.
{string} | searchExpr - Regular expression to match the material name |
{number} | packageId - Index of the package in the material |
Definition at line 224 of file JsGPUOpenLoader.js.
JsGPUOpenMaterialLoader::findMaterialsByName | ( | materialName | ) |
Find materials by name.
{string} | materialName - Regular expression to match the material name. |
Definition at line 182 of file JsGPUOpenLoader.js.
JsGPUOpenMaterialLoader::getMaterialList | ( | ) |
Return downloaded material list.
Definition at line 26 of file JsGPUOpenLoader.js.
JsGPUOpenMaterialLoader::getMaterialNames | ( | ) |
Return downloaded material names.
Definition at line 34 of file JsGPUOpenLoader.js.
async JsGPUOpenMaterialLoader::getMaterials | ( | batchSize = 50 | ) |
Get lists of materials from the GPUOpen material database.
{number} | batchSize - Number of materials to fetch per batch |
Definition at line 43 of file JsGPUOpenLoader.js.