mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Merge branch '4.1' into 4.2-beta
This commit is contained in:
commit
46be5f2393
@ -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);
|
||||
});
|
||||
@ -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,),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user