PKrawczynski Posted May 1, 2018 Share Posted May 1, 2018 Hello, as We've discussed on twitter I'm posting request on forum Phaser has a very neat utility method called "createCombinedSkin" which takes array of values where first value is string name that user can later call to display complex skin made of multiple skins and following values in array are names of skins themselves that will be used for that combined skin. That way you can easily create customizable character made from multiple elements like ie. ["body_male_1","eyes_small","nose_huge","chest_armor_gold","leg_armor_plate_3","shoes_silver_17"] Quote Link to comment Share on other sites More sharing options...
enpu Posted May 6, 2018 Share Posted May 6, 2018 @PKrawczynski I have now added two new methods to Spine class, createSkin and setSkin. You should be now able to create and use combined skins like this: var player = new game.Spine('player.json'); player.createSkin('mySkinName', ['skin1', 'skin2', 'skin3']); player.setSkin('mySkinName'); Here is attached new version of Spine plugin. Can you confirm that it works as it should before i update it to the website. Thanks! panda2-plugin-spine-1_2_2.zip blackmoondev and PKrawczynski 2 Quote Link to comment Share on other sites More sharing options...
PKrawczynski Posted May 7, 2018 Author Share Posted May 7, 2018 Amazing, thank you for taking time Not sure when I will test (today/tommorow/this week) it's already pretty crazy monday Quote Link to comment Share on other sites More sharing options...
enpu Posted May 7, 2018 Share Posted May 7, 2018 No hurry, just let me know when you have tested Quote Link to comment Share on other sites More sharing options...
PKrawczynski Posted May 7, 2018 Author Share Posted May 7, 2018 @enpu took quick look and I'm not sure if I made mistake or if it doesn't work yet. I've attached modified example with "CombinedSkins" scene, and I've added art files as well plus json config. It displays naked body when first skin is "WhiteSkinTone" (and nothing else), however when I change first array element it display that element instead of body (so if I put "PirateCyberHat" it does display hat but it stops displaying body). Basically it disregards all other elements that are in array except first. results.zip Quote Link to comment Share on other sites More sharing options...
PKrawczynski Posted May 7, 2018 Author Share Posted May 7, 2018 @enpu I've got image what results to expect when combining skins works as expected (it's from personal phaser project of @blackmoondev) Currently in Panda2 it displays just sword, gun and character body (without eyes, hat etc). Quote Link to comment Share on other sites More sharing options...
enpu Posted May 8, 2018 Share Posted May 8, 2018 @PKrawczynski Thanks for all the info, there is definitely something wrong. This doesn't seem to work with the Pixi Spine plugin either: https://github.com/pixijs/pixi-spine/issues/227 Could you give me a link to the Phaser Spine plugin source code, so i could take a look what's different there? Quote Link to comment Share on other sites More sharing options...
PKrawczynski Posted May 8, 2018 Author Share Posted May 8, 2018 2 minutes ago, enpu said: @PKrawczynski Thanks for all the info, there is definitely something wrong. This doesn't seem to work with the Pixi Spine plugin either: https://github.com/pixijs/pixi-spine/issues/227 Could you give me a link to the Phaser Spine plugin source code, so i could take a look what's different there? As far as I know (from @blackmoondev) it's this plugin https://github.com/orange-games/phaser-spine , I hope this helps Quote Link to comment Share on other sites More sharing options...
enpu Posted May 8, 2018 Share Posted May 8, 2018 @PKrawczynski I think i have now solved this, can you try this new one? panda2-plugin-spine-1_2_2.zip Quote Link to comment Share on other sites More sharing options...
PKrawczynski Posted May 11, 2018 Author Share Posted May 11, 2018 @enpu sorry for late reply, it all does look really good on our side! Thank you for extremely fast support on this. Quote Link to comment Share on other sites More sharing options...
enpu Posted May 11, 2018 Share Posted May 11, 2018 @PKrawczynski That's great. Spine plugin version 1.3.0 is now live: https://www.panda2.io/plugins PKrawczynski, Ninjadoodle and blackmoondev 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.