AmbientLightProbe constructor
AmbientLightProbe(
- Color color, [
- double? intensity
color
- (optional) Color value of the RGB component of
the color. Default is Color.fromHex32(0xffffff).
intensity
- (optional) Numeric value of the light's
strength/intensity. Default is 1
.
Creates a new name.
Implementation
AmbientLightProbe(Color color, [double? intensity]):super.create(null,intensity){
final color1 = Color(color.red, color.green, color.blue);
// without extra factor of PI in the shader, would be 2 / math.sqrt( math.pi );
sh!.coefficients[ 0 ].setValues( color1.red, color1.green, color1.blue );
sh!.coefficients[ 0 ].scale( 2 * math.sqrt( math.pi ) );
}