loadFileBuffer

suspend fun loadFileBuffer(context: Context, fileLocation: String): ByteBuffer?

Load a file content buffer from different sources.

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