fromType

suspend fun fromType(type: String, uniforms: ERROR CLASS: Symbol not found for JsAny?? = definedExternally): Material(source)

Creates a new material using an existing material type and returns a promise that resolves when all of the material's resources have been loaded.

const material = await Material.fromTypeAsync('Image', {
image: '../Images/Cesium_Logo_overlay.png'
});

Return

A promise that resolves to a new material object when all resources are loaded.

Parameters

type

The base material type.

uniforms

Overrides for the default uniforms.

See also