phantasmal-world/14.297e261fe19911c4a50d.js
Daan Vanden Bosch 4476ed394d Release 40.
2020-01-03 00:41:17 +01:00

1 line
2.7 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{HjM1:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var s=n("39ZU"),i=n("nN8q"),a=(n("4AvX"),n("FXpb"));const o=28;class r extends i.a{constructor(e){super(e),this.element=Object(a.i)({className:"core_TabContainer"}),this.tabs=[],this.bar_element=Object(a.i)({className:"core_TabContainer_Bar"}),this.panes_element=Object(a.i)({className:"core_TabContainer_Panes"}),this.bar_mousedown=e=>{if(e.target instanceof HTMLElement){const t=e.target.dataset.key;t&&this.activate(t)}},this.bar_element.onmousedown=this.bar_mousedown;for(const t of e.tabs){const e=Object(a.r)({className:"core_TabContainer_Tab",data:{key:t.key}},t.title);this.bar_element.append(e);const n=this.disposable(new s.a(t.create_view));this.tabs.push(Object.assign(Object.assign({},t),{tab_element:e,lazy_view:n})),this.panes_element.append(n.element)}this.tabs.length&&this.activate(this.tabs[0].key),this.element.append(this.bar_element,this.panes_element),this.finalize_construction()}resize(e,t){super.resize(e,t),this.bar_element.style.width=`${e}px`,this.bar_element.style.height=`${o}px`;const n=t-o;this.panes_element.style.width=`${e}px`,this.panes_element.style.height=`${n}px`;for(const t of this.tabs)t.lazy_view.resize(e,n);return this}activate(e){for(const t of this.tabs){const n=t.key===e;n?t.tab_element.classList.add("active"):t.tab_element.classList.remove("active"),t.lazy_view.visible.val=n}}}},U6CM:function(e,t,n){"use strict";n.r(t);var s=n("HjM1");class i extends s.a{constructor(e,t){super({class:"viewer_ViewerView",tabs:[{title:"Models",key:"model",create_view:e},{title:"Textures",key:"texture",create_view:t}]}),this.finalize_construction()}}var a=n("Tpfs");n.d(t,"initialize_viewer",(function(){return r}));var o=function(e,t,n,s){return new(n||(n=Promise))((function(i,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function r(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,r)}c((s=s.apply(e,t||[])).next())}))};function r(e,t,s){const r=new a.a;return{view:new i(()=>o(this,void 0,void 0,(function*(){const{Model3DStore:i}=yield n.e(5).then(n.bind(null,"tyuj")),{Model3DView:a}=yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(11)]).then(n.bind(null,"Hdaq")),{CharacterClassAssetLoader:o}=yield n.e(6).then(n.bind(null,"ZV42")),c=new i(r.add(new o(e)));return r.disposed?c.dispose():r.add(c),new a(t,c,s())})),()=>o(this,void 0,void 0,(function*(){const{TextureStore:e}=yield n.e(7).then(n.bind(null,"4/Uj")),{TextureView:i}=yield Promise.all([n.e(0),n.e(1),n.e(9)]).then(n.bind(null,"Za3H")),a=new e;return r.disposed?a.dispose():r.add(a),new i(t,a,s())}))),dispose(){r.dispose()}}}}}]);