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

Drawing mouse selection area (rubber band)

$
0
0

Hi,

I'm new in Pixi, and I have a new job 

We are using pixi, unfortunately it is Pixi v3. I have small task to do and I'm doing pretty well with pixi so far, but I have to do something more complex. 

Basically I would like to create selecting area called (as I googled) rubber band. It is the same like you selecting couple of icons on windows desktop but on canvas. I was wondering how to do it. 
I think that the best it would be to create rectangle what resize on mouse move and calculate it by the mouse start and end coordination, it would be not so hard to achieve if user would try to select only from left to right, because that how we draw rectangles in pixi. Am I right? I don't have idea how to do it if user would select from right to left, how to draw this rectangle to looks like "selecting area".

Or maybe I am totally wrong and there is easier solution?

Anyway I would be appreciated of any help.

Best regards

Artur


Viewing all articles
Browse latest Browse all 3978

Trending Articles



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