Skip to content

Commit

Permalink
Update indices to 16 bit unsigned, compatibility with flutter master.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed May 9, 2019
1 parent 63c1d05 commit 4e9961b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 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;
Int32List _indices;
Uint16List _indices;

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

0 comments on commit 4e9961b

Please sign in to comment.