Skip to content

Commit

Permalink
deleted unwanted Array.copy, this fixes the blendshape sparse bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Jul 28, 2023
1 parent 65731a4 commit 179da5b
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ protected virtual async Task ConstructMeshTargets(MeshPrimitive primitive, int m
var current = att[NormalKey].AccessorContent;
NumericArray before = new NumericArray();
before.AsVec3s = new GLTF.Math.Vector3[current.AsVec3s.Length];
Array.Copy(current.AsVec3s, before.AsVec3s, before.AsVec3s.Length);
for (int j = 0; j < sparseNormals[1].AsUInts.Length; j++)
{
before.AsVec3s[sparseNormals[1].AsUInts[j]] = sparseNormals[0].AsVec3s[j];
Expand All @@ -505,7 +504,6 @@ protected virtual async Task ConstructMeshTargets(MeshPrimitive primitive, int m
var current = att[PositionKey].AccessorContent;
NumericArray before = new NumericArray();
before.AsVec3s = new GLTF.Math.Vector3[current.AsVec3s.Length];
Array.Copy(current.AsVec3s, before.AsVec3s, before.AsVec3s.Length);
for (int j = 0; j < sparsePositions[1].AsUInts.Length; j++)
{
before.AsVec3s[sparsePositions[1].AsUInts[j]] = sparsePositions[0].AsVec3s[j];
Expand All @@ -518,7 +516,6 @@ protected virtual async Task ConstructMeshTargets(MeshPrimitive primitive, int m
var current = att[TangentKey].AccessorContent;
NumericArray before = new NumericArray();
before.AsVec3s = new GLTF.Math.Vector3[current.AsVec3s.Length];
Array.Copy(current.AsVec3s, before.AsVec3s, before.AsVec3s.Length);
for (int j = 0; j < sparseTangents[1].AsUInts.Length; j++)
{
before.AsVec3s[sparseTangents[1].AsUInts[j]] = sparseTangents[0].AsVec3s[j];
Expand Down

0 comments on commit 179da5b

Please sign in to comment.