updateMatrixWorld method
void
updateMatrixWorld(
[ - bool force = false
])
override
Implementation
void updateMatrixWorld([bool force = false]) {
this.scale.set( 0.5 * this.light.width!, 0.5 * this.light.height!, 1 );
if ( this.color != null ) {
this.material.color.set( this.color );
this.children[ 0 ].material.color.set( this.color );
} else {
this.material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
// prevent hue shift
var c = this.material.color;
var max = Math.max3( c.r, c.g, c.b );
if ( max > 1 ) c.multiplyScalar( 1 / max );
this.children[ 0 ].material.color.copy( this.material.color );
}
// ignore world scale on light
this.matrixWorld.extractRotation( this.light.matrixWorld ).scale( this.scale ).copyPosition( this.light.matrixWorld );
this.children[ 0 ].matrixWorld.copy( this.matrixWorld );
}