pixijs / spine

Pixi.js plugin that enables Spine support.
Other
565 stars 218 forks source link

PixiJS doesn't support Spine Mesh feature #10

Closed englercj closed 9 years ago

englercj commented 9 years ago

Cross posting GoodBoyDigital/pixi.js#1349.

ivanpopelyshev commented 9 years ago

@JaredSartin @rpurushotma @Partysun

I will be happy to help , especially if you show me what are you doing with Dart. I want to port pixi v3 to dart + spine plugin too!

JaredSartin commented 9 years ago

Ideally we could just use this as the mesh/skinned mesh renderer for spine animations - not need dart1

I am not using dart for the project at the moment. I was using an example project that actually rendered meshes via dart only because Pixi couldn't :( :(

ivanpopelyshev commented 9 years ago

@JaredSartin Can you check if the problem is there in latest 2.x version? I remember we fixed something in FFD

ivanpopelyshev commented 9 years ago

Right there: https://github.com/GoodBoyDigital/pixi.js/commit/6d2da3a70b1b50f99ded79005d515ac5f2fbe8fd we found that FfdTimeline and IkConstraints derped while calculating duration :)

JaredSartin commented 9 years ago

May be fixed. I have yet to check. I think my project ended a couple days prior to that commit. Thanks for pointing that out.

On Thu, Apr 23, 2015 at 1:30 PM, Ivan Popelyshev notifications@github.com wrote:

Right there: GoodBoyDigital/pixi.js@6d2da3a https://github.com/GoodBoyDigital/pixi.js/commit/6d2da3a70b1b50f99ded79005d515ac5f2fbe8fd we found that FfdTimeline and IkConstraints derped while calculating duration :)

— Reply to this email directly or view it on GitHub https://github.com/pixijs/pixi-spine/issues/10#issuecomment-95711157.

Jared Sartin 269.364.1735 | jared.sart.in | @JaredSartin http://twitter.com/JaredSartin

Shadowstep33 commented 9 years ago

Any update on this?

ivanpopelyshev commented 9 years ago

@Shadowstep33 Last time I checked, Mesh was working.

Shadowstep33 commented 9 years ago

My meshes throw some WebGL warnings and don't appear on screen:

WebGL: INVALID_VALUE: bufferData: no data

and

[.WebGLRenderingContext-06F1C470]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0

EDIT: I answered my own problem unknowingly. The problem seems to lie in using WebGL renderer. Switched to canvas and it works.

ivanpopelyshev commented 9 years ago

@Shadowstep33 Does it work with CanvasRenderer?

UPD. oh. Ok. now we have problem in WebGL renderer...

Shadowstep33 commented 9 years ago

Yes it does. Can we not use meshes in WebGL?

ivanpopelyshev commented 9 years ago

Is that problem exists for every mesh or just some of them?

Shadowstep33 commented 9 years ago

I haven't gotten that deep into utilizing spine, but of all the Spine files i've been sent by my coworkers, all of the ones with a mesh do not work.

Shadowstep33 commented 9 years ago

Keep in mind, that's all the layers with a mesh. The other layers will still show up and animate, so the overall Spine object is still there and trying to draw

ivanpopelyshev commented 9 years ago

Ok, I have some Meshes, I'll test it :)

@Shadowstep33 can you wait a few hours?

Shadowstep33 commented 9 years ago

Indeed I can, appreciate the help

Shadowstep33 commented 9 years ago

If this helps at all, I get this bug in IE using WebGLRenderer

WEBGL11128: INVALID_VALUE: bufferData: bufferData must be passed a size or an array. Null and undefined are not valid File: pixi.js, Line: 26035, Column: 5

simonTadram commented 9 years ago

I submited a pull Request to fixed this issue & bit more https://github.com/pixijs/pixi-spine/pull/30

Mesh, SkinnedMesh & blending mode are now supported,

But you need another fix from pixi, I also made a pull Request for that https://github.com/GoodBoyDigital/pixi.js/pull/1784

With those 2 changes everything run perfectly as in Spine

ivanpopelyshev commented 9 years ago

That patch contains fixes about blendModes and getFrameCount. I believe you. Merged.

@Shadowstep33 please test it

Shadowstep33 commented 9 years ago

Did you merge to pixi spine as well? Github only says you merged to pixi.js, but that's on the pixi-spine ticket. I downloaded both pixi.js and pixi-spine.js from the master branches, but no dice; the mesh still isn't appearing.

simonTadram commented 9 years ago

my change didn`t get merged yet in pixi, but it is in pixi-spine

In my previous message I pointed the pull request that tyou would need to get as well for pixi https://github.com/GoodBoyDigital/pixi.js/pull/1784

or get my fork at https://github.com/simonTadram/pixi.js (pixi dev branch up to date + my change)

On Tue, May 12, 2015 at 8:22 PM, Shadowstep33 notifications@github.com wrote:

Did you merge to pixi spine as well? Github only says you merged to pixi.js, but that's on the pixi-spine ticket. I downloaded both pixi.js and pixi-spine.js from the master branches, but no dice; the mesh still isn't appearing.

— Reply to this email directly or view it on GitHub https://github.com/pixijs/pixi-spine/issues/10#issuecomment-101466441.

ivanpopelyshev commented 9 years ago

And It seems I forgot to rebuild it. Uploading new binaries.

ivanpopelyshev commented 9 years ago

@Shadowstep33 please try simonTandram's pixi.js: https://www.dropbox.com/s/31za9d5nsa8p8e5/pixi.js?dl=0

and latest pixi-spine.js https://github.com/pixijs/pixi-spine/blob/master/bin/pixi-spine.js

Shadowstep33 commented 9 years ago

Mesh.js: 19: Uncaught TypeError: Resource.setExtensionXhrType is not a function

That error is thrown when I try to load with both of those files

ivanpopelyshev commented 9 years ago

@Shadowstep33 !@#$ I forgot to npm install :) Wait 1 minute, I'll update pixi.js in my dropbox

Shadowstep33 commented 9 years ago

hahahah all good man, let me know when it's built :P

ivanpopelyshev commented 9 years ago

Done. Lets try again!

Shadowstep33 commented 9 years ago

Does it update immediately on github? It still says edited 7 hours ago and is throwing the same error

ivanpopelyshev commented 9 years ago

I updated pixi.js built in my dropbox: https://www.dropbox.com/s/31za9d5nsa8p8e5/pixi.js?dl=0 I built version with simon's patch, but I forgot to update some npm modules.

Shadowstep33 commented 9 years ago

Yay works perfectly! Thanks @ivanpopelyshev and @simonTadram !

Shadowstep33 commented 9 years ago

Oh actually, unfortunately an older pixi bug is back it appears! That sprites w/o interactive block sprites with interactive.

The issue is linked below https://github.com/GoodBoyDigital/pixi.js/issues/1725

englercj commented 9 years ago

@Shadowstep33

https://github.com/GoodBoyDigital/pixi.js/issues/1725#issuecomment-101729184

englercj commented 9 years ago

Just released v3.0.5 which includes the PR from @simonTadram.

https://github.com/GoodBoyDigital/pixi.js/releases/tag/v3.0.5

Shadowstep33 commented 9 years ago

@englercj thanks! I'm going to wait for the sprite interaction fix before updating from the version I am currently using.

ivanpopelyshev commented 9 years ago

@englercj so we can close it , right?

englercj commented 9 years ago

Go for it