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

1x1 texture from drawRect

$
0
0

I want to draw some lines and rects, usual strategy for doing this in other game engines is using a 1x1 texture in a scaled and tinted sprite, but in PixiJS I found a strange problem with this.

Texture from drawRect(0,0,1,1) doesn't work, while drawRect(0,0,2,2) (or 2x1, 1x2, or 2x2 with frame = new Rectangle(0,0,1,1)) works.

https://jsfiddle.net/Dzugaru/84otd4dn/


Viewing all articles
Browse latest Browse all 3978

Trending Articles



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