Jump to content

Search the Community

Showing results for tags 'particlecontainer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 7 results

  1. Hi, First post here Is it possible to add another child in a particule container ? Does I need a sprite sheet and how it works with ParticuleContainer ? /* more setup before */ const sprites = new PIXI.ParticleContainer(10000, { … }); app.stage.addChild(sprites); // array of texture const texture = [ PIXI.Texture.from('foo.jpg'), PIXI.Texture.from('bar.png') ]; // first let foo = new PIXI.Sprite(texture[0]); sprites.addChild(foo); // OK // second let bar = new PIXI.Sprite(texture[1]); sprites.addChild(bar); // not OK and no error in console /* Then FUN with GSAP */
  2. Hi, I've just noticed that the ParticleContainer doesn't seem to support blendModes. I thought previously it had worked when the tint property had been set to true, but may have imagined it. This still a current limitation?
  3. Greetings! I'm currently playing around with PIXI.particles.ParticleContainer and am having a blast. What an awesome container! I'm writing because I'm having a peculiar issue regarding mouse events and the particles inside the ParticleContainer. Specifically, I create the ParticleContainer, add sprites to it via PIXI.Sprite.fromImage and then bind mouse down events to each sprite and specify a hit area for the sprite as well. That works! Specifically, it works if I add the sprites to the ParticleContainer and don't specify a position, and all the sprites show up in the top left corner of the ParticleContainer. However if I move the sprites around in the container by adjusting the sprite's x,y values, the hit area remains in the in the top left corner and I can still trigger the mouse event there, but that's clearly not the intent. I had guessed that the hit area would follow the sprites as they move around the container. Is this true? I'm posting below a section of my code to help explain. Thank you to any PIXI wizards who might have insight here. // Create the graph container this.graphContainer = new PIXI.particles.ParticleContainer( numNodes, { scale: true, position: true, rotation: false, uvs: false, alpha: false } ); this.graphContainer.hitArea = new PIXI.Rectangle(0, 0, 1000, 1000); this.graphContainer.interactive = true; this.graphContainer.interactiveChildren = true; // Create the graph nodes for (var i=0; i<numNodes; i++) { var x = graphData['nodes'][i]['x']; var y = graphData['nodes'][i]['y']; var node = new Node(this.top, null, x, y); this.nodes.push(node); this.graphContainer.addChild(node.getSprite()); } class Node { constructor(top, type, x, y) { this.top = top; this.initPosition = { 'x': x, 'y': y }; this.createSprite(); } createSprite() { this.sprite = new PIXI.Sprite.fromImage('images/bcat.png'); this.sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100); this.sprite.interactive = true; this.sprite.buttonMode = true; this.sprite.on('mousedown', (event) => { console.log('sprite event'); }); this.sprite.anchor.set(0.5); this.sprite.x = this.initPosition['x']; this.sprite.y = this.initPosition['y']; } getSprite() { return this.sprite; } }
  4. I have tried to put my sprites into a ParticleContainer but they won't show up. But if I put them into a PIXI.Container they show up. I don't understand. Here is my code: this.objectContainer = new PIXI.particles.ParticleContainer(6000, {scale: true, position: true, rotation: true, alpha: true}); // this.objectContainer = new Container(); // Code for building a single sprite: const g = new Graphics(); g.beginFill(0x24D5EF); g.lineStyle(0); g.drawCircle(radius, radius, radius); g.endFill(); const rt = RenderTexture.create(g.width, g.height); this.renderer.render(g, rt); const sprite = Sprite.from(rt); I have only 600 objects to display and I define my ParticleContainer as above. It worked before when all object information are local, but now I get my object information from the server. But the sprites are still built on the client. Nothing else had changed. Why does it work in a normal Container but not in ParticleContainer anymore?
  5. Recently I've been developing small app for raspberry pi with few sets of sprites. I used PIXI.Container as stage for rendering with MovieClip objects inside of it. And it works fine. Then I tried to improve perfomances and changed PIXI.Container to PIXI.ParticleContainer(5000, {uvs: true }); It works fine on pc, but on pi i get error "TypeError: null is not an object (evaluating 'this.parent.transform')" which occurs in this part of pixi DisplayObject.prototype.updateTransform = function () { this.transform.updateTransform(this.parent.transform); // multiply the alphas.. this.worldAlpha = this.alpha * this.parent.worldAlpha; this._bounds.updateID++; }; I tested this part and it's used by PIXI.ParticleContainer and not PIXI.Container and i was wondering can i somehow avoid using this part of code
  6. Hello, I'm rendering isometric terrain (about +700000 sprites) in ParticleContainer(for speed) and i need hide some blocks(occulusion culling). But .visible for childs in ParticleContainer not work. Can you help me? Sorry for my bad english,
  7. Hi, first time poster here! I recently started using PIXI for a game project with a tile-based engine. I used the ParticleContainer for a while but had to switch to a regular Container because I need to support several different base textures. I got really excited when I found the post on the blog about multi-texture batching in v4, but soon noticed that the example used a regular Container and that the ParticleContainer is not even present in the latest v4 dev branch (at least PIXI.ParticleContainer is undefined for me). So I'm wondering if this is because you are working on supporting multi-texture batching for ParticleContainers right now, or if they will continue to require all sprites to use the same base texture in the final release of v4. Really hoping for an answer to this as I have to support several different base textures but could really use the performance boost that a ParticleContainer gives. Thanks for making an excellent engine!
×
×
  • Create New...