pixi-spine
Advanced tools
Comparing version 1.3.5 to 1.3.6
{ | ||
"name": "pixi-spine", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "Spine implementation for pixi v^3 and v^4", | ||
@@ -12,2 +12,3 @@ "author": "Mat Groves", | ||
"main": "./bin/pixi-spine.js", | ||
"types": "./bin/pixi-spine.d.ts", | ||
"homepage": "https://github.com/pixijs/pixi-spine", | ||
@@ -14,0 +15,0 @@ "bugs": { |
@@ -91,15 +91,19 @@ # pixi-spine | ||
var spineAtlas = new spine.Atlas(rawAtlasData, function(line, callback) { | ||
//pass the image here. | ||
callback(PIXI.BaseTexture.fromImage(line)); | ||
}); //specify path, image.png will be added automatically | ||
var spineAtlas = new PIXI.spine.core.TextureAtlas(rawAtlasData, function(line, callback) { | ||
//pass the image here. | ||
callback(PIXI.BaseTexture.fromImage(line)); | ||
}); //specify path, image.png will be added automatically | ||
var spineJsonParser = new PIXI.spine.SkeletonJsonParser(new PIXI.spine.AtlasAttachmentParser(spineAtlas)); | ||
var skeletonData = spineJsonParser.readSkeletonData(rawSkeletonData); | ||
var spineAtlasLoader = new PIXI.spine.core.AtlasAttachmentLoader(spineAtlas) | ||
var spineJsonParser = new PIXI.spine.core.SkeletonJson(spineAtlasLoader); | ||
var spineData = spineJsonParser.readSkeletonData(rawSkeletonData); | ||
//now we can create spine instance | ||
var spine = new PIXI.spine(skeletonData); | ||
var spine = new PIXI.spine(spineData); | ||
``` | ||
### How to use pixi spritesheet with it | ||
TODO: EDIT IT ACCORDING TO LATEST CHANGES | ||
It's possible to load each image separately as opposed to loading in just one spritesheet. This can be useful if SVGs are needed instead of providing many PNG files. Simply create an Atlas object and pass in an object of image names and PIXI textures, like so: | ||
@@ -106,0 +110,0 @@ ```js |
@@ -826,20 +826,20 @@ /****************************************************************************** | ||
/** Invoked when this entry has been set as the current entry. */ | ||
start (entry: TrackEntry): void; | ||
start? (entry: TrackEntry): void; | ||
/** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for | ||
* mixing. */ | ||
interrupt (entry: TrackEntry): void; | ||
interrupt? (entry: TrackEntry): void; | ||
/** Invoked when this entry is no longer the current entry and will never be applied again. */ | ||
end (entry: TrackEntry): void; | ||
end? (entry: TrackEntry): void; | ||
/** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry. | ||
* References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */ | ||
dispose (entry: TrackEntry): void; | ||
dispose? (entry: TrackEntry): void; | ||
/** Invoked every time this entry's animation completes a loop. */ | ||
complete (entry: TrackEntry): void; | ||
complete? (entry: TrackEntry): void; | ||
/** Invoked when this entry's animation triggers an event. */ | ||
event (entry: TrackEntry, event: Event): void; | ||
event? (entry: TrackEntry, event: Event): void; | ||
} | ||
@@ -846,0 +846,0 @@ |
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
1250024
225