Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Karl committed Jan 26, 2016
0 parents commit 1ba3084
Show file tree
Hide file tree
Showing 205 changed files with 21,250 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory" : "components"
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
root = true

[**.js]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gitignore export-ignore
.gitattributes export-ignore
.bowerrc export-ignore
.editorconfig export-ignore
.travis.yml export-ignore
.npmignore export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs
components
node_modules
.grunt
8 changes: 8 additions & 0 deletions .jsbeautifyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"js":
{
"braceStyle": "expand",
"indentWithTabs": true,
"endWithNewline": false
}
}
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.gitignore
.gitattributes
.editorconfig
.bowerrc
.jsbeautifyrc
.travis.yml
bower.json
library.json
tasks
Gruntfile.js
examples
docs
src
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.12"
before_install:
- npm install -g grunt-cli
7 changes: 7 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = function(grunt)
{
require('library-grunt')(grunt,
{
modulesPath: '<%= distFolder %>/plugins'
});
};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Jibo, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# PIXI Animate [![Build Status](https://travis-ci.org/jiborobot/pixi-animate.svg)](https://travis-ci.org/jiborobot/pixi-animate) [![Dependency Status](https://david-dm.org/jiborobot/pixi-animate.svg)](https://david-dm.org/jiborobot/pixi-animate) [![GitHub version](https://badge.fury.io/gh/jiborobot%2Fpixi-animate.svg)](https://github.com/jiborobot/pixi-animate/releases/latest)

A library for bridging CreateJS animations from Flash for use in Pixi.js. Publish Flash content like you normally would for CreateJS (with an HTML5 Canvas document), but export for Pixi.js instead. While there are some [known issues](https://github.com/jiborobot/pixi-animate#known-issues) with this approach, it produces fast animation playback for WebGL and is superior to using Flash's WebGL document.

## Examples

* [Animation using all bitmaps](http://cloudkidstudio.github.io/pixi-animate/examples/animation/)
* [Animation using all vectors](http://cloudkidstudio.github.io/pixi-animate/examples/shapes/)
* [Masking](http://cloudkidstudio.github.io/pixi-animate/examples/masking/)
* [Color Effects](http://cloudkidstudio.github.io/pixi-animate/examples/color_effects/)
* [Text](http://cloudkidstudio.github.io/pixi-animate/examples/text/)

_Animated examples are from [Fizzy's Lunch Lab](http://pbskids.org/lunchlab/) and used with permission from Lunch Lab, LLC_

## Running Content

### Installing Library

To run content exported with PixiAnimate, you must load the JavaScript library within your project. You can install using [Bower](http://bower.io) or [NPM](http://www.npmjs.org):

#### Bower
```
bower install pixi-animate
```
#### NPM
```
npm install pixi-animate
```

### Dependencies

* [Pixi.js](http://pixijs.com) is required

### Usage

Here's a example using PIXI where the images were assembled using TexturePacker. See the **example** folder for an example which uses the Flash SpriteSheet exporting.

```js
var renderer = new PIXI.autoDetectRenderer(800, 500);
var stage = new PIXI.Container();

// Load the atlas for the character
var loader = new PIXI.loaders.Loader();

// This atlas is created with TexturePacker from the
// output individual images from Flash publishing
loader.add('CharacterAtlas',"CharacterAtlas.json");
loader.once('complete',function(loader, resources)
{
// Create the character, all library symbols live
// on the lib window object
var character = new lib.Character();
character.framerate = 30;
character.play();

// Add to stage
stage.addChild(character);
});
loader.load();

// Normal render
update();
function update()
{
requestAnimationFrame(update);
renderer.render(stage);
}
```

##Known Issues

* Abutting vector shapes create a small seams which make it possible to see the color underneath (similar to EaselJS)
* Complex shapes with a negative shape inside of it only render the outer-most shape. For example, a donut shape would only render the outer circle and not the hole.
* Flash Color Effects are supported only for Advanced style multiplicative color changes (RGB percents) by translating to PIXI 'tint' property. Additive color effects such as Tint, and the additive RGB modifiers in the Advanced Color Effect style will be ignored. The Brightness effect is only capable of darkening the symbol (Brightened symbols will be rendered darker than original). Keyframes and tweening of Color Effects are not supported.

##License

Copyright (c) 2016 [Jibo, Inc.](http://github.com/jiborobot)

Released under the MIT License.
32 changes: 32 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "pixi-animate",
"version": "0.3.0",
"main": "dist/pixi-animate.min.js",
"dependencies":
{
"pixi.js": "^3.0.9"
},
"devDependencies":
{
"qunit": "*",
"google-code-prettify": "*",
"bind-polyfill": "*"
},
"ignore": [
"Gruntfile.js",
"tasks",
"examples",
"docs",
"src",
"test",
".jsbeautifyrc",
".bowerrc",
".editorconfig",
".npmignore",
".travis.yml",
".gitattributes",
"library.json",
"package.json",
".gitignore"
]
}
Loading

0 comments on commit 1ba3084

Please sign in to comment.