Search the Community

Showing results for tags 'particle'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 41 results

  1. BeachBum

    Custom Class for Particles

    I've been trying to figure out who to create a custom particle class. I get the concept of prototype to some extent but I'm not sure how to use that with the emitter.particleClass property. Can someone show a really brief example of how to extend the Particle class with an extra property and or member? Thanks!
  2. Hi Guys, I've been asking around on twitter but as yet don't have an answer so I thought I'd ask here too Does anyone know of a particle editor I could use with the proton lib? ( If not does anyone know any good particle libs I can use with Pixi which also come with a visual editor? Cheers, Dean
  3. Hello All, Is it possible to access and change the properties of individual particles released from an emitter? (without requiring an overlap detection) Let's say I've emitted 3 particles from an emitter... Is there a way to retrieve the properties of each particle (x,y,velocity,rotation, etc) then execute code that will be applied to that single particle if it meets certain criteria? I've been using emitters to create enemies, projectiles, and scene objects. Many times there are multiple on the screen at one time and they need to be accessed and respond individually. A scenario that I've came across is the combination of particles from different emitters that must work together. For example, you have an "enemy" particle, that will shoot a a "fireball" particle from the "enemy" particles current location... then the "fireball" particle will be followed by an emitter to create a smoke trail of particles as the "fireball" particle travels. I've come up with a work around by placing a physics.body that is the full size of the screen and then checking with "game.physics.arcade.overlap". Since any particle will always be overlapping with it, I can execute code on that particle. BUT.. this still only works if there is only one particle of a certain type. It doesnt give me access to indivual particles. Are particles assigned unique identifiers, and can they be accessed so each particle can be controlled individually without requiring overlap/collision detection?
  4. Fiero_MF

    Animated particles

    Hi, I'm trying to get an explosion working with animated particles in Phaser. So far I've got the emitted working fine and seem to be able to add animations to the particles, but running these animations does nothing. Since the docs say that "Particles are extended Sprites" I would assume that you can add and run animations in the same way that you do an a normal sprite? Any help would be greatly appreciated!! var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create });var emitter;function preload() { game.load.spritesheet('partAnim', 'assets/partAnim.png', 134, 141);}function create() { game.physics.startSystem(Phaser.Physics.ARCADE); game.stage.backgroundColor = 0x337799; emitter = game.add.emitter(0, 0, 100); emitter.makeParticles('partAnim'); emitter.gravity = 200; game.input.onDown.add(particleBurst, this);}function particleBurst(pointer) { emitter.x = pointer.x; emitter.y = pointer.y; emitter.start(true, 2000, null, 1); var part = emitter.getTop(); part.animations.add('run');'run', 15, true); console.log(part);}
  5. vmcruz

    A more advanced Particle System

    Hi, I made another particle system. This time with the guidance of this YT tutorial. I made a filter showing fire-like using this particle system. As I think this is a interesting topic to those newers like myself, I want to share my approach. The readme: /* README!! This particle system works with some sort of filters. How it works: x: x position, automatically added to Emitter's x (you can't have a particle floating around without a reference point) y: y position vx: x velocity vy: y velocity type: it could be either 'arc' or 'rect' size: the size of the particle, if arc, this represents radio * 2 opacity: self describing colorType: could be either 'rgba' or 'hsla' color: array containing the first 3 params of rgba/hsla, opacity is automatically added particles: the number of particles created every frame, bad performs when reaching the 10 value life: the number of frames this particle will live gravity: gravity force wind: wind force NO NEED to put every value in a filter, it has fallback values */Best regards. The Tutorial: Javascript Motion, Particles and More index.html
  6. vmcruz

    Basic Particle System (for newers)

    I know this isn't much, but I wanted to share with you a simplistic and very basic particle system. This is my little contribution to those newers who want to experiment. Code in attached files. particles.bmp index.html
  7. Stonekeeper

    Particle Bounds Bug?

    Hi, Just starting out with Phaser so there may be a simple fix to this: I have a small texture (9x12) that is being used for particles. The bounding box seems to not scale with the particle and is stuck at the original size, making collision detection problematic. I've attached an image of the issue. The particle is in the top left and the BB in green. Has anyone else had this problem? Thanks.
  8. Is it possible to emite particles from one coordonate to another one with Phaser ? If it is, have you got exmple, a way to go ? Thanks !
  9. leosantana

    particle editor for pandajs v 1.0

    Hi guys! A little over a month, I started my studies with pandajs, and I had the idea to make a particle editor for pandajs. I hope you like the tool. Thanks enpu, for you have created pandajs! It a great tool. Congratulations! link: Notes:1. I made a little change in particle.js, I inserted a var 'this.color',to change particle color.2. I made a extend of Emitter, to read the settings file. 'particleSettings.json'. links: and Now I'm working in a way of import the archive 'particleSettings.json' to edit in particleEditor. note: this will be inserted in Update for v 1.1
  10. Hi, I have a scene where a global gravity for Arcade Physics is set to 640. Then I try to set a lower gravity of 10 for a specific particle emitter, so to have the particles seem to float in the air. game.physics.startSystem(Phaser.Physics.ARCADE);// 1. Setting global = 640;game.physics.arcade.frameRate = 1 / 30;game.time.deltaCap = 1 / 30 * 2;emitter = game.add.emitter(0, 0, 100);emitter.makeParticles('particle');// 2. Overriding gravity for particle emitter.// Won't have any effect because of 1.emitter.gravity = 10;But it seems that it's not possible to override the emitter gravity if the global gravity is set. Commenting out game.physics.arcade.gravity.y = 640; makes the particles float in the air as expected. I've attached a test project showing the problem in action.
  11. leosantana

    particles with panda and p2physics

    How to create particles in the pandajs with p2physics? Thanks!
  12. pchoo

    Layering Particles

    Can anyone tell me how I'd go about setting the z-index of emitted particles? Basically, what if I wanted particles emitted behind an object? Or force them in front? Thanks in advance.
  13. I was implementing some simple fireworks using emitters that looked pretty, but after a couple of minutes on the iPad, they killed the browser. Psudeo code is: Firework Constructor: - Create sprite for positioning, and to be the visible projectile. - Create primary emitter for particle trail and primary explosion. - Create secondary emitter for multicolour explosions. - Call makeParticles on both emitters with a random (out of 4) particle sprite. Firework Update function: - Decrement life timer. - Set emitters position to match projectile sprite position. - When time is up, call begin. - If already started, call boom instead. Firework Begin function: - Reset all positions. - Revive projectile sprite. - Set velocity on the projectile sprite to shoot it up the screen. - Call makeParticles on the secondary emitter with a random particle sprite to change up the explosion colours. - Start emitter 1 to leave a particle trail up the screen. Firework Boom function: - Kill projectile sprite - Call start on primary emitter, set to explode. - 50% chance to call start on secondary emitter, set to explode. This created a really nice visual effect, but after a couple of minutes of running on the iPad, it caused Safari to close. I altered the code to only call makeParticles on the secondary emitter once at the creation of the firework object and now it runs fine without killing the browser. So, lesson for today is to not call makeParticles on an emitter (or 4) every few seconds. It is probably better to have a bunch of secondary emitters from the start, and pick one to explode at random.
  14. I wish I knew how to GitHub properly so I could do the whole Pull request thing. I believe I am in the Dev branch. Particles/Arcade/Emitter.js has one line that is breaking things when trying to use a width/height value on the emitter. Line 361: particle.reset(this.emiteX -, this.right), this.emiteY -, this.bottom));Problem 1: "this.emiteX" and "this.emiteY" should be "this.emitX" and "this.emitY". Problem 2:, this.right) and the top/bottom one too both return a value that results in the particles being centered around the origin, rather than the emitters X/Y position. This is because the integerInRange returns a value between the left(top) of the emitter and the right(bottom) of the emitter, and this value is then subtracted from where the emitter is. Example: The emitter is at (300, 300) and is 10x10. The value returned by integerInRange will be somewhere in 290-310. This is subtracted from 300, leaving the particle to spawn in the -10 to 10 range, rather than the 290-310 range one would expect. Possible solutions are to just remove the "this.emitX(Y) - " parts, solving problem 1 at the same time, or the more complicated one is changing the range to be ", this.width/2)". For my version, I'm going with the first solution of removing this.emiteX(Y) entirely.
  15. Paul-Andre

    Any good particle engine?

    Do you know a good javascript particle library that is easy enough to integrate? It's one of those things you could program yourself easily, but it will still take time. I tried ParticleEmiterJs, a plugin someone made for CreativeJs, but it was really buggy. Any advice?
  16. I am currently searching for a particle engine for my current game project and just came across Proton: It looks fantastic - plus - it supports Pixi.js. At least it features a demo explicitely using the Pixi.js engine. Thought this might be of some interest for some of you. Best, benny!