mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
docfx も AutoGltfFileParser を使う
This commit is contained in:
@@ -58,14 +58,8 @@ See `SimpleViewer` sample.
|
||||
```cs
|
||||
GltfData Load(string path)
|
||||
{
|
||||
var ext = Path.GetExtension(path).ToLower();
|
||||
switch(ext)
|
||||
{
|
||||
case ".glb": return new GlbFileParser(path).Parse();
|
||||
case ".gltf": return new GltfFileWithResourceFilesParser(path).Parse();
|
||||
case ".zip": return new ZipArchivedGltfFileParser(path).Parse();
|
||||
default: throw new Exception($"unknown: {ext}");
|
||||
}
|
||||
// Detect type by file extension automatically
|
||||
return new AutoGltfFileParser(path).Parse();
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -58,14 +58,8 @@ GltfData Load(string path)
|
||||
```cs
|
||||
GltfData Load(string path)
|
||||
{
|
||||
var ext = Path.GetExtension(path).ToLower();
|
||||
switch(ext)
|
||||
{
|
||||
case ".glb": return new GlbFileParser(path).Parse();
|
||||
case ".gltf": return new GltfFileWithResourceFilesParser(path).Parse();
|
||||
case ".zip": return new ZipArchivedGltfFileParser(path).Parse();
|
||||
default: throw new Exception($"unknown: {ext}");
|
||||
}
|
||||
// ファイル拡張子で自動判定します
|
||||
return new AutoGltfFileParser(path).Parse();
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user