2019-08-20 04:56:40 +08:00
|
|
|
import { TabContainer } from "../../core/gui/TabContainer";
|
2019-12-22 02:40:42 +08:00
|
|
|
import { Model3DView } from "./model_3d/Model3DView";
|
|
|
|
import { TextureView } from "./TextureView";
|
2019-08-20 04:56:40 +08:00
|
|
|
|
2019-08-29 03:36:45 +08:00
|
|
|
export class ViewerView extends TabContainer {
|
2019-12-22 02:40:42 +08:00
|
|
|
constructor(
|
|
|
|
create_model_3d_view: () => Promise<Model3DView>,
|
|
|
|
create_texture_view: () => Promise<TextureView>,
|
|
|
|
) {
|
2019-09-11 21:51:56 +08:00
|
|
|
super({
|
|
|
|
class: "viewer_ViewerView",
|
|
|
|
tabs: [
|
|
|
|
{
|
|
|
|
title: "Models",
|
|
|
|
key: "model",
|
2019-12-22 02:40:42 +08:00
|
|
|
create_view: create_model_3d_view,
|
2019-08-29 03:36:45 +08:00
|
|
|
},
|
2019-09-11 21:51:56 +08:00
|
|
|
{
|
|
|
|
title: "Textures",
|
|
|
|
key: "texture",
|
2019-12-22 02:40:42 +08:00
|
|
|
create_view: create_texture_view,
|
2019-08-29 03:36:45 +08:00
|
|
|
},
|
2019-09-11 21:51:56 +08:00
|
|
|
],
|
|
|
|
});
|
2019-09-14 21:20:36 +08:00
|
|
|
|
2019-12-20 01:54:01 +08:00
|
|
|
this.finalize_construction();
|
2019-08-20 04:56:40 +08:00
|
|
|
}
|
|
|
|
}
|