mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-31 06:56:40 -05:00
bin chunk は [1]。 field の順番を整理。GLB 仕様に関するコメントを追加。
This commit is contained in:
parent
2adbb21f7b
commit
828e018afa
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace UniGLTF
|
||||
{
|
||||
|
|
@ -12,27 +11,33 @@ namespace UniGLTF
|
|||
/// </summary>
|
||||
public string TargetPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// JSON source
|
||||
/// </summary>
|
||||
public string Json { get; }
|
||||
|
||||
/// <summary>
|
||||
/// GLTF parsed from JSON
|
||||
/// </summary>
|
||||
public glTF GLTF { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Chunk Data.
|
||||
/// Maybe empty if source file was not glb format.
|
||||
/// https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#chunks
|
||||
/// [0] must JSON
|
||||
/// [1] must BIN
|
||||
/// [2...] may exists.
|
||||
/// </summary>
|
||||
public IReadOnlyList<GlbChunk> Chunks { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Bin chunk bytes
|
||||
/// JSON chunk ToString
|
||||
/// > This chunk MUST be the very first chunk of Binary glTF asset
|
||||
/// </summary>
|
||||
public string Json { get; }
|
||||
|
||||
/// <summary>
|
||||
/// GLTF parsed from JSON chunk
|
||||
/// </summary>
|
||||
public glTF GLTF { get; }
|
||||
|
||||
/// <summary>
|
||||
/// BIN chunk
|
||||
/// > This chunk MUST be the second chunk of the Binary glTF asset
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ArraySegment<byte> Bin => Chunks.First(x => x.ChunkType == GlbChunkType.BIN).Bytes;
|
||||
public ArraySegment<byte> Bin => Chunks[1].Bytes;
|
||||
|
||||
/// <summary>
|
||||
/// URI access
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user