Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Commit

Permalink
Badge from codacy and david-dm
Browse files Browse the repository at this point in the history
  • Loading branch information
qertis committed May 15, 2016
1 parent 50a6168 commit f424ed6
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# Cocos2d-HTML5 Spriter scml (scon) Implementation
> Based on [spriter.js](https://github.com/flyover/spriter.js)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4023ff166364425d805232ac1518e4d9)](https://www.codacy.com/app/qertis/cc_spriter?utm_source=github.com&utm_medium=referral&utm_content=qertis/cc_spriter&utm_campaign=Badge_Grade)
[![Dependency Status](https://david-dm.org/qertis/cc_spriter.svg)](https://david-dm.org/qertis/cc_spriter)

<a href="http://www.brashmonkey.com/">
<img title="spriter logo" src="https://pbs.twimg.com/profile_images/2556942741/yxn4f63yjqc74hyf2ylb.png" width="192">
</a>

Dependencies for development
---
Dependencies for development:
-----------------------------
* node >= 4.0
* [Google Closure Compiler](https://developers.google.com/closure/compiler/)
* [compiler.jar](http://dl.google.com/closure-compiler/compiler-latest.zip) send compiler.jar to directory bower_components/google-closure-library/
* [compiler.jar](http://dl.google.com/closure-compiler/compiler-latest.zip)
send compiler.jar to directory ```bower_components/google-closure-library/```

Compile source code:
---
Setup:
------
```sh
./bin/compile.sh
npm install
bower install
```

Setup
---
Compile source code with Closure:
---------------------------------
```sh
npm install
bower install
./bin/compile.sh
```

Project structure
---
Project structure:
------------------
```sh
├─ dist/
├──── cc_spriter_min.js
Expand All @@ -44,26 +48,32 @@ Project structure
```

Usage:
---
------
Include cc_spriter_min.js in cocos2d project.json
```json
"jsList": [
"cc_spriter_min.js"
]
```

Example
---
Example:
--------
```js
var spriter = new cc.Spriter(pathToScon);
spriter.setEntity(entityName);
spriter.setAnim(animationName);
spriter.unscheduleUpdate(); //pause
spriter.scheduleUpdate(); //resume
```

Features
---
API:
----
```js
spriter.setLoop(false);
spriter.pause();
spriter.resume();
```

Features:
---------
* Canvas 2D and WebGL supports
* No global dependencies
* ~62kB size

0 comments on commit f424ed6

Please sign in to comment.