forked from pixijs-userland/spine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
948f15c
commit d6100e6
Showing
66 changed files
with
9,919 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# pixi-spine | ||
|
||
Spine 4.1 implementation for PixiJS v6. | ||
|
||
Please open the github repo to get more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Spine Runtimes License Agreement | ||
Last updated January 1, 2020. Replaces all prior versions. | ||
|
||
Copyright (c) 2013-2020, Esoteric Software LLC | ||
|
||
Integration of the Spine Runtimes into software or otherwise creating | ||
derivative works of the Spine Runtimes is permitted under the terms and | ||
conditions of Section 2 of the Spine Editor License Agreement: | ||
http://esotericsoftware.com/spine-editor-license | ||
|
||
Otherwise, it is permitted to integrate the Spine Runtimes into software | ||
or otherwise create derivative works of the Spine Runtimes (collectively, | ||
"Products"), provided that each user of the Products must obtain their own | ||
Spine Editor license and redistribution of the Products in any form must | ||
include this license and copyright notice. | ||
|
||
THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY | ||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, | ||
BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"mainEntryPointFilePath": "<projectFolder>/compile/index.d.ts", | ||
"bundledPackages": [ | ||
"pixi-spine" | ||
], | ||
"compiler": { | ||
"tsconfigFilePath": "<projectFolder>/tsconfig-api.json" | ||
}, | ||
"apiReport": { | ||
"enabled": false | ||
}, | ||
"docModel": { | ||
"enabled": false | ||
}, | ||
"dtsRollup": { | ||
"enabled": true, | ||
"untrimmedFilePath": "<projectFolder>/index.d.ts" | ||
}, | ||
"tsdocMetadata": { | ||
"enabled": false | ||
}, | ||
"messages": { | ||
"compilerMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
}, | ||
"extractorMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
}, | ||
"tsdocMessageReporting": { | ||
"default": { | ||
"logLevel": "none" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"name": "@pixi-spine/all-4.1", | ||
"version": "3.0.16", | ||
"description": "Pixi integration with EsotericSoftware Spine, big, contains runtime for 4.1", | ||
"main": "lib/all-4.1.js", | ||
"module": "lib/all-4.1.es.js", | ||
"bundle": "dist/pixi-spine-4.1.umd.js", | ||
"types": "./index.d.ts", | ||
"namespace": "PIXI.spine", | ||
"dependencies": { | ||
"@pixi-spine/base": "~3.0.16", | ||
"@pixi-spine/loader-4.1": "~3.0.16", | ||
"@pixi-spine/loader-base": "~3.0.16", | ||
"@pixi-spine/runtime-4.1": "~3.0.16" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c rollup.config.js --silent", | ||
"build:types": "rimraf compile && tsc -p tsconfig-api.json && api-extractor run" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/pixijs/pixi-spine.git" | ||
}, | ||
"files": [ | ||
"lib", | ||
"dist", | ||
"*.d.ts", | ||
"SPINE-LICENSE" | ||
], | ||
"keywords": [ | ||
"pixi.js", | ||
"pixi", | ||
"spine", | ||
"SPINE-LICENSE" | ||
], | ||
"author": "Ivan Igorevich Popelyshev <[email protected]>", | ||
"contributors": [ | ||
"Mat Groves", | ||
"Chad Engler <[email protected]>", | ||
"Richard Davey <[email protected]>", | ||
"Shukant K. Pal <[email protected]>", | ||
"Yevhenii Huselietov <[email protected]>" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/pixijs/pixi-spine/issues" | ||
}, | ||
"license": "SEE SPINE-LICENSE", | ||
"homepage": "https://github.com/pixijs/pixi-spine/#readme", | ||
"devDependencies": { | ||
"@pixi-spine/eslint-config": "~1.0.0", | ||
"@pixi-spine/rollup-config": "~1.0.0", | ||
"chai": "~4.2.0", | ||
"eslint": "~7.13.0", | ||
"prepend": "=1.0.2", | ||
"rimraf": "3.0.2", | ||
"rollup": "^2.53.3", | ||
"tslib": "~2.2.0", | ||
"typescript": "~4.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { main } = require('@pixi-spine/rollup-config/main'); | ||
|
||
const results = main({ | ||
globals: { | ||
'@pixi-spine/base': 'PIXI.spine', | ||
'@pixi-spine/runtime-4.0': 'PIXI.spine40', | ||
'@pixi-spine/loader-base': 'PIXI.spine', | ||
'@pixi-spine/loader-4.0': 'PIXI.spine', | ||
}, | ||
}); | ||
|
||
// TODO: get sorted deps of all our @pixi-spine deps | ||
|
||
const umdDeps = ['@pixi/app', '@pixi/constants', '@pixi/core', '@pixi/display', '@pixi/graphics', | ||
'@pixi/loaders', '@pixi/math', '@pixi/mesh-extras', '@pixi/sprite', '@pixi/utils']; | ||
|
||
const license1 = 'is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license'; | ||
const licenseSpine = 'is licensed under SPINE-LICENSE\n * http://esotericsoftware.com/spine-runtimes-license'; | ||
|
||
results.forEach((entry) => { | ||
if (entry.output.banner) { | ||
entry.output.banner = entry.output.banner.replace(license1, licenseSpine); | ||
} | ||
if (entry.output.format === 'umd') { | ||
entry.external = entry.external.filter((moduleName) => { | ||
return moduleName.indexOf('@pixi-spine') !== 0; | ||
}).concat(umdDeps); | ||
} | ||
}) | ||
|
||
module.exports = results; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {SpineParser} from '@pixi-spine/loader-4.1'; | ||
export {SpineParser}; | ||
export * from '@pixi-spine/runtime-4.1'; | ||
export * from '@pixi-spine/base'; | ||
|
||
SpineParser.registerLoaderPlugin(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "compile", | ||
"declaration": true, | ||
"declarationMap": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": [ | ||
"src/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "compile", | ||
"baseUrl": "./", | ||
"paths": { | ||
"@pixi-spine/*": [ | ||
"packages/*/src" | ||
] | ||
} | ||
}, | ||
"include": [ | ||
"src/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"mainEntryPointFilePath": "<projectFolder>/compile/index.d.ts", | ||
"bundledPackages": [ | ||
"@pixi-spine/loader-4.0" | ||
], | ||
"compiler": { | ||
"tsconfigFilePath": "<projectFolder>/tsconfig-api.json" | ||
}, | ||
"apiReport": { | ||
"enabled": false | ||
}, | ||
"docModel": { | ||
"enabled": false | ||
}, | ||
"dtsRollup": { | ||
"enabled": true, | ||
"untrimmedFilePath": "<projectFolder>/index.d.ts" | ||
}, | ||
"tsdocMetadata": { | ||
"enabled": false | ||
}, | ||
"messages": { | ||
"compilerMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
}, | ||
"extractorMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
}, | ||
"tsdocMessageReporting": { | ||
"default": { | ||
"logLevel": "none" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare namespace GlobalMixins | ||
{ | ||
interface LoaderResource { | ||
spineData?: import('@pixi-spine/runtime-4.0').SkeletonData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "@pixi-spine/loader-4.1", | ||
"version": "3.0.16", | ||
"description": "Pixi loader middleware for spine 4.1 models", | ||
"main": "lib/loader-4.1.js", | ||
"module": "lib/loader-4.1.es.js", | ||
"bundle": "dist/loader-4.1.js", | ||
"types": "./index.d.ts", | ||
"namespace": "PIXI.spine", | ||
"peerDependencies": { | ||
"@pixi/app": "^6.1.0", | ||
"@pixi/core": "^6.1.0", | ||
"@pixi/display": "^6.1.0", | ||
"@pixi/loaders": "^6.1.0", | ||
"resource-loader": "~3.0.1" | ||
}, | ||
"dependencies": { | ||
"@pixi-spine/base": "~3.0.16", | ||
"@pixi-spine/loader-base": "~3.0.16", | ||
"@pixi-spine/runtime-4.0": "~3.0.16" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c rollup.config.js --silent", | ||
"build:types": "rimraf compile && tsc -p tsconfig-api.json && api-extractor run && node scripts/injectGlobalMixins" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/pixijs/pixi-spine.git" | ||
}, | ||
"files": [ | ||
"lib", | ||
"dist", | ||
"*.d.ts" | ||
], | ||
"keywords": [ | ||
"pixi.js", | ||
"pixi", | ||
"spine" | ||
], | ||
"author": "Ivan Igorevich Popelyshev <[email protected]>", | ||
"bugs": { | ||
"url": "https://github.com/pixijs/pixi-spine/issues" | ||
}, | ||
"homepage": "https://github.com/pixijs/pixi-spine/#readme", | ||
"devDependencies": { | ||
"@pixi-spine/eslint-config": "~1.0.0", | ||
"@pixi-spine/rollup-config": "~1.0.0", | ||
"chai": "~4.2.0", | ||
"eslint": "~7.13.0", | ||
"prepend": "=1.0.2", | ||
"rimraf": "3.0.2", | ||
"rollup": "^2.53.3", | ||
"tslib": "~2.2.0", | ||
"typescript": "~4.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const {main} = require('@pixi-spine/rollup-config/main'); | ||
|
||
module.exports = main({ | ||
globals: { | ||
'@pixi-spine/base': 'PIXI.spine.base', | ||
'@pixi-spine/runtime-3.8': 'PIXI.spine', | ||
'@pixi-spine/loader-base': 'PIXI.spine', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var prepend = require('prepend'); | ||
|
||
prepend('index.d.ts', '/// <reference path="./global.d.ts" />\n', function(error) { | ||
if (error) | ||
console.error(error.message); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/// <reference path="../global.d.ts" /> | ||
import {AbstractSpineParser} from '@pixi-spine/loader-base'; | ||
import {ISkeletonParser, TextureAtlas} from '@pixi-spine/base'; | ||
import {LoaderResource, Loader} from "@pixi/loaders"; | ||
import {AtlasAttachmentLoader, SkeletonBinary, SkeletonJson} from "@pixi-spine/runtime-4.1"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export class SpineParser extends AbstractSpineParser { | ||
createBinaryParser(): ISkeletonParser { | ||
return new SkeletonBinary(null); | ||
} | ||
|
||
createJsonParser(): ISkeletonParser { | ||
return new SkeletonJson(null); | ||
} | ||
|
||
parseData(resource: LoaderResource, parser: ISkeletonParser, atlas: TextureAtlas, dataToParse: any): void { | ||
const parserCast = parser as SkeletonBinary | SkeletonJson; | ||
|
||
parserCast.attachmentLoader = new AtlasAttachmentLoader(atlas); | ||
resource.spineData = parserCast.readSkeletonData(dataToParse); | ||
resource.spineAtlas = atlas; | ||
} | ||
|
||
static use = new SpineParser().genMiddleware().use; | ||
|
||
static registerLoaderPlugin() { | ||
Loader.registerPlugin(SpineParser); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "compile", | ||
"declaration": true, | ||
"declarationMap": true | ||
}, | ||
"include": [ | ||
"src/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.