Define GlbBinaryParser

This commit is contained in:
Masataka SUMI
2021-08-25 19:00:52 +09:00
parent 3cfed7d500
commit ef1d54c2b0
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using System;
namespace UniGLTF
{
public sealed class GlbBinaryParser
{
private readonly byte[] _data;
private readonly string _name;
public GlbBinaryParser(byte[] data, string uniqueName)
{
_data = data;
if (string.IsNullOrWhiteSpace(uniqueName))
{
_name = Guid.NewGuid().ToString();
}
else
{
_name = uniqueName;
}
}
public GltfData Parse()
{
return new GlbLowLevelParser(_name, _data).Parse();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ba0fe1be89e041138d2937dc07e9fdca
timeCreated: 1629885479