Skip to content

Commit

Permalink
Merge branch '4.1' into 4.2-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Apr 4, 2023
2 parents 9c368ba + d596731 commit 46be5f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 5 additions & 7 deletions spine-flutter/example/lib/ik_following.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ class IkFollowingState extends State<IkFollowing> {
controller.animationState.setAnimationByName(0, "walk", true);
controller.animationState.setAnimationByName(1, "aim", true);
}, onAfterUpdateWorldTransforms: (controller) {
var worldPosition = crossHairPosition;
final worldPosition = crossHairPosition;
if (worldPosition == null) return;
var bone = controller.skeleton.findBone("crosshair");
if (bone == null) return;
var parent = bone.getParent();
if (parent == null) return;
var position = parent.worldToLocal(worldPosition.dx, worldPosition.dy);
final bone = controller.skeleton.findBone("crosshair")!;
final parent = bone.getParent()!;
final position = parent.worldToLocal(worldPosition.dx, worldPosition.dy);
bone.setX(position.x);
bone.setY(position.y);
});
Expand All @@ -46,7 +44,7 @@ class IkFollowingState extends State<IkFollowing> {
body: GestureDetector(
onPanDown: (drag) => _updateBonePosition(drag.localPosition),
onPanUpdate: (drag) => _updateBonePosition(drag.localPosition),
child: SpineWidget.fromAsset("assets/spineboy.atlas", "assets/spineboy-pro.skel", controller),
child: SpineWidget.fromAsset("assets/spineboy.atlas", "assets/spineboy-pro.skel", controller, alignment: Alignment.centerLeft,),
));
}
}
4 changes: 2 additions & 2 deletions spine-flutter/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
collection:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions spine-flutter/lib/spine_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1597,8 +1597,8 @@ class RegionAttachment extends Attachment<spine_region_attachment> {

Float32List getUVs() {
final num = _bindings.spine_region_attachment_get_num_uvs(_attachment);
final offset = _bindings.spine_region_attachment_get_uvs(_attachment);
return offset.asTypedList(num);
final uvs = _bindings.spine_region_attachment_get_uvs(_attachment);
return uvs.asTypedList(num);
}
}

Expand Down

0 comments on commit 46be5f2

Please sign in to comment.