Lens Flare Effect

In this article you will learn how to add a lens flare effect to your scene using PRO Editor. First of all, you will need to open the PRO Editor. You can do this by creating a new project or open an existing one from the dashboard and clicking on the PRO Editor button in the top bar.

In the PRO Editor window click on your scene in the layers field on the right panel.

Click on New button on the script panel.

Set up the name of your script and click Edit to open the code editor.

Paste the following code into the editor:

You can adjust how long the flare will stay on the scene before disappearing by changing the value in this part of code.

In our case the flare will disappear in 5 seconds. You can adjust the size of your lens flare effect by changing these values:

Close the code editor and click File -> Publish to export your scene into JSON file.

Go back to the standard editor, click on the JSON MAE object type on the left panel and upload the file you exported from the PRO Editor.

You will see the flare effect on the scene. Now you can preview it using in the editor or try it out on a mobile device.

Last updated