Skip to content
This repository has been archived by the owner. It is now read-only.
Cocos2D JS Spriter SCON Implementation 🚶
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
demo
dist
.bowerrc
.editorconfig
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md
bower.json
cc_spriter.js
package.json
webpack.config.js

README.md

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.

You can’t perform that action at this time.