Menubar.View.js 662 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. import { UIPanel, UIRow } from './libs/ui.js';
  5. var MenubarView = function ( editor ) {
  6. var container = new UIPanel();
  7. container.setClass( 'menu' );
  8. var title = new UIPanel();
  9. title.setClass( 'title' );
  10. title.setTextContent( 'View' );
  11. container.add( title );
  12. var options = new UIPanel();
  13. options.setClass( 'options' );
  14. container.add( options );
  15. // VR mode
  16. var option = new UIRow();
  17. option.setClass( 'option' );
  18. option.setTextContent( 'VR mode' );
  19. option.onClick( function () {
  20. editor.signals.enterVR.dispatch();
  21. } );
  22. options.add( option );
  23. return container;
  24. };
  25. export { MenubarView };