├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .npmignore ├── Gruntfile.js ├── LICENSE ├── README.md ├── buddy-spine ├── ASSETS │ ├── Thumbs.db │ ├── bg.png │ ├── btn_01.png │ ├── btn_02.png │ ├── btn_clean.png │ ├── buddy_arm_left_rest.png │ ├── buddy_arm_right_bottom.png │ ├── buddy_arm_right_top.png │ ├── buddy_arm_walk_left_bottom.png │ ├── buddy_arm_walk_left_top.png │ ├── buddy_arm_walk_right_bottom.png │ ├── buddy_arm_walk_right_top.png │ ├── buddy_body.png │ ├── buddy_brow_left.png │ ├── buddy_brow_right.png │ ├── buddy_eye.png │ ├── buddy_face_happy.png │ ├── buddy_face_normal.png │ ├── buddy_foot_left.png │ ├── buddy_foot_right.png │ ├── buddy_hair.png │ ├── buddy_hand_right.png │ ├── buddy_head.png │ ├── buddy_leg_left_bottom.png │ ├── buddy_leg_left_top.png │ ├── buddy_leg_right_bottom.png │ ├── buddy_leg_right_top.png │ ├── buddy_legs_full.png │ ├── buddy_outfit01_collar.png │ ├── buddy_outfit01_glasses.png │ ├── buddy_outfit01_tie.png │ ├── buddy_outfit02_mask.png │ ├── buddy_outfit02_vest.png │ ├── buddy_pelvis.png │ └── inputfield.png └── buddy.spine ├── build ├── phaser-spine.d.ts ├── phaser-spine.js ├── phaser-spine.js.map └── phaser-spine.min.js ├── config ├── tslint.json └── typings.json ├── example ├── assets │ ├── btn_01.png │ ├── btn_02.png │ ├── buddy_skeleton.atlas │ ├── buddy_skeleton.json │ ├── buddy_skeleton.png │ ├── footstep.png │ ├── goblins.atlas │ ├── goblins.json │ ├── goblins.png │ ├── spineboy-old.atlas │ ├── spineboy-old.json │ ├── spineboy-old.png │ ├── spineboy.atlas │ ├── spineboy.json │ └── spineboy.png ├── buddy.html ├── goblins.html ├── spineboy-old.html └── spineboy.html ├── package-lock.json ├── package.json ├── ts ├── Plugin.ts ├── Spine.ts ├── SpineLoader.ts └── definition.d.ts └── vendor ├── Spine.d.ts └── Spine.js /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before opening this issue _please_ check we haven't already fixed it! Check the [Closed issues](https://github.com/azerion/phaser-spine/issues?q=is%3Aissue+is%3Aclosed) 2 | This Issue is about (delete as applicable) 3 | 4 | * A bug in the API (always say which version you're using!) 5 | * An error in the documentation 6 | * An error in the example 7 | * A problem with my own code 8 | 9 | API errors must include example code showing what happens, and why you don't believe this is the expected behavior. Also mention the Phaser version you're using for your project. Issues posted without code take _far_ longer to get resolved, _if ever_. 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .idea 3 | .tscache 4 | .tmp.txt -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | Gruntfile.js 2 | vendor 3 | ts 4 | .idea 5 | buddy-spine 6 | .tscache -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 'use strict'; 3 | 4 | grunt.initConfig({ 5 | //Get some details from the package.json 6 | pkg: grunt.file.readJSON('package.json'), 7 | banner: '/*!\n' + 8 | ' * <%= pkg.config.name %> - version <%= pkg.version %> \n' + 9 | ' * <%= pkg.description %>\n' + 10 | ' *\n' + 11 | ' * <%= pkg.author %>\n' + 12 | ' * Build at <%= grunt.template.today("dd-mm-yyyy") %>\n' + 13 | ' * Released under MIT License \n' + 14 | ' */\n', 15 | usebanner: { 16 | dist: { 17 | options: { 18 | position: 'top', 19 | banner: '<%= banner %>' 20 | }, 21 | files: { 22 | src: [ 'build/*.js' ] 23 | } 24 | } 25 | }, 26 | //Typescript settings per build 27 | ts: { 28 | options: { 29 | module: 'amd', 30 | target: 'es5', 31 | sourceMap: true, 32 | declaration: true, 33 | noImplicitAny: true 34 | }, 35 | dist: { 36 | src: ['ts/**/*.ts'], 37 | dest: 'build/<%= pkg.config.name %>.js' 38 | } 39 | }, 40 | watch: { 41 | files: ['ts/**/*.ts'], 42 | tasks: ['dist'], 43 | options: { 44 | livereload: true 45 | } 46 | }, 47 | connect: { 48 | server: { 49 | options: { 50 | port: 8080 51 | } 52 | } 53 | }, 54 | uglify: { 55 | options: { 56 | compress: { 57 | sequences: true, 58 | dead_code: true, 59 | conditionals: true, 60 | booleans: true, 61 | unused: true, 62 | if_return: true, 63 | join_vars: true, 64 | drop_console: true 65 | }, 66 | mangle: true, 67 | beautify: false 68 | }, 69 | dist: { 70 | files: { 71 | 'build/<%= pkg.config.name %>.min.js': [ 72 | 'vendor/Spine.js', 73 | 'build/<%= pkg.config.name %>.js' 74 | ] 75 | } 76 | } 77 | }, 78 | concat: { 79 | definitions: { 80 | src: ['build/phaser-spine.d.ts', 'vendor/Spine.d.ts'], 81 | dest: 'build/phaser-spine.d.ts' 82 | }, 83 | dist: { 84 | src: ['vendor/Spine.js', 'build/phaser-spine.js'], 85 | dest: 'build/phaser-spine.js' 86 | } 87 | }, 88 | clean: { 89 | dist: ['build'] 90 | } 91 | }); 92 | 93 | grunt.loadNpmTasks('grunt-contrib-clean'); 94 | grunt.loadNpmTasks('grunt-contrib-uglify'); 95 | grunt.loadNpmTasks('grunt-contrib-concat'); 96 | grunt.loadNpmTasks('grunt-banner'); 97 | grunt.loadNpmTasks('grunt-ts'); 98 | grunt.loadNpmTasks('grunt-contrib-connect'); 99 | grunt.loadNpmTasks('grunt-contrib-watch'); 100 | 101 | //dist Build 102 | grunt.registerTask('dist', [ 103 | 'clean:dist', //Clean the dist folder 104 | 'ts:dist',//Run typescript on the preprocessed files, for dist (client) 105 | 'uglify:dist', //Minify everything 106 | 'concat', 107 | 'usebanner:dist' //Minify everything 108 | ]); 109 | 110 | grunt.registerTask('dev', [ 111 | 'dist', 112 | 'connect', 113 | 'watch' 114 | ]); 115 | 116 | }; 117 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Azerion 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Phaser Spine 2 | ============ 3 | 4 | Spine plugin for Phaser, it works, somehow.. No? Submit an issue, otherwise have fun :) 5 | 6 | Key features: 7 | 8 | * Spine for Phaser! :o 9 | * Skin support 10 | * Possible to combine skins 11 | * Mixes and fading animations 12 | * Support for scaled atlases 13 | 14 | Spine Version 15 | ------------- 16 | Please note that the current spine version is an older version, and as a result of that it will work best with **Spine version 3.2**. 17 | There is a newer version of spine available (Spine-ts, up-to-date with latest spine runtime) but work on that is currently halted for this library. 18 | 19 | If you feel like helping out, you're welcome to clone the [spine-ts](https://github.com/azerion/phaser-spine/tree/spine-ts) branch of this library. 20 | 21 | Getting Started 22 | --------------- 23 | First you want to get a fresh copy of the plugin. You can get it from this repo or from npm, ain't that handy. 24 | ``` 25 | npm install @azerion/phaser-spine --save-dev 26 | ``` 27 | 28 | Next up you'd want to add it to your list of js sources you load into your game 29 | ```html 30 | 31 | ``` 32 | 33 | After adding the script to the page you can activate it by enabling the plugin: 34 | ```javascript 35 | game.add.plugin(PhaserSpine.SpinePlugin); 36 | ``` 37 | 38 | 39 | Usage 40 | ----- 41 | Like any other asset in Phaser, you need to preload the spine object you want in your game. A spine Javascript export will deliver you three files; *.atlas, *.json and *.png. 42 | The preloader expects these to be in the same folder, and when so you can just preload the json file by adding the following code to your game: 43 | 44 | ```javascript 45 | game.load.spine( 46 | 'buddy', //The key used for Phaser's cache 47 | 'assets/buddy_skeleton.json' //The location of the spine's json file 48 | ); 49 | ``` 50 | 51 | Now you can just add the spine animation to your game: 52 | ```javascript 53 | buddy = game.add.spine( 54 | 400, //X positon 55 | 300, //Y position 56 | 'buddy' //the key of the object in cache 57 | ); 58 | ``` 59 | 60 | ### Playing animations 61 | Phaser-spine uses the same API as the original runtime for playing an animation, after adding the spine object to your game, you can call the following function on your object: 62 | ```javascript 63 | buddy.setAnimationByName( 64 | 0, //Track index 65 | "idle", //Animation's name 66 | true //If the animation should loop or not 67 | ); 68 | ``` 69 | 70 | ### Handling events 71 | You can handle Spine events, just add your callback to Spine.onEvent, it's regular [Phaser.Signal](https://phaser.io/docs/2.6.2/Phaser.Signal.html) object. Your callback should be defined with two arguments: event index (number) and event object (Spine.Event): 72 | 73 | ```javascript 74 | spineboy.onEvent.add(function (i,e) { 75 | console.log('name=' + e.data.name + ' int=' + e.intValue + ' float=' + e.floatValue + ' string=' + e.stringValue); 76 | } 77 | ``` 78 | 79 | 80 | ### Crossfading animations 81 | Stacking animations in spine is rather simple, you just add non-looping animations on top of eachother: 82 | ```javascript 83 | spineboy.setAnimationByName(0, "jump", false); //We'd like to show this animation once 84 | spineboy.addAnimationByName(0, "walk", true); //And after the previous animations is finished, we continue with this one 85 | ``` 86 | 87 | Now this will just simply chain the animation, and it will look a bit akward. Spine solves this by adding mixes that tell spine how to transition nicely from one animation to another. 88 | You can set mixes in phaser spine as well by doing the following: 89 | ```javascript 90 | spineboy.setMixByName("walk", "jump", 0.2); //transition from walk to jump and fade/blend it over a period of 0.2 seconds 91 | spineboy.setMixByName("jump", "walk", 0.4); //transition from jump to walk and fade/blend it over a period of 0.4 seconds 92 | ``` 93 | 94 | ### Switching skins 95 | Another great additions to spine is the support of skins and the ability to freely switch between them. Like animations this is simple and we use the same API as the runtime. 96 | Don't forget to call setToSetupPose after switching skins to update all attachments correctly. 97 | ```javascript 98 | buddy.setSkinByName('outfit01'); 99 | buddy.setToSetupPose(); 100 | ``` 101 | 102 | ### Combining skins 103 | Now the last final awesome part is that you can also create skins in code yourself by simply grouping other existing skins. 104 | ```javascript 105 | var newSkin = buddy.createCombinedSkin( 106 | 'outfit02', //The name of the new skin, will be automaticly added to the skeleton data 107 | 'vest', //One of the skins we want to combine 108 | 'mask' //The other skin we want to combine 109 | ); 110 | 111 | //Setting the new skin can be set with: 112 | buddy.setSkin(newSkin); 113 | //Or by referencing the new name 114 | buddy.setSkinByName(outfit02); 115 | 116 | //And then we shouldn't forget to setToSetupPose ;) 117 | buddy.setToSetupPose(); 118 | ``` 119 | 120 | ### Scaled atlases 121 | In Spine it's possible to define different scales for your export atlases, including a special suffix that will be suffixed to each atlas name. By default this plugin assumes that no scale is configured, ergo everything is set with scale=1. 122 | If you export your atlases to a smaller scale, than this will only happen to the images, the original bone structure will still be defined at the original size you defined in your spine project. 123 | 124 | If the exported image is scaled up (or down), than this has to be inverted by the runtime in order to have the correct size of the images for the attachments. In order to do do this correctly, the suffix for a scale any other than 1 has to be set. 125 | By default this plugin parses the suffix with a regular expression that looks for numbers start with @ and ending by x. So an atlas file with a scale of 0.5 should have a suffix of @0.5x and the resultion file name would be spineBoy@0.5x.atlas. 126 | 127 | If you'd like a different setup you can do so by supplying a new RegExp object to the follow property: 128 | ```javascript 129 | PhaserSpine.SpinePlugin.RESOLUTION_REGEXP = /#(.+)r/; 130 | ``` 131 | Now the Spine plugin will look for suffixes that look like: #0.5r 132 | 133 | The next step is to tell the preloader which scaling variants are available for loading, by adding them as an array in the 3rd optional parameter: 134 | ```javascript 135 | game.load.spine('shooter', "shooter.json", ['@0.7x', '@0.5x']); 136 | ``` 137 | The preloader will load 1 json (with all the skeleton/animation data), and 2 images and 2 atlas files. 138 | 139 | Later in your game, when you create a new spine object, you again need to add the scaling variant you would like to have for your game. This way you can conditionally load different assets. 140 | If you pass no scaling variant to the object, it will just get the first variant from the array supplied when you preload the spine object. 141 | ```javascript 142 | shooter = game.add.spine(400, 300, "shooter", '@0.7x'); 143 | //the above is equal to: 144 | shooter = game.add.spine(400, 300, "shooter"); 145 | //because @0.7x is the first element of the array supplied to the preloader 146 | ``` 147 | 148 | 149 | Todo 150 | ---- 151 | - adding a body for physics 152 | - Handling input 153 | 154 | Credits 155 | ------- 156 | Credit due, where credit's due as my mom always said. This version of phaser-spine is based on the original work by [Studio krok's PhaserSpine](https://github.com/StudioKrok/PhaserSpine) 157 | 158 | Disclaimer 159 | ---------- 160 | We at Azerion just love playing and creating 161 | awesome games. We aren't affiliated with Phaser.io and/or esotericsoftware. We just needed some awesome spine animations in our awesome HTML5 games. Feel free to use it for enhancing your own awesome games! 162 | 163 | Phaser Spine is distributed under the MIT license. All 3rd party libraries and components are distributed under their 164 | respective license terms. 165 | -------------------------------------------------------------------------------- /buddy-spine/ASSETS/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/Thumbs.db -------------------------------------------------------------------------------- /buddy-spine/ASSETS/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/bg.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/btn_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/btn_01.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/btn_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/btn_02.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/btn_clean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/btn_clean.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_left_rest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_left_rest.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_right_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_right_bottom.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_right_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_right_top.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_walk_left_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_walk_left_bottom.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_walk_left_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_walk_left_top.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_walk_right_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_walk_right_bottom.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_arm_walk_right_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_arm_walk_right_top.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_body.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_brow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_brow_left.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_brow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_brow_right.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_eye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_eye.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_face_happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_face_happy.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_face_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_face_normal.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_foot_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_foot_left.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_foot_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_foot_right.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_hair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_hair.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_hand_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_hand_right.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_head.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_leg_left_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_leg_left_bottom.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_leg_left_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_leg_left_top.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_leg_right_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_leg_right_bottom.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_leg_right_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_leg_right_top.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_legs_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_legs_full.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_outfit01_collar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_outfit01_collar.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_outfit01_glasses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_outfit01_glasses.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_outfit01_tie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_outfit01_tie.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_outfit02_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_outfit02_mask.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_outfit02_vest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_outfit02_vest.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/buddy_pelvis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/buddy_pelvis.png -------------------------------------------------------------------------------- /buddy-spine/ASSETS/inputfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/ASSETS/inputfield.png -------------------------------------------------------------------------------- /buddy-spine/buddy.spine: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/buddy-spine/buddy.spine -------------------------------------------------------------------------------- /build/phaser-spine.d.ts: -------------------------------------------------------------------------------- 1 | declare module PhaserSpine { 2 | interface SpineObjectFactory extends Phaser.GameObjectFactory { 3 | spine: (x: number, y: number, key: string, scalingVariant?: string, group?: Phaser.Group) => PhaserSpine.Spine; 4 | } 5 | interface SpineObjectCreator extends Phaser.GameObjectCreator { 6 | spine: (x: number, y: number, key: string, scalingVariant?: string, group?: Phaser.Group) => PhaserSpine.Spine; 7 | } 8 | interface SpineCache extends Phaser.Cache { 9 | addSpine: (key: string, data: any) => void; 10 | getSpine: (key: string) => any; 11 | spine: { 12 | [key: string]: SpineCacheData; 13 | }; 14 | } 15 | interface SpineLoader extends Phaser.Loader { 16 | spine: (key: string, url: string, scalingVariants?: string[]) => void; 17 | cache: SpineCache; 18 | } 19 | interface SpineGame extends Phaser.Game { 20 | add: SpineObjectFactory; 21 | load: SpineLoader; 22 | cache: SpineCache; 23 | } 24 | interface SpineCacheData { 25 | atlas: string; 26 | basePath: string; 27 | variants: string[]; 28 | } 29 | class SpinePlugin extends Phaser.Plugin { 30 | static RESOLUTION_REGEXP: RegExp; 31 | constructor(game: SpineGame, parent: Phaser.PluginManager); 32 | private addSpineLoader(); 33 | private addSpineFactory(); 34 | private addSpineCache(); 35 | } 36 | } 37 | declare module "phaser-spine" { 38 | export = PhaserSpine; 39 | } 40 | declare module PhaserSpine { 41 | class Spine extends Phaser.Group { 42 | static globalAutoUpdate: boolean; 43 | private skeleton; 44 | private skeletonData; 45 | private stateData; 46 | private state; 47 | private slotContainers; 48 | private lastTime; 49 | private imageScale; 50 | private globalTint; 51 | game: PhaserSpine.SpineGame; 52 | onEvent: Phaser.Signal; 53 | onComplete: Phaser.Signal; 54 | onEnd: Phaser.Signal; 55 | constructor(game: PhaserSpine.SpineGame, key: string, scalingVariant?: string); 56 | autoUpdate: boolean; 57 | private getScaleFromVariant(variant); 58 | setTint(tint: number): void; 59 | update(dt?: number): void; 60 | destroy(destroyChildren?: boolean, soft?: boolean): void; 61 | autoUpdateTransform(): void; 62 | createSprite(slot: any, attachment: any): Phaser.Sprite; 63 | createMesh(slot: any, attachment: any): Phaser.Rope; 64 | setMixByName(fromName: string, toName: string, duration: number): void; 65 | setAnimationByName(trackIndex: number, animationName: string, loop?: boolean): spine.TrackEntry; 66 | addAnimationByName(trackIndex: number, animationName: string, loop?: boolean, delay?: number): spine.TrackEntry; 67 | getCurrentAnimationForTrack(trackIndex: number): string; 68 | setSkinByName(skinName: string): void; 69 | setSkin(skin: spine.Skin): void; 70 | setToSetupPose(): void; 71 | createCombinedSkin(newSkinName: string, ...skinNames: string[]): spine.Skin; 72 | } 73 | } 74 | declare module PhaserSpine { 75 | class SpineTextureLoader { 76 | private game; 77 | constructor(game: Phaser.Game); 78 | load: (page: any, file: string, atlas: spine.Atlas) => void; 79 | unload: (texture: PIXI.BaseTexture) => void; 80 | } 81 | } 82 | 83 | declare module spine { 84 | var degRad: number; 85 | var radDeg: number; 86 | 87 | class Float32Array { 88 | constructor(...args: any[]); 89 | } 90 | class Uint32Array { 91 | constructor(...args: any[]); 92 | } 93 | class Uint16Array { 94 | constructor(...args: any[]); 95 | } 96 | 97 | var temp: Float32Array; 98 | 99 | enum BlendMode { 100 | normal, 101 | additive, 102 | multiply, 103 | screen 104 | } 105 | 106 | class BoneData { 107 | public name: string; 108 | public parent: Bone; 109 | 110 | public length: number; 111 | public x: number; 112 | public y: number; 113 | public rotation: number; 114 | public scaleX: number; 115 | public scaleY: number; 116 | public inheritScale: boolean; 117 | public inheritRotation: boolean; 118 | 119 | constructor(name: string, parent: Bone); 120 | } 121 | 122 | class SlotData { 123 | public name: string; 124 | public boneData: BoneData; 125 | 126 | public r: number; 127 | public g: number; 128 | public b: number; 129 | public a: number; 130 | public attachmentName: string; 131 | public blendMode: BlendMode; 132 | 133 | constructor(name: string, boneData: BoneData); 134 | } 135 | 136 | class IkConstraintData { 137 | public name: string; 138 | public bones: Bone[]; 139 | 140 | public target: Bone; 141 | public bendDirection: number; 142 | public mix: number; 143 | 144 | constructor(name: string); 145 | } 146 | 147 | class TransformConstraintData { 148 | public name: string; 149 | 150 | public bone: Bone; 151 | public target: Bone; 152 | public translateMix: number; 153 | public x: number; 154 | public y: number; 155 | 156 | constructor(name: string); 157 | } 158 | 159 | class Bone { 160 | public data: BoneData; 161 | public skeleton: Skeleton; 162 | public parent: Bone; 163 | 164 | static yDown: boolean; 165 | 166 | public x: number; 167 | public y: number; 168 | public rotation: number; 169 | public scaleX: number; 170 | public scaleY: number; 171 | public a: number; 172 | public b: number; 173 | public worldX: number; 174 | public c: number; 175 | public d: number; 176 | public worldY: number; 177 | public worldSignX: number; 178 | public worldSignY: number; 179 | 180 | constructor(boneData: BoneData, skeleton: Skeleton, parent: Bone); 181 | 182 | public update(): void; 183 | public updateWorldTransformWith(): void; 184 | public updateWorldTransform(x: number, y: number, rotation: number, scaleX: number, scaleY: number): void; 185 | public setToSetupPose(): void; 186 | public getWorldRotationX(): number; 187 | public getWorldRotationY(): number; 188 | public getWorldScaleX(): number; 189 | public getWorldScaleY(): number; 190 | public worldToLocal(world: any): any; 191 | public localToWorld(local: any): any; 192 | } 193 | 194 | class Slot { 195 | public data: SlotData; 196 | public bone: Bone; 197 | public attachmentVertices: Float32Array; 198 | public currentSpriteName: string; 199 | public currentSprite: Phaser.Sprite; 200 | public currentMeshName: string; 201 | public currentMesh: PIXI.Strip; 202 | public sprites: {[spriteName: string]: Phaser.Sprite}; 203 | 204 | public r: number; 205 | public g: number; 206 | public b: number; 207 | public a: number; 208 | private _attachmentTime: number; 209 | public attachment: Attachment; 210 | 211 | constructor(slotData: SlotData, bone: Bone); 212 | 213 | public setAttachment(attachment: Attachment): void; 214 | public setAttachmentTime(time: number): void; 215 | public getAttachmentTime(): Attachment; 216 | public setToSetupPose(): void; 217 | } 218 | 219 | class IkConstraint { 220 | public data: any; 221 | public mix: any; 222 | public bendDirection: number; 223 | public bones: Bone[]; 224 | public target: Bone; 225 | 226 | constructor(data: any, skeleton: Skeleton); 227 | 228 | public update(): void; 229 | public apply(): void; 230 | 231 | public static apply1(bone: Bone, targetX: number, targetY: number, alpha: number): void; 232 | public static apply2(parent: any, child: any, targetX: number, targetY: number, bendDir: number, alpha: number): void; 233 | } 234 | 235 | class TransformConstraint { 236 | public data: any; 237 | 238 | public translateMix: any; 239 | public x: number; 240 | public y: number; 241 | public bone: Bone; 242 | public target: Bone; 243 | 244 | constructor(data: any, skeleton: Skeleton); 245 | 246 | public apply(): void; 247 | public update(): void; 248 | } 249 | 250 | class Skin { 251 | public name: string; 252 | public attachments: any; 253 | 254 | constructor(name: string); 255 | 256 | public addAttachment(slotIndex: string, name: string, attachment: Attachment): void; 257 | public getAttachment(slotIndex: string, name: string): any; 258 | private _attachAll(skeleton: Skeleton, oldSkin: Skin); 259 | } 260 | 261 | class Animation { 262 | public name: string; 263 | public timelines: TimeLine; 264 | public duration: number; 265 | 266 | constructor(name: string, timelines: TimeLine, duration: number); 267 | public apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: any): void; 268 | public mix(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: any, alpha: number): void; 269 | 270 | public static binarySearch(values: number[], target: number, step: number): any; 271 | public static binarySearch1(values: number[], target: number): any; 272 | public static linearSearch(values: number[], target: number, step: number): number; 273 | } 274 | 275 | class Curves { 276 | public curves: Float32Array; 277 | 278 | constructor(frameCount: number); 279 | 280 | public setLinear(frameIndex: number): void; 281 | public setStepped(frameIndex: number): void; 282 | /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. 283 | * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of 284 | * the difference between the keyframe's values. */ 285 | public setCurve(frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; 286 | public getCurvePercent(frameIndex: number, percent: number): number; 287 | } 288 | 289 | class SkeletonData { 290 | public bones: BoneData[]; 291 | public slots: SlotData[]; 292 | public skins: Skin[]; 293 | public events: EventData[]; 294 | public animations: Animation[]; 295 | public ikConstraints: IkConstraintData[]; 296 | public transformConstraints: TransformConstraintData[]; 297 | 298 | public name: string; 299 | public defaultSkin: Skin; 300 | public width: number; 301 | public height: number; 302 | public version: number; 303 | public hash: string; 304 | 305 | constructor(); 306 | 307 | /** @return May be null. */ 308 | public findBone(boneName: string): spine.BoneData; 309 | /** @return -1 if the bone was not found. */ 310 | public findBoneIndex(boneName: string): number; 311 | /** @return May be null. */ 312 | public findSlot(slotName: string): spine.SlotData; 313 | /** @return -1 if the bone was not found. */ 314 | public findSlotIndex(slotName: string): number; 315 | /** @return May be null. */ 316 | public findSkin(skinName: string): spine.Skin; 317 | /** @return May be null. */ 318 | public findEvent(eventName: string): spine.EventData; 319 | /** @return May be null. */ 320 | public findAnimation(animationName: string): Animation; 321 | public findIkConstraint(constraintName: string): IkConstraint; 322 | public findTransformConstraints(constraintName: string): TransformConstraintData; 323 | } 324 | 325 | class Skeleton { 326 | public bones: Bone[]; 327 | public slots: Slot[]; 328 | public drawOrder: any[]; 329 | public ikConstraints: IkConstraint[]; 330 | public transformConstraints: TransformConstraint[]; 331 | public data: SkeletonData; 332 | public cache: any[]; 333 | 334 | public x: number; 335 | public y: number; 336 | public skin: Skin; 337 | public r: number; 338 | public g: number; 339 | public b: number; 340 | public a: number; 341 | public time: number; 342 | public flipX: boolean; 343 | public flipY: boolean; 344 | 345 | constructor(skeletonData: SkeletonData); 346 | 347 | public updateCache(): void; 348 | /** Updates the world transform for each bone. */ 349 | public updateWorldTransform(): void; 350 | /** Sets the bones and slots to their setup pose values. */ 351 | public setToSetupPose(): void; 352 | public setBonesToSetupPose(): void; 353 | public setSlotsToSetupPose(): void; 354 | /** @return May return null. */ 355 | public getRootBone(): spine.Bone; 356 | /** @return May be null. */ 357 | public findBone(boneName: any): spine.Bone; 358 | /** @return -1 if the bone was not found. */ 359 | public findBoneIndex(boneName: any): number; 360 | /** @return May be null. */ 361 | public findSlot(slotName: any): spine.Slot; 362 | /** @return -1 if the bone was not found. */ 363 | public findSlotIndex(slotName: any): number; 364 | public setSkinByName(skinName: any): void; 365 | /** Sets the skin used to look up attachments not found in the {@link SkeletonData#getDefaultSkin() default skin}. Attachments 366 | * from the new skin are attached if the corresponding attachment from the old skin was attached. 367 | * @param newSkin May be null. */ 368 | public setSkin(newSkin: any): void; 369 | /** @return May be null. */ 370 | public getAttachmentBySlotName(slotName: any, attachmentName: any): any; 371 | /** @return May be null. */ 372 | public getAttachmentBySlotIndex(slotIndex: any, attachmentName: any): any; 373 | public setAttachment(slotName: any, attachmentName: any): void; 374 | public findIkConstraint(constraintName: string): IkConstraint; 375 | public findTransformConstraint(constraintName: string): TransformConstraint; 376 | public update(delta: number): void; 377 | } 378 | 379 | class EventData { 380 | public name: string; 381 | 382 | constructor(name: string); 383 | 384 | public intValue: number; 385 | public floatValue: number; 386 | public stringValue: string; 387 | } 388 | 389 | class Event { 390 | public data: any; 391 | public time: number; 392 | 393 | constructor(time: number, data: any); 394 | 395 | public intValue: number; 396 | public floatValue: number; 397 | public stringValue: string; 398 | } 399 | 400 | enum AttachmentType { 401 | region, 402 | boundingbox, 403 | mesh, 404 | weightedmesh, 405 | linkedmesh, 406 | weightedlinkedmesh 407 | } 408 | 409 | interface Attachment { 410 | name: string; 411 | type: AttachmentType 412 | } 413 | 414 | class RegionAttachment implements Attachment { 415 | public name: string; 416 | public offset: Float32Array; 417 | public uvs: Float32Array; 418 | 419 | public type: AttachmentType; 420 | public x: number; 421 | public y: number; 422 | public rotation: number; 423 | public scaleX: number; 424 | public scaleY: number; 425 | public width: number; 426 | public height: number; 427 | public r: number; 428 | public g: number; 429 | public b: number; 430 | public a: number; 431 | public path: any; 432 | public rendererObject: any; 433 | public regionOffsetX: number; 434 | public regionOffsetY: number; 435 | public regionWidth: number; 436 | public regionHeight: number; 437 | public regionOriginalWidth: number; 438 | public regionOriginalHeight: number; 439 | 440 | constructor(name: string); 441 | 442 | public setUVs(u: any, v: any, u2: any, v2: any, rotate: any): void; 443 | public updateOffset(): void; 444 | public computeVertices(x: any, y: any, bone: any, vertices: any): void; 445 | } 446 | 447 | 448 | class MeshAttachment implements Attachment { 449 | public name: string; 450 | public type: AttachmentType; 451 | public vertices: any[]; 452 | public uvs: any[]; 453 | public regionUVs: any[]; 454 | public triangles: any[]; 455 | public hullLength: number; 456 | public r: number; 457 | public g: number; 458 | public b: number; 459 | public a: number; 460 | public path: any; 461 | public inheritFFD: boolean; 462 | public parentMesh: any; 463 | public rendererObject: any; 464 | public regionU: number; 465 | public regionV: number; 466 | public regionU2: number; 467 | public regionV2: number; 468 | public regionRotate: boolean; 469 | public regionOffsetX: number; 470 | public regionOffsetY: number; 471 | public regionWidth: number; 472 | public regionHeight: number; 473 | public regionOriginalWidth: number; 474 | public regionOriginalHeight: number; 475 | public edges: any; 476 | public width: number; 477 | public height: number; 478 | 479 | constructor(name: string); 480 | 481 | public updateUVs(): void; 482 | public setParentMesh(parentMesh: any): void; 483 | public computeWorldVertices(x: any, y: any, slot: any, worldVertices: any): void; 484 | } 485 | 486 | class WeightedMeshAttachment implements Attachment { 487 | public name: string; 488 | public type: AttachmentType; 489 | public bones: any[]; 490 | public uvs: any[]; 491 | public regionUVs: any[]; 492 | public triangles: any[]; 493 | public hullLength: number; 494 | public r: number; 495 | public g: number; 496 | public b: number; 497 | public a: number; 498 | public path: any; 499 | public inheritFFD: boolean; 500 | public parentMesh: any; 501 | public rendererObject: any; 502 | public regionU: number; 503 | public regionV: number; 504 | public regionU2: number; 505 | public regionV2: number; 506 | public regionRotate: boolean; 507 | public regionOffsetX: number; 508 | public regionOffsetY: number; 509 | public regionWidth: number; 510 | public regionHeight: number; 511 | public regionOriginalWidth: number; 512 | public regionOriginalHeight: number; 513 | public edges: any; 514 | public width: number; 515 | public height: number; 516 | 517 | constructor(name: string); 518 | 519 | public updateUVs(u: any, v: any, u2: any, v2: any, rotate: any): void; 520 | public setParentMesh(parentMesh: any): void; 521 | public computeWorldVertices(x: any, y: any, slot: any, worldVertices: any): void; 522 | } 523 | 524 | class BoundingBoxAttachment implements Attachment { 525 | public name: string; 526 | public type: AttachmentType; 527 | public vertices: any[]; 528 | 529 | constructor(name: string); 530 | 531 | public computeWorldVertices(x: any, y: any, bone: any, worldVertices: any): void; 532 | } 533 | 534 | interface TimeLine { 535 | frames: Float32Array; 536 | 537 | getFrameCount(): number; 538 | setFrame(...args: any[]): void; 539 | apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: number): void; 540 | } 541 | 542 | class RotateTimeline implements TimeLine { 543 | public boneIndex: number; 544 | public curves: Curves; 545 | public frames: Float32Array; 546 | 547 | constructor(frameCount: number); 548 | 549 | public getFrameCount(): number; 550 | public setFrame(frameIndex: number, time: number, angle: number): void; 551 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: number): void; 552 | } 553 | 554 | class TranslateTimeline implements TimeLine { 555 | public boneIndex: number; 556 | public curves: Curves; 557 | public frames: Float32Array; 558 | 559 | constructor(frameCount: number); 560 | 561 | public getFrameCount(): number; 562 | public setFrame(frameIndex: any, time: any, x: any, y: any): void; 563 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: number): void; 564 | } 565 | 566 | class ScaleTimeline implements TimeLine { 567 | public boneIndex: number; 568 | public curves: Curves; 569 | public frames: Float32Array; 570 | 571 | constructor(frameCount: number); 572 | 573 | public getFrameCount(): number; 574 | public setFrame(frameIndex: any, time: any, x: any, y: any): void; 575 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: number): void; 576 | } 577 | 578 | class ColorTimeline implements TimeLine { 579 | public slotIndex: number; 580 | public curves: Curves; 581 | public frames: Float32Array; 582 | 583 | constructor(frameCount: number); 584 | 585 | public getFrameCount(): number; 586 | public setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number): void; 587 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: number): void; 588 | } 589 | 590 | class AttachmentTimeline implements TimeLine { 591 | public slotIndex: number; 592 | public curves: Curves; 593 | public frames: Float32Array; 594 | public attachmentNames: string[]; 595 | 596 | constructor(frameCount: number); 597 | 598 | public getFrameCount(): number; 599 | public setFrame(frameIndex: number, time: number, attachmentName: string): void; 600 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: number): void; 601 | } 602 | 603 | class EventTimeline implements TimeLine { 604 | public frames: Float32Array; 605 | public events: any[]; 606 | 607 | constructor(frameCount: number); 608 | 609 | public getFrameCount(): number; 610 | public setFrame(frameIndex: any, event: any): void; 611 | /** Fires events for frames > lastTime and <= time. */ 612 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: any): void; 613 | } 614 | 615 | class DrawOrderTimeline implements TimeLine { 616 | public frames: Float32Array; 617 | public drawOrders: any[]; 618 | 619 | constructor(frameCount: number); 620 | 621 | public getFrameCount(): number; 622 | public setFrame(frameIndex: any, time: any, drawOrder: any): void; 623 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: any): void; 624 | } 625 | 626 | class FfdTimeline implements TimeLine { 627 | public curves: Curves; 628 | public frames: Float32Array; 629 | public frameVertices: any[]; 630 | 631 | slotIndex: number; 632 | attachment: number; 633 | 634 | constructor(frameCount: number); 635 | 636 | public getFrameCount(): number; 637 | public setFrame(frameIndex: any, time: any, vertices: any): void; 638 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: any): void; 639 | } 640 | 641 | class IkConstraintTimeline implements TimeLine { 642 | public frames: Float32Array; 643 | public curves: Curves; 644 | 645 | constructor(frameCount: number); 646 | 647 | public getFrameCount(): number; 648 | public setFrame(frameIndex: any, time: any, mix: any, bendDirection: number): void; 649 | public apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: any, alpha: any): void; 650 | } 651 | 652 | class AnimationStateData { 653 | public skeletonData: SkeletonData; 654 | public animationToMixTime: any; 655 | public defaultMix: number; 656 | 657 | constructor(skeletonData: SkeletonData); 658 | 659 | public setMixByName(fromName: any, toName: any, duration: any): void; 660 | public setMix(from: any, to: any, duration: any): void; 661 | public getMix(from: any, to: any): any; 662 | } 663 | 664 | class TrackEntry { 665 | public next: any; 666 | public previous: any; 667 | public animation: any; 668 | public loop: boolean; 669 | public delay: number; 670 | public time: number; 671 | public lastTime: number; 672 | public endTime: number; 673 | public timeScale: number; 674 | public mixTime: number; 675 | public mixDuration: number; 676 | public onStart: any; 677 | public onEnd: any; 678 | public onComplete: any; 679 | public onEvent: any; 680 | } 681 | 682 | class AnimationState { 683 | public data: spine.AnimationStateData; 684 | public tracks: any[]; 685 | public events: spine.Event[]; 686 | public onStart: any; 687 | public onEnd: any; 688 | public onComplete: any; 689 | public onEvent: any; 690 | public timeScale: number; 691 | constructor(data: spine.AnimationStateData); 692 | public update(delta: any): void; 693 | public apply(skeleton: spine.Skeleton): void; 694 | public clearTracks(): void; 695 | public clearTrack(trackIndex: any): void; 696 | private _expandToIndex(index); 697 | public setCurrent(index: any, entry: any): void; 698 | public setAnimationByName(trackIndex: any, animationName: any, loop: any): void; 699 | /** Set the current animation. Any queued animations are cleared. */ 700 | public setAnimation(trackIndex: any, animation: any, loop: any): spine.TrackEntry; 701 | public addAnimationByName(trackIndex: any, animationName: any, loop: any, delay: any): void; 702 | /** Adds an animation to be played delay seconds after the current or last queued animation. 703 | * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ 704 | public addAnimation(trackIndex: any, animation: any, loop: any, delay: any): spine.TrackEntry; 705 | /** May be null. */ 706 | public getCurrent(trackIndex: any): any; 707 | } 708 | 709 | class SkeletonJson { 710 | public attachmentLoader: any; 711 | public scale: number; 712 | constructor(attachmentLoader: any); 713 | public readCurve(timeline: any, frameIndex: any, valueMap: any): void; 714 | public toColor(hexString: any, colorIndex: any): number; 715 | public readSkeletonData(root: any): SkeletonData; 716 | public readAttachment(skin: any, name: any, map: any): any; 717 | public readAnimation(name: any, map: any, skeletonData: any): void; 718 | public getFloatArray(map: any, name: any, scale: number): Float32Array; 719 | public getUint32Array(map: any, name: any): Uint32Array; 720 | public getUint16Array(map: any, name: any): Uint16Array; 721 | } 722 | 723 | class Atlas { 724 | public textureLoader: any; 725 | public pages: any[]; 726 | public regions: any[]; 727 | 728 | static Format: { 729 | alpha: number; 730 | intensity: number; 731 | luminanceAlpha: number; 732 | rgb565: number; 733 | rgba4444: number; 734 | rgb888: number; 735 | rgba8888: number; 736 | }; 737 | 738 | static TextureFilter: { 739 | nearest: number; 740 | linear: number; 741 | mipMap: number; 742 | mipMapNearestNearest: number; 743 | mipMapLinearNearest: number; 744 | mipMapNearestLinear: number; 745 | mipMapLinearLinear: number; 746 | }; 747 | 748 | static TextureWrap: { 749 | mirroredRepeat: number; 750 | clampToEdge: number; 751 | repeat: number; 752 | }; 753 | constructor(atlasText: any, textureLoader: any); 754 | public findRegion(name: any): any; 755 | public dispose(): void; 756 | public updateUVs(page: any): void; 757 | } 758 | 759 | class AtlasPage { 760 | public name: any; 761 | public format: any; 762 | public minFilter: any; 763 | public magFilter: any; 764 | public uWrap: any; 765 | public vWrap: any; 766 | public rendererObject: any; 767 | public width: any; 768 | public height: any; 769 | } 770 | 771 | class AtlasAttachmentLoader { 772 | public atlas: any; 773 | constructor(atlas: any); 774 | public newAttachment(skin: any, type: any, name: any): any; 775 | } 776 | 777 | class AtlasRegion { 778 | public page: any; 779 | public name: any; 780 | public x: number; 781 | public y: number; 782 | public width: number; 783 | public height: number; 784 | public u: number; 785 | public v: number; 786 | public u2: number; 787 | public v2: number; 788 | public offsetX: number; 789 | public offsetY: number; 790 | public originalWidth: number; 791 | public originalHeight: number; 792 | public index: number; 793 | public rotate: boolean; 794 | public splits: any; 795 | public pads: any; 796 | } 797 | 798 | class AtlasReader { 799 | private lines; 800 | private index; 801 | constructor(text: any); 802 | public trim(value: any): any; 803 | public readLine(): string; 804 | public readValue(): any; 805 | /** Returns the number of tuple values read (2 or 4). */ 806 | public readTuple(tuple: any): number; 807 | } 808 | 809 | class SkeletonBounds { 810 | public polygonPool: any[]; 811 | public polygons: any[]; 812 | public boundingBoxes: any[]; 813 | private minX; 814 | private minY; 815 | private maxX; 816 | private maxY; 817 | constructor(); 818 | public update(skeleton: any, updateAabb: any): void; 819 | public aabbCompute(): void; 820 | /** Returns true if the axis aligned bounding box contains the point. */ 821 | public aabbContainsPoint(x: any, y: any): boolean; 822 | /** Returns true if the axis aligned bounding box intersects the line segment. */ 823 | public aabbIntersectsSegment(x1: any, y1: any, x2: any, y2: any): boolean; 824 | /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ 825 | public aabbIntersectsSkeleton(bounds: any): boolean; 826 | /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more 827 | * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ 828 | public containsPoint(x: any, y: any): any; 829 | /** Returns true if the polygon contains the point. */ 830 | public polygonContainsPoint(polygon: any, x: any, y: any): boolean; 831 | /** Returns true if the polygon contains the line segment. */ 832 | public intersectsSegment(polygon: any, x1: any, y1: any, x2: any, y2: any): boolean; 833 | public getPolygon(attachment: any): any; 834 | public getWidth(): number; 835 | public getHeight(): number; 836 | } 837 | } -------------------------------------------------------------------------------- /build/phaser-spine.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"phaser-spine.js","sourceRoot":"","sources":["../ts/Plugin.ts","../ts/Spine.ts","../ts/SpineLoader.ts"],"names":[],"mappings":";;;;;AACA,IAAO,WAAW,CAqIjB;AArID,WAAO,WAAW;IAgCV;QAAiC,+BAAa;QAI1C,qBAAY,IAAe,EAAE,MAA4B;YAAzD,YACI,kBAAM,IAAI,EAAE,MAAM,CAAC,SAKtB;YAHG,KAAI,CAAC,aAAa,EAAE,CAAC;YACrB,KAAI,CAAC,eAA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C;YAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEvC,MAAM,CAAC,OAAO,CAAC;QACnB,CAAC;QACL,YAAC;IAAD,CAAC,AA3dD,CAA2B,MAAM,CAAC,KAAK;IAE5B,sBAAgB,GAAY,IAAI,CAAC;IAF/B,iBAAK,QA2djB,CAAA;AACL,CAAC,EA/dM,WAAW,KAAX,WAAW,QA+djB;ACveD,IAAO,WAAW,CAwCjB;AAxCD,WAAO,WAAW;IAUd;QAGI,4BAAY,IAAiB;YAWtB,SAAI,GAAG,UAAU,IAAS,EAAE,IAAY,EAAE,KAAkB;gBAC/D,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBAE7C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;YACpD,CAAC,CAAC;YAQK,WAAM,GAAG,UAAU,OAAyB;gBAC/C,OAAO,CAAC,OAAO,EAAE,CAAC;YACtB,CAAC,CAAC;YAxBE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,CAAC;QAwBL,yBAAC;IAAD,CAAC,AA7BD,IA6BC;IA7BY,8BAAkB,qBA6B9B,CAAA;AACL,CAAC,EAxCM,WAAW,KAAX,WAAW,QAwCjB"} -------------------------------------------------------------------------------- /config/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [ 4 | true, 5 | "parameters", 6 | "statements" 7 | ], 8 | "ban": false, 9 | "class-name": true, 10 | "curly": true, 11 | "eofline": true, 12 | "forin": true, 13 | "indent": [ 14 | true, 15 | "spaces" 16 | ], 17 | "interface-name": true, 18 | "jsdoc-format": true, 19 | "label-position": true, 20 | "label-undefined": true, 21 | "max-line-length": [ 22 | true, 23 | 200 24 | ], 25 | "member-access": true, 26 | "no-any": false, 27 | "no-arg": true, 28 | "no-conditional-assignment": true, 29 | "no-consecutive-blank-lines": true, 30 | "no-console": [ 31 | true, 32 | "debug", 33 | "info", 34 | "time", 35 | "timeEnd", 36 | "trace" 37 | ], 38 | "no-construct": true, 39 | "no-constructor-vars": true, 40 | "no-debugger": true, 41 | "no-duplicate-key": true, 42 | "no-duplicate-variable": true, 43 | "no-empty": true, 44 | "no-eval": true, 45 | "no-inferrable-types": false, 46 | "no-internal-module": false, 47 | "no-null-keyword": false, 48 | "no-require-imports": true, 49 | "no-shadowed-variable": true, 50 | "no-string-literal": false, 51 | "no-switch-case-fall-through": true, 52 | "no-trailing-whitespace": true, 53 | "no-unreachable": true, 54 | "no-unused-expression": true, 55 | "no-unused-variable": true, 56 | "no-use-before-declare": true, 57 | "no-var-keyword": true, 58 | "no-var-requires": true, 59 | "object-literal-sort-keys": false, 60 | "one-line": [ 61 | true, 62 | "check-open-brace", 63 | "check-catch", 64 | "check-else", 65 | "check-finally", 66 | "check-whitespace" 67 | ], 68 | "quotemark": [ 69 | true, 70 | "single", 71 | "avoid-escape" 72 | ], 73 | "radix": true, 74 | "semicolon": [ 75 | true, 76 | "always" 77 | ], 78 | "switch-default": true, 79 | "trailing-comma": [ 80 | true, 81 | { 82 | "multiline": "never", 83 | "singleline": "never" 84 | } 85 | ], 86 | "triple-equals": [ 87 | true, 88 | "allow-null-check" 89 | ], 90 | "typedef": [ 91 | true, 92 | "call-signature", 93 | "parameter", 94 | "arrow-parameter", 95 | "property-declaration", 96 | "variable-declaration", 97 | "member-variable-declaration" 98 | ], 99 | "typedef-whitespace": [ 100 | true, 101 | { 102 | "call-signature": "nospace", 103 | "index-signature": "nospace", 104 | "parameter": "nospace", 105 | "property-declaration": "nospace", 106 | "variable-declaration": "nospace" 107 | }, 108 | { 109 | "call-signature": "onespace", 110 | "index-signature": "onespace", 111 | "parameter": "onespace", 112 | "property-declaration": "onespace", 113 | "variable-declaration": "onespace" 114 | } 115 | ], 116 | "use-strict": false, 117 | "variable-name": [ 118 | true, 119 | "allow-leading-underscore", 120 | "ban-keywords" 121 | ], 122 | "whitespace": [ 123 | true, 124 | "check-branch", 125 | "check-decl", 126 | "check-operator", 127 | "check-separator", 128 | "check-type" 129 | ] 130 | } 131 | } -------------------------------------------------------------------------------- /config/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phaser-spine", 3 | "main": "build/phaser-spine.d.ts", 4 | "global": true 5 | } -------------------------------------------------------------------------------- /example/assets/btn_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/btn_01.png -------------------------------------------------------------------------------- /example/assets/btn_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/btn_02.png -------------------------------------------------------------------------------- /example/assets/buddy_skeleton.atlas: -------------------------------------------------------------------------------- 1 | 2 | buddy_skeleton.png 3 | size: 1024,1024 4 | format: RGBA8888 5 | filter: Linear,Linear 6 | repeat: none 7 | bg 8 | rotate: false 9 | xy: 2, 412 10 | size: 800, 600 11 | orig: 800, 600 12 | offset: 0, 0 13 | index: -1 14 | buddy_arm_left_rest 15 | rotate: true 16 | xy: 134, 363 17 | size: 47, 153 18 | orig: 47, 153 19 | offset: 0, 0 20 | index: -1 21 | buddy_arm_right_bottom 22 | rotate: true 23 | xy: 481, 375 24 | size: 35, 54 25 | orig: 35, 54 26 | offset: 0, 0 27 | index: -1 28 | buddy_arm_right_top 29 | rotate: true 30 | xy: 361, 362 31 | size: 48, 57 32 | orig: 48, 57 33 | offset: 0, 0 34 | index: -1 35 | buddy_arm_walk_left_bottom 36 | rotate: false 37 | xy: 2, 35 38 | size: 46, 77 39 | orig: 46, 77 40 | offset: 0, 0 41 | index: -1 42 | buddy_arm_walk_left_top 43 | rotate: false 44 | xy: 281, 287 45 | size: 37, 74 46 | orig: 37, 74 47 | offset: 0, 0 48 | index: -1 49 | buddy_arm_walk_right_bottom 50 | rotate: true 51 | xy: 289, 363 52 | size: 47, 70 53 | orig: 47, 70 54 | offset: 0, 0 55 | index: -1 56 | buddy_arm_walk_right_top 57 | rotate: true 58 | xy: 870, 882 59 | size: 14, 78 60 | orig: 14, 78 61 | offset: 0, 0 62 | index: -1 63 | buddy_body 64 | rotate: false 65 | xy: 804, 871 66 | size: 64, 141 67 | orig: 64, 141 68 | offset: 0, 0 69 | index: -1 70 | buddy_brow_left 71 | rotate: false 72 | xy: 957, 904 73 | size: 29, 18 74 | orig: 29, 18 75 | offset: 0, 0 76 | index: -1 77 | buddy_brow_right 78 | rotate: true 79 | xy: 50, 94 80 | size: 18, 13 81 | orig: 18, 13 82 | offset: 0, 0 83 | index: -1 84 | buddy_eye 85 | rotate: true 86 | xy: 281, 278 87 | size: 7, 16 88 | orig: 7, 16 89 | offset: 0, 0 90 | index: -1 91 | buddy_face_happy 92 | rotate: true 93 | xy: 420, 374 94 | size: 36, 59 95 | orig: 36, 59 96 | offset: 0, 0 97 | index: -1 98 | buddy_face_normal 99 | rotate: true 100 | xy: 537, 379 101 | size: 31, 56 102 | orig: 31, 56 103 | offset: 0, 0 104 | index: -1 105 | buddy_foot_left 106 | rotate: true 107 | xy: 804, 642 108 | size: 67, 28 109 | orig: 67, 28 110 | offset: 0, 0 111 | index: -1 112 | buddy_foot_right 113 | rotate: true 114 | xy: 320, 299 115 | size: 62, 28 116 | orig: 62, 28 117 | offset: 0, 0 118 | index: -1 119 | buddy_hair 120 | rotate: true 121 | xy: 211, 271 122 | size: 90, 68 123 | orig: 90, 68 124 | offset: 0, 0 125 | index: -1 126 | buddy_hand_right 127 | rotate: false 128 | xy: 957, 924 129 | size: 60, 46 130 | orig: 60, 46 131 | offset: 0, 0 132 | index: -1 133 | buddy_head 134 | rotate: false 135 | xy: 134, 263 136 | size: 75, 98 137 | orig: 75, 98 138 | offset: 0, 0 139 | index: -1 140 | buddy_leg_left_bottom 141 | rotate: false 142 | xy: 804, 789 143 | size: 58, 80 144 | orig: 58, 80 145 | offset: 0, 0 146 | index: -1 147 | buddy_leg_left_top 148 | rotate: false 149 | xy: 841, 726 150 | size: 17, 61 151 | orig: 17, 61 152 | offset: 0, 0 153 | index: -1 154 | buddy_leg_right_bottom 155 | rotate: false 156 | xy: 804, 711 157 | size: 35, 76 158 | orig: 35, 76 159 | offset: 0, 0 160 | index: -1 161 | buddy_leg_right_top 162 | rotate: true 163 | xy: 957, 972 164 | size: 40, 65 165 | orig: 40, 65 166 | offset: 0, 0 167 | index: -1 168 | buddy_legs_full 169 | rotate: false 170 | xy: 2, 260 171 | size: 130, 150 172 | orig: 130, 150 173 | offset: 0, 0 174 | index: -1 175 | buddy_outfit01_collar 176 | rotate: false 177 | xy: 2, 2 178 | size: 35, 31 179 | orig: 35, 31 180 | offset: 0, 0 181 | index: -1 182 | buddy_outfit01_glasses 183 | rotate: true 184 | xy: 98, 180 185 | size: 78, 28 186 | orig: 78, 28 187 | offset: 0, 0 188 | index: -1 189 | buddy_outfit01_tie 190 | rotate: false 191 | xy: 65, 168 192 | size: 31, 90 193 | orig: 31, 90 194 | offset: 0, 0 195 | index: -1 196 | buddy_outfit02_mask 197 | rotate: false 198 | xy: 870, 898 199 | size: 85, 114 200 | orig: 85, 114 201 | offset: 0, 0 202 | index: -1 203 | buddy_outfit02_vest 204 | rotate: false 205 | xy: 2, 114 206 | size: 61, 144 207 | orig: 61, 144 208 | offset: 0, 0 209 | index: -1 210 | buddy_pelvis 211 | rotate: true 212 | xy: 65, 133 213 | size: 33, 21 214 | orig: 33, 21 215 | offset: 0, 0 216 | index: -1 217 | -------------------------------------------------------------------------------- /example/assets/buddy_skeleton.json: -------------------------------------------------------------------------------- 1 | { 2 | "skeleton": { "hash": "2w0LpLTE4nBFJEDC6870DQeAXmU", "spine": "3.0.12", "width": 800, "height": 600, "images": "./ASSETS/" }, 3 | "bones": [ 4 | { "name": "root" }, 5 | { "name": "legs_rest", "parent": "root", "length": 135.23, "x": -1.89, "y": -202.15, "rotation": 88.01 }, 6 | { "name": "body", "parent": "legs_rest", "length": 126.45, "x": 136.71, "y": 0.49, "rotation": -1.48 }, 7 | { "name": "pelvis", "parent": "body", "length": 16.11, "x": 5.18, "y": -4.94, "rotation": -177.94 }, 8 | { "name": "leg_right_top", "parent": "pelvis", "length": 64.85, "x": 7.35, "y": 4.89, "rotation": 28.63 }, 9 | { "name": "leg_right_bottom", "parent": "leg_right_top", "length": 68.61, "x": 65.02, "y": -0.79, "rotation": -37.41 }, 10 | { "name": "foot_right", "parent": "leg_right_bottom", "length": 35.8, "x": 68.62, "y": 0.27, "rotation": 97.61 }, 11 | { "name": "leg_left_top", "parent": "pelvis", "length": 58.21, "x": 7.01, "y": -13.98, "rotation": 3.69 }, 12 | { "name": "leg_left_bottom", "parent": "leg_left_top", "length": 77.88, "x": 58.21, "rotation": -30.57 }, 13 | { "name": "foot_left", "parent": "leg_left_bottom", "length": 40.11, "x": 77.89, "y": 0.32, "rotation": 116.75 }, 14 | { "name": "head", "parent": "body", "length": 85.49, "x": 126.45, "y": -0.01, "rotation": 5.74 }, 15 | { "name": "hair", "parent": "head", "length": 50.19, "x": 86.1, "y": -5.98, "rotation": -27.55 }, 16 | { "name": "facial_gear", "parent": "head", "x": 51.13, "y": -10.85 }, 17 | { "name": "face", "parent": "head", "x": 30.8, "y": -11.89 }, 18 | { "name": "eye_right", "parent": "head", "x": 50.03, "y": -20.32 }, 19 | { "name": "eye_left", "parent": "head", "x": 53.5, "y": 2.5 }, 20 | { "name": "brow_right", "parent": "head", "x": 64.72, "y": -25.16 }, 21 | { "name": "brow_left", "parent": "head", "x": 70.64, "y": 5.65 }, 22 | { "name": "body_gear", "parent": "body", "length": 81.95, "x": 101.84, "y": -1.72, "rotation": 179.32 }, 23 | { "name": "arm_right_top", "parent": "body", "length": 60.75, "x": 94.99, "y": -19.8, "rotation": -164.95 }, 24 | { "name": "arm_right_bottom", "parent": "arm_right_top", "length": 42.07, "x": 60.75, "y": 0.16, "rotation": 5.6 }, 25 | { "name": "hand_right", "parent": "arm_right_bottom", "length": 32.4, "x": 42.07, "y": -0.06, "rotation": 6.33 }, 26 | { "name": "arm_left_top", "parent": "body", "length": 72.38, "x": 93.85, "y": 34.2, "rotation": 173.99 }, 27 | { "name": "arm_left_bottom", "parent": "arm_left_top", "length": 66.3, "x": 72.38, "rotation": 9.85 } 28 | ], 29 | "slots": [ 30 | { "name": "bg", "bone": "root", "attachment": "bg" }, 31 | { "name": "buddy_arm_right_bottom", "bone": "arm_right_bottom" }, 32 | { "name": "buddy_arm_right_top", "bone": "arm_right_top" }, 33 | { "name": "buddy_arm_walk_right_bottom", "bone": "arm_right_bottom", "attachment": "buddy_arm_walk_right_bottom" }, 34 | { "name": "buddy_arm_walk_right_top", "bone": "arm_right_top", "attachment": "buddy_arm_walk_right_top" }, 35 | { "name": "buddy_body", "bone": "body", "attachment": "buddy_body" }, 36 | { "name": "buddy_foot_left", "bone": "foot_left", "attachment": "buddy_foot_left" }, 37 | { "name": "buddy_foot_right", "bone": "foot_right", "attachment": "buddy_foot_right" }, 38 | { "name": "buddy_hair", "bone": "hair", "attachment": "buddy_hair" }, 39 | { "name": "buddy_hand_right", "bone": "hand_right" }, 40 | { "name": "buddy_head", "bone": "head", "attachment": "buddy_head" }, 41 | { "name": "buddy_leg_left_bottom", "bone": "leg_left_bottom", "attachment": "buddy_leg_left_bottom" }, 42 | { "name": "buddy_leg_left_top", "bone": "leg_left_top", "attachment": "buddy_leg_left_top" }, 43 | { "name": "buddy_leg_right_bottom", "bone": "leg_right_bottom", "attachment": "buddy_leg_right_bottom" }, 44 | { "name": "buddy_leg_right_top", "bone": "leg_right_top", "attachment": "buddy_leg_right_top" }, 45 | { "name": "buddy_legs_full", "bone": "legs_rest", "attachment": "buddy_legs_full" }, 46 | { "name": "buddy_pelvis", "bone": "pelvis", "attachment": "buddy_pelvis" }, 47 | { "name": "buddy_face", "bone": "face", "attachment": "buddy_face_happy" }, 48 | { "name": "buddy_eye_left", "bone": "eye_left", "attachment": "buddy_eye" }, 49 | { "name": "buddy_brow_left", "bone": "brow_left", "attachment": "buddy_brow_left" }, 50 | { "name": "buddy_arm_left_rest", "bone": "arm_left_top" }, 51 | { "name": "buddy_brow_right", "bone": "brow_right", "attachment": "buddy_brow_right" }, 52 | { "name": "buddy_eye_right", "bone": "eye_right", "attachment": "buddy_eye" }, 53 | { "name": "body_gear", "bone": "body_gear", "attachment": "body_gear" }, 54 | { "name": "body_assets", "bone": "body", "attachment": "body_assets" }, 55 | { "name": "buddy_arm_walk_left_top", "bone": "arm_left_top", "attachment": "buddy_arm_walk_left_top" }, 56 | { "name": "buddy_arm_walk_left_bottom", "bone": "arm_left_bottom", "attachment": "buddy_arm_walk_left_bottom" }, 57 | { "name": "facial_gear", "bone": "facial_gear", "attachment": "facial_gear" } 58 | ], 59 | "skins": { 60 | "default": { 61 | "bg": { 62 | "bg": { "width": 800, "height": 600 } 63 | }, 64 | "buddy_arm_left_rest": { 65 | "buddy_arm_left_rest": { "x": 74.54, "y": -7.82, "rotation": 99.47, "width": 47, "height": 153 } 66 | }, 67 | "buddy_arm_right_bottom": { 68 | "buddy_arm_right_bottom": { "x": 19.88, "y": -5.59, "rotation": -66.75, "width": 35, "height": 54 } 69 | }, 70 | "buddy_arm_right_top": { 71 | "buddy_arm_right_top": { "x": 34.35, "y": -1.12, "rotation": 42.85, "width": 48, "height": 57 } 72 | }, 73 | "buddy_arm_walk_left_bottom": { 74 | "buddy_arm_walk_left_bottom": { "x": 37.56, "y": -2.83, "rotation": 74.11, "width": 46, "height": 77 } 75 | }, 76 | "buddy_arm_walk_left_top": { 77 | "buddy_arm_walk_left_top": { "x": 36.3, "y": -2.68, "rotation": 111.49, "width": 37, "height": 74 } 78 | }, 79 | "buddy_arm_walk_right_bottom": { 80 | "buddy_arm_walk_right_bottom": { "x": 39.13, "y": -4.69, "rotation": 56.83, "width": 47, "height": 70 } 81 | }, 82 | "buddy_arm_walk_right_top": { 83 | "buddy_arm_walk_right_top": { "x": 31.62, "y": -0.58, "rotation": 91.22, "width": 14, "height": 78 } 84 | }, 85 | "buddy_body": { 86 | "buddy_body": { "x": 71.33, "y": 4.34, "rotation": -86.54, "width": 64, "height": 141 } 87 | }, 88 | "buddy_brow_left": { 89 | "buddy_brow_left": { "x": 0.73, "y": 1.78, "rotation": -92.29, "width": 29, "height": 18 } 90 | }, 91 | "buddy_brow_right": { 92 | "buddy_brow_right": { "x": 1.9, "y": 0.08, "rotation": -92.29, "width": 18, "height": 13 } 93 | }, 94 | "buddy_eye_left": { 95 | "buddy_eye": { "x": 0.01, "y": -0.18, "rotation": -92.29, "width": 7, "height": 16 } 96 | }, 97 | "buddy_eye_right": { 98 | "buddy_eye": { "x": 1.37, "y": -0.55, "rotation": -92.29, "width": 7, "height": 16 } 99 | }, 100 | "buddy_face": { 101 | "buddy_face_happy": { "x": 11.23, "y": 6.68, "rotation": -92.29, "width": 36, "height": 59 }, 102 | "buddy_face_normal": { "x": 12.86, "y": 4.2, "rotation": -92.29, "width": 31, "height": 56 } 103 | }, 104 | "buddy_foot_left": { 105 | "buddy_foot_left": { "x": 19.01, "y": 6.45, "rotation": 1.47, "width": 67, "height": 28 } 106 | }, 107 | "buddy_foot_right": { 108 | "buddy_foot_right": { "x": 12.33, "y": 7.37, "rotation": 2.51, "width": 62, "height": 28 } 109 | }, 110 | "buddy_hair": { 111 | "buddy_hair": { "x": 20.83, "y": 12.56, "rotation": -64.58, "width": 90, "height": 68 } 112 | }, 113 | "buddy_hand_right": { 114 | "buddy_hand_right": { "x": 15.42, "y": 1.21, "rotation": -73.17, "width": 60, "height": 46 } 115 | }, 116 | "buddy_head": { 117 | "buddy_head": { "x": 45.09, "y": 5.57, "rotation": -92.29, "width": 75, "height": 98 } 118 | }, 119 | "buddy_leg_left_bottom": { 120 | "buddy_leg_left_bottom": { "x": 42.69, "y": -1.41, "rotation": 118.46, "width": 58, "height": 80 } 121 | }, 122 | "buddy_leg_left_top": { 123 | "buddy_leg_left_top": { "x": 27.86, "y": -0.09, "rotation": 87.67, "width": 17, "height": 61 } 124 | }, 125 | "buddy_leg_right_bottom": { 126 | "buddy_leg_right_bottom": { "x": 37.78, "y": -5.47, "rotation": 100.14, "width": 35, "height": 76 } 127 | }, 128 | "buddy_leg_right_top": { 129 | "buddy_leg_right_top": { "x": 30.16, "y": 1.6, "rotation": 62.51, "width": 40, "height": 65 } 130 | }, 131 | "buddy_legs_full": { 132 | "buddy_legs_full": { "x": 75.34, "y": -9.39, "rotation": -88.01, "width": 130, "height": 150 } 133 | }, 134 | "buddy_pelvis": { 135 | "buddy_pelvis": { "x": 3.99, "y": -6.62, "rotation": 91.37, "width": 33, "height": 21 } 136 | } 137 | }, 138 | "outfit01": { 139 | "body_assets": { 140 | "body_assets": { "name": "buddy_outfit01_collar", "x": 101.93, "y": 0.06, "rotation": -86.54, "width": 35, "height": 31 } 141 | }, 142 | "body_gear": { 143 | "body_gear": { "name": "buddy_outfit01_tie", "x": 44.14, "y": -4.78, "rotation": 94.12, "width": 31, "height": 90 } 144 | }, 145 | "facial_gear": { 146 | "facial_gear": { "name": "buddy_outfit01_glasses", "x": 1.07, "y": 7.47, "rotation": -92.29, "width": 78, "height": 28 } 147 | } 148 | }, 149 | "vest": { 150 | "body_gear": { 151 | "body_gear": { "name": "buddy_outfit02_vest", "x": 49.99, "y": -2.14, "rotation": 94.12, "width": 61, "height": 144 } 152 | } 153 | }, 154 | "mask": { 155 | "facial_gear": { 156 | "facial_gear": { "name": "buddy_outfit02_mask", "x": 0.46, "y": 0.84, "rotation": -92.29, "width": 85, "height": 114 } 157 | } 158 | } 159 | }, 160 | "animations": { 161 | "idle": { 162 | "slots": { 163 | "bg": { 164 | "attachment": [ 165 | { "time": 0, "name": "bg" }, 166 | { "time": 1, "name": "bg" }, 167 | { "time": 2, "name": "bg" } 168 | ] 169 | }, 170 | "body_assets": { 171 | "attachment": [ 172 | { "time": 0, "name": "body_assets" }, 173 | { "time": 1, "name": "body_assets" }, 174 | { "time": 2, "name": "body_assets" } 175 | ] 176 | }, 177 | "body_gear": { 178 | "attachment": [ 179 | { "time": 0, "name": "body_gear" }, 180 | { "time": 1, "name": "body_gear" }, 181 | { "time": 2, "name": "body_gear" } 182 | ] 183 | }, 184 | "buddy_arm_left_rest": { 185 | "attachment": [ 186 | { "time": 0, "name": null }, 187 | { "time": 1, "name": null }, 188 | { "time": 2, "name": null } 189 | ] 190 | }, 191 | "buddy_arm_right_bottom": { 192 | "attachment": [ 193 | { "time": 0, "name": null }, 194 | { "time": 1.1666, "name": null }, 195 | { "time": 2, "name": null } 196 | ] 197 | }, 198 | "buddy_arm_right_top": { 199 | "attachment": [ 200 | { "time": 0, "name": null }, 201 | { "time": 1, "name": null }, 202 | { "time": 2, "name": null } 203 | ] 204 | }, 205 | "buddy_arm_walk_left_bottom": { 206 | "attachment": [ 207 | { "time": 0, "name": "buddy_arm_walk_left_bottom" }, 208 | { "time": 1.1333, "name": "buddy_arm_walk_left_bottom" }, 209 | { "time": 2, "name": "buddy_arm_walk_left_bottom" } 210 | ] 211 | }, 212 | "buddy_arm_walk_left_top": { 213 | "attachment": [ 214 | { "time": 0, "name": "buddy_arm_walk_left_top" }, 215 | { "time": 1, "name": "buddy_arm_walk_left_top" }, 216 | { "time": 2, "name": "buddy_arm_walk_left_top" } 217 | ] 218 | }, 219 | "buddy_arm_walk_right_bottom": { 220 | "attachment": [ 221 | { "time": 0, "name": "buddy_arm_walk_right_bottom" }, 222 | { "time": 1.1666, "name": "buddy_arm_walk_right_bottom" }, 223 | { "time": 2, "name": "buddy_arm_walk_right_bottom" } 224 | ] 225 | }, 226 | "buddy_arm_walk_right_top": { 227 | "attachment": [ 228 | { "time": 0, "name": "buddy_arm_walk_right_top" }, 229 | { "time": 1, "name": "buddy_arm_walk_right_top" }, 230 | { "time": 2, "name": "buddy_arm_walk_right_top" } 231 | ] 232 | }, 233 | "buddy_body": { 234 | "attachment": [ 235 | { "time": 0, "name": "buddy_body" }, 236 | { "time": 1, "name": "buddy_body" }, 237 | { "time": 2, "name": "buddy_body" } 238 | ] 239 | }, 240 | "buddy_brow_left": { 241 | "attachment": [ 242 | { "time": 0, "name": "buddy_brow_left" }, 243 | { "time": 1, "name": "buddy_brow_left" }, 244 | { "time": 2, "name": "buddy_brow_left" } 245 | ] 246 | }, 247 | "buddy_brow_right": { 248 | "attachment": [ 249 | { "time": 0, "name": "buddy_brow_right" }, 250 | { "time": 1, "name": "buddy_brow_right" }, 251 | { "time": 2, "name": "buddy_brow_right" } 252 | ] 253 | }, 254 | "buddy_eye_left": { 255 | "attachment": [ 256 | { "time": 0, "name": "buddy_eye" }, 257 | { "time": 1, "name": "buddy_eye" }, 258 | { "time": 2, "name": "buddy_eye" } 259 | ] 260 | }, 261 | "buddy_eye_right": { 262 | "attachment": [ 263 | { "time": 0, "name": "buddy_eye" }, 264 | { "time": 1, "name": "buddy_eye" }, 265 | { "time": 2, "name": "buddy_eye" } 266 | ] 267 | }, 268 | "buddy_face": { 269 | "attachment": [ 270 | { "time": 0, "name": "buddy_face_happy" }, 271 | { "time": 1, "name": "buddy_face_happy" }, 272 | { "time": 2, "name": "buddy_face_happy" } 273 | ] 274 | }, 275 | "buddy_foot_left": { 276 | "attachment": [ 277 | { "time": 0, "name": null }, 278 | { "time": 1, "name": null }, 279 | { "time": 2, "name": null } 280 | ] 281 | }, 282 | "buddy_foot_right": { 283 | "attachment": [ 284 | { "time": 0, "name": null }, 285 | { "time": 1, "name": null }, 286 | { "time": 2, "name": null } 287 | ] 288 | }, 289 | "buddy_hair": { 290 | "attachment": [ 291 | { "time": 0, "name": "buddy_hair" }, 292 | { "time": 1.3333, "name": "buddy_hair" }, 293 | { "time": 2, "name": "buddy_hair" } 294 | ] 295 | }, 296 | "buddy_hand_right": { 297 | "attachment": [ 298 | { "time": 0, "name": null }, 299 | { "time": 1, "name": null }, 300 | { "time": 2, "name": null } 301 | ] 302 | }, 303 | "buddy_head": { 304 | "attachment": [ 305 | { "time": 0, "name": "buddy_head" }, 306 | { "time": 1.1666, "name": "buddy_head" }, 307 | { "time": 2, "name": "buddy_head" } 308 | ] 309 | }, 310 | "buddy_leg_left_bottom": { 311 | "attachment": [ 312 | { "time": 0, "name": null }, 313 | { "time": 1, "name": null }, 314 | { "time": 2, "name": null } 315 | ] 316 | }, 317 | "buddy_leg_left_top": { 318 | "attachment": [ 319 | { "time": 0, "name": null }, 320 | { "time": 1, "name": null }, 321 | { "time": 2, "name": null } 322 | ] 323 | }, 324 | "buddy_leg_right_bottom": { 325 | "attachment": [ 326 | { "time": 0, "name": null }, 327 | { "time": 1, "name": null }, 328 | { "time": 2, "name": null } 329 | ] 330 | }, 331 | "buddy_leg_right_top": { 332 | "attachment": [ 333 | { "time": 0, "name": null }, 334 | { "time": 1, "name": null }, 335 | { "time": 2, "name": null } 336 | ] 337 | }, 338 | "buddy_legs_full": { 339 | "attachment": [ 340 | { "time": 0, "name": "buddy_legs_full" }, 341 | { "time": 1, "name": "buddy_legs_full" }, 342 | { "time": 2, "name": "buddy_legs_full" } 343 | ] 344 | }, 345 | "buddy_pelvis": { 346 | "attachment": [ 347 | { "time": 0, "name": null }, 348 | { "time": 1, "name": null }, 349 | { "time": 2, "name": null } 350 | ] 351 | }, 352 | "facial_gear": { 353 | "attachment": [ 354 | { "time": 0, "name": "facial_gear" }, 355 | { "time": 1.3333, "name": "facial_gear" }, 356 | { "time": 2, "name": "facial_gear" } 357 | ] 358 | } 359 | }, 360 | "bones": { 361 | "arm_right_top": { 362 | "rotate": [ 363 | { 364 | "time": 0, 365 | "angle": 0, 366 | "curve": [ 0.25, 0, 0.75, 1 ] 367 | }, 368 | { 369 | "time": 1, 370 | "angle": -6.55, 371 | "curve": [ 0.25, 0, 0.75, 1 ] 372 | }, 373 | { "time": 2, "angle": 0 } 374 | ], 375 | "translate": [ 376 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 377 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 378 | { "time": 2, "x": 0, "y": 0 } 379 | ], 380 | "scale": [ 381 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 382 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 383 | { "time": 2, "x": 1, "y": 1 } 384 | ] 385 | }, 386 | "root": { 387 | "rotate": [ 388 | { "time": 0, "angle": 0, "curve": "stepped" }, 389 | { "time": 1, "angle": 0, "curve": "stepped" }, 390 | { "time": 2, "angle": 0 } 391 | ], 392 | "translate": [ 393 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 394 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 395 | { "time": 2, "x": 0, "y": 0 } 396 | ], 397 | "scale": [ 398 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 399 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 400 | { "time": 2, "x": 1, "y": 1 } 401 | ] 402 | }, 403 | "legs_rest": { 404 | "rotate": [ 405 | { "time": 0, "angle": 0, "curve": "stepped" }, 406 | { "time": 1, "angle": 0, "curve": "stepped" }, 407 | { "time": 2, "angle": 0 } 408 | ], 409 | "translate": [ 410 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 411 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 412 | { "time": 2, "x": 0, "y": 0 } 413 | ], 414 | "scale": [ 415 | { 416 | "time": 0, 417 | "x": 1, 418 | "y": 1, 419 | "curve": [ 0.25, 0, 0.75, 1 ] 420 | }, 421 | { 422 | "time": 1, 423 | "x": 0.98, 424 | "y": 1.019, 425 | "curve": [ 0.25, 0, 0.75, 1 ] 426 | }, 427 | { "time": 2, "x": 1, "y": 1 } 428 | ] 429 | }, 430 | "body": { 431 | "rotate": [ 432 | { "time": 0, "angle": 0, "curve": "stepped" }, 433 | { "time": 1, "angle": 0, "curve": "stepped" }, 434 | { "time": 2, "angle": 0 } 435 | ], 436 | "translate": [ 437 | { 438 | "time": 0, 439 | "x": 0, 440 | "y": 0, 441 | "curve": [ 0.25, 0, 0.75, 1 ] 442 | }, 443 | { 444 | "time": 1, 445 | "x": -1.61, 446 | "y": -0.05, 447 | "curve": [ 0.25, 0, 0.75, 1 ] 448 | }, 449 | { "time": 2, "x": 0, "y": 0 } 450 | ], 451 | "scale": [ 452 | { 453 | "time": 0, 454 | "x": 1, 455 | "y": 1, 456 | "curve": [ 0.25, 0, 0.75, 1 ] 457 | }, 458 | { 459 | "time": 1, 460 | "x": 1.01, 461 | "y": 1.036, 462 | "curve": [ 0.25, 0, 0.75, 1 ] 463 | }, 464 | { "time": 2, "x": 1, "y": 1 } 465 | ] 466 | }, 467 | "arm_right_bottom": { 468 | "rotate": [ 469 | { 470 | "time": 0, 471 | "angle": 0, 472 | "curve": [ 0.25, 0, 0.75, 1 ] 473 | }, 474 | { 475 | "time": 1.1666, 476 | "angle": 4.86, 477 | "curve": [ 0.25, 0, 0.75, 1 ] 478 | }, 479 | { "time": 2, "angle": 0 } 480 | ], 481 | "translate": [ 482 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 483 | { "time": 1.1666, "x": 0, "y": 0, "curve": "stepped" }, 484 | { "time": 2, "x": 0, "y": 0 } 485 | ], 486 | "scale": [ 487 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 488 | { "time": 1.1666, "x": 1, "y": 1, "curve": "stepped" }, 489 | { "time": 2, "x": 1, "y": 1 } 490 | ] 491 | }, 492 | "hand_right": { 493 | "rotate": [ 494 | { "time": 0, "angle": 0, "curve": "stepped" }, 495 | { "time": 1, "angle": 0, "curve": "stepped" }, 496 | { "time": 2, "angle": 0 } 497 | ], 498 | "translate": [ 499 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 500 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 501 | { "time": 2, "x": 0, "y": 0 } 502 | ], 503 | "scale": [ 504 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 505 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 506 | { "time": 2, "x": 1, "y": 1 } 507 | ] 508 | }, 509 | "arm_left_top": { 510 | "rotate": [ 511 | { 512 | "time": 0, 513 | "angle": 0, 514 | "curve": [ 0.25, 0, 0.75, 1 ] 515 | }, 516 | { 517 | "time": 1, 518 | "angle": 1.43, 519 | "curve": [ 0.25, 0, 0.75, 1 ] 520 | }, 521 | { "time": 2, "angle": 0 } 522 | ], 523 | "translate": [ 524 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 525 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 526 | { "time": 2, "x": 0, "y": 0 } 527 | ], 528 | "scale": [ 529 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 530 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 531 | { "time": 2, "x": 1, "y": 1 } 532 | ] 533 | }, 534 | "arm_left_bottom": { 535 | "rotate": [ 536 | { 537 | "time": 0, 538 | "angle": 0, 539 | "curve": [ 0.25, 0, 0.75, 1 ] 540 | }, 541 | { 542 | "time": 1.1333, 543 | "angle": 3.6, 544 | "curve": [ 0.25, 0, 0.75, 1 ] 545 | }, 546 | { "time": 2, "angle": 0 } 547 | ], 548 | "translate": [ 549 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 550 | { "time": 1.1333, "x": 0, "y": 0, "curve": "stepped" }, 551 | { "time": 2, "x": 0, "y": 0 } 552 | ], 553 | "scale": [ 554 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 555 | { "time": 1.1333, "x": 1, "y": 1, "curve": "stepped" }, 556 | { "time": 2, "x": 1, "y": 1 } 557 | ] 558 | }, 559 | "head": { 560 | "rotate": [ 561 | { 562 | "time": 0, 563 | "angle": 0, 564 | "curve": [ 0.25, 0, 0.75, 1 ] 565 | }, 566 | { 567 | "time": 0.5, 568 | "angle": 1.61, 569 | "curve": [ 0.25, 0, 0.75, 1 ] 570 | }, 571 | { 572 | "time": 1.5, 573 | "angle": -1.4, 574 | "curve": [ 0.25, 0, 0.75, 1 ] 575 | }, 576 | { "time": 2, "angle": 0 } 577 | ], 578 | "translate": [ 579 | { 580 | "time": 0, 581 | "x": 0, 582 | "y": 0, 583 | "curve": [ 0.25, 0, 0.75, 1 ] 584 | }, 585 | { 586 | "time": 1.1666, 587 | "x": -2.66, 588 | "y": -0.15, 589 | "curve": [ 0.25, 0, 0.75, 1 ] 590 | }, 591 | { "time": 2, "x": 0, "y": 0 } 592 | ], 593 | "scale": [ 594 | { 595 | "time": 0, 596 | "x": 1, 597 | "y": 1, 598 | "curve": [ 0.25, 0, 0.75, 1 ] 599 | }, 600 | { 601 | "time": 1.1666, 602 | "x": 1, 603 | "y": 0.984, 604 | "curve": [ 0.25, 0, 0.75, 1 ] 605 | }, 606 | { "time": 2, "x": 1, "y": 1 } 607 | ] 608 | }, 609 | "hair": { 610 | "rotate": [ 611 | { 612 | "time": 0, 613 | "angle": 0, 614 | "curve": [ 0.25, 0, 0.75, 1 ] 615 | }, 616 | { 617 | "time": 0.5, 618 | "angle": 1.5, 619 | "curve": [ 0.25, 0, 0.75, 1 ] 620 | }, 621 | { 622 | "time": 1.3333, 623 | "angle": -1.65, 624 | "curve": [ 0.25, 0, 0.75, 1 ] 625 | }, 626 | { "time": 2, "angle": 0 } 627 | ], 628 | "translate": [ 629 | { 630 | "time": 0, 631 | "x": 0, 632 | "y": 0, 633 | "curve": [ 0.25, 0, 0.75, 1 ] 634 | }, 635 | { 636 | "time": 0.5, 637 | "x": -0.49, 638 | "y": 0.03, 639 | "curve": [ 0.25, 0, 0.75, 1 ] 640 | }, 641 | { 642 | "time": 1.3333, 643 | "x": -0.99, 644 | "y": 0.02, 645 | "curve": [ 0.25, 0, 0.75, 1 ] 646 | }, 647 | { "time": 2, "x": 0, "y": 0 } 648 | ], 649 | "scale": [ 650 | { 651 | "time": 0, 652 | "x": 1, 653 | "y": 1, 654 | "curve": [ 0.25, 0, 0.75, 1 ] 655 | }, 656 | { 657 | "time": 0.5, 658 | "x": 0.924, 659 | "y": 1, 660 | "curve": [ 0.25, 0, 0.75, 1 ] 661 | }, 662 | { 663 | "time": 1.3333, 664 | "x": 1.028, 665 | "y": 1, 666 | "curve": [ 0.25, 0, 0.75, 1 ] 667 | }, 668 | { "time": 2, "x": 1, "y": 1 } 669 | ] 670 | }, 671 | "brow_left": { 672 | "rotate": [ 673 | { "time": 0, "angle": 0, "curve": "stepped" }, 674 | { "time": 1, "angle": 0, "curve": "stepped" }, 675 | { "time": 2, "angle": 0 } 676 | ], 677 | "translate": [ 678 | { 679 | "time": 0, 680 | "x": 0, 681 | "y": 0, 682 | "curve": [ 0.25, 0, 0.75, 1 ] 683 | }, 684 | { 685 | "time": 1, 686 | "x": 4.79, 687 | "y": -0.21, 688 | "curve": [ 0.25, 0, 0.75, 1 ] 689 | }, 690 | { "time": 2, "x": 0, "y": 0 } 691 | ], 692 | "scale": [ 693 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 694 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 695 | { "time": 2, "x": 1, "y": 1 } 696 | ] 697 | }, 698 | "brow_right": { 699 | "rotate": [ 700 | { "time": 0, "angle": 0, "curve": "stepped" }, 701 | { "time": 1, "angle": 0, "curve": "stepped" }, 702 | { "time": 2, "angle": 0 } 703 | ], 704 | "translate": [ 705 | { 706 | "time": 0, 707 | "x": 0, 708 | "y": 0, 709 | "curve": [ 0.25, 0, 0.75, 1 ] 710 | }, 711 | { 712 | "time": 1.1666, 713 | "x": 4.79, 714 | "y": -0.21, 715 | "curve": [ 0.25, 0, 0.75, 1 ] 716 | }, 717 | { "time": 2, "x": 0, "y": 0 } 718 | ], 719 | "scale": [ 720 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 721 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 722 | { "time": 2, "x": 1, "y": 1 } 723 | ] 724 | }, 725 | "eye_left": { 726 | "rotate": [ 727 | { "time": 0, "angle": 0, "curve": "stepped" }, 728 | { "time": 1, "angle": 0, "curve": "stepped" }, 729 | { "time": 2, "angle": 0 } 730 | ], 731 | "translate": [ 732 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 733 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 734 | { "time": 2, "x": 0, "y": 0 } 735 | ], 736 | "scale": [ 737 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 738 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 739 | { 740 | "time": 1.1666, 741 | "x": 1, 742 | "y": 1, 743 | "curve": [ 0.25, 0, 0.75, 1 ] 744 | }, 745 | { 746 | "time": 1.2333, 747 | "x": 0.147, 748 | "y": 1, 749 | "curve": [ 0.25, 0, 0.75, 1 ] 750 | }, 751 | { "time": 1.3, "x": 1, "y": 1, "curve": "stepped" }, 752 | { "time": 2, "x": 1, "y": 1 } 753 | ] 754 | }, 755 | "eye_right": { 756 | "rotate": [ 757 | { "time": 0, "angle": 0, "curve": "stepped" }, 758 | { "time": 1, "angle": 0, "curve": "stepped" }, 759 | { "time": 2, "angle": 0 } 760 | ], 761 | "translate": [ 762 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 763 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 764 | { "time": 2, "x": 0, "y": 0 } 765 | ], 766 | "scale": [ 767 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 768 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 769 | { 770 | "time": 1.1666, 771 | "x": 1, 772 | "y": 1, 773 | "curve": [ 0.25, 0, 0.75, 1 ] 774 | }, 775 | { 776 | "time": 1.2333, 777 | "x": 0.133, 778 | "y": 1, 779 | "curve": [ 0.25, 0, 0.75, 1 ] 780 | }, 781 | { "time": 1.3, "x": 1, "y": 1, "curve": "stepped" }, 782 | { "time": 2, "x": 1, "y": 1 } 783 | ] 784 | }, 785 | "face": { 786 | "rotate": [ 787 | { "time": 0, "angle": 0, "curve": "stepped" }, 788 | { "time": 1, "angle": 0, "curve": "stepped" }, 789 | { "time": 2, "angle": 0 } 790 | ], 791 | "translate": [ 792 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 793 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 794 | { "time": 2, "x": 0, "y": 0 } 795 | ], 796 | "scale": [ 797 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 798 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 799 | { "time": 2, "x": 1, "y": 1 } 800 | ] 801 | }, 802 | "facial_gear": { 803 | "rotate": [ 804 | { 805 | "time": 0, 806 | "angle": 0, 807 | "curve": [ 0.25, 0, 0.75, 1 ] 808 | }, 809 | { 810 | "time": 1.3333, 811 | "angle": -1.44, 812 | "curve": [ 0.25, 0, 0.75, 1 ] 813 | }, 814 | { "time": 2, "angle": 0 } 815 | ], 816 | "translate": [ 817 | { 818 | "time": 0, 819 | "x": 0, 820 | "y": 0, 821 | "curve": [ 0.25, 0, 0.75, 1 ] 822 | }, 823 | { 824 | "time": 1.3333, 825 | "x": -1.76, 826 | "y": 0.08, 827 | "curve": [ 0.25, 0, 0.75, 1 ] 828 | }, 829 | { "time": 2, "x": 0, "y": 0 } 830 | ], 831 | "scale": [ 832 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 833 | { "time": 1.3333, "x": 1, "y": 1, "curve": "stepped" }, 834 | { "time": 2, "x": 1, "y": 1 } 835 | ] 836 | }, 837 | "body_gear": { 838 | "rotate": [ 839 | { 840 | "time": 0, 841 | "angle": 0, 842 | "curve": [ 0.25, 0, 0.75, 1 ] 843 | }, 844 | { 845 | "time": 1, 846 | "angle": -357.59, 847 | "curve": [ 0.25, 0, 0.75, 1 ] 848 | }, 849 | { "time": 2, "angle": 0 } 850 | ], 851 | "translate": [ 852 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 853 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 854 | { "time": 2, "x": 0, "y": 0 } 855 | ], 856 | "scale": [ 857 | { 858 | "time": 0, 859 | "x": 1, 860 | "y": 1, 861 | "curve": [ 0.25, 0, 0.75, 1 ] 862 | }, 863 | { 864 | "time": 1, 865 | "x": 1.017, 866 | "y": 1, 867 | "curve": [ 0.25, 0, 0.75, 1 ] 868 | }, 869 | { "time": 2, "x": 1, "y": 1 } 870 | ] 871 | }, 872 | "pelvis": { 873 | "rotate": [ 874 | { "time": 0, "angle": 0, "curve": "stepped" }, 875 | { "time": 1, "angle": 0, "curve": "stepped" }, 876 | { "time": 2, "angle": 0 } 877 | ], 878 | "translate": [ 879 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 880 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 881 | { "time": 2, "x": 0, "y": 0 } 882 | ], 883 | "scale": [ 884 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 885 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 886 | { "time": 2, "x": 1, "y": 1 } 887 | ] 888 | }, 889 | "leg_right_top": { 890 | "rotate": [ 891 | { "time": 0, "angle": 0, "curve": "stepped" }, 892 | { "time": 1, "angle": 0, "curve": "stepped" }, 893 | { "time": 2, "angle": 0 } 894 | ], 895 | "translate": [ 896 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 897 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 898 | { "time": 2, "x": 0, "y": 0 } 899 | ], 900 | "scale": [ 901 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 902 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 903 | { "time": 2, "x": 1, "y": 1 } 904 | ] 905 | }, 906 | "leg_right_bottom": { 907 | "rotate": [ 908 | { "time": 0, "angle": 0, "curve": "stepped" }, 909 | { "time": 1, "angle": 0, "curve": "stepped" }, 910 | { "time": 2, "angle": 0 } 911 | ], 912 | "translate": [ 913 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 914 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 915 | { "time": 2, "x": 0, "y": 0 } 916 | ], 917 | "scale": [ 918 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 919 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 920 | { "time": 2, "x": 1, "y": 1 } 921 | ] 922 | }, 923 | "foot_right": { 924 | "rotate": [ 925 | { "time": 0, "angle": 0, "curve": "stepped" }, 926 | { "time": 1, "angle": 0, "curve": "stepped" }, 927 | { "time": 2, "angle": 0 } 928 | ], 929 | "translate": [ 930 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 931 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 932 | { "time": 2, "x": 0, "y": 0 } 933 | ], 934 | "scale": [ 935 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 936 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 937 | { "time": 2, "x": 1, "y": 1 } 938 | ] 939 | }, 940 | "leg_left_top": { 941 | "rotate": [ 942 | { "time": 0, "angle": 0, "curve": "stepped" }, 943 | { "time": 1, "angle": 0, "curve": "stepped" }, 944 | { "time": 2, "angle": 0 } 945 | ], 946 | "translate": [ 947 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 948 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 949 | { "time": 2, "x": 0, "y": 0 } 950 | ], 951 | "scale": [ 952 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 953 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 954 | { "time": 2, "x": 1, "y": 1 } 955 | ] 956 | }, 957 | "leg_left_bottom": { 958 | "rotate": [ 959 | { "time": 0, "angle": 0, "curve": "stepped" }, 960 | { "time": 1, "angle": 0, "curve": "stepped" }, 961 | { "time": 2, "angle": 0 } 962 | ], 963 | "translate": [ 964 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 965 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 966 | { "time": 2, "x": 0, "y": 0 } 967 | ], 968 | "scale": [ 969 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 970 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 971 | { "time": 2, "x": 1, "y": 1 } 972 | ] 973 | }, 974 | "foot_left": { 975 | "rotate": [ 976 | { "time": 0, "angle": 0, "curve": "stepped" }, 977 | { "time": 1, "angle": 0, "curve": "stepped" }, 978 | { "time": 2, "angle": 0 } 979 | ], 980 | "translate": [ 981 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 982 | { "time": 1, "x": 0, "y": 0, "curve": "stepped" }, 983 | { "time": 2, "x": 0, "y": 0 } 984 | ], 985 | "scale": [ 986 | { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, 987 | { "time": 1, "x": 1, "y": 1, "curve": "stepped" }, 988 | { "time": 2, "x": 1, "y": 1 } 989 | ] 990 | } 991 | }, 992 | "drawOrder": [ 993 | { "time": 0 }, 994 | { "time": 1 }, 995 | { "time": 2 } 996 | ] 997 | } 998 | } 999 | } -------------------------------------------------------------------------------- /example/assets/buddy_skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/buddy_skeleton.png -------------------------------------------------------------------------------- /example/assets/footstep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/footstep.png -------------------------------------------------------------------------------- /example/assets/goblins.atlas: -------------------------------------------------------------------------------- 1 | 2 | goblins.png 3 | format: RGBA8888 4 | filter: Linear,Linear 5 | repeat: none 6 | dagger 7 | rotate: true 8 | xy: 372, 100 9 | size: 26, 108 10 | orig: 26, 108 11 | offset: 0, 0 12 | index: -1 13 | goblin/eyes-closed 14 | rotate: false 15 | xy: 359, 6 16 | size: 34, 12 17 | orig: 34, 12 18 | offset: 0, 0 19 | index: -1 20 | goblin/head 21 | rotate: false 22 | xy: 107, 38 23 | size: 103, 64 24 | orig: 103, 66 25 | offset: 0, 0 26 | index: -1 27 | goblin/left-arm 28 | rotate: false 29 | xy: 903, 56 30 | size: 37, 35 31 | orig: 37, 35 32 | offset: 0, 0 33 | index: -1 34 | goblin/left-foot 35 | rotate: false 36 | xy: 729, 58 37 | size: 65, 31 38 | orig: 65, 31 39 | offset: 0, 0 40 | index: -1 41 | goblin/left-hand 42 | rotate: true 43 | xy: 316, 2 44 | size: 36, 41 45 | orig: 36, 41 46 | offset: 0, 0 47 | index: -1 48 | goblin/left-lower-leg 49 | rotate: true 50 | xy: 172, 2 51 | size: 30, 70 52 | orig: 33, 70 53 | offset: 2, 0 54 | index: -1 55 | goblin/left-shoulder 56 | rotate: true 57 | xy: 857, 62 58 | size: 29, 44 59 | orig: 29, 44 60 | offset: 0, 0 61 | index: -1 62 | goblin/left-upper-leg 63 | rotate: true 64 | xy: 654, 56 65 | size: 33, 73 66 | orig: 33, 73 67 | offset: 0, 0 68 | index: -1 69 | goblin/neck 70 | rotate: true 71 | xy: 509, 22 72 | size: 36, 41 73 | orig: 36, 41 74 | offset: 0, 0 75 | index: -1 76 | goblin/pelvis 77 | rotate: true 78 | xy: 310, 40 79 | size: 62, 43 80 | orig: 62, 43 81 | offset: 0, 0 82 | index: -1 83 | goblin/right-arm 84 | rotate: false 85 | xy: 552, 8 86 | size: 23, 50 87 | orig: 23, 50 88 | offset: 0, 0 89 | index: -1 90 | goblin/right-foot 91 | rotate: false 92 | xy: 882, 93 93 | size: 63, 33 94 | orig: 63, 33 95 | offset: 0, 0 96 | index: -1 97 | goblin/right-hand 98 | rotate: false 99 | xy: 942, 54 100 | size: 36, 37 101 | orig: 36, 37 102 | offset: 0, 0 103 | index: -1 104 | goblin/right-lower-leg 105 | rotate: true 106 | xy: 654, 91 107 | size: 35, 76 108 | orig: 36, 76 109 | offset: 1, 0 110 | index: -1 111 | goblin/right-shoulder 112 | rotate: false 113 | xy: 424, 20 114 | size: 39, 42 115 | orig: 39, 45 116 | offset: 0, 0 117 | index: -1 118 | goblin/right-upper-leg 119 | rotate: true 120 | xy: 107, 2 121 | size: 34, 63 122 | orig: 34, 63 123 | offset: 0, 0 124 | index: -1 125 | goblin/torso 126 | rotate: true 127 | xy: 212, 34 128 | size: 68, 96 129 | orig: 68, 96 130 | offset: 0, 0 131 | index: -1 132 | goblin/undie-straps 133 | rotate: false 134 | xy: 2, 2 135 | size: 55, 19 136 | orig: 55, 19 137 | offset: 0, 0 138 | index: -1 139 | goblin/undies 140 | rotate: true 141 | xy: 768, 20 142 | size: 36, 29 143 | orig: 36, 29 144 | offset: 0, 0 145 | index: -1 146 | goblingirl/eyes-closed 147 | rotate: false 148 | xy: 59, 6 149 | size: 37, 15 150 | orig: 37, 21 151 | offset: 0, 0 152 | index: -1 153 | goblingirl/head 154 | rotate: false 155 | xy: 2, 23 156 | size: 103, 79 157 | orig: 103, 81 158 | offset: 0, 2 159 | index: -1 160 | goblingirl/left-arm 161 | rotate: true 162 | xy: 980, 56 163 | size: 37, 35 164 | orig: 37, 35 165 | offset: 0, 0 166 | index: -1 167 | goblingirl/left-foot 168 | rotate: false 169 | xy: 947, 95 170 | size: 65, 31 171 | orig: 65, 31 172 | offset: 0, 0 173 | index: -1 174 | goblingirl/left-hand 175 | rotate: false 176 | xy: 577, 14 177 | size: 35, 40 178 | orig: 35, 40 179 | offset: 0, 0 180 | index: -1 181 | goblingirl/left-lower-leg 182 | rotate: true 183 | xy: 244, 2 184 | size: 30, 70 185 | orig: 33, 70 186 | offset: 2, 0 187 | index: -1 188 | goblingirl/left-shoulder 189 | rotate: true 190 | xy: 810, 63 191 | size: 28, 45 192 | orig: 28, 46 193 | offset: 0, 1 194 | index: -1 195 | goblingirl/left-upper-leg 196 | rotate: true 197 | xy: 810, 93 198 | size: 33, 70 199 | orig: 33, 70 200 | offset: 0, 0 201 | index: -1 202 | goblingirl/neck 203 | rotate: true 204 | xy: 614, 21 205 | size: 33, 41 206 | orig: 35, 41 207 | offset: 0, 0 208 | index: -1 209 | goblingirl/pelvis 210 | rotate: false 211 | xy: 355, 55 212 | size: 59, 43 213 | orig: 62, 43 214 | offset: 1, 0 215 | index: -1 216 | goblingirl/right-arm 217 | rotate: true 218 | xy: 657, 11 219 | size: 22, 50 220 | orig: 28, 50 221 | offset: 3, 0 222 | index: -1 223 | goblingirl/right-foot 224 | rotate: false 225 | xy: 359, 20 226 | size: 63, 33 227 | orig: 63, 33 228 | offset: 0, 0 229 | index: -1 230 | goblingirl/right-hand 231 | rotate: true 232 | xy: 729, 21 233 | size: 35, 37 234 | orig: 36, 37 235 | offset: 1, 0 236 | index: -1 237 | goblingirl/right-lower-leg 238 | rotate: true 239 | xy: 732, 91 240 | size: 35, 76 241 | orig: 36, 76 242 | offset: 1, 0 243 | index: -1 244 | goblingirl/right-shoulder 245 | rotate: true 246 | xy: 465, 19 247 | size: 39, 42 248 | orig: 39, 45 249 | offset: 0, 0 250 | index: -1 251 | goblingirl/right-upper-leg 252 | rotate: true 253 | xy: 416, 64 254 | size: 34, 63 255 | orig: 34, 63 256 | offset: 0, 0 257 | index: -1 258 | goblingirl/torso 259 | rotate: true 260 | xy: 482, 60 261 | size: 66, 96 262 | orig: 68, 96 263 | offset: 0, 0 264 | index: -1 265 | goblingirl/undie-straps 266 | rotate: false 267 | xy: 657, 35 268 | size: 55, 19 269 | orig: 55, 19 270 | offset: 0, 0 271 | index: -1 272 | goblingirl/undies 273 | rotate: false 274 | xy: 799, 32 275 | size: 36, 29 276 | orig: 36, 29 277 | offset: 0, 0 278 | index: -1 279 | shield 280 | rotate: true 281 | xy: 580, 56 282 | size: 70, 72 283 | orig: 70, 72 284 | offset: 0, 0 285 | index: -1 286 | spear 287 | rotate: true 288 | xy: 2, 104 289 | size: 22, 368 290 | orig: 22, 368 291 | offset: 0, 0 292 | index: -1 293 | -------------------------------------------------------------------------------- /example/assets/goblins.json: -------------------------------------------------------------------------------- 1 | { 2 | "bones": [ 3 | { "name": "root" }, 4 | { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, 5 | { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, 6 | { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, 7 | { "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 }, 8 | { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 }, 9 | { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 }, 10 | { "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 }, 11 | { "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 }, 12 | { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 }, 13 | { "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 }, 14 | { "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 }, 15 | { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 }, 16 | { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 }, 17 | { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 }, 18 | { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, 19 | { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, 20 | { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } 21 | ], 22 | "slots": [ 23 | { "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" }, 24 | { "name": "left arm", "bone": "left arm", "attachment": "left arm" }, 25 | { "name": "left hand item", "bone": "left hand", "attachment": "spear" }, 26 | { "name": "left hand", "bone": "left hand", "attachment": "left hand" }, 27 | { "name": "left foot", "bone": "left foot", "attachment": "left foot" }, 28 | { "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" }, 29 | { "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" }, 30 | { "name": "neck", "bone": "neck", "attachment": "neck" }, 31 | { "name": "torso", "bone": "torso", "attachment": "torso" }, 32 | { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, 33 | { "name": "right foot", "bone": "right foot", "attachment": "right foot" }, 34 | { "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" }, 35 | { "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" }, 36 | { "name": "undies", "bone": "pelvis", "attachment": "undies" }, 37 | { "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" }, 38 | { "name": "head", "bone": "head", "attachment": "head" }, 39 | { "name": "eyes", "bone": "head" }, 40 | { "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" }, 41 | { "name": "right arm", "bone": "right arm", "attachment": "right arm" }, 42 | { "name": "right hand item", "bone": "right hand" }, 43 | { "name": "right hand", "bone": "right hand", "attachment": "right hand" }, 44 | { "name": "right hand item top", "bone": "right hand", "attachment": "shield" } 45 | ], 46 | "skins": { 47 | "default": { 48 | "left hand item": { 49 | "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, 50 | "spear": { "x": -4.55, "y": 39.2, "rotation": 13.04, "width": 22, "height": 368 } 51 | }, 52 | "right hand item": { 53 | "dagger": { "x": 6.51, "y": -24.15, "rotation": -8.06, "width": 26, "height": 108 } 54 | }, 55 | "right hand item top": { 56 | "shield": { "rotation": 93.49, "width": 70, "height": 72 } 57 | } 58 | }, 59 | "goblin": { 60 | "eyes": { 61 | "eyes closed": { "name": "goblin/eyes-closed", "x": 32.21, "y": -21.27, "rotation": -88.92, "width": 34, "height": 12 } 62 | }, 63 | "head": { 64 | "head": { "name": "goblin/head", "x": 25.73, "y": 2.33, "rotation": -92.29, "width": 103, "height": 66 } 65 | }, 66 | "left arm": { 67 | "left arm": { 68 | "name": "goblin/left-arm", 69 | "x": 16.7, 70 | "y": -1.69, 71 | "scaleX": 1.057, 72 | "scaleY": 1.057, 73 | "rotation": 33.84, 74 | "width": 37, 75 | "height": 35 76 | } 77 | }, 78 | "left foot": { 79 | "left foot": { "name": "goblin/left-foot", "x": 24.85, "y": 8.74, "rotation": 3.32, "width": 65, "height": 31 } 80 | }, 81 | "left hand": { 82 | "left hand": { 83 | "name": "goblin/left-hand", 84 | "x": 3.47, 85 | "y": 3.41, 86 | "scaleX": 0.892, 87 | "scaleY": 0.892, 88 | "rotation": 31.14, 89 | "width": 36, 90 | "height": 41 91 | } 92 | }, 93 | "left lower leg": { 94 | "left lower leg": { "name": "goblin/left-lower-leg", "x": 23.58, "y": -2.06, "rotation": 105.75, "width": 33, "height": 70 } 95 | }, 96 | "left shoulder": { 97 | "left shoulder": { "name": "goblin/left-shoulder", "x": 15.56, "y": -2.26, "rotation": 62.01, "width": 29, "height": 44 } 98 | }, 99 | "left upper leg": { 100 | "left upper leg": { "name": "goblin/left-upper-leg", "x": 29.68, "y": -3.87, "rotation": 89.09, "width": 33, "height": 73 } 101 | }, 102 | "neck": { 103 | "neck": { "name": "goblin/neck", "x": 10.1, "y": 0.42, "rotation": -93.69, "width": 36, "height": 41 } 104 | }, 105 | "pelvis": { 106 | "pelvis": { "name": "goblin/pelvis", "x": -5.61, "y": 0.76, "width": 62, "height": 43 } 107 | }, 108 | "right arm": { 109 | "right arm": { "name": "goblin/right-arm", "x": 16.44, "y": -1.04, "rotation": 94.32, "width": 23, "height": 50 } 110 | }, 111 | "right foot": { 112 | "right foot": { "name": "goblin/right-foot", "x": 23.56, "y": 9.8, "rotation": 1.52, "width": 63, "height": 33 } 113 | }, 114 | "right hand": { 115 | "right hand": { "name": "goblin/right-hand", "x": 7.88, "y": 2.78, "rotation": 91.96, "width": 36, "height": 37 } 116 | }, 117 | "right lower leg": { 118 | "right lower leg": { "name": "goblin/right-lower-leg", "x": 25.68, "y": -3.15, "rotation": 111.83, "width": 36, "height": 76 } 119 | }, 120 | "right shoulder": { 121 | "right shoulder": { "name": "goblin/right-shoulder", "x": 15.68, "y": -1.03, "rotation": 130.65, "width": 39, "height": 45 } 122 | }, 123 | "right upper leg": { 124 | "right upper leg": { "name": "goblin/right-upper-leg", "x": 20.35, "y": 1.47, "rotation": 97.49, "width": 34, "height": 63 } 125 | }, 126 | "torso": { 127 | "torso": { "name": "goblin/torso", "x": 38.09, "y": -3.87, "rotation": -94.95, "width": 68, "height": 96 } 128 | }, 129 | "undie straps": { 130 | "undie straps": { "name": "goblin/undie-straps", "x": -3.87, "y": 13.1, "scaleX": 1.089, "width": 55, "height": 19 } 131 | }, 132 | "undies": { 133 | "undies": { "name": "goblin/undies", "x": 6.3, "y": 0.12, "rotation": 0.91, "width": 36, "height": 29 } 134 | } 135 | }, 136 | "goblingirl": { 137 | "eyes": { 138 | "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } 139 | }, 140 | "head": { 141 | "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } 142 | }, 143 | "left arm": { 144 | "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } 145 | }, 146 | "left foot": { 147 | "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } 148 | }, 149 | "left hand": { 150 | "left hand": { 151 | "name": "goblingirl/left-hand", 152 | "x": 4.34, 153 | "y": 2.39, 154 | "scaleX": 0.896, 155 | "scaleY": 0.896, 156 | "rotation": 30.34, 157 | "width": 35, 158 | "height": 40 159 | } 160 | }, 161 | "left lower leg": { 162 | "left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 } 163 | }, 164 | "left shoulder": { 165 | "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } 166 | }, 167 | "left upper leg": { 168 | "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } 169 | }, 170 | "neck": { 171 | "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } 172 | }, 173 | "pelvis": { 174 | "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } 175 | }, 176 | "right arm": { 177 | "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } 178 | }, 179 | "right foot": { 180 | "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } 181 | }, 182 | "right hand": { 183 | "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } 184 | }, 185 | "right lower leg": { 186 | "right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 } 187 | }, 188 | "right shoulder": { 189 | "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } 190 | }, 191 | "right upper leg": { 192 | "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } 193 | }, 194 | "torso": { 195 | "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } 196 | }, 197 | "undie straps": { 198 | "undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 } 199 | }, 200 | "undies": { 201 | "undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 } 202 | } 203 | } 204 | }, 205 | "animations": { 206 | "walk": { 207 | "slots": { 208 | "eyes": { 209 | "attachment": [ 210 | { "time": 0.7, "name": "eyes closed" }, 211 | { "time": 0.8, "name": null } 212 | ] 213 | } 214 | }, 215 | "bones": { 216 | "left upper leg": { 217 | "rotate": [ 218 | { "time": 0, "angle": -26.55 }, 219 | { "time": 0.1333, "angle": -8.78 }, 220 | { "time": 0.2333, "angle": 9.51 }, 221 | { "time": 0.3666, "angle": 30.74 }, 222 | { "time": 0.5, "angle": 25.33 }, 223 | { "time": 0.6333, "angle": 26.11 }, 224 | { "time": 0.7333, "angle": -7.7 }, 225 | { "time": 0.8666, "angle": -21.19 }, 226 | { "time": 1, "angle": -26.55 } 227 | ], 228 | "translate": [ 229 | { "time": 0, "x": -1.32, "y": 1.7 }, 230 | { "time": 0.3666, "x": -0.06, "y": 2.42 }, 231 | { "time": 1, "x": -1.32, "y": 1.7 } 232 | ] 233 | }, 234 | "right upper leg": { 235 | "rotate": [ 236 | { "time": 0, "angle": 42.45 }, 237 | { "time": 0.1333, "angle": 52.1 }, 238 | { "time": 0.2333, "angle": 8.53 }, 239 | { "time": 0.5, "angle": -16.93 }, 240 | { "time": 0.6333, "angle": 1.89 }, 241 | { 242 | "time": 0.7333, 243 | "angle": 28.06, 244 | "curve": [ 0.462, 0.11, 1, 1 ] 245 | }, 246 | { 247 | "time": 0.8666, 248 | "angle": 58.68, 249 | "curve": [ 0.5, 0.02, 1, 1 ] 250 | }, 251 | { "time": 1, "angle": 42.45 } 252 | ], 253 | "translate": [ 254 | { "time": 0, "x": 6.23, "y": 0 }, 255 | { "time": 0.2333, "x": 2.14, "y": 2.4 }, 256 | { "time": 0.5, "x": 2.44, "y": 4.8 }, 257 | { "time": 1, "x": 6.23, "y": 0 } 258 | ] 259 | }, 260 | "left lower leg": { 261 | "rotate": [ 262 | { "time": 0, "angle": -22.98 }, 263 | { "time": 0.1333, "angle": -63.5 }, 264 | { "time": 0.2333, "angle": -73.76 }, 265 | { "time": 0.5, "angle": 5.11 }, 266 | { "time": 0.6333, "angle": -28.29 }, 267 | { "time": 0.7333, "angle": 4.08 }, 268 | { "time": 0.8666, "angle": 3.53 }, 269 | { "time": 1, "angle": -22.98 } 270 | ], 271 | "translate": [ 272 | { "time": 0, "x": 0, "y": 0 }, 273 | { "time": 0.2333, "x": 2.55, "y": -0.47 }, 274 | { "time": 0.5, "x": 0, "y": 0, "curve": "stepped" }, 275 | { "time": 1, "x": 0, "y": 0 } 276 | ] 277 | }, 278 | "left foot": { 279 | "rotate": [ 280 | { "time": 0, "angle": -3.69 }, 281 | { "time": 0.1333, "angle": -10.42 }, 282 | { "time": 0.2333, "angle": -5.01 }, 283 | { "time": 0.3666, "angle": 3.87 }, 284 | { "time": 0.5, "angle": -3.87 }, 285 | { "time": 0.6333, "angle": 2.78 }, 286 | { "time": 0.7333, "angle": 1.68 }, 287 | { "time": 0.8666, "angle": -8.54 }, 288 | { "time": 1, "angle": -3.69 } 289 | ] 290 | }, 291 | "right shoulder": { 292 | "rotate": [ 293 | { 294 | "time": 0, 295 | "angle": 5.29, 296 | "curve": [ 0.264, 0, 0.75, 1 ] 297 | }, 298 | { "time": 0.6333, "angle": 6.65 }, 299 | { "time": 1, "angle": 5.29 } 300 | ] 301 | }, 302 | "right arm": { 303 | "rotate": [ 304 | { 305 | "time": 0, 306 | "angle": -4.02, 307 | "curve": [ 0.267, 0, 0.804, 0.99 ] 308 | }, 309 | { 310 | "time": 0.6333, 311 | "angle": 19.78, 312 | "curve": [ 0.307, 0, 0.787, 0.99 ] 313 | }, 314 | { "time": 1, "angle": -4.02 } 315 | ] 316 | }, 317 | "right hand": { 318 | "rotate": [ 319 | { "time": 0, "angle": 8.98 }, 320 | { "time": 0.6333, "angle": 0.51 }, 321 | { "time": 1, "angle": 8.98 } 322 | ] 323 | }, 324 | "left shoulder": { 325 | "rotate": [ 326 | { 327 | "time": 0, 328 | "angle": 6.25, 329 | "curve": [ 0.339, 0, 0.683, 1 ] 330 | }, 331 | { 332 | "time": 0.5, 333 | "angle": -11.78, 334 | "curve": [ 0.281, 0, 0.686, 0.99 ] 335 | }, 336 | { "time": 1, "angle": 6.25 } 337 | ], 338 | "translate": [ 339 | { "time": 0, "x": 1.15, "y": 0.23 } 340 | ] 341 | }, 342 | "left hand": { 343 | "rotate": [ 344 | { 345 | "time": 0, 346 | "angle": -21.23, 347 | "curve": [ 0.295, 0, 0.755, 0.98 ] 348 | }, 349 | { 350 | "time": 0.5, 351 | "angle": -27.28, 352 | "curve": [ 0.241, 0, 0.75, 0.97 ] 353 | }, 354 | { "time": 1, "angle": -21.23 } 355 | ] 356 | }, 357 | "left arm": { 358 | "rotate": [ 359 | { 360 | "time": 0, 361 | "angle": 28.37, 362 | "curve": [ 0.339, 0, 0.683, 1 ] 363 | }, 364 | { 365 | "time": 0.5, 366 | "angle": 60.09, 367 | "curve": [ 0.281, 0, 0.686, 0.99 ] 368 | }, 369 | { "time": 1, "angle": 28.37 } 370 | ] 371 | }, 372 | "torso": { 373 | "rotate": [ 374 | { "time": 0, "angle": -10.28 }, 375 | { 376 | "time": 0.1333, 377 | "angle": -15.38, 378 | "curve": [ 0.545, 0, 0.818, 1 ] 379 | }, 380 | { 381 | "time": 0.3666, 382 | "angle": -9.78, 383 | "curve": [ 0.58, 0.17, 0.669, 0.99 ] 384 | }, 385 | { 386 | "time": 0.6333, 387 | "angle": -15.75, 388 | "curve": [ 0.235, 0.01, 0.795, 1 ] 389 | }, 390 | { 391 | "time": 0.8666, 392 | "angle": -7.06, 393 | "curve": [ 0.209, 0, 0.816, 0.98 ] 394 | }, 395 | { "time": 1, "angle": -10.28 } 396 | ], 397 | "translate": [ 398 | { "time": 0, "x": -1.29, "y": 1.68 } 399 | ] 400 | }, 401 | "right foot": { 402 | "rotate": [ 403 | { "time": 0, "angle": -5.25 }, 404 | { "time": 0.2333, "angle": -1.91 }, 405 | { "time": 0.3666, "angle": -6.45 }, 406 | { "time": 0.5, "angle": -5.39 }, 407 | { "time": 0.7333, "angle": -11.68 }, 408 | { "time": 0.8666, "angle": 0.46 }, 409 | { "time": 1, "angle": -5.25 } 410 | ] 411 | }, 412 | "right lower leg": { 413 | "rotate": [ 414 | { 415 | "time": 0, 416 | "angle": -3.39, 417 | "curve": [ 0.316, 0.01, 0.741, 0.98 ] 418 | }, 419 | { 420 | "time": 0.1333, 421 | "angle": -45.53, 422 | "curve": [ 0.229, 0, 0.738, 0.97 ] 423 | }, 424 | { "time": 0.2333, "angle": -4.83 }, 425 | { "time": 0.5, "angle": -19.53 }, 426 | { "time": 0.6333, "angle": -64.8 }, 427 | { 428 | "time": 0.7333, 429 | "angle": -82.56, 430 | "curve": [ 0.557, 0.18, 1, 1 ] 431 | }, 432 | { "time": 1, "angle": -3.39 } 433 | ], 434 | "translate": [ 435 | { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, 436 | { "time": 0.5, "x": 0, "y": 0 }, 437 | { "time": 0.6333, "x": 2.18, "y": 0.21 }, 438 | { "time": 1, "x": 0, "y": 0 } 439 | ] 440 | }, 441 | "hip": { 442 | "rotate": [ 443 | { "time": 0, "angle": 0, "curve": "stepped" }, 444 | { "time": 1, "angle": 0 } 445 | ], 446 | "translate": [ 447 | { "time": 0, "x": 0, "y": -4.16 }, 448 | { 449 | "time": 0.1333, 450 | "x": 0, 451 | "y": -7.05, 452 | "curve": [ 0.359, 0.47, 0.646, 0.74 ] 453 | }, 454 | { "time": 0.3666, "x": 0, "y": 6.78 }, 455 | { "time": 0.5, "x": 0, "y": -6.13 }, 456 | { 457 | "time": 0.6333, 458 | "x": 0, 459 | "y": -7.05, 460 | "curve": [ 0.359, 0.47, 0.646, 0.74 ] 461 | }, 462 | { "time": 0.8666, "x": 0, "y": 6.78 }, 463 | { "time": 1, "x": 0, "y": -4.16 } 464 | ] 465 | }, 466 | "neck": { 467 | "rotate": [ 468 | { "time": 0, "angle": 3.6 }, 469 | { "time": 0.1333, "angle": 17.49 }, 470 | { "time": 0.2333, "angle": 6.1 }, 471 | { "time": 0.3666, "angle": 3.45 }, 472 | { "time": 0.5, "angle": 5.17 }, 473 | { "time": 0.6333, "angle": 18.36 }, 474 | { "time": 0.7333, "angle": 6.09 }, 475 | { "time": 0.8666, "angle": 2.28 }, 476 | { "time": 1, "angle": 3.6 } 477 | ] 478 | }, 479 | "head": { 480 | "rotate": [ 481 | { 482 | "time": 0, 483 | "angle": 3.6, 484 | "curve": [ 0, 0, 0.704, 1.17 ] 485 | }, 486 | { "time": 0.1333, "angle": -0.2 }, 487 | { "time": 0.2333, "angle": 6.1 }, 488 | { "time": 0.3666, "angle": 3.45 }, 489 | { 490 | "time": 0.5, 491 | "angle": 5.17, 492 | "curve": [ 0, 0, 0.704, 1.61 ] 493 | }, 494 | { "time": 0.6666, "angle": 1.1 }, 495 | { "time": 0.7333, "angle": 6.09 }, 496 | { "time": 0.8666, "angle": 2.28 }, 497 | { "time": 1, "angle": 3.6 } 498 | ] 499 | } 500 | } 501 | } 502 | } 503 | } -------------------------------------------------------------------------------- /example/assets/goblins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/goblins.png -------------------------------------------------------------------------------- /example/assets/spineboy-old.atlas: -------------------------------------------------------------------------------- 1 | spineboy-old.png 2 | format: RGBA8888 3 | filter: Linear,Linear 4 | repeat: none 5 | eyes-closed 6 | rotate: false 7 | xy: 73, 509 8 | size: 34, 27 9 | orig: 34, 27 10 | offset: 0, 0 11 | index: -1 12 | eyes 13 | rotate: false 14 | xy: 75, 464 15 | size: 34, 27 16 | orig: 34, 27 17 | offset: 0, 0 18 | index: -1 19 | head 20 | rotate: false 21 | xy: 2, 2 22 | size: 121, 132 23 | orig: 121, 132 24 | offset: 0, 0 25 | index: -1 26 | left-ankle 27 | rotate: false 28 | xy: 96, 351 29 | size: 25, 32 30 | orig: 25, 32 31 | offset: 0, 0 32 | index: -1 33 | left-arm 34 | rotate: false 35 | xy: 39, 423 36 | size: 35, 29 37 | orig: 35, 29 38 | offset: 0, 0 39 | index: -1 40 | left-foot 41 | rotate: false 42 | xy: 2, 262 43 | size: 65, 30 44 | orig: 65, 30 45 | offset: 0, 0 46 | index: -1 47 | left-hand 48 | rotate: false 49 | xy: 2, 423 50 | size: 35, 38 51 | orig: 35, 38 52 | offset: 0, 0 53 | index: -1 54 | left-lower-leg 55 | rotate: false 56 | xy: 72, 202 57 | size: 49, 64 58 | orig: 49, 64 59 | offset: 0, 0 60 | index: -1 61 | left-pant-bottom 62 | rotate: false 63 | xy: 2, 363 64 | size: 44, 22 65 | orig: 44, 22 66 | offset: 0, 0 67 | index: -1 68 | left-shoulder 69 | rotate: false 70 | xy: 39, 454 71 | size: 34, 53 72 | orig: 34, 53 73 | offset: 0, 0 74 | index: -1 75 | left-upper-leg 76 | rotate: false 77 | xy: 2, 464 78 | size: 33, 67 79 | orig: 33, 67 80 | offset: 0, 0 81 | index: -1 82 | neck 83 | rotate: false 84 | xy: 37, 509 85 | size: 34, 28 86 | orig: 34, 28 87 | offset: 0, 0 88 | index: -1 89 | pelvis 90 | rotate: false 91 | xy: 2, 294 92 | size: 63, 47 93 | orig: 63, 47 94 | offset: 0, 0 95 | index: -1 96 | right-ankle 97 | rotate: false 98 | xy: 96, 385 99 | size: 25, 30 100 | orig: 25, 30 101 | offset: 0, 0 102 | index: -1 103 | right-arm 104 | rotate: false 105 | xy: 96, 417 106 | size: 21, 45 107 | orig: 21, 45 108 | offset: 0, 0 109 | index: -1 110 | right-foot-idle 111 | rotate: false 112 | xy: 69, 268 113 | size: 53, 28 114 | orig: 53, 28 115 | offset: 0, 0 116 | index: -1 117 | right-foot 118 | rotate: false 119 | xy: 2, 230 120 | size: 67, 30 121 | orig: 67, 30 122 | offset: 0, 0 123 | index: -1 124 | right-hand 125 | rotate: false 126 | xy: 2, 387 127 | size: 32, 32 128 | orig: 32, 32 129 | offset: 0, 0 130 | index: -1 131 | right-lower-leg 132 | rotate: false 133 | xy: 72, 136 134 | size: 51, 64 135 | orig: 51, 64 136 | offset: 0, 0 137 | index: -1 138 | right-pant-bottom 139 | rotate: false 140 | xy: 2, 343 141 | size: 46, 18 142 | orig: 46, 18 143 | offset: 0, 0 144 | index: -1 145 | right-shoulder 146 | rotate: false 147 | xy: 67, 298 148 | size: 52, 51 149 | orig: 52, 51 150 | offset: 0, 0 151 | index: -1 152 | right-upper-leg 153 | rotate: false 154 | xy: 50, 351 155 | size: 44, 70 156 | orig: 44, 70 157 | offset: 0, 0 158 | index: -1 159 | torso 160 | rotate: false 161 | xy: 2, 136 162 | size: 68, 92 163 | orig: 68, 92 164 | offset: 0, 0 165 | index: -1 166 | -------------------------------------------------------------------------------- /example/assets/spineboy-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/spineboy-old.png -------------------------------------------------------------------------------- /example/assets/spineboy.atlas: -------------------------------------------------------------------------------- 1 | 2 | spineboy.png 3 | size: 1024,1024 4 | format: RGBA8888 5 | filter: Linear,Linear 6 | repeat: none 7 | eye_indifferent 8 | rotate: true 9 | xy: 648, 629 10 | size: 93, 89 11 | orig: 93, 89 12 | offset: 0, 0 13 | index: -1 14 | eye_surprised 15 | rotate: true 16 | xy: 233, 179 17 | size: 93, 89 18 | orig: 93, 89 19 | offset: 0, 0 20 | index: -1 21 | front_bracer 22 | rotate: false 23 | xy: 245, 2 24 | size: 58, 80 25 | orig: 58, 80 26 | offset: 0, 0 27 | index: -1 28 | front_fist_closed 29 | rotate: false 30 | xy: 168, 45 31 | size: 75, 82 32 | orig: 75, 82 33 | offset: 0, 0 34 | index: -1 35 | front_fist_open 36 | rotate: false 37 | xy: 844, 646 38 | size: 86, 87 39 | orig: 86, 87 40 | offset: 0, 0 41 | index: -1 42 | front_foot 43 | rotate: true 44 | xy: 310, 326 45 | size: 126, 69 46 | orig: 126, 69 47 | offset: 0, 0 48 | index: -1 49 | front_foot_bend1 50 | rotate: true 51 | xy: 951, 894 52 | size: 128, 70 53 | orig: 128, 70 54 | offset: 0, 0 55 | index: -1 56 | front_foot_bend2 57 | rotate: false 58 | xy: 2, 33 59 | size: 108, 93 60 | orig: 108, 93 61 | offset: 0, 0 62 | index: -1 63 | front_shin 64 | rotate: true 65 | xy: 739, 735 66 | size: 82, 184 67 | orig: 82, 184 68 | offset: 0, 0 69 | index: -1 70 | front_thigh 71 | rotate: false 72 | xy: 381, 340 73 | size: 48, 112 74 | orig: 48, 112 75 | offset: 0, 0 76 | index: -1 77 | front_upper_arm 78 | rotate: false 79 | xy: 112, 29 80 | size: 54, 97 81 | orig: 54, 97 82 | offset: 0, 0 83 | index: -1 84 | goggles 85 | rotate: false 86 | xy: 156, 454 87 | size: 261, 166 88 | orig: 261, 166 89 | offset: 0, 0 90 | index: -1 91 | gun 92 | rotate: false 93 | xy: 739, 819 94 | size: 210, 203 95 | orig: 210, 203 96 | offset: 0, 0 97 | index: -1 98 | head 99 | rotate: false 100 | xy: 466, 724 101 | size: 271, 298 102 | orig: 271, 298 103 | offset: 0, 0 104 | index: -1 105 | hoverboard_board 106 | rotate: true 107 | xy: 2, 128 108 | size: 492, 152 109 | orig: 492, 152 110 | offset: 0, 0 111 | index: -1 112 | hoverboard_thruster 113 | rotate: false 114 | xy: 602, 558 115 | size: 60, 64 116 | orig: 60, 64 117 | offset: 0, 0 118 | index: -1 119 | hoverglow_small 120 | rotate: true 121 | xy: 156, 178 122 | size: 274, 75 123 | orig: 274, 75 124 | offset: 0, 0 125 | index: -1 126 | mouth_grind 127 | rotate: true 128 | xy: 951, 799 129 | size: 93, 59 130 | orig: 93, 59 131 | offset: 0, 0 132 | index: -1 133 | mouth_oooo 134 | rotate: true 135 | xy: 245, 84 136 | size: 93, 59 137 | orig: 93, 59 138 | offset: 0, 0 139 | index: -1 140 | mouth_smile 141 | rotate: false 142 | xy: 925, 738 143 | size: 93, 59 144 | orig: 93, 59 145 | offset: 0, 0 146 | index: -1 147 | muzzle 148 | rotate: false 149 | xy: 2, 622 150 | size: 462, 400 151 | orig: 462, 400 152 | offset: 0, 0 153 | index: -1 154 | neck 155 | rotate: false 156 | xy: 168, 2 157 | size: 36, 41 158 | orig: 36, 41 159 | offset: 0, 0 160 | index: -1 161 | rear_bracer 162 | rotate: false 163 | xy: 932, 664 164 | size: 56, 72 165 | orig: 56, 72 166 | offset: 0, 0 167 | index: -1 168 | rear_foot 169 | rotate: false 170 | xy: 487, 562 171 | size: 113, 60 172 | orig: 113, 60 173 | offset: 0, 0 174 | index: -1 175 | rear_foot_bend1 176 | rotate: true 177 | xy: 419, 503 178 | size: 117, 66 179 | orig: 117, 66 180 | offset: 0, 0 181 | index: -1 182 | rear_foot_bend2 183 | rotate: false 184 | xy: 739, 650 185 | size: 103, 83 186 | orig: 103, 83 187 | offset: 0, 0 188 | index: -1 189 | rear_shin 190 | rotate: false 191 | xy: 233, 274 192 | size: 75, 178 193 | orig: 75, 178 194 | offset: 0, 0 195 | index: -1 196 | rear_thigh 197 | rotate: true 198 | xy: 487, 495 199 | size: 65, 104 200 | orig: 65, 104 201 | offset: 0, 0 202 | index: -1 203 | rear_upper_arm 204 | rotate: true 205 | xy: 156, 129 206 | size: 47, 87 207 | orig: 47, 87 208 | offset: 0, 0 209 | index: -1 210 | torso 211 | rotate: true 212 | xy: 466, 624 213 | size: 98, 180 214 | orig: 98, 180 215 | offset: 0, 0 216 | index: -1 217 | -------------------------------------------------------------------------------- /example/assets/spineboy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azerion/phaser-spine/37c41fe880aae0d2721301dbd95a5ed73364143a/example/assets/spineboy.png -------------------------------------------------------------------------------- /example/buddy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |