コード例 #1
0
        public ModelRoot LoadModel(string gltfFile, ReadSettings settings = null)
        {
            var context = ReadContext
                          .Create(_ReadAsset)
                          .WithSettingsFrom(settings);

            return(context.ReadSchema2(gltfFile));
        }
コード例 #2
0
ファイル: Zip.cs プロジェクト: yakumo-proj/SharpGLTF
        private ModelRoot _LoadGltf2(string gltfFile, ReadSettings settings = null)
        {
            var context = ReadContext
                          .Create(_ReadAsset)
                          .WithSettingsFrom(settings);

            using (var m = new System.IO.MemoryStream())
            {
                using (var s = _Archive.GetEntry(gltfFile).Open())
                {
                    s.CopyTo(m);
                }

                m.Position = 0;

                return(context.ReadSchema2(m));
            }
        }