Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

How to set up spines in cocos2d-x js

$
0
0

@Drsmall wrote:

So I've created a simple walk cycle in Cocos Studio and wanted to add it to my code.

var HelloWorldLayer = cc.Layer.extend({
sprite:null,
ctor:function () {
    this._super();
    var size = cc.winSize;
    var sp = sp || {};
    var gary = new sp.SkeletonAnimation('res/skeletons/gary/gary.json', 'res/skeletons/gary/gary.atlas');
    this.addChild(gary, 4);
    return true;
}});

But this is saying that sp is undefined? What is sp? How do I create it? Looking at the SpineTest.js file didn't help either. What do I do to fix this?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>