loadMaterial

suspend fun loadMaterial(fileLocation: String): Material?

Loads a Material from the contents of a Filamat file.

The material data is a binary blob produced by libfilamat or by matc.

Parameters

fileLocation

the .filamat file location:

  • A relative asset file location materials/mymaterial.filamat

  • An Android resource from the res folder context.getResourceUri(R.raw.mymaterial)

  • A File path Uri.fromFile(myMaterialFile).path

  • An http or https url https://mydomain.com/mymaterial.filamat