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

Sprite's containsPoint method check alpha

$
0
0

Hello!

`Sprite` support `containsPoint` method, But it just check the point is in the sprite area depend on width and height not by imageData.

For example, if the sprite image is a totally transparent image, `containsPoint` should always return false.

My thought maybe like this

1. extract `imageData` from `app.stage`

2. check the pixel relative to the point is alpha

Any better advise to do this?

Thank you!


Viewing all articles
Browse latest Browse all 3978

Trending Articles



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