pixi-spine
Advanced tools
Comparing version 1.3.2 to 1.3.3
/// <reference types="pixi.js" /> | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class Animation { | ||
@@ -204,3 +204,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class AnimationState { | ||
@@ -219,3 +219,3 @@ static emptyAnimation: Animation; | ||
update(delta: number): void; | ||
updateMixingFrom(entry: TrackEntry, delta: number, canEnd: boolean): void; | ||
updateMixingFrom(entry: TrackEntry, delta: number): void; | ||
apply(skeleton: Skeleton): void; | ||
@@ -227,3 +227,3 @@ applyMixingFrom(entry: TrackEntry, skeleton: Skeleton): number; | ||
clearTrack(trackIndex: number): void; | ||
setCurrent(index: number, current: TrackEntry): void; | ||
setCurrent(index: number, current: TrackEntry, interrupt: boolean): void; | ||
setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; | ||
@@ -341,3 +341,3 @@ setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class AnimationStateData { | ||
@@ -355,3 +355,3 @@ skeletonData: SkeletonData; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class AtlasAttachmentLoader implements AttachmentLoader { | ||
@@ -366,3 +366,3 @@ atlas: TextureAtlas; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
abstract class Attachment { | ||
@@ -382,3 +382,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
interface AttachmentLoader { | ||
@@ -391,3 +391,3 @@ newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
enum AttachmentType { | ||
@@ -401,3 +401,3 @@ Region = 0, | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class BoundingBoxAttachment extends VertexAttachment { | ||
@@ -408,3 +408,3 @@ color: Color; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class MeshAttachment extends VertexAttachment { | ||
@@ -428,3 +428,3 @@ region: TextureRegion; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class PathAttachment extends VertexAttachment { | ||
@@ -438,3 +438,3 @@ lengths: Array<number>; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class RegionAttachment extends Attachment { | ||
@@ -455,3 +455,3 @@ x: number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
enum BlendMode { | ||
@@ -464,6 +464,6 @@ Normal = 0, | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class Bone implements Updatable { | ||
static yDown: boolean; | ||
matrix: Matrix; | ||
matrix: PIXI.Matrix; | ||
readonly worldX: number; | ||
@@ -508,3 +508,3 @@ readonly worldY: number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class BoneData { | ||
@@ -533,3 +533,3 @@ index: number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
interface Constraint extends Updatable { | ||
@@ -539,3 +539,3 @@ getOrder(): number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class Event { | ||
@@ -550,3 +550,3 @@ data: EventData; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class EventData { | ||
@@ -560,3 +560,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class IkConstraint implements Constraint { | ||
@@ -577,3 +577,3 @@ data: IkConstraintData; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class IkConstraintData { | ||
@@ -589,3 +589,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class PathConstraint implements Constraint { | ||
@@ -618,3 +618,3 @@ static NONE: number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class PathConstraintData { | ||
@@ -650,3 +650,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class Skeleton { | ||
@@ -699,3 +699,3 @@ data: SkeletonData; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class SkeletonBounds { | ||
@@ -723,3 +723,3 @@ minX: number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class SkeletonData { | ||
@@ -755,3 +755,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class SkeletonJson { | ||
@@ -776,3 +776,3 @@ attachmentLoader: AttachmentLoader; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class Skin { | ||
@@ -787,3 +787,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class Slot { | ||
@@ -813,3 +813,3 @@ currentMesh: any; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class SlotData { | ||
@@ -825,3 +825,3 @@ index: number; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
abstract class Texture { | ||
@@ -871,3 +871,3 @@ protected _image: HTMLImageElement; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class TextureAtlas implements Disposable { | ||
@@ -901,3 +901,3 @@ pages: TextureAtlasPage[]; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class TransformConstraint implements Constraint { | ||
@@ -918,3 +918,3 @@ data: TransformConstraintData; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
class TransformConstraintData { | ||
@@ -938,3 +938,3 @@ name: string; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
interface Updatable { | ||
@@ -944,3 +944,3 @@ update(): void; | ||
} | ||
declare module PIXI.spine.core { | ||
declare namespace pixi_spine.core { | ||
interface Map<T> { | ||
@@ -1034,8 +1034,8 @@ [key: string]: T; | ||
} | ||
declare module PIXI.spine { | ||
function atlasParser(): (resource: loaders.Resource, next: () => any) => any; | ||
function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any): (line: String, callback: (baseTexture: BaseTexture) => any) => void; | ||
declare namespace pixi_spine { | ||
function atlasParser(): (resource: PIXI.loaders.Resource, next: () => any) => any; | ||
function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any): (line: String, callback: (baseTexture: PIXI.BaseTexture) => any) => void; | ||
function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any): (line: any, callback: any) => void; | ||
} | ||
declare module PIXI.spine { | ||
declare namespace pixi_spine { | ||
class SpineSprite extends PIXI.Sprite { | ||
@@ -1068,4 +1068,7 @@ region: core.TextureRegion; | ||
hackTextureBySlotIndex(slotIndex: number, texture?: PIXI.Texture, size?: PIXI.Rectangle): boolean; | ||
hackTextureBySlotName: (slotName: String, texture?: Texture, size?: Rectangle) => any; | ||
hackTextureBySlotName: (slotName: String, texture?: PIXI.Texture, size?: PIXI.Rectangle) => any; | ||
} | ||
} | ||
declare module PIXI { | ||
var spine: typeof pixi_spine; | ||
} |
{ | ||
"name": "pixi-spine", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Spine implementation for pixi v^3 and v^4", | ||
@@ -19,3 +19,3 @@ "author": "Mat Groves", | ||
"type": "git", | ||
"url" : "https://github.com/pixijs/pixi-spine.git" | ||
"url": "https://github.com/pixijs/pixi-spine.git" | ||
}, | ||
@@ -47,3 +47,6 @@ "scripts": { | ||
"typescript": "^2.0.3" | ||
}, | ||
"dependencies": { | ||
"@types/pixi.js": "^4.1.0" | ||
} | ||
} |
@@ -31,3 +31,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class Animation { | ||
@@ -34,0 +34,0 @@ name: string; |
@@ -31,3 +31,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class AnimationState { | ||
@@ -78,3 +78,3 @@ static emptyAnimation = new Animation("<empty>", [], 0); | ||
current.trackTime += currentDelta; | ||
this.setCurrent(i, next); | ||
this.setCurrent(i, next, true); | ||
while (next.mixingFrom != null) { | ||
@@ -86,5 +86,3 @@ next.mixTime += currentDelta; | ||
} | ||
this.updateMixingFrom(current, delta, true); | ||
} else { | ||
this.updateMixingFrom(current, delta, true); | ||
// Clear the track when there is no next entry, the track end time is reached, and there is no mixingFrom. | ||
@@ -98,2 +96,3 @@ if (current.trackLast >= current.trackEnd && current.mixingFrom == null) { | ||
} | ||
this.updateMixingFrom(current, delta); | ||
@@ -106,24 +105,19 @@ current.trackTime += currentDelta; | ||
updateMixingFrom (entry: TrackEntry, delta: number, canEnd: boolean) { | ||
let from = entry.mixingFrom; | ||
if (from == null) return; | ||
updateMixingFrom (entry: TrackEntry, delta: number) { | ||
let from = entry.mixingFrom; | ||
if (from == null) return; | ||
if (canEnd && entry.mixTime >= entry.mixDuration && entry.mixTime > 0) { | ||
this.queue.end(from); | ||
let newFrom = from.mixingFrom; | ||
entry.mixingFrom = newFrom; | ||
if (newFrom == null) return; | ||
entry.mixTime = from.mixTime; | ||
entry.mixDuration = from.mixDuration; | ||
from = newFrom; | ||
} | ||
this.updateMixingFrom(from, delta); | ||
from.animationLast = from.nextAnimationLast; | ||
from.trackLast = from.nextTrackLast; | ||
let mixingFromDelta = delta * from.timeScale; | ||
from.trackTime += mixingFromDelta; | ||
entry.mixTime += mixingFromDelta; | ||
if (entry.mixTime >= entry.mixDuration && from.mixingFrom != null && entry.mixTime > 0) { | ||
entry.mixingFrom = null; | ||
this.queue.end(from); | ||
return; | ||
} | ||
this.updateMixingFrom(from, delta, canEnd && from.alpha == 1); | ||
} | ||
from.animationLast = from.nextAnimationLast; | ||
from.trackLast = from.nextTrackLast; | ||
from.trackTime += delta * from.timeScale; | ||
entry.mixTime += delta * from.timeScale; | ||
} | ||
@@ -143,3 +137,6 @@ apply (skeleton: Skeleton) { | ||
let mix = current.alpha; | ||
if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton); | ||
if (current.mixingFrom != null) | ||
mix *= this.applyMixingFrom(current, skeleton); | ||
else if (current.trackTime >= current.trackEnd) | ||
mix = 0; | ||
@@ -169,2 +166,3 @@ // Apply current entry. | ||
this.queueEvents(current, animationTime); | ||
events.length = 0; | ||
current.nextAnimationLast = animationTime; | ||
@@ -215,3 +213,4 @@ current.nextTrackLast = current.trackTime; | ||
this.queueEvents(from, animationTime); | ||
if (entry.mixDuration > 0) this.queueEvents(from, animationTime); | ||
this.events.length = 0; | ||
from.nextAnimationLast = animationTime; | ||
@@ -225,2 +224,5 @@ from.nextTrackLast = from.trackTime; | ||
timelinesRotation: Array<number>, i: number, firstFrame: boolean) { | ||
if (firstFrame) timelinesRotation[i] = 0; | ||
if (alpha == 1) { | ||
@@ -260,7 +262,3 @@ timeline.apply(skeleton, 0, time, null, 1, setupPose, false); | ||
if (diff == 0) { | ||
if (firstFrame) { | ||
timelinesRotation[i] = 0; | ||
total = 0; | ||
} else | ||
total = timelinesRotation[i]; | ||
total = timelinesRotation[i]; | ||
} else { | ||
@@ -319,13 +317,13 @@ diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360; | ||
} | ||
this.events.length = 0; | ||
} | ||
clearTracks () { | ||
this.queue.drainDisabled = true; | ||
for (let i = 0, n = this.tracks.length; i < n; i++) | ||
this.clearTrack(i); | ||
this.tracks.length = 0; | ||
this.queue.drainDisabled = false; | ||
this.queue.drain(); | ||
} | ||
clearTracks () { | ||
let oldDrainDisabled = this.queue.drainDisabled; | ||
this.queue.drainDisabled = true; | ||
for (let i = 0, n = this.tracks.length; i < n; i++) | ||
this.clearTrack(i); | ||
this.tracks.length = 0; | ||
this.queue.drainDisabled = oldDrainDisabled; | ||
this.queue.drain(); | ||
} | ||
@@ -355,3 +353,3 @@ clearTrack (trackIndex: number) { | ||
setCurrent (index: number, current: TrackEntry) { | ||
setCurrent (index: number, current: TrackEntry, interrupt: boolean) { | ||
let from = this.expandToIndex(index); | ||
@@ -361,8 +359,10 @@ this.tracks[index] = current; | ||
if (from != null) { | ||
this.queue.interrupt(from); | ||
if (interrupt) this.queue.interrupt(from); | ||
current.mixingFrom = from; | ||
current.mixTime = 0; | ||
from.timelinesRotation.length = 0; | ||
// If not completely mixed in, set mixAlpha so mixing out happens from current mix to zero. | ||
if (from.mixingFrom != null) current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1); | ||
if (from.mixingFrom != null && from.mixDuration > 0) current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1); | ||
} | ||
@@ -381,2 +381,3 @@ | ||
if (animation == null) throw new Error("animation cannot be null."); | ||
let interrupt = true; | ||
let current = this.expandToIndex(trackIndex); | ||
@@ -386,7 +387,8 @@ if (current != null) { | ||
// Don't mix from an entry that was never applied. | ||
this.tracks[trackIndex] = null; | ||
this.tracks[trackIndex] = current.mixingFrom; | ||
this.queue.interrupt(current); | ||
this.queue.end(current); | ||
this.disposeNext(current); | ||
current = null; | ||
current = current.mixingFrom; | ||
interrupt = false; | ||
} else | ||
@@ -396,3 +398,3 @@ this.disposeNext(current); | ||
let entry = this.trackEntry(trackIndex, animation, loop, current); | ||
this.setCurrent(trackIndex, entry); | ||
this.setCurrent(trackIndex, entry, interrupt); | ||
this.queue.drain(); | ||
@@ -420,3 +422,3 @@ return entry; | ||
if (last == null) { | ||
this.setCurrent(trackIndex, entry); | ||
this.setCurrent(trackIndex, entry, true); | ||
this.queue.drain(); | ||
@@ -453,11 +455,12 @@ } else { | ||
setEmptyAnimations (mixDuration: number) { | ||
this.queue.drainDisabled = true; | ||
for (let i = 0, n = this.tracks.length; i < n; i++) { | ||
let current = this.tracks[i]; | ||
if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration); | ||
} | ||
this.queue.drainDisabled = false; | ||
this.queue.drain(); | ||
} | ||
setEmptyAnimations (mixDuration: number) { | ||
let oldDrainDisabled = this.queue.drainDisabled; | ||
this.queue.drainDisabled = true; | ||
for (let i = 0, n = this.tracks.length; i < n; i++) { | ||
let current = this.tracks[i]; | ||
if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration); | ||
} | ||
this.queue.drainDisabled = oldDrainDisabled; | ||
this.queue.drain(); | ||
} | ||
@@ -490,3 +493,3 @@ expandToIndex (index: number) { | ||
entry.nextTrackLast = -1; | ||
entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd; | ||
entry.trackEnd = Number.MAX_VALUE; | ||
entry.timeScale = 1; | ||
@@ -493,0 +496,0 @@ |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class AnimationStateData { | ||
@@ -35,0 +35,0 @@ skeletonData: SkeletonData; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class AtlasAttachmentLoader implements AttachmentLoader { | ||
@@ -35,0 +35,0 @@ atlas: TextureAtlas; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export abstract class Attachment { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export interface AttachmentLoader { | ||
@@ -35,0 +35,0 @@ /** @return May be null to not load an attachment. */ |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export enum AttachmentType { | ||
@@ -35,0 +35,0 @@ Region, BoundingBox, Mesh, LinkedMesh, Path |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class BoundingBoxAttachment extends VertexAttachment { | ||
@@ -35,0 +35,0 @@ color = new Color(1, 1, 1, 1); |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class MeshAttachment extends VertexAttachment { | ||
@@ -35,0 +35,0 @@ region: TextureRegion; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class PathAttachment extends VertexAttachment { | ||
@@ -35,0 +35,0 @@ lengths: Array<number>; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class RegionAttachment extends Attachment { | ||
@@ -35,0 +35,0 @@ x = 0; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export enum BlendMode { | ||
@@ -35,0 +35,0 @@ Normal, |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class Bone implements Updatable { | ||
@@ -35,0 +35,0 @@ static yDown: boolean = false; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class BoneData { | ||
@@ -35,0 +35,0 @@ index: number; |
@@ -31,3 +31,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export interface Constraint extends Updatable { | ||
@@ -34,0 +34,0 @@ getOrder(): number; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class Event { | ||
@@ -35,0 +35,0 @@ data: EventData; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class EventData { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class IkConstraint implements Constraint { | ||
@@ -35,0 +35,0 @@ data: IkConstraintData; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class IkConstraintData { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class PathConstraint implements Constraint { | ||
@@ -35,0 +35,0 @@ static NONE = -1; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class PathConstraintData { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class Skeleton { | ||
@@ -105,2 +105,3 @@ data: SkeletonData; | ||
updateCache.length = 0; | ||
this.updateCacheReset.length = 0; | ||
@@ -107,0 +108,0 @@ let bones = this.bones; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class SkeletonBounds { | ||
@@ -35,0 +35,0 @@ minX = 0; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class SkeletonData { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class SkeletonJson { | ||
@@ -35,0 +35,0 @@ attachmentLoader: AttachmentLoader; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class Skin { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class Slot { | ||
@@ -35,0 +35,0 @@ //this is for PIXI |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class SlotData { | ||
@@ -35,0 +35,0 @@ index: number; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export abstract class Texture { | ||
@@ -35,0 +35,0 @@ protected _image: HTMLImageElement; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class TextureAtlas implements Disposable { | ||
@@ -35,0 +35,0 @@ pages = new Array<TextureAtlasPage>(); |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class TransformConstraint implements Constraint { | ||
@@ -35,0 +35,0 @@ data: TransformConstraintData; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export class TransformConstraintData { | ||
@@ -35,0 +35,0 @@ name: string; |
@@ -32,3 +32,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export interface Updatable { | ||
@@ -35,0 +35,0 @@ update(): void; |
@@ -31,3 +31,3 @@ /****************************************************************************** | ||
module PIXI.spine.core { | ||
namespace pixi_spine.core { | ||
export interface Map<T> { | ||
@@ -34,0 +34,0 @@ [key: string]: T; |
@@ -1,2 +0,2 @@ | ||
module PIXI.spine { | ||
namespace pixi_spine { | ||
export function atlasParser() { | ||
@@ -3,0 +3,0 @@ return function (resource: PIXI.loaders.Resource, next: () => any) { |
/// <reference types="pixi.js" /> | ||
module PIXI.spine { | ||
namespace pixi_spine { | ||
/* Esoteric Software SPINE wrapper for pixi.js */ | ||
@@ -31,3 +31,3 @@ core.Bone.yDown = true; | ||
* ```js | ||
* var spineAnimation = new PIXI.Spine(spineData); | ||
* var spineAnimation = new spine(spineData); | ||
* ``` | ||
@@ -37,3 +37,3 @@ * | ||
* @extends Container | ||
* @memberof PIXI.spine | ||
* @memberof spine | ||
* @param spineData {object} The spine data loaded from a spine atlas. | ||
@@ -59,3 +59,3 @@ */ | ||
if ((typeof spineData) === "string") { | ||
throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.'); | ||
throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.'); | ||
} | ||
@@ -136,3 +136,3 @@ | ||
* @member {number} | ||
* @memberof PIXI.spine.Spine# | ||
* @memberof spine.Spine# | ||
*/ | ||
@@ -150,3 +150,3 @@ this.tintRgb = new Float32Array([1, 1, 1]); | ||
* @member {boolean} | ||
* @memberof PIXI.spine.Spine# | ||
* @memberof spine.Spine# | ||
* @default true | ||
@@ -166,3 +166,3 @@ */ | ||
* @member {number} | ||
* @memberof PIXI.spine.Spine# | ||
* @memberof spine.Spine# | ||
* @default 0xFFFFFF | ||
@@ -169,0 +169,0 @@ */ |
Sorry, the diff of this file is too big to display
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
43
1242917
1
13259
+ Added@types/pixi.js@^4.1.0
+ Added@types/pixi.js@4.8.9(transitive)