pixi-spine
Advanced tools
Comparing version 2.0.0-alpha to 2.0.0
@@ -7,3 +7,3 @@ declare module PIXI.spine.core { | ||
constructor(name: string, timelines: Array<Timeline>, duration: number); | ||
apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
static binarySearch(values: ArrayLike<number>, target: number, step?: number): number; | ||
@@ -13,13 +13,14 @@ static linearSearch(values: ArrayLike<number>, target: number, step: number): number; | ||
interface Timeline { | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
getPropertyId(): number; | ||
} | ||
enum MixPose { | ||
enum MixBlend { | ||
setup = 0, | ||
current = 1, | ||
currentLayered = 2, | ||
first = 1, | ||
replace = 2, | ||
add = 3 | ||
} | ||
enum MixDirection { | ||
in = 0, | ||
out = 1, | ||
out = 1 | ||
} | ||
@@ -41,3 +42,3 @@ enum TimelineType { | ||
pathConstraintMix = 13, | ||
twoColor = 14, | ||
twoColor = 14 | ||
} | ||
@@ -58,3 +59,3 @@ abstract class CurveTimeline implements Timeline { | ||
getCurvePercent(frameIndex: number, percent: number): number; | ||
abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -71,3 +72,3 @@ class RotateTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, degrees: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -86,3 +87,3 @@ class TranslateTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, x: number, y: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -92,3 +93,3 @@ class ScaleTimeline extends TranslateTimeline { | ||
getPropertyId(): number; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -98,3 +99,3 @@ class ShearTimeline extends TranslateTimeline { | ||
getPropertyId(): number; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -117,3 +118,3 @@ class ColorTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -142,3 +143,3 @@ class TwoColorTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -153,3 +154,3 @@ class AttachmentTimeline implements Timeline { | ||
setFrame(frameIndex: number, time: number, attachmentName: string): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -164,3 +165,3 @@ class DeformTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, vertices: ArrayLike<number>): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -174,3 +175,3 @@ class EventTimeline implements Timeline { | ||
setFrame(frameIndex: number, event: Event): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -184,3 +185,3 @@ class DrawOrderTimeline implements Timeline { | ||
setFrame(frameIndex: number, time: number, drawOrder: Array<number>): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -192,4 +193,8 @@ class IkConstraintTimeline extends CurveTimeline { | ||
static PREV_BEND_DIRECTION: number; | ||
static PREV_COMPRESS: number; | ||
static PREV_STRETCH: number; | ||
static MIX: number; | ||
static BEND_DIRECTION: number; | ||
static COMPRESS: number; | ||
static STRETCH: number; | ||
ikConstraintIndex: number; | ||
@@ -199,4 +204,4 @@ frames: ArrayLike<number>; | ||
getPropertyId(): number; | ||
setFrame(frameIndex: number, time: number, mix: number, bendDirection: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
setFrame(frameIndex: number, time: number, mix: number, bendDirection: number, compress: boolean, stretch: boolean): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -219,3 +224,3 @@ class TransformConstraintTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -232,3 +237,3 @@ class PathConstraintPositionTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, value: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -238,3 +243,3 @@ class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { | ||
getPropertyId(): number; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -253,3 +258,3 @@ class PathConstraintMixTimeline extends CurveTimeline { | ||
setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, pose: MixPose, direction: MixDirection): void; | ||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void; | ||
} | ||
@@ -262,4 +267,4 @@ } | ||
static FIRST: number; | ||
static DIP: number; | ||
static DIP_MIX: number; | ||
static HOLD: number; | ||
static HOLD_MIX: number; | ||
data: AnimationStateData; | ||
@@ -271,3 +276,2 @@ tracks: TrackEntry[]; | ||
propertyIDs: IntSet; | ||
mixingTo: TrackEntry[]; | ||
animationsChanged: boolean; | ||
@@ -280,4 +284,4 @@ timeScale: number; | ||
apply(skeleton: Skeleton): boolean; | ||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton, currentPose: MixPose): number; | ||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, pose: MixPose, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void; | ||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; | ||
applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void; | ||
queueEvents(entry: TrackEntry, animationTime: number): void; | ||
@@ -298,2 +302,4 @@ clearTracks(): void; | ||
_animationsChanged(): void; | ||
setTimelineModes(entry: TrackEntry): void; | ||
hasTimeline(entry: TrackEntry, id: number): boolean; | ||
getCurrent(trackIndex: number): TrackEntry; | ||
@@ -320,5 +326,7 @@ addListener(listener: AnimationStateListener2): void; | ||
mixingFrom: TrackEntry; | ||
mixingTo: TrackEntry; | ||
listener: AnimationStateListener2; | ||
trackIndex: number; | ||
loop: boolean; | ||
holdPrevious: boolean; | ||
eventThreshold: number; | ||
@@ -342,8 +350,7 @@ attachmentThreshold: number; | ||
totalAlpha: number; | ||
timelineData: number[]; | ||
timelineDipMix: TrackEntry[]; | ||
mixBlend: MixBlend; | ||
timelineMode: number[]; | ||
timelineHoldMix: TrackEntry[]; | ||
timelinesRotation: number[]; | ||
reset(): void; | ||
setTimelineData(to: TrackEntry, mixingToArray: Array<TrackEntry>, propertyIDs: IntSet): TrackEntry; | ||
hasTimeline(id: number): boolean; | ||
getAnimationTime(): number; | ||
@@ -385,3 +392,3 @@ setAnimationLast(animationLast: number): void; | ||
complete = 4, | ||
event = 5, | ||
event = 5 | ||
} | ||
@@ -464,3 +471,3 @@ interface AnimationStateListener2 { | ||
Path = 4, | ||
Point = 5, | ||
Point = 5 | ||
} | ||
@@ -587,3 +594,3 @@ } | ||
Multiply = 2, | ||
Screen = 3, | ||
Screen = 3 | ||
} | ||
@@ -655,3 +662,3 @@ } | ||
NoScale = 3, | ||
NoScaleOrReflection = 4, | ||
NoScaleOrReflection = 4 | ||
} | ||
@@ -671,2 +678,4 @@ } | ||
time: number; | ||
volume: number; | ||
balance: number; | ||
constructor(time: number, data: EventData); | ||
@@ -681,2 +690,5 @@ } | ||
stringValue: string; | ||
audioPath: string; | ||
volume: number; | ||
balance: number; | ||
constructor(name: string); | ||
@@ -690,4 +702,6 @@ } | ||
target: Bone; | ||
bendDirection: number; | ||
compress: boolean; | ||
stretch: boolean; | ||
mix: number; | ||
bendDirection: number; | ||
constructor(data: IkConstraintData, skeleton: Skeleton); | ||
@@ -697,4 +711,4 @@ getOrder(): number; | ||
update(): void; | ||
apply1(bone: Bone, targetX: number, targetY: number, alpha: number): void; | ||
apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number): void; | ||
apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void; | ||
apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, alpha: number): void; | ||
} | ||
@@ -709,2 +723,5 @@ } | ||
bendDirection: number; | ||
compress: boolean; | ||
stretch: boolean; | ||
uniform: boolean; | ||
mix: number; | ||
@@ -719,2 +736,3 @@ constructor(name: string); | ||
static AFTER: number; | ||
static epsilon: number; | ||
data: PathConstraintData; | ||
@@ -761,3 +779,3 @@ bones: Array<Bone>; | ||
Fixed = 0, | ||
Percent = 1, | ||
Percent = 1 | ||
} | ||
@@ -767,3 +785,3 @@ enum SpacingMode { | ||
Fixed = 1, | ||
Percent = 2, | ||
Percent = 2 | ||
} | ||
@@ -773,3 +791,3 @@ enum RotateMode { | ||
Chain = 1, | ||
ChainScale = 2, | ||
ChainScale = 2 | ||
} | ||
@@ -791,4 +809,4 @@ } | ||
time: number; | ||
flipX: boolean; | ||
flipY: boolean; | ||
scaleX: number; | ||
scaleY: number; | ||
x: number; | ||
@@ -815,3 +833,3 @@ y: number; | ||
setSkinByName(skinName: string): void; | ||
setSkin(newSkin: Skin): void; | ||
setSkin(newSkin: Skin | null): void; | ||
getAttachmentByName(slotName: string, attachmentName: string): Attachment; | ||
@@ -825,2 +843,5 @@ getAttachment(slotIndex: number, attachmentName: string): Attachment; | ||
update(delta: number): void; | ||
flipX: boolean; | ||
flipY: boolean; | ||
private static deprecatedWarning1; | ||
} | ||
@@ -988,3 +1009,3 @@ } | ||
MipMapNearestLinear = 9986, | ||
MipMapLinearLinear = 9987, | ||
MipMapLinearLinear = 9987 | ||
} | ||
@@ -994,3 +1015,3 @@ enum TextureWrap { | ||
ClampToEdge = 33071, | ||
Repeat = 10497, | ||
Repeat = 10497 | ||
} | ||
@@ -1025,3 +1046,3 @@ class TextureRegion { | ||
addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any): void; | ||
private load(atlasText, textureLoader, callback); | ||
private load; | ||
findRegion(name: string): TextureAtlasRegion; | ||
@@ -1099,5 +1120,5 @@ dispose(): void; | ||
decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>; | ||
private static isConcave(index, vertexCount, vertices, indices); | ||
private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y); | ||
private static winding(p1x, p1y, p2x, p2y, p3x, p3y); | ||
private static isConcave; | ||
private static positiveArea; | ||
private static winding; | ||
} | ||
@@ -1183,2 +1204,3 @@ } | ||
static toSinglePrecision(value: number): number; | ||
static webkit602BugfixHelper(alpha: number, blend: MixBlend): void; | ||
} | ||
@@ -1282,3 +1304,3 @@ class DebugUtils { | ||
} | ||
class SpineMesh extends PIXI.Mesh { | ||
class SpineMesh extends PIXI.SimpleMesh { | ||
region: core.TextureRegion; | ||
@@ -1289,2 +1311,3 @@ constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number); | ||
static globalAutoUpdate: boolean; | ||
static globalDelayLimit: number; | ||
tintRgb: ArrayLike<number>; | ||
@@ -1297,8 +1320,10 @@ spineData: core.SkeletonData; | ||
tempClipContainers: Array<PIXI.Container>; | ||
localDelayLimit: number; | ||
constructor(spineData: core.SkeletonData); | ||
autoUpdate: boolean; | ||
tint: number; | ||
readonly delayLimit: number; | ||
update(dt: number): void; | ||
private setSpriteRegion(attachment, sprite, region); | ||
private setMeshRegion(attachment, mesh, region); | ||
private setSpriteRegion; | ||
private setMeshRegion; | ||
protected lastTime: number; | ||
@@ -1318,3 +1343,5 @@ autoUpdateTransform(): void; | ||
transformHack(): number; | ||
hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any): any[][]; | ||
destroy(options?: any): void; | ||
} | ||
} |
{ | ||
"name": "pixi-spine", | ||
"version": "2.0.0-alpha", | ||
"description": "Spine implementation for pixi v^3 and v^4", | ||
"version": "2.0.0", | ||
"description": "Spine implementation for pixi v^5", | ||
"author": "Mat Groves", | ||
@@ -32,5 +32,5 @@ "contributors": [ | ||
"docs": "typedoc --out ./docs/ --readme README.md ./src/", | ||
"check:browserify": "yarn checkpack -- browserify -e test/checkpack.ts", | ||
"check:webpack": "yarn checkpack -- webpack -e test/checkpack.ts", | ||
"check:vanillajs": "yarn checkpack -- vanillajs -e test/checkpack.ts", | ||
"check:browserify": "yarn checkpack browserify -e test/checkpack.ts", | ||
"check:webpack": "yarn checkpack webpack -e test/checkpack.ts", | ||
"check:vanillajs": "yarn checkpack vanillajs -e test/checkpack.ts", | ||
"check:all": "yarn build && yarn check:browserify && yarn check:webpack && yarn check:vanillajs" | ||
@@ -40,3 +40,2 @@ }, | ||
"bin/", | ||
"src/", | ||
"SPINE-LICENSE", | ||
@@ -47,3 +46,4 @@ "package.json", | ||
"devDependencies": { | ||
"checkpack": "~0.1.0", | ||
"@types/lodash": "^4.14.108", | ||
"checkpack": "^0.3", | ||
"del": "~2.2.0", | ||
@@ -53,3 +53,3 @@ "glob": "~7.1.1", | ||
"parallelshell": "~2.0.0", | ||
"pixi.js": "next", | ||
"pixi.js-legacy": "~5.0.1", | ||
"rimraf": "~2.5.3", | ||
@@ -59,4 +59,4 @@ "tmp": "^0.0.33", | ||
"typedoc": "^0.9.0", | ||
"typescript": "~2.4" | ||
"typescript": "^2.8.3" | ||
} | ||
} |
@@ -5,4 +5,6 @@ # pixi-spine | ||
Spine implementation for pixi v5. | ||
Spine implementation for PixiJS v5. | ||
For v4 please see [v4.x branch](https://github.com/pixijs/pixi-spine/tree/v4.x) and use npm version `1.5.21` | ||
## Usage | ||
@@ -12,3 +14,3 @@ | ||
If you are just including the built files, pixi spine adds itself to a pixi namespace: | ||
If you are just including the built files, pixi spine adds itself to a `PIXI` namespace: | ||
@@ -26,3 +28,3 @@ ```js | ||
PIXI.loader | ||
app.loader | ||
.add('spineCharacter', 'spine-data-1/HERO.json') | ||
@@ -63,5 +65,5 @@ .load(function (loader, resources) { | ||
Pixi-spine 1.3.x works ONLY with data exported from Spine 3.5. | ||
We aim to support the latest stable version of spine. | ||
Please enable "beta updates" and re-export everything from the spine editor. | ||
If you are below Spine 3.5, please please enable "beta updates" and re-export everything from the spine editor. | ||
@@ -68,0 +70,0 @@ According to spine runtime license, you can use runtime only if you have bought the editor, so exporting latest versions of animations shouldn't be a problem for you. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
88
1208941
12
6
8821