提交 e3d6bde9 编写于 作者: M Mr.doob

Editor: Added Menubar.Play.

上级 2cb4c551
......@@ -52,6 +52,7 @@
<script src="js/Menubar.File.js"></script>
<script src="js/Menubar.Edit.js"></script>
<script src="js/Menubar.Add.js"></script>
<script src="js/Menubar.Play.js"></script>
<script src="js/Menubar.View.js"></script>
<script src="js/Menubar.Help.js"></script>
<script src="js/Sidebar.js"></script>
......
......@@ -182,12 +182,10 @@ Menubar.File = function ( editor ) {
} );
options.add( option );
//
/*
options.add( new UI.HorizontalRule() );
/*
// Test
var option = new UI.Panel();
......@@ -202,24 +200,6 @@ Menubar.File = function ( editor ) {
options.add( option );
*/
// Publish
var option = new UI.Panel();
option.setClass( 'option' );
option.setTextContent( 'Publish' );
option.onClick( function () {
var preview = new Player( editor.scene.toJSON() );
preview.setSize( 800, 600 );
preview.play();
var popup = window.open( '', 'preview', 'width=800,height=600' );
popup.document.body.style.margin = 0;
popup.document.body.appendChild( preview.dom );
} );
options.add( option );
//
......
Menubar.Play = function ( editor ) {
var container = new UI.Panel();
container.setClass( 'menu' );
var title = new UI.Panel();
title.setClass( 'title' );
title.setTextContent( 'Play' );
title.onClick( function () {
var player = new Player( editor.scene.toJSON() );
player.setSize( 800, 600 );
player.play();
var popup = window.open( '', 'preview', 'width=800,height=600' );
popup.document.body.style.margin = 0;
popup.document.body.appendChild( player.dom );
} );
container.add( title );
return container;
};
\ No newline at end of file
......@@ -5,6 +5,7 @@ var Menubar = function ( editor ) {
container.add( new Menubar.File( editor ) );
container.add( new Menubar.Edit( editor ) );
container.add( new Menubar.Add( editor ) );
container.add( new Menubar.Play( editor ) );
container.add( new Menubar.View( editor ) );
container.add( new Menubar.Help( editor ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册