mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
26 lines
589 B
JavaScript
26 lines
589 B
JavaScript
import UI from '../ui/UI';
|
|
|
|
/**
|
|
* 场景编辑区
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author tengge / https://github.com/tengge1
|
|
*/
|
|
function Viewport(options) {
|
|
UI.Control.call(this, options);
|
|
this.app = options.app;
|
|
};
|
|
|
|
Viewport.prototype = Object.create(UI.Control.prototype);
|
|
Viewport.prototype.constructor = Viewport;
|
|
|
|
Viewport.prototype.render = function () {
|
|
this.container = UI.create({
|
|
xtype: 'div',
|
|
id: 'viewport',
|
|
parent: this.app.container,
|
|
cls: 'viewport'
|
|
});
|
|
this.container.render();
|
|
};
|
|
|
|
export default Viewport; |