|
MaterialXMaterials 1.39.5
Utilities for retrieving materials from remote servers
|
JsPolyHavenAPILoader - A JavaScript class for interacting with the Poly Haven API Handles fetching materials, material details, and downloading MaterialX packages. More...
Public Member Functions | |
| constructor () | |
| Constructor for JsPolyHavenAPILoader. | |
| async | fetchMaterials () |
| Fetch all materials from Poly Haven API. | |
| processMaterialsData (rawData) | |
| Process raw materials data from API into structured format. | |
| async | fetchMaterialFiles (materialId) |
| Fetch MaterialX files data for a specific material. | |
| async | downloadMaterialXContent (url) |
| Download MaterialX content from URL. | |
| async | downloadTexture (url) |
| Download a texture file from URL. | |
| async | downloadThumbnail (thumbnailUrl) |
| Download thumbnail image. | |
| async | createMaterialXPackage (material, resolution) |
| Create a complete MaterialX package with all textures. | |
| async | getMaterialContent (materialId, resolution) |
| Get MaterialX content and texture files for preview. | |
JsPolyHavenAPILoader - A JavaScript class for interacting with the Poly Haven API Handles fetching materials, material details, and downloading MaterialX packages.
Definition at line 5 of file jsPolyHavenLoader.js.
| JsPolyHavenAPILoader::constructor | ( | ) |
Constructor for JsPolyHavenAPILoader.
Definition at line 9 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::createMaterialXPackage | ( | material, | |
| resolution ) |
Create a complete MaterialX package with all textures.
| material | Material object |
| resolution | Resolution (1k, 2k, 4k, 8k) |
Definition at line 174 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::downloadMaterialXContent | ( | url | ) |
Download MaterialX content from URL.
| url | - MaterialX file URL |
Definition at line 107 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::downloadTexture | ( | url | ) |
Download a texture file from URL.
| url | - Texture file URL |
Definition at line 129 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::downloadThumbnail | ( | thumbnailUrl | ) |
Download thumbnail image.
| thumbnailUrl | Thumbnail URL |
Definition at line 151 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::fetchMaterialFiles | ( | materialId | ) |
Fetch MaterialX files data for a specific material.
| materialId | - The material ID |
Definition at line 85 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::fetchMaterials | ( | ) |
Fetch all materials from Poly Haven API.
Definition at line 18 of file jsPolyHavenLoader.js.
| async JsPolyHavenAPILoader::getMaterialContent | ( | materialId, | |
| resolution ) |
Get MaterialX content and texture files for preview.
| materialId | Material ID |
| resolution | Resolution (1k, 2k, 4k, 8k) |
Definition at line 266 of file jsPolyHavenLoader.js.
| JsPolyHavenAPILoader::processMaterialsData | ( | rawData | ) |
Process raw materials data from API into structured format.
| rawData | - Raw data from API |
Definition at line 41 of file jsPolyHavenLoader.js.