loadMs3d static method

Future<Ms3dModel> loadMs3d(
  1. String path
)

Parsed MS3D (or SMD converted to the same structure), cached.

Implementation

static Future<Ms3dModel> loadMs3d(String path) {
  return _models.putIfAbsent(path, () async {
    if (path.toLowerCase().endsWith('.smd')) {
      return SmdFile.parse(await AssetPack.loadString(path)).toMesh();
    }
    return Ms3dModel.parse(await AssetPack.loadBytes(path));
  });
}