mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 22:39:39 -05:00
メンバーを使わない MeshImporter を static class に変更
This commit is contained in:
@@ -167,7 +167,6 @@ namespace UniGLTF
|
||||
{
|
||||
var inverter = InvertAxis.Create();
|
||||
|
||||
var meshImporter = new MeshImporter();
|
||||
if (GLTF.meshes.Count > 0)
|
||||
{
|
||||
for (var i = 0; i < GLTF.meshes.Count; ++i)
|
||||
@@ -175,7 +174,7 @@ namespace UniGLTF
|
||||
var index = i;
|
||||
using (MeasureTime("ReadMesh"))
|
||||
{
|
||||
var meshContext = await awaitCaller.Run(() => meshImporter.ReadMesh(Data, index, inverter));
|
||||
var meshContext = await awaitCaller.Run(() => MeshImporter.ReadMesh(Data, index, inverter));
|
||||
var meshWithMaterials = await BuildMeshAsync(awaitCaller, MeasureTime, meshContext, index);
|
||||
Meshes.Add(meshWithMaterials);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using VRMShaders;
|
||||
|
||||
namespace UniGLTF
|
||||
{
|
||||
public class MeshImporter
|
||||
public static class MeshImporter
|
||||
{
|
||||
private const float FrameWeight = 100.0f;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace UniGLTF
|
||||
return sharedAttributes;
|
||||
}
|
||||
|
||||
internal MeshContext ReadMesh(GltfData data, int meshIndex, IAxisInverter inverter)
|
||||
internal static MeshContext ReadMesh(GltfData data, int meshIndex, IAxisInverter inverter)
|
||||
{
|
||||
Profiler.BeginSample("ReadMesh");
|
||||
var gltfMesh = data.GLTF.meshes[meshIndex];
|
||||
|
||||
Reference in New Issue
Block a user