mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Formatting
This commit is contained in:
parent
f540dd4985
commit
fd0c20a2c7
@ -383,7 +383,7 @@ export abstract class CurveTimeline1 extends CurveTimeline {
|
||||
return current + (value - current) * alpha;
|
||||
}
|
||||
|
||||
getAbsoluteValue2 (time: number, alpha: number, blend: MixBlend , current: number, setup: number, value: number) {
|
||||
getAbsoluteValue2 (time: number, alpha: number, blend: MixBlend, current: number, setup: number, value: number) {
|
||||
if (time < this.frames[0]) {
|
||||
switch (blend) {
|
||||
case MixBlend.setup:
|
||||
@ -2024,8 +2024,8 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
abstract global (constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getInertia()}. */
|
||||
export class PhysicsConstraintInertiaTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getInertia()}. */
|
||||
export class PhysicsConstraintInertiaTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintInertia);
|
||||
}
|
||||
@ -2045,10 +2045,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.inertiaGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getStrength()}. */
|
||||
export class PhysicsConstraintStrengthTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getStrength()}. */
|
||||
export class PhysicsConstraintStrengthTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintStrength);
|
||||
}
|
||||
@ -2068,10 +2068,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.strengthGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getDamping()}. */
|
||||
export class PhysicsConstraintDampingTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getDamping()}. */
|
||||
export class PhysicsConstraintDampingTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintDamping);
|
||||
}
|
||||
@ -2091,10 +2091,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.dampingGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getMassInverse()}. The timeline values are not inverted. */
|
||||
export class PhysicsConstraintMassTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getMassInverse()}. The timeline values are not inverted. */
|
||||
export class PhysicsConstraintMassTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintMass);
|
||||
}
|
||||
@ -2114,10 +2114,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.massGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getWind()}. */
|
||||
export class PhysicsConstraintWindTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getWind()}. */
|
||||
export class PhysicsConstraintWindTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintWind);
|
||||
}
|
||||
@ -2137,10 +2137,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.windGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getGravity()}. */
|
||||
export class PhysicsConstraintGravityTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getGravity()}. */
|
||||
export class PhysicsConstraintGravityTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintGravity);
|
||||
}
|
||||
@ -2160,10 +2160,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.gravityGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getMix()}. */
|
||||
export class PhysicsConstraintMixTimeline extends PhysicsConstraintTimeline {
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getMix()}. */
|
||||
export class PhysicsConstraintMixTimeline extends PhysicsConstraintTimeline {
|
||||
constructor (frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number) {
|
||||
super(frameCount, bezierCount, physicsConstraintIndex, Property.physicsConstraintMix);
|
||||
}
|
||||
@ -2183,10 +2183,10 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
global (constraint: PhysicsConstraintData): boolean {
|
||||
return constraint.mixGlobal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Resets a physics constraint when specific animation times are reached. */
|
||||
export class PhysicsConstraintResetTimeline extends Timeline {
|
||||
/** Resets a physics constraint when specific animation times are reached. */
|
||||
export class PhysicsConstraintResetTimeline extends Timeline {
|
||||
private static propertyIds: string[] = [Property.physicsConstraintReset.toString()];
|
||||
|
||||
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be reset when this timeline is
|
||||
@ -2237,7 +2237,7 @@ export abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Changes a slot's {@link Slot#getSequenceIndex()} for an attachment's {@link Sequence}. */
|
||||
export class SequenceTimeline extends Timeline implements SlotTimeline {
|
||||
|
||||
@ -76,7 +76,7 @@ export class PhysicsConstraint implements Updatable {
|
||||
remaining = 0;
|
||||
lastTime = 0;
|
||||
|
||||
constructor(data: PhysicsConstraintData, skeleton: Skeleton) {
|
||||
constructor (data: PhysicsConstraintData, skeleton: Skeleton) {
|
||||
this.data = data;
|
||||
this.skeleton = skeleton;
|
||||
this.bone = skeleton.bones[data.bone.index];
|
||||
|
||||
@ -34,7 +34,7 @@ import { ConstraintData } from "./ConstraintData.js";
|
||||
/** Stores the setup pose for a {@link PhysicsConstraint}.
|
||||
* <p>
|
||||
* See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
export class PhysicsConstraintData extends ConstraintData {
|
||||
export class PhysicsConstraintData extends ConstraintData {
|
||||
private _bone: BoneData | null = null;
|
||||
/** The bone constrained by this physics constraint. */
|
||||
public set bone (boneData: BoneData) { this._bone = boneData; }
|
||||
|
||||
@ -199,7 +199,7 @@ export class MathUtils {
|
||||
return Math.sin(degrees * MathUtils.degRad);
|
||||
}
|
||||
|
||||
static atan2Deg(y: number, x: number) {
|
||||
static atan2Deg (y: number, x: number) {
|
||||
return Math.atan2(y, x) * MathUtils.degRad;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user