Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Pixijs increase image size

$
0
0

Hi, i have a problem with pixijs about images

i've created a normal app

const app = new PIXI.Application({
    width: 1920,
    height: 1080,
    antialias: true,
    resolution: 1,
    transparent: false
});

i'm loading spritesheet and every image is : "sourceSize": {"w":209,"h":195}

after that with a simple for i start to show symbols

 

for (let j = 0; j < 5; j++) {
            const symbol = new PIXI.Sprite(slotTextures[Math.floor(Math.random() * slotTextures.length)]);
           
            symbol.anchor.set(0,0);
            console.log(symbol.width);
            console.log(symbol.height);
            reel.symbols.push(symbol);
            rc.addChild(symbol);
        }
        reels.push(reel);

but every symbols change size to

298.5714285714286
296 278.5714285714286

How is possible?

How can i take the right dimension?

 

Thanks

 

Riccardo


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>