Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pixi-spine

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-spine - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7

15

bin/pixi-spine.d.ts

@@ -254,2 +254,3 @@ /// <reference types="pixi.js" />

private static deprecatedWarning3;
hasAnimation(animationName: string): boolean;
hasAnimationByName(animationName: string): boolean;

@@ -323,8 +324,8 @@ }

interface AnimationStateListener2 {
start(entry: TrackEntry): void;
interrupt(entry: TrackEntry): void;
end(entry: TrackEntry): void;
dispose(entry: TrackEntry): void;
complete(entry: TrackEntry): void;
event(entry: TrackEntry, event: Event): void;
start?(entry: TrackEntry): void;
interrupt?(entry: TrackEntry): void;
end?(entry: TrackEntry): void;
dispose?(entry: TrackEntry): void;
complete?(entry: TrackEntry): void;
event?(entry: TrackEntry, event: Event): void;
}

@@ -847,3 +848,3 @@ abstract class AnimationStateAdapter2 implements AnimationStateListener2 {

regions: TextureAtlasRegion[];
constructor(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any);
constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any);
addTexture(name: string, texture: PIXI.Texture): TextureAtlasRegion;

@@ -850,0 +851,0 @@ addTextureHash(textures: Map<PIXI.Texture>, stripExtension: boolean): void;

{
"name": "pixi-spine",
"version": "1.3.6",
"version": "1.3.7",
"description": "Spine implementation for pixi v^3 and v^4",

@@ -5,0 +5,0 @@ "author": "Mat Groves",

@@ -106,28 +106,3 @@ # pixi-spine

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:
```js
var spine = PIXI.spine;
var loader = new PIXI.loaders.Loader();
var atlas = new spine.SpineRuntime.Atlas();
/**
* Example below shows the textures hardcoded below, but it's also possible to load in a JSON
* file with these values using:
* loader.add('spritesheet', 'myspritesheet.json', callback);
*/
var allTextures = {
'head': PIXI.Texture.fromImage('head.svg'),
'left-eye': PIXI.Texture.fromImage('left-eye.svg')
};
//second parameter is stripExtension=true because we dont need '.png' inside region names
atlas.addTextureHash(allTextures, true);
PIXI.loader
.add('spineboy', 'spineboy.json', {metadata: {spineAtlas: atlas}})
.load(function(response) {
var mySpineBoy = new PIXI.spine.Spine(response.resources.boy.spineData);
stage.addChild(mySpineBoy);
});
```
See [examples/](examples/dynamic_texture_atlas.md).

@@ -134,0 +109,0 @@ ### How to change atlas file extension (I hate IIS webserver)

@@ -597,2 +597,7 @@ /******************************************************************************

hasAnimation(animationName: string): boolean {
let animation = this.data.skeletonData.findAnimation(animationName);
return animation !== null;
}
hasAnimationByName(animationName: string): boolean {

@@ -603,4 +608,3 @@ if (!AnimationState.deprecatedWarning3) {

}
let animation = this.data.skeletonData.findAnimation(animationName);
return animation !== null;
return this.hasAnimation(animationName);
}

@@ -607,0 +611,0 @@ }

@@ -37,3 +37,3 @@ /******************************************************************************

constructor(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {
constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any) {
if (atlasText) {

@@ -40,0 +40,0 @@ this.addSpineAtlas(atlasText, textureLoader, callback);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc