azerion / phaser-spine

A plugin for Phaser 2 that adds Spine support
MIT License
121 stars 58 forks source link

Equivalent of triangleRendering ? For mesh ? #34

Closed iangregsondev closed 7 years ago

iangregsondev commented 7 years ago

Hi,

I have downloaded the example project and got them working. I have some spine files that use mesh, currently it rendered with a black background, its as if the background isn't present.

I also downloaded the spine-ts - Html 5 canvas and tried my file, I got the same problem, but setting the triangleRendering to true, forced my spine render to display perfectly.

So i was wondering if there is something similar that exists in orange -phaser - spine.

I must admit my knowledge of spine is limited, although setting the triangleRendering to true renders the spine file inside the html 5 canvas.

Any help really appreciated

Thanks

iangregsondev commented 7 years ago

Currently I am not really doing anything special. I am doing the following

    //create
    testit = game.add.spine(400, 300, "testit");

    // play anim (yes my animation is called animation)
    testit.setAnimationByName(0, "animation", true);

    testit.setToSetupPose();

As I say, right now, it displays a black background with the animation points over the stop.

very strange.

AleBles commented 7 years ago

Not yet, but I started implementing it in the spine-ts branch

iangregsondev commented 7 years ago

Wow! - Nice.

iangregsondev commented 7 years ago

I thought I would let you know, I downloaded the latest spine progrma on the spine-ts branch.... and it works! With mesh!

Very cool,

I had to update an hard coded animation name inside the plugin.ts from 'walk' to animation.

but this works great!

Excellent work..

It is coming along just fine!

AleBles commented 7 years ago

The only downside atm is that it only works when Phaser runs under CANVAS :(

iangregsondev commented 7 years ago

Yes I noticed the implementation is only canvas, very cool though still.