lights icon indicating copy to clipboard operation
lights copied to clipboard

Ambient light seems to come from the bottom right?

Open jazzyjeff5 opened this issue 7 years ago • 2 comments

It seems that when I use a bright ambient light, the light is actually coming from the bottom right of the screen. I'm doing some funny translation of the stage to make (0,0) the bottom left, perhaps this is why?

How do I change the position of the ambient light? I've looked at the indices and vertices arrays but I don't see how what's in them relates to on screen co-ordinates.

Maybe I'm misunderstanding ambient light? All I'm looking for is a way to lighten the whole scene evenly so it's not totally black without any other lights.

Thanks for all the help and for the engine!

jazzyjeff5 avatar Oct 27 '18 10:10 jazzyjeff5

you need a DirectionalLight to your stage. https://github.com/djmisterjon/PIXI.ProStageEditor/blob/d9e05aa1a1a7b943a2d1b4562fc062bbc8be079d/js/plugins/core_ContainerData.js#L374

jonlepage avatar Oct 27 '18 20:10 jonlepage

I think a new PR was made that fixed this

U don't need directional light tho

Dai696 avatar Dec 05 '18 02:12 Dai696