Skip to content

Commit

Permalink
Merge pull request #9 from MontiniCristian/hotfix/double-assignment
Browse files Browse the repository at this point in the history
Assigned correct type to valiables
  • Loading branch information
luigi-rosso committed Dec 8, 2018
2 parents 3dce41b + 4cfdc31 commit 09b307c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/flare/actor_shape.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ActorShape extends ActorNode implements ActorDrawable {
Mat2D world = worldTransform;

if (_strokes != null) {
double maxStroke = 0;
double maxStroke = 0.0;
for (ActorStroke stroke in _strokes) {
if (stroke.width > maxStroke) {
maxStroke = stroke.width;
Expand Down
24 changes: 12 additions & 12 deletions lib/flare/actor_skin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class ActorSkin extends ActorComponent {
if (_boneMatrices == null || _boneMatrices.length != length) {
_boneMatrices = Float32List(length);
// First bone transform is always identity.
_boneMatrices[0] = 1;
_boneMatrices[1] = 0;
_boneMatrices[2] = 0;
_boneMatrices[3] = 1;
_boneMatrices[4] = 0;
_boneMatrices[5] = 0;
_boneMatrices[0] = 1.0;
_boneMatrices[1] = 0.0;
_boneMatrices[2] = 0.0;
_boneMatrices[3] = 1.0;
_boneMatrices[4] = 0.0;
_boneMatrices[5] = 0.0;
}

int bidx = 6; // Start after first identity.
Expand All @@ -42,12 +42,12 @@ class ActorSkin extends ActorComponent {

for (SkinnedBone cb in connectedBones) {
if (cb.node == null) {
_boneMatrices[bidx++] = 1;
_boneMatrices[bidx++] = 0;
_boneMatrices[bidx++] = 0;
_boneMatrices[bidx++] = 1;
_boneMatrices[bidx++] = 0;
_boneMatrices[bidx++] = 0;
_boneMatrices[bidx++] = 1.0;
_boneMatrices[bidx++] = 0.0;
_boneMatrices[bidx++] = 0.0;
_boneMatrices[bidx++] = 1.0;
_boneMatrices[bidx++] = 0.0;
_boneMatrices[bidx++] = 0.0;
continue;
}

Expand Down

0 comments on commit 09b307c

Please sign in to comment.