InsOp Posted November 26, 2014 Share Posted November 26, 2014 Hey dear PixiJs community,I have this loop:map.mapGridWidth = 54;map.mapGridHeight = 100;game.gridSize = 64;game.gridUI = new PIXI.Graphics()game.gridUI.lineStyle(2,"0x"+colorNameToHex("green"), 0.4)for (var x = 0; x < map.mapGridWidth; x++) { for (var y = 0; y < map.mapGridHeight; y++) { game.gridUI.drawRect ( x * game.gridSize - game.offsetX, y * game.gridSize - game.offsetY , game.gridSize , game.gridSize ) ; }}game.fgContainer.addChild(game.gridUI);With map.mapGridWidth = 54 everything runs smooth, but as soon as I change it to 55 Ill this diagonal line:(the other squares are expected)(note the green diagonal line!)(and suddenly it stops drawing the rest. the diagonal line ends here, but hard tosee with the naked eye) that means that between 5400 and 5500 ill get this bug.perhaps pixijs isnt meant to be used like this and i sure coulddo it more elegant (only draw those lines which are actually in the visible screen).but for the sake of research i want to find out what i can do other than that. btw i need dimensions like map.mapGridWidth = 317map.mapGridHeight = 172and the result atm looks like this so I need a little help here Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.