mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-21 18:15:39 -05:00
Implements Parser variants.
This commit is contained in:
@@ -83,14 +83,11 @@ namespace VRM.Samples
|
||||
return;
|
||||
}
|
||||
|
||||
var bytes = File.ReadAllBytes(path);
|
||||
// なんらかの方法でByte列を得た
|
||||
|
||||
// GLB形式でJSONを取得しParseします
|
||||
var parser = new IGltfData();
|
||||
parser.Parse(path, bytes);
|
||||
var data = new GlbFileParser(path).Parse();
|
||||
// var data = new GlbBinaryParser(anyBinary).Parse();
|
||||
|
||||
using (var context = new VRMImporterContext(parser))
|
||||
using (var context = new VRMImporterContext(data))
|
||||
{
|
||||
// metaを取得(todo: thumbnailテクスチャのロード)
|
||||
var meta = await context.ReadMetaAsync();
|
||||
@@ -128,14 +125,11 @@ namespace VRM.Samples
|
||||
return;
|
||||
}
|
||||
|
||||
var bytes = File.ReadAllBytes(path);
|
||||
// なんらかの方法でByte列を得た
|
||||
|
||||
// GLB形式でJSONを取得しParseします
|
||||
var parser = new IGltfData();
|
||||
parser.ParseGlb(bytes);
|
||||
var data = new GlbFileParser(path).Parse();
|
||||
// var data = new GlbBinaryParser(anyBinary).Parse();
|
||||
|
||||
var context = new VRMImporterContext(parser);
|
||||
var context = new VRMImporterContext(data);
|
||||
var loaded = default(RuntimeGltfInstance);
|
||||
if (m_loadAsync)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user