MadDugan / spine-cocos2d-html5

Javascript port of spine-cocos2dx runtime
Other
18 stars 6 forks source link

Samples functional? #1

Closed j03m closed 11 years ago

j03m commented 11 years ago

Hey I was thinking about using this after spotting it listed as a spine runtime - but after a clone of master and running the samples in simple node http server I get a bunch of errors. I was wondering if this was working or active? I'm literally just hitting index.html.

Let me know, I'd love to give this a shot.

Assertion failed: CCApplication ctor Cocos2d-html5-v2.1.3.min.js:10 Uncaught TypeError: Object # has no method '_initializingRenderer' Cocos2d-html5-v2.1.3.min.js:1368 Uncaught TypeError: Object # has no method 'clear' Cocos2d-html5-v2.1.3.min.js:1277 Uncaught TypeError: Object # has no method 'createTexture' Cocos2d-html5-v2.1.3.min.js:454

MadDugan commented 11 years ago

It should be working.

I have locally updated to v2.1.5 of Cocos2d, though I haven't synced the repository to that version. Do the core Cocos2d examples work?

j03m commented 11 years ago

Yea, I repulled cocos2d-html5 and ran engine dir against 2.1.5 and I'm getting the same set of errors. The cocos tests and samples look fine. I'm assuming this is what you mean by core Cocos2d examples. They seem to be okay.

MadDugan commented 11 years ago

I set up the sample on githubs local page here: http://maddugan.github.io/spine-cocos2d-html5/

This still uses 2.1.3 as 2.1.5 has texture artifacts. It appears the entire cocos2d-x project is migrating to a different render path and it isn't fully functional yet.

j03m commented 11 years ago

Huh. Odd I don't see the exceptions there, but I don't see the animation either. Strange. I'm using Version 29.0.1547.57 of Chrome on MacOS. I'll look at that page.

enriqueto commented 11 years ago

Hi,

I'm testing your example but I can't make it work on render mode canvas. I get this error:

Uncaught TypeError: Object # has no method 'createBuffer'

MadDugan commented 11 years ago

This was a direct port of the Objective-C Spine classes, which didn't have any concept of a canvas, so only supports WebGL. I have started a port to the latest version of Cocos2d-html 2.2 and will look to see what options I have in supporting canvas if targeted.

-MadDugan

On Fri, Oct 25, 2013 at 6:52 AM, enriqueto notifications@github.com wrote:

Hi,

I'm testing your example but I can't make it work on render mode canvas. I get this error:

Uncaught TypeError: Object # has no method 'createBuffer'

— Reply to this email directly or view it on GitHubhttps://github.com/MadDugan/spine-cocos2d-html5/issues/1#issuecomment-27094115 .

enriqueto commented 11 years ago

cool!

enriqueto commented 11 years ago

I've noticed that the animation is fine but there is a problem on the borders of the images. Does this happens to you too?

captura de pantalla 2013-10-26 a la s 11 14 21

MadDugan commented 11 years ago

I started seeing that when version 2.1.5 of Cocos2d-html5 was released. Version 2.1.3 looked correct. Version 2.2 also has the bug/issue. I am not sure what was chenged in Cocos2d to cause it, but i assume some webGL setting isn't set to a previous default.

-MadDugan

On Sat, Oct 26, 2013 at 2:16 AM, enriqueto notifications@github.com wrote:

I've noticed that the animation is fine but there is a problem on the borders of the images. Does it happens to you too?

[image: captura de pantalla 2013-10-26 a la s 11 14 21]https://f.cloud.github.com/assets/5557196/1413204/47b07f1e-3e1f-11e3-9d17-00b8ba36f491.png

— Reply to this email directly or view it on GitHubhttps://github.com/MadDugan/spine-cocos2d-html5/issues/1#issuecomment-27142631 .

enriqueto commented 11 years ago

I'll investigate that too, even though I'm a novice in cocos2dx-html5 and javascript

MadDugan commented 11 years ago

QUICK FIX: Change line 34 in CCSkeleton.js to

this._blendFunc = {src:cc.BLEND_SRC, dst:cc.BLEND_DST};

Seems to fix the outline issue.

I am investigating a canvas only option.

-MadDugan

On Sat, Oct 26, 2013 at 2:29 AM, enriqueto notifications@github.com wrote:

I'll investigate that too, even though I'm a novice in cocos2dx-html5 and javascript

— Reply to this email directly or view it on GitHubhttps://github.com/MadDugan/spine-cocos2d-html5/issues/1#issuecomment-27142807 .

enriqueto commented 11 years ago

quick fix works alright!