> For the complete documentation index, see [llms.txt](https://sparkar-community.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sparkar-community.gitbook.io/docs/lightingestimationmodule.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
