public static GLTFRoot ParseJson(Stream stream, long startPosition = 0) { stream.Position = startPosition; // Check for binary format magic bytes if (IsGLB(stream)) { ParseJsonChunk(stream, startPosition); } else { stream.Position = startPosition; } return(GLTFRoot.Deserialize(new StreamReader(stream))); }
public static void ParseJson(Stream stream, out GLTFRoot gltfRoot, long startPosition = 0) { stream.Position = startPosition; // Check for binary format magic bytes if (IsGLB(stream)) { ParseJsonChunk(stream, startPosition); } else { stream.Position = startPosition; } gltfRoot = GLTFRoot.Deserialize(new StreamReader(stream)); }
public static GLTFRoot ParseString(string gltfContent) { var stringReader = new StringReader(gltfContent); return(GLTFRoot.Deserialize(new JsonTextReader(stringReader))); }
private static GLTFRoot ParseString(string gltfContent) { var stringReader = new StringReader(gltfContent); return(GLTFRoot.Deserialize(stringReader)); }