Jump to content

Strange things with TilingSprite


trsh
 Share

Recommended Posts

var renderer = PIXI.autoDetectRenderer(800, 600, { antialias: false });
document.body.appendChild(renderer.view);

// create the root of the scene graph
var stage = new PIXI.Container();

var grid = new PIXI.Graphics();

  grid.lineStyle(1, 0xffffff, 1);

  grid.moveTo(0,10);
  grid.lineTo(20,10);

  grid.moveTo(10,0);
  grid.lineTo(10,20);

//grid.cacheAsBitmap = true;

  stage.addChild(grid);

  var tilingSprite = new PIXI.extras.TilingSprite(grid.generateTexture(2), 800, 600);
    
//tilingSprite.cacheAsBitmap = true;

  tilingSprite.x = 0;
  tilingSprite.y = 0;

  stage.addChild(tilingSprite);

animate();

function animate() {

    renderer.render(stage);
    requestAnimationFrame( animate );
}

Drop this into https://pixijs.github.io/examples/

1) How can I eliminate spaces between tiles?

2) Is there some forced antialias? The tiled texture gets blurry and displaced :(

Help, plizz. I tested with both dev4 and 3.0.11

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...