Giter VIP home page Giter VIP logo

cc_spriter's Introduction

Spriter Cocos2d 3.x

Based on spriter.js SCON Implementation. Discuss forum

Build Status Dependency Status devDependencies Status Codacy Badge

Install from Bower

bower install cc_spriter

Usage

Include cc_spriter_min.js in project.json

"jsList": [
  "cc_spriter_min.js"
]

Example

const spriter = new cc.Spriter(pathToScon);
spriter.setEntity(entityName);
spriter.setAnim(animationName);

API

spriter.setLoop(Boolean);
spriter.pause();
spriter.resume();

Development

Need dependencies:

  • node >= 6.0
  • Bash Shell
  • JAVA
  • Google Closure Compiler
  • compiler.jar
    • send compiler.jar to directory bower_components/google-closure-library/
    • rename closure_compiler file to compiler.jar

Setup:

npm i

Compile source code with Google Closure

npm run compile

Project structure:

├─ dist/
├──── cc_spriter_min.js
├─ bower_components/
├──── google-closure-library/
├────── compiler.jar
├──── spriterjs/
├─ demo/
├──── .cocos-project.json
├──── res
├──── index.html
├──── main.js
├──── project.json
└─ cc_spriter.js

Features

  • Canvas 2D and WebGL supports
  • No global dependencies
  • ~62kB size

License

cc_spriter is MIT licensed.

cc_spriter's People

Contributors

qertis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cc_spriter's Issues

CharacterMaps

Is there a way to use CharacterMaps? Can't see it in code.

Build failed

После распаковки падает на команде

Archive:  ./compiler-latest.zip
  inflating: ./output/closure-compiler-v20170218.jar  
  inflating: ./output/COPYING        
  inflating: ./output/README.md      
find: The relative path `./node_modules/.bin' is included in the PATH environment variable, which is insecure in combination with the -execdir action of find.  Please remove that entry from $PATH
cp: cannot stat `./output/compiler.jar': No such file or directory

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.