MaksTsk Posted June 20, 2015 Share Posted June 20, 2015 Hi to everyone. Pixi.js is amazing and I really want to use it in my project. But I have the following problem: I have next task:1. Background texture is source.jpg2. Also there is another image (depth.png) in memory with region segmentation.3. When user moves mouse on canvas (with source.jpg as background) I want to get connected with mouse position region on depth.png, and select this region on source.jpg.4. As the regions from depth.png are just pixel map I need to render it pixel by pixel.5. To do it I have found next solution:create custom texture like from this: http://www.html5gamedevs.com/topic/667-question-pixel-array-render/render this texture.6. As mouse moves I will have to create another texture, and swap to it. I'm not sure about steps 5-6, especially about performance. Because I will have to put new texture every time as mouse moves. Can somebody help with next two questions:1. Is above solution correct? Would it have good performance?2. May be there is bettor solution. P.s. Right now this task is implemented with canvas 2d context. And it have some performance problem. So I decide to implement it with WebGL, but without any framework it will be huge amount of coding. By this reason I want to use pixi, but I'm not sure that I'm doing it right way. P.p.s. Thanks everybody for help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.