Is there a way to convert geometry into lights

Is there a way to use the emission of a material on an object to make a light?

Via code or any alternative.

The closest I can thinking of us either use skyboxes or something like this https://developer.playcanvas.com/en/tutorials/light-cookies/