Skip to content

Ambient Light

A scene-wide light that adds uniform color to every surface. No shadows, no direction.

ts
import { Behaviour } from "@relu-interactives/spatial-ecs";

export default class SpawnAmbient extends Behaviour {
  init() {
    const objects = this.world.getObjectManagementSystem();
    objects?.requestCreate("ambientLight", { name: "Fill" });
  }
}

Payload

FieldTypeDefaultDescription
namestring"Ambient Light"Display name.
transformTransformDataidentityPosition has no visual effect (ambient is uniform).
parentIdEntityId | nullnullOptional parent entity.

Default color is #ffffff and intensity is 0.6. To change them after spawn, update the Light component.

Components attached

Transform, Object3DRef, Name, EntityType, ParentId, Selectable, Light.