Home > @gglib/content-loaders > loadMaterialOptionsToMaterial

loadMaterialOptionsToMaterial variable

Instantiates a Material from MaterialOptions


loadMaterialOptionsToMaterial: Loader<MaterialOptions, Material>


Effects are resolved as follows - if effectUri is set, pipeline for Material.OptionsUri -> Material.Options is run - if technique is set, pipeline for Material.OptionsTechnique -> Material.Options is run - if effect is type of object, pipeline for ShaderEffect.Options -> ShaderEffect is run - if effect is instance of ShaderEffect, it is kept as is - It is an error, if in the end no instance of ShaderEffect could be resolved

The parameters are processed in a way, that values having type of string are interpreted as texture URIs