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

repeat a background in pixi.js

$
0
0

image.thumb.png.8b48a92a53ba7029a86333d048753dbc.png

I have this canvas, I want to repeat this texture down till the end of the canvas, how do I do that?

middle.png.d0283fc2f839f6c20b31fb52c21bc7c5.png

here is my code:

  let middle = new PIXI.Sprite(
    PIXI.Loader.shared.resources[
      folder + 'environment/layers/middle.png'
    ].texture
  );
  middle.position.y = app.screen.height - middle.height;

Viewing all articles
Browse latest Browse all 3978

Trending Articles



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