quannm

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. my texture size is 3750/1400 pixel, i resize texture with aspect ratio is window height divide by texture height (1400 pixel ). in PC texture is working correctly with all texture repeat (horizontal repeat ) but on mobile the second texture is pixelated (noise or blurry images), I'm tried splitting texture to small chunks but it still broken. yes, i'm tried keep texture same size but the second texture is still pixelated you can see problem in this video : https://drive.google.com/file/d/1aXjiHQ513VR65lkLDdQVKWvRtFGiJRdc/view?usp=sharing tks for all you help.
  2. tks you so much, now it working correctly. however, i facing new issue on mobile. When i click button prev next, tilingSprite image is pixelate here is issue in my game please click lick to watch my issue. https://drive.google.com/file/d/1aXjiHQ513VR65lkLDdQVKWvRtFGiJRdc/view?usp=sharing image in PC is OK http://prntscr.com/p24huz // Scale mode for all textures, will retain pixelation PIXI.settings.SCALE_MODE.DEFAULT = PIXI.SCALE_MODES.NEAREST; // bg 01 var farTexture = PIXI.Texture.fromImage("images/main.jpg"); // farTexture.scale.x = 1; var s = window.innerWidth, _h = window.innerHeight / 1400; far = new PIXI.extras.TilingSprite(farTexture, window.innerWidth, window.innerHeight); // set backgroud and scale image far.position.x = 0; far.position.y = 0; far.tilePosition.x = 0; far.tilePosition.y = 0; far.tileScale.set(_h,_h); // far.tileScale.y = s; stage.addChild(far);
  3. hello, everyone, this is my issue : i'm use TilingSprite for looping background and i want background aways full height of screen but background can't not resize full height. so i want to know how to resize texture background with full height of screen. this is my code : function init() { stage = new PIXI.Container(); renderer = PIXI.autoDetectRenderer( window.innerWidth, window.innerHeight, { view: document.getElementById("game-canvas") } ); // Scale mode for all textures, will retain pixelation PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; // bg far texture var farTexture = PIXI.Texture.fromImage("images/main01.jpg"); far = new PIXI.extras.TilingSprite(farTexture, window.innerWidth, window.innerHeight); // set backgroud // set position background frame far.position.x = 0; far.position.y = 0; far.tilePosition.x = 0; far.tilePosition.y = 0; stage.addChild(far); requestAnimationFrame(update); } function update() { // far.tilePosition.x -= 0.128; renderer.render(stage); requestAnimationFrame(update); }