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. | |
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 JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::constructor | ( | ) |
Constructor for the JsGPUOpenMaterialLoader class.
Definition at line 12 of file JsGPUOpenMaterialLoader.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 127 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 226 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::findMaterialsByName | ( | materialName | ) |
Find materials by name.
{string} | materialName - Regular expression to match the material name. |
Definition at line 184 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::getMaterialList | ( | ) |
Return downloaded material list.
Definition at line 33 of file JsGPUOpenMaterialLoader.js.
JsGPUOpenMaterialLoader::getMaterialNames | ( | ) |
Return downloaded material names.
Definition at line 41 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 50 of file JsGPUOpenMaterialLoader.js.