Skip to content
Shapemetry

@huukhanhnguyen/model / nodeMethods/light

nodeMethods/light

light()

light(shape, position, direction, lumens, kelvin?, color?, size?, size2?, coneAngle?, penumbra?, ies?, target?, gizmoSize?): LightEntity

One light document.

Fails loud on a flux, a shape or a cone it cannot use, rather than lighting the scene with a believable wrong number. An omitted optional number arrives as 0 (a data step's args coerce through nodeMethods/parameter.ts); that reads as "not authored" for kelvin, coneAngle, penumbra and gizmoSize because 0 is not a value any of them can HAVE — a 0 K colour has no temperature, a 0° cone emits nothing, a 0 penumbra is already what a cone without one does, and a 0-size gizmo draws nothing.

Aim is authored EITHER way: direction states the axis outright, or target names the point the emitter looks at and the axis is derived from it. target is what a viewport gizmo's drag handle moves, so it wins where both are given (types' objects/light.ts — a light stores a target where a camera cannot, because a light's aim carries no roll).

Parameters

shape

string

position

Point

direction

Vector | undefined

lumens

number

kelvin?

number

color?

string

size?

number

size2?

number

coneAngle?

number

penumbra?

number

ies?

string

target?

Point

gizmoSize?

number

Returns

LightEntity

Last updated: 📖 1 min readEdit on GitHub