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

PIXI.WRAP_MODES.REPEAT not working?

$
0
0

Hello, I'm asking because I'm not sure of my understanding  the  PIXI.basetexture WRAP_MODES:

For example:  given one container, one texture (loaded with loader) and one smaller sprite, defining PIXI.WRAP_MODES.REPEAT should fill the whole container, but it doesn't.

The following code shows a sprite inbetween the container without repeating, what I'm doing wrong ? see WRAPMODE_TEST_HERE

Thanks in advance

PS: using PIXI 4.5.5

loader.load((loader, ressources) => {
    var texture = ressources.rgba.texture;
    texture.baseTexture.wrapMode = PIXI.WRAP_MODES.REPEAT;
    var sprite = new PIXI.Sprite(texture);
    sprite.width = 312
    sprite.height = 312
    stage.addChild(sprite);
...
})

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



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