CSMHelper constructor
CSMHelper(
- CSM csm
Implementation
CSMHelper(this.csm ):super() {
final indices = Uint16List.fromList( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );
final positions = Float32List( 24 );
final frustumGeometry = BufferGeometry();
frustumGeometry.setIndex( Uint16BufferAttribute.fromList( indices, 1 ) );
frustumGeometry.setAttributeFromString( 'position', Float32BufferAttribute.fromList( positions, 3, false ) );
final frustumLines = LineSegments( frustumGeometry, LineBasicMaterial() );
add( frustumLines );
this.frustumLines = frustumLines;
}