SpotLight constructor
SpotLight(
- dynamic color, [
- dynamic intensity,
- double? distance,
- dynamic angle,
- dynamic penumbra,
- dynamic decay,
Implementation
SpotLight(color, [intensity, double? distance, angle, penumbra, decay]) : super(color, intensity) {
type = "SpotLight";
position.copy(Object3D.defaultUp);
updateMatrix();
target = Object3D();
// remove default 0 for js 0 is false but for dart 0 is not.
// SpotLightShadow.updateMatrices far value
this.distance = distance;
this.angle = angle ?? Math.pi / 3;
this.penumbra = penumbra ?? 0;
this.decay = decay ?? 1; // for physically correct lights, should be 2.
shadow = SpotLightShadow();
}