mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Merge branch '4.1' into 4.2-beta
# Conflicts: # spine-flutter/CHANGELOG.md # spine-flutter/lib/assets/libspine_flutter.wasm # spine-flutter/pubspec.yaml # spine-ts/package-lock.json # spine-ts/package.json # spine-ts/spine-canvas/package.json # spine-ts/spine-core/package.json # spine-ts/spine-phaser/package.json # spine-ts/spine-pixi/package.json # spine-ts/spine-player/package.json # spine-ts/spine-threejs/package.json # spine-ts/spine-webgl/package.json
This commit is contained in:
commit
355a91de79
@ -80,8 +80,8 @@ void spIkConstraint_apply1(spBone *bone, float targetX, float targetY, int /*boo
|
||||
|
||||
switch (bone->data->transformMode) {
|
||||
case SP_TRANSFORMMODE_ONLYTRANSLATION:
|
||||
tx = targetX - bone->worldX;
|
||||
ty = targetY - bone->worldY;
|
||||
tx = (targetX - bone->worldX) * SIGNUM(bone->skeleton->scaleX);
|
||||
ty = (targetY - bone->worldY) * SIGNUM(bone->skeleton->scaleY);
|
||||
break;
|
||||
case SP_TRANSFORMMODE_NOROTATIONORREFLECTION: {
|
||||
s = ABS(pa * pd - pb * pc) / MAX(0.0001f, pa * pa + pc * pc);
|
||||
|
||||
@ -47,8 +47,8 @@ void IkConstraint::apply(Bone &bone, float targetX, float targetY, bool compress
|
||||
|
||||
switch (bone._data.getTransformMode()) {
|
||||
case TransformMode_OnlyTranslation:
|
||||
tx = targetX - bone._worldX;
|
||||
ty = targetY - bone._worldY;
|
||||
tx = (targetX - bone._worldX) * MathUtil::sign(bone.getSkeleton().getScaleX());
|
||||
ty = (targetY - bone._worldY) * MathUtil::sign(bone.getSkeleton().getScaleY());
|
||||
break;
|
||||
case TransformMode_NoRotationOrReflection: {
|
||||
float s = MathUtil::abs(pa * pd - pb * pc) / MathUtil::max(0.0001f, pa * pa + pc * pc);
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
# 4.2.18
|
||||
* Fixes compilation errors due to API change in Flutter 3.16.0, see [this issue](https://github.com/EsotericSoftware/spine-runtimes/issues/2420). **Note**: Depending on this version requires your project to depend on Flutter >= 3.16.0 as well.
|
||||
# 4.1.10
|
||||
# Update WASM binaries
|
||||
|
||||
# 4.1.9
|
||||
# Fixes #2412, single bone, translation only IK constraints did not take skeleton scale into account.
|
||||
|
||||
# 4.1.8
|
||||
* Fixes compilation errors due to API change in Flutter 3.16.0, see [this issue](https://github.com/EsotericSoftware/spine-runtimes/issues/2420). **Note**: Depending on this version requires your project to depend on Flutter >= 3.16.0 as well.
|
||||
|
||||
@ -95,8 +95,8 @@ class IkConstraint implements Updatable {
|
||||
ty:Float = 0;
|
||||
switch (bone.data.transformMode) {
|
||||
case TransformMode.onlyTranslation:
|
||||
tx = targetX - bone.worldX;
|
||||
ty = targetY - bone.worldY;
|
||||
tx = (targetX - bone.worldX) * MathUtils.signum(bone.skeleton.scaleX);
|
||||
ty = (targetY - bone.worldY) * MathUtils.signum(bone.skeleton.scaleY);
|
||||
case TransformMode.noRotationOrReflection:
|
||||
var s = Math.abs(pa * pd - pb * pc) / Math.max(0.0001, pa * pa + pc * pc);
|
||||
var sa:Float = pa / bone.skeleton.scaleX;
|
||||
|
||||
@ -191,8 +191,8 @@ public class IkConstraint implements Updatable {
|
||||
float rotationIK = -bone.ashearX - bone.arotation, tx, ty;
|
||||
switch (bone.data.transformMode) {
|
||||
case onlyTranslation:
|
||||
tx = targetX - bone.worldX;
|
||||
ty = targetY - bone.worldY;
|
||||
tx = (targetX - bone.worldX) * Math.signum(bone.skeleton.scaleX);
|
||||
ty = (targetY - bone.worldY) * Math.signum(bone.skeleton.scaleY);
|
||||
break;
|
||||
case noRotationOrReflection:
|
||||
float s = Math.abs(pa * pd - pb * pc) / Math.max(0.0001f, pa * pa + pc * pc);
|
||||
|
||||
@ -122,8 +122,8 @@ export class IkConstraint implements Updatable {
|
||||
|
||||
switch (bone.data.transformMode) {
|
||||
case TransformMode.OnlyTranslation:
|
||||
tx = targetX - bone.worldX;
|
||||
ty = targetY - bone.worldY;
|
||||
tx = (targetX - bone.worldX) * MathUtils.signum(bone.skeleton.scaleX);
|
||||
ty = (targetY - bone.worldY) * MathUtils.signum(bone.skeleton.scaleY);
|
||||
break;
|
||||
case TransformMode.NoRotationOrReflection:
|
||||
let s = Math.abs(pa * pd - pb * pc) / Math.max(0.0001, pa * pa + pc * pc);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user