pierre75fr Posted June 10, 2020 Share Posted June 10, 2020 Hello, my game project is a little bit similar to this : https://jsfiddle.net/2kznra41/5/ I'm trying to make the screen darker and to remove this darker effect around units, but it is not working and the sight effect is just a black circle i don't understand why, i inspired myself with the lighting example https://pixijs.io/examples/#/plugin-layers/lighting.js Thanks for help. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 10, 2020 Share Posted June 10, 2020 (edited) a few fixes: 1. spr.drawRect(i*32, j*32, 32, 32) 2. app.stage.addChild(lightingSprite) . lightingSprite should cover everything, it should be rendered after all elements of the map, its the resulting texture of all your lights. 3. 0x000000 ? those circles are doing nothing. Even with all the fixes, I dont see the exact problem. Maybe its because its 2:40AM here. Check layer _activeChildren if they were actually dynamically added. Edited June 10, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
pierre75fr Posted June 11, 2020 Author Share Posted June 11, 2020 I fix some point with your comment, but like you said still the same problem https://jsfiddle.net/9Latf2p7/ what you expect with _activeChildren exactly ? i got a empty array on lighting, Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 14, 2020 Share Posted June 14, 2020 it means layers dont work. check if stage.updateSomethingIDontRemember() is called from render method Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 18, 2020 Share Posted June 18, 2020 No one can help on this one? seems like you'll have to wait when i have free time on it. btw, one guy just added simple example for layers: https://pixijs.io/examples/?v=v5.2.4#/plugin-layers/bringToTop.js 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.