phantasmal-world/10.176f577f4f36871f1995.js

1 line
1.6 KiB
JavaScript
Raw Normal View History

2020-01-17 05:50:19 +08:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{KUR2:function(e,s,t){"use strict";t.d(s,"a",(function(){return n}));var r=t("nN8q"),i=t("FXpb");class n extends r.a{constructor(e){super(),this.renderer=e,this.element=Object(i.h)({className:"core_RendererWidget"}),this.children=[],this.element.append(e.canvas_element),this.disposable(e),this.finalize_construction()}start_rendering(){this.renderer.start_rendering()}stop_rendering(){this.renderer.stop_rendering()}resize(e,s){return super.resize(e,s),this.renderer.set_size(e,s),this}}},Za3H:function(e,s,t){"use strict";t.r(s),t.d(s,"TextureView",(function(){return d}));var r=t("FXpb"),i=t("6cU9"),n=t("w6HN"),a=t("KUR2"),o=t("zsIO"),l=t("68q7");class d extends o.a{constructor(e,s){super(),this.element=Object(r.h)({className:"viewer_TextureView"}),this.open_file_button=new i.a({icon_left:r.a.File,text:"Open file...",accept:".afs, .xvm"}),this.tool_bar=this.add(new n.a(this.open_file_button)),this.renderer_view=this.add(new a.a(s)),this.element.append(this.tool_bar.element,this.renderer_view.element);const t=this.disposable(new l.a({visible:e.result_dialog_visible,result:e.result,problems_message:e.result_problems_message,error_message:e.result_error_message}));this.disposables(this.open_file_button.files.observe(({value:s})=>{s.length&&e.load_file(s[0])}),t.ondismiss.observe(e.dismiss_result_dialog)),this.finalize_construction()}activate(){this.renderer_view.start_rendering(),super.activate()}deactivate(){super.deactivate(),this.renderer_view.stop_rendering()}resize(e,s){return super.resize(e,s),this.renderer_view.resize(e,Math.max(0,s-this.tool_bar.height)),this}}}}]);