Sidebar.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. import { UITabbedPanel, UISpan } from './libs/ui.js';
  5. import { SidebarScene } from './Sidebar.Scene.js';
  6. import { SidebarProperties } from './Sidebar.Properties.js';
  7. import { SidebarScript } from './Sidebar.Script.js';
  8. import { SidebarAnimation } from './Sidebar.Animation.js';
  9. import { SidebarProject } from './Sidebar.Project.js';
  10. import { SidebarHistory } from './Sidebar.History.js';
  11. import { SidebarSettings } from './Sidebar.Settings.js';
  12. var Sidebar = function ( editor ) {
  13. var strings = editor.strings;
  14. var container = new UITabbedPanel();
  15. container.setId( 'sidebar' );
  16. var scene = new UISpan().add(
  17. new SidebarScene( editor ),
  18. new SidebarProperties( editor ),
  19. new SidebarAnimation( editor ),
  20. new SidebarScript( editor )
  21. );
  22. var project = new SidebarProject( editor );
  23. var settings = new UISpan().add(
  24. new SidebarSettings( editor ),
  25. new SidebarHistory( editor )
  26. );
  27. container.addTab( 'scene', strings.getKey( 'sidebar/scene' ), scene );
  28. container.addTab( 'project', strings.getKey( 'sidebar/project' ), project );
  29. container.addTab( 'settings', strings.getKey( 'sidebar/settings' ), settings );
  30. container.select( 'scene' );
  31. return container;
  32. };
  33. export { Sidebar };