MaterialXWeb 0.0.2
Utilities for using MaterialX Packages with Web clients
|
Class to download MaterialX materials from the GPUOpen material database. More...
Public Member Functions | |
constructor () | |
Constructor for the JsGPUOpenMaterialLoader class. | |
loadMaterialsFromCache () | |
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) |
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 18 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::constructor | ( | ) |
Constructor for the JsGPUOpenMaterialLoader class.
Definition at line 23 of file JsGPUOpenMaterialLoader.js.
async JsGPUOpenMaterialLoader::downloadPackage | ( | listNumber, | |
materialNumber, | |||
packageId = 0 ) |
Definition at line 157 of file JsGPUOpenMaterialLoader.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 256 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::findMaterialsByName | ( | materialName | ) |
Find materials by name.
{string} | materialName - Regular expression to match the material name. |
Definition at line 214 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::getMaterialList | ( | ) |
Return downloaded material list.
Definition at line 63 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::getMaterialNames | ( | ) |
Return downloaded material names.
Definition at line 78 of file JsGPUOpenMaterialLoader.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 87 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::loadMaterialsFromCache | ( | ) |
Definition at line 40 of file JsGPUOpenMaterialLoader.js.