Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
flashhawk committed Nov 18, 2013
2 parents f953223 + 57bdb65 commit 2582c6d
Show file tree
Hide file tree
Showing 15 changed files with 507 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ Spp.js is a sample physics particle system engine for javascript.
* Code less, simple structure.
* Based on classical Newtonian mechanics.
* Make your own custom forces or particles
* Easy to build interactive projects.
* Easy to build interactive projects with popular HTML5 2D rendering engine:[pixi.js](https://github.com/GoodBoyDigital/pixi.js),[EaselJS](https://github.com/CreateJS/EaselJS/)
* Open source!


### Getting Started
```html
<script src="js/spp.min.js"></script>
Expand Down Expand Up @@ -50,7 +51,8 @@ Spp.js is a sample physics particle system engine for javascript.
### Examples
* [gettingStarted](http://flashhawk.github.com/spp.js/examples/gettingStarted/)
* [spriteImage](http://flashhawk.github.com/spp.js/examples/spriteImage/)
* [easelJS](http://flashhawk.github.com/spp.js/examples/easelJS/)
* [spp for easelJS](http://flashhawk.github.com/spp.js/examples/easelJS/)
* [spp for pixi.js](http://flashhawk.github.com/spp.js/examples/pixi/)
* [attraction](http://flashhawk.github.com/spp.js/examples/attraction/)
* [repulsion](http://flashhawk.github.com/spp.js/examples/repulsion/)
Expand Down
44 changes: 44 additions & 0 deletions examples/pixi/assets/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{"frames": {

"leaf_0.png":
{
"frame": {"x":2,"y":118,"w":88,"h":56},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":7,"w":88,"h":56},
"sourceSize": {"w":90,"h":70}
},
"leaf_1.png":
{
"frame": {"x":2,"y":2,"w":88,"h":56},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":7,"w":88,"h":56},
"sourceSize": {"w":90,"h":70}
},
"leaf_2.png":
{
"frame": {"x":2,"y":60,"w":88,"h":56},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":7,"w":88,"h":56},
"sourceSize": {"w":90,"h":70}
},
"leaf_3.png":
{
"frame": {"x":2,"y":176,"w":43,"h":18},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":1,"y":1,"w":43,"h":18},
"sourceSize": {"w":45,"h":20}
}},
"meta": {
"app": "http://www.codeandweb.com/texturepacker ",
"version": "1.0",
"image": "assets.png",
"format": "RGBA8888",
"size": {"w":128,"h":256},
"scale": "0.5",
"smartupdate": "$TexturePacker:SmartUpdate:7fcb326420bd819c9c9637be8d9abceb:9ccc6a4e8c3fe486115909d9b9320826:fc5ba93692efa800f187ffa2cf36d872$"
}
}
Binary file added examples/pixi/assets/assets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
207 changes: 207 additions & 0 deletions examples/pixi/assets/assets.tps
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8"?>
<data version="1.0">
<struct type="Settings">
<key>fileFormatVersion</key>
<int>3</int>
<key>texturePackerVersion</key>
<string>3.2.1</string>
<key>autoSDSettings</key>
<array>
<struct type="AutoSDSettings">
<key>scale</key>
<double>1</double>
<key>extension</key>
<string>@2x</string>
<key>spriteFilter</key>
<string></string>
<key>acceptFractionalValues</key>
<false/>
<key>maxTextureSize</key>
<QSize>
<key>width</key>
<int>-1</int>
<key>height</key>
<int>-1</int>
</QSize>
</struct>
<struct type="AutoSDSettings">
<key>scale</key>
<double>0.5</double>
<key>extension</key>
<string></string>
<key>spriteFilter</key>
<string></string>
<key>acceptFractionalValues</key>
<false/>
<key>maxTextureSize</key>
<QSize>
<key>width</key>
<int>2048</int>
<key>height</key>
<int>2048</int>
</QSize>
</struct>
</array>
<key>allowRotation</key>
<true/>
<key>premultiplyAlpha</key>
<false/>
<key>shapeDebug</key>
<false/>
<key>dpi</key>
<uint>72</uint>
<key>dataFormat</key>
<string>json</string>
<key>textureFileName</key>
<filename>assets{v}.png</filename>
<key>flipPVR</key>
<false/>
<key>ditherType</key>
<enum type="SettingsBase::DitherType">NearestNeighbour</enum>
<key>backgroundColor</key>
<uint>0</uint>
<key>libGdx</key>
<struct type="LibGDX">
<key>filtering</key>
<struct type="LibGDXFiltering">
<key>x</key>
<enum type="LibGDXFiltering::Filtering">Linear</enum>
<key>y</key>
<enum type="LibGDXFiltering::Filtering">Linear</enum>
</struct>
</struct>
<key>shapePadding</key>
<uint>2</uint>
<key>jpgQuality</key>
<uint>80</uint>
<key>pngOptimizationLevel</key>
<uint>0</uint>
<key>textureSubPath</key>
<string></string>
<key>textureFormat</key>
<enum type="SettingsBase::TextureFormat">png</enum>
<key>borderPadding</key>
<uint>2</uint>
<key>maxTextureSize</key>
<QSize>
<key>width</key>
<int>2048</int>
<key>height</key>
<int>2048</int>
</QSize>
<key>fixedTextureSize</key>
<QSize>
<key>width</key>
<int>-1</int>
<key>height</key>
<int>-1</int>
</QSize>
<key>reduceBorderArtifacts</key>
<false/>
<key>algorithmSettings</key>
<struct type="AlgorithmSettings">
<key>algorithm</key>
<enum type="AlgorithmSettings::AlgorithmId">Basic</enum>
<key>freeSizeMode</key>
<enum type="AlgorithmSettings::AlgorithmFreeSizeMode">Best</enum>
<key>sizeConstraints</key>
<enum type="AlgorithmSettings::SizeConstraints">POT</enum>
<key>forceSquared</key>
<false/>
<key>forceWordAligned</key>
<false/>
<key>maxRects</key>
<struct type="AlgorithmMaxRectsSettings">
<key>heuristic</key>
<enum type="AlgorithmMaxRectsSettings::Heuristic">Best</enum>
</struct>
<key>basic</key>
<struct type="AlgorithmBasicSettings">
<key>sortBy</key>
<enum type="AlgorithmBasicSettings::SortBy">Height</enum>
<key>order</key>
<enum type="AlgorithmBasicSettings::Order">Descending</enum>
</struct>
</struct>
<key>andEngine</key>
<struct type="AndEngine">
<key>minFilter</key>
<enum type="AndEngine::MinFilter">Linear</enum>
<key>packageName</key>
<string>Texture</string>
<key>wrap</key>
<struct type="AndEngineWrap">
<key>s</key>
<enum type="AndEngineWrap::Wrap">Clamp</enum>
<key>t</key>
<enum type="AndEngineWrap::Wrap">Clamp</enum>
</struct>
<key>magFilter</key>
<enum type="AndEngine::MagFilter">MagLinear</enum>
</struct>
<key>dataFileNames</key>
<map type="GFileNameMap">
<key>data</key>
<struct type="DataFile">
<key>name</key>
<filename>assets{v}.json</filename>
</struct>
<key>java</key>
<struct type="DataFile">
<key>name</key>
<filename>assets{v}.java</filename>
</struct>
</map>
<key>multiPack</key>
<false/>
<key>forceIdenticalLayout</key>
<true/>
<key>outputFormat</key>
<enum type="SettingsBase::OutputFormat">RGBA8888</enum>
<key>contentProtection</key>
<struct type="ContentProtection">
<key>key</key>
<string></string>
</struct>
<key>autoAliasEnabled</key>
<true/>
<key>trimSpriteNames</key>
<false/>
<key>cleanTransparentPixels</key>
<true/>
<key>globalSpriteSettings</key>
<struct type="SpriteSettings">
<key>scale</key>
<double>1</double>
<key>scaleMode</key>
<enum type="ScaleMode">Smooth</enum>
<key>innerPadding</key>
<uint>0</uint>
<key>extrude</key>
<uint>0</uint>
<key>trimThreshold</key>
<uint>1</uint>
<key>trimMode</key>
<enum type="SpriteSettings::TrimMode">Trim</enum>
<key>heuristicMask</key>
<false/>
</struct>
<key>fileList</key>
<array>
<filename>original/leaf_0.png</filename>
<filename>original/leaf_1.png</filename>
<filename>original/leaf_2.png</filename>
<filename>original/leaf_3.png</filename>
</array>
<key>ignoreFileList</key>
<array/>
<key>replaceList</key>
<array/>
<key>ignoredWarnings</key>
<array/>
<key>commonDivisorX</key>
<uint>1</uint>
<key>commonDivisorY</key>
<uint>1</uint>
</struct>
</data>
44 changes: 44 additions & 0 deletions examples/pixi/assets/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{"frames": {

"leaf_0.png":
{
"frame": {"x":4,"y":236,"w":176,"h":112},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":14,"w":176,"h":112},
"sourceSize": {"w":180,"h":140}
},
"leaf_1.png":
{
"frame": {"x":4,"y":4,"w":176,"h":112},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":14,"w":176,"h":112},
"sourceSize": {"w":180,"h":140}
},
"leaf_2.png":
{
"frame": {"x":4,"y":120,"w":176,"h":112},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":14,"w":176,"h":112},
"sourceSize": {"w":180,"h":140}
},
"leaf_3.png":
{
"frame": {"x":4,"y":352,"w":86,"h":36},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":2,"w":86,"h":36},
"sourceSize": {"w":90,"h":40}
}},
"meta": {
"app": "http://www.codeandweb.com/texturepacker ",
"version": "1.0",
"image": "[email protected]",
"format": "RGBA8888",
"size": {"w":256,"h":512},
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:7fcb326420bd819c9c9637be8d9abceb:9ccc6a4e8c3fe486115909d9b9320826:fc5ba93692efa800f187ffa2cf36d872$"
}
}
Binary file added examples/pixi/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/pixi/assets/original/leaf_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/pixi/assets/original/leaf_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/pixi/assets/original/leaf_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/pixi/assets/original/leaf_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions examples/pixi/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<style type="text/css">
body,html {
height: 100%;
margin: 0;
padding: 0;
background-color: #000000;
}
canvas {

display:block;
position: absolute; z-index: 0;
}
</style>
<title>spp for pixi</title>
<script src="libs/jquery-1.8.0.min.js"></script>
<script src="libs/stats.min.js"></script>
<script src="libs/pixi.js"></script>
<script src="../../build/spp.min.js"></script>
<script src="Main.js"></script>
</head>
<body>
<canvas>Your borwser does not suport html5 canvans!</canvas>
</body>
</html>
2 changes: 2 additions & 0 deletions examples/pixi/libs/jquery-1.8.0.min.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions examples/pixi/libs/pixi.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions examples/pixi/libs/stats.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2582c6d

Please sign in to comment.