# LightingEstimationModule

The `LightingEstimation` module encapsulates access to estimations of lighting in the scene.

## Example

```
//==============================================================================
// The following example demonstrates how to bind the frame brightness property
// to the intensity of a light.
//
// Project setup:
// - Insert a plane
// - Add the 'Frame Brightness' capability
// - (Recommended) Remove the directional light
//==============================================================================

// Load in the required modules
const LightingEstimation = require('LightingEstimation');
const Reactive = require('Reactive');
const Scene = require('Scene');

// Locate the ambientLight in the Scene
const ambientLight = Scene.root.find('ambientLight0');

// Calculate light intensity by subtracting the frame brightness from 1, the
// darker the frame brightness, the greater the light intensity
const lightIntensity = Reactive.sub(1,LightingEstimation.frameBrightness);

// Bind the light intensity to the intensity of the ambient light
ambientLight.intensity = lightIntensity;
```

## Properties

| Property          | Description                                                                                                                   |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `frameBrightness` | <p><code>(get) frameBrightness: ScalarSignal</code></p><p>Specifies a number that represents the brightness of the frame.</p> |

## Methods

This module exposes no methods.

## Classes

This module exposes no classes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sparkar-community.gitbook.io/docs/lightingestimationmodule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
