Jump to content
Search Community

Abel

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Abel

  1. Awesome!!! your a god send, but the reason being if I'm correct or not is Webgl renders sprites faster using a png, then the native graphics object?.

  2. No worries, I understand, but I tried that as well but no luck.

     

    particleContainer = new PIXI.particles.ParticleContainer(particleData.length, {scale: true,
      position: true,
      tint:true,
      rotation: true,
      uvs: true,
      alpha: true
    });

     

  3. Yes my particles are supposed to explode from the center of the particle container, so the scale, alpha, x, y, is set to zero. I've attached my app.js file, for reference.

    app.js

  4. Hi,

     

    I tried putting up my example on codepen, but it doesn't work, so I just copied and pasted my code here. Sorry for the inconvenience, I really appreciate you taking the time to help me.

     

    function createParticles() {
      console.log("createParticles()");
    
      particleContainer = new PIXI.particles.ParticleContainer();
    
      particleContainer.pivot.set(0, 0);
      particleContainer.x = app.renderer.width / 2;
      particleContainer.y = app.renderer.height / 2;
    
      for (var i = 0; i < particleData.length; i++) {
        var particle = new PIXI.Sprite.fromImage('images/particle.png');
        particle.pivot.set(5, 5);
        particle.alpha = 0;
        particle.x = 0;
        particle.y = 0;
        particle.scale.set(Math.random() * 1 - 0.25);
        particleContainer.addChild(particle);
      }
      app.stage.addChild(particleContainer);
    }
    function cyleColors() {
       console.log("randomColors();");
        tlColor = new TimelineMax({ yoyo: true, repeat: 999, repeatDelay: 0 });
        tlColor.to(particleContainer, 3, {pixi:{tint:0x4ec7f2}, ease: Cubic.easeOut })
             .to(particleContainer, 3, {pixi:{tint:0xe6df36}, ease: Cubic.easeOut })
             .to(particleContainer, 3, {pixi:{tint:0x4c9f91}, ease: Cubic.easeOut })
             .to(particleContainer, 3, {pixi:{tint:0xf98331}, ease: Cubic.easeOut })
             .to(particleContainer, 3, {pixi:{tint:0xde1272}, ease: Cubic.easeOut });
    }

     

  5. Hi All,

     

    I've been learning PixiJS, and I love it, but for some reason my ParticleContainer color is not changing?. All I'm getting is black, please let me know your thoughts I've pasted my code below for reference.

     

        var tlColor = new TimelineMax({ yoyo: true, repeat: 999, repeatDelay: 0 });
        tlColor.to(particleContainer, 3, {pixi:{tint:0x6fbb4c}, ease: Cubic.easeOut })
            .to(particleContainer, 3, {pixi:{tint:0x4ec7f2}, ease: Cubic.easeOut })
            .to(particleContainer, 3, {pixi:{tint:0xe6df36}, ease: Cubic.easeOut })
            .to(particleContainer, 3, {pixi:{tint:0x4c9f91}, ease: Cubic.easeOut })
            .to(particleContainer, 3, {pixi:{tint:0xf98331}, ease: Cubic.easeOut })
            .to(particleContainer, 3, {pixi:{tint:0xde1272}, ease: Cubic.easeOut });

     

    Thanks

×
×
  • Create New...