Skip to content

LensFlareEffectDesc

The LensFlareEffectDesc class is a Descriptor that generates the lens flare effect. It simulates the effect of light from the sun or moon reflecting off the camera lens.

Type: boolean | undefined

Description: Controls the visibility of the effect descriptor.

Default: true

Type: number | undefined

Description: Specifies the intensity of the lens flare effect.

Default: 0.005

Example:

{
lensFlare: {
intensity: 1.5,
}
}
import ThreeView from "@navaramap/three";
import { DefaultPlugin } from "@navaramap/three_default_plugin";
const view = new ThreeView();
const plugin = new DefaultPlugin();
view.addPlugin(plugin);
await view.init();
// Add default photorealistic objects (includes LensFlareEffectDesc)
const defaultLayers = plugin.addDefaultPhotorealScene();
// Enable lens flare and set its intensity
defaultLayers.lensFlare.update({
visible: true,
lensFlare: {
intensity: 0.005,
},
});