From 6794b9b54208a29e20acb5da59bdb46ec42086d5 Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Mon, 27 May 2019 11:38:56 +0900 Subject: [PATCH] Fix typo (local variables) --- .../Scripts/Extensions/UnityExtensions.cs | 4 +- .../UniGLTF/Scripts/IO/AnimationExporter.cs | 8 +-- .../UniGLTF/Scripts/IO/AnimationImporter.cs | 6 +- Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs | 8 +-- Assets/VRM/UniHumanoid/Scripts/BoneMapping.cs | 4 +- Assets/VRM/UniHumanoid/Scripts/Format/Bvh.cs | 60 +++++++++---------- Assets/VRM/UniHumanoid/Scripts/Skeleton.cs | 4 +- .../VRM/UniJSON/Scripts/Json/JsonPointer.cs | 4 +- .../Utf8String/Utf8StringExtensions.cs | 4 +- 9 files changed, 51 insertions(+), 51 deletions(-) diff --git a/Assets/VRM/UniGLTF/Scripts/Extensions/UnityExtensions.cs b/Assets/VRM/UniGLTF/Scripts/Extensions/UnityExtensions.cs index c3e2f5883..48d6c7fed 100644 --- a/Assets/VRM/UniGLTF/Scripts/Extensions/UnityExtensions.cs +++ b/Assets/VRM/UniGLTF/Scripts/Extensions/UnityExtensions.cs @@ -189,9 +189,9 @@ namespace UniGLTF { var current = self; - var splited = path.Split('/'); + var split = path.Split('/'); - foreach (var childName in splited) + foreach (var childName in split) { current = current.GetChildByName(childName); } diff --git a/Assets/VRM/UniGLTF/Scripts/IO/AnimationExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/AnimationExporter.cs index b3cda06c0..3cb26d23d 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/AnimationExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/AnimationExporter.cs @@ -123,7 +123,7 @@ namespace UniGLTF }; #if UNITY_5_6_OR_NEWER - List curveDatas = new List(); + List curveDatum = new List(); foreach (var binding in AnimationUtility.GetCurveBindings(clip)) { @@ -155,11 +155,11 @@ namespace UniGLTF } // 同一のsamplerIndexが割り当てられているcurveDataがある場合はそれを使用し、無ければ作る - var curveData = curveDatas.FirstOrDefault(x => x.SamplerIndex == samplerIndex); + var curveData = curveDatum.FirstOrDefault(x => x.SamplerIndex == samplerIndex); if (curveData == null) { curveData = new AnimationCurveData(AnimationUtility.GetKeyRightTangentMode(curve, 0), property, samplerIndex, elementCount); - curveDatas.Add(curveData); + curveDatum.Add(curveData); } // 全てのキーフレームを回収 @@ -187,7 +187,7 @@ namespace UniGLTF } //キー挿入 - foreach (var curve in curveDatas) + foreach (var curve in curveDatum) { if (curve.Keyframes.Count == 0) continue; diff --git a/Assets/VRM/UniGLTF/Scripts/IO/AnimationImporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/AnimationImporter.cs index cab07ee3d..d905e20b6 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/AnimationImporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/AnimationImporter.cs @@ -157,7 +157,7 @@ namespace UniGLTF public static List ImportAnimationClip(ImporterContext ctx) { - List animasionClips = new List(); + List animationClips = new List(); for (int i = 0; i < ctx.GLTF.animations.Count; ++i) { var clip = new AnimationClip(); @@ -302,10 +302,10 @@ namespace UniGLTF break; } } - animasionClips.Add(clip); + animationClips.Add(clip); } - return animasionClips; + return animationClips; } public static void ImportAnimation(ImporterContext ctx) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs index 9a955dd81..bc0f37695 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs @@ -170,11 +170,11 @@ namespace UniGLTF node.mesh = renderers.IndexOf(meshRenderer); } - var skinnredMeshRenderer = x.GetComponent(); - if (skinnredMeshRenderer != null) + var skinnedMeshRenderer = x.GetComponent(); + if (skinnedMeshRenderer != null) { - node.mesh = renderers.IndexOf(skinnredMeshRenderer); - node.skin = skins.IndexOf(skinnredMeshRenderer); + node.mesh = renderers.IndexOf(skinnedMeshRenderer); + node.skin = skins.IndexOf(skinnedMeshRenderer); } } diff --git a/Assets/VRM/UniHumanoid/Scripts/BoneMapping.cs b/Assets/VRM/UniHumanoid/Scripts/BoneMapping.cs index f4873e969..f9233e664 100644 --- a/Assets/VRM/UniHumanoid/Scripts/BoneMapping.cs +++ b/Assets/VRM/UniHumanoid/Scripts/BoneMapping.cs @@ -51,8 +51,8 @@ namespace UniHumanoid return; } - var estimater = new BvhSkeletonEstimator(); - var skeleton = estimater.Detect(hips.transform); + var estimator = new BvhSkeletonEstimator(); + var skeleton = estimator.Detect(hips.transform); var bones = hips.transform.Traverse().ToArray(); for (int i = 0; i < (int)HumanBodyBones.LastBone; ++i) { diff --git a/Assets/VRM/UniHumanoid/Scripts/Format/Bvh.cs b/Assets/VRM/UniHumanoid/Scripts/Format/Bvh.cs index aa78c3227..b38564777 100644 --- a/Assets/VRM/UniHumanoid/Scripts/Format/Bvh.cs +++ b/Assets/VRM/UniHumanoid/Scripts/Format/Bvh.cs @@ -108,29 +108,29 @@ namespace UniHumanoid static Single3 ParseOffset(string line) { - var splited = line.Trim().Split(); - if (splited[0] != "OFFSET") + var split = line.Trim().Split(); + if (split[0] != "OFFSET") { throw new BvhException("OFFSET is not found"); } - var offset = splited.Skip(1).Where(x => !string.IsNullOrEmpty(x)).Select(x => float.Parse(x)).ToArray(); + var offset = split.Skip(1).Where(x => !string.IsNullOrEmpty(x)).Select(x => float.Parse(x)).ToArray(); return new Single3(offset[0], offset[1], offset[2]); } static Channel[] ParseChannel(string line) { - var splited = line.Trim().Split(); - if (splited[0] != "CHANNELS") + var split = line.Trim().Split(); + if (split[0] != "CHANNELS") { throw new BvhException("CHANNELS is not found"); } - var count = int.Parse(splited[1]); - if (count + 2 != splited.Length) + var count = int.Parse(split[1]); + if (count + 2 != split.Length) { throw new BvhException("channel count is not match with splited count"); } - return splited.Skip(2).Select(x => (Channel)Enum.Parse(typeof(Channel), x)).ToArray(); + return split.Skip(2).Select(x => (Channel)Enum.Parse(typeof(Channel), x)).ToArray(); } public IEnumerable Traverse() @@ -139,9 +139,9 @@ namespace UniHumanoid foreach (var child in Children) { - foreach (var descentant in child.Traverse()) + foreach (var descendant in child.Traverse()) { - yield return descentant; + yield return descendant; } } } @@ -313,14 +313,14 @@ namespace UniHumanoid public void ParseFrame(int frame, string line) { - var splited = line.Trim().Split().Where(x => !string.IsNullOrEmpty(x)).ToArray(); - if (splited.Length != Channels.Length) + var split = line.Trim().Split().Where(x => !string.IsNullOrEmpty(x)).ToArray(); + if (split.Length != Channels.Length) { throw new BvhException("frame key count is not match channel count"); } for(int i=0; i diff --git a/Assets/VRM/UniJSON/Scripts/Json/JsonPointer.cs b/Assets/VRM/UniJSON/Scripts/Json/JsonPointer.cs index 170b49a71..d003a869c 100644 --- a/Assets/VRM/UniJSON/Scripts/Json/JsonPointer.cs +++ b/Assets/VRM/UniJSON/Scripts/Json/JsonPointer.cs @@ -58,8 +58,8 @@ namespace UniJSON throw new ArgumentException(); } - var splited = pointer.Split((Byte)'/').ToArray(); - Path = new ArraySegment(splited, 1, splited.Length - 1); + var split = pointer.Split((Byte)'/').ToArray(); + Path = new ArraySegment(split, 1, split.Length - 1); } public override string ToString() diff --git a/Assets/VRM/UniJSON/Scripts/Utf8String/Utf8StringExtensions.cs b/Assets/VRM/UniJSON/Scripts/Utf8String/Utf8StringExtensions.cs index b5f4ecf05..011dc2411 100644 --- a/Assets/VRM/UniJSON/Scripts/Utf8String/Utf8StringExtensions.cs +++ b/Assets/VRM/UniJSON/Scripts/Utf8String/Utf8StringExtensions.cs @@ -84,13 +84,13 @@ namespace UniJSON return false; } - public static IEnumerable Split(this Utf8String src, byte delemeter) + public static IEnumerable Split(this Utf8String src, byte delimiter) { var start = 0; var p = new Utf8Iterator(src.Bytes); while (p.MoveNext()) { - if (p.Current == delemeter) + if (p.Current == delimiter) { if (p.BytePosition - start == 0) {