{"_id":"@barvynkoa/particle-emitter","name":"@barvynkoa/particle-emitter","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@barvynkoa/particle-emitter","version":"0.0.1","main":"lib/particle-emitter.js","module":"lib/particle-emitter.es.js","bundle":"dist/particle-emitter.js","typings":"lib/index.d.ts","description":"[Fork] Particle emitter for Pixi.js","scripts":{"clean":"rimraf docs/docs docs/dist .publish","lint":"eslint --ext .ts src","prebuild":"npm run lint","build":"rollup -c --bundleConfigAsCjs && yarn build:min && yarn build:dts","build:min":"terser dist/particle-emitter.js -c -m -o dist/particle-emitter.min.js --source-map \"content='dist/particle-emitter.js.map',includeSources=true,filename='dist/particle-emitter.min.js.map',url='particle-emitter.min.js.map'\" --comments \"/particle-emitter.js - /\"","build:dts":"tsc --noEmit false --declaration --emitDeclarationOnly --declarationDir lib","postbuild":"ncp dist docs/dist","predocs":"ncp node_modules/pixi.js docs/examples/libs/pixi.js","docs":"typedoc src/index.ts","predocs-live":"npm run build && npm run docs","docs-live":"gh-pages -d docs","postdocs-live":"git checkout .","version":"npm run build","publish:patch":"npm version patch && node build/publish.js","publish:minor":"npm version minor && node build/publish.js","publish:major":"npm version major && node build/publish.js","postpublish":"git push && git push --tags && npm run docs-live","test":"echo done"},"peerDependencies":{"pixi.js":">=6.0.4 <9.0.0"},"devDependencies":{"@pixi/eslint-config":"^5.1.0","eslint":"^8.38.0","gh-pages":"^2.0.0","ncp":"^2.0.0","pixi.js":">=6.0.4 <9.0.0","rimraf":"^2.5.4","rollup":"^3.0.0","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-jscc":"^1.0.0","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-typescript":"^1.0.0","rollup-plugin-typescript2":"^0.36.0","semver":"^7.5.2","terser":"^5.14.2","tslib":"^1.11.1","typedoc":"^0.25.11","typescript":"^5.0.4"},"repository":{"type":"git","url":"git+https://github.com/andriibarvynko/particle-emitter.git"},"keywords":["webgl","pixi","pixi.js","particles"],"license":"MIT","workspaces":{"packages":["./","test/pixi-v6-iife","test/pixi-v6-module"]},"private":false,"_id":"@barvynkoa/particle-emitter@0.0.1","gitHead":"e30221323d5112b1ee7101d39007ecde047d91ec","bugs":{"url":"https://github.com/andriibarvynko/particle-emitter/issues"},"homepage":"https://github.com/andriibarvynko/particle-emitter#readme","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-aNNv5rKlIxnPTA8WVkOoB29GBMuYSAUhDkdCAIk6unuLt5gl/CJbXnH+qNC2uVUOwEYlNu2LXnK+oW6lsG0EYQ==","shasum":"906ce6db744b93ff257bc3e08c8a1235fa4dac32","tarball":"https://registry.npmjs.org/@barvynkoa/particle-emitter/-/particle-emitter-0.0.1.tgz","fileCount":66,"unpackedSize":573009,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmGzDTmQ4RQQC6jkE6GU5OgWSBQRr00FTXosCx0BoOSQIgLlWycFEn4/peibwAwa/GCCfMKaiFOyHTqt1mbOJd8I0="}]},"_npmUser":{"name":"barvynkoa","email":"gape.mobile.0@icloud.com"},"directories":{},"maintainers":[{"name":"barvynkoa","email":"gape.mobile.0@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/particle-emitter_0.0.1_1716812975826_0.21548533495361122"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-27T12:29:35.729Z","0.0.1":"2024-05-27T12:29:35.985Z","modified":"2024-05-27T12:29:36.252Z"},"maintainers":[{"name":"barvynkoa","email":"gape.mobile.0@icloud.com"}],"description":"[Fork] Particle emitter for Pixi.js","homepage":"https://github.com/andriibarvynko/particle-emitter#readme","keywords":["webgl","pixi","pixi.js","particles"],"repository":{"type":"git","url":"git+https://github.com/andriibarvynko/particle-emitter.git"},"bugs":{"url":"https://github.com/andriibarvynko/particle-emitter/issues"},"license":"MIT","readme":"# PixiJS Particle Emitter\n\n[![Build Status](https://github.com/pixijs/particle-emitter/workflows/Build/badge.svg)](https://github.com/pixijs/particle-emitter/actions?query=workflow%3A%22Build%22) [![GitHub version](https://badge.fury.io/gh/pixijs%2Fparticle-emitter.svg)](https://github.com/pixijs/particle-emitter/releases/latest)\n\nA particle system library for the [PixiJS](https://github.com/pixijs/pixi.js) library. Also, we created an [interactive particle editor](http://pixijs.github.io/pixi-particles-editor/) to design and preview custom particle emitters which utilitze PixiJS Particle Emitter. Note that the editor was built for an older version of the library - to use its output you'll have to use the [`upgradeConfig()`](https://pixijs.github.io/particle-emitter/docs/modules.html#upgradeConfig) function.\n\n## Breaking changes in v6 from v5\n\n* `pixi.js` updated to v8\n* all imports now from 'pixi.js', it is backward compatible but is better to use v5 for pixi.js < v8\n* update method of Emitter now have param of type: number | Ticker\n* removed LinkedListContainer (for now, development in progress)\n* particle performance example is not working as expected now, because LinkedListContainer is not available\n* dependencies updated to newer versions (e.g. typescript version now is ^5.0.4)\n* examples updated to `pixi.js` v8\n\n## Breaking changes in v5 from v4\n* Project has been renamed from `pixi-particles` to `@pixi/particle-emitter`\n* On `Emitter`, configuration format has drastically changed. Use [`upgradeConfig()`](https://pixijs.github.io/particle-emitter/docs/modules.html#upgradeConfig) to convert old configuration objects automatically.\n* `PathParticle` and `AnimatedParticle` no longer exist, use the new behaviors instead.\n* Dropped support for PixiJS v4. Please use v6 - while v5 may work, Typescript definitions won't work and will cause you a headache.\n* The library now outputs ES6 code - if you need it in ES5 code, you'll need to make sure your build process transpiles it.\n\n## Sample Usage\n\nPlease see the examples for various pre-made particle configurations.\n\n```js\n// Create a new emitter\n// note: if importing library like \"import * as particles from '@pixi/particle-emitter'\"\n// or \"const particles = require('@pixi/particle-emitter')\", the PIXI namespace will\n// not be modified, and may not exist - use \"new particles.Emitter()\", or whatever\n// your imported namespace is\nvar emitter = new PIXI.particles.Emitter(\n\n    // The PIXI.Container to put the emitter in\n    // if using blend modes, it's important to put this\n    // on top of a bitmap, and not use the root stage Container\n    container,\n    // Emitter configuration, edit this to change the look\n    // of the emitter\n    {\n        lifetime: {\n            min: 0.5,\n            max: 0.5\n        },\n        frequency: 0.008,\n        spawnChance: 1,\n        particlesPerWave: 1,\n        emitterLifetime: 0.31,\n        maxParticles: 1000,\n        pos: {\n            x: 0,\n            y: 0\n        },\n        addAtBack: false,\n        behaviors: [\n            {\n                type: 'alpha',\n                config: {\n                    alpha: {\n                        list: [\n                            {\n                                value: 0.8,\n                                time: 0\n                            },\n                            {\n                                value: 0.1,\n                                time: 1\n                            }\n                        ],\n                    },\n                }\n            },\n            {\n                type: 'scale',\n                config: {\n                    scale: {\n                        list: [\n                            {\n                                value: 1,\n                                time: 0\n                            },\n                            {\n                                value: 0.3,\n                                time: 1\n                            }\n                        ],\n                    },\n                }\n            },\n            {\n                type: 'color',\n                config: {\n                    color: {\n                        list: [\n                            {\n                                value: \"fb1010\",\n                                time: 0\n                            },\n                            {\n                                value: \"f5b830\",\n                                time: 1\n                            }\n                        ],\n                    },\n                }\n            },\n            {\n                type: 'moveSpeed',\n                config: {\n                    speed: {\n                        list: [\n                            {\n                                value: 200,\n                                time: 0\n                            },\n                            {\n                                value: 100,\n                                time: 1\n                            }\n                        ],\n                        isStepped: false\n                    },\n                }\n            },\n            {\n                type: 'rotationStatic',\n                config: {\n                    min: 0,\n                    max: 360\n                }\n            },\n            {\n                type: 'spawnShape',\n                config: {\n                    type: 'torus',\n                    data: {\n                        x: 0,\n                        y: 0,\n                        radius: 10\n                    }\n                }\n            },\n            {\n                type: 'textureSingle',\n                config: {\n                    texture: PIXI.Texture.from('image.jpg')\n                }\n            }\n        ],\n    }\n);\n\n// Calculate the current time\nvar elapsed = Date.now();\n\n// Update function every frame\nvar update = function(){\n\n\t// Update the next frame\n\trequestAnimationFrame(update);\n\n\tvar now = Date.now();\n\n\t// The emitter requires the elapsed\n\t// number of seconds since the last update\n\temitter.update((now - elapsed) * 0.001);\n\telapsed = now;\n};\n\n// Start emitting\nemitter.emit = true;\n\n// Start the update\nupdate();\n```\n\n## Documentation\n\nhttp://pixijs.github.io/particle-emitter/docs/\n\n## Installation\n\nPixiJS Particle Emitter can be installed with NPM or other package managers.\n\n```bash\nnpm install @pixi/particle-emitter\n```\n\n## Examples\n\n* [Explosion 1](https://pixijs.github.io/particle-emitter/examples/explosion.html)\n* [Explosion 2](https://pixijs.github.io/particle-emitter/examples/explosion2.html)\n* [Explosion 3](https://pixijs.github.io/particle-emitter/examples/explosion3.html)\n* [Explosion Ring](https://pixijs.github.io/particle-emitter/examples/explosionRing.html)\n* [Megaman Death](https://pixijs.github.io/particle-emitter/examples/megamanDeath.html)\n* [Rain](https://pixijs.github.io/particle-emitter/examples/rain.html)\n* [Flame](https://pixijs.github.io/particle-emitter/examples/flame.html)\n* [Flame on Polygonal Chain](https://pixijs.github.io/particle-emitter/examples/flamePolygonal.html)\n* [Flame on Advanced Polygonal Chain](https://pixijs.github.io/particle-emitter/examples/flamePolygonalAdv.html)\n* [Flame - Stepped Colors](https://pixijs.github.io/particle-emitter/examples/flameStepped.html)\n* [Flame with Smoke](https://pixijs.github.io/particle-emitter/examples/flameAndSmoke.html)\n* [Flame - Sputtering](https://pixijs.github.io/particle-emitter/examples/flameUneven.html)\n* [Gas](https://pixijs.github.io/particle-emitter/examples/gas.html)\n* [Bubbles](https://pixijs.github.io/particle-emitter/examples/bubbles.html)\n* [Bubble Spray](https://pixijs.github.io/particle-emitter/examples/bubbleSpray.html)\n* [Bubble Stream](https://pixijs.github.io/particle-emitter/examples/bubbleStream.html)\n* [Bubble Stream - path following](https://pixijs.github.io/particle-emitter/examples/bubbleStreamPath.html)\n* [Vertical Bubbles](https://pixijs.github.io/particle-emitter/examples/bubblesVertical.html)\n* [Cartoon Smoke](https://pixijs.github.io/particle-emitter/examples/cartoonSmoke.html)\n* [Cartoon Smoke Alt.](https://pixijs.github.io/particle-emitter/examples/cartoonSmoke2.html)\n* [Cartoon Smoke Blast](https://pixijs.github.io/particle-emitter/examples/cartoonSmokeBlast.html)\n* [Snow](https://pixijs.github.io/particle-emitter/examples/snow.html)\n* [Sparks](https://pixijs.github.io/particle-emitter/examples/sparks.html)\n* [Fountain](https://pixijs.github.io/particle-emitter/examples/fountain.html)\n* [Animated Coins](https://pixijs.github.io/particle-emitter/examples/coins.html)\n* [Animated Bubbles](https://pixijs.github.io/particle-emitter/examples/animatedBubbles.html)\n* [Spaceship Destruction - Ordered Art](https://pixijs.github.io/particle-emitter/examples/spaceshipDestruction.html)\n* [Particle Container Performance](https://pixijs.github.io/particle-emitter/examples/particleContainerPerformance.html)\n\n## Contributer Note\nThis project uses `yarn` rather than `npm` to take advantage of the workspaces feature for the tests, making it easier to have standalone tests that share dependencies where possible.\n\n## License\n\nCopyright (c) 2015 [CloudKid](http://github.com/cloudkidstudio)\n\nReleased under the MIT License.\n","readmeFilename":"README.md"}