loadGlbFromBuffer abstract method

Future<ThermionEntity> loadGlbFromBuffer(
  1. Uint8List data, {
  2. int numInstances = 1,
  3. bool keepData = false,
  4. int priority = 4,
  5. int layer = 0,
  6. bool loadResourcesAsync,
})

Load the .glb asset from the specified buffer and insert into the scene. Specify numInstances to create multiple instances (this is more efficient than dynamically instantating at a later time). You can then retrieve the created instances with getInstances. If you want to be able to call createInstance at a later time, you must pass true for keepData. If keepData is false, the source glTF data will be released and createInstance will throw an exception. If loadResourcesAsync is true, resources (textures, materials, etc) will be loaded asynchronously (so expect some material/texture pop-in);

Implementation

Future<ThermionEntity> loadGlbFromBuffer(Uint8List data,
    {int numInstances = 1,
    bool keepData = false,
    int priority = 4,
    int layer = 0,
    bool loadResourcesAsync});