Menubar.View.js 590 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. Menubar.View = function ( editor ) {
  5. var container = new UI.Panel();
  6. container.setClass( 'menu' );
  7. var title = new UI.Panel();
  8. title.setClass( 'title' );
  9. title.setTextContent( 'View' );
  10. container.add( title );
  11. var options = new UI.Panel();
  12. options.setClass( 'options' );
  13. container.add( options );
  14. // VR mode
  15. var option = new UI.Row();
  16. option.setClass( 'option' );
  17. option.setTextContent( 'VR mode' );
  18. option.onClick( function () {
  19. editor.signals.enterVR.dispatch();
  20. } );
  21. options.add( option );
  22. return container;
  23. };