<commit_before>Pixi Particles
=================

A particle system library for the [PixiJS](https://github.com/GoodBoyDigital/pixi.js) library. Also, we created an [interactive particle editor](http://cloudkidstudio.github.io/PixiParticlesEditor/) to design and preview custom particle emitters which utilitze PixiParticles. 

##Sample Usage

Please see the examples for various pre-made particle configurations.

```js

// Create a new emitter
var emitter = new cloudkid.Emitter(

  // The DisplayObjectContainer to put the emitter in
  // if using blend modes, it's important to put this
  // on top of a bitmap, and not use the PIXI.Stage
  container,
  
  // The collection of particle images to use
  [PIXI.Texture.fromImage('image.jpg')],
  
	// Emitter configuration, edit this to change the look
	// of the emitter
	{
		"alpha": {
			"start": 0.8,
			"end": 0.1
		},
		"scale": {
			"start": 1,
			"end": 0.3
		},
		"color": {
			"start": "fb1010",
			"end": "f5b830"
		},
		"speed": {
			"start": 200,
			"end": 100
		},
		"startRotation": {
			"min": 0,
			"max": 360
		},
		"rotationSpeed": {
			"min": 0,
			"max": 0
		},
		"lifetime": {
			"min": 0.5,
			"max": 0.5
		},
		"frequency": 0.008,
		"emitterLifetime": 0.31,
		"maxParticles": 1000,
		"pos": {
			"x": 0,
			"y": 0
		},
		"addAtBack": false,
		"spawnType": "circle",
		"spawnCircle": {
			"x": 0,
			"y": 0,
			"r": 10
		}
	}
);

// Calculate the current time
var elapsed = Date.now();
		
// Update function every frame
var update = function(){
			
	// Update the next frame
	requestAnimFrame(update);

	var now = Date.now();
	
	// The emitter requires the elapsed
	// number of seconds since the last update
	emitter.update((now - elapsed) * 0.001);
	elapsed = now;
	
	// Should re-render the PIXI Stage
	// renderer.render(stage);
};

// Start emitting
emitter.emit = true;

// Start the update
update();

```

##Documentation##

http://cloudkidstudio.github.io/PixiParticles/

##Installation##

PixiParticles can be installed using Bower or NPM.

```bash
bower install pixi-particles
```

```bash
npm install pixi-particles
```

##Use in Haxe##

Externs for Haxe have been added to [adireddy's Pixi externs](https://github.com/adireddy/haxe-pixi)

##License##

Copyright (c) 2014 [CloudKid](http://github.com/cloudkidstudio)

Released under the MIT License.
<commit_msg>Added badges<commit_after>Pixi Particles [![Build Status](https://travis-ci.org/CloudKidStudio/PixiParticles.svg)](https://travis-ci.org/CloudKidStudio/PixiParticles) [![Dependency Status](https://david-dm.org/CloudKidStudio/PixiParticles.svg?style=flat)](https://david-dm.org/CloudKidStudio/PixiParticles) [![GitHub version](https://badge.fury.io/gh/CloudKidStudio%2FPixiParticles.svg)](https://github.com/CloudKidStudio/PixiParticles/releases/latest)
=================

A particle system library for the [PixiJS](https://github.com/GoodBoyDigital/pixi.js) library. Also, we created an [interactive particle editor](http://cloudkidstudio.github.io/PixiParticlesEditor/) to design and preview custom particle emitters which utilitze PixiParticles. 

##Sample Usage

Please see the examples for various pre-made particle configurations.

```js

// Create a new emitter
var emitter = new cloudkid.Emitter(

  // The DisplayObjectContainer to put the emitter in
  // if using blend modes, it's important to put this
  // on top of a bitmap, and not use the PIXI.Stage
  container,
  
  // The collection of particle images to use
  [PIXI.Texture.fromImage('image.jpg')],
  
	// Emitter configuration, edit this to change the look
	// of the emitter
	{
		"alpha": {
			"start": 0.8,
			"end": 0.1
		},
		"scale": {
			"start": 1,
			"end": 0.3
		},
		"color": {
			"start": "fb1010",
			"end": "f5b830"
		},
		"speed": {
			"start": 200,
			"end": 100
		},
		"startRotation": {
			"min": 0,
			"max": 360
		},
		"rotationSpeed": {
			"min": 0,
			"max": 0
		},
		"lifetime": {
			"min": 0.5,
			"max": 0.5
		},
		"frequency": 0.008,
		"emitterLifetime": 0.31,
		"maxParticles": 1000,
		"pos": {
			"x": 0,
			"y": 0
		},
		"addAtBack": false,
		"spawnType": "circle",
		"spawnCircle": {
			"x": 0,
			"y": 0,
			"r": 10
		}
	}
);

// Calculate the current time
var elapsed = Date.now();
		
// Update function every frame
var update = function(){
			
	// Update the next frame
	requestAnimFrame(update);

	var now = Date.now();
	
	// The emitter requires the elapsed
	// number of seconds since the last update
	emitter.update((now - elapsed) * 0.001);
	elapsed = now;
	
	// Should re-render the PIXI Stage
	// renderer.render(stage);
};

// Start emitting
emitter.emit = true;

// Start the update
update();

```

##Documentation##

http://cloudkidstudio.github.io/PixiParticles/

##Installation##

PixiParticles can be installed using Bower or NPM.

```bash
bower install pixi-particles
```

```bash
npm install pixi-particles
```

##Use in Haxe##

Externs for Haxe have been added to [adireddy's Pixi externs](https://github.com/adireddy/haxe-pixi)

##License##

Copyright (c) 2014 [CloudKid](http://github.com/cloudkidstudio)

Released under the MIT License.

{'fraction_non_alphanumeric': 0.15827619980411362, 'fraction_numerical': 0.022135161606268366, 'mean_word_length': 3.44, 'pattern_counts': {'":': 66, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4241038', 'n_tokens_mistral': 2118, 'n_tokens_neox': 1780, 'n_words': 497}