Skip to content

Commit

Permalink
Revert to using int32list until dev is more stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Apr 24, 2019
1 parent 7306d63 commit 2dbb7ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions flare_dart/lib/actor_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ class ActorImage extends ActorDrawable with ActorSkinnable {
// weightOffset += vertexStride;
// }
// }
//print("VERTEX STRIDE $stride, $vertexStride, $_vertexCount, ${_vertices.length}");
int boneIndexOffset = vertexBoneIndexOffset;
int weightOffset = vertexBoneWeightOffset;
for (int i = 0; i < _vertexCount; i++) {
Expand Down Expand Up @@ -346,13 +345,10 @@ class ActorImage extends ActorDrawable with ActorSkinnable {

int boneTransformIndex = boneIndex * 6;
if (boneIndex <= connectedBones.length) {
//print("BONE TRANSFORMS ${boneTransforms.length} $boneIndex $boneTransformIndex ${connectedBones.length} $boneIndexOffset $wi");
for (int j = 0; j < 6; j++) {
influenceMatrix[j] +=
boneTransforms[boneTransformIndex + j] * weight;
}
} else {
//print("BAD BONE INDEX $boneIndex ${connectedBones.length} ${name}");
}
}

Expand All @@ -379,6 +375,7 @@ class ActorImage extends ActorDrawable with ActorSkinnable {
}
}

@override
AABB computeAABB() {
// Todo: implement for image.
Mat2D worldTransform = this.worldTransform;
Expand Down
4 changes: 2 additions & 2 deletions flare_flutter/lib/flare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ class FlutterActorImage extends ActorImage with FlutterActorDrawable {
Float32List _uvBuffer;
ui.Paint _paint;
ui.Vertices _canvasVertices;
Uint16List _indices;
Int32List _indices;

void onPaintUpdated(ui.Paint paint) {}
final Float64List _identityMatrix = Float64List.fromList(<double>[
Expand Down Expand Up @@ -972,7 +972,7 @@ class FlutterActorImage extends ActorImage with FlutterActorDrawable {
_vertexBuffer = makeVertexPositionBuffer();
_uvBuffer = makeVertexUVBuffer();
_indices =
Uint16List.fromList(triangles); // nima runtime loads 16 bit indices
Int32List.fromList(triangles); // nima runtime loads 16 bit indices
updateVertexUVBuffer(_uvBuffer);
int count = vertexCount;
int idx = 0;
Expand Down

0 comments on commit 2dbb7ab

Please sign in to comment.