diff --git a/editor/css/main.css b/editor/css/main.css index bf90d18b6c8636..693beac99f1319 100644 --- a/editor/css/main.css +++ b/editor/css/main.css @@ -78,7 +78,6 @@ textarea, input { outline: none; } /* osx */ .TabbedPanel .Tabs .Tab { padding: 10px; - vertical-align: middle; text-transform: uppercase; } @@ -240,7 +239,7 @@ textarea, input { outline: none; } /* osx */ /* */ #outliner .Script:after { - content: '{...}' /* ❮/❯ */ + content: '◎' } /* */ diff --git a/editor/examples/shaders.app.json b/editor/examples/shaders.app.json index 322ec9d988974f..b9ef17457ab563 100755 --- a/editor/examples/shaders.app.json +++ b/editor/examples/shaders.app.json @@ -39,7 +39,7 @@ "uuid": "EA781333-F3AE-470D-9110-A9724FCB42AA", "type": "IcosahedronGeometry", "radius": 1, - "detail": 4 + "detail": 24 }], "materials": [ { diff --git a/editor/js/Menubar.Help.js b/editor/js/Menubar.Help.js index d2faad692a17f0..ef343b1af37417 100644 --- a/editor/js/Menubar.Help.js +++ b/editor/js/Menubar.Help.js @@ -28,6 +28,7 @@ function MenubarHelp( editor ) { } ); options.add( option ); + /* // Icon var option = new UIRow(); @@ -39,6 +40,7 @@ function MenubarHelp( editor ) { } ); options.add( option ); + */ // About diff --git a/editor/js/Sidebar.Project.Renderer.js b/editor/js/Sidebar.Project.Renderer.js index 8d935f94577ecb..af0ac60c464b06 100644 --- a/editor/js/Sidebar.Project.Renderer.js +++ b/editor/js/Sidebar.Project.Renderer.js @@ -20,96 +20,89 @@ function SidebarProjectRenderer( editor ) { // Antialias var antialiasRow = new UIRow(); - var antialiasBoolean = new UIBoolean( config.getKey( 'project/renderer/antialias' ) ).onChange( function () { - - createRenderer(); - - } ); + container.add( antialiasRow ); antialiasRow.add( new UIText( strings.getKey( 'sidebar/project/antialias' ) ).setWidth( '90px' ) ); + + var antialiasBoolean = new UIBoolean( config.getKey( 'project/renderer/antialias' ) ).onChange( createRenderer ); antialiasRow.add( antialiasBoolean ); - container.add( antialiasRow ); + // Physically Correct lights - // Shadows + var physicallyCorrectLightsRow = new UIRow(); + container.add( physicallyCorrectLightsRow ); - var shadowsRow = new UIRow(); - var shadowsBoolean = new UIBoolean( config.getKey( 'project/renderer/shadows' ) ).onChange( function () { + physicallyCorrectLightsRow.add( new UIText( strings.getKey( 'sidebar/project/physicallyCorrectLights' ) ).setWidth( '90px' ) ); - currentRenderer.shadowMap.enabled = this.getValue(); + var physicallyCorrectLightsBoolean = new UIBoolean( config.getKey( 'project/renderer/physicallyCorrectLights' ) ).onChange( function () { + + currentRenderer.physicallyCorrectLights = this.getValue(); signals.rendererUpdated.dispatch(); } ); + physicallyCorrectLightsRow.add( physicallyCorrectLightsBoolean ); + + // Shadows + + var shadowsRow = new UIRow(); + container.add( shadowsRow ); shadowsRow.add( new UIText( strings.getKey( 'sidebar/project/shadows' ) ).setWidth( '90px' ) ); + + var shadowsBoolean = new UIBoolean( config.getKey( 'project/renderer/shadows' ) ).onChange( updateShadows ); shadowsRow.add( shadowsBoolean ); var shadowTypeSelect = new UISelect().setOptions( { 0: 'Basic', 1: 'PCF', - 2: 'PCF (Soft)', + 2: 'PCF Soft', // 3: 'VSM' - } ).setWidth( '125px' ).onChange( function () { - - currentRenderer.shadowMap.type = parseFloat( this.getValue() ); - signals.rendererUpdated.dispatch(); - - } ); + } ).setWidth( '125px' ).onChange( updateShadows ); shadowTypeSelect.setValue( config.getKey( 'project/renderer/shadowType' ) ); - shadowsRow.add( shadowTypeSelect ); - container.add( shadowsRow ); - - // Physically Correct lights + function updateShadows() { - var physicallyCorrectLightsRow = new UIRow(); - var physicallyCorrectLightsBoolean = new UIBoolean( config.getKey( 'project/renderer/physicallyCorrectLights' ) ).onChange( function () { + currentRenderer.shadowMap.enabled = shadowsBoolean.getValue(); + currentRenderer.shadowMap.type = parseFloat( shadowTypeSelect.getValue() ); - currentRenderer.physicallyCorrectLights = this.getValue(); signals.rendererUpdated.dispatch(); - } ); - - physicallyCorrectLightsRow.add( new UIText( strings.getKey( 'sidebar/project/physicallyCorrectLights' ) ).setWidth( '90px' ) ); - physicallyCorrectLightsRow.add( physicallyCorrectLightsBoolean ); - - container.add( physicallyCorrectLightsRow ); + } // Tonemapping var toneMappingRow = new UIRow(); + container.add( toneMappingRow ); + + toneMappingRow.add( new UIText( strings.getKey( 'sidebar/project/toneMapping' ) ).setWidth( '90px' ) ); + var toneMappingSelect = new UISelect().setOptions( { - 0: 'None', + 0: 'No', 1: 'Linear', 2: 'Reinhard', 3: 'Cineon', 4: 'ACESFilmic' - } ).setWidth( '120px' ).onChange( function () { - - currentRenderer.toneMapping = parseFloat( this.getValue() ); - toneMappingExposure.setDisplay( currentRenderer.toneMapping === 0 ? 'none' : '' ); - signals.rendererUpdated.dispatch(); - - } ); + } ).setWidth( '120px' ).onChange( updateToneMapping ); toneMappingSelect.setValue( config.getKey( 'project/renderer/toneMapping' ) ); - - toneMappingRow.add( new UIText( strings.getKey( 'sidebar/project/toneMapping' ) ).setWidth( '90px' ) ); toneMappingRow.add( toneMappingSelect ); var toneMappingExposure = new UINumber( config.getKey( 'project/renderer/toneMappingExposure' ) ); toneMappingExposure.setDisplay( toneMappingSelect.getValue() === '0' ? 'none' : '' ); toneMappingExposure.setWidth( '30px' ).setMarginLeft( '10px' ); toneMappingExposure.setRange( 0, 10 ); - toneMappingExposure.onChange( function () { + toneMappingExposure.onChange( updateToneMapping ); + toneMappingRow.add( toneMappingExposure ); - currentRenderer.toneMappingExposure = this.getValue(); - signals.rendererUpdated.dispatch(); + function updateToneMapping() { - } ); - toneMappingRow.add( toneMappingExposure ); + toneMappingExposure.setDisplay( toneMappingSelect.getValue() === '0' ? 'none' : '' ); - container.add( toneMappingRow ); + currentRenderer.toneMapping = parseFloat( toneMappingSelect.getValue() ); + currentRenderer.toneMappingExposure = toneMappingExposure.getValue(); + signals.rendererUpdated.dispatch(); + + } // @@ -129,24 +122,17 @@ function SidebarProjectRenderer( editor ) { createRenderer(); - // signals + + // Signals signals.editorCleared.add( function () { currentRenderer.physicallyCorrectLights = false; currentRenderer.shadowMap.enabled = true; - currentRenderer.shadowMap.type = 1; - currentRenderer.toneMapping = 0; + currentRenderer.shadowMap.type = THREE.PCFShadowMap; + currentRenderer.toneMapping = THREE.NoToneMapping; currentRenderer.toneMappingExposure = 1; - refreshRendererUI(); - - signals.rendererUpdated.dispatch(); - - } ); - - function refreshRendererUI() { - physicallyCorrectLightsBoolean.setValue( currentRenderer.physicallyCorrectLights ); shadowsBoolean.setValue( currentRenderer.shadowMap.enabled ); shadowTypeSelect.setValue( currentRenderer.shadowMap.type ); @@ -154,7 +140,9 @@ function SidebarProjectRenderer( editor ) { toneMappingExposure.setValue( currentRenderer.toneMappingExposure ); toneMappingExposure.setDisplay( currentRenderer.toneMapping === 0 ? 'none' : '' ); - } + signals.rendererUpdated.dispatch(); + + } ); signals.rendererUpdated.add( function () { diff --git a/editor/js/Sidebar.Scene.js b/editor/js/Sidebar.Scene.js index cbf34c7765705e..8e71b6ea75782b 100644 --- a/editor/js/Sidebar.Scene.js +++ b/editor/js/Sidebar.Scene.js @@ -452,7 +452,7 @@ function SidebarScene( editor ) { if ( ignoreObjectSelectedSignal === true ) return; - if ( object !== null ) { + if ( object !== null && object.parent !== null ) { let needsRefresh = false; let parent = object.parent;