loadGlb method
Implementation
@override
Future<ThermionEntity> loadGlb(String path,
{bool unlit = false, int numInstances = 1}) async {
if (unlit) {
throw Exception("Not yet implemented");
}
final pathPtr = path.toNativeUtf8(allocator: allocator).cast<Char>();
var entity = await withIntCallback((callback) =>
load_glb_ffi(_sceneManager!, pathPtr, numInstances, callback));
allocator.free(pathPtr);
if (entity == _FILAMENT_ASSET_ERROR) {
throw Exception("An error occurred loading the asset at $path");
}
_scene!.registerEntity(entity);
return entity;
}