<commit_before>/**
 * @author aymanhab based on mr. doob
 */

Sidebar.SceneSettings = function (editor) {

    var config = editor.config;
    var signals = editor.signals;

    var backgrounds = {
        'nobackground': 'No Background',
        'sky': 'Sky',
        'desert': 'Desert',
        'city': 'City',
        'dark': 'Dark',
        'mars': 'Mars',
        'pastures': 'Pastures'
    };

    var floorpatterns = {
        'nofloor': 'No Floor',
        'redbricks': 'Red Bricks',
        'graybricks': 'Gray Bricks',
        'wood-floor': 'Wood',
        'tile': 'Tiles'
    };

    var container = new UI.CollapsiblePanel();
    container.setCollapsed(config.getKey('ui/sidebar/scenesettings/collapsed'));
    container.onCollapsedChange(function (boolean) {

        config.setKey('ui/sidebar/scenesettings/collapsed', boolean);

    });

    container.addStatic(new UI.Text('SCENE SETTINGS'));
    container.add(new UI.Break());

    // Background

    var backgroundTypeRow = new UI.Panel();
    var backgroundType = new UI.Select().setOptions(backgrounds).setWidth('150px').onChange(function () {

        var value = this.getValue();


        config.setKey('background', value);

        // change  editor.config
        editor.updateBackground(value);
    });
    backgroundType.setValue('sky');
    backgroundTypeRow.add(new UI.Text('Background').setWidth('90px'));
    backgroundTypeRow.add(backgroundType);

    container.add(backgroundTypeRow);

    // Floor
    var floorTypeRow = new UI.Panel();
    var floorType = new UI.Select().setOptions(floorpatterns).setWidth('150px').onChange(function () {

        var value = this.getValue();


        config.setKey('floor', value);
        // change  editor.config
        editor.updateGroundPlane(value);
    });
    floorType.setValue('redbricks');
    floorTypeRow.add(new UI.Text('Ground').setWidth('90px'));
    floorTypeRow.add(floorType);

    container.add(floorTypeRow);

    // Helper /Debug visuals

    var debugRow = new UI.Panel();
    var debug = new UI.Checkbox(config.getKey('render/debug')).setLeft('100px').onChange(function () {

        config.setKey('render/debug', this.getValue());
        signals.renderDebugChanged.dispatch(this.getValue());
    });

    debugRow.add(new UI.Text('Debug').setWidth('90px'));
    debugRow.add(debug);

    container.add(debugRow);
    // shadow
    /*
        var rendererShadowsSpan = new UI.Span();
        var rendererShadows = new UI.Checkbox( config.getKey( 'project/renderer/shadows' ) ).setLeft( '100px' ).onChange( function () {
    
            config.setKey( 'project/renderer/shadows', this.getValue() );
            updateRenderer();
    
        } );
    
        rendererShadowsSpan.add( rendererShadows );
        rendererShadowsSpan.add( new UI.Text( 'shadows' ).setMarginLeft( '3px' ) );
    
        rendererPropertiesRow.add( rendererShadowsSpan );
    
        container.add( rendererPropertiesRow );
    */
    return container;

};<commit_msg>Debug on by default in UI<commit_after>/**
 * @author aymanhab based on mr. doob
 */

Sidebar.SceneSettings = function (editor) {

    var config = editor.config;
    var signals = editor.signals;

    var backgrounds = {
        'nobackground': 'No Background',
        'sky': 'Sky',
        'desert': 'Desert',
        'city': 'City',
        'dark': 'Dark',
        'mars': 'Mars',
        'pastures': 'Pastures'
    };

    var floorpatterns = {
        'nofloor': 'No Floor',
        'redbricks': 'Red Bricks',
        'graybricks': 'Gray Bricks',
        'wood-floor': 'Wood',
        'tile': 'Tiles'
    };

    var container = new UI.CollapsiblePanel();
    container.setCollapsed(config.getKey('ui/sidebar/scenesettings/collapsed'));
    container.onCollapsedChange(function (boolean) {

        config.setKey('ui/sidebar/scenesettings/collapsed', boolean);

    });

    container.addStatic(new UI.Text('SCENE SETTINGS'));
    container.add(new UI.Break());

    // Background

    var backgroundTypeRow = new UI.Panel();
    var backgroundType = new UI.Select().setOptions(backgrounds).setWidth('150px').onChange(function () {

        var value = this.getValue();


        config.setKey('background', value);

        // change  editor.config
        editor.updateBackground(value);
    });
    backgroundType.setValue('sky');
    backgroundTypeRow.add(new UI.Text('Background').setWidth('90px'));
    backgroundTypeRow.add(backgroundType);

    container.add(backgroundTypeRow);

    // Floor
    var floorTypeRow = new UI.Panel();
    var floorType = new UI.Select().setOptions(floorpatterns).setWidth('150px').onChange(function () {

        var value = this.getValue();


        config.setKey('floor', value);
        // change  editor.config
        editor.updateGroundPlane(value);
    });
    floorType.setValue('redbricks');
    floorTypeRow.add(new UI.Text('Ground').setWidth('90px'));
    floorTypeRow.add(floorType);

    container.add(floorTypeRow);

    // Helper /Debug visuals

    var debugRow = new UI.Panel();
    var debug = new UI.Checkbox(config.getKey('render/debug')).setLeft('100px').onChange(function () {

        config.setKey('render/debug', this.getValue());
        signals.renderDebugChanged.dispatch(this.getValue());
    });
    debug.setValue(true);
    debugRow.add(new UI.Text('Debug').setWidth('90px'));
    debugRow.add(debug);

    container.add(debugRow);
    // shadow
    /*
        var rendererShadowsSpan = new UI.Span();
        var rendererShadows = new UI.Checkbox( config.getKey( 'project/renderer/shadows' ) ).setLeft( '100px' ).onChange( function () {
    
            config.setKey( 'project/renderer/shadows', this.getValue() );
            updateRenderer();
    
        } );
    
        rendererShadowsSpan.add( rendererShadows );
        rendererShadowsSpan.add( new UI.Text( 'shadows' ).setMarginLeft( '3px' ) );
    
        rendererPropertiesRow.add( rendererShadowsSpan );
    
        container.add( rendererPropertiesRow );
    */
    return container;

};
{'fraction_non_alphanumeric': 0.15032354405176704, 'fraction_numerical': 0.006304961008793761, 'mean_word_length': 2.807959570435881, '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': '6626621', 'n_tokens_mistral': 1865, 'n_tokens_neox': 1794, 'n_words': 320}