three-light.component overview
Table of contents
utils
ThreeLightComponent (class)
three.js implementation of ILight3dComponent. nativeLight is the underlying THREE.Light.
Directional and spot lights get their target as a child placed one unit along local -Z, so
they shine wherever the component's rotation points them (three.js otherwise aims them at a
separate target object sitting at the world origin). A hemisphere light takes its sky direction
from its own position in three.js, so for that type the position setter is ignored and the
native position is kept at the rotated +Z unit vector instead.
Signature
export declare class ThreeLightComponent {
constructor(public readonly nativeLight: Light, descriptor: Light3dDescriptor)
}
create (static method)
Signature
static create(descriptor: Light3dDescriptor): ThreeLightComponent
applyShadowOpts (static method)
Signature
private static applyShadowOpts(shadow: LightShadow, opts: Light3dShadowOpts): void
clone (method)
Signature
clone(): ThreeLightComponent
dispose (method)
Signature
dispose(): void
lightType (property)
Signature
readonly lightType: "AMBIENT" | "HEMISPHERE" | "DIRECTIONAL" | "POINT" | "SPOT"