remove IVrmStorage

This commit is contained in:
ousttrue
2021-03-29 17:34:14 +09:00
parent 6116a6cac1
commit 57581467c9
4 changed files with 3 additions and 60 deletions

View File

@@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using VrmLib;
namespace UniVRM10
{
public interface IVrmStorage
{
ArraySegment<byte> OriginalJson { get; }
#region glTF import
string AssetVersion { get; }
string AssetMinVersion { get; }
string AssetGenerator { get; }
string AssetCopyright { get; }
int NodeCount { get; }
Node CreateNode(int index);
IEnumerable<int> GetChildNodeIndices(int i);
int ImageCount { get; }
Image CreateImage(int index);
int TextureCount { get; }
Texture CreateTexture(int index, List<Image> images);
int MaterialCount { get; }
Material CreateMaterial(int index, List<Texture> textures);
int SkinCount { get; }
Skin CreateSkin(int index, List<Node> nodes);
int MeshCount { get; }
MeshGroup CreateMesh(int index, List<Material> materials);
(int, int) GetNodeMeshSkin(int index);
int AnimationCount { get; }
Animation CreateAnimation(int index, List<Node> nodes);
#endregion
#region VRM
bool HasVrm { get; }
Meta CreateVrmMeta(List<Texture> textures);
string VrmExporterVersion { get; }
string VrmSpecVersion { get; }
void LoadVrmHumanoid(List<Node> nodes);
ExpressionManager CreateVrmExpression(List<MeshGroup> meshGroups, List<Material> materials, List<Node> nodes);
SpringBoneManager CreateVrmSpringBone(List<Node> nodes);
FirstPerson CreateVrmFirstPerson(List<Node> nodes, List<MeshGroup> meshGroups);
LookAt CreateVrmLookAt();
#endregion
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: dc7a9b66200d54043bef5c969aa774e7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -6,7 +6,7 @@ namespace UniVRM10
{
public static class ModelLoader
{
public static Model Load(IVrmStorage storage, string rootName, bool estimateHumanoid = false)
public static Model Load(Vrm10Storage storage, string rootName, bool estimateHumanoid = false)
{
if (storage == null)
{
@@ -91,7 +91,7 @@ namespace UniVRM10
return model;
}
static bool LoadVrm(Model model, IVrmStorage storage)
static bool LoadVrm(Model model, Vrm10Storage storage)
{
if (!storage.HasVrm)
{

View File

@@ -9,7 +9,7 @@ using UniJSON;
namespace UniVRM10
{
public class Vrm10Storage : IVrmStorage
public class Vrm10Storage
{
public ArraySegment<Byte> OriginalJson { get; private set; }
public UniGLTF.glTF Gltf