Modified storage interface

This commit is contained in:
ousttrue
2018-06-18 22:51:37 +09:00
parent 91caa979f0
commit 98193ab756
4 changed files with 6 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ public class VRMTest
exporter.Export();
// import
context.ParseJson<glTF_VRM>(gltf.ToJson(), new ArraySegment<byte>());
context.ParseJson<glTF_VRM>(gltf.ToJson(), new SimpleStorage());
Debug.LogFormat("{0}", context.Json);
gltfImporter.Import<glTF>(context);

View File

@@ -405,12 +405,12 @@ namespace VRM
#endregion
#region LoadVrmAsync
static IEnumerator LoadTextures(VRMImporterContext context)
static IEnumerator LoadTextures(VRMImporterContext context, IStorage storage)
{
for(int i=0; i<context.GLTF.textures.Count; ++i)
{
var x = new TextureItem(context.GLTF, i);
x.Process();
x.Process(storage);
context.Textures.Add(x);
yield return null;
}
@@ -558,7 +558,7 @@ namespace VRM
() =>
{
var texture = new TextureItem(ctx.GLTF, index);
texture.Process();
texture.Process(ctx.Storage);
return texture;
})
.ContinueWith(Scheduler.ThreadPool, x => ctx.Textures.Add(x));

View File

@@ -58,7 +58,7 @@ namespace VRM
if(gltfMeta.texture >= 0 && gltfMeta.texture < VRM.textures.Count)
{
var t = new TextureItem(VRM, gltfMeta.texture);
t.Process();
t.Process(Storage);
meta.Thumbnail=t.Texture;
}
}