<commit_before>/**
 * @author mrdoob / http://mrdoob.com/
 */

Sidebar.Material = function ( editor ) {

	var signals = editor.signals;
	var currentObject;

	var container = new UI.Panel();
	container.setBorderTop( '0' );
	container.setPaddingTop( '20px' );
	
	var copiedMaterial;

	//Copy / Paste/ new material

	var materialCPCRow = new UI.Row();
	materialCPCRow.add( new UI.Text( '' ).setWidth( '90px' ) );
	var materialCPCRenew = new UI.Button( 'New' ).setMarginLeft( '7px' ).onClick( function () {
		var material;
		material = new THREE[ materialClass.getValue() ]();
		editor.execute( new SetMaterialCommand( currentObject, material ), 'New Material: ' + materialClass.getValue() );
		update();
	} );
	var materialCPCRcopy = new UI.Button( 'Copy' ).onClick( function () {
		copiedMaterial = currentObject.material;
		materialCPCRpaste.dom.disabled = false;
	} );
	var materialCPCRpaste = new UI.Button( 'Paste' ).setMarginLeft( '7px' ).onClick( function () {
		if(copiedMaterial)editor.execute( new SetMaterialCommand( currentObject, copiedMaterial ), 'Pasted Material: ' + materialClass.getValue() );
		refreshUI();
		update();
	} );
	materialCPCRpaste.dom.disabled = true;
	materialCPCRow.add( materialCPCRcopy );
	materialCPCRow.add( materialCPCRpaste );
	materialCPCRow.add( materialCPCRenew );

	container.add( materialCPCRow );	
	
	// type

	var materialClassRow = new UI.Row();
	var materialClass = new UI.Select().setOptions( {

		'LineBasicMaterial': 'LineBasicMaterial',
		'LineDashedMaterial': 'LineDashedMaterial',
		'MeshBasicMaterial': 'MeshBasicMaterial',<commit_msg>Clean up.<commit_after>/**
 * @author mrdoob / http://mrdoob.com/
 */

Sidebar.Material = function ( editor ) {

	var signals = editor.signals;
	var currentObject;

	var container = new UI.Panel();
	container.setBorderTop( '0' );
	container.setPaddingTop( '20px' );

	// New / Copy / Paste

	var copiedMaterial;
	var managerRow = new UI.Row();

	managerRow.add( new UI.Text( '' ).setWidth( '90px' ) );
	managerRow.add( new UI.Button( 'New' ).onClick( function () {

		var material = new THREE[ materialClass.getValue() ]();
		editor.execute( new SetMaterialCommand( currentObject, material ), 'New Material: ' + materialClass.getValue() );
		update();

	} ) );

	managerRow.add( new UI.Button( 'Copy' ).onClick( function () {

		copiedMaterial = currentObject.material;

	} ) );

	managerRow.add( new UI.Button( 'Paste' ).onClick( function () {

		if ( copiedMaterial === undefined ) return;

		editor.execute( new SetMaterialCommand( currentObject, copiedMaterial ), 'Pasted Material: ' + materialClass.getValue() );
		refreshUI();
		update();

	} ) );

	container.add( managerRow );


	// type

	var materialClassRow = new UI.Row();
	var materialClass = new UI.Select().setOptions( {

		'LineBasicMaterial': 'LineBasicMaterial',
		'LineDashedMaterial': 'LineDashedMaterial',
		'MeshBasicMaterial': 'MeshBasicMaterial',
{'fraction_non_alphanumeric': 0.1499312242090784, 'fraction_numerical': 0.0041265474552957355, 'mean_word_length': 4.47834274952919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1051282', 'n_tokens_mistral': 976, 'n_tokens_neox': 914, 'n_words': 213}