Release 56.

This commit is contained in:
Daan Vanden Bosch 2020-07-31 21:11:08 +02:00
parent 548ee67eba
commit db1002acff
10 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{463:function(e,t,s){"use strict";function r(e,t){return{success:!0,value:e,problems:null!=t?t:[]}}function i(e){return{success:!1,problems:null!=e?e:[]}}function n(e){if(e.success)return e.value;throw new Error(e.problems.join("\n"))}function l(e){return new o(e)}s.d(t,"c",(function(){return r})),s.d(t,"a",(function(){return i})),s.d(t,"d",(function(){return n})),s.d(t,"b",(function(){return l}));class o{constructor(e){this.logger=e,this.problems=[]}add_problem(e,t,s,r){return this.logger.log(e,s,r),this.problems.push({severity:e,ui_message:t}),this}add_result(e){return this.problems.push(...e.problems),this}success(e){return r(e,this.problems)}failure(){return i(this.problems)}}},521:function(e,t,s){"use strict";s.d(t,"a",(function(){return o})),s.d(t,"b",(function(){return u}));var r=s(463),i=s(23),n=s(27);const l=i.a.get("core/data_formats/parsing/iff");function o(e,t=!1){return a(e,t,[],(e,t,s)=>({type:t,data:e.take(s)}))}function u(e,t=!1){return a(e,t,[],(e,t,s)=>({type:t,size:s}))}function a(e,t,s,i){const o=Object(r.b)(l);let u=!1;for(;e.bytes_left>=8;){const r=e.u32(),l=e.position,a=e.u32();if(a>e.bytes_left){u=!0,t||o.add_problem(0===s.length?n.b.Error:n.b.Warning,"Invalid IFF format.",`Size ${a} was too large (only ${e.bytes_left} bytes left) at position ${l}.`);break}s.push(i(e,r,a))}return u&&0===s.length?o.failure():o.success(s)}},545:function(e,t,s){"use strict";s.d(t,"a",(function(){return u}));var r=s(23),i=s(463),n=s(27);const l=r.a.get("core/data_formats/parsing/afs"),o=5457473;function u(e){const t=Object(i.b)(l);if(e.bytes_left<8)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Too small to be an AFS archive.").failure();if(e.u32()!==o)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Magic bytes not present.").failure();const s=e.u16();e.seek(2);const r=[];for(let i=1;i<=s;i++){if(e.bytes_left<8){t.add_problem(n.b.Warning,`AFS file entry ${i} is invalid.`,`Couldn't read file entry ${i}, only ${e.bytes_left} bytes left.`);break}const s=e.u32(),l=e.u32();if(s>e.size)t.add_problem(n.b.Warning,`AFS file entry ${i} is invalid.`,`Invalid file offset ${s} for entry ${i}.`);else if(s+l>e.size)t.add_problem(n.b.Warning,`AFS file entry ${i} is invalid.`,`File size ${l} (offset: ${s}) of entry ${i} too large.`);else{const t=e.position;e.seek_start(s),r.push(e.array_buffer(l)),e.seek_start(t)}}return t.success(r)}},832:function(e,t,s){"use strict";s.r(t),s.d(t,"TextureController",(function(){return v}));var r=s(140),i=s(40),n=s(498),l=s(539),o=s(467),u=s(455),a=s(545),c=s(23),f=s(14),b=s(630),_=s(463),d=s(27),h=function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function l(e){try{u(r.next(e))}catch(e){n(e)}}function o(e){try{u(r.throw(e))}catch(e){n(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(l,o)}u((r=r.apply(e,t||[])).next())}))};const p=c.a.get("viewer/controllers/TextureController");class v extends r.a{constructor(){super(...arguments),this._textures=Object(f.c)(),this._result_dialog_visible=Object(f.e)(!1),this._result=Object(f.e)(void 0),this._result_problems_message=Object(f.e)(""),this._result_error_message=Object(f.e)(""),this.textures=this._textures,this.result_dialog_visible=this._result_dialog_visible,this.result=this._result,this.result_problems_message=this._result_problems_message,this.result_error_message=this._result_error_message,this.load_file=e=>h(this,void 0,void 0,(function*(){this._result_problems_message.val=`Encountered some problems while opening "${e.name}".`,this._result_error_message.val=`Couldn't open "${e.name}".`;try{const t=Object(i.h)(e.name).toLowerCase(),s=yield Object(n.b)(e),r=new o.a(s,u.a.Little);if("xvm"===t){const e=Object(l.b)(r);this.set_result(e),e.success&&(this._textures.val=e.value.textures)}else if("afs"===t){const e=Object(_.b)(p),t=Object(a.a)(r);if(e.add_result(t),t.success){const s=t.value.flatMap(t=>{var s,r,i,n;const a=new o.a(t,u.a.Little);if(Object(l.a)(a)){const t=Object(l.b)(a);return e.add_result(t),null!==(r=null===(s=t.value)||void 0===s?void 0:s.textures)&&void 0!==r?r:[]}{const t=Object(l.b)(Object(b.a)(a.seek_start(0)));return e.add_result(t),null!==(n=null===(i=t.value)||void 0===i?void 0:i.textures)&&void 0!==n?n:[]}});s.length?this.set_result(e.success(s)):this.set_result(e.failure()),this._textures.val=s}else this.set_result(e.failure())}else p.debug(`Unsupported file extension in filename "${e.name}".`),this.set_result(Object(_.a)([{severity:d.b.Error,ui_message:"Unsupported file type."}]))}catch(e){p.error("Couldn't read file.",e),this.set_result(Object(_.a)())}})),this.dismiss_result_dialog=()=>{this._result_dialog_visible.val=!1}}set_result(e){this._result.val=e,e.problems.length&&(this._result_dialog_visible.val=!0)}}}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{463:function(e,t,s){"use strict";function r(e,t){return{success:!0,value:e,problems:null!=t?t:[]}}function i(e){return{success:!1,problems:null!=e?e:[]}}function n(e){if(e.success)return e.value;throw new Error(e.problems.join("\n"))}function l(e){return new o(e)}s.d(t,"c",(function(){return r})),s.d(t,"a",(function(){return i})),s.d(t,"d",(function(){return n})),s.d(t,"b",(function(){return l}));class o{constructor(e){this.logger=e,this.problems=[]}add_problem(e,t,s,r){return this.logger.log(e,s,r),this.problems.push({severity:e,ui_message:t}),this}add_result(e){return this.problems.push(...e.problems),this}success(e){return r(e,this.problems)}failure(){return i(this.problems)}}},521:function(e,t,s){"use strict";s.d(t,"a",(function(){return o})),s.d(t,"b",(function(){return u}));var r=s(463),i=s(23),n=s(27);const l=i.a.get("core/data_formats/parsing/iff");function o(e,t=!1){return a(e,t,[],(e,t,s)=>({type:t,data:e.take(s)}))}function u(e,t=!1){return a(e,t,[],(e,t,s)=>({type:t,size:s}))}function a(e,t,s,i){const o=Object(r.b)(l);let u=!1;for(;e.bytes_left>=8;){const r=e.u32(),l=e.position,a=e.u32();if(a>e.bytes_left){u=!0,t||o.add_problem(0===s.length?n.b.Error:n.b.Warning,"Invalid IFF format.",`Size ${a} was too large (only ${e.bytes_left} bytes left) at position ${l}.`);break}s.push(i(e,r,a))}return u&&0===s.length?o.failure():o.success(s)}},545:function(e,t,s){"use strict";s.d(t,"a",(function(){return u}));var r=s(23),i=s(463),n=s(27);const l=r.a.get("core/data_formats/parsing/afs"),o=5457473;function u(e){const t=Object(i.b)(l);if(e.bytes_left<8)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Too small to be an AFS archive.").failure();if(e.u32()!==o)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Magic bytes not present.").failure();const s=e.u16();e.seek(2);const r=[];for(let i=1;i<=s;i++){if(e.bytes_left<8){t.add_problem(n.b.Warning,`AFS file entry ${i} is invalid.`,`Couldn't read file entry ${i}, only ${e.bytes_left} bytes left.`);break}const s=e.u32(),l=e.u32();if(s>e.size)t.add_problem(n.b.Warning,`AFS file entry ${i} is invalid.`,`Invalid file offset ${s} for entry ${i}.`);else if(s+l>e.size)t.add_problem(n.b.Warning,`AFS file entry ${i} is invalid.`,`File size ${l} (offset: ${s}) of entry ${i} too large.`);else{const t=e.position;e.seek_start(s),r.push(e.array_buffer(l)),e.seek_start(t)}}return t.success(r)}},832:function(e,t,s){"use strict";s.r(t),s.d(t,"TextureController",(function(){return v}));var r=s(140),i=s(40),n=s(498),l=s(539),o=s(467),u=s(456),a=s(545),c=s(23),f=s(14),b=s(630),_=s(463),d=s(27),h=function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function l(e){try{u(r.next(e))}catch(e){n(e)}}function o(e){try{u(r.throw(e))}catch(e){n(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(l,o)}u((r=r.apply(e,t||[])).next())}))};const p=c.a.get("viewer/controllers/TextureController");class v extends r.a{constructor(){super(...arguments),this._textures=Object(f.c)(),this._result_dialog_visible=Object(f.e)(!1),this._result=Object(f.e)(void 0),this._result_problems_message=Object(f.e)(""),this._result_error_message=Object(f.e)(""),this.textures=this._textures,this.result_dialog_visible=this._result_dialog_visible,this.result=this._result,this.result_problems_message=this._result_problems_message,this.result_error_message=this._result_error_message,this.load_file=e=>h(this,void 0,void 0,(function*(){this._result_problems_message.val=`Encountered some problems while opening "${e.name}".`,this._result_error_message.val=`Couldn't open "${e.name}".`;try{const t=Object(i.h)(e.name).toLowerCase(),s=yield Object(n.b)(e),r=new o.a(s,u.a.Little);if("xvm"===t){const e=Object(l.b)(r);this.set_result(e),e.success&&(this._textures.val=e.value.textures)}else if("afs"===t){const e=Object(_.b)(p),t=Object(a.a)(r);if(e.add_result(t),t.success){const s=t.value.flatMap(t=>{var s,r,i,n;const a=new o.a(t,u.a.Little);if(Object(l.a)(a)){const t=Object(l.b)(a);return e.add_result(t),null!==(r=null===(s=t.value)||void 0===s?void 0:s.textures)&&void 0!==r?r:[]}{const t=Object(l.b)(Object(b.a)(a.seek_start(0)));return e.add_result(t),null!==(n=null===(i=t.value)||void 0===i?void 0:i.textures)&&void 0!==n?n:[]}});s.length?this.set_result(e.success(s)):this.set_result(e.failure()),this._textures.val=s}else this.set_result(e.failure())}else p.debug(`Unsupported file extension in filename "${e.name}".`),this.set_result(Object(_.a)([{severity:d.b.Error,ui_message:"Unsupported file type."}]))}catch(e){p.error("Couldn't read file.",e),this.set_result(Object(_.a)())}})),this.dismiss_result_dialog=()=>{this._result_dialog_visible.val=!1}}set_result(e){this._result.val=e,e.problems.length&&(this._result_dialog_visible.val=!0)}}}}]);

View File

@ -1 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{545:function(e,t,s){"use strict";s.d(t,"a",(function(){return l}));var i=s(23),r=s(463),n=s(27);const o=i.a.get("core/data_formats/parsing/afs"),a=5457473;function l(e){const t=Object(r.b)(o);if(e.bytes_left<8)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Too small to be an AFS archive.").failure();if(e.u32()!==a)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Magic bytes not present.").failure();const s=e.u16();e.seek(2);const i=[];for(let r=1;r<=s;r++){if(e.bytes_left<8){t.add_problem(n.b.Warning,`AFS file entry ${r} is invalid.`,`Couldn't read file entry ${r}, only ${e.bytes_left} bytes left.`);break}const s=e.u32(),o=e.u32();if(s>e.size)t.add_problem(n.b.Warning,`AFS file entry ${r} is invalid.`,`Invalid file offset ${s} for entry ${r}.`);else if(s+o>e.size)t.add_problem(n.b.Warning,`AFS file entry ${r} is invalid.`,`File size ${o} (offset: ${s}) of entry ${r} too large.`);else{const t=e.position;e.seek_start(s),i.push(e.array_buffer(o)),e.seek_start(t)}}return t.success(i)}},828:function(e,t,s){"use strict";s.r(t),s.d(t,"ModelToolBarController",(function(){return p}));var i=s(140),r=s(498),n=s(467),o=s(455),a=s(499),l=s(544),_=s(539),u=s(545),c=s(23),h=s(630),m=s(463),d=s(27),f=s(14),b=function(e,t,s,i){return new(s||(s=Promise))((function(r,n){function o(e){try{l(i.next(e))}catch(e){n(e)}}function a(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};const v=c.a.get("viewer/controllers/model/ModelToolBarController");class p extends i.a{constructor(e){super(),this.store=e,this._result_dialog_visible=Object(f.e)(!1),this._result=Object(f.e)(void 0),this._result_problems_message=Object(f.e)(""),this._result_error_message=Object(f.e)(""),this.result_dialog_visible=this._result_dialog_visible,this.result=this._result,this.result_problems_message=this._result_problems_message,this.result_error_message=this._result_error_message,this.set_show_skeleton=e=>{this.store.set_show_skeleton(e)},this.set_animation_playing=e=>{this.store.set_animation_playing(e)},this.set_animation_frame_rate=e=>{this.store.set_animation_frame_rate(e)},this.set_animation_frame=e=>{this.store.set_animation_frame(e)},this.load_file=e=>b(this,void 0,void 0,(function*(){this._result_problems_message.val=`Encountered some problems while opening "${e.name}".`,this._result_error_message.val=`Couldn't open "${e.name}".`;try{const t=yield Object(r.b)(e),s=new n.a(t,o.a.Little);if(e.name.endsWith(".nj")){const e=Object(a.c)(s);this.set_result(e),e.success&&this.store.set_current_nj_object(e.value[0])}else if(e.name.endsWith(".xj")){const e=Object(a.d)(s);this.set_result(e),e.success&&this.store.set_current_nj_object(e.value[0])}else if(e.name.endsWith(".njm")){this.store.set_current_animation(void 0),this.store.set_current_nj_motion(void 0);const e=this.store.current_nj_object.val;e?(this.set_animation_playing(!0),this.store.set_current_nj_motion(Object(l.c)(s,e.bone_count())),this.set_result(Object(m.c)(void 0))):this.set_result(Object(m.a)([{severity:d.b.Error,ui_message:"No model to animate"}]))}else if(e.name.endsWith(".xvm")){const e=Object(_.b)(s);this.set_result(e),e.success?this.store.set_current_textures(e.value.textures):this.store.set_current_textures([])}else if(e.name.endsWith(".afs")){const e=Object(m.b)(v),t=Object(u.a)(s);if(e.add_result(t),t.success){const s=t.value.flatMap(t=>{var s,i,r,a;const l=new n.a(t,o.a.Little);if(Object(_.a)(l)){const t=Object(_.b)(l);return e.add_result(t),null!==(i=null===(s=t.value)||void 0===s?void 0:s.textures)&&void 0!==i?i:[]}{const t=Object(_.b)(Object(h.a)(l.seek_start(0)));return e.add_result(t),null!==(a=null===(r=t.value)||void 0===r?void 0:r.textures)&&void 0!==a?a:[]}});s.length?this.set_result(e.success(s)):this.set_result(e.failure()),this.store.set_current_textures(s)}else this.set_result(e.failure())}else v.debug(`Unsupported file extension in filename "${e.name}".`),this.set_result(Object(m.a)([{severity:d.b.Error,ui_message:"Unsupported file type."}]))}catch(e){v.error("Couldn't read file.",e),this.set_result(Object(m.a)())}})),this.dismiss_result_dialog=()=>{this._result_dialog_visible.val=!1},this.show_skeleton=e.show_skeleton,this.animation_frame_count=e.animation_frame_count,this.animation_frame_count_label=e.animation_frame_count.map(e=>`/ ${e}`),this.animation_controls_enabled=e.current_nj_motion.map(e=>null!=e),this.animation_playing=e.animation_playing,this.animation_frame_rate=e.animation_frame_rate,this.animation_frame=e.animation_frame.map(e=>Math.round(e))}set_result(e){this._result.val=e,e.problems.length&&(this._result_dialog_visible.val=!0)}}}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{545:function(e,t,s){"use strict";s.d(t,"a",(function(){return l}));var i=s(23),r=s(463),n=s(27);const o=i.a.get("core/data_formats/parsing/afs"),a=5457473;function l(e){const t=Object(r.b)(o);if(e.bytes_left<8)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Too small to be an AFS archive.").failure();if(e.u32()!==a)return t.add_problem(n.b.Error,"AFS archive is corrupted.","Magic bytes not present.").failure();const s=e.u16();e.seek(2);const i=[];for(let r=1;r<=s;r++){if(e.bytes_left<8){t.add_problem(n.b.Warning,`AFS file entry ${r} is invalid.`,`Couldn't read file entry ${r}, only ${e.bytes_left} bytes left.`);break}const s=e.u32(),o=e.u32();if(s>e.size)t.add_problem(n.b.Warning,`AFS file entry ${r} is invalid.`,`Invalid file offset ${s} for entry ${r}.`);else if(s+o>e.size)t.add_problem(n.b.Warning,`AFS file entry ${r} is invalid.`,`File size ${o} (offset: ${s}) of entry ${r} too large.`);else{const t=e.position;e.seek_start(s),i.push(e.array_buffer(o)),e.seek_start(t)}}return t.success(i)}},828:function(e,t,s){"use strict";s.r(t),s.d(t,"ModelToolBarController",(function(){return p}));var i=s(140),r=s(498),n=s(467),o=s(456),a=s(499),l=s(544),_=s(539),u=s(545),c=s(23),h=s(630),m=s(463),d=s(27),f=s(14),b=function(e,t,s,i){return new(s||(s=Promise))((function(r,n){function o(e){try{l(i.next(e))}catch(e){n(e)}}function a(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};const v=c.a.get("viewer/controllers/model/ModelToolBarController");class p extends i.a{constructor(e){super(),this.store=e,this._result_dialog_visible=Object(f.e)(!1),this._result=Object(f.e)(void 0),this._result_problems_message=Object(f.e)(""),this._result_error_message=Object(f.e)(""),this.result_dialog_visible=this._result_dialog_visible,this.result=this._result,this.result_problems_message=this._result_problems_message,this.result_error_message=this._result_error_message,this.set_show_skeleton=e=>{this.store.set_show_skeleton(e)},this.set_animation_playing=e=>{this.store.set_animation_playing(e)},this.set_animation_frame_rate=e=>{this.store.set_animation_frame_rate(e)},this.set_animation_frame=e=>{this.store.set_animation_frame(e)},this.load_file=e=>b(this,void 0,void 0,(function*(){this._result_problems_message.val=`Encountered some problems while opening "${e.name}".`,this._result_error_message.val=`Couldn't open "${e.name}".`;try{const t=yield Object(r.b)(e),s=new n.a(t,o.a.Little);if(e.name.endsWith(".nj")){const e=Object(a.c)(s);this.set_result(e),e.success&&this.store.set_current_nj_object(e.value[0])}else if(e.name.endsWith(".xj")){const e=Object(a.d)(s);this.set_result(e),e.success&&this.store.set_current_nj_object(e.value[0])}else if(e.name.endsWith(".njm")){this.store.set_current_animation(void 0),this.store.set_current_nj_motion(void 0);const e=this.store.current_nj_object.val;e?(this.set_animation_playing(!0),this.store.set_current_nj_motion(Object(l.c)(s,e.bone_count())),this.set_result(Object(m.c)(void 0))):this.set_result(Object(m.a)([{severity:d.b.Error,ui_message:"No model to animate"}]))}else if(e.name.endsWith(".xvm")){const e=Object(_.b)(s);this.set_result(e),e.success?this.store.set_current_textures(e.value.textures):this.store.set_current_textures([])}else if(e.name.endsWith(".afs")){const e=Object(m.b)(v),t=Object(u.a)(s);if(e.add_result(t),t.success){const s=t.value.flatMap(t=>{var s,i,r,a;const l=new n.a(t,o.a.Little);if(Object(_.a)(l)){const t=Object(_.b)(l);return e.add_result(t),null!==(i=null===(s=t.value)||void 0===s?void 0:s.textures)&&void 0!==i?i:[]}{const t=Object(_.b)(Object(h.a)(l.seek_start(0)));return e.add_result(t),null!==(a=null===(r=t.value)||void 0===r?void 0:r.textures)&&void 0!==a?a:[]}});s.length?this.set_result(e.success(s)):this.set_result(e.failure()),this.store.set_current_textures(s)}else this.set_result(e.failure())}else v.debug(`Unsupported file extension in filename "${e.name}".`),this.set_result(Object(m.a)([{severity:d.b.Error,ui_message:"Unsupported file type."}]))}catch(e){v.error("Couldn't read file.",e),this.set_result(Object(m.a)())}})),this.dismiss_result_dialog=()=>{this._result_dialog_visible.val=!1},this.show_skeleton=e.show_skeleton,this.animation_frame_count=e.animation_frame_count,this.animation_frame_count_label=e.animation_frame_count.map(e=>`/ ${e}`),this.animation_controls_enabled=e.current_nj_motion.map(e=>null!=e),this.animation_playing=e.animation_playing,this.animation_frame_rate=e.animation_frame_rate,this.animation_frame=e.animation_frame.map(e=>Math.round(e))}set_result(e){this._result.val=e,e.problems.length&&(this._result_dialog_visible.val=!0)}}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!doctype html><html><head><meta charset="utf-8"><title>Phantasmal World</title><meta name="viewport" content="width=device-width,initial-scale=1"><link href="main.9f40736fb443040e4254.css" rel="stylesheet"></head><body><script src="main.a3201096d47139981eef.js"></script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>Phantasmal World</title><meta name="viewport" content="width=device-width,initial-scale=1"><link href="main.9f40736fb443040e4254.css" rel="stylesheet"></head><body><script src="main.88f1590e825ce5af3b44.js"></script></body></html>

File diff suppressed because one or more lines are too long