mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-06-16 12:59:41 -05:00
rename NextFrameAwaitable
This commit is contained in:
parent
6d62196e74
commit
fab04f7eb0
|
|
@ -2,7 +2,7 @@ using System;
|
|||
|
||||
namespace UniGLTF.AltTask
|
||||
{
|
||||
public static class LoopAwaitable
|
||||
public static class NextFrameAwaitable
|
||||
{
|
||||
// TODO
|
||||
// loop スレッド使わないようにしたい
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: db36517c11c455e4b94d9cbb8c1cc3ff
|
||||
guid: 81795a4f6e605d74787f604354a8565f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -98,7 +98,6 @@ namespace UniGLTF
|
|||
throw new UniGLTFNotSupportedException("draco is not supported");
|
||||
}
|
||||
|
||||
// create textures
|
||||
using (MeasureTime("LoadTextures"))
|
||||
{
|
||||
for (int i = 0; i < GLTF.materials.Count; ++i)
|
||||
|
|
@ -115,7 +114,6 @@ namespace UniGLTF
|
|||
await m_materialFactory.LoadMaterialsAsync(m_textureFactory.GetTextureAsync);
|
||||
}
|
||||
|
||||
// meshes
|
||||
var meshImporter = new MeshImporter();
|
||||
for (int i = 0; i < GLTF.meshes.Count; ++i)
|
||||
{
|
||||
|
|
@ -135,7 +133,7 @@ namespace UniGLTF
|
|||
Nodes.Add(NodeImporter.ImportNode(GLTF.nodes[i], i).transform);
|
||||
}
|
||||
}
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
|
||||
using (MeasureTime("BuildHierarchy"))
|
||||
{
|
||||
|
|
@ -160,7 +158,7 @@ namespace UniGLTF
|
|||
t.SetParent(Root.transform, false);
|
||||
}
|
||||
}
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
|
||||
using (MeasureTime("AnimationImporter"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -631,9 +631,9 @@ namespace UniGLTF
|
|||
|
||||
if (recalculateTangents)
|
||||
{
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
mesh.RecalculateTangents();
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
}
|
||||
|
||||
// 先にすべてのマテリアルを作成済みなのでテクスチャーは生成済み。Resultを使ってよい
|
||||
|
|
@ -643,7 +643,7 @@ namespace UniGLTF
|
|||
Materials = meshContext.MaterialIndices.Select(x => ctx.GetMaterial(x)).ToArray()
|
||||
};
|
||||
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
if (meshContext.BlendShapes.Count > 0)
|
||||
{
|
||||
var emptyVertices = new Vector3[mesh.vertexCount];
|
||||
|
|
|
|||
|
|
@ -39,26 +39,26 @@ namespace VRM
|
|||
{
|
||||
await LoadMetaAsync();
|
||||
}
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
|
||||
using (MeasureTime("VRM LoadHumanoid"))
|
||||
{
|
||||
LoadHumanoid();
|
||||
}
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
|
||||
using (MeasureTime("VRM LoadBlendShapeMaster"))
|
||||
{
|
||||
LoadBlendShapeMaster();
|
||||
}
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
|
||||
using (MeasureTime("VRM LoadSecondary"))
|
||||
{
|
||||
VRMSpringUtility.LoadSecondary(Root.transform, Nodes,
|
||||
VRM.secondaryAnimation);
|
||||
}
|
||||
await LoopAwaitable.Create();
|
||||
await NextFrameAwaitable.Create();
|
||||
|
||||
using (MeasureTime("VRM LoadFirstPerson"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user