Skip to content

Area Light

A rectangular area light (THREE.RectAreaLight). Great for soft "softbox" lighting. Only MeshStandardMaterial and MeshPhysicalMaterial are affected.

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

export default class SpawnSoftbox extends Behaviour {
  init() {
    const objects = this.world.getObjectManagementSystem();
    objects?.requestCreate("areaLight", {
      name: "Softbox",
      transform: { position: { x: 0, y: 4, z: 0 } },
    });
  }
}

Payload

FieldTypeDefaultDescription
namestring"Area Light"Display name.
transform.position{ x, y, z }(0, 4, 0)Light position. The light initially looks at the world origin.
transform.rotation / scaleidentityStandard transform fields.
parentIdEntityId | nullnullOptional parent entity.

Default color #ffffff, intensity 5, dimensions 4 × 4.

Components attached

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