mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 15:28:29 +08:00
1 line
1.4 KiB
JavaScript
1 line
1.4 KiB
JavaScript
![]() |
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{KUR2:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("nN8q"),s=r("FXpb");class n extends i.a{constructor(e){super(),this.renderer=e,this.element=Object(s.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,t){return super.resize(e,t),this.renderer.set_size(e,t),this}}},Za3H:function(e,t,r){"use strict";r.r(t),r.d(t,"TextureView",(function(){return h}));var i=r("FXpb"),s=r("6cU9"),n=r("w6HN"),a=r("KUR2"),o=r("zsIO");class h extends o.a{constructor(e,t){super(),this.element=Object(i.h)({className:"viewer_TextureView"}),this.open_file_button=new s.a({icon_left:i.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(t)),this.element.append(this.tool_bar.element,this.renderer_view.element),this.disposables(this.open_file_button.files.observe(({value:t})=>{t.length&&e.load_file(t[0])})),this.finalize_construction()}activate(){this.renderer_view.start_rendering(),super.activate()}deactivate(){super.deactivate(),this.renderer_view.stop_rendering()}resize(e,t){return super.resize(e,t),this.renderer_view.resize(e,Math.max(0,t-this.tool_bar.height)),this}}}}]);
|