From bd578275ba2485d5de0561906fe82f0b94801ccd Mon Sep 17 00:00:00 2001 From: drawcall Date: Wed, 21 Oct 2020 12:31:00 +0800 Subject: [PATCH] [refactor]update v4.2.1 --- build/proton.js | 49 +++++++++++++++++++++++++++++++++++++++++++-- build/proton.js.map | 2 +- build/proton.min.js | 2 +- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/build/proton.js b/build/proton.js index ef63a8e..c047762 100755 --- a/build/proton.js +++ b/build/proton.js @@ -1763,7 +1763,11 @@ var Vector2D = function () { return Vector2D; }(); +/** @typedef {import('../behaviour/Behaviour')} Behaviour */ +/** @typedef {import('../math/Vector2D')} Vector2D */ +/** @typedef {import('../utils/Rgb')} Rgb */ var Particle = function () { + /** * the Particle class * @@ -1772,8 +1776,27 @@ var Particle = function () { * @param {Object} pObj the parameters object; * for example {life:3,dead:false} */ + + + /** @type {Vector2D} */ + + + /** @type {Vector2D} */ + + + /** @type {object} */ + + /** @type string */ function Particle(conf) { classCallCheck(this, Particle); + this.id = ''; + this.old = {}; + this.data = {}; + this.behaviours = []; + this.p = []; + this.v = []; + this.a = []; + this.rgb = {}; /** * The particle's id; @@ -1798,6 +1821,18 @@ var Particle = function () { conf && Util.setProp(this, conf); } + /** @type {Rgb} */ + + + /** @type {Vector2D} */ + + + /** @type {Behaviour[]} */ + + + /** @type {{p:Vector2D,v:Vector2D,a:Vector2D}} */ + + createClass(Particle, [{ key: "getDirection", value: function getDirection() { @@ -1862,6 +1897,11 @@ var Particle = function () { this.behaviours[i] && this.behaviours[i].applyBehaviour(this, time, index); } } + + /** + * @param {Behaviour} behaviour + */ + }, { key: "addBehaviour", value: function addBehaviour(behaviour) { @@ -1870,6 +1910,11 @@ var Particle = function () { if (behaviour.hasOwnProperty("parents")) behaviour.parents.push(this); behaviour.initialize(this); } + + /** + * @param {Behaviour[]} behaviours + */ + }, { key: "addBehaviours", value: function addBehaviours(behaviours) { @@ -5833,7 +5878,7 @@ var Debug = { }; // namespace -Proton.Particle = Proton.P = Particle; +Proton.Particle = Particle; Proton.Pool = Pool; Proton.Util = Util; @@ -5867,7 +5912,7 @@ Proton.RandomDrift = Proton.RD = RandomDrift; Proton.Gravity = Proton.G = Gravity; Proton.Collision = Collision; Proton.CrossZone = CrossZone; -Proton.Alpha = Proton.A = Alpha; +Proton.Alpha = Alpha; Proton.Scale = Proton.S = Scale; Proton.Rotate = Rotate; Proton.Color = Color; diff --git a/build/proton.js.map b/build/proton.js.map index 5f06324..27dbb3b 100755 --- a/build/proton.js.map +++ b/build/proton.js.map @@ -1 +1 @@ -{"version":3,"file":"proton.js","sources":["../src/math/MathUtil.js","../src/math/Span.js","../src/utils/WebGLUtil.js","../src/utils/DomUtil.js","../src/utils/ImgUtil.js","../src/utils/Util.js","../src/utils/Puid.js","../src/core/Pool.js","../src/debug/Stats.js","../src/events/EventDispatcher.js","../src/math/Integration.js","../src/core/Proton.js","../src/utils/Rgb.js","../src/math/ease.js","../src/math/Vector2D.js","../src/core/Particle.js","../src/utils/ColorUtil.js","../src/math/Polar2D.js","../src/math/Mat3.js","../src/math/ArraySpan.js","../src/math/Rectangle.js","../src/initialize/Rate.js","../src/initialize/Initialize.js","../src/initialize/Life.js","../src/zone/Zone.js","../src/zone/PointZone.js","../src/initialize/Position.js","../src/initialize/Velocity.js","../src/initialize/Mass.js","../src/initialize/Radius.js","../src/initialize/Body.js","../src/behaviour/Behaviour.js","../src/behaviour/Force.js","../src/behaviour/Attraction.js","../src/behaviour/RandomDrift.js","../src/behaviour/Gravity.js","../src/behaviour/Collision.js","../src/behaviour/CrossZone.js","../src/behaviour/Alpha.js","../src/behaviour/Scale.js","../src/behaviour/Rotate.js","../src/behaviour/Color.js","../src/behaviour/Cyclone.js","../src/behaviour/Repulsion.js","../src/behaviour/GravityWell.js","../src/initialize/InitializeUtil.js","../src/emitter/Emitter.js","../src/emitter/BehaviourEmitter.js","../src/emitter/FollowEmitter.js","../src/render/BaseRenderer.js","../src/render/CanvasRenderer.js","../src/render/DomRenderer.js","../src/render/EaselRenderer.js","../src/render/PixelRenderer.js","../src/render/PixiRenderer.js","../src/utils/MStack.js","../src/render/WebGLRenderer.js","../src/render/CustomRenderer.js","../src/zone/LineZone.js","../src/zone/CircleZone.js","../src/zone/RectZone.js","../src/zone/ImageZone.js","../src/debug/Debug.js","../src/index.js"],"sourcesContent":["const PI = 3.1415926;\nconst INFINITY = Infinity;\n\nconst MathUtil = {\n PI: PI,\n PIx2: PI * 2,\n PI_2: PI / 2,\n PI_180: PI / 180,\n N180_PI: 180 / PI,\n Infinity: -999,\n\n isInfinity(num) {\n return num === this.Infinity || num === INFINITY;\n },\n\n randomAToB(a, b, isInt = false) {\n if (!isInt) return a + Math.random() * (b - a);\n else return Math.floor(Math.random() * (b - a)) + a;\n },\n\n randomFloating(center, f, isInt) {\n return this.randomAToB(center - f, center + f, isInt);\n },\n\n randomColor() {\n return (\n \"#\" +\n (\"00000\" + ((Math.random() * 0x1000000) << 0).toString(16)).slice(-6)\n );\n },\n\n randomZone(display) {},\n\n floor(num, k = 4) {\n const digits = Math.pow(10, k);\n return Math.floor(num * digits) / digits;\n },\n\n degreeTransform(a) {\n return (a * PI) / 180;\n },\n\n toColor16(num) {\n return `#${num.toString(16)}`;\n }\n};\n\nexport default MathUtil;\n","import Util from \"../utils/Util\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class Span {\n constructor(a, b, center) {\n if (Util.isArray(a)) {\n this.isArray = true;\n this.a = a;\n } else {\n this.isArray = false;\n this.a = Util.initValue(a, 1);\n this.b = Util.initValue(b, this.a);\n this.center = Util.initValue(center, false);\n }\n }\n\n getValue(isInt = false) {\n if (this.isArray) {\n return Util.getRandFromArray(this.a);\n } else {\n if (!this.center) {\n return MathUtil.randomAToB(this.a, this.b, isInt);\n } else {\n return MathUtil.randomFloating(this.a, this.b, isInt);\n }\n }\n }\n\n /**\n * Returns a new Span object\n *\n * @memberof Proton#Proton.Util\n * @method setSpanValue\n *\n * @todo a, b and c should be 'Mixed' or 'Number'?\n *\n * @param {Mixed | Span} a\n * @param {Mixed} b\n * @param {Mixed} c\n *\n * @return {Span}\n */\n static setSpanValue(a, b, c) {\n if (a instanceof Span) {\n return a;\n } else {\n if (b === undefined) {\n return new Span(a);\n } else {\n if (c === undefined) return new Span(a, b);\n else return new Span(a, b, c);\n }\n }\n }\n\n /**\n * Returns the value from a Span, if the param is not a Span it will return the given parameter\n *\n * @memberof Proton#Proton.Util\n * @method getValue\n *\n * @param {Mixed | Span} pan\n *\n * @return {Mixed} the value of Span OR the parameter if it is not a Span\n */\n static getSpanValue(pan) {\n return pan instanceof Span ? pan.getValue() : pan;\n }\n}\n","export default {\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method ipot\n *\n * @todo add description\n * @todo add length description\n *\n * @param {Number} length\n *\n * @return {Boolean}\n */\n ipot(length) {\n return (length & (length - 1)) === 0;\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method nhpot\n *\n * @todo add description\n * @todo add length description\n *\n * @param {Number} length\n *\n * @return {Number}\n */\n nhpot(length) {\n --length;\n for (let i = 1; i < 32; i <<= 1) {\n length = length | (length >> i);\n }\n\n return length + 1;\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method makeTranslation\n *\n * @todo add description\n * @todo add tx, ty description\n * @todo add return description\n *\n * @param {Number} tx either 0 or 1\n * @param {Number} ty either 0 or 1\n *\n * @return {Object}\n */\n makeTranslation(tx, ty) {\n return [1, 0, 0, 0, 1, 0, tx, ty, 1];\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method makeRotation\n *\n * @todo add description\n * @todo add return description\n *\n * @param {Number} angleInRadians\n *\n * @return {Object}\n */\n makeRotation(angleInRadians) {\n let c = Math.cos(angleInRadians);\n let s = Math.sin(angleInRadians);\n\n return [c, -s, 0, s, c, 0, 0, 0, 1];\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method makeScale\n *\n * @todo add description\n * @todo add tx, ty description\n * @todo add return description\n *\n * @param {Number} sx either 0 or 1\n * @param {Number} sy either 0 or 1\n *\n * @return {Object}\n */\n makeScale(sx, sy) {\n return [sx, 0, 0, 0, sy, 0, 0, 0, 1];\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method matrixMultiply\n *\n * @todo add description\n * @todo add a, b description\n * @todo add return description\n *\n * @param {Object} a\n * @param {Object} b\n *\n * @return {Object}\n */\n matrixMultiply(a, b) {\n let a00 = a[0 * 3 + 0];\n let a01 = a[0 * 3 + 1];\n let a02 = a[0 * 3 + 2];\n let a10 = a[1 * 3 + 0];\n let a11 = a[1 * 3 + 1];\n let a12 = a[1 * 3 + 2];\n let a20 = a[2 * 3 + 0];\n let a21 = a[2 * 3 + 1];\n let a22 = a[2 * 3 + 2];\n let b00 = b[0 * 3 + 0];\n let b01 = b[0 * 3 + 1];\n let b02 = b[0 * 3 + 2];\n let b10 = b[1 * 3 + 0];\n let b11 = b[1 * 3 + 1];\n let b12 = b[1 * 3 + 2];\n let b20 = b[2 * 3 + 0];\n let b21 = b[2 * 3 + 1];\n let b22 = b[2 * 3 + 2];\n\n return [\n a00 * b00 + a01 * b10 + a02 * b20,\n a00 * b01 + a01 * b11 + a02 * b21,\n a00 * b02 + a01 * b12 + a02 * b22,\n a10 * b00 + a11 * b10 + a12 * b20,\n a10 * b01 + a11 * b11 + a12 * b21,\n a10 * b02 + a11 * b12 + a12 * b22,\n a20 * b00 + a21 * b10 + a22 * b20,\n a20 * b01 + a21 * b11 + a22 * b21,\n a20 * b02 + a21 * b12 + a22 * b22\n ];\n }\n};\n","export default {\n /**\n * Creates and returns a new canvas. The opacity is by default set to 0\n *\n * @memberof Proton#Proton.DomUtil\n * @method createCanvas\n *\n * @param {String} $id the canvas' id\n * @param {Number} $width the canvas' width\n * @param {Number} $height the canvas' height\n * @param {String} [$position=absolute] the canvas' position, default is 'absolute'\n *\n * @return {Object}\n */\n createCanvas(id, width, height, position = \"absolute\") {\n const dom = document.createElement(\"canvas\");\n\n dom.id = id;\n dom.width = width;\n dom.height = height;\n dom.style.opacity = 0;\n dom.style.position = position;\n this.transform(dom, -500, -500, 0, 0);\n\n return dom;\n },\n\n createDiv(id, width, height) {\n const dom = document.createElement(\"div\");\n\n dom.id = id;\n dom.style.position = \"absolute\";\n this.resize(dom, width, height);\n\n return dom;\n },\n\n resize(dom, width, height) {\n dom.style.width = width + \"px\";\n dom.style.height = height + \"px\";\n dom.style.marginLeft = -width / 2 + \"px\";\n dom.style.marginTop = -height / 2 + \"px\";\n },\n\n /**\n * Adds a transform: translate(), scale(), rotate() to a given div dom for all browsers\n *\n * @memberof Proton#Proton.DomUtil\n * @method transform\n *\n * @param {HTMLDivElement} div\n * @param {Number} $x\n * @param {Number} $y\n * @param {Number} $scale\n * @param {Number} $rotate\n */\n transform(div, x, y, scale, rotate) {\n div.style.willChange = \"transform\";\n const transform = `translate(${x}px, ${y}px) scale(${scale}) rotate(${rotate}deg)`;\n this.css3(div, \"transform\", transform);\n },\n\n transform3d(div, x, y, scale, rotate) {\n div.style.willChange = \"transform\";\n const transform = `translate3d(${x}px, ${y}px, 0) scale(${scale}) rotate(${rotate}deg)`;\n this.css3(div, \"backfaceVisibility\", \"hidden\");\n this.css3(div, \"transform\", transform);\n },\n\n css3(div, key, val) {\n const bkey = key.charAt(0).toUpperCase() + key.substr(1);\n\n div.style[`Webkit${bkey}`] = val;\n div.style[`Moz${bkey}`] = val;\n div.style[`O${bkey}`] = val;\n div.style[`ms${bkey}`] = val;\n div.style[`${key}`] = val;\n }\n};\n","import WebGLUtil from \"./WebGLUtil\";\nimport DomUtil from \"./DomUtil\";\n\nconst imgsCache = {};\nconst canvasCache = {};\nlet canvasId = 0;\n\nexport default {\n /**\n * This will get the image data. It could be necessary to create a Proton.Zone.\n *\n * @memberof Proton#Proton.Util\n * @method getImageData\n *\n * @param {HTMLCanvasElement} context any canvas, must be a 2dContext 'canvas.getContext('2d')'\n * @param {Object} image could be any dom image, e.g. document.getElementById('thisIsAnImgTag');\n * @param {Proton.Rectangle} rect\n */\n getImageData(context, image, rect) {\n context.drawImage(image, rect.x, rect.y);\n const imagedata = context.getImageData(\n rect.x,\n rect.y,\n rect.width,\n rect.height\n );\n context.clearRect(rect.x, rect.y, rect.width, rect.height);\n\n return imagedata;\n },\n\n /**\n * @memberof Proton#Proton.Util\n * @method getImgFromCache\n *\n * @todo add description\n * @todo describe func\n *\n * @param {Mixed} img\n * @param {Proton.Particle} particle\n * @param {Boolean} drawCanvas set to true if a canvas should be saved into particle.data.canvas\n * @param {Boolean} func\n */\n getImgFromCache(img, callback, param) {\n const src = typeof img === \"string\" ? img : img.src;\n\n if (imgsCache[src]) {\n callback(imgsCache[src], param);\n } else {\n const image = new Image();\n image.onload = e => {\n imgsCache[src] = e.target;\n callback(imgsCache[src], param);\n };\n\n image.src = src;\n }\n },\n\n getCanvasFromCache(img, callback, param) {\n const src = img.src;\n\n if (!canvasCache[src]) {\n const width = WebGLUtil.nhpot(img.width);\n const height = WebGLUtil.nhpot(img.height);\n\n const canvas = DomUtil.createCanvas(\n `proton_canvas_cache_${++canvasId}`,\n width,\n height\n );\n const context = canvas.getContext(\"2d\");\n context.drawImage(img, 0, 0, img.width, img.height);\n\n canvasCache[src] = canvas;\n }\n\n callback && callback(canvasCache[src], param);\n\n return canvasCache[src];\n }\n};\n","import Span from \"../math/Span\";\nimport ImgUtil from \"./ImgUtil\";\n\nexport default {\n /**\n * Returns the default if the value is null or undefined\n *\n * @memberof Proton#Proton.Util\n * @method initValue\n *\n * @param {Mixed} value a specific value, could be everything but null or undefined\n * @param {Mixed} defaults the default if the value is null or undefined\n */\n initValue(value, defaults) {\n value = value !== null && value !== undefined ? value : defaults;\n return value;\n },\n\n /**\n * Checks if the value is a valid array\n *\n * @memberof Proton#Proton.Util\n * @method isArray\n *\n * @param {Array} value Any array\n *\n * @returns {Boolean}\n */\n isArray(value) {\n return Object.prototype.toString.call(value) === \"[object Array]\";\n },\n\n /**\n * Destroyes the given array\n *\n * @memberof Proton#Proton.Util\n * @method emptyArray\n *\n * @param {Array} array Any array\n */\n emptyArray(arr) {\n if (arr) arr.length = 0;\n },\n\n toArray(arr) {\n return this.isArray(arr) ? arr : [arr];\n },\n\n getRandFromArray(arr) {\n if (!arr) return null;\n return arr[Math.floor(arr.length * Math.random())];\n },\n\n /**\n * Destroyes the given object\n *\n * @memberof Proton#Proton.Util\n * @method emptyObject\n *\n * @param {Object} obj Any object\n */\n emptyObject(obj, ignore = null) {\n for (let key in obj) {\n if (ignore && ignore.indexOf(key) > -1) continue;\n delete obj[key];\n }\n },\n\n /**\n * Makes an instance of a class and binds the given array\n *\n * @memberof Proton#Proton.Util\n * @method classApply\n *\n * @param {Function} constructor A class to make an instance from\n * @param {Array} [args] Any array to bind it to the constructor\n *\n * @return {Object} The instance of constructor, optionally bind with args\n */\n classApply(constructor, args = null) {\n if (!args) {\n return new constructor();\n } else {\n const FactoryFunc = constructor.bind.apply(\n constructor,\n [null].concat(args)\n );\n return new FactoryFunc();\n }\n },\n\n /**\n * @memberof Proton#Proton.Util\n * @method setVectorVal\n *\n * @todo add description for param `target`\n * @todo add description for param `conf`\n * @todo add description for function\n *\n * @param {Object} target\n * @param {Object} conf\n */\n setVectorVal(particle, conf = null) {\n if (!conf) return;\n\n if (this.hasProp(conf, \"x\")) particle.p.x = conf[\"x\"];\n if (this.hasProp(conf, \"y\")) particle.p.y = conf[\"y\"];\n\n if (this.hasProp(conf, \"vx\")) particle.v.x = conf[\"vx\"];\n if (this.hasProp(conf, \"vy\")) particle.v.y = conf[\"vy\"];\n\n if (this.hasProp(conf, \"ax\")) particle.a.x = conf[\"ax\"];\n if (this.hasProp(conf, \"ay\")) particle.a.y = conf[\"ay\"];\n\n if (this.hasProp(conf, \"p\")) particle.p.copy(conf[\"p\"]);\n if (this.hasProp(conf, \"v\")) particle.v.copy(conf[\"v\"]);\n if (this.hasProp(conf, \"a\")) particle.a.copy(conf[\"a\"]);\n\n if (this.hasProp(conf, \"position\")) particle.p.copy(conf[\"position\"]);\n if (this.hasProp(conf, \"velocity\")) particle.v.copy(conf[\"velocity\"]);\n if (this.hasProp(conf, \"accelerate\")) particle.a.copy(conf[\"accelerate\"]);\n },\n\n hasProp(target, key) {\n if (!target) return false;\n return target[key] !== undefined;\n // return obj.hasOwnProperty(key);\n },\n\n /**\n * set the prototype in a given prototypeObject\n *\n * @memberof Proton#Proton.Util\n * @method setProp\n *\n * @todo add description for param `target`\n * @todo translate desription from chinese to english\n *\n * @param {Object} target\n * @param {Object} prototypeObject An object of single prototypes\n *\n * @return {Object} target\n */\n setProp(target, props) {\n for (let prop in props) {\n if (target.hasOwnProperty(prop)) {\n target[prop] = Span.getSpanValue(props[prop]);\n }\n }\n\n return target;\n },\n\n /**\n * This will get the image data. It could be necessary to create a Proton.Zone.\n *\n * @memberof Proton#Proton.Util\n * @method getImageData\n *\n * @param {HTMLCanvasElement} context any canvas, must be a 2dContext 'canvas.getContext('2d')'\n * @param {Object} image could be any dom image, e.g. document.getElementById('thisIsAnImgTag');\n * @param {Proton.Rectangle} rect\n */\n getImageData(context, image, rect) {\n return ImgUtil.getImageData(context, image, rect);\n },\n\n destroyAll(arr, param = null) {\n let i = arr.length;\n\n while (i--) {\n try {\n arr[i].destroy(param);\n } catch (e) {}\n\n delete arr[i];\n }\n\n arr.length = 0;\n },\n\n assign(target, source) {\n if (typeof Object.assign !== \"function\") {\n for (let key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n\n return target;\n } else {\n return Object.assign(target, source);\n }\n }\n};\n","const idsMap = {};\n\nconst Puid = {\n _index: 0,\n _cache: {},\n\n id(type) {\n if (idsMap[type] === undefined || idsMap[type] === null) idsMap[type] = 0;\n return `${type}_${idsMap[type]++}`;\n },\n\n getId(target) {\n let uid = this.getIdFromCache(target);\n if (uid) return uid;\n\n uid = `PUID_${this._index++}`;\n this._cache[uid] = target;\n\n return uid;\n },\n\n getIdFromCache(target) {\n let obj, id;\n\n for (id in this._cache) {\n obj = this._cache[id];\n\n if (obj === target) return id;\n if (this.isBody(obj, target) && obj.src === target.src) return id;\n }\n\n return null;\n },\n\n isBody(obj, target) {\n return (\n typeof obj === \"object\" &&\n typeof target === \"object\" &&\n obj.isInner &&\n target.isInner\n );\n },\n\n getTarget(uid) {\n return this._cache[uid];\n }\n};\n\nexport default Puid;\n","/**\n * Pool is the cache pool of the proton engine, it is very important.\n *\n * get(target, params, uid)\n * Class\n * uid = Puid.getId -> Puid save target cache\n * target.__puid = uid\n *\n * body\n * uid = Puid.getId -> Puid save target cache\n *\n *\n * expire(target)\n * cache[target.__puid] push target\n *\n */\nimport Util from \"../utils/Util\";\nimport Puid from \"../utils/Puid\";\n\nexport default class Pool {\n /**\n * @memberof! Proton#\n * @constructor\n * @alias Proton.Pool\n *\n * @todo add description\n * @todo add description of properties\n *\n * @property {Number} total\n * @property {Object} cache\n */\n constructor(num) {\n this.total = 0;\n this.cache = {};\n }\n\n /**\n * @todo add description\n *\n * @method get\n * @memberof Proton#Proton.Pool\n *\n * @param {Object|Function} target\n * @param {Object} [params] just add if `target` is a function\n *\n * @return {Object}\n */\n get(target, params, uid) {\n let p;\n uid = uid || target.__puid || Puid.getId(target);\n\n if (this.cache[uid] && this.cache[uid].length > 0) {\n p = this.cache[uid].pop();\n } else {\n p = this.createOrClone(target, params);\n }\n\n p.__puid = target.__puid || uid;\n return p;\n }\n\n /**\n * @todo add description\n *\n * @method set\n * @memberof Proton#Proton.Pool\n *\n * @param {Object} target\n *\n * @return {Object}\n */\n expire(target) {\n return this.getCache(target.__puid).push(target);\n }\n\n /**\n * Creates a new class instance\n *\n * @todo add more documentation\n *\n * @method create\n * @memberof Proton#Proton.Pool\n *\n * @param {Object|Function} target any Object or Function\n * @param {Object} [params] just add if `target` is a function\n *\n * @return {Object}\n */\n createOrClone(target, params) {\n this.total++;\n\n if (this.create) {\n return this.create(target, params);\n } else if (typeof target === \"function\") {\n return Util.classApply(target, params);\n } else {\n return target.clone();\n }\n }\n\n /**\n * @todo add description - what is in the cache?\n *\n * @method getCount\n * @memberof Proton#Proton.Pool\n *\n * @return {Number}\n */\n getCount() {\n let count = 0;\n for (let id in this.cache) count += this.cache[id].length;\n return count++;\n }\n\n /**\n * Destroyes all items from Pool.cache\n *\n * @method destroy\n * @memberof Proton#Proton.Pool\n */\n destroy() {\n for (let id in this.cache) {\n this.cache[id].length = 0;\n delete this.cache[id];\n }\n }\n\n /**\n * Returns Pool.cache\n *\n * @method getCache\n * @memberof Proton#Proton.Pool\n * @private\n *\n * @param {Number} uid the unique id\n *\n * @return {Object}\n */\n getCache(uid = \"default\") {\n if (!this.cache[uid]) this.cache[uid] = [];\n return this.cache[uid];\n }\n}\n","export default class Stats {\n constructor(proton) {\n this.proton = proton;\n this.container = null;\n this.type = 1;\n\n this.emitterIndex = 0;\n this.rendererIndex = 0;\n }\n\n update(style, body) {\n this.add(style, body);\n\n const emitter = this.getEmitter();\n const renderer = this.getRenderer();\n let str = \"\";\n\n switch (this.type) {\n case 2:\n str += \"emitter:\" + this.proton.emitters.length + \"
\";\n if (emitter) str += \"em speed:\" + emitter.emitSpeed + \"
\";\n if (emitter) str += \"pos:\" + this.getEmitterPos(emitter);\n break;\n\n case 3:\n if (emitter)\n str += \"initializes:\" + emitter.initializes.length + \"
\";\n if (emitter)\n str +=\n '' +\n this.concatArr(emitter.initializes) +\n \"
\";\n if (emitter) str += \"behaviours:\" + emitter.behaviours.length + \"
\";\n if (emitter)\n str +=\n '' +\n this.concatArr(emitter.behaviours) +\n \"
\";\n break;\n\n case 4:\n if (renderer) str += renderer.name + \"
\";\n if (renderer) str += \"body:\" + this.getCreatedNumber(renderer) + \"
\";\n break;\n\n default:\n str += \"particles:\" + this.proton.getCount() + \"
\";\n str += \"pool:\" + this.proton.pool.getCount() + \"
\";\n str += \"total:\" + this.proton.pool.total;\n }\n\n this.container.innerHTML = str;\n }\n\n add(style, body) {\n if (!this.container) {\n this.type = 1;\n\n this.container = document.createElement(\"div\");\n this.container.style.cssText = [\n \"position:absolute;bottom:0px;left:0;cursor:pointer;\",\n \"opacity:0.9;z-index:10000;padding:10px;font-size:12px;font-family:Helvetica,Arial,sans-serif;\",\n \"width:120px;height:50px;background-color:#002;color:#0ff;\"\n ].join(\"\");\n\n this.container.addEventListener(\n \"click\",\n e => {\n this.type++;\n if (this.type > 4) this.type = 1;\n },\n false\n );\n\n let bg, color;\n switch (style) {\n case 2:\n bg = \"#201\";\n color = \"#f08\";\n break;\n\n case 3:\n bg = \"#020\";\n color = \"#0f0\";\n break;\n\n default:\n bg = \"#002\";\n color = \"#0ff\";\n }\n\n this.container.style[\"background-color\"] = bg;\n this.container.style[\"color\"] = color;\n }\n\n if (!this.container.parentNode) {\n body = body || this.body || document.body;\n body.appendChild(this.container);\n }\n }\n\n getEmitter() {\n return this.proton.emitters[this.emitterIndex];\n }\n\n getRenderer() {\n return this.proton.renderers[this.rendererIndex];\n }\n\n concatArr(arr) {\n let result = \"\";\n if (!arr || !arr.length) return result;\n\n for (let i = 0; i < arr.length; i++) {\n result += (arr[i].name || \"\").substr(0, 1) + \".\";\n }\n\n return result;\n }\n\n getCreatedNumber(renderer) {\n return renderer.pool.total || (renderer.cpool && renderer.cpool.total) || 0;\n }\n\n getEmitterPos(e) {\n return Math.round(e.p.x) + \",\" + Math.round(e.p.y);\n }\n}\n","/*\n * EventDispatcher\n * This code reference since http://createjs.com/.\n *\n **/\n\nexport default class EventDispatcher {\n constructor() {\n this._listeners = null;\n }\n\n static bind(target) {\n target.prototype.dispatchEvent = EventDispatcher.prototype.dispatchEvent;\n\n target.prototype.hasEventListener =\n EventDispatcher.prototype.hasEventListener;\n\n target.prototype.addEventListener =\n EventDispatcher.prototype.addEventListener;\n\n target.prototype.removeEventListener =\n EventDispatcher.prototype.removeEventListener;\n\n target.prototype.removeAllEventListeners =\n EventDispatcher.prototype.removeAllEventListeners;\n }\n\n addEventListener(type, listener) {\n if (!this._listeners) {\n this._listeners = {};\n } else {\n this.removeEventListener(type, listener);\n }\n\n if (!this._listeners[type]) this._listeners[type] = [];\n this._listeners[type].push(listener);\n\n return listener;\n }\n\n removeEventListener(type, listener) {\n if (!this._listeners) return;\n if (!this._listeners[type]) return;\n\n const arr = this._listeners[type];\n const length = arr.length;\n\n for (let i = 0; i < length; i++) {\n if (arr[i] === listener) {\n if (length === 1) {\n delete this._listeners[type];\n }\n\n // allows for faster checks.\n else {\n arr.splice(i, 1);\n }\n\n break;\n }\n }\n }\n\n removeAllEventListeners(type) {\n if (!type) this._listeners = null;\n else if (this._listeners) delete this._listeners[type];\n }\n\n dispatchEvent(type, args) {\n let result = false;\n const listeners = this._listeners;\n\n if (type && listeners) {\n let arr = listeners[type];\n if (!arr) return result;\n\n // arr = arr.slice();\n // to avoid issues with items being removed or added during the dispatch\n\n let handler;\n let i = arr.length;\n while (i--) {\n handler = arr[i];\n result = result || handler(args);\n }\n }\n\n return !!result;\n }\n\n hasEventListener(type) {\n const listeners = this._listeners;\n return !!(listeners && listeners[type]);\n }\n}\n","export default class Integration {\n constructor(type) {\n this.type = type;\n }\n\n calculate(particles, time, damping) {\n this.eulerIntegrate(particles, time, damping);\n }\n\n // Euler Integrate\n // https://rosettacode.org/wiki/Euler_method\n eulerIntegrate(particle, time, damping) {\n if (!particle.sleep) {\n particle.old.p.copy(particle.p);\n particle.old.v.copy(particle.v);\n\n particle.a.multiplyScalar(1 / particle.mass);\n particle.v.add(particle.a.multiplyScalar(time));\n particle.p.add(particle.old.v.multiplyScalar(time));\n\n if (damping) particle.v.multiplyScalar(damping);\n\n particle.a.clear();\n }\n }\n}\n","import Pool from \"./Pool\";\nimport Util from \"../utils/Util\";\nimport Stats from \"../debug/Stats\";\nimport EventDispatcher from \"../events/EventDispatcher\";\nimport MathUtil from \"../math/MathUtil\";\nimport Integration from \"../math/Integration\";\n\nexport default class Proton {\n static USE_CLOCK = false;\n\n // measure 1:100\n static MEASURE = 100;\n static EULER = \"euler\";\n static RK2 = \"runge-kutta2\";\n\n // event name\n static PARTICLE_CREATED = \"PARTICLE_CREATED\";\n static PARTICLE_UPDATE = \"PARTICLE_UPDATE\";\n static PARTICLE_SLEEP = \"PARTICLE_SLEEP\";\n static PARTICLE_DEAD = \"PARTICLE_DEAD\";\n\n static EMITTER_ADDED = \"EMITTER_ADDED\";\n static EMITTER_REMOVED = \"EMITTER_REMOVED\";\n\n static PROTON_UPDATE = \"PROTON_UPDATE\";\n static PROTON_UPDATE_AFTER = \"PROTON_UPDATE_AFTER\";\n static DEFAULT_INTERVAL = 0.0167;\n\n static amendChangeTabsBug = true;\n\n /**\n * The constructor to add emitters\n *\n * @constructor Proton\n *\n * @todo proParticleCount is not in use\n * @todo add more documentation of the single properties and parameters\n *\n * @param {Number} [proParticleCount] not in use?\n * @param {Number} [integrationType=Proton.EULER]\n *\n * @property {String} [integrationType=Proton.EULER]\n * @property {Array} emitters All added emitter\n * @property {Array} renderers All added renderer\n * @property {Number} time The active time\n * @property {Number} oldtime The old time\n */\n constructor(integrationType) {\n this.emitters = [];\n this.renderers = [];\n\n this.time = 0;\n this.now = 0;\n this.then = 0;\n this.elapsed = 0;\n\n this.stats = new Stats(this);\n this.pool = new Pool(80);\n\n this.integrationType = Util.initValue(integrationType, Proton.EULER);\n this.integrator = new Integration(this.integrationType);\n\n this._fps = \"auto\";\n this._interval = Proton.DEFAULT_INTERVAL;\n }\n\n set fps(fps) {\n this._fps = fps;\n this._interval =\n fps === \"auto\" ? Proton.DEFAULT_INTERVAL : MathUtil.floor(1 / fps, 7);\n }\n\n get fps() {\n return this._fps;\n }\n\n /**\n * add a type of Renderer\n *\n * @method addRenderer\n * @memberof Proton\n * @instance\n *\n * @param {Renderer} render\n */\n addRenderer(render) {\n render.init(this);\n this.renderers.push(render);\n }\n\n /**\n * @name add a type of Renderer\n *\n * @method addRenderer\n * @param {Renderer} render\n */\n removeRenderer(render) {\n const index = this.renderers.indexOf(render);\n this.renderers.splice(index, 1);\n render.remove(this);\n }\n\n /**\n * add the Emitter\n *\n * @method addEmitter\n * @memberof Proton\n * @instance\n *\n * @param {Emitter} emitter\n */\n addEmitter(emitter) {\n this.emitters.push(emitter);\n emitter.parent = this;\n\n this.dispatchEvent(Proton.EMITTER_ADDED, emitter);\n }\n\n /**\n * Removes an Emitter\n *\n * @method removeEmitter\n * @memberof Proton\n * @instance\n *\n * @param {Proton.Emitter} emitter\n */\n removeEmitter(emitter) {\n const index = this.emitters.indexOf(emitter);\n this.emitters.splice(index, 1);\n emitter.parent = null;\n\n this.dispatchEvent(Proton.EMITTER_REMOVED, emitter);\n }\n\n /**\n * Updates all added emitters\n *\n * @method update\n * @memberof Proton\n * @instance\n */\n update() {\n // 'auto' is the default browser refresh rate, the vast majority is 60fps\n if (this._fps === \"auto\") {\n this.dispatchEvent(Proton.PROTON_UPDATE);\n\n if (Proton.USE_CLOCK) {\n if (!this.then) this.then = new Date().getTime();\n this.now = new Date().getTime();\n this.elapsed = (this.now - this.then) * 0.001;\n // Fix bugs such as chrome browser switching tabs causing excessive time difference\n this.amendChangeTabsBug();\n\n if (this.elapsed > 0) this.emittersUpdate(this.elapsed);\n this.then = this.now;\n } else {\n this.emittersUpdate(Proton.DEFAULT_INTERVAL);\n }\n\n this.dispatchEvent(Proton.PROTON_UPDATE_AFTER);\n }\n\n // If the fps frame rate is set\n else {\n if (!this.then) this.then = new Date().getTime();\n this.now = new Date().getTime();\n this.elapsed = (this.now - this.then) * 0.001;\n\n if (this.elapsed > this._interval) {\n this.dispatchEvent(Proton.PROTON_UPDATE);\n this.emittersUpdate(this._interval);\n // https://stackoverflow.com/questions/19764018/controlling-fps-with-requestanimationframe\n this.then = this.now - (this.elapsed % this._interval) * 1000;\n this.dispatchEvent(Proton.PROTON_UPDATE_AFTER);\n }\n }\n }\n\n emittersUpdate(elapsed) {\n let i = this.emitters.length;\n while (i--) this.emitters[i].update(elapsed);\n }\n\n /**\n * @todo add description\n *\n * @method amendChangeTabsBug\n * @memberof Proton\n * @instance\n */\n amendChangeTabsBug() {\n if (!Proton.amendChangeTabsBug) return;\n if (this.elapsed > 0.5) {\n this.then = new Date().getTime();\n this.elapsed = 0;\n }\n }\n\n /**\n * Counts all particles from all emitters\n *\n * @method getCount\n * @memberof Proton\n * @instance\n */\n getCount() {\n let total = 0;\n let i = this.emitters.length;\n\n while (i--) total += this.emitters[i].particles.length;\n return total;\n }\n\n getAllParticles() {\n let particles = [];\n let i = this.emitters.length;\n\n while (i--) particles = particles.concat(this.emitters[i].particles);\n return particles;\n }\n\n destroyAllEmitters() {\n Util.destroyAll(this.emitters);\n }\n\n /**\n * Destroys everything related to this Proton instance. This includes all emitters, and all properties\n *\n * @method destroy\n * @memberof Proton\n * @instance\n */\n destroy(remove = false) {\n const destroyOther = () => {\n this.time = 0;\n this.then = 0;\n this.pool.destroy();\n\n Util.destroyAll(this.emitters);\n Util.destroyAll(this.renderers, this.getAllParticles());\n };\n\n if (remove) {\n setTimeout(destroyOther, 200);\n } else {\n destroyOther();\n }\n }\n}\n\nEventDispatcher.bind(Proton);\n","export default class Rgb {\n constructor(r = 255, g = 255, b = 255) {\n this.r = r;\n this.g = g;\n this.b = b;\n }\n\n reset() {\n this.r = 255;\n this.g = 255;\n this.b = 255;\n }\n}\n","import MathUtil from \"./MathUtil\";\n\nexport default {\n easeLinear(value) {\n return value;\n },\n\n easeInQuad(value) {\n return Math.pow(value, 2);\n },\n\n easeOutQuad(value) {\n return -(Math.pow(value - 1, 2) - 1);\n },\n\n easeInOutQuad(value) {\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(value, 2);\n\n return -0.5 * ((value -= 2) * value - 2);\n },\n\n easeInCubic(value) {\n return Math.pow(value, 3);\n },\n\n easeOutCubic(value) {\n return Math.pow(value - 1, 3) + 1;\n },\n\n easeInOutCubic(value) {\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(value, 3);\n\n return 0.5 * (Math.pow(value - 2, 3) + 2);\n },\n\n easeInQuart(value) {\n return Math.pow(value, 4);\n },\n\n easeOutQuart(value) {\n return -(Math.pow(value - 1, 4) - 1);\n },\n\n easeInOutQuart(value) {\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(value, 4);\n\n return -0.5 * ((value -= 2) * Math.pow(value, 3) - 2);\n },\n\n easeInSine(value) {\n return -Math.cos(value * MathUtil.PI_2) + 1;\n },\n\n easeOutSine(value) {\n return Math.sin(value * MathUtil.PI_2);\n },\n\n easeInOutSine(value) {\n return -0.5 * (Math.cos(Math.PI * value) - 1);\n },\n\n easeInExpo(value) {\n return value === 0 ? 0 : Math.pow(2, 10 * (value - 1));\n },\n\n easeOutExpo(value) {\n return value === 1 ? 1 : -Math.pow(2, -10 * value) + 1;\n },\n\n easeInOutExpo(value) {\n if (value === 0) return 0;\n\n if (value === 1) return 1;\n\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(2, 10 * (value - 1));\n\n return 0.5 * (-Math.pow(2, -10 * --value) + 2);\n },\n\n easeInCirc(value) {\n return -(Math.sqrt(1 - value * value) - 1);\n },\n\n easeOutCirc(value) {\n return Math.sqrt(1 - Math.pow(value - 1, 2));\n },\n\n easeInOutCirc(value) {\n if ((value /= 0.5) < 1) return -0.5 * (Math.sqrt(1 - value * value) - 1);\n return 0.5 * (Math.sqrt(1 - (value -= 2) * value) + 1);\n },\n\n easeInBack(value) {\n let s = 1.70158;\n return value * value * ((s + 1) * value - s);\n },\n\n easeOutBack(value) {\n let s = 1.70158;\n return (value = value - 1) * value * ((s + 1) * value + s) + 1;\n },\n\n easeInOutBack(value) {\n let s = 1.70158;\n if ((value /= 0.5) < 1)\n return 0.5 * (value * value * (((s *= 1.525) + 1) * value - s));\n return 0.5 * ((value -= 2) * value * (((s *= 1.525) + 1) * value + s) + 2);\n },\n\n getEasing(ease) {\n if (typeof ease === \"function\") return ease;\n else return this[ease] || this.easeLinear;\n }\n};\n","import MathUtil from \"../math/MathUtil\";\n\nexport default class Vector2D {\n constructor(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n }\n\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n\n setX(x) {\n this.x = x;\n return this;\n }\n\n setY(y) {\n this.y = y;\n return this;\n }\n\n getGradient() {\n if (this.x !== 0) return Math.atan2(this.y, this.x);\n else if (this.y > 0) return MathUtil.PI_2;\n else if (this.y < 0) return -MathUtil.PI_2;\n }\n\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n\n return this;\n }\n\n add(v, w) {\n if (w !== undefined) {\n return this.addVectors(v, w);\n }\n\n this.x += v.x;\n this.y += v.y;\n\n return this;\n }\n\n addXY(a, b) {\n this.x += a;\n this.y += b;\n\n return this;\n }\n\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n\n return this;\n }\n\n sub(v, w) {\n if (w !== undefined) {\n return this.subVectors(v, w);\n }\n\n this.x -= v.x;\n this.y -= v.y;\n\n return this;\n }\n\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n\n return this;\n }\n\n divideScalar(s) {\n if (s !== 0) {\n this.x /= s;\n this.y /= s;\n } else {\n this.set(0, 0);\n }\n\n return this;\n }\n\n multiplyScalar(s) {\n this.x *= s;\n this.y *= s;\n\n return this;\n }\n\n negate() {\n return this.multiplyScalar(-1);\n }\n\n dot(v) {\n return this.x * v.x + this.y * v.y;\n }\n\n lengthSq() {\n return this.x * this.x + this.y * this.y;\n }\n\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n\n normalize() {\n return this.divideScalar(this.length());\n }\n\n distanceTo(v) {\n return Math.sqrt(this.distanceToSquared(v));\n }\n\n rotate(tha) {\n const x = this.x;\n const y = this.y;\n\n this.x = x * Math.cos(tha) + y * Math.sin(tha);\n this.y = -x * Math.sin(tha) + y * Math.cos(tha);\n\n return this;\n }\n\n distanceToSquared(v) {\n const dx = this.x - v.x;\n const dy = this.y - v.y;\n\n return dx * dx + dy * dy;\n }\n\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n\n return this;\n }\n\n equals(v) {\n return v.x === this.x && v.y === this.y;\n }\n\n clear() {\n this.x = 0.0;\n this.y = 0.0;\n return this;\n }\n\n clone() {\n return new Vector2D(this.x, this.y);\n }\n}\n","import Rgb from \"../utils/Rgb\";\nimport Puid from \"../utils/Puid\";\nimport Util from \"../utils/Util\";\nimport ease from \"../math/ease\";\nimport Vector2D from \"../math/Vector2D\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class Particle {\n /**\n * the Particle class\n *\n * @class Proton.Particle\n * @constructor\n * @param {Object} pObj the parameters object;\n * for example {life:3,dead:false}\n */\n constructor(conf) {\n /**\n * The particle's id;\n * @property id\n * @type {string}\n */\n this.name = \"Particle\";\n this.id = Puid.id(this.name);\n this.old = {};\n this.data = {};\n this.behaviours = [];\n\n this.p = new Vector2D();\n this.v = new Vector2D();\n this.a = new Vector2D();\n this.old.p = new Vector2D();\n this.old.v = new Vector2D();\n this.old.a = new Vector2D();\n\n this.rgb = new Rgb();\n this.reset();\n conf && Util.setProp(this, conf);\n }\n\n getDirection() {\n return Math.atan2(this.v.x, -this.v.y) * MathUtil.N180_PI;\n }\n\n reset() {\n this.life = Infinity;\n this.age = 0;\n\n this.dead = false;\n this.sleep = false;\n this.body = null;\n this.sprite = null;\n this.parent = null;\n\n this.energy = 1; // Energy Loss\n this.mass = 1;\n this.radius = 10;\n this.alpha = 1;\n this.scale = 1;\n this.rotation = 0;\n this.color = null;\n\n this.p.set(0, 0);\n this.v.set(0, 0);\n this.a.set(0, 0);\n this.old.p.set(0, 0);\n this.old.v.set(0, 0);\n this.old.a.set(0, 0);\n this.easing = ease.easeLinear;\n\n this.rgb.reset();\n Util.emptyObject(this.data);\n this.removeAllBehaviours();\n\n return this;\n }\n\n update(time, index) {\n if (!this.sleep) {\n this.age += time;\n this.applyBehaviours(time, index);\n }\n\n if (this.age < this.life) {\n const scale = this.easing(this.age / this.life);\n this.energy = Math.max(1 - scale, 0);\n } else {\n this.destroy();\n }\n }\n\n applyBehaviours(time, index) {\n const length = this.behaviours.length;\n let i;\n\n for (i = 0; i < length; i++) {\n this.behaviours[i] &&\n this.behaviours[i].applyBehaviour(this, time, index);\n }\n }\n\n addBehaviour(behaviour) {\n this.behaviours.push(behaviour);\n\n if (behaviour.hasOwnProperty(\"parents\")) behaviour.parents.push(this);\n behaviour.initialize(this);\n }\n\n addBehaviours(behaviours) {\n const length = behaviours.length;\n let i;\n\n for (i = 0; i < length; i++) {\n this.addBehaviour(behaviours[i]);\n }\n }\n\n removeBehaviour(behaviour) {\n const index = this.behaviours.indexOf(behaviour);\n\n if (index > -1) {\n const behaviour = this.behaviours.splice(index, 1);\n behaviour.parents = null;\n }\n }\n\n removeAllBehaviours() {\n Util.emptyArray(this.behaviours);\n }\n\n /**\n * Destory this particle\n * @method destroy\n */\n destroy() {\n this.removeAllBehaviours();\n this.energy = 0;\n this.dead = true;\n this.parent = null;\n }\n}\n","export default {\n /**\n * @typedef {Object} rgbObject\n * @property {Number} r red value\n * @property {Number} g green value\n * @property {Number} b blue value\n */\n /**\n * converts a hex value to a rgb object\n *\n * @memberof Proton#Proton.Util\n * @method hexToRgb\n *\n * @param {String} h any hex value, e.g. #000000 or 000000 for black\n *\n * @return {rgbObject}\n */\n hexToRgb(h) {\n const hex16 = h.charAt(0) === \"#\" ? h.substring(1, 7) : h;\n const r = parseInt(hex16.substring(0, 2), 16);\n const g = parseInt(hex16.substring(2, 4), 16);\n const b = parseInt(hex16.substring(4, 6), 16);\n\n return { r, g, b };\n },\n\n /**\n * converts a rgb value to a rgb string\n *\n * @memberof Proton#Proton.Util\n * @method rgbToHex\n *\n * @param {Object | Proton.hexToRgb} rgb a rgb object like in {@link Proton#Proton.}\n *\n * @return {String} rgb()\n */\n rgbToHex(rbg) {\n return `rgb(${rbg.r}, ${rbg.g}, ${rbg.b})`;\n },\n\n getHex16FromParticle(p) {\n return Number(p.rgb.r) * 65536 + Number(p.rgb.g) * 256 + Number(p.rgb.b);\n }\n};\n","import Vector2D from \"./Vector2D\";\n\nexport default class Polar2D {\n constructor(r, tha) {\n this.r = Math.abs(r) || 0;\n this.tha = tha || 0;\n }\n\n set(r, tha) {\n this.r = r;\n this.tha = tha;\n return this;\n }\n\n setR(r) {\n this.r = r;\n return this;\n }\n\n setTha(tha) {\n this.tha = tha;\n return this;\n }\n\n copy(p) {\n this.r = p.r;\n this.tha = p.tha;\n return this;\n }\n\n toVector() {\n return new Vector2D(this.getX(), this.getY());\n }\n\n getX() {\n return this.r * Math.sin(this.tha);\n }\n\n getY() {\n return -this.r * Math.cos(this.tha);\n }\n\n normalize() {\n this.r = 1;\n return this;\n }\n\n equals(v) {\n return v.r === this.r && v.tha === this.tha;\n }\n\n clear() {\n this.r = 0.0;\n this.tha = 0.0;\n return this;\n }\n\n clone() {\n return new Polar2D(this.r, this.tha);\n }\n}\n","const Mat3 = {\n create(mat3) {\n const mat = new Float32Array(9);\n if (mat3) this.set(mat3, mat);\n\n return mat;\n },\n\n set(mat1, mat2) {\n for (let i = 0; i < 9; i++) mat2[i] = mat1[i];\n\n return mat2;\n },\n\n multiply(mat, mat2, mat3) {\n let a00 = mat[0],\n a01 = mat[1],\n a02 = mat[2],\n a10 = mat[3],\n a11 = mat[4],\n a20 = mat[6],\n a21 = mat[7],\n b00 = mat2[0],\n b01 = mat2[1],\n b02 = mat2[2],\n b10 = mat2[3],\n b11 = mat2[4],\n b20 = mat2[6],\n b21 = mat2[7];\n\n mat3[0] = b00 * a00 + b01 * a10;\n mat3[1] = b00 * a01 + b01 * a11;\n mat3[2] = a02 * b02;\n mat3[3] = b10 * a00 + b11 * a10;\n mat3[4] = b10 * a01 + b11 * a11;\n mat3[6] = b20 * a00 + b21 * a10 + a20;\n mat3[7] = b20 * a01 + b21 * a11 + a21;\n\n return mat3;\n },\n\n inverse(mat, mat3) {\n let a00 = mat[0],\n a01 = mat[1],\n a10 = mat[3],\n a11 = mat[4],\n a20 = mat[6],\n a21 = mat[7],\n b01 = a11,\n b11 = -a10,\n b21 = a21 * a10 - a11 * a20,\n d = a00 * b01 + a01 * b11,\n id;\n\n id = 1 / d;\n mat3[0] = b01 * id;\n mat3[1] = -a01 * id;\n mat3[3] = b11 * id;\n mat3[4] = a00 * id;\n mat3[6] = b21 * id;\n mat3[7] = (-a21 * a00 + a01 * a20) * id;\n\n return mat3;\n },\n\n multiplyVec2(m, vec, mat3) {\n let x = vec[0],\n y = vec[1];\n\n mat3[0] = x * m[0] + y * m[3] + m[6];\n mat3[1] = x * m[1] + y * m[4] + m[7];\n\n return mat3;\n }\n};\n\nexport default Mat3;\n","import Span from \"./Span\";\nimport Util from \"../utils/Util\";\nimport MathUtil from \"./MathUtil\";\n\nexport default class ArraySpan extends Span {\n constructor(color) {\n super();\n this._arr = Util.toArray(color);\n }\n\n getValue() {\n const val = Util.getRandFromArray(this._arr);\n return val === \"random\" || val === \"Random\" ? MathUtil.randomColor() : val;\n }\n\n /**\n * Make sure that the color is an instance of Proton.ArraySpan, if not it makes a new instance\n *\n * @method setSpanValue\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n static createArraySpan(arr) {\n if (!arr) return null;\n\n if (arr instanceof ArraySpan) return arr;\n else return new ArraySpan(arr);\n }\n}\n","export default class Rectangle {\n constructor(x, y, w, h) {\n this.x = x;\n this.y = y;\n\n this.width = w;\n this.height = h;\n\n this.bottom = this.y + this.height;\n this.right = this.x + this.width;\n }\n\n contains(x, y) {\n if (x <= this.right && x >= this.x && y <= this.bottom && y >= this.y)\n return true;\n else return false;\n }\n}\n","import Span from \"../math/Span\";\nimport Util from \"../utils/Util\";\n\nexport default class Rate {\n /**\n * The number of particles per second emission (a [particle]/b [s]);\n * @namespace\n * @memberof! Proton#\n * @constructor\n * @alias Rate\n *\n * @param {Array | Number | Span} numpan the number of each emission;\n * @param {Array | Number | Span} timepan the time of each emission;\n * for example: new Rate(new Span(10, 20), new Span(.1, .25));\n */\n constructor(numpan, timepan) {\n this.numPan = Span.setSpanValue(Util.initValue(numpan, 1));\n this.timePan = Span.setSpanValue(Util.initValue(timepan, 1));\n\n this.startTime = 0;\n this.nextTime = 0;\n this.init();\n }\n\n init() {\n this.startTime = 0;\n this.nextTime = this.timePan.getValue();\n }\n\n getValue(time) {\n this.startTime += time;\n\n if (this.startTime >= this.nextTime) {\n this.startTime = 0;\n this.nextTime = this.timePan.getValue();\n\n if (this.numPan.b === 1) {\n if (this.numPan.getValue(false) > 0.5) return 1;\n else return 0;\n } else {\n return this.numPan.getValue(true);\n }\n }\n\n return 0;\n }\n}\n","export default class Initialize {\n reset() {}\n\n init(emitter, particle) {\n if (particle) {\n this.initialize(particle);\n } else {\n this.initialize(emitter);\n }\n }\n\n // sub class init\n initialize(target) {}\n}\n","import Span from \"../math/Span\";\nimport Initialize from \"./Initialize\";\n\nexport default class Life extends Initialize {\n constructor(a, b, c) {\n super();\n\n this.lifePan = Span.setSpanValue(a, b, c);\n this.name = \"Life\";\n }\n\n initialize(target) {\n if (this.lifePan.a === Infinity) target.life = Infinity;\n else target.life = this.lifePan.getValue();\n }\n}\n","import Vector2D from \"../math/Vector2D\";\n\nexport default class Zone {\n constructor() {\n this.vector = new Vector2D(0, 0);\n this.random = 0;\n this.crossType = \"dead\";\n this.alert = true;\n }\n\n getPosition() {}\n\n crossing(particle) {}\n}\n","import Zone from \"./Zone\";\n\nexport default class PointZone extends Zone {\n constructor(x, y) {\n super();\n\n this.x = x;\n this.y = y;\n }\n\n getPosition() {\n this.vector.x = this.x;\n this.vector.y = this.y;\n\n return this.vector;\n }\n\n crossing(particle) {\n if (this.alert) {\n console.error(\"Sorry, PointZone does not support crossing method!\");\n this.alert = false;\n }\n }\n}\n","import Util from \"../utils/Util\";\nimport PointZone from \"../zone/PointZone\";\nimport Initialize from \"./Initialize\";\n\nexport default class Position extends Initialize {\n constructor(zone) {\n super();\n this.zone = Util.initValue(zone, new PointZone());\n this.name = \"Position\";\n }\n\n reset(zone) {\n this.zone = Util.initValue(zone, new PointZone());\n }\n\n initialize(target) {\n this.zone.getPosition();\n\n target.p.x = this.zone.vector.x;\n target.p.y = this.zone.vector.y;\n }\n}\n","import Proton from \"../core/Proton\";\nimport Span from \"../math/Span\";\nimport Util from \"../utils/Util\";\nimport Initialize from \"./Initialize\";\nimport Polar2D from \"../math/Polar2D\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class Velocity extends Initialize {\n constructor(rpan, thapan, type) {\n super();\n\n this.rPan = Span.setSpanValue(rpan);\n this.thaPan = Span.setSpanValue(thapan);\n this.type = Util.initValue(type, \"vector\");\n\n this.name = \"Velocity\";\n }\n\n reset(rpan, thapan, type) {\n this.rPan = Span.setSpanValue(rpan);\n this.thaPan = Span.setSpanValue(thapan);\n this.type = Util.initValue(type, \"vector\");\n }\n\n normalizeVelocity(vr) {\n return vr * Proton.MEASURE;\n }\n\n initialize(target) {\n if (this.type === \"p\" || this.type === \"P\" || this.type === \"polar\") {\n const polar2d = new Polar2D(\n this.normalizeVelocity(this.rPan.getValue()),\n this.thaPan.getValue() * MathUtil.PI_180\n );\n\n target.v.x = polar2d.getX();\n target.v.y = polar2d.getY();\n } else {\n target.v.x = this.normalizeVelocity(this.rPan.getValue());\n target.v.y = this.normalizeVelocity(this.thaPan.getValue());\n }\n }\n}\n","import Span from \"../math/Span\";\nimport Initialize from \"./Initialize\";\n\nexport default class Mass extends Initialize {\n constructor(a, b, c) {\n super();\n this.massPan = Span.setSpanValue(a, b, c);\n this.name = \"Mass\";\n }\n\n initialize(target) {\n target.mass = this.massPan.getValue();\n }\n}\n","import Span from \"../math/Span\";\nimport Initialize from \"./Initialize\";\n\nexport default class Radius extends Initialize {\n constructor(a, b, c) {\n super();\n this.radius = Span.setSpanValue(a, b, c);\n\n this.name = \"Radius\";\n }\n\n reset(a, b, c) {\n this.radius = Span.setSpanValue(a, b, c);\n }\n\n initialize(particle) {\n particle.radius = this.radius.getValue();\n particle.data.oldRadius = particle.radius;\n }\n}\n","import Util from \"../utils/Util\";\nimport ArraySpan from \"../math/ArraySpan\";\nimport Initialize from \"./Initialize\";\n\nexport default class Body extends Initialize {\n constructor(image, w, h) {\n super();\n\n this.image = this.setSpanValue(image);\n this.w = Util.initValue(w, 20);\n this.h = Util.initValue(h, this.w);\n this.name = \"Body\";\n }\n\n initialize(particle) {\n const imageTarget = this.image.getValue();\n\n if (typeof imageTarget === \"string\") {\n particle.body = {\n width: this.w,\n height: this.h,\n src: imageTarget,\n isInner: true,\n inner: true\n };\n } else {\n particle.body = imageTarget;\n }\n }\n\n setSpanValue(image) {\n return image instanceof ArraySpan ? image : new ArraySpan(image);\n }\n}\n","import Proton from '../core/Proton';\nimport Util from '../utils/Util';\nimport ease from '../math/ease';\n\nexport default class Behaviour {\n static id = 0;\n\n /**\n * The Behaviour class is the base for the other Behaviour\n *\n * @memberof! -\n * @interface\n * @alias Proton.Behaviour\n *\n * @param {Number} life \tthe behaviours life\n * @param {String} easing \tThe behaviour's decaying trend, for example ease.easeOutQuart\n *\n * @property {String} id \t\tThe behaviours id\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n * @property {Number} age=0 \tHow long the particle should be 'alife'\n * @property {Number} energy=1\n * @property {Boolean} dead=false The particle is dead at first\n * @property {Array} parents \tThe behaviour's parents array\n * @property {String} name \tThe behaviour name\n */\n constructor(life, easing) {\n\n this.life = Util.initValue(life, Infinity);\n this.easing = ease.getEasing(easing);\n\n this.age = 0;\n this.energy = 1;\n this.dead = false;\n this.parents = [];\n\n this.id = `Behaviour_${Behaviour.id++}`;\n this.name = 'Behaviour';\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Number} [life=Infinity] \t\tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n */\n reset(life, easing) {\n this.life = Util.initValue(life, Infinity);\n this.easing = ease.getEasing(easing);\n }\n\n /**\n * Normalize a force by 1:100;\n *\n * @method normalizeForce\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Proton.Vector2D} force\n */\n normalizeForce(force) {\n return force.multiplyScalar(Proton.MEASURE);\n }\n\n /**\n * Normalize a value by 1:100;\n *\n * @method normalizeValue\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Number} value\n */\n normalizeValue(value) {\n return value * Proton.MEASURE;\n }\n\n /**\n * Initialize the behaviour's parameters for all particles\n *\n * @method initialize\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Proton.Particle} particle\n */\n initialize(particle) {}\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n calculate(particle, time, index) {\n this.age += time;\n\n if (this.age >= this.life || this.dead) {\n this.energy = 0;\n this.dead = true;\n this.destroy();\n } else {\n const scale = this.easing(particle.age / particle.life);\n this.energy = Math.max(1 - scale, 0);\n }\n }\n\n /**\n * Destory this behaviour\n *\n * @method destroy\n * @memberof Proton.Behaviour\n * @instance\n */\n destroy() {\n let i = this.parents.length;\n while (i--) {\n this.parents[i].removeBehaviour(this);\n }\n\n this.parents.length = 0;\n }\n}\n","import Vector2D from '../math/Vector2D';\nimport Behaviour from './Behaviour';\n\nexport default class Force extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Force\n\t *\n\t * @param {Number} fx\n\t * @param {Number} fy\n\t * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(fx, fy, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.force = this.normalizeForce(new Vector2D(fx, fy));\n\t\tthis.name = 'Force';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Force\n\t * @instance\n\t *\n\t * @param {Number} fx\n\t * @param {Number} fy\n\t * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(fx, fy, life, easing) {\n\t\tthis.force = this.normalizeForce(new Vector2D(fx, fy));\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#Proton.Force\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} the integrate time 1/ms\n\t * @param {Int} the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.calculate(particle, time, index);\n\t\tparticle.a.add(this.force);\n\t}\n}","import Util from \"../utils/Util\";\nimport Vector2D from \"../math/Vector2D\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class Attraction extends Behaviour {\n /**\n * This behaviour let the particles follow one specific Proton.Vector2D\n *\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Attraction\n *\n * @todo add description for 'force' and 'radius'\n *\n * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n * @param {Number} [force=100]\n * @param {Number} [radius=1000]\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {Proton.Vector2D} targetPosition\n * @property {Number} radius\n * @property {Number} force\n * @property {Number} radiusSq\n * @property {Proton.Vector2D} attractionForce\n * @property {Number} lengthSq\n * @property {String} name The Behaviour name\n */\n constructor(targetPosition, force, radius, life, easing) {\n super(life, easing);\n\n this.targetPosition = Util.initValue(targetPosition, new Vector2D());\n this.radius = Util.initValue(radius, 1000);\n this.force = Util.initValue(this.normalizeValue(force), 100);\n\n this.radiusSq = this.radius * this.radius;\n this.attractionForce = new Vector2D();\n this.lengthSq = 0;\n\n this.name = \"Attraction\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Attraction\n * @instance\n *\n * @todo add description for 'force' and 'radius'\n *\n * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n * @param {Number} [force=100]\n * @param {Number} [radius=1000]\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n */\n reset(targetPosition, force, radius, life, easing) {\n this.targetPosition = Util.initValue(targetPosition, new Vector2D());\n this.radius = Util.initValue(radius, 1000);\n this.force = Util.initValue(this.normalizeValue(force), 100);\n\n this.radiusSq = this.radius * this.radius;\n this.attractionForce = new Vector2D();\n this.lengthSq = 0;\n\n life && super.reset(life, easing);\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @memberof Proton#Proton.Attraction\n * @method applyBehaviour\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n\n this.attractionForce.copy(this.targetPosition);\n this.attractionForce.sub(particle.p);\n this.lengthSq = this.attractionForce.lengthSq();\n\n if (this.lengthSq > 0.00004 && this.lengthSq < this.radiusSq) {\n this.attractionForce.normalize();\n this.attractionForce.multiplyScalar(1 - this.lengthSq / this.radiusSq);\n this.attractionForce.multiplyScalar(this.force);\n\n particle.a.add(this.attractionForce);\n }\n }\n}\n","import Vector2D from \"../math/Vector2D\";\nimport MathUtil from \"../math/MathUtil\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class RandomDrift extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Behaviour\n * @constructor\n * @alias RandomDrift\n *\n * @param {Number} driftX \t\t\t\tX value of the new Vector2D\n * @param {Number} driftY \t\t\t\tY value of the new Vector2D\n * @param {Number} delay \t\t\t\tHow much delay the drift should have\n * @param {Number} [life=Infinity] \t\tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n *\n * @property {Number} time The time of the drift\n * @property {String} name The Behaviour name\n */\n constructor(driftX, driftY, delay, life, easing) {\n super(life, easing);\n\n this.reset(driftX, driftY, delay);\n this.time = 0;\n this.name = \"RandomDrift\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#RandomDrift\n * @instance\n *\n * @param {Number} driftX \t\t\t\tX value of the new Vector2D\n * @param {Number} driftY \t\t\t\tY value of the new Vector2D\n * @param {Number} delay \t\t\t\tHow much delay the drift should have\n * @param {Number} [life=Infinity] \t\tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n */\n reset(driftX, driftY, delay, life, easing) {\n this.panFoce = new Vector2D(driftX, driftY);\n this.panFoce = this.normalizeForce(this.panFoce);\n this.delay = delay;\n\n life && super.reset(life, easing);\n }\n\n initialize(particle) {\n particle.data.time = 0;\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#RandomDrift\n * @instance\n *\n * @param {Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n particle.data.time += time;\n\n if (particle.data.time >= this.delay) {\n particle.a.addXY(\n MathUtil.randomAToB(-this.panFoce.x, this.panFoce.x),\n MathUtil.randomAToB(-this.panFoce.y, this.panFoce.y)\n );\n\n particle.data.time = 0;\n }\n }\n}\n","import Force from './Force';\n\nexport default class Gravity extends Force {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton#Proton.Force\n\t * @constructor\n\t * @alias Proton.Gravity\n\t *\n\t * @param {Number} g \t\t\t\t\t\t\tGravity\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(g, life, easing) {\n\t\tsuper(0, g, life, easing);\n\t\tthis.name = 'Gravity';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Gravity\n\t * @instance\n\t *\n\t * @param {Number} g \t\t\t\t\t\t\tGravity\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(g, life, easing) {\n\t\tsuper.reset(0, g, life, easing);\n\t}\n}","import Util from '../utils/Util';\nimport Vector2D from '../math/Vector2D';\nimport Behaviour from './Behaviour';\n\nexport default class Collision extends Behaviour {\n\n\t/**\n\t * The callback after collision\n\t *\n\t * @callback Callback\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Proton.Paritcle} otherParticle\n\t */\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Collision\n\t *\n\t * @todo add description to mass\n\t *\n\t * @param {Proton.Emitter} \t[emitter=null] \t\tthe attraction point coordinates\n\t * @param {Boolean} \t\t[mass=true]\n\t * @param {Callback}\t \t[callback=null]\t\tthe callback after the collision\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(emitter, mass, callback, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.reset(emitter, mass, callback);\n\t\tthis.name = 'Collision';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @memberof Proton#Proton.Collision\n\t * @method reset\n\t * @instance\n\t *\n\t * @todo add description to mass\n\t *\n\t * @param {Proton.Emitter} \t[emitter=null] \t\tthe attraction point coordinates\n\t * @param {Boolean} \t\t[mass=true]\n\t * @param {Callback}\t \t[callback=null]\t\tthe callback after the collision\n\t * @param {Number} \t\t\t[life=Infinity] \tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(emitter, mass, callback, life, easing) {\n\t\tthis.emitter = Util.initValue(emitter, null);\n\t\tthis.mass = Util.initValue(mass, true);\n\t\tthis.callback = Util.initValue(callback, null);\n\n\t\tthis.collisionPool = [];\n\t\tthis.delta = new Vector2D();\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @memberof Proton#Proton.Collision\n\t * @method applyBehaviour\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} \t\t\ttime the integrate time 1/ms\n\t * @param {Int} \t\t\tindex the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tconst newPool = this.emitter ? this.emitter.particles.slice(index) : this.pool.slice(index);\n\t\tconst length = newPool.length;\n\n\t\tlet otherParticle;\n\t\tlet lengthSq;\n\t\tlet overlap;\n\t\tlet totalMass;\n\t\tlet averageMass1, averageMass2;\n\t\tlet i;\n\n\t\tfor (i = 0; i < length; i++) {\n\t\t\totherParticle = newPool[i];\n\n\t\t\tif (otherParticle !== particle) {\n\t\t\t\tthis.delta.copy(otherParticle.p);\n\t\t\t\tthis.delta.sub(particle.p);\n\n\t\t\t\tlengthSq = this.delta.lengthSq();\n\t\t\t\tconst distance = particle.radius + otherParticle.radius;\n\n\t\t\t\tif (lengthSq <= distance * distance) {\n\t\t\t\t\toverlap = distance - Math.sqrt(lengthSq);\n\t\t\t\t\toverlap += 0.5;\n\n\t\t\t\t\ttotalMass = particle.mass + otherParticle.mass;\n\t\t\t\t\taverageMass1 = this.mass ? otherParticle.mass / totalMass : 0.5;\n\t\t\t\t\taverageMass2 = this.mass ? particle.mass / totalMass : 0.5;\n\n\t\t\t\t\tparticle.p.add(this.delta.clone().normalize().multiplyScalar(overlap * -averageMass1));\n\t\t\t\t\totherParticle.p.add(this.delta.normalize().multiplyScalar(overlap * averageMass2));\n\n\t\t\t\t\tthis.callback && this.callback(particle, otherParticle);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}","import Util from '../utils/Util';\nimport Behaviour from './Behaviour';\n\nexport default class CrossZone extends Behaviour {\n\n /**\n * Defines what happens if the particles come to the end of the specified zone\n *\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.CrossZone\n *\n * @param {Proton.Zone} zone \t\t\t\t\t\tcan be any Proton.Zone - e.g. Proton.RectZone()\n * @param {String} \t\t[crossType=dead] \t\t\twhat happens if the particles pass the zone - allowed strings: dead | bound | cross\n * @param {Number} \t\t[life=Infinity] \t\t\tthis behaviour's life\n * @param {String} \t\t[easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(zone, crossType, life, easing) {\n super(life, easing);\n\n this.reset(zone, crossType);\n this.name = 'CrossZone';\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.CrossZone\n * @instance\n *\n * @param {Proton.Zone} zone \t\t\t\tcan be any Proton.Zone - e.g. Proton.RectZone()\n * @param {String} \t\t[crossType=dead] \twhat happens if the particles pass the zone - allowed strings: dead | bound | cross\n * @param {Number} \t\t[life=Infinity] \tthis behaviour's life\n * @param {String} \t\t[easing=easeLinear]\tthis behaviour's easing\n */\n reset(zone, crossType, life, easing) {\n this.zone = zone;\n this.zone.crossType = Util.initValue(crossType, 'dead');\n\n life && super.reset(life, easing);\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#Proton.CrossZone\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n this.zone.crossing(particle);\n };\n}","import Util from \"../utils/Util\";\nimport Span from \"../math/Span\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class Alpha extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Alpha\n *\n * @todo add description for 'a' and 'b'\n *\n * @param {Number} a\n * @param {String} b\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(a, b, life, easing) {\n super(life, easing);\n\n this.reset(a, b);\n this.name = \"Alpha\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Alpha\n * @instance\n *\n * @todo add description for 'a' and 'b'\n *\n * @param {Number} a\n * @param {String} b\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n */\n reset(a, b, life, easing) {\n this.same = b === null || b === undefined ? true : false;\n this.a = Span.setSpanValue(Util.initValue(a, 1));\n this.b = Span.setSpanValue(b);\n\n life && super.reset(life, easing);\n }\n\n /**\n * Sets the new alpha value of the particle\n *\n * @method initialize\n * @memberof Proton#Proton.Alpha\n * @instance\n *\n * @param {Proton.Particle} particle A single Proton generated particle\n */\n initialize(particle) {\n particle.data.alphaA = this.a.getValue();\n\n if (this.same) particle.data.alphaB = particle.data.alphaA;\n else particle.data.alphaB = this.b.getValue();\n }\n\n /**\n * @method applyBehaviour\n * @memberof Proton#Proton.Alpha\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n\n particle.alpha =\n particle.data.alphaB +\n (particle.data.alphaA - particle.data.alphaB) * this.energy;\n\n if (particle.alpha < 0.001) particle.alpha = 0;\n }\n}\n","import Span from \"../math/Span\";\nimport Util from '../utils/Util';\nimport Behaviour from './Behaviour';\n\nexport default class Scale extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Scale\n\t *\n\t * @todo add description for 'a' and 'b'\n\t *\n\t * @param {Number} a\n\t * @param {String} b\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(a, b, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.reset(a, b);\n\t\tthis.name = 'Scale';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Scale\n\t * @instance\n\t *\n\t * @param {Number} a\n\t * @param {String} b\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(a, b, life, easing) {\n\t\tthis.same = b === null || b === undefined ? true : false;\n\t\tthis.a = Span.setSpanValue(Util.initValue(a, 1));\n\t\tthis.b = Span.setSpanValue(b);\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Initialize the behaviour's parameters for all particles\n\t *\n\t * @method initialize\n\t * @memberof Proton#Proton.Scale\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t */\n\tinitialize(particle) {\n\t\tparticle.data.scaleA = this.a.getValue();\n\t\tparticle.data.oldRadius = particle.radius;\n\t\tparticle.data.scaleB = this.same ? particle.data.scaleA : this.b.getValue();\n\t};\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#Proton.Scale\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} \t\t\ttime the integrate time 1/ms\n\t * @param {Int} \t\t\tindex the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.calculate(particle, time, index);\n\t\tparticle.scale = particle.data.scaleB + (particle.data.scaleA - particle.data.scaleB) * this.energy;\n\n\t\tif (particle.scale < 0.0001) particle.scale = 0;\n\t\tparticle.radius = particle.data.oldRadius * particle.scale;\n\t}\n}","import Span from \"../math/Span\";\nimport Util from '../utils/Util';\nimport Behaviour from './Behaviour';\n\nexport default class Rotate extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Rotate\n\t *\n\t * @todo add description for 'a', 'b' and 'style'\n\t *\n\t * @param {String} [influence=Velocity] The rotation's influence\n\t * @param {String} b\n\t * @param {String} [style=to]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(influence, b, style, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.reset(influence, b, style);\n\t\tthis.name = 'Rotate';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Rotate\n\t * @instance\n\t *\n\t * @todo add description for 'a', 'b' and 'style'\n\t *\n\t * @param {String} a\n\t * @param {String} b\n\t * @param {String} [style=to]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(a, b, style, life, easing) {\n\t\tthis.same = b === null || b === undefined ? true : false;\n\n\t\tthis.a = Span.setSpanValue(Util.initValue(a, 'Velocity'));\n\t\tthis.b = Span.setSpanValue(Util.initValue(b, 0));\n\t\tthis.style = Util.initValue(style, 'to');\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Initialize the behaviour's parameters for all particles\n\t *\n\t * @method initialize\n\t * @memberof Proton#Proton.Rotate\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t */\n\tinitialize(particle) {\n\t\tparticle.rotation = this.a.getValue();\n\t\tparticle.data.rotationA = this.a.getValue();\n\n\t\tif (!this.same) particle.data.rotationB = this.b.getValue();\n\t};\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#Proton.Rotate\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} \t\t\ttime the integrate time 1/ms\n\t * @param {Int} \t\t\tindex the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.calculate(particle, time, index);\n\n\t\tif (!this.same) {\n\t\t\tif (this.style === 'to' || this.style === 'TO' || this.style === '_') {\n\t\t\t\tparticle.rotation += particle.data.rotationB + (particle.data.rotationA - particle.data.rotationB) * this.energy\n\t\t\t} else {\n\t\t\t\tparticle.rotation += particle.data.rotationB;\n\t\t\t}\n\t\t} else if (this.a.a === 'V' || this.a.a === 'Velocity' || this.a.a === 'v') {\n\t\t\t// beta...\n\t\t\tparticle.rotation = particle.getDirection();\n\t\t}\n\t}\n\n}\n","import ColorUtil from \"../utils/ColorUtil\";\nimport ArraySpan from \"../math/ArraySpan\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class Color extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Color\n *\n * @param {Proton.ArraySpan | String} a the string should be a hex e.g. #000000 for black\n * @param {Proton.ArraySpan | String} b the string should be a hex e.g. #000000 for black\n * @param {Number} [life=Infinity] \tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(a, b, life, easing) {\n super(life, easing);\n\n this.reset(a, b);\n this.name = \"Color\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.ArraySpan | String} a the string should be a hex e.g. #000000 for black\n * @param {Proton.ArraySpan | String} b the string should be a hex e.g. #000000 for black\n * @param {Number} [life=Infinity] \tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n */\n reset(a, b, life, easing) {\n this.a = ArraySpan.createArraySpan(a);\n this.b = ArraySpan.createArraySpan(b);\n life && super.reset(life, easing);\n }\n\n /**\n * Initialize the behaviour's parameters for all particles\n *\n * @method initialize\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.Particle} particle\n */\n initialize(particle) {\n particle.color = this.a.getValue();\n particle.data.colorA = ColorUtil.hexToRgb(particle.color);\n\n if (this.b) particle.data.colorB = ColorUtil.hexToRgb(this.b.getValue());\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n applyBehaviour(particle, time, index) {\n if (this.b) {\n this.calculate(particle, time, index);\n\n particle.rgb.r =\n particle.data.colorB.r +\n (particle.data.colorA.r - particle.data.colorB.r) * this.energy;\n particle.rgb.g =\n particle.data.colorB.g +\n (particle.data.colorA.g - particle.data.colorB.g) * this.energy;\n particle.rgb.b =\n particle.data.colorB.b +\n (particle.data.colorA.b - particle.data.colorB.b) * this.energy;\n\n particle.rgb.r = Math.floor(particle.rgb.r);\n particle.rgb.g = Math.floor(particle.rgb.g);\n particle.rgb.b = Math.floor(particle.rgb.b);\n } else {\n particle.rgb.r = particle.data.colorA.r;\n particle.rgb.g = particle.data.colorA.g;\n particle.rgb.b = particle.data.colorA.b;\n }\n }\n}\n","import MathUtil from \"../math/MathUtil\";\nimport Vector2D from \"../math/Vector2D\";\nimport Span from \"../math/Span\";\nimport Behaviour from \"./Behaviour\";\n\nconst CHANGING = \"changing\";\n\nexport default class Cyclone extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Cyclone\n *\n * @param {Number} angle\n * @param {Number} force\n * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(angle, force, life, easing) {\n super(life, easing);\n this.setAngleAndForce(angle, force);\n this.name = \"Cyclone\";\n }\n\n setAngleAndForce(angle, force) {\n this.force = CHANGING;\n this.angle = MathUtil.PI / 2;\n\n if (angle === \"right\") {\n this.angle = MathUtil.PI / 2;\n } else if (angle === \"left\") {\n this.angle = -MathUtil.PI / 2;\n } else if (angle === \"random\") {\n this.angle = \"random\";\n } else if (angle instanceof Span) {\n this.angle = \"span\";\n this.span = angle;\n } else if (angle) {\n this.angle = angle;\n }\n\n if (\n String(force).toLowerCase() === \"changing\" ||\n String(force).toLowerCase() === \"chang\" ||\n String(force).toLowerCase() === \"auto\"\n ) {\n this.force = CHANGING;\n } else if (force) {\n this.force = force;\n }\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Cyclone\n * @instance\n *\n * @param {Number} angle\n * @param {Number} force\n * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n */\n reset(angle, force, life, easing) {\n this.angle = MathUtil.PI / 2;\n this.setAngleAndForce(angle, force);\n life && super.reset(life, easing);\n }\n\n initialize(particle) {\n if (this.angle === \"random\") {\n particle.data.cangle = MathUtil.randomAToB(-MathUtil.PI, MathUtil.PI);\n } else if (this.angle === \"span\") {\n particle.data.cangle = this.span.getValue();\n }\n\n particle.data.cyclone = new Vector2D(0, 0);\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#Proton.Cyclone\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n\n let length;\n let gradient = particle.v.getGradient();\n if (this.angle === \"random\" || this.angle === \"span\") {\n gradient += particle.data.cangle;\n } else {\n gradient += this.angle;\n }\n\n if (this.force === CHANGING) {\n length = particle.v.length() / 100;\n } else {\n length = this.force;\n }\n\n particle.data.cyclone.x = length * Math.cos(gradient);\n particle.data.cyclone.y = length * Math.sin(gradient);\n particle.data.cyclone = this.normalizeForce(particle.data.cyclone);\n particle.a.add(particle.data.cyclone);\n }\n}\n","import Attraction from './Attraction';\n\nexport default class Repulsion extends Attraction {\n\n\t/**\n\t * The oppisite of Proton.Attraction - turns the force\n\t *\n\t * @memberof! Proton#\n\t * @augments Proton#Proton.Attraction\n\t * @constructor\n\t * @alias Proton.Repulsion\n\t *\n\t * @todo add description for 'force' and 'radius'\n\t *\n\t * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n\t * @param {Number} [force=100]\n\t * @param {Number} [radius=1000]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {Number} force\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(targetPosition, force, radius, life, easing) {\n\t\tsuper(targetPosition, force, radius, life, easing);\n\n\t\tthis.force *= -1;\n\t\tthis.name = 'Repulsion';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Repulsion\n\t * @instance\n\t *\n\t * @todo add description for 'force' and 'radius'\n\t *\n\t * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n\t * @param {Number} [force=100]\n\t * @param {Number} [radius=1000]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(targetPosition, force, radius, life, easing) {\n\t\tsuper.reset(targetPosition, force, radius, life, easing);\n\t\tthis.force *= -1;\n\t}\n}\n","import Util from '../utils/Util';\nimport Vector2D from '../math/Vector2D';\nimport Behaviour from './Behaviour';\n\nexport default class GravityWell extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Behaviour\n\t * @constructor\n\t * @alias GravityWell\n\t *\n\t * @param {Vector2D} [centerPoint=new Vector2D] The point in the center\n\t * @param {Number} [force=100]\t\t\t\t\tThe force\n\t * @param {Number} [life=Infinity]\t\t\t\tthis behaviour's life\n\t * @param {String} [easing=easeLinear]\tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(centerPoint, force, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.distanceVec = new Vector2D();\n\t\tthis.centerPoint = Util.initValue(centerPoint, new Vector2D);\n\t\tthis.force = Util.initValue(this.normalizeValue(force), 100);\n\n\t\tthis.name = 'GravityWell';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#GravityWell\n\t * @instance\n\t *\n\t * @param {Vector2D} [centerPoint=new Vector2D] The point in the center\n\t * @param {Number} [force=100]\t\t\t\t\tThe force\n\t * @param {Number} [life=Infinity]\t\t\t\tthis behaviour's life\n\t * @param {String} [easing=easeLinear]\tthis behaviour's easing\n\t */\n\treset(centerPoint, force, life, easing) {\n\t\tthis.distanceVec = new Vector2D();\n\t\tthis.centerPoint = Util.initValue(centerPoint, new Vector2D);\n\t\tthis.force = Util.initValue(this.normalizeValue(force), 100);\n\n\t\tlife && super.reset(life, easing);\n\t};\n\n\t/**\n\t * @inheritdoc\n\t */\n\tinitialize(particle) {\n\t};\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#GravityWell\n\t * @instance\n\t *\n\t * @param {Particle} particle\n\t * @param {Number} the integrate time 1/ms\n\t * @param {Int} the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.distanceVec.set(this.centerPoint.x - particle.p.x, this.centerPoint.y - particle.p.y);\n\t\tconst distanceSq = this.distanceVec.lengthSq();\n\n\t\tif (distanceSq !== 0) {\n\t\t\tconst distance = this.distanceVec.length();\n\t\t\tconst factor = (this.force * time) / (distanceSq * distance);\n\n\t\t\tparticle.v.x += factor * this.distanceVec.x;\n\t\t\tparticle.v.y += factor * this.distanceVec.y;\n\t\t}\n\t}\n}","import Util from \"../utils/Util\";\nimport Initialize from \"./Initialize\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default {\n initialize(emitter, particle, initializes) {\n const length = initializes.length;\n let i;\n\n for (i = 0; i < length; i++) {\n if (initializes[i] instanceof Initialize) {\n initializes[i].init(emitter, particle);\n } else {\n this.init(emitter, particle, initializes[i]);\n }\n }\n\n this.bindEmitter(emitter, particle);\n },\n\n // init\n init(emitter, particle, initialize) {\n Util.setProp(particle, initialize);\n Util.setVectorVal(particle, initialize);\n },\n\n bindEmitter(emitter, particle) {\n if (emitter.bindEmitter) {\n particle.p.add(emitter.p);\n particle.v.add(emitter.v);\n particle.a.add(emitter.a);\n\n particle.v.rotate(MathUtil.degreeTransform(emitter.rotation));\n }\n }\n};\n","import Util from \"../utils/Util\";\nimport Puid from \"../utils/Puid\";\nimport Particle from \"../core/Particle\";\nimport EventDispatcher from \"../events/EventDispatcher\";\n\nimport Rate from \"../initialize/Rate\";\nimport InitializeUtil from \"../initialize/InitializeUtil\";\n\nexport default class Emitter extends Particle {\n /**\n * You can use this emit particles.\n *\n * It will dispatch follow events:\n * PARTICLE_CREATED\n * PARTICLE_UPDATA\n * PARTICLE_DEAD\n *\n * @class Emitter\n * @constructor\n * @param {Object} conf the parameters object;\n * for example {damping:0.01,bindEmitter:false}\n */\n constructor(conf = {}) {\n super(conf);\n\n this.particles = [];\n this.behaviours = [];\n this.initializes = [];\n\n this.emitTime = 0;\n this.emitSpeed = 0;\n this.totalTime = -1;\n\n /**\n * The friction coefficient for all particle emit by This;\n * @property damping\n * @type {Number}\n * @default 0.006\n */\n this.damping = 0.006;\n\n /**\n * If bindEmitter the particles can bind this emitter's property;\n * @property bindEmitter\n * @type {Boolean}\n * @default true\n */\n this.bindEmitter = true;\n\n /**\n * The number of particles per second emit (a [particle]/b [s]);\n * @property rate\n * @type {Rate}\n * @default Rate(1, .1)\n */\n this.rate = new Rate(1, 0.1);\n\n this.name = \"Emitter\";\n this.id = Puid.id(this.name);\n }\n\n /**\n * start emit particle\n * @method emit\n * @param {Number} emitTime begin emit time;\n * @param {String} life the life of this emitter\n */\n emit(totalTime, life) {\n this.stoped = false;\n this.emitTime = 0;\n this.totalTime = Util.initValue(totalTime, Infinity);\n\n if (life === true || life === \"life\" || life === \"destroy\") {\n this.life = totalTime === \"once\" ? 1 : this.totalTime;\n } else if (!isNaN(life)) {\n this.life = life;\n }\n\n this.rate.init();\n }\n\n /**\n * stop emiting\n * @method stop\n */\n stop() {\n this.totalTime = -1;\n this.emitTime = 0;\n this.stoped = true;\n }\n\n preEmit(time) {\n let oldStoped = this.stoped;\n let oldEmitTime = this.emitTime;\n let oldTotalTime = this.totalTime;\n\n this.stoped = false;\n this.emitTime = 0;\n this.totalTime = time;\n this.rate.init();\n\n const step = 0.0167;\n while (time > step) {\n time -= step;\n this.update(step);\n }\n\n this.stoped = oldStoped;\n this.emitTime = oldEmitTime + Math.max(time, 0);\n this.totalTime = oldTotalTime;\n }\n\n /**\n * remove current all particles\n * @method removeAllParticles\n */\n removeAllParticles() {\n let i = this.particles.length;\n while (i--) this.particles[i].dead = true;\n }\n\n /**\n * add initialize to this emitter\n * @method addSelfInitialize\n */\n addSelfInitialize(initialize) {\n if (initialize[\"init\"]) {\n initialize.init(this);\n } else {\n this.initAll();\n }\n }\n\n /**\n * add the Initialize to particles;\n *\n * you can use initializes array:for example emitter.addInitialize(initialize1,initialize2,initialize3);\n * @method addInitialize\n * @param {Initialize} initialize like this new Radius(1, 12)\n */\n addInitialize(...rest) {\n let i = rest.length;\n while (i--) this.initializes.push(rest[i]);\n }\n\n /**\n * remove the Initialize\n * @method removeInitialize\n * @param {Initialize} initialize a initialize\n */\n removeInitialize(initializer) {\n const index = this.initializes.indexOf(initializer);\n if (index > -1) this.initializes.splice(index, 1);\n }\n\n /**\n * remove all Initializes\n * @method removeInitializers\n */\n removeAllInitializers() {\n Util.emptyArray(this.initializes);\n }\n\n /**\n * add the Behaviour to particles;\n *\n * you can use Behaviours array:emitter.addBehaviour(Behaviour1,Behaviour2,Behaviour3);\n * @method addBehaviour\n * @param {Behaviour} behaviour like this new Color('random')\n */\n addBehaviour(...rest) {\n let i = arguments.length;\n while (i--) {\n let behaviour = rest[i];\n this.behaviours.push(behaviour);\n if (behaviour.parents) behaviour.parents.push(this);\n }\n }\n\n /**\n * remove the Behaviour\n * @method removeBehaviour\n * @param {Behaviour} behaviour a behaviour\n */\n removeBehaviour(behaviour) {\n let index = this.behaviours.indexOf(behaviour);\n this.behaviours.splice(index, 1);\n\n if (behaviour.parents) {\n index = behaviour.parents.indexOf(behaviour);\n behaviour.parents.splice(index, 1);\n }\n\n return index;\n }\n\n /**\n * remove all behaviours\n * @method removeAllBehaviours\n */\n removeAllBehaviours() {\n Util.emptyArray(this.behaviours);\n }\n\n // emitter update\n update(time) {\n this.age += time;\n if (this.age >= this.life || this.dead) this.destroy();\n\n this.emitting(time);\n this.integrate(time);\n }\n\n integrate(time) {\n if (!this.parent) return;\n\n const damping = 1 - this.damping;\n this.parent.integrator.calculate(this, time, damping);\n\n const length = this.particles.length;\n let i, particle;\n\n for (i = length - 1; i >= 0; i--) {\n particle = this.particles[i];\n\n // particle update\n particle.update(time, i);\n this.parent.integrator.calculate(particle, time, damping);\n this.dispatch(\"PARTICLE_UPDATE\", particle);\n\n // check dead\n if (particle.dead) {\n this.dispatch(\"PARTICLE_DEAD\", particle);\n\n this.parent.pool.expire(particle);\n this.particles.splice(i, 1);\n }\n }\n }\n\n dispatch(event, target) {\n this.parent && this.parent.dispatchEvent(event, target);\n this.bindEvent && this.dispatchEvent(event, target);\n }\n\n emitting(time) {\n if (this.totalTime === \"once\") {\n let i;\n const length = this.rate.getValue(99999);\n\n if (length > 0) this.emitSpeed = length;\n for (i = 0; i < length; i++) this.createParticle();\n this.totalTime = \"none\";\n } else {\n this.emitTime += time;\n\n if (this.emitTime < this.totalTime) {\n const length = this.rate.getValue(time);\n let i;\n\n if (length > 0) this.emitSpeed = length;\n for (i = 0; i < length; i++) this.createParticle();\n }\n }\n }\n\n /**\n * create single particle;\n *\n * can use emit({x:10},new Gravity(10),{'particleUpdate',fun}) or emit([{x:10},new Initialize],new Gravity(10),{'particleUpdate',fun})\n * @method removeAllParticles\n */\n createParticle(initialize, behaviour) {\n const particle = this.parent.pool.get(Particle);\n this.setupParticle(particle, initialize, behaviour);\n this.dispatch(\"PARTICLE_CREATED\", particle);\n\n return particle;\n }\n\n setupParticle(particle, initialize, behaviour) {\n let initializes = this.initializes;\n let behaviours = this.behaviours;\n\n if (initialize) initializes = Util.toArray(initialize);\n if (behaviour) behaviours = Util.toArray(behaviour);\n\n particle.reset();\n InitializeUtil.initialize(this, particle, initializes);\n particle.addBehaviours(behaviours);\n particle.parent = this;\n\n this.particles.push(particle);\n }\n\n remove() {\n this.stop();\n Util.destroyAll(this.particles);\n }\n\n /**\n * Destory this Emitter\n * @method destroy\n */\n destroy() {\n this.dead = true;\n this.remove();\n this.removeAllInitializers();\n this.removeAllBehaviours();\n this.parent && this.parent.removeEmitter(this);\n }\n}\n\nEventDispatcher.bind(Emitter);\n","import Emitter from \"./Emitter\";\n\nexport default class BehaviourEmitter extends Emitter {\n /**\n * The BehaviourEmitter class inherits from Proton.Emitter\n *\n * use the BehaviourEmitter you can add behaviours to self;\n * @class Proton.BehaviourEmitter\n * @constructor\n * @param {Object} conf the parameters object;\n */\n constructor(conf) {\n super(conf);\n\n this.selfBehaviours = [];\n }\n\n /**\n * add the Behaviour to emitter;\n *\n * you can use Behaviours array:emitter.addSelfBehaviour(Behaviour1,Behaviour2,Behaviour3);\n * @method addSelfBehaviour\n * @param {Proton.Behaviour} behaviour like this new Proton.Color('random')\n */\n addSelfBehaviour(...rest) {\n let i,\n length = rest.length;\n\n for (i = 0; i < length; i++) {\n let behaviour = rest[i];\n this.selfBehaviours.push(behaviour);\n behaviour.initialize(this);\n }\n }\n\n /**\n * remove the Behaviour for self\n * @method removeSelfBehaviour\n * @param {Proton.Behaviour} behaviour a behaviour\n */\n removeSelfBehaviour(behaviour) {\n const index = this.selfBehaviours.indexOf(behaviour);\n if (index > -1) this.selfBehaviours.splice(index, 1);\n }\n\n update(time) {\n super.update(time);\n\n if (!this.sleep) {\n const length = this.selfBehaviours.length;\n let i;\n\n for (i = 0; i < length; i++) {\n this.selfBehaviours[i].applyBehaviour(this, time, i);\n }\n }\n }\n}\n","import Util from \"../utils/Util\";\nimport Emitter from \"./Emitter\";\n\nexport default class FollowEmitter extends Emitter {\n /**\n * The FollowEmitter class inherits from Proton.Emitter\n *\n * use the FollowEmitter will emit particle when mousemoving\n *\n * @class Proton.FollowEmitter\n * @constructor\n * @param {Element} mouseTarget mouseevent's target;\n * @param {Number} ease the easing of following speed;\n * @default 0.7\n * @param {Object} conf the parameters object;\n */\n constructor(mouseTarget, ease, conf) {\n super(conf);\n\n this.mouseTarget = Util.initValue(mouseTarget, window);\n this.ease = Util.initValue(ease, 0.7);\n\n this._allowEmitting = false;\n this.initEventHandler();\n }\n\n initEventHandler() {\n this.mousemoveHandler = e => this.mousemove.call(this, e);\n this.mousedownHandler = e => this.mousedown.call(this, e);\n this.mouseupHandler = e => this.mouseup.call(this, e);\n\n this.mouseTarget.addEventListener(\n \"mousemove\",\n this.mousemoveHandler,\n false\n );\n }\n\n /**\n * start emit particle\n * @method emit\n */\n emit() {\n this._allowEmitting = true;\n }\n\n /**\n * stop emiting\n * @method stop\n */\n stop() {\n this._allowEmitting = false;\n }\n\n mousemove(e) {\n if (e.layerX || e.layerX === 0) {\n this.p.x += (e.layerX - this.p.x) * this.ease;\n this.p.y += (e.layerY - this.p.y) * this.ease;\n } else if (e.offsetX || e.offsetX === 0) {\n this.p.x += (e.offsetX - this.p.x) * this.ease;\n this.p.y += (e.offsetY - this.p.y) * this.ease;\n }\n\n if (this._allowEmitting) super.emit(\"once\");\n }\n\n /**\n * Destory this Emitter\n * @method destroy\n */\n destroy() {\n super.destroy();\n this.mouseTarget.removeEventListener(\n \"mousemove\",\n this.mousemoveHandler,\n false\n );\n }\n}\n","import Pool from \"../core/Pool\";\n\nexport default class BaseRenderer {\n constructor(element, stroke) {\n this.pool = new Pool();\n this.element = element;\n this.stroke = stroke;\n this.circleConf = { isCircle: true };\n\n this.initHandler();\n this.name = \"BaseRenderer\";\n }\n\n setStroke(color = \"#000000\", thinkness = 1) {\n this.stroke = { color, thinkness };\n }\n\n initHandler() {\n this._protonUpdateHandler = () => {\n this.onProtonUpdate.call(this);\n };\n\n this._protonUpdateAfterHandler = () => {\n this.onProtonUpdateAfter.call(this);\n };\n\n this._emitterAddedHandler = emitter => {\n this.onEmitterAdded.call(this, emitter);\n };\n\n this._emitterRemovedHandler = emitter => {\n this.onEmitterRemoved.call(this, emitter);\n };\n\n this._particleCreatedHandler = particle => {\n this.onParticleCreated.call(this, particle);\n };\n\n this._particleUpdateHandler = particle => {\n this.onParticleUpdate.call(this, particle);\n };\n\n this._particleDeadHandler = particle => {\n this.onParticleDead.call(this, particle);\n };\n }\n\n init(proton) {\n this.parent = proton;\n\n proton.addEventListener(\"PROTON_UPDATE\", this._protonUpdateHandler);\n proton.addEventListener(\n \"PROTON_UPDATE_AFTER\",\n this._protonUpdateAfterHandler\n );\n\n proton.addEventListener(\"EMITTER_ADDED\", this._emitterAddedHandler);\n proton.addEventListener(\"EMITTER_REMOVED\", this._emitterRemovedHandler);\n\n proton.addEventListener(\n \"PARTICLE_CREATED\",\n this._particleCreatedHandler\n );\n proton.addEventListener(\"PARTICLE_UPDATE\", this._particleUpdateHandler);\n proton.addEventListener(\"PARTICLE_DEAD\", this._particleDeadHandler);\n }\n\n resize(width, height) {}\n\n destroy() {\n this.remove();\n }\n\n remove(proton) {\n this.parent.removeEventListener(\n \"PROTON_UPDATE\",\n this._protonUpdateHandler\n );\n this.parent.removeEventListener(\n \"PROTON_UPDATE_AFTER\",\n this._protonUpdateAfterHandler\n );\n\n this.parent.removeEventListener(\n \"EMITTER_ADDED\",\n this._emitterAddedHandler\n );\n this.parent.removeEventListener(\n \"EMITTER_REMOVED\",\n this._emitterRemovedHandler\n );\n\n this.parent.removeEventListener(\n \"PARTICLE_CREATED\",\n this._particleCreatedHandler\n );\n this.parent.removeEventListener(\n \"PARTICLE_UPDATE\",\n this._particleUpdateHandler\n );\n this.parent.removeEventListener(\n \"PARTICLE_DEAD\",\n this._particleDeadHandler\n );\n\n this.parent = null;\n }\n\n onProtonUpdate() {}\n onProtonUpdateAfter() {}\n\n onEmitterAdded(emitter) {}\n onEmitterRemoved(emitter) {}\n\n onParticleCreated(particle) {}\n onParticleUpdate(particle) {}\n onParticleDead(particle) {}\n}\n","import ImgUtil from \"../utils/ImgUtil\";\nimport ColorUtil from \"../utils/ColorUtil\";\nimport MathUtil from \"../math/MathUtil\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nexport default class CanvasRenderer extends BaseRenderer {\n constructor(element) {\n super(element);\n\n this.stroke = null;\n this.context = this.element.getContext(\"2d\");\n this.bufferCache = {};\n this.name = \"CanvasRenderer\";\n }\n\n resize(width, height) {\n this.element.width = width;\n this.element.height = height;\n }\n\n onProtonUpdate() {\n this.context.clearRect(0, 0, this.element.width, this.element.height);\n }\n\n onParticleCreated(particle) {\n if (particle.body) {\n ImgUtil.getImgFromCache(particle.body, this.addImg2Body, particle);\n } else {\n particle.color = particle.color || \"#ff0000\";\n }\n }\n\n onParticleUpdate(particle) {\n if (particle.body) {\n if (particle.body instanceof Image) this.drawImage(particle);\n } else {\n this.drawCircle(particle);\n }\n }\n\n onParticleDead(particle) {\n particle.body = null;\n }\n\n // private\n addImg2Body(img, particle) {\n particle.body = img;\n }\n\n // private drawCircle\n drawImage(particle) {\n const w = (particle.body.width * particle.scale) | 0;\n const h = (particle.body.height * particle.scale) | 0;\n const x = particle.p.x - w / 2;\n const y = particle.p.y - h / 2;\n\n if (!!particle.color) {\n if (!particle.data[\"buffer\"])\n particle.data.buffer = this.createBuffer(particle.body);\n\n const bufContext = particle.data.buffer.getContext(\"2d\");\n bufContext.clearRect(\n 0,\n 0,\n particle.data.buffer.width,\n particle.data.buffer.height\n );\n bufContext.globalAlpha = particle.alpha;\n bufContext.drawImage(particle.body, 0, 0);\n\n bufContext.globalCompositeOperation = \"source-atop\";\n bufContext.fillStyle = ColorUtil.rgbToHex(particle.rgb);\n bufContext.fillRect(\n 0,\n 0,\n particle.data.buffer.width,\n particle.data.buffer.height\n );\n bufContext.globalCompositeOperation = \"source-over\";\n bufContext.globalAlpha = 1;\n\n this.context.drawImage(\n particle.data.buffer,\n 0,\n 0,\n particle.data.buffer.width,\n particle.data.buffer.height,\n x,\n y,\n w,\n h\n );\n } else {\n this.context.save();\n\n this.context.globalAlpha = particle.alpha;\n this.context.translate(particle.p.x, particle.p.y);\n this.context.rotate(MathUtil.degreeTransform(particle.rotation));\n this.context.translate(-particle.p.x, -particle.p.y);\n this.context.drawImage(\n particle.body,\n 0,\n 0,\n particle.body.width,\n particle.body.height,\n x,\n y,\n w,\n h\n );\n\n this.context.globalAlpha = 1;\n this.context.restore();\n }\n }\n\n // private drawCircle --\n drawCircle(particle) {\n if (particle.rgb) {\n this.context.fillStyle = `rgba(${particle.rgb.r},${particle.rgb.g},${particle.rgb.b},${particle.alpha})`;\n } else {\n this.context.fillStyle = particle.color;\n }\n\n // draw circle\n this.context.beginPath();\n this.context.arc(\n particle.p.x,\n particle.p.y,\n particle.radius,\n 0,\n Math.PI * 2,\n true\n );\n\n if (this.stroke) {\n this.context.strokeStyle = this.stroke.color;\n this.context.lineWidth = this.stroke.thinkness;\n this.context.stroke();\n }\n\n this.context.closePath();\n this.context.fill();\n }\n\n // private createBuffer\n createBuffer(image) {\n if (image instanceof Image) {\n const size = image.width + \"_\" + image.height;\n let canvas = this.bufferCache[size];\n\n if (!canvas) {\n canvas = document.createElement(\"canvas\");\n canvas.width = image.width;\n canvas.height = image.height;\n this.bufferCache[size] = canvas;\n }\n\n return canvas;\n }\n }\n}\n","import DomUtil from \"../utils/DomUtil\";\nimport ImgUtil from \"../utils/ImgUtil\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nexport default class DomRenderer extends BaseRenderer {\n constructor(element) {\n super(element);\n\n this.stroke = null;\n this.pool.create = (body, particle) => this.createBody(body, particle);\n this.addImg2Body = this.addImg2Body.bind(this);\n\n this.transform3d = false;\n this.name = \"DomRenderer\";\n }\n\n onParticleCreated(particle) {\n if (particle.body) {\n ImgUtil.getImgFromCache(particle.body, this.addImg2Body, particle);\n } else {\n particle.body = this.pool.get(this.circleConf, particle);\n this.element.appendChild(particle.body);\n }\n }\n\n onParticleUpdate(particle) {\n if (this.bodyReady(particle)) {\n if (this.transform3d)\n DomUtil.transform3d(\n particle.body,\n particle.p.x,\n particle.p.y,\n particle.scale,\n particle.rotation\n );\n else\n DomUtil.transform(\n particle.body,\n particle.p.x,\n particle.p.y,\n particle.scale,\n particle.rotation\n );\n\n particle.body.style.opacity = particle.alpha;\n if (particle.body.isCircle) {\n particle.body.style.backgroundColor = particle.color || \"#ff0000\";\n }\n }\n }\n\n onParticleDead(particle) {\n if (this.bodyReady(particle)) {\n this.element.removeChild(particle.body);\n this.pool.expire(particle.body);\n particle.body = null;\n }\n }\n\n bodyReady(particle) {\n return (\n typeof particle.body === \"object\" &&\n particle.body &&\n !particle.body.isInner\n );\n }\n\n // private\n addImg2Body(img, particle) {\n if (particle.dead) return;\n particle.body = this.pool.get(img, particle);\n DomUtil.resize(particle.body, img.width, img.height);\n\n this.element.appendChild(particle.body);\n }\n\n createBody(body, particle) {\n if (body.isCircle) return this.createCircle(particle);\n else return this.createSprite(body, particle);\n }\n\n // private --\n createCircle(particle) {\n const dom = DomUtil.createDiv(\n `${particle.id}_dom`,\n 2 * particle.radius,\n 2 * particle.radius\n );\n dom.style.borderRadius = `${particle.radius}px`;\n\n if (this.stroke) {\n dom.style.borderColor = this.stroke.color;\n dom.style.borderWidth = `${this.stroke.thinkness}px`;\n }\n dom.isCircle = true;\n\n return dom;\n }\n\n createSprite(body, particle) {\n const url = typeof body === \"string\" ? body : body.src;\n const dom = DomUtil.createDiv(\n `${particle.id}_dom`,\n body.width,\n body.height\n );\n dom.style.backgroundImage = `url(${url})`;\n\n return dom;\n }\n}\n","import BaseRenderer from \"./BaseRenderer\";\n\nexport default class EaselRenderer extends BaseRenderer {\n constructor(element, stroke) {\n super(element);\n\n this.stroke = stroke;\n this.name = \"EaselRenderer\";\n }\n\n onParticleCreated(particle) {\n if (particle.body) {\n this.createSprite(particle);\n } else {\n this.createCircle(particle);\n }\n\n this.element.addChild(particle.body);\n }\n\n onParticleUpdate(particle) {\n if (particle.body) {\n particle.body.x = particle.p.x;\n particle.body.y = particle.p.y;\n\n particle.body.alpha = particle.alpha;\n particle.body.scaleX = particle.body.scaleY = particle.scale;\n particle.body.rotation = particle.rotation;\n }\n }\n\n onParticleDead(particle) {\n if (particle.body) {\n particle.body.parent && particle.body.parent.removeChild(particle.body);\n this.pool.expire(particle.body);\n particle.body = null;\n }\n\n if (particle.graphics) this.pool.expire(particle.graphics);\n }\n\n // private\n createSprite(particle) {\n particle.body = this.pool.get(particle.body);\n\n if (particle.body.parent) return;\n if (particle.body[\"image\"]) {\n particle.body.regX = particle.body.image.width / 2;\n particle.body.regY = particle.body.image.height / 2;\n }\n }\n\n createCircle(particle) {\n const graphics = this.pool.get(createjs.Graphics);\n\n if (this.stroke) {\n if (this.stroke instanceof String) graphics.beginStroke(this.stroke);\n else graphics.beginStroke(\"#000000\");\n }\n graphics\n .beginFill(particle.color || \"#ff0000\")\n .drawCircle(0, 0, particle.radius);\n\n const shape = this.pool.get(createjs.Shape, [graphics]);\n\n particle.body = shape;\n particle.graphics = graphics;\n }\n}\n","import Rectangle from \"../math/Rectangle\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nexport default class PixelRenderer extends BaseRenderer {\n constructor(element, rectangle) {\n super(element);\n\n this.context = this.element.getContext(\"2d\");\n this.imageData = null;\n this.rectangle = null;\n this.rectangle = rectangle;\n this.createImageData(rectangle);\n\n this.name = \"PixelRenderer\";\n }\n\n resize(width, height) {\n this.element.width = width;\n this.element.height = height;\n }\n\n createImageData(rectangle) {\n this.rectangle = rectangle\n ? rectangle\n : new Rectangle(0, 0, this.element.width, this.element.height);\n this.imageData = this.context.createImageData(\n this.rectangle.width,\n this.rectangle.height\n );\n this.context.putImageData(\n this.imageData,\n this.rectangle.x,\n this.rectangle.y\n );\n }\n\n onProtonUpdate() {\n this.context.clearRect(\n this.rectangle.x,\n this.rectangle.y,\n this.rectangle.width,\n this.rectangle.height\n );\n this.imageData = this.context.getImageData(\n this.rectangle.x,\n this.rectangle.y,\n this.rectangle.width,\n this.rectangle.height\n );\n }\n\n onProtonUpdateAfter() {\n this.context.putImageData(\n this.imageData,\n this.rectangle.x,\n this.rectangle.y\n );\n }\n\n onParticleCreated(particle) {}\n\n onParticleUpdate(particle) {\n if (this.imageData) {\n this.setPixel(\n this.imageData,\n Math.floor(particle.p.x - this.rectangle.x),\n Math.floor(particle.p.y - this.rectangle.y),\n particle\n );\n }\n }\n\n setPixel(imagedata, x, y, particle) {\n const rgb = particle.rgb;\n if (x < 0 || x > this.element.width || y < 0 || y > this.elementwidth)\n return;\n\n const i = ((y >> 0) * imagedata.width + (x >> 0)) * 4;\n\n imagedata.data[i] = rgb.r;\n imagedata.data[i + 1] = rgb.g;\n imagedata.data[i + 2] = rgb.b;\n imagedata.data[i + 3] = particle.alpha * 255;\n }\n\n onParticleDead(particle) {}\n}\n","import ColorUtil from \"../utils/ColorUtil\";\nimport MathUtil from \"../math/MathUtil\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nlet PIXIClass;\nexport default class PixiRenderer extends BaseRenderer {\n constructor(element, stroke) {\n super(element);\n\n this.stroke = stroke;\n this.color = false;\n this.setColor = false;\n this.blendMode = null;\n this.pool.create = (body, particle) => this.createBody(body, particle);\n this.setPIXI(window.PIXI);\n\n this.name = \"PixiRenderer\";\n }\n\n setPIXI(PIXI) {\n try {\n PIXIClass = PIXI || { Sprite: {} };\n this.createFromImage =\n PIXIClass.Sprite.from || PIXIClass.Sprite.fromImage;\n } catch (e) {}\n }\n\n onProtonUpdate() {}\n\n /**\n * @param particle\n */\n onParticleCreated(particle) {\n if (particle.body) {\n particle.body = this.pool.get(particle.body, particle);\n } else {\n particle.body = this.pool.get(this.circleConf, particle);\n }\n\n if (this.blendMode) {\n particle.body.blendMode = this.blendMode;\n }\n\n this.element.addChild(particle.body);\n }\n\n /**\n * @param particle\n */\n onParticleUpdate(particle) {\n this.transform(particle, particle.body);\n\n if (this.setColor === true || this.color === true) {\n particle.body.tint = ColorUtil.getHex16FromParticle(particle);\n }\n }\n\n /**\n * @param particle\n */\n onParticleDead(particle) {\n this.element.removeChild(particle.body);\n this.pool.expire(particle.body);\n particle.body = null;\n }\n\n destroy(particles) {\n super.destroy();\n this.pool.destroy();\n\n let i = particles.length;\n while (i--) {\n let particle = particles[i];\n if (particle.body) {\n this.element.removeChild(particle.body);\n }\n }\n }\n\n transform(particle, target) {\n target.x = particle.p.x;\n target.y = particle.p.y;\n\n target.alpha = particle.alpha;\n\n target.scale.x = particle.scale;\n target.scale.y = particle.scale;\n\n // using cached version of MathUtil.PI_180 for slight performance increase.\n target.rotation = particle.rotation * MathUtil.PI_180; // MathUtil.PI_180;\n }\n\n createBody(body, particle) {\n if (body.isCircle) return this.createCircle(particle);\n else return this.createSprite(body);\n }\n\n createSprite(body) {\n const sprite = body.isInner\n ? this.createFromImage(body.src)\n : new PIXIClass.Sprite(body);\n\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n\n return sprite;\n }\n\n createCircle(particle) {\n const graphics = new PIXIClass.Graphics();\n\n if (this.stroke) {\n const stroke = this.stroke instanceof String ? this.stroke : 0x000000;\n graphics.beginStroke(stroke);\n }\n\n graphics.beginFill(particle.color || 0x008ced);\n graphics.drawCircle(0, 0, particle.radius);\n graphics.endFill();\n\n return graphics;\n }\n}\n","import Mat3 from \"../math/Mat3\";\n\nexport default class MStack {\n constructor() {\n this.mats = [];\n this.size = 0;\n\n for (let i = 0; i < 20; i++)\n this.mats.push(Mat3.create([0, 0, 0, 0, 0, 0, 0, 0, 0]));\n }\n\n set(m, i) {\n if (i === 0) Mat3.set(m, this.mats[0]);\n else Mat3.multiply(this.mats[i - 1], m, this.mats[i]);\n\n this.size = Math.max(this.size, i + 1);\n }\n\n push(m) {\n if (this.size === 0) Mat3.set(m, this.mats[0]);\n else Mat3.multiply(this.mats[this.size - 1], m, this.mats[this.size]);\n\n this.size++;\n }\n\n pop() {\n if (this.size > 0) this.size--;\n }\n\n top() {\n return this.mats[this.size - 1];\n }\n}\n","import Mat3 from '../math/Mat3';\nimport BaseRenderer from './BaseRenderer';\n\nimport Util from '../utils/Util';\nimport ImgUtil from '../utils/ImgUtil';\nimport MStack from '../utils/MStack';\nimport DomUtil from '../utils/DomUtil';\nimport WebGLUtil from '../utils/WebGLUtil';\nimport MathUtil from '../math/MathUtil';\n\nexport default class WebGLRenderer extends BaseRenderer {\n\n constructor(element) {\n super(element);\n\n this.gl = this.element.getContext('experimental-webgl', { antialias: true, stencil: false, depth: false });\n if (!this.gl) alert('Sorry your browser do not suppest WebGL!');\n\n this.initVar();\n this.setMaxRadius();\n this.initShaders();\n this.initBuffers();\n\n this.gl.blendEquation(this.gl.FUNC_ADD);\n this.gl.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA);\n this.gl.enable(this.gl.BLEND);\n\n this.addImg2Body = this.addImg2Body.bind(this);\n\n this.name = 'WebGLRenderer';\n }\n\n init(proton) {\n super.init(proton);\n this.resize(this.element.width, this.element.height);\n }\n\n resize(width, height) {\n this.umat[4] = -2;\n this.umat[7] = 1;\n\n this.smat[0] = 1 / width;\n this.smat[4] = 1 / height;\n\n this.mstack.set(this.umat, 0);\n this.mstack.set(this.smat, 1);\n\n this.gl.viewport(0, 0, width, height);\n this.element.width = width;\n this.element.height = height;\n }\n\n setMaxRadius(radius) {\n this.circleCanvasURL = this.createCircle(radius);\n }\n\n getVertexShader() {\n const vsSource = ['uniform vec2 viewport;', 'attribute vec2 aVertexPosition;', 'attribute vec2 aTextureCoord;', 'uniform mat3 tMat;', 'varying vec2 vTextureCoord;', 'varying float alpha;', 'void main() {', 'vec3 v = tMat * vec3(aVertexPosition, 1.0);', 'gl_Position = vec4(v.x, v.y, 0, 1);', 'vTextureCoord = aTextureCoord;', 'alpha = tMat[0][2];', '}'].join('\\n');\n return vsSource;\n }\n\n getFragmentShader() {\n const fsSource = ['precision mediump float;', 'varying vec2 vTextureCoord;', 'varying float alpha;', 'uniform sampler2D uSampler;', 'uniform vec4 color;', 'uniform bool useTexture;', 'uniform vec3 uColor;', 'void main() {', 'vec4 textureColor = texture2D(uSampler, vTextureCoord);', 'gl_FragColor = textureColor * vec4(uColor, 1.0);', 'gl_FragColor.w *= alpha;', '}'].join('\\n');\n return fsSource;\n }\n\n initVar() {\n this.mstack = new MStack();\n this.umat = Mat3.create([2, 0, 1, 0, -2, 0, -1, 1, 1]);\n this.smat = Mat3.create([1 / 100, 0, 1, 0, 1 / 100, 0, 0, 0, 1]);\n this.texturebuffers = {};\n }\n\n blendEquation(A) {\n this.gl.blendEquation(this.gl[A]);\n }\n\n blendFunc(A, B) {\n this.gl.blendFunc(this.gl[A], this.gl[B]);\n }\n\n getShader(gl, str, fs) {\n const shader = fs ? gl.createShader(gl.FRAGMENT_SHADER) : gl.createShader(gl.VERTEX_SHADER);\n\n gl.shaderSource(shader, str);\n gl.compileShader(shader);\n\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n alert(gl.getShaderInfoLog(shader));\n return null;\n }\n\n return shader;\n }\n\n initShaders() {\n const fragmentShader = this.getShader(this.gl, this.getFragmentShader(), true);\n const vertexShader = this.getShader(this.gl, this.getVertexShader(), false);\n\n this.sprogram = this.gl.createProgram();\n this.gl.attachShader(this.sprogram, vertexShader);\n this.gl.attachShader(this.sprogram, fragmentShader);\n this.gl.linkProgram(this.sprogram);\n\n if (!this.gl.getProgramParameter(this.sprogram, this.gl.LINK_STATUS))\n alert('Could not initialise shaders');\n\n this.gl.useProgram(this.sprogram);\n this.sprogram.vpa = this.gl.getAttribLocation(this.sprogram, 'aVertexPosition');\n this.sprogram.tca = this.gl.getAttribLocation(this.sprogram, 'aTextureCoord');\n this.gl.enableVertexAttribArray(this.sprogram.tca);\n this.gl.enableVertexAttribArray(this.sprogram.vpa);\n\n this.sprogram.tMatUniform = this.gl.getUniformLocation(this.sprogram, 'tMat');\n this.sprogram.samplerUniform = this.gl.getUniformLocation(this.sprogram, 'uSampler');\n this.sprogram.useTex = this.gl.getUniformLocation(this.sprogram, 'useTexture');\n this.sprogram.color = this.gl.getUniformLocation(this.sprogram, 'uColor');\n this.gl.uniform1i(this.sprogram.useTex, 1);\n };\n\n initBuffers() {\n const vs = [0, 3, 1, 0, 2, 3];\n let idx;\n\n this.unitIBuffer = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.unitIBuffer);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vs), this.gl.STATIC_DRAW);\n\n let i;\n let ids = [];\n for (i = 0; i < 100; i++) ids.push(i);\n idx = new Uint16Array(ids);\n\n this.unitI33 = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.unitI33);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, idx, this.gl.STATIC_DRAW);\n\n ids = [];\n for (i = 0; i < 100; i++) ids.push(i, i + 1, i + 2);\n idx = new Uint16Array(ids);\n\n this.stripBuffer = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.stripBuffer);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, idx, this.gl.STATIC_DRAW);\n };\n\n createCircle(raidus) {\n this.circleCanvasRadius = WebGLUtil.nhpot(Util.initValue(raidus, 32));\n const canvas = DomUtil.createCanvas('circle_canvas', this.circleCanvasRadius * 2, this.circleCanvasRadius * 2);\n const context = canvas.getContext('2d');\n\n context.beginPath();\n context.arc(this.circleCanvasRadius, this.circleCanvasRadius, this.circleCanvasRadius, 0, Math.PI * 2, true);\n context.closePath();\n context.fillStyle = '#FFF';\n context.fill();\n\n return canvas.toDataURL();\n };\n\n drawImg2Canvas(particle) {\n const _w = particle.body.width;\n const _h = particle.body.height;\n\n const _width = WebGLUtil.nhpot(particle.body.width);\n const _height = WebGLUtil.nhpot(particle.body.height);\n\n const _scaleX = particle.body.width / _width;\n const _scaleY = particle.body.height / _height;\n\n if (!this.texturebuffers[particle.data.src])\n this.texturebuffers[particle.data.src] = [this.gl.createTexture(), this.gl.createBuffer(), this.gl.createBuffer()];\n\n particle.data.texture = this.texturebuffers[particle.data.src][0];\n particle.data.vcBuffer = this.texturebuffers[particle.data.src][1];\n particle.data.tcBuffer = this.texturebuffers[particle.data.src][2];\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.tcBuffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, _scaleX, 0.0, 0.0, _scaleY, _scaleY, _scaleY]), this.gl.STATIC_DRAW);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.vcBuffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, _w, 0.0, 0.0, _h, _w, _h]), this.gl.STATIC_DRAW);\n\n const context = particle.data.canvas.getContext('2d');\n const data = context.getImageData(0, 0, _width, _height);\n\n this.gl.bindTexture(this.gl.TEXTURE_2D, particle.data.texture);\n this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.gl.RGBA, this.gl.UNSIGNED_BYTE, data);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR_MIPMAP_NEAREST);\n this.gl.generateMipmap(this.gl.TEXTURE_2D);\n\n particle.data.textureLoaded = true;\n particle.data.textureWidth = _w;\n particle.data.textureHeight = _h;\n }\n\n onProtonUpdate() {\n // this.gl.clearColor(0, 0, 0, 1);\n // this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);\n }\n\n onParticleCreated(particle) {\n particle.data.textureLoaded = false;\n particle.data.tmat = Mat3.create();\n particle.data.tmat[8] = 1;\n particle.data.imat = Mat3.create();\n particle.data.imat[8] = 1;\n\n if (particle.body) {\n ImgUtil.getImgFromCache(particle.body, this.addImg2Body, particle);\n } else {\n ImgUtil.getImgFromCache(this.circleCanvasURL, this.addImg2Body, particle);\n particle.data.oldScale = particle.radius / this.circleCanvasRadius;\n }\n }\n\n // private\n addImg2Body(img, particle) {\n if (particle.dead) return;\n particle.body = img;\n particle.data.src = img.src;\n particle.data.canvas = ImgUtil.getCanvasFromCache(img);\n particle.data.oldScale = 1;\n\n this.drawImg2Canvas(particle);\n }\n\n onParticleUpdate(particle) {\n if (particle.data.textureLoaded) {\n this.updateMatrix(particle);\n\n this.gl.uniform3f(this.sprogram.color, particle.rgb.r / 255, particle.rgb.g / 255, particle.rgb.b / 255);\n this.gl.uniformMatrix3fv(this.sprogram.tMatUniform, false, this.mstack.top());\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.vcBuffer);\n this.gl.vertexAttribPointer(this.sprogram.vpa, 2, this.gl.FLOAT, false, 0, 0);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.tcBuffer);\n this.gl.vertexAttribPointer(this.sprogram.tca, 2, this.gl.FLOAT, false, 0, 0);\n this.gl.bindTexture(this.gl.TEXTURE_2D, particle.data.texture);\n this.gl.uniform1i(this.sprogram.samplerUniform, 0);\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.unitIBuffer);\n\n this.gl.drawElements(this.gl.TRIANGLES, 6, this.gl.UNSIGNED_SHORT, 0);\n\n this.mstack.pop();\n }\n }\n\n onParticleDead(particle) { }\n\n updateMatrix(particle) {\n const moveOriginMatrix = WebGLUtil.makeTranslation(-particle.data.textureWidth / 2, -particle.data.textureHeight / 2);\n const translationMatrix = WebGLUtil.makeTranslation(particle.p.x, particle.p.y);\n\n const angel = particle.rotation * (MathUtil.PI_180);\n const rotationMatrix = WebGLUtil.makeRotation(angel);\n\n const scale = particle.scale * particle.data.oldScale;\n const scaleMatrix = WebGLUtil.makeScale(scale, scale);\n let matrix = WebGLUtil.matrixMultiply(moveOriginMatrix, scaleMatrix);\n\n matrix = WebGLUtil.matrixMultiply(matrix, rotationMatrix);\n matrix = WebGLUtil.matrixMultiply(matrix, translationMatrix);\n\n Mat3.inverse(matrix, particle.data.imat);\n matrix[2] = particle.alpha;\n\n this.mstack.push(matrix);\n }\n}","import BaseRenderer from \"./BaseRenderer\";\n\nexport default class CustomRenderer extends BaseRenderer {\n constructor(element) {\n super(element);\n\n this.name = \"CustomRenderer\";\n }\n}\n","import Zone from \"./Zone\";\nimport Util from \"../utils/Util\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class LineZone extends Zone {\n constructor(x1, y1, x2, y2, direction) {\n super();\n\n if (x2 - x1 >= 0) {\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n } else {\n this.x1 = x2;\n this.y1 = y2;\n this.x2 = x1;\n this.y2 = y1;\n }\n\n this.dx = this.x2 - this.x1;\n this.dy = this.y2 - this.y1;\n\n this.minx = Math.min(this.x1, this.x2);\n this.miny = Math.min(this.y1, this.y2);\n this.maxx = Math.max(this.x1, this.x2);\n this.maxy = Math.max(this.y1, this.y2);\n\n this.dot = this.x2 * this.y1 - this.x1 * this.y2;\n this.xxyy = this.dx * this.dx + this.dy * this.dy;\n\n this.gradient = this.getGradient();\n this.length = this.getLength();\n this.direction = Util.initValue(direction, \">\");\n }\n\n getPosition() {\n this.random = Math.random();\n\n this.vector.x =\n this.x1 + this.random * this.length * Math.cos(this.gradient);\n this.vector.y =\n this.y1 + this.random * this.length * Math.sin(this.gradient);\n\n return this.vector;\n }\n\n getDirection(x, y) {\n const A = this.dy;\n const B = -this.dx;\n const C = this.dot;\n const D = B === 0 ? 1 : B;\n\n if ((A * x + B * y + C) * D > 0) return true;\n else return false;\n }\n\n getDistance(x, y) {\n const A = this.dy;\n const B = -this.dx;\n const C = this.dot;\n const D = A * x + B * y + C;\n\n return D / Math.sqrt(this.xxyy);\n }\n\n getSymmetric(v) {\n const tha2 = v.getGradient();\n const tha1 = this.getGradient();\n const tha = 2 * (tha1 - tha2);\n\n const oldx = v.x;\n const oldy = v.y;\n\n v.x = oldx * Math.cos(tha) - oldy * Math.sin(tha);\n v.y = oldx * Math.sin(tha) + oldy * Math.cos(tha);\n\n return v;\n }\n\n getGradient() {\n return Math.atan2(this.dy, this.dx);\n }\n\n rangeOut(particle) {\n const angle = Math.abs(this.getGradient());\n\n if (angle <= MathUtil.PI / 4) {\n if (particle.p.x <= this.maxx && particle.p.x >= this.minx) return true;\n } else {\n if (particle.p.y <= this.maxy && particle.p.y >= this.miny) return true;\n }\n\n return false;\n }\n\n getLength() {\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\n }\n\n crossing(particle) {\n if (this.crossType === \"dead\") {\n if (\n this.direction === \">\" ||\n this.direction === \"R\" ||\n this.direction === \"right\" ||\n this.direction === \"down\"\n ) {\n if (!this.rangeOut(particle)) return;\n if (this.getDirection(particle.p.x, particle.p.y)) particle.dead = true;\n } else {\n if (!this.rangeOut(particle)) return;\n if (!this.getDirection(particle.p.x, particle.p.y))\n particle.dead = true;\n }\n } else if (this.crossType === \"bound\") {\n if (!this.rangeOut(particle)) return;\n\n if (this.getDistance(particle.p.x, particle.p.y) <= particle.radius) {\n if (this.dx === 0) {\n particle.v.x *= -1;\n } else if (this.dy === 0) {\n particle.v.y *= -1;\n } else {\n this.getSymmetric(particle.v);\n }\n }\n } else if (this.crossType === \"cross\") {\n if (this.alert) {\n console.error(\"Sorry, LineZone does not support cross method!\");\n this.alert = false;\n }\n }\n }\n}\n","import Zone from \"./Zone\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class CircleZone extends Zone {\n constructor(x, y, radius) {\n super();\n\n this.x = x;\n this.y = y;\n this.radius = radius;\n\n this.angle = 0;\n this.center = { x, y };\n }\n\n getPosition() {\n this.angle = MathUtil.PIx2 * Math.random();\n this.randomRadius = Math.random() * this.radius;\n\n this.vector.x = this.x + this.randomRadius * Math.cos(this.angle);\n this.vector.y = this.y + this.randomRadius * Math.sin(this.angle);\n\n return this.vector;\n }\n\n setCenter(x, y) {\n this.center.x = x;\n this.center.y = y;\n }\n\n crossing(particle) {\n const d = particle.p.distanceTo(this.center);\n\n if (this.crossType === \"dead\") {\n if (d - particle.radius > this.radius) particle.dead = true;\n } else if (this.crossType === \"bound\") {\n if (d + particle.radius >= this.radius) this.getSymmetric(particle);\n } else if (this.crossType === \"cross\") {\n if (this.alert) {\n console.error(\"Sorry, CircleZone does not support cross method!\");\n this.alert = false;\n }\n }\n }\n\n getSymmetric(particle) {\n let tha2 = particle.v.getGradient();\n let tha1 = this.getGradient(particle);\n\n let tha = 2 * (tha1 - tha2);\n let oldx = particle.v.x;\n let oldy = particle.v.y;\n\n particle.v.x = oldx * Math.cos(tha) - oldy * Math.sin(tha);\n particle.v.y = oldx * Math.sin(tha) + oldy * Math.cos(tha);\n }\n\n getGradient(particle) {\n return (\n -MathUtil.PI_2 +\n Math.atan2(particle.p.y - this.center.y, particle.p.x - this.center.x)\n );\n }\n}\n","import Zone from \"./Zone\";\n\nexport default class RectZone extends Zone {\n constructor(x, y, width, height) {\n super();\n\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n\n getPosition() {\n this.vector.x = this.x + Math.random() * this.width;\n this.vector.y = this.y + Math.random() * this.height;\n\n return this.vector;\n }\n\n crossing(particle) {\n // particle dead zone\n if (this.crossType === \"dead\") {\n if (particle.p.x + particle.radius < this.x) particle.dead = true;\n else if (particle.p.x - particle.radius > this.x + this.width)\n particle.dead = true;\n\n if (particle.p.y + particle.radius < this.y) particle.dead = true;\n else if (particle.p.y - particle.radius > this.y + this.height)\n particle.dead = true;\n }\n\n // particle bound zone\n else if (this.crossType === \"bound\") {\n if (particle.p.x - particle.radius < this.x) {\n particle.p.x = this.x + particle.radius;\n particle.v.x *= -1;\n } else if (particle.p.x + particle.radius > this.x + this.width) {\n particle.p.x = this.x + this.width - particle.radius;\n particle.v.x *= -1;\n }\n\n if (particle.p.y - particle.radius < this.y) {\n particle.p.y = this.y + particle.radius;\n particle.v.y *= -1;\n } else if (particle.p.y + particle.radius > this.y + this.height) {\n particle.p.y = this.y + this.height - particle.radius;\n particle.v.y *= -1;\n }\n }\n\n // particle cross zone\n else if (this.crossType === \"cross\") {\n if (particle.p.x + particle.radius < this.x && particle.v.x <= 0)\n particle.p.x = this.x + this.width + particle.radius;\n else if (\n particle.p.x - particle.radius > this.x + this.width &&\n particle.v.x >= 0\n )\n particle.p.x = this.x - particle.radius;\n\n if (particle.p.y + particle.radius < this.y && particle.v.y <= 0)\n particle.p.y = this.y + this.height + particle.radius;\n else if (\n particle.p.y - particle.radius > this.y + this.height &&\n particle.v.y >= 0\n )\n particle.p.y = this.y - particle.radius;\n }\n }\n}\n","import Zone from \"./Zone\";\nimport Util from \"../utils/Util\";\n\nexport default class ImageZone extends Zone {\n constructor(imageData, x, y, d) {\n super();\n\n this.reset(imageData, x, y, d);\n }\n\n reset(imageData, x, y, d) {\n this.imageData = imageData;\n this.x = Util.initValue(x, 0);\n this.y = Util.initValue(y, 0);\n this.d = Util.initValue(d, 2);\n\n this.vectors = [];\n this.setVectors();\n }\n\n setVectors() {\n let i, j;\n const length1 = this.imageData.width;\n const length2 = this.imageData.height;\n\n for (i = 0; i < length1; i += this.d) {\n for (j = 0; j < length2; j += this.d) {\n let index = ((j >> 0) * length1 + (i >> 0)) * 4;\n\n if (this.imageData.data[index + 3] > 0) {\n this.vectors.push({ x: i + this.x, y: j + this.y });\n }\n }\n }\n\n return this.vector;\n }\n\n getBound(x, y) {\n var index = ((y >> 0) * this.imageData.width + (x >> 0)) * 4;\n if (this.imageData.data[index + 3] > 0) return true;\n else return false;\n }\n\n getPosition() {\n const vector = Util.getRandFromArray(this.vectors);\n return this.vector.copy(vector);\n }\n\n getColor(x, y) {\n x -= this.x;\n y -= this.y;\n var i = ((y >> 0) * this.imageData.width + (x >> 0)) * 4;\n\n return {\n r: this.imageData.data[i],\n g: this.imageData.data[i + 1],\n b: this.imageData.data[i + 2],\n a: this.imageData.data[i + 3]\n };\n }\n\n crossing(particle) {\n if (this.crossType === \"dead\") {\n if (this.getBound(particle.p.x - this.x, particle.p.y - this.y))\n particle.dead = true;\n else particle.dead = false;\n } else if (this.crossType === \"bound\") {\n if (!this.getBound(particle.p.x - this.x, particle.p.y - this.y))\n particle.v.negate();\n }\n }\n}\n","import ColorUtil from \"../utils/ColorUtil\";\nimport CircleZone from \"../zone/CircleZone\";\nimport PointZone from \"../zone/PointZone\";\nimport LineZone from \"../zone/LineZone\";\nimport RectZone from \"../zone/RectZone\";\n\nexport default {\n addEventListener(proton, func) {\n proton.addEventListener(\"PROTON_UPDATE_AFTER\", () => func());\n },\n\n getStyle(color = \"#ff0000\") {\n const rgb = ColorUtil.hexToRgb(color);\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.5)`;\n },\n\n drawZone(proton, canvas, zone, clear) {\n const context = canvas.getContext(\"2d\");\n const style = this.getStyle();\n\n this.addEventListener(proton, () => {\n if (clear) context.clearRect(0, 0, canvas.width, canvas.height);\n\n if (zone instanceof PointZone) {\n context.beginPath();\n context.fillStyle = style;\n context.arc(zone.x, zone.y, 10, 0, Math.PI * 2, true);\n context.fill();\n context.closePath();\n } else if (zone instanceof LineZone) {\n context.beginPath();\n context.strokeStyle = style;\n context.moveTo(zone.x1, zone.y1);\n context.lineTo(zone.x2, zone.y2);\n context.stroke();\n context.closePath();\n } else if (zone instanceof RectZone) {\n context.beginPath();\n context.strokeStyle = style;\n context.drawRect(zone.x, zone.y, zone.width, zone.height);\n context.stroke();\n context.closePath();\n } else if (zone instanceof CircleZone) {\n context.beginPath();\n context.strokeStyle = style;\n context.arc(zone.x, zone.y, zone.radius, 0, Math.PI * 2, true);\n context.stroke();\n context.closePath();\n }\n });\n },\n\n drawEmitter(proton, canvas, emitter, clear) {\n const context = canvas.getContext(\"2d\");\n const style = this.getStyle();\n\n this.addEventListener(proton, () => {\n if (clear) context.clearRect(0, 0, canvas.width, canvas.height);\n\n context.beginPath();\n context.fillStyle = style;\n context.arc(emitter.p.x, emitter.p.y, 10, 0, Math.PI * 2, true);\n context.fill();\n context.closePath();\n });\n }\n};\n","import Proton from \"./core/Proton\";\nimport Particle from \"./core/Particle\";\nimport Pool from \"./core/Pool\";\n\nimport Util from \"./utils/Util\";\nimport ColorUtil from \"./utils/ColorUtil\";\nimport MathUtil from \"./math/MathUtil\";\nimport Vector2D from \"./math/Vector2D\";\nimport Polar2D from \"./math/Polar2D\";\nimport Mat3 from \"./math/Mat3\";\nimport Span from \"./math/Span\";\nimport ArraySpan from \"./math/ArraySpan\";\nimport Rectangle from \"./math/Rectangle\";\nimport ease from \"./math/ease\";\n\nimport Rate from \"./initialize/Rate\";\nimport Initialize from \"./initialize/Initialize\";\nimport Life from \"./initialize/Life\";\nimport Position from \"./initialize/Position\";\nimport Velocity from \"./initialize/Velocity\";\nimport Mass from \"./initialize/Mass\";\nimport Radius from \"./initialize/Radius\";\nimport Body from \"./initialize/Body\";\n\nimport Behaviour from \"./behaviour/Behaviour\";\nimport Force from \"./behaviour/Force\";\nimport Attraction from \"./behaviour/Attraction\";\nimport RandomDrift from \"./behaviour/RandomDrift\";\nimport Gravity from \"./behaviour/Gravity\";\nimport Collision from \"./behaviour/Collision\";\nimport CrossZone from \"./behaviour/CrossZone\";\nimport Alpha from \"./behaviour/Alpha\";\nimport Scale from \"./behaviour/Scale\";\nimport Rotate from \"./behaviour/Rotate\";\nimport Color from \"./behaviour/Color\";\nimport Cyclone from \"./behaviour/Cyclone\";\nimport Repulsion from \"./behaviour/Repulsion\";\nimport GravityWell from \"./behaviour/GravityWell\";\n\nimport Emitter from \"./emitter/Emitter\";\nimport BehaviourEmitter from \"./emitter/BehaviourEmitter\";\nimport FollowEmitter from \"./emitter/FollowEmitter\";\n\nimport CanvasRenderer from \"./render/CanvasRenderer\";\nimport DomRenderer from \"./render/DomRenderer\";\nimport EaselRenderer from \"./render/EaselRenderer\";\nimport PixelRenderer from \"./render/PixelRenderer\";\nimport PixiRenderer from \"./render/PixiRenderer\";\nimport WebGLRenderer from \"./render/WebGLRenderer\";\nimport CustomRenderer from \"./render/CustomRenderer\";\n\nimport Zone from \"./zone/Zone\";\nimport LineZone from \"./zone/LineZone\";\nimport CircleZone from \"./zone/CircleZone\";\nimport PointZone from \"./zone/PointZone\";\nimport RectZone from \"./zone/RectZone\";\nimport ImageZone from \"./zone/ImageZone\";\n\nimport Debug from \"./debug/Debug\";\n\n// namespace\nProton.Particle = Proton.P = Particle;\nProton.Pool = Pool;\n\nProton.Util = Util;\nProton.ColorUtil = ColorUtil;\nProton.MathUtil = MathUtil;\nProton.Vector2D = Proton.Vector = Vector2D;\nProton.Polar2D = Proton.Polar = Polar2D;\nProton.ArraySpan = ArraySpan;\nProton.Rectangle = Rectangle;\nProton.Rate = Rate;\nProton.ease = ease;\nProton.Span = Span;\nProton.Mat3 = Mat3;\nProton.getSpan = (a, b, center) => new Span(a, b, center);\nProton.createArraySpan = ArraySpan.createArraySpan;\n\nProton.Initialize = Proton.Init = Initialize;\nProton.Life = Proton.L = Life;\nProton.Position = Proton.P = Position;\nProton.Velocity = Proton.V = Velocity;\nProton.Mass = Proton.M = Mass;\nProton.Radius = Proton.R = Radius;\nProton.Body = Proton.B = Body;\n\nProton.Behaviour = Behaviour;\nProton.Force = Proton.F = Force;\nProton.Attraction = Proton.A = Attraction;\nProton.RandomDrift = Proton.RD = RandomDrift;\nProton.Gravity = Proton.G = Gravity;\nProton.Collision = Collision;\nProton.CrossZone = CrossZone;\nProton.Alpha = Proton.A = Alpha;\nProton.Scale = Proton.S = Scale;\nProton.Rotate = Rotate;\nProton.Color = Color;\nProton.Repulsion = Repulsion;\nProton.Cyclone = Cyclone;\nProton.GravityWell = GravityWell;\n\nProton.Emitter = Emitter;\nProton.BehaviourEmitter = BehaviourEmitter;\nProton.FollowEmitter = FollowEmitter;\n\nProton.Zone = Zone;\nProton.LineZone = LineZone;\nProton.CircleZone = CircleZone;\nProton.PointZone = PointZone;\nProton.RectZone = RectZone;\nProton.ImageZone = ImageZone;\n\nProton.CanvasRenderer = CanvasRenderer;\nProton.DomRenderer = DomRenderer;\nProton.EaselRenderer = EaselRenderer;\nProton.PixiRenderer = PixiRenderer;\nProton.PixelRenderer = PixelRenderer;\nProton.WebGLRenderer = Proton.WebGlRenderer = WebGLRenderer;\nProton.CustomRenderer = CustomRenderer;\n\nProton.Debug = Debug;\nUtil.assign(Proton, ease);\n\n// export\nexport default Proton;\n"],"names":["PI","INFINITY","Infinity","MathUtil","num","a","b","isInt","Math","random","floor","center","f","randomAToB","toString","slice","display","k","digits","pow","Span","Util","isArray","initValue","getRandFromArray","randomFloating","c","undefined","pan","getValue","length","i","tx","ty","angleInRadians","cos","s","sin","sx","sy","a00","a01","a02","a10","a11","a12","a20","a21","a22","b00","b01","b02","b10","b11","b12","b20","b21","b22","id","width","height","position","dom","document","createElement","style","opacity","transform","resize","marginLeft","marginTop","div","x","y","scale","rotate","willChange","css3","key","val","bkey","charAt","toUpperCase","substr","imgsCache","canvasCache","canvasId","context","image","rect","drawImage","imagedata","getImageData","clearRect","img","callback","param","src","Image","onload","e","target","WebGLUtil","nhpot","canvas","DomUtil","createCanvas","getContext","value","defaults","Object","prototype","call","arr","obj","ignore","indexOf","constructor","args","FactoryFunc","bind","apply","concat","particle","conf","hasProp","p","v","copy","props","prop","hasOwnProperty","getSpanValue","ImgUtil","destroy","source","assign","idsMap","Puid","type","uid","getIdFromCache","_index","_cache","isBody","isInner","Pool","total","cache","params","__puid","getId","pop","createOrClone","getCache","push","create","classApply","clone","count","Stats","proton","container","emitterIndex","rendererIndex","body","add","emitter","getEmitter","renderer","getRenderer","str","emitters","emitSpeed","getEmitterPos","initializes","concatArr","behaviours","name","getCreatedNumber","getCount","pool","innerHTML","cssText","join","addEventListener","bg","color","parentNode","appendChild","renderers","result","cpool","round","EventDispatcher","_listeners","listener","removeEventListener","splice","listeners","handler","dispatchEvent","hasEventListener","removeAllEventListeners","Integration","particles","time","damping","eulerIntegrate","sleep","old","multiplyScalar","mass","clear","Proton","integrationType","now","then","elapsed","stats","EULER","integrator","_fps","_interval","DEFAULT_INTERVAL","render","init","index","remove","parent","EMITTER_ADDED","EMITTER_REMOVED","PROTON_UPDATE","USE_CLOCK","Date","getTime","amendChangeTabsBug","emittersUpdate","PROTON_UPDATE_AFTER","update","destroyAll","destroyOther","getAllParticles","fps","MEASURE","RK2","PARTICLE_CREATED","PARTICLE_UPDATE","PARTICLE_SLEEP","PARTICLE_DEAD","Rgb","r","g","PI_2","sqrt","ease","easeLinear","Vector2D","atan2","w","addVectors","subVectors","set","divideScalar","distanceToSquared","tha","dx","dy","alpha","Particle","data","rgb","reset","setProp","N180_PI","life","age","dead","sprite","energy","radius","rotation","easing","emptyObject","removeAllBehaviours","applyBehaviours","max","applyBehaviour","behaviour","parents","initialize","addBehaviour","emptyArray","h","hex16","substring","parseInt","rbg","Number","Polar2D","abs","getX","getY","Mat3","mat3","mat","Float32Array","mat1","mat2","d","m","vec","ArraySpan","_arr","toArray","randomColor","Rectangle","bottom","right","Rate","numpan","timepan","numPan","setSpanValue","timePan","startTime","nextTime","Initialize","Life","lifePan","Zone","vector","crossType","alert","PointZone","error","Position","zone","getPosition","Velocity","rpan","thapan","rPan","thaPan","vr","polar2d","normalizeVelocity","PI_180","Mass","massPan","Radius","oldRadius","Body","imageTarget","Behaviour","getEasing","force","removeBehaviour","Force","fx","fy","normalizeForce","calculate","Attraction","targetPosition","normalizeValue","radiusSq","attractionForce","lengthSq","sub","normalize","RandomDrift","driftX","driftY","delay","panFoce","addXY","Gravity","Collision","collisionPool","delta","newPool","otherParticle","overlap","totalMass","averageMass1","averageMass2","distance","CrossZone","crossing","Alpha","same","alphaA","alphaB","Scale","scaleA","scaleB","Rotate","influence","rotationA","rotationB","getDirection","Color","createArraySpan","colorA","ColorUtil","hexToRgb","colorB","CHANGING","Cyclone","angle","setAngleAndForce","span","String","toLowerCase","cangle","cyclone","gradient","getGradient","Repulsion","GravityWell","centerPoint","distanceVec","distanceSq","factor","bindEmitter","setVectorVal","degreeTransform","Emitter","emitTime","totalTime","rate","stoped","isNaN","oldStoped","oldEmitTime","oldTotalTime","step","initAll","rest","initializer","arguments","emitting","integrate","dispatch","expire","event","bindEvent","createParticle","get","setupParticle","addBehaviours","stop","removeAllInitializers","removeEmitter","BehaviourEmitter","selfBehaviours","FollowEmitter","mouseTarget","window","_allowEmitting","initEventHandler","mousemoveHandler","mousemove","mousedownHandler","mousedown","mouseupHandler","mouseup","layerX","layerY","offsetX","offsetY","babelHelpers.get","BaseRenderer","element","stroke","circleConf","isCircle","initHandler","thinkness","_protonUpdateHandler","onProtonUpdate","_protonUpdateAfterHandler","onProtonUpdateAfter","_emitterAddedHandler","onEmitterAdded","_emitterRemovedHandler","onEmitterRemoved","_particleCreatedHandler","onParticleCreated","_particleUpdateHandler","onParticleUpdate","_particleDeadHandler","onParticleDead","CanvasRenderer","bufferCache","getImgFromCache","addImg2Body","drawCircle","buffer","createBuffer","bufContext","globalAlpha","globalCompositeOperation","fillStyle","rgbToHex","fillRect","save","translate","restore","beginPath","arc","strokeStyle","lineWidth","closePath","fill","size","DomRenderer","createBody","transform3d","bodyReady","backgroundColor","removeChild","babelHelpers.typeof","createCircle","createSprite","createDiv","borderRadius","borderColor","borderWidth","url","backgroundImage","EaselRenderer","addChild","scaleX","scaleY","graphics","regX","regY","createjs","Graphics","beginStroke","beginFill","shape","Shape","PixelRenderer","rectangle","imageData","createImageData","putImageData","setPixel","elementwidth","PIXIClass","PixiRenderer","setColor","blendMode","setPIXI","PIXI","Sprite","createFromImage","from","fromImage","tint","getHex16FromParticle","anchor","endFill","MStack","mats","multiply","WebGLRenderer","gl","antialias","stencil","depth","initVar","setMaxRadius","initShaders","initBuffers","blendEquation","FUNC_ADD","blendFunc","SRC_ALPHA","ONE_MINUS_SRC_ALPHA","enable","BLEND","umat","smat","mstack","viewport","circleCanvasURL","vsSource","fsSource","texturebuffers","A","B","fs","shader","createShader","FRAGMENT_SHADER","VERTEX_SHADER","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","fragmentShader","getShader","getFragmentShader","vertexShader","getVertexShader","sprogram","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","useProgram","vpa","getAttribLocation","tca","enableVertexAttribArray","tMatUniform","getUniformLocation","samplerUniform","useTex","uniform1i","vs","idx","unitIBuffer","bindBuffer","ELEMENT_ARRAY_BUFFER","bufferData","Uint16Array","STATIC_DRAW","ids","unitI33","stripBuffer","raidus","circleCanvasRadius","toDataURL","_w","_h","_width","_height","_scaleX","_scaleY","createTexture","texture","vcBuffer","tcBuffer","ARRAY_BUFFER","bindTexture","TEXTURE_2D","texImage2D","RGBA","UNSIGNED_BYTE","texParameteri","TEXTURE_MAG_FILTER","LINEAR","TEXTURE_MIN_FILTER","LINEAR_MIPMAP_NEAREST","generateMipmap","textureLoaded","textureWidth","textureHeight","tmat","imat","oldScale","getCanvasFromCache","drawImg2Canvas","updateMatrix","uniform3f","uniformMatrix3fv","top","vertexAttribPointer","FLOAT","drawElements","TRIANGLES","UNSIGNED_SHORT","moveOriginMatrix","makeTranslation","translationMatrix","angel","rotationMatrix","makeRotation","scaleMatrix","makeScale","matrix","matrixMultiply","inverse","CustomRenderer","LineZone","x1","y1","x2","y2","direction","minx","min","miny","maxx","maxy","dot","xxyy","getLength","C","D","tha2","tha1","oldx","oldy","rangeOut","getDistance","getSymmetric","CircleZone","PIx2","randomRadius","distanceTo","RectZone","ImageZone","vectors","setVectors","j","length1","length2","getBound","negate","func","getStyle","moveTo","lineTo","drawRect","P","Vector","Polar","getSpan","Init","L","V","M","R","F","RD","G","S","WebGlRenderer","Debug"],"mappings":";;;;;;AAAA,IAAMA,KAAK,SAAX;AACA,IAAMC,WAAWC,QAAjB;;AAEA,IAAMC,WAAW;MACXH,EADW;QAETA,KAAK,CAFI;QAGTA,KAAK,CAHI;UAIPA,KAAK,GAJE;WAKN,MAAMA,EALA;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AOkhB,CAAP,GAAW9V,KAA1B;AACApL,OAAOuL,MAAP,GAAgBA,MAAhB;AACAvL,OAAO4L,KAAP,GAAeA,KAAf;AACA5L,OAAO6M,SAAP,GAAmBA,SAAnB;AACA7M,OAAOmM,OAAP,GAAiBA,OAAjB;AACAnM,OAAO8M,WAAP,GAAqBA,WAArB;;AAEA9M,OAAOsN,OAAP,GAAiBA,OAAjB;AACAtN,OAAOiP,gBAAP,GAA0BA,gBAA1B;AACAjP,OAAOmP,aAAP,GAAuBA,aAAvB;;AAEAnP,OAAOoH,IAAP,GAAcA,IAAd;AACApH,OAAO6d,QAAP,GAAkBA,QAAlB;AACA7d,OAAOof,UAAP,GAAoBA,UAApB;AACApf,OAAOwH,SAAP,GAAmBA,SAAnB;AACAxH,OAAOwf,QAAP,GAAkBA,QAAlB;AACAxf,OAAOyf,SAAP,GAAmBA,SAAnB;;AAEAzf,OAAOwR,cAAP,GAAwBA,cAAxB;AACAxR,OAAO+S,WAAP,GAAqBA,WAArB;AACA/S,OAAO8T,aAAP,GAAuBA,aAAvB;AACA9T,OAAOmV,YAAP,GAAsBA,YAAtB;AACAnV,OAAO2U,aAAP,GAAuBA,aAAvB;AACA3U,OAAOmW,aAAP,GAAuBnW,OAAOmhB,aAAP,GAAuBhL,aAA9C;AACAnW,OAAO4d,cAAP,GAAwBA,cAAxB;;AAEA5d,OAAOohB,KAAP,GAAeA,KAAf;AACArtB,KAAKmH,MAAL,CAAY8E,MAAZ,EAAoByC,IAApB;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"proton.js","sources":["../src/math/MathUtil.js","../src/math/Span.js","../src/utils/WebGLUtil.js","../src/utils/DomUtil.js","../src/utils/ImgUtil.js","../src/utils/Util.js","../src/utils/Puid.js","../src/core/Pool.js","../src/debug/Stats.js","../src/events/EventDispatcher.js","../src/math/Integration.js","../src/core/Proton.js","../src/utils/Rgb.js","../src/math/ease.js","../src/math/Vector2D.js","../src/core/Particle.js","../src/utils/ColorUtil.js","../src/math/Polar2D.js","../src/math/Mat3.js","../src/math/ArraySpan.js","../src/math/Rectangle.js","../src/initialize/Rate.js","../src/initialize/Initialize.js","../src/initialize/Life.js","../src/zone/Zone.js","../src/zone/PointZone.js","../src/initialize/Position.js","../src/initialize/Velocity.js","../src/initialize/Mass.js","../src/initialize/Radius.js","../src/initialize/Body.js","../src/behaviour/Behaviour.js","../src/behaviour/Force.js","../src/behaviour/Attraction.js","../src/behaviour/RandomDrift.js","../src/behaviour/Gravity.js","../src/behaviour/Collision.js","../src/behaviour/CrossZone.js","../src/behaviour/Alpha.js","../src/behaviour/Scale.js","../src/behaviour/Rotate.js","../src/behaviour/Color.js","../src/behaviour/Cyclone.js","../src/behaviour/Repulsion.js","../src/behaviour/GravityWell.js","../src/initialize/InitializeUtil.js","../src/emitter/Emitter.js","../src/emitter/BehaviourEmitter.js","../src/emitter/FollowEmitter.js","../src/render/BaseRenderer.js","../src/render/CanvasRenderer.js","../src/render/DomRenderer.js","../src/render/EaselRenderer.js","../src/render/PixelRenderer.js","../src/render/PixiRenderer.js","../src/utils/MStack.js","../src/render/WebGLRenderer.js","../src/render/CustomRenderer.js","../src/zone/LineZone.js","../src/zone/CircleZone.js","../src/zone/RectZone.js","../src/zone/ImageZone.js","../src/debug/Debug.js","../src/index.js"],"sourcesContent":["const PI = 3.1415926;\nconst INFINITY = Infinity;\n\nconst MathUtil = {\n PI: PI,\n PIx2: PI * 2,\n PI_2: PI / 2,\n PI_180: PI / 180,\n N180_PI: 180 / PI,\n Infinity: -999,\n\n isInfinity(num) {\n return num === this.Infinity || num === INFINITY;\n },\n\n randomAToB(a, b, isInt = false) {\n if (!isInt) return a + Math.random() * (b - a);\n else return Math.floor(Math.random() * (b - a)) + a;\n },\n\n randomFloating(center, f, isInt) {\n return this.randomAToB(center - f, center + f, isInt);\n },\n\n randomColor() {\n return (\n \"#\" +\n (\"00000\" + ((Math.random() * 0x1000000) << 0).toString(16)).slice(-6)\n );\n },\n\n randomZone(display) {},\n\n floor(num, k = 4) {\n const digits = Math.pow(10, k);\n return Math.floor(num * digits) / digits;\n },\n\n degreeTransform(a) {\n return (a * PI) / 180;\n },\n\n toColor16(num) {\n return `#${num.toString(16)}`;\n }\n};\n\nexport default MathUtil;\n","import Util from \"../utils/Util\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class Span {\n constructor(a, b, center) {\n if (Util.isArray(a)) {\n this.isArray = true;\n this.a = a;\n } else {\n this.isArray = false;\n this.a = Util.initValue(a, 1);\n this.b = Util.initValue(b, this.a);\n this.center = Util.initValue(center, false);\n }\n }\n\n getValue(isInt = false) {\n if (this.isArray) {\n return Util.getRandFromArray(this.a);\n } else {\n if (!this.center) {\n return MathUtil.randomAToB(this.a, this.b, isInt);\n } else {\n return MathUtil.randomFloating(this.a, this.b, isInt);\n }\n }\n }\n\n /**\n * Returns a new Span object\n *\n * @memberof Proton#Proton.Util\n * @method setSpanValue\n *\n * @todo a, b and c should be 'Mixed' or 'Number'?\n *\n * @param {Mixed | Span} a\n * @param {Mixed} b\n * @param {Mixed} c\n *\n * @return {Span}\n */\n static setSpanValue(a, b, c) {\n if (a instanceof Span) {\n return a;\n } else {\n if (b === undefined) {\n return new Span(a);\n } else {\n if (c === undefined) return new Span(a, b);\n else return new Span(a, b, c);\n }\n }\n }\n\n /**\n * Returns the value from a Span, if the param is not a Span it will return the given parameter\n *\n * @memberof Proton#Proton.Util\n * @method getValue\n *\n * @param {Mixed | Span} pan\n *\n * @return {Mixed} the value of Span OR the parameter if it is not a Span\n */\n static getSpanValue(pan) {\n return pan instanceof Span ? pan.getValue() : pan;\n }\n}\n","export default {\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method ipot\n *\n * @todo add description\n * @todo add length description\n *\n * @param {Number} length\n *\n * @return {Boolean}\n */\n ipot(length) {\n return (length & (length - 1)) === 0;\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method nhpot\n *\n * @todo add description\n * @todo add length description\n *\n * @param {Number} length\n *\n * @return {Number}\n */\n nhpot(length) {\n --length;\n for (let i = 1; i < 32; i <<= 1) {\n length = length | (length >> i);\n }\n\n return length + 1;\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method makeTranslation\n *\n * @todo add description\n * @todo add tx, ty description\n * @todo add return description\n *\n * @param {Number} tx either 0 or 1\n * @param {Number} ty either 0 or 1\n *\n * @return {Object}\n */\n makeTranslation(tx, ty) {\n return [1, 0, 0, 0, 1, 0, tx, ty, 1];\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method makeRotation\n *\n * @todo add description\n * @todo add return description\n *\n * @param {Number} angleInRadians\n *\n * @return {Object}\n */\n makeRotation(angleInRadians) {\n let c = Math.cos(angleInRadians);\n let s = Math.sin(angleInRadians);\n\n return [c, -s, 0, s, c, 0, 0, 0, 1];\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method makeScale\n *\n * @todo add description\n * @todo add tx, ty description\n * @todo add return description\n *\n * @param {Number} sx either 0 or 1\n * @param {Number} sy either 0 or 1\n *\n * @return {Object}\n */\n makeScale(sx, sy) {\n return [sx, 0, 0, 0, sy, 0, 0, 0, 1];\n },\n\n /**\n * @memberof Proton#Proton.WebGLUtil\n * @method matrixMultiply\n *\n * @todo add description\n * @todo add a, b description\n * @todo add return description\n *\n * @param {Object} a\n * @param {Object} b\n *\n * @return {Object}\n */\n matrixMultiply(a, b) {\n let a00 = a[0 * 3 + 0];\n let a01 = a[0 * 3 + 1];\n let a02 = a[0 * 3 + 2];\n let a10 = a[1 * 3 + 0];\n let a11 = a[1 * 3 + 1];\n let a12 = a[1 * 3 + 2];\n let a20 = a[2 * 3 + 0];\n let a21 = a[2 * 3 + 1];\n let a22 = a[2 * 3 + 2];\n let b00 = b[0 * 3 + 0];\n let b01 = b[0 * 3 + 1];\n let b02 = b[0 * 3 + 2];\n let b10 = b[1 * 3 + 0];\n let b11 = b[1 * 3 + 1];\n let b12 = b[1 * 3 + 2];\n let b20 = b[2 * 3 + 0];\n let b21 = b[2 * 3 + 1];\n let b22 = b[2 * 3 + 2];\n\n return [\n a00 * b00 + a01 * b10 + a02 * b20,\n a00 * b01 + a01 * b11 + a02 * b21,\n a00 * b02 + a01 * b12 + a02 * b22,\n a10 * b00 + a11 * b10 + a12 * b20,\n a10 * b01 + a11 * b11 + a12 * b21,\n a10 * b02 + a11 * b12 + a12 * b22,\n a20 * b00 + a21 * b10 + a22 * b20,\n a20 * b01 + a21 * b11 + a22 * b21,\n a20 * b02 + a21 * b12 + a22 * b22\n ];\n }\n};\n","export default {\n /**\n * Creates and returns a new canvas. The opacity is by default set to 0\n *\n * @memberof Proton#Proton.DomUtil\n * @method createCanvas\n *\n * @param {String} $id the canvas' id\n * @param {Number} $width the canvas' width\n * @param {Number} $height the canvas' height\n * @param {String} [$position=absolute] the canvas' position, default is 'absolute'\n *\n * @return {Object}\n */\n createCanvas(id, width, height, position = \"absolute\") {\n const dom = document.createElement(\"canvas\");\n\n dom.id = id;\n dom.width = width;\n dom.height = height;\n dom.style.opacity = 0;\n dom.style.position = position;\n this.transform(dom, -500, -500, 0, 0);\n\n return dom;\n },\n\n createDiv(id, width, height) {\n const dom = document.createElement(\"div\");\n\n dom.id = id;\n dom.style.position = \"absolute\";\n this.resize(dom, width, height);\n\n return dom;\n },\n\n resize(dom, width, height) {\n dom.style.width = width + \"px\";\n dom.style.height = height + \"px\";\n dom.style.marginLeft = -width / 2 + \"px\";\n dom.style.marginTop = -height / 2 + \"px\";\n },\n\n /**\n * Adds a transform: translate(), scale(), rotate() to a given div dom for all browsers\n *\n * @memberof Proton#Proton.DomUtil\n * @method transform\n *\n * @param {HTMLDivElement} div\n * @param {Number} $x\n * @param {Number} $y\n * @param {Number} $scale\n * @param {Number} $rotate\n */\n transform(div, x, y, scale, rotate) {\n div.style.willChange = \"transform\";\n const transform = `translate(${x}px, ${y}px) scale(${scale}) rotate(${rotate}deg)`;\n this.css3(div, \"transform\", transform);\n },\n\n transform3d(div, x, y, scale, rotate) {\n div.style.willChange = \"transform\";\n const transform = `translate3d(${x}px, ${y}px, 0) scale(${scale}) rotate(${rotate}deg)`;\n this.css3(div, \"backfaceVisibility\", \"hidden\");\n this.css3(div, \"transform\", transform);\n },\n\n css3(div, key, val) {\n const bkey = key.charAt(0).toUpperCase() + key.substr(1);\n\n div.style[`Webkit${bkey}`] = val;\n div.style[`Moz${bkey}`] = val;\n div.style[`O${bkey}`] = val;\n div.style[`ms${bkey}`] = val;\n div.style[`${key}`] = val;\n }\n};\n","import WebGLUtil from \"./WebGLUtil\";\nimport DomUtil from \"./DomUtil\";\n\nconst imgsCache = {};\nconst canvasCache = {};\nlet canvasId = 0;\n\nexport default {\n /**\n * This will get the image data. It could be necessary to create a Proton.Zone.\n *\n * @memberof Proton#Proton.Util\n * @method getImageData\n *\n * @param {HTMLCanvasElement} context any canvas, must be a 2dContext 'canvas.getContext('2d')'\n * @param {Object} image could be any dom image, e.g. document.getElementById('thisIsAnImgTag');\n * @param {Proton.Rectangle} rect\n */\n getImageData(context, image, rect) {\n context.drawImage(image, rect.x, rect.y);\n const imagedata = context.getImageData(\n rect.x,\n rect.y,\n rect.width,\n rect.height\n );\n context.clearRect(rect.x, rect.y, rect.width, rect.height);\n\n return imagedata;\n },\n\n /**\n * @memberof Proton#Proton.Util\n * @method getImgFromCache\n *\n * @todo add description\n * @todo describe func\n *\n * @param {Mixed} img\n * @param {Proton.Particle} particle\n * @param {Boolean} drawCanvas set to true if a canvas should be saved into particle.data.canvas\n * @param {Boolean} func\n */\n getImgFromCache(img, callback, param) {\n const src = typeof img === \"string\" ? img : img.src;\n\n if (imgsCache[src]) {\n callback(imgsCache[src], param);\n } else {\n const image = new Image();\n image.onload = e => {\n imgsCache[src] = e.target;\n callback(imgsCache[src], param);\n };\n\n image.src = src;\n }\n },\n\n getCanvasFromCache(img, callback, param) {\n const src = img.src;\n\n if (!canvasCache[src]) {\n const width = WebGLUtil.nhpot(img.width);\n const height = WebGLUtil.nhpot(img.height);\n\n const canvas = DomUtil.createCanvas(\n `proton_canvas_cache_${++canvasId}`,\n width,\n height\n );\n const context = canvas.getContext(\"2d\");\n context.drawImage(img, 0, 0, img.width, img.height);\n\n canvasCache[src] = canvas;\n }\n\n callback && callback(canvasCache[src], param);\n\n return canvasCache[src];\n }\n};\n","import Span from \"../math/Span\";\nimport ImgUtil from \"./ImgUtil\";\n\nexport default {\n /**\n * Returns the default if the value is null or undefined\n *\n * @memberof Proton#Proton.Util\n * @method initValue\n *\n * @param {Mixed} value a specific value, could be everything but null or undefined\n * @param {Mixed} defaults the default if the value is null or undefined\n */\n initValue(value, defaults) {\n value = value !== null && value !== undefined ? value : defaults;\n return value;\n },\n\n /**\n * Checks if the value is a valid array\n *\n * @memberof Proton#Proton.Util\n * @method isArray\n *\n * @param {Array} value Any array\n *\n * @returns {Boolean}\n */\n isArray(value) {\n return Object.prototype.toString.call(value) === \"[object Array]\";\n },\n\n /**\n * Destroyes the given array\n *\n * @memberof Proton#Proton.Util\n * @method emptyArray\n *\n * @param {Array} array Any array\n */\n emptyArray(arr) {\n if (arr) arr.length = 0;\n },\n\n toArray(arr) {\n return this.isArray(arr) ? arr : [arr];\n },\n\n getRandFromArray(arr) {\n if (!arr) return null;\n return arr[Math.floor(arr.length * Math.random())];\n },\n\n /**\n * Destroyes the given object\n *\n * @memberof Proton#Proton.Util\n * @method emptyObject\n *\n * @param {Object} obj Any object\n */\n emptyObject(obj, ignore = null) {\n for (let key in obj) {\n if (ignore && ignore.indexOf(key) > -1) continue;\n delete obj[key];\n }\n },\n\n /**\n * Makes an instance of a class and binds the given array\n *\n * @memberof Proton#Proton.Util\n * @method classApply\n *\n * @param {Function} constructor A class to make an instance from\n * @param {Array} [args] Any array to bind it to the constructor\n *\n * @return {Object} The instance of constructor, optionally bind with args\n */\n classApply(constructor, args = null) {\n if (!args) {\n return new constructor();\n } else {\n const FactoryFunc = constructor.bind.apply(\n constructor,\n [null].concat(args)\n );\n return new FactoryFunc();\n }\n },\n\n /**\n * @memberof Proton#Proton.Util\n * @method setVectorVal\n *\n * @todo add description for param `target`\n * @todo add description for param `conf`\n * @todo add description for function\n *\n * @param {Object} target\n * @param {Object} conf\n */\n setVectorVal(particle, conf = null) {\n if (!conf) return;\n\n if (this.hasProp(conf, \"x\")) particle.p.x = conf[\"x\"];\n if (this.hasProp(conf, \"y\")) particle.p.y = conf[\"y\"];\n\n if (this.hasProp(conf, \"vx\")) particle.v.x = conf[\"vx\"];\n if (this.hasProp(conf, \"vy\")) particle.v.y = conf[\"vy\"];\n\n if (this.hasProp(conf, \"ax\")) particle.a.x = conf[\"ax\"];\n if (this.hasProp(conf, \"ay\")) particle.a.y = conf[\"ay\"];\n\n if (this.hasProp(conf, \"p\")) particle.p.copy(conf[\"p\"]);\n if (this.hasProp(conf, \"v\")) particle.v.copy(conf[\"v\"]);\n if (this.hasProp(conf, \"a\")) particle.a.copy(conf[\"a\"]);\n\n if (this.hasProp(conf, \"position\")) particle.p.copy(conf[\"position\"]);\n if (this.hasProp(conf, \"velocity\")) particle.v.copy(conf[\"velocity\"]);\n if (this.hasProp(conf, \"accelerate\")) particle.a.copy(conf[\"accelerate\"]);\n },\n\n hasProp(target, key) {\n if (!target) return false;\n return target[key] !== undefined;\n // return obj.hasOwnProperty(key);\n },\n\n /**\n * set the prototype in a given prototypeObject\n *\n * @memberof Proton#Proton.Util\n * @method setProp\n *\n * @todo add description for param `target`\n * @todo translate desription from chinese to english\n *\n * @param {Object} target\n * @param {Object} prototypeObject An object of single prototypes\n *\n * @return {Object} target\n */\n setProp(target, props) {\n for (let prop in props) {\n if (target.hasOwnProperty(prop)) {\n target[prop] = Span.getSpanValue(props[prop]);\n }\n }\n\n return target;\n },\n\n /**\n * This will get the image data. It could be necessary to create a Proton.Zone.\n *\n * @memberof Proton#Proton.Util\n * @method getImageData\n *\n * @param {HTMLCanvasElement} context any canvas, must be a 2dContext 'canvas.getContext('2d')'\n * @param {Object} image could be any dom image, e.g. document.getElementById('thisIsAnImgTag');\n * @param {Proton.Rectangle} rect\n */\n getImageData(context, image, rect) {\n return ImgUtil.getImageData(context, image, rect);\n },\n\n destroyAll(arr, param = null) {\n let i = arr.length;\n\n while (i--) {\n try {\n arr[i].destroy(param);\n } catch (e) {}\n\n delete arr[i];\n }\n\n arr.length = 0;\n },\n\n assign(target, source) {\n if (typeof Object.assign !== \"function\") {\n for (let key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n\n return target;\n } else {\n return Object.assign(target, source);\n }\n }\n};\n","const idsMap = {};\n\nconst Puid = {\n _index: 0,\n _cache: {},\n\n id(type) {\n if (idsMap[type] === undefined || idsMap[type] === null) idsMap[type] = 0;\n return `${type}_${idsMap[type]++}`;\n },\n\n getId(target) {\n let uid = this.getIdFromCache(target);\n if (uid) return uid;\n\n uid = `PUID_${this._index++}`;\n this._cache[uid] = target;\n\n return uid;\n },\n\n getIdFromCache(target) {\n let obj, id;\n\n for (id in this._cache) {\n obj = this._cache[id];\n\n if (obj === target) return id;\n if (this.isBody(obj, target) && obj.src === target.src) return id;\n }\n\n return null;\n },\n\n isBody(obj, target) {\n return (\n typeof obj === \"object\" &&\n typeof target === \"object\" &&\n obj.isInner &&\n target.isInner\n );\n },\n\n getTarget(uid) {\n return this._cache[uid];\n }\n};\n\nexport default Puid;\n","/**\n * Pool is the cache pool of the proton engine, it is very important.\n *\n * get(target, params, uid)\n * Class\n * uid = Puid.getId -> Puid save target cache\n * target.__puid = uid\n *\n * body\n * uid = Puid.getId -> Puid save target cache\n *\n *\n * expire(target)\n * cache[target.__puid] push target\n *\n */\nimport Util from \"../utils/Util\";\nimport Puid from \"../utils/Puid\";\n\nexport default class Pool {\n /**\n * @memberof! Proton#\n * @constructor\n * @alias Proton.Pool\n *\n * @todo add description\n * @todo add description of properties\n *\n * @property {Number} total\n * @property {Object} cache\n */\n constructor(num) {\n this.total = 0;\n this.cache = {};\n }\n\n /**\n * @todo add description\n *\n * @method get\n * @memberof Proton#Proton.Pool\n *\n * @param {Object|Function} target\n * @param {Object} [params] just add if `target` is a function\n *\n * @return {Object}\n */\n get(target, params, uid) {\n let p;\n uid = uid || target.__puid || Puid.getId(target);\n\n if (this.cache[uid] && this.cache[uid].length > 0) {\n p = this.cache[uid].pop();\n } else {\n p = this.createOrClone(target, params);\n }\n\n p.__puid = target.__puid || uid;\n return p;\n }\n\n /**\n * @todo add description\n *\n * @method set\n * @memberof Proton#Proton.Pool\n *\n * @param {Object} target\n *\n * @return {Object}\n */\n expire(target) {\n return this.getCache(target.__puid).push(target);\n }\n\n /**\n * Creates a new class instance\n *\n * @todo add more documentation\n *\n * @method create\n * @memberof Proton#Proton.Pool\n *\n * @param {Object|Function} target any Object or Function\n * @param {Object} [params] just add if `target` is a function\n *\n * @return {Object}\n */\n createOrClone(target, params) {\n this.total++;\n\n if (this.create) {\n return this.create(target, params);\n } else if (typeof target === \"function\") {\n return Util.classApply(target, params);\n } else {\n return target.clone();\n }\n }\n\n /**\n * @todo add description - what is in the cache?\n *\n * @method getCount\n * @memberof Proton#Proton.Pool\n *\n * @return {Number}\n */\n getCount() {\n let count = 0;\n for (let id in this.cache) count += this.cache[id].length;\n return count++;\n }\n\n /**\n * Destroyes all items from Pool.cache\n *\n * @method destroy\n * @memberof Proton#Proton.Pool\n */\n destroy() {\n for (let id in this.cache) {\n this.cache[id].length = 0;\n delete this.cache[id];\n }\n }\n\n /**\n * Returns Pool.cache\n *\n * @method getCache\n * @memberof Proton#Proton.Pool\n * @private\n *\n * @param {Number} uid the unique id\n *\n * @return {Object}\n */\n getCache(uid = \"default\") {\n if (!this.cache[uid]) this.cache[uid] = [];\n return this.cache[uid];\n }\n}\n","export default class Stats {\n constructor(proton) {\n this.proton = proton;\n this.container = null;\n this.type = 1;\n\n this.emitterIndex = 0;\n this.rendererIndex = 0;\n }\n\n update(style, body) {\n this.add(style, body);\n\n const emitter = this.getEmitter();\n const renderer = this.getRenderer();\n let str = \"\";\n\n switch (this.type) {\n case 2:\n str += \"emitter:\" + this.proton.emitters.length + \"
\";\n if (emitter) str += \"em speed:\" + emitter.emitSpeed + \"
\";\n if (emitter) str += \"pos:\" + this.getEmitterPos(emitter);\n break;\n\n case 3:\n if (emitter)\n str += \"initializes:\" + emitter.initializes.length + \"
\";\n if (emitter)\n str +=\n '' +\n this.concatArr(emitter.initializes) +\n \"
\";\n if (emitter) str += \"behaviours:\" + emitter.behaviours.length + \"
\";\n if (emitter)\n str +=\n '' +\n this.concatArr(emitter.behaviours) +\n \"
\";\n break;\n\n case 4:\n if (renderer) str += renderer.name + \"
\";\n if (renderer) str += \"body:\" + this.getCreatedNumber(renderer) + \"
\";\n break;\n\n default:\n str += \"particles:\" + this.proton.getCount() + \"
\";\n str += \"pool:\" + this.proton.pool.getCount() + \"
\";\n str += \"total:\" + this.proton.pool.total;\n }\n\n this.container.innerHTML = str;\n }\n\n add(style, body) {\n if (!this.container) {\n this.type = 1;\n\n this.container = document.createElement(\"div\");\n this.container.style.cssText = [\n \"position:absolute;bottom:0px;left:0;cursor:pointer;\",\n \"opacity:0.9;z-index:10000;padding:10px;font-size:12px;font-family:Helvetica,Arial,sans-serif;\",\n \"width:120px;height:50px;background-color:#002;color:#0ff;\"\n ].join(\"\");\n\n this.container.addEventListener(\n \"click\",\n e => {\n this.type++;\n if (this.type > 4) this.type = 1;\n },\n false\n );\n\n let bg, color;\n switch (style) {\n case 2:\n bg = \"#201\";\n color = \"#f08\";\n break;\n\n case 3:\n bg = \"#020\";\n color = \"#0f0\";\n break;\n\n default:\n bg = \"#002\";\n color = \"#0ff\";\n }\n\n this.container.style[\"background-color\"] = bg;\n this.container.style[\"color\"] = color;\n }\n\n if (!this.container.parentNode) {\n body = body || this.body || document.body;\n body.appendChild(this.container);\n }\n }\n\n getEmitter() {\n return this.proton.emitters[this.emitterIndex];\n }\n\n getRenderer() {\n return this.proton.renderers[this.rendererIndex];\n }\n\n concatArr(arr) {\n let result = \"\";\n if (!arr || !arr.length) return result;\n\n for (let i = 0; i < arr.length; i++) {\n result += (arr[i].name || \"\").substr(0, 1) + \".\";\n }\n\n return result;\n }\n\n getCreatedNumber(renderer) {\n return renderer.pool.total || (renderer.cpool && renderer.cpool.total) || 0;\n }\n\n getEmitterPos(e) {\n return Math.round(e.p.x) + \",\" + Math.round(e.p.y);\n }\n}\n","/*\n * EventDispatcher\n * This code reference since http://createjs.com/.\n *\n **/\n\nexport default class EventDispatcher {\n constructor() {\n this._listeners = null;\n }\n\n static bind(target) {\n target.prototype.dispatchEvent = EventDispatcher.prototype.dispatchEvent;\n\n target.prototype.hasEventListener =\n EventDispatcher.prototype.hasEventListener;\n\n target.prototype.addEventListener =\n EventDispatcher.prototype.addEventListener;\n\n target.prototype.removeEventListener =\n EventDispatcher.prototype.removeEventListener;\n\n target.prototype.removeAllEventListeners =\n EventDispatcher.prototype.removeAllEventListeners;\n }\n\n addEventListener(type, listener) {\n if (!this._listeners) {\n this._listeners = {};\n } else {\n this.removeEventListener(type, listener);\n }\n\n if (!this._listeners[type]) this._listeners[type] = [];\n this._listeners[type].push(listener);\n\n return listener;\n }\n\n removeEventListener(type, listener) {\n if (!this._listeners) return;\n if (!this._listeners[type]) return;\n\n const arr = this._listeners[type];\n const length = arr.length;\n\n for (let i = 0; i < length; i++) {\n if (arr[i] === listener) {\n if (length === 1) {\n delete this._listeners[type];\n }\n\n // allows for faster checks.\n else {\n arr.splice(i, 1);\n }\n\n break;\n }\n }\n }\n\n removeAllEventListeners(type) {\n if (!type) this._listeners = null;\n else if (this._listeners) delete this._listeners[type];\n }\n\n dispatchEvent(type, args) {\n let result = false;\n const listeners = this._listeners;\n\n if (type && listeners) {\n let arr = listeners[type];\n if (!arr) return result;\n\n // arr = arr.slice();\n // to avoid issues with items being removed or added during the dispatch\n\n let handler;\n let i = arr.length;\n while (i--) {\n handler = arr[i];\n result = result || handler(args);\n }\n }\n\n return !!result;\n }\n\n hasEventListener(type) {\n const listeners = this._listeners;\n return !!(listeners && listeners[type]);\n }\n}\n","export default class Integration {\n constructor(type) {\n this.type = type;\n }\n\n calculate(particles, time, damping) {\n this.eulerIntegrate(particles, time, damping);\n }\n\n // Euler Integrate\n // https://rosettacode.org/wiki/Euler_method\n eulerIntegrate(particle, time, damping) {\n if (!particle.sleep) {\n particle.old.p.copy(particle.p);\n particle.old.v.copy(particle.v);\n\n particle.a.multiplyScalar(1 / particle.mass);\n particle.v.add(particle.a.multiplyScalar(time));\n particle.p.add(particle.old.v.multiplyScalar(time));\n\n if (damping) particle.v.multiplyScalar(damping);\n\n particle.a.clear();\n }\n }\n}\n","import Pool from \"./Pool\";\nimport Util from \"../utils/Util\";\nimport Stats from \"../debug/Stats\";\nimport EventDispatcher from \"../events/EventDispatcher\";\nimport MathUtil from \"../math/MathUtil\";\nimport Integration from \"../math/Integration\";\n\nexport default class Proton {\n static USE_CLOCK = false;\n\n // measure 1:100\n static MEASURE = 100;\n static EULER = \"euler\";\n static RK2 = \"runge-kutta2\";\n\n // event name\n static PARTICLE_CREATED = \"PARTICLE_CREATED\";\n static PARTICLE_UPDATE = \"PARTICLE_UPDATE\";\n static PARTICLE_SLEEP = \"PARTICLE_SLEEP\";\n static PARTICLE_DEAD = \"PARTICLE_DEAD\";\n\n static EMITTER_ADDED = \"EMITTER_ADDED\";\n static EMITTER_REMOVED = \"EMITTER_REMOVED\";\n\n static PROTON_UPDATE = \"PROTON_UPDATE\";\n static PROTON_UPDATE_AFTER = \"PROTON_UPDATE_AFTER\";\n static DEFAULT_INTERVAL = 0.0167;\n\n static amendChangeTabsBug = true;\n\n /**\n * The constructor to add emitters\n *\n * @constructor Proton\n *\n * @todo proParticleCount is not in use\n * @todo add more documentation of the single properties and parameters\n *\n * @param {Number} [proParticleCount] not in use?\n * @param {Number} [integrationType=Proton.EULER]\n *\n * @property {String} [integrationType=Proton.EULER]\n * @property {Array} emitters All added emitter\n * @property {Array} renderers All added renderer\n * @property {Number} time The active time\n * @property {Number} oldtime The old time\n */\n constructor(integrationType) {\n this.emitters = [];\n this.renderers = [];\n\n this.time = 0;\n this.now = 0;\n this.then = 0;\n this.elapsed = 0;\n\n this.stats = new Stats(this);\n this.pool = new Pool(80);\n\n this.integrationType = Util.initValue(integrationType, Proton.EULER);\n this.integrator = new Integration(this.integrationType);\n\n this._fps = \"auto\";\n this._interval = Proton.DEFAULT_INTERVAL;\n }\n\n set fps(fps) {\n this._fps = fps;\n this._interval =\n fps === \"auto\" ? Proton.DEFAULT_INTERVAL : MathUtil.floor(1 / fps, 7);\n }\n\n get fps() {\n return this._fps;\n }\n\n /**\n * add a type of Renderer\n *\n * @method addRenderer\n * @memberof Proton\n * @instance\n *\n * @param {Renderer} render\n */\n addRenderer(render) {\n render.init(this);\n this.renderers.push(render);\n }\n\n /**\n * @name add a type of Renderer\n *\n * @method addRenderer\n * @param {Renderer} render\n */\n removeRenderer(render) {\n const index = this.renderers.indexOf(render);\n this.renderers.splice(index, 1);\n render.remove(this);\n }\n\n /**\n * add the Emitter\n *\n * @method addEmitter\n * @memberof Proton\n * @instance\n *\n * @param {Emitter} emitter\n */\n addEmitter(emitter) {\n this.emitters.push(emitter);\n emitter.parent = this;\n\n this.dispatchEvent(Proton.EMITTER_ADDED, emitter);\n }\n\n /**\n * Removes an Emitter\n *\n * @method removeEmitter\n * @memberof Proton\n * @instance\n *\n * @param {Proton.Emitter} emitter\n */\n removeEmitter(emitter) {\n const index = this.emitters.indexOf(emitter);\n this.emitters.splice(index, 1);\n emitter.parent = null;\n\n this.dispatchEvent(Proton.EMITTER_REMOVED, emitter);\n }\n\n /**\n * Updates all added emitters\n *\n * @method update\n * @memberof Proton\n * @instance\n */\n update() {\n // 'auto' is the default browser refresh rate, the vast majority is 60fps\n if (this._fps === \"auto\") {\n this.dispatchEvent(Proton.PROTON_UPDATE);\n\n if (Proton.USE_CLOCK) {\n if (!this.then) this.then = new Date().getTime();\n this.now = new Date().getTime();\n this.elapsed = (this.now - this.then) * 0.001;\n // Fix bugs such as chrome browser switching tabs causing excessive time difference\n this.amendChangeTabsBug();\n\n if (this.elapsed > 0) this.emittersUpdate(this.elapsed);\n this.then = this.now;\n } else {\n this.emittersUpdate(Proton.DEFAULT_INTERVAL);\n }\n\n this.dispatchEvent(Proton.PROTON_UPDATE_AFTER);\n }\n\n // If the fps frame rate is set\n else {\n if (!this.then) this.then = new Date().getTime();\n this.now = new Date().getTime();\n this.elapsed = (this.now - this.then) * 0.001;\n\n if (this.elapsed > this._interval) {\n this.dispatchEvent(Proton.PROTON_UPDATE);\n this.emittersUpdate(this._interval);\n // https://stackoverflow.com/questions/19764018/controlling-fps-with-requestanimationframe\n this.then = this.now - (this.elapsed % this._interval) * 1000;\n this.dispatchEvent(Proton.PROTON_UPDATE_AFTER);\n }\n }\n }\n\n emittersUpdate(elapsed) {\n let i = this.emitters.length;\n while (i--) this.emitters[i].update(elapsed);\n }\n\n /**\n * @todo add description\n *\n * @method amendChangeTabsBug\n * @memberof Proton\n * @instance\n */\n amendChangeTabsBug() {\n if (!Proton.amendChangeTabsBug) return;\n if (this.elapsed > 0.5) {\n this.then = new Date().getTime();\n this.elapsed = 0;\n }\n }\n\n /**\n * Counts all particles from all emitters\n *\n * @method getCount\n * @memberof Proton\n * @instance\n */\n getCount() {\n let total = 0;\n let i = this.emitters.length;\n\n while (i--) total += this.emitters[i].particles.length;\n return total;\n }\n\n getAllParticles() {\n let particles = [];\n let i = this.emitters.length;\n\n while (i--) particles = particles.concat(this.emitters[i].particles);\n return particles;\n }\n\n destroyAllEmitters() {\n Util.destroyAll(this.emitters);\n }\n\n /**\n * Destroys everything related to this Proton instance. This includes all emitters, and all properties\n *\n * @method destroy\n * @memberof Proton\n * @instance\n */\n destroy(remove = false) {\n const destroyOther = () => {\n this.time = 0;\n this.then = 0;\n this.pool.destroy();\n\n Util.destroyAll(this.emitters);\n Util.destroyAll(this.renderers, this.getAllParticles());\n };\n\n if (remove) {\n setTimeout(destroyOther, 200);\n } else {\n destroyOther();\n }\n }\n}\n\nEventDispatcher.bind(Proton);\n","export default class Rgb {\n constructor(r = 255, g = 255, b = 255) {\n this.r = r;\n this.g = g;\n this.b = b;\n }\n\n reset() {\n this.r = 255;\n this.g = 255;\n this.b = 255;\n }\n}\n","import MathUtil from \"./MathUtil\";\n\nexport default {\n easeLinear(value) {\n return value;\n },\n\n easeInQuad(value) {\n return Math.pow(value, 2);\n },\n\n easeOutQuad(value) {\n return -(Math.pow(value - 1, 2) - 1);\n },\n\n easeInOutQuad(value) {\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(value, 2);\n\n return -0.5 * ((value -= 2) * value - 2);\n },\n\n easeInCubic(value) {\n return Math.pow(value, 3);\n },\n\n easeOutCubic(value) {\n return Math.pow(value - 1, 3) + 1;\n },\n\n easeInOutCubic(value) {\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(value, 3);\n\n return 0.5 * (Math.pow(value - 2, 3) + 2);\n },\n\n easeInQuart(value) {\n return Math.pow(value, 4);\n },\n\n easeOutQuart(value) {\n return -(Math.pow(value - 1, 4) - 1);\n },\n\n easeInOutQuart(value) {\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(value, 4);\n\n return -0.5 * ((value -= 2) * Math.pow(value, 3) - 2);\n },\n\n easeInSine(value) {\n return -Math.cos(value * MathUtil.PI_2) + 1;\n },\n\n easeOutSine(value) {\n return Math.sin(value * MathUtil.PI_2);\n },\n\n easeInOutSine(value) {\n return -0.5 * (Math.cos(Math.PI * value) - 1);\n },\n\n easeInExpo(value) {\n return value === 0 ? 0 : Math.pow(2, 10 * (value - 1));\n },\n\n easeOutExpo(value) {\n return value === 1 ? 1 : -Math.pow(2, -10 * value) + 1;\n },\n\n easeInOutExpo(value) {\n if (value === 0) return 0;\n\n if (value === 1) return 1;\n\n if ((value /= 0.5) < 1) return 0.5 * Math.pow(2, 10 * (value - 1));\n\n return 0.5 * (-Math.pow(2, -10 * --value) + 2);\n },\n\n easeInCirc(value) {\n return -(Math.sqrt(1 - value * value) - 1);\n },\n\n easeOutCirc(value) {\n return Math.sqrt(1 - Math.pow(value - 1, 2));\n },\n\n easeInOutCirc(value) {\n if ((value /= 0.5) < 1) return -0.5 * (Math.sqrt(1 - value * value) - 1);\n return 0.5 * (Math.sqrt(1 - (value -= 2) * value) + 1);\n },\n\n easeInBack(value) {\n let s = 1.70158;\n return value * value * ((s + 1) * value - s);\n },\n\n easeOutBack(value) {\n let s = 1.70158;\n return (value = value - 1) * value * ((s + 1) * value + s) + 1;\n },\n\n easeInOutBack(value) {\n let s = 1.70158;\n if ((value /= 0.5) < 1)\n return 0.5 * (value * value * (((s *= 1.525) + 1) * value - s));\n return 0.5 * ((value -= 2) * value * (((s *= 1.525) + 1) * value + s) + 2);\n },\n\n getEasing(ease) {\n if (typeof ease === \"function\") return ease;\n else return this[ease] || this.easeLinear;\n }\n};\n","import MathUtil from \"../math/MathUtil\";\n\nexport default class Vector2D {\n constructor(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n }\n\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n\n setX(x) {\n this.x = x;\n return this;\n }\n\n setY(y) {\n this.y = y;\n return this;\n }\n\n getGradient() {\n if (this.x !== 0) return Math.atan2(this.y, this.x);\n else if (this.y > 0) return MathUtil.PI_2;\n else if (this.y < 0) return -MathUtil.PI_2;\n }\n\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n\n return this;\n }\n\n add(v, w) {\n if (w !== undefined) {\n return this.addVectors(v, w);\n }\n\n this.x += v.x;\n this.y += v.y;\n\n return this;\n }\n\n addXY(a, b) {\n this.x += a;\n this.y += b;\n\n return this;\n }\n\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n\n return this;\n }\n\n sub(v, w) {\n if (w !== undefined) {\n return this.subVectors(v, w);\n }\n\n this.x -= v.x;\n this.y -= v.y;\n\n return this;\n }\n\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n\n return this;\n }\n\n divideScalar(s) {\n if (s !== 0) {\n this.x /= s;\n this.y /= s;\n } else {\n this.set(0, 0);\n }\n\n return this;\n }\n\n multiplyScalar(s) {\n this.x *= s;\n this.y *= s;\n\n return this;\n }\n\n negate() {\n return this.multiplyScalar(-1);\n }\n\n dot(v) {\n return this.x * v.x + this.y * v.y;\n }\n\n lengthSq() {\n return this.x * this.x + this.y * this.y;\n }\n\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n\n normalize() {\n return this.divideScalar(this.length());\n }\n\n distanceTo(v) {\n return Math.sqrt(this.distanceToSquared(v));\n }\n\n rotate(tha) {\n const x = this.x;\n const y = this.y;\n\n this.x = x * Math.cos(tha) + y * Math.sin(tha);\n this.y = -x * Math.sin(tha) + y * Math.cos(tha);\n\n return this;\n }\n\n distanceToSquared(v) {\n const dx = this.x - v.x;\n const dy = this.y - v.y;\n\n return dx * dx + dy * dy;\n }\n\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n\n return this;\n }\n\n equals(v) {\n return v.x === this.x && v.y === this.y;\n }\n\n clear() {\n this.x = 0.0;\n this.y = 0.0;\n return this;\n }\n\n clone() {\n return new Vector2D(this.x, this.y);\n }\n}\n","/** @typedef {import('../behaviour/Behaviour')} Behaviour */\n/** @typedef {import('../math/Vector2D')} Vector2D */\n/** @typedef {import('../utils/Rgb')} Rgb */\nimport Rgb from \"../utils/Rgb\";\nimport Puid from \"../utils/Puid\";\nimport Util from \"../utils/Util\";\nimport ease from \"../math/ease\";\nimport Vector2D from \"../math/Vector2D\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class Particle {\n /** @type string */\n id = ''\n\n /** @type {{p:Vector2D,v:Vector2D,a:Vector2D}} */\n old = {}\n\n /** @type {object} */\n data = {}\n\n /** @type {Behaviour[]} */\n behaviours = []\n\n /** @type {Vector2D} */\n p = []\n\n /** @type {Vector2D} */\n v = []\n\n /** @type {Vector2D} */\n a = []\n\n /** @type {Rgb} */\n rgb = {}\n\n /**\n * the Particle class\n *\n * @class Proton.Particle\n * @constructor\n * @param {Object} pObj the parameters object;\n * for example {life:3,dead:false}\n */\n constructor(conf) {\n /**\n * The particle's id;\n * @property id\n * @type {string}\n */\n this.name = \"Particle\";\n this.id = Puid.id(this.name);\n this.old = {};\n this.data = {};\n this.behaviours = [];\n\n this.p = new Vector2D();\n this.v = new Vector2D();\n this.a = new Vector2D();\n this.old.p = new Vector2D();\n this.old.v = new Vector2D();\n this.old.a = new Vector2D();\n\n this.rgb = new Rgb();\n this.reset();\n conf && Util.setProp(this, conf);\n }\n\n getDirection() {\n return Math.atan2(this.v.x, -this.v.y) * MathUtil.N180_PI;\n }\n\n reset() {\n this.life = Infinity;\n this.age = 0;\n\n this.dead = false;\n this.sleep = false;\n this.body = null;\n this.sprite = null;\n this.parent = null;\n\n this.energy = 1; // Energy Loss\n this.mass = 1;\n this.radius = 10;\n this.alpha = 1;\n this.scale = 1;\n this.rotation = 0;\n this.color = null;\n\n this.p.set(0, 0);\n this.v.set(0, 0);\n this.a.set(0, 0);\n this.old.p.set(0, 0);\n this.old.v.set(0, 0);\n this.old.a.set(0, 0);\n this.easing = ease.easeLinear;\n\n this.rgb.reset();\n Util.emptyObject(this.data);\n this.removeAllBehaviours();\n\n return this;\n }\n\n update(time, index) {\n if (!this.sleep) {\n this.age += time;\n this.applyBehaviours(time, index);\n }\n\n if (this.age < this.life) {\n const scale = this.easing(this.age / this.life);\n this.energy = Math.max(1 - scale, 0);\n } else {\n this.destroy();\n }\n }\n\n applyBehaviours(time, index) {\n const length = this.behaviours.length;\n let i;\n\n for (i = 0; i < length; i++) {\n this.behaviours[i] &&\n this.behaviours[i].applyBehaviour(this, time, index);\n }\n }\n\n /**\n * @param {Behaviour} behaviour\n */\n addBehaviour(behaviour) {\n this.behaviours.push(behaviour);\n\n if (behaviour.hasOwnProperty(\"parents\")) behaviour.parents.push(this);\n behaviour.initialize(this);\n }\n\n /**\n * @param {Behaviour[]} behaviours\n */\n addBehaviours(behaviours) {\n const length = behaviours.length;\n let i;\n\n for (i = 0; i < length; i++) {\n this.addBehaviour(behaviours[i]);\n }\n }\n\n removeBehaviour(behaviour) {\n const index = this.behaviours.indexOf(behaviour);\n\n if (index > -1) {\n const behaviour = this.behaviours.splice(index, 1);\n behaviour.parents = null;\n }\n }\n\n removeAllBehaviours() {\n Util.emptyArray(this.behaviours);\n }\n\n /**\n * Destory this particle\n * @method destroy\n */\n destroy() {\n this.removeAllBehaviours();\n this.energy = 0;\n this.dead = true;\n this.parent = null;\n }\n}\n","export default {\n /**\n * @typedef {Object} rgbObject\n * @property {Number} r red value\n * @property {Number} g green value\n * @property {Number} b blue value\n */\n /**\n * converts a hex value to a rgb object\n *\n * @memberof Proton#Proton.Util\n * @method hexToRgb\n *\n * @param {String} h any hex value, e.g. #000000 or 000000 for black\n *\n * @return {rgbObject}\n */\n hexToRgb(h) {\n const hex16 = h.charAt(0) === \"#\" ? h.substring(1, 7) : h;\n const r = parseInt(hex16.substring(0, 2), 16);\n const g = parseInt(hex16.substring(2, 4), 16);\n const b = parseInt(hex16.substring(4, 6), 16);\n\n return { r, g, b };\n },\n\n /**\n * converts a rgb value to a rgb string\n *\n * @memberof Proton#Proton.Util\n * @method rgbToHex\n *\n * @param {Object | Proton.hexToRgb} rgb a rgb object like in {@link Proton#Proton.}\n *\n * @return {String} rgb()\n */\n rgbToHex(rbg) {\n return `rgb(${rbg.r}, ${rbg.g}, ${rbg.b})`;\n },\n\n getHex16FromParticle(p) {\n return Number(p.rgb.r) * 65536 + Number(p.rgb.g) * 256 + Number(p.rgb.b);\n }\n};\n","import Vector2D from \"./Vector2D\";\n\nexport default class Polar2D {\n constructor(r, tha) {\n this.r = Math.abs(r) || 0;\n this.tha = tha || 0;\n }\n\n set(r, tha) {\n this.r = r;\n this.tha = tha;\n return this;\n }\n\n setR(r) {\n this.r = r;\n return this;\n }\n\n setTha(tha) {\n this.tha = tha;\n return this;\n }\n\n copy(p) {\n this.r = p.r;\n this.tha = p.tha;\n return this;\n }\n\n toVector() {\n return new Vector2D(this.getX(), this.getY());\n }\n\n getX() {\n return this.r * Math.sin(this.tha);\n }\n\n getY() {\n return -this.r * Math.cos(this.tha);\n }\n\n normalize() {\n this.r = 1;\n return this;\n }\n\n equals(v) {\n return v.r === this.r && v.tha === this.tha;\n }\n\n clear() {\n this.r = 0.0;\n this.tha = 0.0;\n return this;\n }\n\n clone() {\n return new Polar2D(this.r, this.tha);\n }\n}\n","const Mat3 = {\n create(mat3) {\n const mat = new Float32Array(9);\n if (mat3) this.set(mat3, mat);\n\n return mat;\n },\n\n set(mat1, mat2) {\n for (let i = 0; i < 9; i++) mat2[i] = mat1[i];\n\n return mat2;\n },\n\n multiply(mat, mat2, mat3) {\n let a00 = mat[0],\n a01 = mat[1],\n a02 = mat[2],\n a10 = mat[3],\n a11 = mat[4],\n a20 = mat[6],\n a21 = mat[7],\n b00 = mat2[0],\n b01 = mat2[1],\n b02 = mat2[2],\n b10 = mat2[3],\n b11 = mat2[4],\n b20 = mat2[6],\n b21 = mat2[7];\n\n mat3[0] = b00 * a00 + b01 * a10;\n mat3[1] = b00 * a01 + b01 * a11;\n mat3[2] = a02 * b02;\n mat3[3] = b10 * a00 + b11 * a10;\n mat3[4] = b10 * a01 + b11 * a11;\n mat3[6] = b20 * a00 + b21 * a10 + a20;\n mat3[7] = b20 * a01 + b21 * a11 + a21;\n\n return mat3;\n },\n\n inverse(mat, mat3) {\n let a00 = mat[0],\n a01 = mat[1],\n a10 = mat[3],\n a11 = mat[4],\n a20 = mat[6],\n a21 = mat[7],\n b01 = a11,\n b11 = -a10,\n b21 = a21 * a10 - a11 * a20,\n d = a00 * b01 + a01 * b11,\n id;\n\n id = 1 / d;\n mat3[0] = b01 * id;\n mat3[1] = -a01 * id;\n mat3[3] = b11 * id;\n mat3[4] = a00 * id;\n mat3[6] = b21 * id;\n mat3[7] = (-a21 * a00 + a01 * a20) * id;\n\n return mat3;\n },\n\n multiplyVec2(m, vec, mat3) {\n let x = vec[0],\n y = vec[1];\n\n mat3[0] = x * m[0] + y * m[3] + m[6];\n mat3[1] = x * m[1] + y * m[4] + m[7];\n\n return mat3;\n }\n};\n\nexport default Mat3;\n","import Span from \"./Span\";\nimport Util from \"../utils/Util\";\nimport MathUtil from \"./MathUtil\";\n\nexport default class ArraySpan extends Span {\n constructor(color) {\n super();\n this._arr = Util.toArray(color);\n }\n\n getValue() {\n const val = Util.getRandFromArray(this._arr);\n return val === \"random\" || val === \"Random\" ? MathUtil.randomColor() : val;\n }\n\n /**\n * Make sure that the color is an instance of Proton.ArraySpan, if not it makes a new instance\n *\n * @method setSpanValue\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n static createArraySpan(arr) {\n if (!arr) return null;\n\n if (arr instanceof ArraySpan) return arr;\n else return new ArraySpan(arr);\n }\n}\n","export default class Rectangle {\n constructor(x, y, w, h) {\n this.x = x;\n this.y = y;\n\n this.width = w;\n this.height = h;\n\n this.bottom = this.y + this.height;\n this.right = this.x + this.width;\n }\n\n contains(x, y) {\n if (x <= this.right && x >= this.x && y <= this.bottom && y >= this.y)\n return true;\n else return false;\n }\n}\n","import Span from \"../math/Span\";\nimport Util from \"../utils/Util\";\n\nexport default class Rate {\n /**\n * The number of particles per second emission (a [particle]/b [s]);\n * @namespace\n * @memberof! Proton#\n * @constructor\n * @alias Rate\n *\n * @param {Array | Number | Span} numpan the number of each emission;\n * @param {Array | Number | Span} timepan the time of each emission;\n * for example: new Rate(new Span(10, 20), new Span(.1, .25));\n */\n constructor(numpan, timepan) {\n this.numPan = Span.setSpanValue(Util.initValue(numpan, 1));\n this.timePan = Span.setSpanValue(Util.initValue(timepan, 1));\n\n this.startTime = 0;\n this.nextTime = 0;\n this.init();\n }\n\n init() {\n this.startTime = 0;\n this.nextTime = this.timePan.getValue();\n }\n\n getValue(time) {\n this.startTime += time;\n\n if (this.startTime >= this.nextTime) {\n this.startTime = 0;\n this.nextTime = this.timePan.getValue();\n\n if (this.numPan.b === 1) {\n if (this.numPan.getValue(false) > 0.5) return 1;\n else return 0;\n } else {\n return this.numPan.getValue(true);\n }\n }\n\n return 0;\n }\n}\n","export default class Initialize {\n reset() {}\n\n init(emitter, particle) {\n if (particle) {\n this.initialize(particle);\n } else {\n this.initialize(emitter);\n }\n }\n\n // sub class init\n initialize(target) {}\n}\n","import Span from \"../math/Span\";\nimport Initialize from \"./Initialize\";\n\nexport default class Life extends Initialize {\n constructor(a, b, c) {\n super();\n\n this.lifePan = Span.setSpanValue(a, b, c);\n this.name = \"Life\";\n }\n\n initialize(target) {\n if (this.lifePan.a === Infinity) target.life = Infinity;\n else target.life = this.lifePan.getValue();\n }\n}\n","import Vector2D from \"../math/Vector2D\";\n\nexport default class Zone {\n constructor() {\n this.vector = new Vector2D(0, 0);\n this.random = 0;\n this.crossType = \"dead\";\n this.alert = true;\n }\n\n getPosition() {}\n\n crossing(particle) {}\n}\n","import Zone from \"./Zone\";\n\nexport default class PointZone extends Zone {\n constructor(x, y) {\n super();\n\n this.x = x;\n this.y = y;\n }\n\n getPosition() {\n this.vector.x = this.x;\n this.vector.y = this.y;\n\n return this.vector;\n }\n\n crossing(particle) {\n if (this.alert) {\n console.error(\"Sorry, PointZone does not support crossing method!\");\n this.alert = false;\n }\n }\n}\n","import Util from \"../utils/Util\";\nimport PointZone from \"../zone/PointZone\";\nimport Initialize from \"./Initialize\";\n\nexport default class Position extends Initialize {\n constructor(zone) {\n super();\n this.zone = Util.initValue(zone, new PointZone());\n this.name = \"Position\";\n }\n\n reset(zone) {\n this.zone = Util.initValue(zone, new PointZone());\n }\n\n initialize(target) {\n this.zone.getPosition();\n\n target.p.x = this.zone.vector.x;\n target.p.y = this.zone.vector.y;\n }\n}\n","import Proton from \"../core/Proton\";\nimport Span from \"../math/Span\";\nimport Util from \"../utils/Util\";\nimport Initialize from \"./Initialize\";\nimport Polar2D from \"../math/Polar2D\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class Velocity extends Initialize {\n constructor(rpan, thapan, type) {\n super();\n\n this.rPan = Span.setSpanValue(rpan);\n this.thaPan = Span.setSpanValue(thapan);\n this.type = Util.initValue(type, \"vector\");\n\n this.name = \"Velocity\";\n }\n\n reset(rpan, thapan, type) {\n this.rPan = Span.setSpanValue(rpan);\n this.thaPan = Span.setSpanValue(thapan);\n this.type = Util.initValue(type, \"vector\");\n }\n\n normalizeVelocity(vr) {\n return vr * Proton.MEASURE;\n }\n\n initialize(target) {\n if (this.type === \"p\" || this.type === \"P\" || this.type === \"polar\") {\n const polar2d = new Polar2D(\n this.normalizeVelocity(this.rPan.getValue()),\n this.thaPan.getValue() * MathUtil.PI_180\n );\n\n target.v.x = polar2d.getX();\n target.v.y = polar2d.getY();\n } else {\n target.v.x = this.normalizeVelocity(this.rPan.getValue());\n target.v.y = this.normalizeVelocity(this.thaPan.getValue());\n }\n }\n}\n","import Span from \"../math/Span\";\nimport Initialize from \"./Initialize\";\n\nexport default class Mass extends Initialize {\n constructor(a, b, c) {\n super();\n this.massPan = Span.setSpanValue(a, b, c);\n this.name = \"Mass\";\n }\n\n initialize(target) {\n target.mass = this.massPan.getValue();\n }\n}\n","import Span from \"../math/Span\";\nimport Initialize from \"./Initialize\";\n\nexport default class Radius extends Initialize {\n constructor(a, b, c) {\n super();\n this.radius = Span.setSpanValue(a, b, c);\n\n this.name = \"Radius\";\n }\n\n reset(a, b, c) {\n this.radius = Span.setSpanValue(a, b, c);\n }\n\n initialize(particle) {\n particle.radius = this.radius.getValue();\n particle.data.oldRadius = particle.radius;\n }\n}\n","import Util from \"../utils/Util\";\nimport ArraySpan from \"../math/ArraySpan\";\nimport Initialize from \"./Initialize\";\n\nexport default class Body extends Initialize {\n constructor(image, w, h) {\n super();\n\n this.image = this.setSpanValue(image);\n this.w = Util.initValue(w, 20);\n this.h = Util.initValue(h, this.w);\n this.name = \"Body\";\n }\n\n initialize(particle) {\n const imageTarget = this.image.getValue();\n\n if (typeof imageTarget === \"string\") {\n particle.body = {\n width: this.w,\n height: this.h,\n src: imageTarget,\n isInner: true,\n inner: true\n };\n } else {\n particle.body = imageTarget;\n }\n }\n\n setSpanValue(image) {\n return image instanceof ArraySpan ? image : new ArraySpan(image);\n }\n}\n","import Proton from '../core/Proton';\nimport Util from '../utils/Util';\nimport ease from '../math/ease';\n\nexport default class Behaviour {\n static id = 0;\n\n /**\n * The Behaviour class is the base for the other Behaviour\n *\n * @memberof! -\n * @interface\n * @alias Proton.Behaviour\n *\n * @param {Number} life \tthe behaviours life\n * @param {String} easing \tThe behaviour's decaying trend, for example ease.easeOutQuart\n *\n * @property {String} id \t\tThe behaviours id\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n * @property {Number} age=0 \tHow long the particle should be 'alife'\n * @property {Number} energy=1\n * @property {Boolean} dead=false The particle is dead at first\n * @property {Array} parents \tThe behaviour's parents array\n * @property {String} name \tThe behaviour name\n */\n constructor(life, easing) {\n\n this.life = Util.initValue(life, Infinity);\n this.easing = ease.getEasing(easing);\n\n this.age = 0;\n this.energy = 1;\n this.dead = false;\n this.parents = [];\n\n this.id = `Behaviour_${Behaviour.id++}`;\n this.name = 'Behaviour';\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Number} [life=Infinity] \t\tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n */\n reset(life, easing) {\n this.life = Util.initValue(life, Infinity);\n this.easing = ease.getEasing(easing);\n }\n\n /**\n * Normalize a force by 1:100;\n *\n * @method normalizeForce\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Proton.Vector2D} force\n */\n normalizeForce(force) {\n return force.multiplyScalar(Proton.MEASURE);\n }\n\n /**\n * Normalize a value by 1:100;\n *\n * @method normalizeValue\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Number} value\n */\n normalizeValue(value) {\n return value * Proton.MEASURE;\n }\n\n /**\n * Initialize the behaviour's parameters for all particles\n *\n * @method initialize\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Proton.Particle} particle\n */\n initialize(particle) {}\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton.Behaviour\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n calculate(particle, time, index) {\n this.age += time;\n\n if (this.age >= this.life || this.dead) {\n this.energy = 0;\n this.dead = true;\n this.destroy();\n } else {\n const scale = this.easing(particle.age / particle.life);\n this.energy = Math.max(1 - scale, 0);\n }\n }\n\n /**\n * Destory this behaviour\n *\n * @method destroy\n * @memberof Proton.Behaviour\n * @instance\n */\n destroy() {\n let i = this.parents.length;\n while (i--) {\n this.parents[i].removeBehaviour(this);\n }\n\n this.parents.length = 0;\n }\n}\n","import Vector2D from '../math/Vector2D';\nimport Behaviour from './Behaviour';\n\nexport default class Force extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Force\n\t *\n\t * @param {Number} fx\n\t * @param {Number} fy\n\t * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(fx, fy, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.force = this.normalizeForce(new Vector2D(fx, fy));\n\t\tthis.name = 'Force';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Force\n\t * @instance\n\t *\n\t * @param {Number} fx\n\t * @param {Number} fy\n\t * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(fx, fy, life, easing) {\n\t\tthis.force = this.normalizeForce(new Vector2D(fx, fy));\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#Proton.Force\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} the integrate time 1/ms\n\t * @param {Int} the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.calculate(particle, time, index);\n\t\tparticle.a.add(this.force);\n\t}\n}","import Util from \"../utils/Util\";\nimport Vector2D from \"../math/Vector2D\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class Attraction extends Behaviour {\n /**\n * This behaviour let the particles follow one specific Proton.Vector2D\n *\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Attraction\n *\n * @todo add description for 'force' and 'radius'\n *\n * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n * @param {Number} [force=100]\n * @param {Number} [radius=1000]\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {Proton.Vector2D} targetPosition\n * @property {Number} radius\n * @property {Number} force\n * @property {Number} radiusSq\n * @property {Proton.Vector2D} attractionForce\n * @property {Number} lengthSq\n * @property {String} name The Behaviour name\n */\n constructor(targetPosition, force, radius, life, easing) {\n super(life, easing);\n\n this.targetPosition = Util.initValue(targetPosition, new Vector2D());\n this.radius = Util.initValue(radius, 1000);\n this.force = Util.initValue(this.normalizeValue(force), 100);\n\n this.radiusSq = this.radius * this.radius;\n this.attractionForce = new Vector2D();\n this.lengthSq = 0;\n\n this.name = \"Attraction\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Attraction\n * @instance\n *\n * @todo add description for 'force' and 'radius'\n *\n * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n * @param {Number} [force=100]\n * @param {Number} [radius=1000]\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n */\n reset(targetPosition, force, radius, life, easing) {\n this.targetPosition = Util.initValue(targetPosition, new Vector2D());\n this.radius = Util.initValue(radius, 1000);\n this.force = Util.initValue(this.normalizeValue(force), 100);\n\n this.radiusSq = this.radius * this.radius;\n this.attractionForce = new Vector2D();\n this.lengthSq = 0;\n\n life && super.reset(life, easing);\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @memberof Proton#Proton.Attraction\n * @method applyBehaviour\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n\n this.attractionForce.copy(this.targetPosition);\n this.attractionForce.sub(particle.p);\n this.lengthSq = this.attractionForce.lengthSq();\n\n if (this.lengthSq > 0.00004 && this.lengthSq < this.radiusSq) {\n this.attractionForce.normalize();\n this.attractionForce.multiplyScalar(1 - this.lengthSq / this.radiusSq);\n this.attractionForce.multiplyScalar(this.force);\n\n particle.a.add(this.attractionForce);\n }\n }\n}\n","import Vector2D from \"../math/Vector2D\";\nimport MathUtil from \"../math/MathUtil\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class RandomDrift extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Behaviour\n * @constructor\n * @alias RandomDrift\n *\n * @param {Number} driftX \t\t\t\tX value of the new Vector2D\n * @param {Number} driftY \t\t\t\tY value of the new Vector2D\n * @param {Number} delay \t\t\t\tHow much delay the drift should have\n * @param {Number} [life=Infinity] \t\tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n *\n * @property {Number} time The time of the drift\n * @property {String} name The Behaviour name\n */\n constructor(driftX, driftY, delay, life, easing) {\n super(life, easing);\n\n this.reset(driftX, driftY, delay);\n this.time = 0;\n this.name = \"RandomDrift\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#RandomDrift\n * @instance\n *\n * @param {Number} driftX \t\t\t\tX value of the new Vector2D\n * @param {Number} driftY \t\t\t\tY value of the new Vector2D\n * @param {Number} delay \t\t\t\tHow much delay the drift should have\n * @param {Number} [life=Infinity] \t\tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n */\n reset(driftX, driftY, delay, life, easing) {\n this.panFoce = new Vector2D(driftX, driftY);\n this.panFoce = this.normalizeForce(this.panFoce);\n this.delay = delay;\n\n life && super.reset(life, easing);\n }\n\n initialize(particle) {\n particle.data.time = 0;\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#RandomDrift\n * @instance\n *\n * @param {Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n particle.data.time += time;\n\n if (particle.data.time >= this.delay) {\n particle.a.addXY(\n MathUtil.randomAToB(-this.panFoce.x, this.panFoce.x),\n MathUtil.randomAToB(-this.panFoce.y, this.panFoce.y)\n );\n\n particle.data.time = 0;\n }\n }\n}\n","import Force from './Force';\n\nexport default class Gravity extends Force {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton#Proton.Force\n\t * @constructor\n\t * @alias Proton.Gravity\n\t *\n\t * @param {Number} g \t\t\t\t\t\t\tGravity\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(g, life, easing) {\n\t\tsuper(0, g, life, easing);\n\t\tthis.name = 'Gravity';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Gravity\n\t * @instance\n\t *\n\t * @param {Number} g \t\t\t\t\t\t\tGravity\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(g, life, easing) {\n\t\tsuper.reset(0, g, life, easing);\n\t}\n}","import Util from '../utils/Util';\nimport Vector2D from '../math/Vector2D';\nimport Behaviour from './Behaviour';\n\nexport default class Collision extends Behaviour {\n\n\t/**\n\t * The callback after collision\n\t *\n\t * @callback Callback\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Proton.Paritcle} otherParticle\n\t */\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Collision\n\t *\n\t * @todo add description to mass\n\t *\n\t * @param {Proton.Emitter} \t[emitter=null] \t\tthe attraction point coordinates\n\t * @param {Boolean} \t\t[mass=true]\n\t * @param {Callback}\t \t[callback=null]\t\tthe callback after the collision\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(emitter, mass, callback, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.reset(emitter, mass, callback);\n\t\tthis.name = 'Collision';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @memberof Proton#Proton.Collision\n\t * @method reset\n\t * @instance\n\t *\n\t * @todo add description to mass\n\t *\n\t * @param {Proton.Emitter} \t[emitter=null] \t\tthe attraction point coordinates\n\t * @param {Boolean} \t\t[mass=true]\n\t * @param {Callback}\t \t[callback=null]\t\tthe callback after the collision\n\t * @param {Number} \t\t\t[life=Infinity] \tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(emitter, mass, callback, life, easing) {\n\t\tthis.emitter = Util.initValue(emitter, null);\n\t\tthis.mass = Util.initValue(mass, true);\n\t\tthis.callback = Util.initValue(callback, null);\n\n\t\tthis.collisionPool = [];\n\t\tthis.delta = new Vector2D();\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @memberof Proton#Proton.Collision\n\t * @method applyBehaviour\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} \t\t\ttime the integrate time 1/ms\n\t * @param {Int} \t\t\tindex the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tconst newPool = this.emitter ? this.emitter.particles.slice(index) : this.pool.slice(index);\n\t\tconst length = newPool.length;\n\n\t\tlet otherParticle;\n\t\tlet lengthSq;\n\t\tlet overlap;\n\t\tlet totalMass;\n\t\tlet averageMass1, averageMass2;\n\t\tlet i;\n\n\t\tfor (i = 0; i < length; i++) {\n\t\t\totherParticle = newPool[i];\n\n\t\t\tif (otherParticle !== particle) {\n\t\t\t\tthis.delta.copy(otherParticle.p);\n\t\t\t\tthis.delta.sub(particle.p);\n\n\t\t\t\tlengthSq = this.delta.lengthSq();\n\t\t\t\tconst distance = particle.radius + otherParticle.radius;\n\n\t\t\t\tif (lengthSq <= distance * distance) {\n\t\t\t\t\toverlap = distance - Math.sqrt(lengthSq);\n\t\t\t\t\toverlap += 0.5;\n\n\t\t\t\t\ttotalMass = particle.mass + otherParticle.mass;\n\t\t\t\t\taverageMass1 = this.mass ? otherParticle.mass / totalMass : 0.5;\n\t\t\t\t\taverageMass2 = this.mass ? particle.mass / totalMass : 0.5;\n\n\t\t\t\t\tparticle.p.add(this.delta.clone().normalize().multiplyScalar(overlap * -averageMass1));\n\t\t\t\t\totherParticle.p.add(this.delta.normalize().multiplyScalar(overlap * averageMass2));\n\n\t\t\t\t\tthis.callback && this.callback(particle, otherParticle);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}","import Util from '../utils/Util';\nimport Behaviour from './Behaviour';\n\nexport default class CrossZone extends Behaviour {\n\n /**\n * Defines what happens if the particles come to the end of the specified zone\n *\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.CrossZone\n *\n * @param {Proton.Zone} zone \t\t\t\t\t\tcan be any Proton.Zone - e.g. Proton.RectZone()\n * @param {String} \t\t[crossType=dead] \t\t\twhat happens if the particles pass the zone - allowed strings: dead | bound | cross\n * @param {Number} \t\t[life=Infinity] \t\t\tthis behaviour's life\n * @param {String} \t\t[easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(zone, crossType, life, easing) {\n super(life, easing);\n\n this.reset(zone, crossType);\n this.name = 'CrossZone';\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.CrossZone\n * @instance\n *\n * @param {Proton.Zone} zone \t\t\t\tcan be any Proton.Zone - e.g. Proton.RectZone()\n * @param {String} \t\t[crossType=dead] \twhat happens if the particles pass the zone - allowed strings: dead | bound | cross\n * @param {Number} \t\t[life=Infinity] \tthis behaviour's life\n * @param {String} \t\t[easing=easeLinear]\tthis behaviour's easing\n */\n reset(zone, crossType, life, easing) {\n this.zone = zone;\n this.zone.crossType = Util.initValue(crossType, 'dead');\n\n life && super.reset(life, easing);\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#Proton.CrossZone\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n this.zone.crossing(particle);\n };\n}","import Util from \"../utils/Util\";\nimport Span from \"../math/Span\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class Alpha extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Alpha\n *\n * @todo add description for 'a' and 'b'\n *\n * @param {Number} a\n * @param {String} b\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(a, b, life, easing) {\n super(life, easing);\n\n this.reset(a, b);\n this.name = \"Alpha\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Alpha\n * @instance\n *\n * @todo add description for 'a' and 'b'\n *\n * @param {Number} a\n * @param {String} b\n * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n */\n reset(a, b, life, easing) {\n this.same = b === null || b === undefined ? true : false;\n this.a = Span.setSpanValue(Util.initValue(a, 1));\n this.b = Span.setSpanValue(b);\n\n life && super.reset(life, easing);\n }\n\n /**\n * Sets the new alpha value of the particle\n *\n * @method initialize\n * @memberof Proton#Proton.Alpha\n * @instance\n *\n * @param {Proton.Particle} particle A single Proton generated particle\n */\n initialize(particle) {\n particle.data.alphaA = this.a.getValue();\n\n if (this.same) particle.data.alphaB = particle.data.alphaA;\n else particle.data.alphaB = this.b.getValue();\n }\n\n /**\n * @method applyBehaviour\n * @memberof Proton#Proton.Alpha\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} \t\t\ttime the integrate time 1/ms\n * @param {Int} \t\t\tindex the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n\n particle.alpha =\n particle.data.alphaB +\n (particle.data.alphaA - particle.data.alphaB) * this.energy;\n\n if (particle.alpha < 0.001) particle.alpha = 0;\n }\n}\n","import Span from \"../math/Span\";\nimport Util from '../utils/Util';\nimport Behaviour from './Behaviour';\n\nexport default class Scale extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Scale\n\t *\n\t * @todo add description for 'a' and 'b'\n\t *\n\t * @param {Number} a\n\t * @param {String} b\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(a, b, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.reset(a, b);\n\t\tthis.name = 'Scale';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Scale\n\t * @instance\n\t *\n\t * @param {Number} a\n\t * @param {String} b\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(a, b, life, easing) {\n\t\tthis.same = b === null || b === undefined ? true : false;\n\t\tthis.a = Span.setSpanValue(Util.initValue(a, 1));\n\t\tthis.b = Span.setSpanValue(b);\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Initialize the behaviour's parameters for all particles\n\t *\n\t * @method initialize\n\t * @memberof Proton#Proton.Scale\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t */\n\tinitialize(particle) {\n\t\tparticle.data.scaleA = this.a.getValue();\n\t\tparticle.data.oldRadius = particle.radius;\n\t\tparticle.data.scaleB = this.same ? particle.data.scaleA : this.b.getValue();\n\t};\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#Proton.Scale\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} \t\t\ttime the integrate time 1/ms\n\t * @param {Int} \t\t\tindex the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.calculate(particle, time, index);\n\t\tparticle.scale = particle.data.scaleB + (particle.data.scaleA - particle.data.scaleB) * this.energy;\n\n\t\tif (particle.scale < 0.0001) particle.scale = 0;\n\t\tparticle.radius = particle.data.oldRadius * particle.scale;\n\t}\n}","import Span from \"../math/Span\";\nimport Util from '../utils/Util';\nimport Behaviour from './Behaviour';\n\nexport default class Rotate extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Proton.Behaviour\n\t * @constructor\n\t * @alias Proton.Rotate\n\t *\n\t * @todo add description for 'a', 'b' and 'style'\n\t *\n\t * @param {String} [influence=Velocity] The rotation's influence\n\t * @param {String} b\n\t * @param {String} [style=to]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(influence, b, style, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.reset(influence, b, style);\n\t\tthis.name = 'Rotate';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Rotate\n\t * @instance\n\t *\n\t * @todo add description for 'a', 'b' and 'style'\n\t *\n\t * @param {String} a\n\t * @param {String} b\n\t * @param {String} [style=to]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(a, b, style, life, easing) {\n\t\tthis.same = b === null || b === undefined ? true : false;\n\n\t\tthis.a = Span.setSpanValue(Util.initValue(a, 'Velocity'));\n\t\tthis.b = Span.setSpanValue(Util.initValue(b, 0));\n\t\tthis.style = Util.initValue(style, 'to');\n\n\t\tlife && super.reset(life, easing);\n\t}\n\n\t/**\n\t * Initialize the behaviour's parameters for all particles\n\t *\n\t * @method initialize\n\t * @memberof Proton#Proton.Rotate\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t */\n\tinitialize(particle) {\n\t\tparticle.rotation = this.a.getValue();\n\t\tparticle.data.rotationA = this.a.getValue();\n\n\t\tif (!this.same) particle.data.rotationB = this.b.getValue();\n\t};\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#Proton.Rotate\n\t * @instance\n\t *\n\t * @param {Proton.Particle} particle\n\t * @param {Number} \t\t\ttime the integrate time 1/ms\n\t * @param {Int} \t\t\tindex the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.calculate(particle, time, index);\n\n\t\tif (!this.same) {\n\t\t\tif (this.style === 'to' || this.style === 'TO' || this.style === '_') {\n\t\t\t\tparticle.rotation += particle.data.rotationB + (particle.data.rotationA - particle.data.rotationB) * this.energy\n\t\t\t} else {\n\t\t\t\tparticle.rotation += particle.data.rotationB;\n\t\t\t}\n\t\t} else if (this.a.a === 'V' || this.a.a === 'Velocity' || this.a.a === 'v') {\n\t\t\t// beta...\n\t\t\tparticle.rotation = particle.getDirection();\n\t\t}\n\t}\n\n}\n","import ColorUtil from \"../utils/ColorUtil\";\nimport ArraySpan from \"../math/ArraySpan\";\nimport Behaviour from \"./Behaviour\";\n\nexport default class Color extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Color\n *\n * @param {Proton.ArraySpan | String} a the string should be a hex e.g. #000000 for black\n * @param {Proton.ArraySpan | String} b the string should be a hex e.g. #000000 for black\n * @param {Number} [life=Infinity] \tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(a, b, life, easing) {\n super(life, easing);\n\n this.reset(a, b);\n this.name = \"Color\";\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.ArraySpan | String} a the string should be a hex e.g. #000000 for black\n * @param {Proton.ArraySpan | String} b the string should be a hex e.g. #000000 for black\n * @param {Number} [life=Infinity] \tthis behaviour's life\n * @param {String} [easing=easeLinear] \tthis behaviour's easing\n */\n reset(a, b, life, easing) {\n this.a = ArraySpan.createArraySpan(a);\n this.b = ArraySpan.createArraySpan(b);\n life && super.reset(life, easing);\n }\n\n /**\n * Initialize the behaviour's parameters for all particles\n *\n * @method initialize\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.Particle} particle\n */\n initialize(particle) {\n particle.color = this.a.getValue();\n particle.data.colorA = ColorUtil.hexToRgb(particle.color);\n\n if (this.b) particle.data.colorB = ColorUtil.hexToRgb(this.b.getValue());\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#Proton.Color\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n applyBehaviour(particle, time, index) {\n if (this.b) {\n this.calculate(particle, time, index);\n\n particle.rgb.r =\n particle.data.colorB.r +\n (particle.data.colorA.r - particle.data.colorB.r) * this.energy;\n particle.rgb.g =\n particle.data.colorB.g +\n (particle.data.colorA.g - particle.data.colorB.g) * this.energy;\n particle.rgb.b =\n particle.data.colorB.b +\n (particle.data.colorA.b - particle.data.colorB.b) * this.energy;\n\n particle.rgb.r = Math.floor(particle.rgb.r);\n particle.rgb.g = Math.floor(particle.rgb.g);\n particle.rgb.b = Math.floor(particle.rgb.b);\n } else {\n particle.rgb.r = particle.data.colorA.r;\n particle.rgb.g = particle.data.colorA.g;\n particle.rgb.b = particle.data.colorA.b;\n }\n }\n}\n","import MathUtil from \"../math/MathUtil\";\nimport Vector2D from \"../math/Vector2D\";\nimport Span from \"../math/Span\";\nimport Behaviour from \"./Behaviour\";\n\nconst CHANGING = \"changing\";\n\nexport default class Cyclone extends Behaviour {\n /**\n * @memberof! Proton#\n * @augments Proton.Behaviour\n * @constructor\n * @alias Proton.Cyclone\n *\n * @param {Number} angle\n * @param {Number} force\n * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n *\n * @property {String} name The Behaviour name\n */\n constructor(angle, force, life, easing) {\n super(life, easing);\n this.setAngleAndForce(angle, force);\n this.name = \"Cyclone\";\n }\n\n setAngleAndForce(angle, force) {\n this.force = CHANGING;\n this.angle = MathUtil.PI / 2;\n\n if (angle === \"right\") {\n this.angle = MathUtil.PI / 2;\n } else if (angle === \"left\") {\n this.angle = -MathUtil.PI / 2;\n } else if (angle === \"random\") {\n this.angle = \"random\";\n } else if (angle instanceof Span) {\n this.angle = \"span\";\n this.span = angle;\n } else if (angle) {\n this.angle = angle;\n }\n\n if (\n String(force).toLowerCase() === \"changing\" ||\n String(force).toLowerCase() === \"chang\" ||\n String(force).toLowerCase() === \"auto\"\n ) {\n this.force = CHANGING;\n } else if (force) {\n this.force = force;\n }\n }\n\n /**\n * Reset this behaviour's parameters\n *\n * @method reset\n * @memberof Proton#Proton.Cyclone\n * @instance\n *\n * @param {Number} angle\n * @param {Number} force\n * @param {Number} [life=Infinity] \t\t\tthis behaviour's life\n * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n */\n reset(angle, force, life, easing) {\n this.angle = MathUtil.PI / 2;\n this.setAngleAndForce(angle, force);\n life && super.reset(life, easing);\n }\n\n initialize(particle) {\n if (this.angle === \"random\") {\n particle.data.cangle = MathUtil.randomAToB(-MathUtil.PI, MathUtil.PI);\n } else if (this.angle === \"span\") {\n particle.data.cangle = this.span.getValue();\n }\n\n particle.data.cyclone = new Vector2D(0, 0);\n }\n\n /**\n * Apply this behaviour for all particles every time\n *\n * @method applyBehaviour\n * @memberof Proton#Proton.Cyclone\n * @instance\n *\n * @param {Proton.Particle} particle\n * @param {Number} the integrate time 1/ms\n * @param {Int} the particle index\n */\n applyBehaviour(particle, time, index) {\n this.calculate(particle, time, index);\n\n let length;\n let gradient = particle.v.getGradient();\n if (this.angle === \"random\" || this.angle === \"span\") {\n gradient += particle.data.cangle;\n } else {\n gradient += this.angle;\n }\n\n if (this.force === CHANGING) {\n length = particle.v.length() / 100;\n } else {\n length = this.force;\n }\n\n particle.data.cyclone.x = length * Math.cos(gradient);\n particle.data.cyclone.y = length * Math.sin(gradient);\n particle.data.cyclone = this.normalizeForce(particle.data.cyclone);\n particle.a.add(particle.data.cyclone);\n }\n}\n","import Attraction from './Attraction';\n\nexport default class Repulsion extends Attraction {\n\n\t/**\n\t * The oppisite of Proton.Attraction - turns the force\n\t *\n\t * @memberof! Proton#\n\t * @augments Proton#Proton.Attraction\n\t * @constructor\n\t * @alias Proton.Repulsion\n\t *\n\t * @todo add description for 'force' and 'radius'\n\t *\n\t * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n\t * @param {Number} [force=100]\n\t * @param {Number} [radius=1000]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t *\n\t * @property {Number} force\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(targetPosition, force, radius, life, easing) {\n\t\tsuper(targetPosition, force, radius, life, easing);\n\n\t\tthis.force *= -1;\n\t\tthis.name = 'Repulsion';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#Proton.Repulsion\n\t * @instance\n\t *\n\t * @todo add description for 'force' and 'radius'\n\t *\n\t * @param {Proton.Vector2D} targetPosition the attraction point coordinates\n\t * @param {Number} [force=100]\n\t * @param {Number} [radius=1000]\n\t * @param {Number} [life=Infinity] \t\t\t\tthis behaviour's life\n\t * @param {String} [easing=ease.easeLinear] \tthis behaviour's easing\n\t */\n\treset(targetPosition, force, radius, life, easing) {\n\t\tsuper.reset(targetPosition, force, radius, life, easing);\n\t\tthis.force *= -1;\n\t}\n}\n","import Util from '../utils/Util';\nimport Vector2D from '../math/Vector2D';\nimport Behaviour from './Behaviour';\n\nexport default class GravityWell extends Behaviour {\n\n\t/**\n\t * @memberof! Proton#\n\t * @augments Behaviour\n\t * @constructor\n\t * @alias GravityWell\n\t *\n\t * @param {Vector2D} [centerPoint=new Vector2D] The point in the center\n\t * @param {Number} [force=100]\t\t\t\t\tThe force\n\t * @param {Number} [life=Infinity]\t\t\t\tthis behaviour's life\n\t * @param {String} [easing=easeLinear]\tthis behaviour's easing\n\t *\n\t * @property {String} name The Behaviour name\n\t */\n\tconstructor(centerPoint, force, life, easing) {\n\t\tsuper(life, easing);\n\n\t\tthis.distanceVec = new Vector2D();\n\t\tthis.centerPoint = Util.initValue(centerPoint, new Vector2D);\n\t\tthis.force = Util.initValue(this.normalizeValue(force), 100);\n\n\t\tthis.name = 'GravityWell';\n\t}\n\n\t/**\n\t * Reset this behaviour's parameters\n\t *\n\t * @method reset\n\t * @memberof Proton#GravityWell\n\t * @instance\n\t *\n\t * @param {Vector2D} [centerPoint=new Vector2D] The point in the center\n\t * @param {Number} [force=100]\t\t\t\t\tThe force\n\t * @param {Number} [life=Infinity]\t\t\t\tthis behaviour's life\n\t * @param {String} [easing=easeLinear]\tthis behaviour's easing\n\t */\n\treset(centerPoint, force, life, easing) {\n\t\tthis.distanceVec = new Vector2D();\n\t\tthis.centerPoint = Util.initValue(centerPoint, new Vector2D);\n\t\tthis.force = Util.initValue(this.normalizeValue(force), 100);\n\n\t\tlife && super.reset(life, easing);\n\t};\n\n\t/**\n\t * @inheritdoc\n\t */\n\tinitialize(particle) {\n\t};\n\n\t/**\n\t * Apply this behaviour for all particles every time\n\t *\n\t * @method applyBehaviour\n\t * @memberof Proton#GravityWell\n\t * @instance\n\t *\n\t * @param {Particle} particle\n\t * @param {Number} the integrate time 1/ms\n\t * @param {Int} the particle index\n\t */\n\tapplyBehaviour(particle, time, index) {\n\t\tthis.distanceVec.set(this.centerPoint.x - particle.p.x, this.centerPoint.y - particle.p.y);\n\t\tconst distanceSq = this.distanceVec.lengthSq();\n\n\t\tif (distanceSq !== 0) {\n\t\t\tconst distance = this.distanceVec.length();\n\t\t\tconst factor = (this.force * time) / (distanceSq * distance);\n\n\t\t\tparticle.v.x += factor * this.distanceVec.x;\n\t\t\tparticle.v.y += factor * this.distanceVec.y;\n\t\t}\n\t}\n}","import Util from \"../utils/Util\";\nimport Initialize from \"./Initialize\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default {\n initialize(emitter, particle, initializes) {\n const length = initializes.length;\n let i;\n\n for (i = 0; i < length; i++) {\n if (initializes[i] instanceof Initialize) {\n initializes[i].init(emitter, particle);\n } else {\n this.init(emitter, particle, initializes[i]);\n }\n }\n\n this.bindEmitter(emitter, particle);\n },\n\n // init\n init(emitter, particle, initialize) {\n Util.setProp(particle, initialize);\n Util.setVectorVal(particle, initialize);\n },\n\n bindEmitter(emitter, particle) {\n if (emitter.bindEmitter) {\n particle.p.add(emitter.p);\n particle.v.add(emitter.v);\n particle.a.add(emitter.a);\n\n particle.v.rotate(MathUtil.degreeTransform(emitter.rotation));\n }\n }\n};\n","import Util from \"../utils/Util\";\nimport Puid from \"../utils/Puid\";\nimport Particle from \"../core/Particle\";\nimport EventDispatcher from \"../events/EventDispatcher\";\n\nimport Rate from \"../initialize/Rate\";\nimport InitializeUtil from \"../initialize/InitializeUtil\";\n\nexport default class Emitter extends Particle {\n /**\n * You can use this emit particles.\n *\n * It will dispatch follow events:\n * PARTICLE_CREATED\n * PARTICLE_UPDATA\n * PARTICLE_DEAD\n *\n * @class Emitter\n * @constructor\n * @param {Object} conf the parameters object;\n * for example {damping:0.01,bindEmitter:false}\n */\n constructor(conf = {}) {\n super(conf);\n\n this.particles = [];\n this.behaviours = [];\n this.initializes = [];\n\n this.emitTime = 0;\n this.emitSpeed = 0;\n this.totalTime = -1;\n\n /**\n * The friction coefficient for all particle emit by This;\n * @property damping\n * @type {Number}\n * @default 0.006\n */\n this.damping = 0.006;\n\n /**\n * If bindEmitter the particles can bind this emitter's property;\n * @property bindEmitter\n * @type {Boolean}\n * @default true\n */\n this.bindEmitter = true;\n\n /**\n * The number of particles per second emit (a [particle]/b [s]);\n * @property rate\n * @type {Rate}\n * @default Rate(1, .1)\n */\n this.rate = new Rate(1, 0.1);\n\n this.name = \"Emitter\";\n this.id = Puid.id(this.name);\n }\n\n /**\n * start emit particle\n * @method emit\n * @param {Number} emitTime begin emit time;\n * @param {String} life the life of this emitter\n */\n emit(totalTime, life) {\n this.stoped = false;\n this.emitTime = 0;\n this.totalTime = Util.initValue(totalTime, Infinity);\n\n if (life === true || life === \"life\" || life === \"destroy\") {\n this.life = totalTime === \"once\" ? 1 : this.totalTime;\n } else if (!isNaN(life)) {\n this.life = life;\n }\n\n this.rate.init();\n }\n\n /**\n * stop emiting\n * @method stop\n */\n stop() {\n this.totalTime = -1;\n this.emitTime = 0;\n this.stoped = true;\n }\n\n preEmit(time) {\n let oldStoped = this.stoped;\n let oldEmitTime = this.emitTime;\n let oldTotalTime = this.totalTime;\n\n this.stoped = false;\n this.emitTime = 0;\n this.totalTime = time;\n this.rate.init();\n\n const step = 0.0167;\n while (time > step) {\n time -= step;\n this.update(step);\n }\n\n this.stoped = oldStoped;\n this.emitTime = oldEmitTime + Math.max(time, 0);\n this.totalTime = oldTotalTime;\n }\n\n /**\n * remove current all particles\n * @method removeAllParticles\n */\n removeAllParticles() {\n let i = this.particles.length;\n while (i--) this.particles[i].dead = true;\n }\n\n /**\n * add initialize to this emitter\n * @method addSelfInitialize\n */\n addSelfInitialize(initialize) {\n if (initialize[\"init\"]) {\n initialize.init(this);\n } else {\n this.initAll();\n }\n }\n\n /**\n * add the Initialize to particles;\n *\n * you can use initializes array:for example emitter.addInitialize(initialize1,initialize2,initialize3);\n * @method addInitialize\n * @param {Initialize} initialize like this new Radius(1, 12)\n */\n addInitialize(...rest) {\n let i = rest.length;\n while (i--) this.initializes.push(rest[i]);\n }\n\n /**\n * remove the Initialize\n * @method removeInitialize\n * @param {Initialize} initialize a initialize\n */\n removeInitialize(initializer) {\n const index = this.initializes.indexOf(initializer);\n if (index > -1) this.initializes.splice(index, 1);\n }\n\n /**\n * remove all Initializes\n * @method removeInitializers\n */\n removeAllInitializers() {\n Util.emptyArray(this.initializes);\n }\n\n /**\n * add the Behaviour to particles;\n *\n * you can use Behaviours array:emitter.addBehaviour(Behaviour1,Behaviour2,Behaviour3);\n * @method addBehaviour\n * @param {Behaviour} behaviour like this new Color('random')\n */\n addBehaviour(...rest) {\n let i = arguments.length;\n while (i--) {\n let behaviour = rest[i];\n this.behaviours.push(behaviour);\n if (behaviour.parents) behaviour.parents.push(this);\n }\n }\n\n /**\n * remove the Behaviour\n * @method removeBehaviour\n * @param {Behaviour} behaviour a behaviour\n */\n removeBehaviour(behaviour) {\n let index = this.behaviours.indexOf(behaviour);\n this.behaviours.splice(index, 1);\n\n if (behaviour.parents) {\n index = behaviour.parents.indexOf(behaviour);\n behaviour.parents.splice(index, 1);\n }\n\n return index;\n }\n\n /**\n * remove all behaviours\n * @method removeAllBehaviours\n */\n removeAllBehaviours() {\n Util.emptyArray(this.behaviours);\n }\n\n // emitter update\n update(time) {\n this.age += time;\n if (this.age >= this.life || this.dead) this.destroy();\n\n this.emitting(time);\n this.integrate(time);\n }\n\n integrate(time) {\n if (!this.parent) return;\n\n const damping = 1 - this.damping;\n this.parent.integrator.calculate(this, time, damping);\n\n const length = this.particles.length;\n let i, particle;\n\n for (i = length - 1; i >= 0; i--) {\n particle = this.particles[i];\n\n // particle update\n particle.update(time, i);\n this.parent.integrator.calculate(particle, time, damping);\n this.dispatch(\"PARTICLE_UPDATE\", particle);\n\n // check dead\n if (particle.dead) {\n this.dispatch(\"PARTICLE_DEAD\", particle);\n\n this.parent.pool.expire(particle);\n this.particles.splice(i, 1);\n }\n }\n }\n\n dispatch(event, target) {\n this.parent && this.parent.dispatchEvent(event, target);\n this.bindEvent && this.dispatchEvent(event, target);\n }\n\n emitting(time) {\n if (this.totalTime === \"once\") {\n let i;\n const length = this.rate.getValue(99999);\n\n if (length > 0) this.emitSpeed = length;\n for (i = 0; i < length; i++) this.createParticle();\n this.totalTime = \"none\";\n } else {\n this.emitTime += time;\n\n if (this.emitTime < this.totalTime) {\n const length = this.rate.getValue(time);\n let i;\n\n if (length > 0) this.emitSpeed = length;\n for (i = 0; i < length; i++) this.createParticle();\n }\n }\n }\n\n /**\n * create single particle;\n *\n * can use emit({x:10},new Gravity(10),{'particleUpdate',fun}) or emit([{x:10},new Initialize],new Gravity(10),{'particleUpdate',fun})\n * @method removeAllParticles\n */\n createParticle(initialize, behaviour) {\n const particle = this.parent.pool.get(Particle);\n this.setupParticle(particle, initialize, behaviour);\n this.dispatch(\"PARTICLE_CREATED\", particle);\n\n return particle;\n }\n\n setupParticle(particle, initialize, behaviour) {\n let initializes = this.initializes;\n let behaviours = this.behaviours;\n\n if (initialize) initializes = Util.toArray(initialize);\n if (behaviour) behaviours = Util.toArray(behaviour);\n\n particle.reset();\n InitializeUtil.initialize(this, particle, initializes);\n particle.addBehaviours(behaviours);\n particle.parent = this;\n\n this.particles.push(particle);\n }\n\n remove() {\n this.stop();\n Util.destroyAll(this.particles);\n }\n\n /**\n * Destory this Emitter\n * @method destroy\n */\n destroy() {\n this.dead = true;\n this.remove();\n this.removeAllInitializers();\n this.removeAllBehaviours();\n this.parent && this.parent.removeEmitter(this);\n }\n}\n\nEventDispatcher.bind(Emitter);\n","import Emitter from \"./Emitter\";\n\nexport default class BehaviourEmitter extends Emitter {\n /**\n * The BehaviourEmitter class inherits from Proton.Emitter\n *\n * use the BehaviourEmitter you can add behaviours to self;\n * @class Proton.BehaviourEmitter\n * @constructor\n * @param {Object} conf the parameters object;\n */\n constructor(conf) {\n super(conf);\n\n this.selfBehaviours = [];\n }\n\n /**\n * add the Behaviour to emitter;\n *\n * you can use Behaviours array:emitter.addSelfBehaviour(Behaviour1,Behaviour2,Behaviour3);\n * @method addSelfBehaviour\n * @param {Proton.Behaviour} behaviour like this new Proton.Color('random')\n */\n addSelfBehaviour(...rest) {\n let i,\n length = rest.length;\n\n for (i = 0; i < length; i++) {\n let behaviour = rest[i];\n this.selfBehaviours.push(behaviour);\n behaviour.initialize(this);\n }\n }\n\n /**\n * remove the Behaviour for self\n * @method removeSelfBehaviour\n * @param {Proton.Behaviour} behaviour a behaviour\n */\n removeSelfBehaviour(behaviour) {\n const index = this.selfBehaviours.indexOf(behaviour);\n if (index > -1) this.selfBehaviours.splice(index, 1);\n }\n\n update(time) {\n super.update(time);\n\n if (!this.sleep) {\n const length = this.selfBehaviours.length;\n let i;\n\n for (i = 0; i < length; i++) {\n this.selfBehaviours[i].applyBehaviour(this, time, i);\n }\n }\n }\n}\n","import Util from \"../utils/Util\";\nimport Emitter from \"./Emitter\";\n\nexport default class FollowEmitter extends Emitter {\n /**\n * The FollowEmitter class inherits from Proton.Emitter\n *\n * use the FollowEmitter will emit particle when mousemoving\n *\n * @class Proton.FollowEmitter\n * @constructor\n * @param {Element} mouseTarget mouseevent's target;\n * @param {Number} ease the easing of following speed;\n * @default 0.7\n * @param {Object} conf the parameters object;\n */\n constructor(mouseTarget, ease, conf) {\n super(conf);\n\n this.mouseTarget = Util.initValue(mouseTarget, window);\n this.ease = Util.initValue(ease, 0.7);\n\n this._allowEmitting = false;\n this.initEventHandler();\n }\n\n initEventHandler() {\n this.mousemoveHandler = e => this.mousemove.call(this, e);\n this.mousedownHandler = e => this.mousedown.call(this, e);\n this.mouseupHandler = e => this.mouseup.call(this, e);\n\n this.mouseTarget.addEventListener(\n \"mousemove\",\n this.mousemoveHandler,\n false\n );\n }\n\n /**\n * start emit particle\n * @method emit\n */\n emit() {\n this._allowEmitting = true;\n }\n\n /**\n * stop emiting\n * @method stop\n */\n stop() {\n this._allowEmitting = false;\n }\n\n mousemove(e) {\n if (e.layerX || e.layerX === 0) {\n this.p.x += (e.layerX - this.p.x) * this.ease;\n this.p.y += (e.layerY - this.p.y) * this.ease;\n } else if (e.offsetX || e.offsetX === 0) {\n this.p.x += (e.offsetX - this.p.x) * this.ease;\n this.p.y += (e.offsetY - this.p.y) * this.ease;\n }\n\n if (this._allowEmitting) super.emit(\"once\");\n }\n\n /**\n * Destory this Emitter\n * @method destroy\n */\n destroy() {\n super.destroy();\n this.mouseTarget.removeEventListener(\n \"mousemove\",\n this.mousemoveHandler,\n false\n );\n }\n}\n","import Pool from \"../core/Pool\";\n\nexport default class BaseRenderer {\n constructor(element, stroke) {\n this.pool = new Pool();\n this.element = element;\n this.stroke = stroke;\n this.circleConf = { isCircle: true };\n\n this.initHandler();\n this.name = \"BaseRenderer\";\n }\n\n setStroke(color = \"#000000\", thinkness = 1) {\n this.stroke = { color, thinkness };\n }\n\n initHandler() {\n this._protonUpdateHandler = () => {\n this.onProtonUpdate.call(this);\n };\n\n this._protonUpdateAfterHandler = () => {\n this.onProtonUpdateAfter.call(this);\n };\n\n this._emitterAddedHandler = emitter => {\n this.onEmitterAdded.call(this, emitter);\n };\n\n this._emitterRemovedHandler = emitter => {\n this.onEmitterRemoved.call(this, emitter);\n };\n\n this._particleCreatedHandler = particle => {\n this.onParticleCreated.call(this, particle);\n };\n\n this._particleUpdateHandler = particle => {\n this.onParticleUpdate.call(this, particle);\n };\n\n this._particleDeadHandler = particle => {\n this.onParticleDead.call(this, particle);\n };\n }\n\n init(proton) {\n this.parent = proton;\n\n proton.addEventListener(\"PROTON_UPDATE\", this._protonUpdateHandler);\n proton.addEventListener(\n \"PROTON_UPDATE_AFTER\",\n this._protonUpdateAfterHandler\n );\n\n proton.addEventListener(\"EMITTER_ADDED\", this._emitterAddedHandler);\n proton.addEventListener(\"EMITTER_REMOVED\", this._emitterRemovedHandler);\n\n proton.addEventListener(\n \"PARTICLE_CREATED\",\n this._particleCreatedHandler\n );\n proton.addEventListener(\"PARTICLE_UPDATE\", this._particleUpdateHandler);\n proton.addEventListener(\"PARTICLE_DEAD\", this._particleDeadHandler);\n }\n\n resize(width, height) {}\n\n destroy() {\n this.remove();\n }\n\n remove(proton) {\n this.parent.removeEventListener(\n \"PROTON_UPDATE\",\n this._protonUpdateHandler\n );\n this.parent.removeEventListener(\n \"PROTON_UPDATE_AFTER\",\n this._protonUpdateAfterHandler\n );\n\n this.parent.removeEventListener(\n \"EMITTER_ADDED\",\n this._emitterAddedHandler\n );\n this.parent.removeEventListener(\n \"EMITTER_REMOVED\",\n this._emitterRemovedHandler\n );\n\n this.parent.removeEventListener(\n \"PARTICLE_CREATED\",\n this._particleCreatedHandler\n );\n this.parent.removeEventListener(\n \"PARTICLE_UPDATE\",\n this._particleUpdateHandler\n );\n this.parent.removeEventListener(\n \"PARTICLE_DEAD\",\n this._particleDeadHandler\n );\n\n this.parent = null;\n }\n\n onProtonUpdate() {}\n onProtonUpdateAfter() {}\n\n onEmitterAdded(emitter) {}\n onEmitterRemoved(emitter) {}\n\n onParticleCreated(particle) {}\n onParticleUpdate(particle) {}\n onParticleDead(particle) {}\n}\n","import ImgUtil from \"../utils/ImgUtil\";\nimport ColorUtil from \"../utils/ColorUtil\";\nimport MathUtil from \"../math/MathUtil\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nexport default class CanvasRenderer extends BaseRenderer {\n constructor(element) {\n super(element);\n\n this.stroke = null;\n this.context = this.element.getContext(\"2d\");\n this.bufferCache = {};\n this.name = \"CanvasRenderer\";\n }\n\n resize(width, height) {\n this.element.width = width;\n this.element.height = height;\n }\n\n onProtonUpdate() {\n this.context.clearRect(0, 0, this.element.width, this.element.height);\n }\n\n onParticleCreated(particle) {\n if (particle.body) {\n ImgUtil.getImgFromCache(particle.body, this.addImg2Body, particle);\n } else {\n particle.color = particle.color || \"#ff0000\";\n }\n }\n\n onParticleUpdate(particle) {\n if (particle.body) {\n if (particle.body instanceof Image) this.drawImage(particle);\n } else {\n this.drawCircle(particle);\n }\n }\n\n onParticleDead(particle) {\n particle.body = null;\n }\n\n // private\n addImg2Body(img, particle) {\n particle.body = img;\n }\n\n // private drawCircle\n drawImage(particle) {\n const w = (particle.body.width * particle.scale) | 0;\n const h = (particle.body.height * particle.scale) | 0;\n const x = particle.p.x - w / 2;\n const y = particle.p.y - h / 2;\n\n if (!!particle.color) {\n if (!particle.data[\"buffer\"])\n particle.data.buffer = this.createBuffer(particle.body);\n\n const bufContext = particle.data.buffer.getContext(\"2d\");\n bufContext.clearRect(\n 0,\n 0,\n particle.data.buffer.width,\n particle.data.buffer.height\n );\n bufContext.globalAlpha = particle.alpha;\n bufContext.drawImage(particle.body, 0, 0);\n\n bufContext.globalCompositeOperation = \"source-atop\";\n bufContext.fillStyle = ColorUtil.rgbToHex(particle.rgb);\n bufContext.fillRect(\n 0,\n 0,\n particle.data.buffer.width,\n particle.data.buffer.height\n );\n bufContext.globalCompositeOperation = \"source-over\";\n bufContext.globalAlpha = 1;\n\n this.context.drawImage(\n particle.data.buffer,\n 0,\n 0,\n particle.data.buffer.width,\n particle.data.buffer.height,\n x,\n y,\n w,\n h\n );\n } else {\n this.context.save();\n\n this.context.globalAlpha = particle.alpha;\n this.context.translate(particle.p.x, particle.p.y);\n this.context.rotate(MathUtil.degreeTransform(particle.rotation));\n this.context.translate(-particle.p.x, -particle.p.y);\n this.context.drawImage(\n particle.body,\n 0,\n 0,\n particle.body.width,\n particle.body.height,\n x,\n y,\n w,\n h\n );\n\n this.context.globalAlpha = 1;\n this.context.restore();\n }\n }\n\n // private drawCircle --\n drawCircle(particle) {\n if (particle.rgb) {\n this.context.fillStyle = `rgba(${particle.rgb.r},${particle.rgb.g},${particle.rgb.b},${particle.alpha})`;\n } else {\n this.context.fillStyle = particle.color;\n }\n\n // draw circle\n this.context.beginPath();\n this.context.arc(\n particle.p.x,\n particle.p.y,\n particle.radius,\n 0,\n Math.PI * 2,\n true\n );\n\n if (this.stroke) {\n this.context.strokeStyle = this.stroke.color;\n this.context.lineWidth = this.stroke.thinkness;\n this.context.stroke();\n }\n\n this.context.closePath();\n this.context.fill();\n }\n\n // private createBuffer\n createBuffer(image) {\n if (image instanceof Image) {\n const size = image.width + \"_\" + image.height;\n let canvas = this.bufferCache[size];\n\n if (!canvas) {\n canvas = document.createElement(\"canvas\");\n canvas.width = image.width;\n canvas.height = image.height;\n this.bufferCache[size] = canvas;\n }\n\n return canvas;\n }\n }\n}\n","import DomUtil from \"../utils/DomUtil\";\nimport ImgUtil from \"../utils/ImgUtil\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nexport default class DomRenderer extends BaseRenderer {\n constructor(element) {\n super(element);\n\n this.stroke = null;\n this.pool.create = (body, particle) => this.createBody(body, particle);\n this.addImg2Body = this.addImg2Body.bind(this);\n\n this.transform3d = false;\n this.name = \"DomRenderer\";\n }\n\n onParticleCreated(particle) {\n if (particle.body) {\n ImgUtil.getImgFromCache(particle.body, this.addImg2Body, particle);\n } else {\n particle.body = this.pool.get(this.circleConf, particle);\n this.element.appendChild(particle.body);\n }\n }\n\n onParticleUpdate(particle) {\n if (this.bodyReady(particle)) {\n if (this.transform3d)\n DomUtil.transform3d(\n particle.body,\n particle.p.x,\n particle.p.y,\n particle.scale,\n particle.rotation\n );\n else\n DomUtil.transform(\n particle.body,\n particle.p.x,\n particle.p.y,\n particle.scale,\n particle.rotation\n );\n\n particle.body.style.opacity = particle.alpha;\n if (particle.body.isCircle) {\n particle.body.style.backgroundColor = particle.color || \"#ff0000\";\n }\n }\n }\n\n onParticleDead(particle) {\n if (this.bodyReady(particle)) {\n this.element.removeChild(particle.body);\n this.pool.expire(particle.body);\n particle.body = null;\n }\n }\n\n bodyReady(particle) {\n return (\n typeof particle.body === \"object\" &&\n particle.body &&\n !particle.body.isInner\n );\n }\n\n // private\n addImg2Body(img, particle) {\n if (particle.dead) return;\n particle.body = this.pool.get(img, particle);\n DomUtil.resize(particle.body, img.width, img.height);\n\n this.element.appendChild(particle.body);\n }\n\n createBody(body, particle) {\n if (body.isCircle) return this.createCircle(particle);\n else return this.createSprite(body, particle);\n }\n\n // private --\n createCircle(particle) {\n const dom = DomUtil.createDiv(\n `${particle.id}_dom`,\n 2 * particle.radius,\n 2 * particle.radius\n );\n dom.style.borderRadius = `${particle.radius}px`;\n\n if (this.stroke) {\n dom.style.borderColor = this.stroke.color;\n dom.style.borderWidth = `${this.stroke.thinkness}px`;\n }\n dom.isCircle = true;\n\n return dom;\n }\n\n createSprite(body, particle) {\n const url = typeof body === \"string\" ? body : body.src;\n const dom = DomUtil.createDiv(\n `${particle.id}_dom`,\n body.width,\n body.height\n );\n dom.style.backgroundImage = `url(${url})`;\n\n return dom;\n }\n}\n","import BaseRenderer from \"./BaseRenderer\";\n\nexport default class EaselRenderer extends BaseRenderer {\n constructor(element, stroke) {\n super(element);\n\n this.stroke = stroke;\n this.name = \"EaselRenderer\";\n }\n\n onParticleCreated(particle) {\n if (particle.body) {\n this.createSprite(particle);\n } else {\n this.createCircle(particle);\n }\n\n this.element.addChild(particle.body);\n }\n\n onParticleUpdate(particle) {\n if (particle.body) {\n particle.body.x = particle.p.x;\n particle.body.y = particle.p.y;\n\n particle.body.alpha = particle.alpha;\n particle.body.scaleX = particle.body.scaleY = particle.scale;\n particle.body.rotation = particle.rotation;\n }\n }\n\n onParticleDead(particle) {\n if (particle.body) {\n particle.body.parent && particle.body.parent.removeChild(particle.body);\n this.pool.expire(particle.body);\n particle.body = null;\n }\n\n if (particle.graphics) this.pool.expire(particle.graphics);\n }\n\n // private\n createSprite(particle) {\n particle.body = this.pool.get(particle.body);\n\n if (particle.body.parent) return;\n if (particle.body[\"image\"]) {\n particle.body.regX = particle.body.image.width / 2;\n particle.body.regY = particle.body.image.height / 2;\n }\n }\n\n createCircle(particle) {\n const graphics = this.pool.get(createjs.Graphics);\n\n if (this.stroke) {\n if (this.stroke instanceof String) graphics.beginStroke(this.stroke);\n else graphics.beginStroke(\"#000000\");\n }\n graphics\n .beginFill(particle.color || \"#ff0000\")\n .drawCircle(0, 0, particle.radius);\n\n const shape = this.pool.get(createjs.Shape, [graphics]);\n\n particle.body = shape;\n particle.graphics = graphics;\n }\n}\n","import Rectangle from \"../math/Rectangle\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nexport default class PixelRenderer extends BaseRenderer {\n constructor(element, rectangle) {\n super(element);\n\n this.context = this.element.getContext(\"2d\");\n this.imageData = null;\n this.rectangle = null;\n this.rectangle = rectangle;\n this.createImageData(rectangle);\n\n this.name = \"PixelRenderer\";\n }\n\n resize(width, height) {\n this.element.width = width;\n this.element.height = height;\n }\n\n createImageData(rectangle) {\n this.rectangle = rectangle\n ? rectangle\n : new Rectangle(0, 0, this.element.width, this.element.height);\n this.imageData = this.context.createImageData(\n this.rectangle.width,\n this.rectangle.height\n );\n this.context.putImageData(\n this.imageData,\n this.rectangle.x,\n this.rectangle.y\n );\n }\n\n onProtonUpdate() {\n this.context.clearRect(\n this.rectangle.x,\n this.rectangle.y,\n this.rectangle.width,\n this.rectangle.height\n );\n this.imageData = this.context.getImageData(\n this.rectangle.x,\n this.rectangle.y,\n this.rectangle.width,\n this.rectangle.height\n );\n }\n\n onProtonUpdateAfter() {\n this.context.putImageData(\n this.imageData,\n this.rectangle.x,\n this.rectangle.y\n );\n }\n\n onParticleCreated(particle) {}\n\n onParticleUpdate(particle) {\n if (this.imageData) {\n this.setPixel(\n this.imageData,\n Math.floor(particle.p.x - this.rectangle.x),\n Math.floor(particle.p.y - this.rectangle.y),\n particle\n );\n }\n }\n\n setPixel(imagedata, x, y, particle) {\n const rgb = particle.rgb;\n if (x < 0 || x > this.element.width || y < 0 || y > this.elementwidth)\n return;\n\n const i = ((y >> 0) * imagedata.width + (x >> 0)) * 4;\n\n imagedata.data[i] = rgb.r;\n imagedata.data[i + 1] = rgb.g;\n imagedata.data[i + 2] = rgb.b;\n imagedata.data[i + 3] = particle.alpha * 255;\n }\n\n onParticleDead(particle) {}\n}\n","import ColorUtil from \"../utils/ColorUtil\";\nimport MathUtil from \"../math/MathUtil\";\nimport BaseRenderer from \"./BaseRenderer\";\n\nlet PIXIClass;\nexport default class PixiRenderer extends BaseRenderer {\n constructor(element, stroke) {\n super(element);\n\n this.stroke = stroke;\n this.color = false;\n this.setColor = false;\n this.blendMode = null;\n this.pool.create = (body, particle) => this.createBody(body, particle);\n this.setPIXI(window.PIXI);\n\n this.name = \"PixiRenderer\";\n }\n\n setPIXI(PIXI) {\n try {\n PIXIClass = PIXI || { Sprite: {} };\n this.createFromImage =\n PIXIClass.Sprite.from || PIXIClass.Sprite.fromImage;\n } catch (e) {}\n }\n\n onProtonUpdate() {}\n\n /**\n * @param particle\n */\n onParticleCreated(particle) {\n if (particle.body) {\n particle.body = this.pool.get(particle.body, particle);\n } else {\n particle.body = this.pool.get(this.circleConf, particle);\n }\n\n if (this.blendMode) {\n particle.body.blendMode = this.blendMode;\n }\n\n this.element.addChild(particle.body);\n }\n\n /**\n * @param particle\n */\n onParticleUpdate(particle) {\n this.transform(particle, particle.body);\n\n if (this.setColor === true || this.color === true) {\n particle.body.tint = ColorUtil.getHex16FromParticle(particle);\n }\n }\n\n /**\n * @param particle\n */\n onParticleDead(particle) {\n this.element.removeChild(particle.body);\n this.pool.expire(particle.body);\n particle.body = null;\n }\n\n destroy(particles) {\n super.destroy();\n this.pool.destroy();\n\n let i = particles.length;\n while (i--) {\n let particle = particles[i];\n if (particle.body) {\n this.element.removeChild(particle.body);\n }\n }\n }\n\n transform(particle, target) {\n target.x = particle.p.x;\n target.y = particle.p.y;\n\n target.alpha = particle.alpha;\n\n target.scale.x = particle.scale;\n target.scale.y = particle.scale;\n\n // using cached version of MathUtil.PI_180 for slight performance increase.\n target.rotation = particle.rotation * MathUtil.PI_180; // MathUtil.PI_180;\n }\n\n createBody(body, particle) {\n if (body.isCircle) return this.createCircle(particle);\n else return this.createSprite(body);\n }\n\n createSprite(body) {\n const sprite = body.isInner\n ? this.createFromImage(body.src)\n : new PIXIClass.Sprite(body);\n\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n\n return sprite;\n }\n\n createCircle(particle) {\n const graphics = new PIXIClass.Graphics();\n\n if (this.stroke) {\n const stroke = this.stroke instanceof String ? this.stroke : 0x000000;\n graphics.beginStroke(stroke);\n }\n\n graphics.beginFill(particle.color || 0x008ced);\n graphics.drawCircle(0, 0, particle.radius);\n graphics.endFill();\n\n return graphics;\n }\n}\n","import Mat3 from \"../math/Mat3\";\n\nexport default class MStack {\n constructor() {\n this.mats = [];\n this.size = 0;\n\n for (let i = 0; i < 20; i++)\n this.mats.push(Mat3.create([0, 0, 0, 0, 0, 0, 0, 0, 0]));\n }\n\n set(m, i) {\n if (i === 0) Mat3.set(m, this.mats[0]);\n else Mat3.multiply(this.mats[i - 1], m, this.mats[i]);\n\n this.size = Math.max(this.size, i + 1);\n }\n\n push(m) {\n if (this.size === 0) Mat3.set(m, this.mats[0]);\n else Mat3.multiply(this.mats[this.size - 1], m, this.mats[this.size]);\n\n this.size++;\n }\n\n pop() {\n if (this.size > 0) this.size--;\n }\n\n top() {\n return this.mats[this.size - 1];\n }\n}\n","import Mat3 from '../math/Mat3';\nimport BaseRenderer from './BaseRenderer';\n\nimport Util from '../utils/Util';\nimport ImgUtil from '../utils/ImgUtil';\nimport MStack from '../utils/MStack';\nimport DomUtil from '../utils/DomUtil';\nimport WebGLUtil from '../utils/WebGLUtil';\nimport MathUtil from '../math/MathUtil';\n\nexport default class WebGLRenderer extends BaseRenderer {\n\n constructor(element) {\n super(element);\n\n this.gl = this.element.getContext('experimental-webgl', { antialias: true, stencil: false, depth: false });\n if (!this.gl) alert('Sorry your browser do not suppest WebGL!');\n\n this.initVar();\n this.setMaxRadius();\n this.initShaders();\n this.initBuffers();\n\n this.gl.blendEquation(this.gl.FUNC_ADD);\n this.gl.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA);\n this.gl.enable(this.gl.BLEND);\n\n this.addImg2Body = this.addImg2Body.bind(this);\n\n this.name = 'WebGLRenderer';\n }\n\n init(proton) {\n super.init(proton);\n this.resize(this.element.width, this.element.height);\n }\n\n resize(width, height) {\n this.umat[4] = -2;\n this.umat[7] = 1;\n\n this.smat[0] = 1 / width;\n this.smat[4] = 1 / height;\n\n this.mstack.set(this.umat, 0);\n this.mstack.set(this.smat, 1);\n\n this.gl.viewport(0, 0, width, height);\n this.element.width = width;\n this.element.height = height;\n }\n\n setMaxRadius(radius) {\n this.circleCanvasURL = this.createCircle(radius);\n }\n\n getVertexShader() {\n const vsSource = ['uniform vec2 viewport;', 'attribute vec2 aVertexPosition;', 'attribute vec2 aTextureCoord;', 'uniform mat3 tMat;', 'varying vec2 vTextureCoord;', 'varying float alpha;', 'void main() {', 'vec3 v = tMat * vec3(aVertexPosition, 1.0);', 'gl_Position = vec4(v.x, v.y, 0, 1);', 'vTextureCoord = aTextureCoord;', 'alpha = tMat[0][2];', '}'].join('\\n');\n return vsSource;\n }\n\n getFragmentShader() {\n const fsSource = ['precision mediump float;', 'varying vec2 vTextureCoord;', 'varying float alpha;', 'uniform sampler2D uSampler;', 'uniform vec4 color;', 'uniform bool useTexture;', 'uniform vec3 uColor;', 'void main() {', 'vec4 textureColor = texture2D(uSampler, vTextureCoord);', 'gl_FragColor = textureColor * vec4(uColor, 1.0);', 'gl_FragColor.w *= alpha;', '}'].join('\\n');\n return fsSource;\n }\n\n initVar() {\n this.mstack = new MStack();\n this.umat = Mat3.create([2, 0, 1, 0, -2, 0, -1, 1, 1]);\n this.smat = Mat3.create([1 / 100, 0, 1, 0, 1 / 100, 0, 0, 0, 1]);\n this.texturebuffers = {};\n }\n\n blendEquation(A) {\n this.gl.blendEquation(this.gl[A]);\n }\n\n blendFunc(A, B) {\n this.gl.blendFunc(this.gl[A], this.gl[B]);\n }\n\n getShader(gl, str, fs) {\n const shader = fs ? gl.createShader(gl.FRAGMENT_SHADER) : gl.createShader(gl.VERTEX_SHADER);\n\n gl.shaderSource(shader, str);\n gl.compileShader(shader);\n\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n alert(gl.getShaderInfoLog(shader));\n return null;\n }\n\n return shader;\n }\n\n initShaders() {\n const fragmentShader = this.getShader(this.gl, this.getFragmentShader(), true);\n const vertexShader = this.getShader(this.gl, this.getVertexShader(), false);\n\n this.sprogram = this.gl.createProgram();\n this.gl.attachShader(this.sprogram, vertexShader);\n this.gl.attachShader(this.sprogram, fragmentShader);\n this.gl.linkProgram(this.sprogram);\n\n if (!this.gl.getProgramParameter(this.sprogram, this.gl.LINK_STATUS))\n alert('Could not initialise shaders');\n\n this.gl.useProgram(this.sprogram);\n this.sprogram.vpa = this.gl.getAttribLocation(this.sprogram, 'aVertexPosition');\n this.sprogram.tca = this.gl.getAttribLocation(this.sprogram, 'aTextureCoord');\n this.gl.enableVertexAttribArray(this.sprogram.tca);\n this.gl.enableVertexAttribArray(this.sprogram.vpa);\n\n this.sprogram.tMatUniform = this.gl.getUniformLocation(this.sprogram, 'tMat');\n this.sprogram.samplerUniform = this.gl.getUniformLocation(this.sprogram, 'uSampler');\n this.sprogram.useTex = this.gl.getUniformLocation(this.sprogram, 'useTexture');\n this.sprogram.color = this.gl.getUniformLocation(this.sprogram, 'uColor');\n this.gl.uniform1i(this.sprogram.useTex, 1);\n };\n\n initBuffers() {\n const vs = [0, 3, 1, 0, 2, 3];\n let idx;\n\n this.unitIBuffer = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.unitIBuffer);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vs), this.gl.STATIC_DRAW);\n\n let i;\n let ids = [];\n for (i = 0; i < 100; i++) ids.push(i);\n idx = new Uint16Array(ids);\n\n this.unitI33 = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.unitI33);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, idx, this.gl.STATIC_DRAW);\n\n ids = [];\n for (i = 0; i < 100; i++) ids.push(i, i + 1, i + 2);\n idx = new Uint16Array(ids);\n\n this.stripBuffer = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.stripBuffer);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, idx, this.gl.STATIC_DRAW);\n };\n\n createCircle(raidus) {\n this.circleCanvasRadius = WebGLUtil.nhpot(Util.initValue(raidus, 32));\n const canvas = DomUtil.createCanvas('circle_canvas', this.circleCanvasRadius * 2, this.circleCanvasRadius * 2);\n const context = canvas.getContext('2d');\n\n context.beginPath();\n context.arc(this.circleCanvasRadius, this.circleCanvasRadius, this.circleCanvasRadius, 0, Math.PI * 2, true);\n context.closePath();\n context.fillStyle = '#FFF';\n context.fill();\n\n return canvas.toDataURL();\n };\n\n drawImg2Canvas(particle) {\n const _w = particle.body.width;\n const _h = particle.body.height;\n\n const _width = WebGLUtil.nhpot(particle.body.width);\n const _height = WebGLUtil.nhpot(particle.body.height);\n\n const _scaleX = particle.body.width / _width;\n const _scaleY = particle.body.height / _height;\n\n if (!this.texturebuffers[particle.data.src])\n this.texturebuffers[particle.data.src] = [this.gl.createTexture(), this.gl.createBuffer(), this.gl.createBuffer()];\n\n particle.data.texture = this.texturebuffers[particle.data.src][0];\n particle.data.vcBuffer = this.texturebuffers[particle.data.src][1];\n particle.data.tcBuffer = this.texturebuffers[particle.data.src][2];\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.tcBuffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, _scaleX, 0.0, 0.0, _scaleY, _scaleY, _scaleY]), this.gl.STATIC_DRAW);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.vcBuffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, _w, 0.0, 0.0, _h, _w, _h]), this.gl.STATIC_DRAW);\n\n const context = particle.data.canvas.getContext('2d');\n const data = context.getImageData(0, 0, _width, _height);\n\n this.gl.bindTexture(this.gl.TEXTURE_2D, particle.data.texture);\n this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.gl.RGBA, this.gl.UNSIGNED_BYTE, data);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR_MIPMAP_NEAREST);\n this.gl.generateMipmap(this.gl.TEXTURE_2D);\n\n particle.data.textureLoaded = true;\n particle.data.textureWidth = _w;\n particle.data.textureHeight = _h;\n }\n\n onProtonUpdate() {\n // this.gl.clearColor(0, 0, 0, 1);\n // this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);\n }\n\n onParticleCreated(particle) {\n particle.data.textureLoaded = false;\n particle.data.tmat = Mat3.create();\n particle.data.tmat[8] = 1;\n particle.data.imat = Mat3.create();\n particle.data.imat[8] = 1;\n\n if (particle.body) {\n ImgUtil.getImgFromCache(particle.body, this.addImg2Body, particle);\n } else {\n ImgUtil.getImgFromCache(this.circleCanvasURL, this.addImg2Body, particle);\n particle.data.oldScale = particle.radius / this.circleCanvasRadius;\n }\n }\n\n // private\n addImg2Body(img, particle) {\n if (particle.dead) return;\n particle.body = img;\n particle.data.src = img.src;\n particle.data.canvas = ImgUtil.getCanvasFromCache(img);\n particle.data.oldScale = 1;\n\n this.drawImg2Canvas(particle);\n }\n\n onParticleUpdate(particle) {\n if (particle.data.textureLoaded) {\n this.updateMatrix(particle);\n\n this.gl.uniform3f(this.sprogram.color, particle.rgb.r / 255, particle.rgb.g / 255, particle.rgb.b / 255);\n this.gl.uniformMatrix3fv(this.sprogram.tMatUniform, false, this.mstack.top());\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.vcBuffer);\n this.gl.vertexAttribPointer(this.sprogram.vpa, 2, this.gl.FLOAT, false, 0, 0);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, particle.data.tcBuffer);\n this.gl.vertexAttribPointer(this.sprogram.tca, 2, this.gl.FLOAT, false, 0, 0);\n this.gl.bindTexture(this.gl.TEXTURE_2D, particle.data.texture);\n this.gl.uniform1i(this.sprogram.samplerUniform, 0);\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.unitIBuffer);\n\n this.gl.drawElements(this.gl.TRIANGLES, 6, this.gl.UNSIGNED_SHORT, 0);\n\n this.mstack.pop();\n }\n }\n\n onParticleDead(particle) { }\n\n updateMatrix(particle) {\n const moveOriginMatrix = WebGLUtil.makeTranslation(-particle.data.textureWidth / 2, -particle.data.textureHeight / 2);\n const translationMatrix = WebGLUtil.makeTranslation(particle.p.x, particle.p.y);\n\n const angel = particle.rotation * (MathUtil.PI_180);\n const rotationMatrix = WebGLUtil.makeRotation(angel);\n\n const scale = particle.scale * particle.data.oldScale;\n const scaleMatrix = WebGLUtil.makeScale(scale, scale);\n let matrix = WebGLUtil.matrixMultiply(moveOriginMatrix, scaleMatrix);\n\n matrix = WebGLUtil.matrixMultiply(matrix, rotationMatrix);\n matrix = WebGLUtil.matrixMultiply(matrix, translationMatrix);\n\n Mat3.inverse(matrix, particle.data.imat);\n matrix[2] = particle.alpha;\n\n this.mstack.push(matrix);\n }\n}","import BaseRenderer from \"./BaseRenderer\";\n\nexport default class CustomRenderer extends BaseRenderer {\n constructor(element) {\n super(element);\n\n this.name = \"CustomRenderer\";\n }\n}\n","import Zone from \"./Zone\";\nimport Util from \"../utils/Util\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class LineZone extends Zone {\n constructor(x1, y1, x2, y2, direction) {\n super();\n\n if (x2 - x1 >= 0) {\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n } else {\n this.x1 = x2;\n this.y1 = y2;\n this.x2 = x1;\n this.y2 = y1;\n }\n\n this.dx = this.x2 - this.x1;\n this.dy = this.y2 - this.y1;\n\n this.minx = Math.min(this.x1, this.x2);\n this.miny = Math.min(this.y1, this.y2);\n this.maxx = Math.max(this.x1, this.x2);\n this.maxy = Math.max(this.y1, this.y2);\n\n this.dot = this.x2 * this.y1 - this.x1 * this.y2;\n this.xxyy = this.dx * this.dx + this.dy * this.dy;\n\n this.gradient = this.getGradient();\n this.length = this.getLength();\n this.direction = Util.initValue(direction, \">\");\n }\n\n getPosition() {\n this.random = Math.random();\n\n this.vector.x =\n this.x1 + this.random * this.length * Math.cos(this.gradient);\n this.vector.y =\n this.y1 + this.random * this.length * Math.sin(this.gradient);\n\n return this.vector;\n }\n\n getDirection(x, y) {\n const A = this.dy;\n const B = -this.dx;\n const C = this.dot;\n const D = B === 0 ? 1 : B;\n\n if ((A * x + B * y + C) * D > 0) return true;\n else return false;\n }\n\n getDistance(x, y) {\n const A = this.dy;\n const B = -this.dx;\n const C = this.dot;\n const D = A * x + B * y + C;\n\n return D / Math.sqrt(this.xxyy);\n }\n\n getSymmetric(v) {\n const tha2 = v.getGradient();\n const tha1 = this.getGradient();\n const tha = 2 * (tha1 - tha2);\n\n const oldx = v.x;\n const oldy = v.y;\n\n v.x = oldx * Math.cos(tha) - oldy * Math.sin(tha);\n v.y = oldx * Math.sin(tha) + oldy * Math.cos(tha);\n\n return v;\n }\n\n getGradient() {\n return Math.atan2(this.dy, this.dx);\n }\n\n rangeOut(particle) {\n const angle = Math.abs(this.getGradient());\n\n if (angle <= MathUtil.PI / 4) {\n if (particle.p.x <= this.maxx && particle.p.x >= this.minx) return true;\n } else {\n if (particle.p.y <= this.maxy && particle.p.y >= this.miny) return true;\n }\n\n return false;\n }\n\n getLength() {\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\n }\n\n crossing(particle) {\n if (this.crossType === \"dead\") {\n if (\n this.direction === \">\" ||\n this.direction === \"R\" ||\n this.direction === \"right\" ||\n this.direction === \"down\"\n ) {\n if (!this.rangeOut(particle)) return;\n if (this.getDirection(particle.p.x, particle.p.y)) particle.dead = true;\n } else {\n if (!this.rangeOut(particle)) return;\n if (!this.getDirection(particle.p.x, particle.p.y))\n particle.dead = true;\n }\n } else if (this.crossType === \"bound\") {\n if (!this.rangeOut(particle)) return;\n\n if (this.getDistance(particle.p.x, particle.p.y) <= particle.radius) {\n if (this.dx === 0) {\n particle.v.x *= -1;\n } else if (this.dy === 0) {\n particle.v.y *= -1;\n } else {\n this.getSymmetric(particle.v);\n }\n }\n } else if (this.crossType === \"cross\") {\n if (this.alert) {\n console.error(\"Sorry, LineZone does not support cross method!\");\n this.alert = false;\n }\n }\n }\n}\n","import Zone from \"./Zone\";\nimport MathUtil from \"../math/MathUtil\";\n\nexport default class CircleZone extends Zone {\n constructor(x, y, radius) {\n super();\n\n this.x = x;\n this.y = y;\n this.radius = radius;\n\n this.angle = 0;\n this.center = { x, y };\n }\n\n getPosition() {\n this.angle = MathUtil.PIx2 * Math.random();\n this.randomRadius = Math.random() * this.radius;\n\n this.vector.x = this.x + this.randomRadius * Math.cos(this.angle);\n this.vector.y = this.y + this.randomRadius * Math.sin(this.angle);\n\n return this.vector;\n }\n\n setCenter(x, y) {\n this.center.x = x;\n this.center.y = y;\n }\n\n crossing(particle) {\n const d = particle.p.distanceTo(this.center);\n\n if (this.crossType === \"dead\") {\n if (d - particle.radius > this.radius) particle.dead = true;\n } else if (this.crossType === \"bound\") {\n if (d + particle.radius >= this.radius) this.getSymmetric(particle);\n } else if (this.crossType === \"cross\") {\n if (this.alert) {\n console.error(\"Sorry, CircleZone does not support cross method!\");\n this.alert = false;\n }\n }\n }\n\n getSymmetric(particle) {\n let tha2 = particle.v.getGradient();\n let tha1 = this.getGradient(particle);\n\n let tha = 2 * (tha1 - tha2);\n let oldx = particle.v.x;\n let oldy = particle.v.y;\n\n particle.v.x = oldx * Math.cos(tha) - oldy * Math.sin(tha);\n particle.v.y = oldx * Math.sin(tha) + oldy * Math.cos(tha);\n }\n\n getGradient(particle) {\n return (\n -MathUtil.PI_2 +\n Math.atan2(particle.p.y - this.center.y, particle.p.x - this.center.x)\n );\n }\n}\n","import Zone from \"./Zone\";\n\nexport default class RectZone extends Zone {\n constructor(x, y, width, height) {\n super();\n\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n\n getPosition() {\n this.vector.x = this.x + Math.random() * this.width;\n this.vector.y = this.y + Math.random() * this.height;\n\n return this.vector;\n }\n\n crossing(particle) {\n // particle dead zone\n if (this.crossType === \"dead\") {\n if (particle.p.x + particle.radius < this.x) particle.dead = true;\n else if (particle.p.x - particle.radius > this.x + this.width)\n particle.dead = true;\n\n if (particle.p.y + particle.radius < this.y) particle.dead = true;\n else if (particle.p.y - particle.radius > this.y + this.height)\n particle.dead = true;\n }\n\n // particle bound zone\n else if (this.crossType === \"bound\") {\n if (particle.p.x - particle.radius < this.x) {\n particle.p.x = this.x + particle.radius;\n particle.v.x *= -1;\n } else if (particle.p.x + particle.radius > this.x + this.width) {\n particle.p.x = this.x + this.width - particle.radius;\n particle.v.x *= -1;\n }\n\n if (particle.p.y - particle.radius < this.y) {\n particle.p.y = this.y + particle.radius;\n particle.v.y *= -1;\n } else if (particle.p.y + particle.radius > this.y + this.height) {\n particle.p.y = this.y + this.height - particle.radius;\n particle.v.y *= -1;\n }\n }\n\n // particle cross zone\n else if (this.crossType === \"cross\") {\n if (particle.p.x + particle.radius < this.x && particle.v.x <= 0)\n particle.p.x = this.x + this.width + particle.radius;\n else if (\n particle.p.x - particle.radius > this.x + this.width &&\n particle.v.x >= 0\n )\n particle.p.x = this.x - particle.radius;\n\n if (particle.p.y + particle.radius < this.y && particle.v.y <= 0)\n particle.p.y = this.y + this.height + particle.radius;\n else if (\n particle.p.y - particle.radius > this.y + this.height &&\n particle.v.y >= 0\n )\n particle.p.y = this.y - particle.radius;\n }\n }\n}\n","import Zone from \"./Zone\";\nimport Util from \"../utils/Util\";\n\nexport default class ImageZone extends Zone {\n constructor(imageData, x, y, d) {\n super();\n\n this.reset(imageData, x, y, d);\n }\n\n reset(imageData, x, y, d) {\n this.imageData = imageData;\n this.x = Util.initValue(x, 0);\n this.y = Util.initValue(y, 0);\n this.d = Util.initValue(d, 2);\n\n this.vectors = [];\n this.setVectors();\n }\n\n setVectors() {\n let i, j;\n const length1 = this.imageData.width;\n const length2 = this.imageData.height;\n\n for (i = 0; i < length1; i += this.d) {\n for (j = 0; j < length2; j += this.d) {\n let index = ((j >> 0) * length1 + (i >> 0)) * 4;\n\n if (this.imageData.data[index + 3] > 0) {\n this.vectors.push({ x: i + this.x, y: j + this.y });\n }\n }\n }\n\n return this.vector;\n }\n\n getBound(x, y) {\n var index = ((y >> 0) * this.imageData.width + (x >> 0)) * 4;\n if (this.imageData.data[index + 3] > 0) return true;\n else return false;\n }\n\n getPosition() {\n const vector = Util.getRandFromArray(this.vectors);\n return this.vector.copy(vector);\n }\n\n getColor(x, y) {\n x -= this.x;\n y -= this.y;\n var i = ((y >> 0) * this.imageData.width + (x >> 0)) * 4;\n\n return {\n r: this.imageData.data[i],\n g: this.imageData.data[i + 1],\n b: this.imageData.data[i + 2],\n a: this.imageData.data[i + 3]\n };\n }\n\n crossing(particle) {\n if (this.crossType === \"dead\") {\n if (this.getBound(particle.p.x - this.x, particle.p.y - this.y))\n particle.dead = true;\n else particle.dead = false;\n } else if (this.crossType === \"bound\") {\n if (!this.getBound(particle.p.x - this.x, particle.p.y - this.y))\n particle.v.negate();\n }\n }\n}\n","import ColorUtil from \"../utils/ColorUtil\";\nimport CircleZone from \"../zone/CircleZone\";\nimport PointZone from \"../zone/PointZone\";\nimport LineZone from \"../zone/LineZone\";\nimport RectZone from \"../zone/RectZone\";\n\nexport default {\n addEventListener(proton, func) {\n proton.addEventListener(\"PROTON_UPDATE_AFTER\", () => func());\n },\n\n getStyle(color = \"#ff0000\") {\n const rgb = ColorUtil.hexToRgb(color);\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.5)`;\n },\n\n drawZone(proton, canvas, zone, clear) {\n const context = canvas.getContext(\"2d\");\n const style = this.getStyle();\n\n this.addEventListener(proton, () => {\n if (clear) context.clearRect(0, 0, canvas.width, canvas.height);\n\n if (zone instanceof PointZone) {\n context.beginPath();\n context.fillStyle = style;\n context.arc(zone.x, zone.y, 10, 0, Math.PI * 2, true);\n context.fill();\n context.closePath();\n } else if (zone instanceof LineZone) {\n context.beginPath();\n context.strokeStyle = style;\n context.moveTo(zone.x1, zone.y1);\n context.lineTo(zone.x2, zone.y2);\n context.stroke();\n context.closePath();\n } else if (zone instanceof RectZone) {\n context.beginPath();\n context.strokeStyle = style;\n context.drawRect(zone.x, zone.y, zone.width, zone.height);\n context.stroke();\n context.closePath();\n } else if (zone instanceof CircleZone) {\n context.beginPath();\n context.strokeStyle = style;\n context.arc(zone.x, zone.y, zone.radius, 0, Math.PI * 2, true);\n context.stroke();\n context.closePath();\n }\n });\n },\n\n drawEmitter(proton, canvas, emitter, clear) {\n const context = canvas.getContext(\"2d\");\n const style = this.getStyle();\n\n this.addEventListener(proton, () => {\n if (clear) context.clearRect(0, 0, canvas.width, canvas.height);\n\n context.beginPath();\n context.fillStyle = style;\n context.arc(emitter.p.x, emitter.p.y, 10, 0, Math.PI * 2, true);\n context.fill();\n context.closePath();\n });\n }\n};\n","import Proton from \"./core/Proton\";\nimport Particle from \"./core/Particle\";\nimport Pool from \"./core/Pool\";\n\nimport Util from \"./utils/Util\";\nimport ColorUtil from \"./utils/ColorUtil\";\nimport MathUtil from \"./math/MathUtil\";\nimport Vector2D from \"./math/Vector2D\";\nimport Polar2D from \"./math/Polar2D\";\nimport Mat3 from \"./math/Mat3\";\nimport Span from \"./math/Span\";\nimport ArraySpan from \"./math/ArraySpan\";\nimport Rectangle from \"./math/Rectangle\";\nimport ease from \"./math/ease\";\n\nimport Rate from \"./initialize/Rate\";\nimport Initialize from \"./initialize/Initialize\";\nimport Life from \"./initialize/Life\";\nimport Position from \"./initialize/Position\";\nimport Velocity from \"./initialize/Velocity\";\nimport Mass from \"./initialize/Mass\";\nimport Radius from \"./initialize/Radius\";\nimport Body from \"./initialize/Body\";\n\nimport Behaviour from \"./behaviour/Behaviour\";\nimport Force from \"./behaviour/Force\";\nimport Attraction from \"./behaviour/Attraction\";\nimport RandomDrift from \"./behaviour/RandomDrift\";\nimport Gravity from \"./behaviour/Gravity\";\nimport Collision from \"./behaviour/Collision\";\nimport CrossZone from \"./behaviour/CrossZone\";\nimport Alpha from \"./behaviour/Alpha\";\nimport Scale from \"./behaviour/Scale\";\nimport Rotate from \"./behaviour/Rotate\";\nimport Color from \"./behaviour/Color\";\nimport Cyclone from \"./behaviour/Cyclone\";\nimport Repulsion from \"./behaviour/Repulsion\";\nimport GravityWell from \"./behaviour/GravityWell\";\n\nimport Emitter from \"./emitter/Emitter\";\nimport BehaviourEmitter from \"./emitter/BehaviourEmitter\";\nimport FollowEmitter from \"./emitter/FollowEmitter\";\n\nimport CanvasRenderer from \"./render/CanvasRenderer\";\nimport DomRenderer from \"./render/DomRenderer\";\nimport EaselRenderer from \"./render/EaselRenderer\";\nimport PixelRenderer from \"./render/PixelRenderer\";\nimport PixiRenderer from \"./render/PixiRenderer\";\nimport WebGLRenderer from \"./render/WebGLRenderer\";\nimport CustomRenderer from \"./render/CustomRenderer\";\n\nimport Zone from \"./zone/Zone\";\nimport LineZone from \"./zone/LineZone\";\nimport CircleZone from \"./zone/CircleZone\";\nimport PointZone from \"./zone/PointZone\";\nimport RectZone from \"./zone/RectZone\";\nimport ImageZone from \"./zone/ImageZone\";\n\nimport Debug from \"./debug/Debug\";\n\n// namespace\nProton.Particle = Particle;\nProton.Pool = Pool;\n\nProton.Util = Util;\nProton.ColorUtil = ColorUtil;\nProton.MathUtil = MathUtil;\nProton.Vector2D = Proton.Vector = Vector2D;\nProton.Polar2D = Proton.Polar = Polar2D;\nProton.ArraySpan = ArraySpan;\nProton.Rectangle = Rectangle;\nProton.Rate = Rate;\nProton.ease = ease;\nProton.Span = Span;\nProton.Mat3 = Mat3;\nProton.getSpan = (a, b, center) => new Span(a, b, center);\nProton.createArraySpan = ArraySpan.createArraySpan;\n\nProton.Initialize = Proton.Init = Initialize;\nProton.Life = Proton.L = Life;\nProton.Position = Proton.P = Position;\nProton.Velocity = Proton.V = Velocity;\nProton.Mass = Proton.M = Mass;\nProton.Radius = Proton.R = Radius;\nProton.Body = Proton.B = Body;\n\nProton.Behaviour = Behaviour;\nProton.Force = Proton.F = Force;\nProton.Attraction = Proton.A = Attraction;\nProton.RandomDrift = Proton.RD = RandomDrift;\nProton.Gravity = Proton.G = Gravity;\nProton.Collision = Collision;\nProton.CrossZone = CrossZone;\nProton.Alpha = Alpha;\nProton.Scale = Proton.S = Scale;\nProton.Rotate = Rotate;\nProton.Color = Color;\nProton.Repulsion = Repulsion;\nProton.Cyclone = Cyclone;\nProton.GravityWell = GravityWell;\n\nProton.Emitter = Emitter;\nProton.BehaviourEmitter = BehaviourEmitter;\nProton.FollowEmitter = FollowEmitter;\n\nProton.Zone = Zone;\nProton.LineZone = LineZone;\nProton.CircleZone = CircleZone;\nProton.PointZone = PointZone;\nProton.RectZone = RectZone;\nProton.ImageZone = ImageZone;\n\nProton.CanvasRenderer = CanvasRenderer;\nProton.DomRenderer = DomRenderer;\nProton.EaselRenderer = EaselRenderer;\nProton.PixiRenderer = PixiRenderer;\nProton.PixelRenderer = PixelRenderer;\nProton.WebGLRenderer = Proton.WebGlRenderer = WebGLRenderer;\nProton.CustomRenderer = CustomRenderer;\n\nProton.Debug = Debug;\nUtil.assign(Proton, ease);\n\n// export\nexport default Proton;\n"],"names":["PI","INFINITY","Infinity","MathUtil","num","a","b","isInt","Math","random","floor","center","f","randomAToB","toString","slice","display","k","digits","pow","Span","Util","isArray","initValue","getRandFromArray","randomFloating","c","undefined","pan","getValue","length","i","tx","ty","angleInRadians","cos","s","sin","sx","sy","a00","a01","a02","a10","a11","a12","a20","a21","a22","b00","b01","b02","b10","b11","b12","b20","b21","b22","id","width","height","position","dom","document","createElement","style","opacity","transform","resize","marginLeft","marginTop","div","x","y","scale","rotate","willChange","css3","key","val","bkey","charAt","toUpperCase","substr","imgsCache","canvasCache","canvasId","context","image","rect","drawImage","imagedata","getImageData","clearRect","img","callback","param","src","Image","onload","e","target","WebGLUtil","nhpot","canvas","DomUtil","createCanvas","getContext","value","defaults","Object","prototype","call","arr","obj","ignore","indexOf","constructor","args","FactoryFunc","bind","apply","concat","particle","conf","hasProp","p","v","copy","props","prop","hasOwnProperty","getSpanValue","ImgUtil","destroy","source","assign","idsMap","Puid","type","uid","getIdFromCache","_index","_cache","isBody","isInner","Pool","total","cache","params","__puid","getId","pop","createOrClone","getCache","push","create","classApply","clone","count","Stats","proton","container","emitterIndex","rendererIndex","body","add","emitter","getEmitter","renderer","getRenderer","str","emitters","emitSpeed","getEmitterPos","initializes","concatArr","behaviours","name","getCreatedNumber","getCount","pool","innerHTML","cssText","join","addEventListener","bg","color","parentNode","appendChild","renderers","result","cpool","round","EventDispatcher","_listeners","listener","removeEventListener","splice","listeners","handler","dispatchEvent","hasEventListener","removeAllEventListeners","Integration","particles","time","damping","eulerIntegrate","sleep","old","multiplyScalar","mass","clear","Proton","integrationType","now","then","elapsed","stats","EULER","integrator","_fps","_interval","DEFAULT_INTERVAL","render","init","index","remove","parent","EMITTER_ADDED","EMITTER_REMOVED","PROTON_UPDATE","USE_CLOCK","Date","getTime","amendChangeTabsBug","emittersUpdate","PROTON_UPDATE_AFTER","update","destroyAll","destroyOther","getAllParticles","fps","MEASURE","RK2","PARTICLE_CREATED","PARTICLE_UPDATE","PARTICLE_SLEEP","PARTICLE_DEAD","Rgb","r","g","PI_2","sqrt","ease","easeLinear","Vector2D","atan2","w","addVectors","subVectors","set","divideScalar","distanceToSquared","tha","dx","dy","alpha","Particle","data","rgb","reset","setProp","N180_PI","life","age","dead","sprite","energy","radius","rotation","easing","emptyObject","removeAllBehaviours","applyBehaviours","max","applyBehaviour","behaviour","parents","initialize","addBehaviour","emptyArray","h","hex16","substring","parseInt","rbg","Number","Polar2D","abs","getX","getY","Mat3","mat3","mat","Float32Array","mat1","mat2","d","m","vec","ArraySpan","_arr","toArray","randomColor","Rectangle","bottom","right","Rate","numpan","timepan","numPan","setSpanValue","timePan","startTime","nextTime","Initialize","Life","lifePan","Zone","vector","crossType","alert","PointZone","error","Position","zone","getPosition","Velocity","rpan","thapan","rPan","thaPan","vr","polar2d","normalizeVelocity","PI_180","Mass","massPan","Radius","oldRadius","Body","imageTarget","Behaviour","getEasing","force","removeBehaviour","Force","fx","fy","normalizeForce","calculate","Attraction","targetPosition","normalizeValue","radiusSq","attractionForce","lengthSq","sub","normalize","RandomDrift","driftX","driftY","delay","panFoce","addXY","Gravity","Collision","collisionPool","delta","newPool","otherParticle","overlap","totalMass","averageMass1","averageMass2","distance","CrossZone","crossing","Alpha","same","alphaA","alphaB","Scale","scaleA","scaleB","Rotate","influence","rotationA","rotationB","getDirection","Color","createArraySpan","colorA","ColorUtil","hexToRgb","colorB","CHANGING","Cyclone","angle","setAngleAndForce","span","String","toLowerCase","cangle","cyclone","gradient","getGradient","Repulsion","GravityWell","centerPoint","distanceVec","distanceSq","factor","bindEmitter","setVectorVal","degreeTransform","Emitter","emitTime","totalTime","rate","stoped","isNaN","oldStoped","oldEmitTime","oldTotalTime","step","initAll","rest","initializer","arguments","emitting","integrate","dispatch","expire","event","bindEvent","createParticle","get","setupParticle","addBehaviours","stop","removeAllInitializers","removeEmitter","BehaviourEmitter","selfBehaviours","FollowEmitter","mouseTarget","window","_allowEmitting","initEventHandler","mousemoveHandler","mousemove","mousedownHandler","mousedown","mouseupHandler","mouseup","layerX","layerY","offsetX","offsetY","babelHelpers.get","BaseRenderer","element","stroke","circleConf","isCircle","initHandler","thinkness","_protonUpdateHandler","onProtonUpdate","_protonUpdateAfterHandler","onProtonUpdateAfter","_emitterAddedHandler","onEmitterAdded","_emitterRemovedHandler","onEmitterRemoved","_particleCreatedHandler","onParticleCreated","_particleUpdateHandler","onParticleUpdate","_particleDeadHandler","onParticleDead","CanvasRenderer","bufferCache","getImgFromCache","addImg2Body","drawCircle","buffer","createBuffer","bufContext","globalAlpha","globalCompositeOperation","fillStyle","rgbToHex","fillRect","save","translate","restore","beginPath","arc","strokeStyle","lineWidth","closePath","fill","size","DomRenderer","createBody","transform3d","bodyReady","backgroundColor","removeChild","babelHelpers.typeof","createCircle","createSprite","createDiv","borderRadius","borderColor","borderWidth","url","backgroundImage","EaselRenderer","addChild","scaleX","scaleY","graphics","regX","regY","createjs","Graphics","beginStroke","beginFill","shape","Shape","PixelRenderer","rectangle","imageData","createImageData","putImageData","setPixel","elementwidth","PIXIClass","PixiRenderer","setColor","blendMode","setPIXI","PIXI","Sprite","createFromImage","from","fromImage","tint","getHex16FromParticle","anchor","endFill","MStack","mats","multiply","WebGLRenderer","gl","antialias","stencil","depth","initVar","setMaxRadius","initShaders","initBuffers","blendEquation","FUNC_ADD","blendFunc","SRC_ALPHA","ONE_MINUS_SRC_ALPHA","enable","BLEND","umat","smat","mstack","viewport","circleCanvasURL","vsSource","fsSource","texturebuffers","A","B","fs","shader","createShader","FRAGMENT_SHADER","VERTEX_SHADER","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","fragmentShader","getShader","getFragmentShader","vertexShader","getVertexShader","sprogram","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","useProgram","vpa","getAttribLocation","tca","enableVertexAttribArray","tMatUniform","getUniformLocation","samplerUniform","useTex","uniform1i","vs","idx","unitIBuffer","bindBuffer","ELEMENT_ARRAY_BUFFER","bufferData","Uint16Array","STATIC_DRAW","ids","unitI33","stripBuffer","raidus","circleCanvasRadius","toDataURL","_w","_h","_width","_height","_scaleX","_scaleY","createTexture","texture","vcBuffer","tcBuffer","ARRAY_BUFFER","bindTexture","TEXTURE_2D","texImage2D","RGBA","UNSIGNED_BYTE","texParameteri","TEXTURE_MAG_FILTER","LINEAR","TEXTURE_MIN_FILTER","LINEAR_MIPMAP_NEAREST","generateMipmap","textureLoaded","textureWidth","textureHeight","tmat","imat","oldScale","getCanvasFromCache","drawImg2Canvas","updateMatrix","uniform3f","uniformMatrix3fv","top","vertexAttribPointer","FLOAT","drawElements","TRIANGLES","UNSIGNED_SHORT","moveOriginMatrix","makeTranslation","translationMatrix","angel","rotationMatrix","makeRotation","scaleMatrix","makeScale","matrix","matrixMultiply","inverse","CustomRenderer","LineZone","x1","y1","x2","y2","direction","minx","min","miny","maxx","maxy","dot","xxyy","getLength","C","D","tha2","tha1","oldx","oldy","rangeOut","getDistance","getSymmetric","CircleZone","PIx2","randomRadius","distanceTo","RectZone","ImageZone","vectors","setVectors","j","length1","length2","getBound","negate","func","getStyle","moveTo","lineTo","drawRect","Vector","Polar","getSpan","Init","L","P","V","M","R","F","RD","G","S","WebGlRenderer","Debug"],"mappings":";;;;;;AAAA,IAAMA,KAAK,SAAX;AACA,IAAMC,WAAWC,QAAjB;;AAEA,IAAMC,WAAW;MACXH,EADW;QAETA,KAAK,CAFI;QAGTA,KAAK,CAHI;UAIPA,KAAK,GAJE;WAKN,MAAMA,EALA;YAML,CAAC,GANI;;YAAA,sBAQJI,GARI,EAQC;WACPA,QAAQ,KAAKF,QAAb,IAAyBE,QAAQH,QAAxC;GATa;YAAA,sBAYJI,CAZI,EAYDC,CAZC,EAYiB;QAAfC,KAAe,uEAAP,KAAO;;QAC1B,CAACA,KAAL,EAAY,OAAOF,IAAIG,KAAKC,MAAL,MAAiBH,IAAID,CAArB,CAAX,CAAZ,KACK,OAAOG,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AepL,OAAOkhB,CAAP,GAAW9V,KAA1B;AACApL,OAAOuL,MAAP,GAAgBA,MAAhB;AACAvL,OAAO4L,KAAP,GAAeA,KAAf;AACA5L,OAAO6M,SAAP,GAAmBA,SAAnB;AACA7M,OAAOmM,OAAP,GAAiBA,OAAjB;AACAnM,OAAO8M,WAAP,GAAqBA,WAArB;;AAEA9M,OAAOsN,OAAP,GAAiBA,OAAjB;AACAtN,OAAOiP,gBAAP,GAA0BA,gBAA1B;AACAjP,OAAOmP,aAAP,GAAuBA,aAAvB;;AAEAnP,OAAOoH,IAAP,GAAcA,IAAd;AACApH,OAAO6d,QAAP,GAAkBA,QAAlB;AACA7d,OAAOof,UAAP,GAAoBA,UAApB;AACApf,OAAOwH,SAAP,GAAmBA,SAAnB;AACAxH,OAAOwf,QAAP,GAAkBA,QAAlB;AACAxf,OAAOyf,SAAP,GAAmBA,SAAnB;;AAEAzf,OAAOwR,cAAP,GAAwBA,cAAxB;AACAxR,OAAO+S,WAAP,GAAqBA,WAArB;AACA/S,OAAO8T,aAAP,GAAuBA,aAAvB;AACA9T,OAAOmV,YAAP,GAAsBA,YAAtB;AACAnV,OAAO2U,aAAP,GAAuBA,aAAvB;AACA3U,OAAOmW,aAAP,GAAuBnW,OAAOmhB,aAAP,GAAuBhL,aAA9C;AACAnW,OAAO4d,cAAP,GAAwBA,cAAxB;;AAEA5d,OAAOohB,KAAP,GAAeA,KAAf;AACArtB,KAAKmH,MAAL,CAAY8E,MAAZ,EAAoByC,IAApB;;;;;;;;"} \ No newline at end of file diff --git a/build/proton.min.js b/build/proton.min.js index 1cee51b..f1fe358 100755 --- a/build/proton.min.js +++ b/build/proton.min.js @@ -1,5 +1,5 @@ /*! -* Proton v4.2.0 +* Proton v4.2.1 * https://github.com/drawcall/Proton * * Copyright 2013-2020, A-JIE