• Content Count

  • Joined

  • Last visited

  1. Thank you very much! Second variant is what I wanted
  2. Situation: I'm making a game with low resolution (pixeled). I'm using texture atlas (texture packer) to make animated sprite. To scale the game to full screen I'm using stage.scale. It's not pixel-perfect so some pixels can be rectangles except of squares, it's ok. Problem: when AnmatedSprite playing animation pixels change size. Is it possible to force renderer to render all scene with original size and resize it AFTER rendering? Or maybe there is another way to make things better Please help 🦀
  3. Thank you for answer and advices!
  4. I need to make whole stage scrollable with scrollbar. Can I just make a huge renderer on page (bigger than browser window) and scroll using browser scrollbar? Or this is a bad idea and I need to make my own scrollbar inside renderer using pixi.js? In both cases I would make offscreen sprites not renderable for optimisation.
  5. No, it is not. I write a demo to show my problem: http://zxlostsoul.4ky.ru/pixi/ Full code: window.onload = function() { var renderer = PIXI.autoDetectRenderer(800, 600,{backgroundColor : 0x1099bb}); document.body.appendChild(renderer.view); var stage = new PIXI.Container(); var sprite = PIXI.Sprite.fromImage('./img/test.png'); var texture=new PIXI.Texture(sprite.texture, new PIXI.Rectangle(24, 0, 24, 48)); var frame=new PIXI.Sprite(texture); frame.position.set(230,264); frame.scale.x=4; frame.scale.y=4; stage.addChild(frame); animate(); function animate() { renderer.render(stage); requestAnimationFrame(animate); } }
  6. I use this image as spritesheet. Second frame is completely empty (transparent). I crop image into frames: frame=new PIXI.Texture(texture.baseTexture, new PIXI.Rectangle(x, y, frame_width, frame_height))); But when I try to draw second frame, I see a garbage from another frames: Looks like pixels from another frames has been used when sprites are resizing. Tell me please, how to fix it?