Skip to content

Commit b3cc7e7

Browse files
committed
Initial Commit
0 parents  commit b3cc7e7

21 files changed

+1121
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/bower_components

.jshintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"bitwise": false,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"esversion": 5,
6+
"freeze": true,
7+
"funcscope": true,
8+
"loopfunc": false,
9+
"maxdepth": 9,
10+
"noarg": true,
11+
"nocomma": true,
12+
"nonbsp": true,
13+
"nonew": true,
14+
"notypeof": true,
15+
"predef": [ "MY_GLOBAL" ],
16+
"shadow": true,
17+
"singleGroups": false,
18+
"undef": true,
19+
"unused": false,
20+
"sub":true
21+
}

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/
2+
test/
3+
images/
4+
docs/
5+
.jshintrc
6+
.travis.yml
7+
jsdoc.json

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- "4.0"
4+
before_script:
5+
- npm install -g gulp

Gulpfile.js

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
'use strict';
2+
3+
var fs = require('fs');
4+
var pkg = JSON.parse( fs.readFileSync('./package.json') );
5+
var gulp = require('gulp');
6+
var sourcemaps = require('gulp-sourcemaps');
7+
var plugins = require('gulp-load-plugins')();
8+
var gutil = require('gulp-util');
9+
var qunit = require('gulp-qunit');
10+
var shell = require('gulp-shell');
11+
var merge = require('merge-stream');
12+
var size = require('gulp-check-filesize');
13+
var jshint = require('gulp-jshint');
14+
var rename = require('gulp-rename');
15+
var insert = require('gulp-insert');
16+
var glob = require('glob');
17+
18+
var build = {
19+
filename: 'anim8js-pixi.js',
20+
minified: 'anim8js-pixi.min.js',
21+
output: './build/',
22+
include: [
23+
'./src/_header.js',
24+
'./src/functions.js',
25+
'./src/Attributes.js',
26+
'./src/attribute.js',
27+
'./src/Dynamics.js',
28+
'./src/dynamic.js',
29+
'./src/FactoryPixi.js',
30+
'./src/AnimatorPixi.js',
31+
'./src/_footer.js'
32+
]
33+
};
34+
35+
var comments = [
36+
"/*", pkg.name, pkg.version, '-', pkg.description, 'by', pkg.author, "*/\n"
37+
];
38+
39+
var executeMinifiedBuild = function(props)
40+
{
41+
return function() {
42+
return gulp
43+
.src( props.output + props.filename )
44+
.pipe( rename( props.minified ) )
45+
.pipe( sourcemaps.init() )
46+
.pipe( plugins.uglify().on('error', gutil.log) )
47+
.pipe( insert.prepend( comments.join(' ') ) )
48+
.pipe( sourcemaps.write('.') )
49+
.pipe( size({enableGzip: true}) )
50+
.pipe( gulp.dest( props.output ) )
51+
;
52+
};
53+
};
54+
55+
var executeBuild = function(props)
56+
{
57+
return function() {
58+
return gulp
59+
.src( props.include )
60+
.pipe( plugins.concat( props.filename ) )
61+
.pipe( insert.prepend( comments.join(' ') ) )
62+
.pipe( size({enableGzip: true}) )
63+
.pipe( gulp.dest( props.output ) )
64+
.pipe( jshint() )
65+
.pipe( jshint.reporter('default') )
66+
.pipe( jshint.reporter('fail') )
67+
;
68+
};
69+
};
70+
71+
var executeTest = function(file)
72+
{
73+
return function() {
74+
return gulp
75+
.src( file )
76+
.pipe( qunit() )
77+
;
78+
};
79+
};
80+
81+
gulp.task('lint', function() {
82+
return gulp
83+
.src( build.output + build.filename )
84+
.pipe( jshint() )
85+
.pipe( jshint.reporter('default') )
86+
.pipe( jshint.reporter('fail') )
87+
;
88+
});
89+
90+
gulp.task( 'js', executeBuild( build ) );
91+
gulp.task( 'js:min', ['js'], executeMinifiedBuild( build ) );
92+
93+
gulp.task( 'default', ['js:min']);
94+
95+
gulp.task( 'test', ['js'], executeTest( './test/index.html' ) );
96+
97+
gulp.task( 'docs', shell.task(['./node_modules/.bin/jsdoc -c jsdoc.json']));
98+
gulp.task( 'clean', shell.task(['rm -rf build/*.js', 'rm -rf build/*.map']));

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 anim8js
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# anim8js-pixi
2+
3+
[anim8](https://github.com/ClickerMonkey/anim8js) [PixiJS](http://www.pixijs.com/)
4+
5+
### Installation
6+
7+
- Bower: `bower install anim8js-pixi`
8+
- Node: `npm install anim8js-pixi`
9+
- Download: [anim8js-pixi](https://raw.githubusercontent.com/ClickerMonkey/anim8js-pixi/master/build/anim8js-pixi.js)
10+
11+
##### Properties you can anim8
12+
13+
If a (type) isn't beside the property - assume a simple number type.
14+
15+
`padding` `alpha` `height` `pivot`(2d) `position`(2d) `rotation` `scale`(2d)
16+
`rotation` `scale`(2d) `width` `x` `y` `blur` `blurX` `blurY` `radius` `step`
17+
`offset`(2d) `angle` `blendMode` `boundsPadding` `fillAlpha` `lineWidth` `gray`
18+
`invert` `a` `b` `c` `d` `tx` `ty` `size`(2d) `sepia` `anchor`(2d)
19+
`strokeThickness` `wordWrapWidth` `dropShadowAngle` `dropShadowDistance`
20+
`tilePosition`(2d) `tileScale`(2d) `tileScaleOffset`(2d) `start` `end`
21+
`gradientBlur`
22+
23+
##### Dynamic properties you can anim8
24+
25+
`sizeScalar` `pivotX` `pivotY` `scaleX` `scaleY` `dimension`(2d) `offsetX`
26+
`offsetY` `lineColor`(rgba) `tint`(rgb) `fill`(rgba) `stroke`(rgba)
27+
`dropShadowColor`(rgba)

bower.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "anim8js-pixi",
3+
"version": "1.0.0",
4+
"homepage": "http://clickermonkey.github.io/anim8js-pixi",
5+
"authors": [
6+
"Philip Diffenderfer <[email protected]>"
7+
],
8+
"description": "anim8 PixiJS (http://www.pixijs.com/)",
9+
"main": "build/anim8js-pixi.js",
10+
"keywords": [
11+
"javascript",
12+
"animation",
13+
"PixiJS"
14+
],
15+
"license": "MIT",
16+
"ignore": [
17+
"**/.*",
18+
"node_modules",
19+
"bower_components",
20+
"test",
21+
"src"
22+
],
23+
"dependencies": {
24+
"anim8js": "^1.0.0",
25+
"pixi": "pixijs#^1.3.0"
26+
}
27+
}

0 commit comments

Comments
 (0)