readFileBuffer

fun readFileBuffer(context: Context, fileLocation: String): ByteBuffer?

Load a file content buffer from a local source.

The file location can be:

  • A relative asset file location models/mymodel.glb

  • An android resource from the res folder context.getResourceUri(R.raw.mymodel)

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

  • An http or https url https://mydomain.com/mymodel.glb