Comments (4)
@ivanpopelyshev If you queried the pixels directly from the shader, but you could also look at the png file after transforming your point with the matrix from the texture, or cache the bitmap data, or any number of things. I guess I'll be writing that. :/
Most applications need some at least some alpha testing, even for just buttons, and almost all games require it. I'd say this hardly usable without it.
from pixi-haxe.
Oh, we didnt close this? OK, here's answer for v5: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#pixel-perfect-interaction
from pixi-haxe.
WebGL + pixel perfect collision will be very slow thing. I dont think that any GL engine can support it.
from pixi-haxe.
if I recall correctly, you can generate a bitmap array this way :
`var lModel : Container = "insert your display object reference"
var lCanvas : CanvasRenderer = new CanvasRenderer( lModel.width, lModel.height, { transparent: true});
lCanvas.render( lModel);
var lImageData : ImageData = lCanvas.context.getImageData( 0, 0, lModel.width, lModel.height);`
And so on, you can work on the ImageData instance. This worked for me at pixi 4.0.2, I hope it still works :) You may generate your bitmap datas before you use them, as I believe it's a bit expensive to generate them at the fly ...
from pixi-haxe.
Related Issues (20)
- BlendMode / BlendModes HOT 2
- ScaleMode error HOT 1
- ScaleModes 2
- Perf Stat
- Particles aren't up to date HOT 5
- Erroneous specification for InteractionData::identifier ? HOT 1
- Eh,why don't have resouces in samples directory? HOT 1
- Settings Type Mismatch HOT 11
- No more Point::clone ? HOT 8
- Issue in Pixi Spine TextureRegion HOT 2
- Somber news HOT 9
- TextMetrics width/height properties HOT 1
- Type not found : pixi.plugins.app.Application HOT 2
- Compiling with Haxe 4 RC 3 show warnings HOT 1
- pixijs 5 HOT 20
- Release a new haxelib version before moving to Pixi 5? HOT 5
- pixi-projection plugin externs HOT 2
- Runtime errors for compiled examples HOT 1
- Loader deprecated
- Examples & Lib folder need to be updated for pixi 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixi-haxe.