RectAreaLightHelper constructor
RectAreaLightHelper(
- dynamic light,
- dynamic color
Implementation
factory RectAreaLightHelper( light, color ) {
List<double> positions = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, - 1, 0, 1, 1, 0 ];
var geometry = new BufferGeometry();
geometry.setAttribute( 'position', new Float32BufferAttribute( Float32Array.fromList(positions), 3 ) );
geometry.computeBoundingSphere();
var material = new LineBasicMaterial( { 'fog': false } );
final instance = RectAreaLightHelper.create( geometry, material );
instance.light = light;
instance.color = color; // optional hardwired color for the helper
instance.type = 'RectAreaLightHelper';
//
List<double> positions2 = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ];
var geometry2 = new BufferGeometry();
geometry2.setAttribute( 'position', new Float32BufferAttribute( Float32Array.fromList(positions2), 3 ) );
geometry2.computeBoundingSphere();
instance.add( new Mesh( geometry2, new MeshBasicMaterial( { 'side': BackSide, 'fog': false } ) ) );
return instance;
}