Git Product home page Git Product logo

spriter-cocos2d-x's Introduction

Spriter-Cocos2d-X

Spriter for Cocos2d-x

It's based on original work done by young40 (C++ port from relentless's Objective-C project on GitHub).

Note The current issue of this project is that only iOS is well tested and supported. It doesn't work on android and PC.

Any helps would be appreciate.

spriter-cocos2d-x's People

Contributors

haxpor avatar young40 avatar

Watchers

 avatar

spriter-cocos2d-x's Issues

Bad anchor point

As ssen in the video (https://vimeo.com/52218780), the second monster have some parts not well positioned. This is because the anchor points are not well read from the SCML file.

To solve this we must change the line 552 of SpriterNode.cpp to check if the pivot_x and pivot_y exists as a property in the object. If the property is not set, i takes 0 as the default number, but Spriter uses 1 as the default value. The code should look like this.

CCString pivot_x = object->getPropertyCCString("pivot_x");
CCString pivot_y = object->getPropertyCCString("pivot_y");
timelineKey->setAnchorPoint(
ccp(pivot_x->compare("")==0 ? 1 : pivot_x->doubleValue(),
pivot_y->compare("")==0 ? 1 : pivot_y->doubleValue()));

I don't have Cocos2d-X set up in XCode, so i can't test it. Feel free to try and fix this. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.