mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-07 19:26:54 +08:00
[ts] Added Skeleton.yDown
This commit is contained in:
parent
b12e06d791
commit
15bbf5701e
@ -45,6 +45,8 @@ import { Color, Utils, MathUtils, Vector2, NumberArrayLike } from "./Utils";
|
|||||||
*
|
*
|
||||||
* See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide. */
|
* See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide. */
|
||||||
export class Skeleton {
|
export class Skeleton {
|
||||||
|
static yDown = false;;
|
||||||
|
|
||||||
/** The skeleton's setup pose data. */
|
/** The skeleton's setup pose data. */
|
||||||
data: SkeletonData;
|
data: SkeletonData;
|
||||||
|
|
||||||
@ -81,7 +83,15 @@ export class Skeleton {
|
|||||||
|
|
||||||
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
||||||
* inheritance. */
|
* inheritance. */
|
||||||
scaleY = 1;
|
private _scaleY = 1;
|
||||||
|
|
||||||
|
public get scaleY() {
|
||||||
|
return Skeleton.yDown ? -this._scaleY : this._scaleY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set scaleY(scaleY: number) {
|
||||||
|
this._scaleY = scaleY;
|
||||||
|
}
|
||||||
|
|
||||||
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user