diff --git a/Assets/plugins/dev/converter.js b/Assets/plugins/dev/converter.js index ccd0bc2c..87af84e1 100644 --- a/Assets/plugins/dev/converter.js +++ b/Assets/plugins/dev/converter.js @@ -41,7 +41,7 @@ plugin.drawUI = function(ui) { let v = core.ReflectField(d, n); if (core.StdIs(v, Array)) { if (core.StdIs(v[0], Number)) { - arm.Log.trace(n); + console.log(n); let ar = null; if (v[0] === 0) ar = new Float32Array(v.length - 1); else if (v[0] === 1) ar = new Uint32Array(v.length - 1); diff --git a/Assets/plugins/hello_world.js b/Assets/plugins/hello_world.js index 966b8dfb..9ac06309 100644 --- a/Assets/plugins/hello_world.js +++ b/Assets/plugins/hello_world.js @@ -14,7 +14,7 @@ plugin.drawUI = function(ui) { ui.text("Label"); ui.textInput(h7, "Text Input"); if (ui.button("Button")) { - arm.Log.error("Hello"); + console.error("Hello"); } ui.row([1/2, 1/2]); ui.button("Button A"); diff --git a/Assets/plugins/import_tiff.js b/Assets/plugins/import_tiff.js index eea53784..6f79a241 100644 --- a/Assets/plugins/import_tiff.js +++ b/Assets/plugins/import_tiff.js @@ -1,7 +1,7 @@ // Fast and advanced TIFF decoder by photopea // https://github.com/photopea/UTIF.js -var UTIF={},pako=null;function log(){arm.Log.trace(arguments)}!function(x,A){function r(r,e){this.message=r,this.g=e}function e(r){this.message="JPEG error: "+r}function t(){this.M=null,this.B=-1}function U(r,e){for(var t,i,n=0,a=[],o=16;0>--I&1;if(255===(A=t[i++])){var r=t[i++];if(r){if(220===r&&E){i+=2;var e=t[i++]<<8|t[i++];if(0>>(I=7)}function u(r){for(;;){if("number"==typeof(r=r[d()]))return r;if("object"!==(void 0===r?"undefined":L(r)))throw new C("invalid huffman sequence")}}function l(r){for(var e=0;0>=4,0==n){if(i<15){B=l(i)+(1<>=4,0===t)M=n<15?(B=l(n)+(1<>=4,0==n){if(i<15)break;t+=16}else t+=i,r.a[e+J[t]]=c(n),t++}},F=0,G=1===k?r[0].c*r[0].l:y*n.O;F>10,s[u]=l,s[u+1]=l,s[u+2]=l,s[u+3]=l,s[u+4]=l,s[u+5]=l,s[u+6]=l,s[u+7]=l;else{c*=h[u+1],v*=h[u+2],g*=h[u+3],_*=h[u+4],w*=h[u+5];var m=5793*l+128>>8,E=5793*_+128>>8,y=v,U=b*=h[u+6];E=(m=m+E+1>>1)-E,l=3784*y+1567*U+128>>8,y=1567*y-3784*U+128>>8,w=(_=(_=2896*(c-(p*=h[u+7]))+128>>8)+(w<<=4)+1>>1)-w,g=(p=(p=2896*(c+p)+128>>8)+(g<<=4)+1>>1)-g,U=(m=m+(U=l)+1>>1)-U,y=(E=E+y+1>>1)-y,l=2276*_+3406*p+2048>>12,_=3406*_-2276*p+2048>>12,p=l,l=799*g+4017*w+2048>>12,g=4017*g-799*w+2048>>12,w=l,s[u]=m+p,s[u+7]=m-p,s[u+1]=E+w,s[u+6]=E-w,s[u+2]=y+g,s[u+5]=y-g,s[u+3]=U+_,s[u+4]=U-_}}for(h=0;h<8;++h)l=s[h],0==((c=s[h+8])|(v=s[h+16])|(g=s[h+24])|(_=s[h+32])|(w=s[h+40])|(b=s[h+48])|(p=s[h+56]))?(l=(l=5793*l+8192>>14)<-2040?0:2024<=l?255:l+2056>>4,d[f+h]=l,d[f+h+8]=l,d[f+h+16]=l,d[f+h+24]=l,d[f+h+32]=l,d[f+h+40]=l,d[f+h+48]=l,d[f+h+56]=l):(m=5793*l+2048>>12,E=5793*_+2048>>12,l=3784*(y=v)+1567*(U=b)+2048>>12,y=1567*y-3784*U+2048>>12,U=l,w=(_=(_=2896*(c-p)+2048>>12)+w+1>>1)-w,g=(p=(p=2896*(c+p)+2048>>12)+g+1>>1)-g,l=2276*_+3406*p+2048>>12,_=3406*_-2276*p+2048>>12,p=l,l=799*g+4017*w+2048>>12,g=4017*g-799*w+2048>>12,c=(E=(E=(m=4112+(m+E+1>>1))-E)+y+1>>1)+(w=l),b=E-w,w=(y=E-y)-g,l=(l=(m=m+U+1>>1)+p)<16?0:4080<=l?255:l>>4,c=c<16?0:4080<=c?255:c>>4,v=(v=y+g)<16?0:4080<=v?255:v>>4,g=(g=(U=m-U)+_)<16?0:4080<=g?255:g>>4,_=(_=U-_)<16?0:4080<=_?255:_>>4,w=w<16?0:4080<=w?255:w>>4,b=b<16?0:4080<=b?255:b>>4,p=(p=m-p)<16?0:4080<=p?255:p>>4,d[f+h]=l,d[f+h+8]=c,d[f+h+16]=v,d[f+h+24]=g,d[f+h+32]=_,d[f+h+40]=w,d[f+h+48]=b,d[f+h+56]=p)}return e.a}function P(r,e,t){var i=2=n)return null;o=r[i]<<8|r[i+1]}return{f:a.toString(16),F:o,offset:i}}var J,L,C,O,m;function E(r,e,t,i,n){for(var a=0;a>4)for(c=0;c<64;c++)_[v=J[c]]=e[a++];else{if(1!=g>>4)throw new C("DQT - invalid table spec");for(c=0;c<64;c++)_[v=J[c]]=r()}i[15&g]=_}break;case 65472:case 65473:case 65474:if(w)throw new C("Only single frame JPEGs supported");r();var w={};for(w.X=65473===l,w.S=65474===l,w.precision=e[a++],l=r(),w.g=n||l,w.v=r(),w.b=[],w.C={},c=e[a++],l=_=g=0;l>4,p=15&e[a+1];g>4?u:d)[15&g]=U(_,p)}break;case 65501:r();var m=r();break;case 65498:for(c=1==++f&&!n,r(),g=e[a++],v=[],l=0;l>4],E.o=d[15&_],v.push(E)}l=e[a++],g=e[a++],_=e[a++];try{var y=I(e,a,w,v,m,l,g,_>>4,15&_,c);a+=y}catch(r){if(r instanceof O)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(e,{N:r.g});throw r}break;case 65500:a+=4;break;case 65535:255!==e[a]&&a--;break;default:if(255===e[a-3]&&192<=e[a-2]&&e[a-2]<=254)a-=3;else{if(!(c=P(e,a-2))||!c.f)throw new C("unknown marker "+l.toString(16));(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+c.f),a=c.offset}}l=r()}for(this.width=w.v,this.height=w.g,this.A=o,this.b=[],l=0;l>8)+a[n+1];return s},w:function(){return this.A?!!this.A.W:3===this.i?0!==this.B:1===this.B},I:function(r){for(var e,t,i,n=0,a=r.length;n>>3)]),null==d&&(d=e.t325);var u=new Uint8Array(e.height*(s>>>3)),l=0;if(null!=e.t322){for(var c=e.t322[0],v=e.t323[0],g=Math.floor((e.width+c-1)/c),_=Math.floor((e.height+v-1)/v),w=new Uint8Array(0|Math.ceil(c*v*a/8)),b=0;b<_;b++)for(var p=0;p>>3,_=r.t278?r.t278[0]:r.height,w=Math.ceil(c*v*r.width/8);if(16==c&&!r.isLE&&null==r.t33422)for(var b=0;b<_;b++)for(var p=f+b*w,m=1;m>>8&255}else if(3==v)for(h=3;h>>11,c=15&d>>>22,v=15&d>>>26,g=0;g<4&&128<>3))>>>(7&_)&127)<>>4,n[a+E+1]=y<<4|A>>>4,n[a+E+2]=A<<4|U>>>4}else{f+=8;var I,B,M,k=[t,0,0,0],D=new Uint16Array(32770),F=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],G=0,N=x.decode._ljpeg_diff;for(D[0]=15,I=E=0;E<18;E++)for(var S=32768>>>(F[E]>>>8),P=0;P>>4),0)<<1)<>>1)&1<>>3;r[i]|=t>>>16,r[1+i]|=t>>>8,r[2+i]|=t},x.decode._getbithuff=function(r,e,t,i){x.decode._get_byte;var n,a=e[0],o=e[1],f=e[2],s=e[3];if(0==t||f<0)return 0;for(;!s&&f>>32-t,i?(f-=i[n+1]>>>8,n=255&i[n+1]):f-=t,f<0)throw"e";return e[0]=a,e[1]=o,e[2]=f,e[3]=s,n},x.decode._make_decoder=function(r){var e,t,i,n,a,o=[];for(e=16;0!=e&&!r[e];e--);var f=17;for(o[0]=e,i=t=1;t<=e;t++)for(n=0;n>>8;else for(d=0;d>>8,n[a+(d<<1)+1]=255&v[d];else{if(14!=c&&12!=c)throw new Error("unsupported bit depth "+c);var _=16-c;for(d=0;d offset to first strip or tile");if(null==n){var y=0,U=[];U[y++]=255,U[y++]=216;var A=r.t519;if(null==A)throw new Error("JPEGQTables tag is missing");for(o=0;o>>8,U[y++]=255&B,U[y++]=o|s<<4,f=0;f<16;f++)U[y++]=e[t+I[o]+f];for(f=0;f>>8&255,U[y++]=255&r.height,U[y++]=r.width>>>8&255,U[y++]=255&r.width,1==(U[y++]=m))U[y++]=1,U[y++]=17,U[y++]=0;else for(o=0;o<3;o++)U[y++]=o+1,U[y++]=0!=o?17:(15&b)<<4|15&p,U[y++]=o;null!=E&&0!=E[0]&&(U[y++]=255,U[y++]=221,U[y++]=0,U[y++]=4,U[y++]=E[0]>>>8&255,U[y++]=255&E[0]),n=new Uint8Array(U)}var M=-1;for(o=0;o>>8&255,n[D++]=255&r.height,n[D++]=r.width>>>8&255,n[D++]=255&r.width,1==(n[D++]=m))n[D++]=1,n[D++]=17,n[D++]=0;else for(o=0;o<3;o++)n[D++]=o+1,n[D++]=0!=o?17:(15&b)<<4|15&p,n[D++]=o}if(255==e[d]&&218==e[d+1]){var F=e[d+2]<<8|e[d+3];for((a=new Uint8Array(2+F))[0]=e[d],a[1]=e[d+1],a[2]=e[d+2],a[3]=e[d+3],o=0;o>>8&255,s[d.sofPosition+6]=255&r.height,s[d.sofPosition+7]=r.width>>>8&255,s[d.sofPosition+8]=255&r.width,255==e[t]&&e[t+1]==SOS||(s.set(d.sosMarker,h),h+=sosMarker.length),c=0;c>>6,l=63&d;if(e++,3==u&&(h=15&l,i[s>>>1]|=h<<4*(1-s&1),s++),0==u)for(var c=0;c>>1]|=h<<4*(1-s&1),s++;if(2==u)for(c=0;c<2;c++){4!=(v=l>>>3*(1-c)&7)&&(h+=o[v],i[s>>>1]|=h<<4*(1-s&1),s++)}if(1==u)for(c=0;c<3;c++){var v;2!=(v=l>>>2*(2-c)&3)&&(h+=a[v],i[s>>>1]|=h<<4*(1-s&1),s++)}}},x.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},x.decode._lens=function(){function r(r,e,t,i){for(var n=0;n>>3>>3]>>>7-(7&s)&1),2==o&&(U=r[s>>>3]>>>(7&s)&1),s++,d+=U,"H"==m){if(null!=f._lens[b][d]){var A=f._lens[b][d];d="",h+=A,A<64&&(f._addNtimes(u,h,b),v+=h,b=1-b,(h=0)==--E&&(m=""))}}else"0001"==d&&(d="",f._addNtimes(u,w-v,b),v=w),"001"==d&&(d="",m="H",E=2),null!=f._dmap[d]&&(g=_+f._dmap[d],f._addNtimes(u,g-v,b),v=g,d="",b=1-b);u.length==a&&""==m&&(f._writeBits(u,i,8*n+p*y),p++,v=b=0,l=f._makeDiff(u),u=[])}},x.decode._findDiff=function(r,e,t){for(var i=0;i=e&&r[i+1]==t)return r[i]},x.decode._makeDiff=function(r){var e=[];1==r[0]&&e.push(0,1);for(var t=1;t>>3>>3]>>>7-(7&s)&1),2==o&&(A=r[s>>>3]>>>(7&s)&1),s++,d+=A,y){if(null!=f._lens[b][d]){var I=f._lens[b][d];d="",h+=I,I<64&&(f._addNtimes(u,h,b),b=1-b,h=0)}}else if("H"==m){if(null!=f._lens[b][d]){I=f._lens[b][d];d="",h+=I,I<64&&(f._addNtimes(u,h,b),v+=h,b=1-b,(h=0)==--E&&(m=""))}}else"0001"==d&&(d="",f._addNtimes(u,w-v,b),v=w),"001"==d&&(d="",m="H",E=2),null!=f._dmap[d]&&(g=_+f._dmap[d],f._addNtimes(u,g-v,b),v=g,d="",b=1-b);d.endsWith("000000000001")&&(0<=p&&f._writeBits(u,i,8*n+p*U),1==o&&(y=1==(r[s>>>3]>>>7-(7&s)&1)),2==o&&(y=1==(r[s>>>3]>>>(7&s)&1)),s++,null==f._decodeG3.allow2D&&(f._decodeG3.allow2D=y),f._decodeG3.allow2D||(y=!0,s--),d="",p++,v=b=0,l=f._makeDiff(u),u=[])}u.length==a&&f._writeBits(u,i,8*n+p*U)},x.decode._addNtimes=function(r,e,t){for(var i=0;i>>3]|=r[i]<<7-(t+i&7)},x.decode._decodeLZW=(m={},function(r,e,t,i){if(!m.c){for(var n=new Uint32Array(65535),a=new Uint16Array(65535),o=new Uint8Array(2e6),f=0;f<256;f++)n[o[f<<2]=f]=f<<2,a[f]=1;m.c=[n,a,o]}for(var s=m.c[0],h=m.c[1],d=(o=m.c[2],258),u=1032,l=9,c=e<<3,v=0,g=0;v=(r[c>>>3]<<16|r[c+8>>>3]<<8|r[c+16>>>3])>>24-(7&c)-l&(1<>>3]<<16|r[c+8>>>3]<<8|r[c+16>>>3])>>24-(7&c)-l&(1<>>----------------");for(var s=0;s>3)]>>7-(7&c)&1;o[v]=o[v+1]=o[v+2]=255*(1-g),o[v+3]=255}if(4==s)for(c=0;c>1)]>>4-4*(1&c)&15;o[v]=o[v+1]=o[v+2]=17*(15-g),o[v+3]=255}if(8==s)for(c=0;c>3)]>>7-(7&c)&1;o[v]=o[v+1]=o[v+2]=255*g,o[v+3]=255}if(2==s)for(c=0;c>2)]>>6-2*(3&c)&3;o[v]=o[v+1]=o[v+2]=85*g,o[v+3]=255}if(8==s)for(c=0;c>8,o[v+1]=b[256+p]>>8,o[v+2]=b[512+p]>>8,o[v+3]=255}}else if(5==f){var m=4<(_=r.t258?r.t258.length:4)?1:0;for(c=0;c>>1))+(1&M)];var k,D=a[k+2]-128,F=a[k+3]-128,G=U+((F>>2)+(F>>3)+(F>>5)),N=U-((D>>2)+(D>>4)+(D>>5))-((F>>1)+(F>>3)+(F>>4)+(F>>5)),S=U+(D+(D>>1)+(D>>2)+(D>>6));o[v]=Math.max(0,Math.min(255,G)),o[v+1]=Math.max(0,Math.min(255,N)),o[v+2]=Math.max(0,Math.min(255,S)),o[v+3]=255}}}else log("Unknown Photometric interpretation: "+f);return o},x._binBE={nextZero:function(r,e){for(;0!=r[e];)e++;return e},readUshort:function(r,e){return r[e]<<8|r[e+1]},readShort:function(r,e){var t=x._binBE.ui8;return t[0]=r[e+1],t[1]=r[e+0],x._binBE.i16[0]},readInt:function(r,e){var t=x._binBE.ui8;return t[0]=r[e+3],t[1]=r[e+2],t[2]=r[e+1],t[3]=r[e+0],x._binBE.i32[0]},readUint:function(r,e){var t=x._binBE.ui8;return t[0]=r[e+3],t[1]=r[e+2],t[2]=r[e+1],t[3]=r[e+0],x._binBE.ui32[0]},readASCII:function(r,e,t){for(var i="",n=0;n>8&255,r[e+1]=255&t},writeUint:function(r,e,t){r[e]=t>>24&255,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t>>0&255},writeASCII:function(r,e,t){for(var i=0;i>>8),this._=8),this.G>>>--this._&1},Z:function(r){var e=this._,t=this.G,i=Math.min(e,r);r-=i;for(var n=t>>>(e-=i)&(1<>>8),r-=i=Math.min(8,r),n<<=i,n|=t>>>(e=8-i)&(1<>>8),n=8),-1!=(i=r[(t=r[t+(a>>>--n&1)])+2]))return e._=n,e.G=a,e.N=o,i;return-1},n.prototype={$:function(r,e){this.Q=r.i(),this.F=r.l(),this.o=r.l();var t=this.O=r.i();this.L=[];for(var i=0;i>>4]}this.g=r.i(),r.t(r.N+e-(2+2*t))},D:function(r){var e=!1;if((t=r.l())===n.q)do{var t=r.l(),i=r.l()-2;switch(t){case n.m:this.$(r,i);break;case n.K:this.W(i);break;case n.V:this.p(r,i),e=!0;break;default:r.t(r.N+i)}}while(!e)},I:function(r,e){var t=o.B(e,r);if(16==t)return-32768;var i=r.Z(t);return 0==(i&1<>>1)),r[c]=v+a(t,s[h])}u+=e}}},n.m=65475,n.K=65476,n.q=65496,n.V=65498,function(r){var e=new n(r),t=new(8>--I&1;if(255===(A=t[i++])){var r=t[i++];if(r){if(220===r&&E){i+=2;var e=t[i++]<<8|t[i++];if(0>>(I=7)}function u(r){for(;;){if("number"==typeof(r=r[d()]))return r;if("object"!==(void 0===r?"undefined":L(r)))throw new C("invalid huffman sequence")}}function l(r){for(var e=0;0>=4,0==n){if(i<15){B=l(i)+(1<>=4,0===t)M=n<15?(B=l(n)+(1<>=4,0==n){if(i<15)break;t+=16}else t+=i,r.a[e+J[t]]=c(n),t++}},F=0,G=1===k?r[0].c*r[0].l:y*n.O;F>10,s[u]=l,s[u+1]=l,s[u+2]=l,s[u+3]=l,s[u+4]=l,s[u+5]=l,s[u+6]=l,s[u+7]=l;else{c*=h[u+1],v*=h[u+2],g*=h[u+3],_*=h[u+4],w*=h[u+5];var m=5793*l+128>>8,E=5793*_+128>>8,y=v,U=b*=h[u+6];E=(m=m+E+1>>1)-E,l=3784*y+1567*U+128>>8,y=1567*y-3784*U+128>>8,w=(_=(_=2896*(c-(p*=h[u+7]))+128>>8)+(w<<=4)+1>>1)-w,g=(p=(p=2896*(c+p)+128>>8)+(g<<=4)+1>>1)-g,U=(m=m+(U=l)+1>>1)-U,y=(E=E+y+1>>1)-y,l=2276*_+3406*p+2048>>12,_=3406*_-2276*p+2048>>12,p=l,l=799*g+4017*w+2048>>12,g=4017*g-799*w+2048>>12,w=l,s[u]=m+p,s[u+7]=m-p,s[u+1]=E+w,s[u+6]=E-w,s[u+2]=y+g,s[u+5]=y-g,s[u+3]=U+_,s[u+4]=U-_}}for(h=0;h<8;++h)l=s[h],0==((c=s[h+8])|(v=s[h+16])|(g=s[h+24])|(_=s[h+32])|(w=s[h+40])|(b=s[h+48])|(p=s[h+56]))?(l=(l=5793*l+8192>>14)<-2040?0:2024<=l?255:l+2056>>4,d[f+h]=l,d[f+h+8]=l,d[f+h+16]=l,d[f+h+24]=l,d[f+h+32]=l,d[f+h+40]=l,d[f+h+48]=l,d[f+h+56]=l):(m=5793*l+2048>>12,E=5793*_+2048>>12,l=3784*(y=v)+1567*(U=b)+2048>>12,y=1567*y-3784*U+2048>>12,U=l,w=(_=(_=2896*(c-p)+2048>>12)+w+1>>1)-w,g=(p=(p=2896*(c+p)+2048>>12)+g+1>>1)-g,l=2276*_+3406*p+2048>>12,_=3406*_-2276*p+2048>>12,p=l,l=799*g+4017*w+2048>>12,g=4017*g-799*w+2048>>12,c=(E=(E=(m=4112+(m+E+1>>1))-E)+y+1>>1)+(w=l),b=E-w,w=(y=E-y)-g,l=(l=(m=m+U+1>>1)+p)<16?0:4080<=l?255:l>>4,c=c<16?0:4080<=c?255:c>>4,v=(v=y+g)<16?0:4080<=v?255:v>>4,g=(g=(U=m-U)+_)<16?0:4080<=g?255:g>>4,_=(_=U-_)<16?0:4080<=_?255:_>>4,w=w<16?0:4080<=w?255:w>>4,b=b<16?0:4080<=b?255:b>>4,p=(p=m-p)<16?0:4080<=p?255:p>>4,d[f+h]=l,d[f+h+8]=c,d[f+h+16]=v,d[f+h+24]=g,d[f+h+32]=_,d[f+h+40]=w,d[f+h+48]=b,d[f+h+56]=p)}return e.a}function P(r,e,t){var i=2=n)return null;o=r[i]<<8|r[i+1]}return{f:a.toString(16),F:o,offset:i}}var J,L,C,O,m;function E(r,e,t,i,n){for(var a=0;a>4)for(c=0;c<64;c++)_[v=J[c]]=e[a++];else{if(1!=g>>4)throw new C("DQT - invalid table spec");for(c=0;c<64;c++)_[v=J[c]]=r()}i[15&g]=_}break;case 65472:case 65473:case 65474:if(w)throw new C("Only single frame JPEGs supported");r();var w={};for(w.X=65473===l,w.S=65474===l,w.precision=e[a++],l=r(),w.g=n||l,w.v=r(),w.b=[],w.C={},c=e[a++],l=_=g=0;l>4,p=15&e[a+1];g>4?u:d)[15&g]=U(_,p)}break;case 65501:r();var m=r();break;case 65498:for(c=1==++f&&!n,r(),g=e[a++],v=[],l=0;l>4],E.o=d[15&_],v.push(E)}l=e[a++],g=e[a++],_=e[a++];try{var y=I(e,a,w,v,m,l,g,_>>4,15&_,c);a+=y}catch(r){if(r instanceof O)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(e,{N:r.g});throw r}break;case 65500:a+=4;break;case 65535:255!==e[a]&&a--;break;default:if(255===e[a-3]&&192<=e[a-2]&&e[a-2]<=254)a-=3;else{if(!(c=P(e,a-2))||!c.f)throw new C("unknown marker "+l.toString(16));(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+c.f),a=c.offset}}l=r()}for(this.width=w.v,this.height=w.g,this.A=o,this.b=[],l=0;l>8)+a[n+1];return s},w:function(){return this.A?!!this.A.W:3===this.i?0!==this.B:1===this.B},I:function(r){for(var e,t,i,n=0,a=r.length;n>>3)]),null==d&&(d=e.t325);var u=new Uint8Array(e.height*(s>>>3)),l=0;if(null!=e.t322){for(var c=e.t322[0],v=e.t323[0],g=Math.floor((e.width+c-1)/c),_=Math.floor((e.height+v-1)/v),w=new Uint8Array(0|Math.ceil(c*v*a/8)),b=0;b<_;b++)for(var p=0;p>>3,_=r.t278?r.t278[0]:r.height,w=Math.ceil(c*v*r.width/8);if(16==c&&!r.isLE&&null==r.t33422)for(var b=0;b<_;b++)for(var p=f+b*w,m=1;m>>8&255}else if(3==v)for(h=3;h>>11,c=15&d>>>22,v=15&d>>>26,g=0;g<4&&128<>3))>>>(7&_)&127)<>>4,n[a+E+1]=y<<4|A>>>4,n[a+E+2]=A<<4|U>>>4}else{f+=8;var I,B,M,k=[t,0,0,0],D=new Uint16Array(32770),F=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],G=0,N=x.decode._ljpeg_diff;for(D[0]=15,I=E=0;E<18;E++)for(var S=32768>>>(F[E]>>>8),P=0;P>>4),0)<<1)<>>1)&1<>>3;r[i]|=t>>>16,r[1+i]|=t>>>8,r[2+i]|=t},x.decode._getbithuff=function(r,e,t,i){x.decode._get_byte;var n,a=e[0],o=e[1],f=e[2],s=e[3];if(0==t||f<0)return 0;for(;!s&&f>>32-t,i?(f-=i[n+1]>>>8,n=255&i[n+1]):f-=t,f<0)throw"e";return e[0]=a,e[1]=o,e[2]=f,e[3]=s,n},x.decode._make_decoder=function(r){var e,t,i,n,a,o=[];for(e=16;0!=e&&!r[e];e--);var f=17;for(o[0]=e,i=t=1;t<=e;t++)for(n=0;n>>8;else for(d=0;d>>8,n[a+(d<<1)+1]=255&v[d];else{if(14!=c&&12!=c)throw new Error("unsupported bit depth "+c);var _=16-c;for(d=0;d offset to first strip or tile");if(null==n){var y=0,U=[];U[y++]=255,U[y++]=216;var A=r.t519;if(null==A)throw new Error("JPEGQTables tag is missing");for(o=0;o>>8,U[y++]=255&B,U[y++]=o|s<<4,f=0;f<16;f++)U[y++]=e[t+I[o]+f];for(f=0;f>>8&255,U[y++]=255&r.height,U[y++]=r.width>>>8&255,U[y++]=255&r.width,1==(U[y++]=m))U[y++]=1,U[y++]=17,U[y++]=0;else for(o=0;o<3;o++)U[y++]=o+1,U[y++]=0!=o?17:(15&b)<<4|15&p,U[y++]=o;null!=E&&0!=E[0]&&(U[y++]=255,U[y++]=221,U[y++]=0,U[y++]=4,U[y++]=E[0]>>>8&255,U[y++]=255&E[0]),n=new Uint8Array(U)}var M=-1;for(o=0;o>>8&255,n[D++]=255&r.height,n[D++]=r.width>>>8&255,n[D++]=255&r.width,1==(n[D++]=m))n[D++]=1,n[D++]=17,n[D++]=0;else for(o=0;o<3;o++)n[D++]=o+1,n[D++]=0!=o?17:(15&b)<<4|15&p,n[D++]=o}if(255==e[d]&&218==e[d+1]){var F=e[d+2]<<8|e[d+3];for((a=new Uint8Array(2+F))[0]=e[d],a[1]=e[d+1],a[2]=e[d+2],a[3]=e[d+3],o=0;o>>8&255,s[d.sofPosition+6]=255&r.height,s[d.sofPosition+7]=r.width>>>8&255,s[d.sofPosition+8]=255&r.width,255==e[t]&&e[t+1]==SOS||(s.set(d.sosMarker,h),h+=sosMarker.length),c=0;c>>6,l=63&d;if(e++,3==u&&(h=15&l,i[s>>>1]|=h<<4*(1-s&1),s++),0==u)for(var c=0;c>>1]|=h<<4*(1-s&1),s++;if(2==u)for(c=0;c<2;c++){4!=(v=l>>>3*(1-c)&7)&&(h+=o[v],i[s>>>1]|=h<<4*(1-s&1),s++)}if(1==u)for(c=0;c<3;c++){var v;2!=(v=l>>>2*(2-c)&3)&&(h+=a[v],i[s>>>1]|=h<<4*(1-s&1),s++)}}},x.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},x.decode._lens=function(){function r(r,e,t,i){for(var n=0;n>>3>>3]>>>7-(7&s)&1),2==o&&(U=r[s>>>3]>>>(7&s)&1),s++,d+=U,"H"==m){if(null!=f._lens[b][d]){var A=f._lens[b][d];d="",h+=A,A<64&&(f._addNtimes(u,h,b),v+=h,b=1-b,(h=0)==--E&&(m=""))}}else"0001"==d&&(d="",f._addNtimes(u,w-v,b),v=w),"001"==d&&(d="",m="H",E=2),null!=f._dmap[d]&&(g=_+f._dmap[d],f._addNtimes(u,g-v,b),v=g,d="",b=1-b);u.length==a&&""==m&&(f._writeBits(u,i,8*n+p*y),p++,v=b=0,l=f._makeDiff(u),u=[])}},x.decode._findDiff=function(r,e,t){for(var i=0;i=e&&r[i+1]==t)return r[i]},x.decode._makeDiff=function(r){var e=[];1==r[0]&&e.push(0,1);for(var t=1;t>>3>>3]>>>7-(7&s)&1),2==o&&(A=r[s>>>3]>>>(7&s)&1),s++,d+=A,y){if(null!=f._lens[b][d]){var I=f._lens[b][d];d="",h+=I,I<64&&(f._addNtimes(u,h,b),b=1-b,h=0)}}else if("H"==m){if(null!=f._lens[b][d]){I=f._lens[b][d];d="",h+=I,I<64&&(f._addNtimes(u,h,b),v+=h,b=1-b,(h=0)==--E&&(m=""))}}else"0001"==d&&(d="",f._addNtimes(u,w-v,b),v=w),"001"==d&&(d="",m="H",E=2),null!=f._dmap[d]&&(g=_+f._dmap[d],f._addNtimes(u,g-v,b),v=g,d="",b=1-b);d.endsWith("000000000001")&&(0<=p&&f._writeBits(u,i,8*n+p*U),1==o&&(y=1==(r[s>>>3]>>>7-(7&s)&1)),2==o&&(y=1==(r[s>>>3]>>>(7&s)&1)),s++,null==f._decodeG3.allow2D&&(f._decodeG3.allow2D=y),f._decodeG3.allow2D||(y=!0,s--),d="",p++,v=b=0,l=f._makeDiff(u),u=[])}u.length==a&&f._writeBits(u,i,8*n+p*U)},x.decode._addNtimes=function(r,e,t){for(var i=0;i>>3]|=r[i]<<7-(t+i&7)},x.decode._decodeLZW=(m={},function(r,e,t,i){if(!m.c){for(var n=new Uint32Array(65535),a=new Uint16Array(65535),o=new Uint8Array(2e6),f=0;f<256;f++)n[o[f<<2]=f]=f<<2,a[f]=1;m.c=[n,a,o]}for(var s=m.c[0],h=m.c[1],d=(o=m.c[2],258),u=1032,l=9,c=e<<3,v=0,g=0;v=(r[c>>>3]<<16|r[c+8>>>3]<<8|r[c+16>>>3])>>24-(7&c)-l&(1<>>3]<<16|r[c+8>>>3]<<8|r[c+16>>>3])>>24-(7&c)-l&(1<>>----------------");for(var s=0;s>3)]>>7-(7&c)&1;o[v]=o[v+1]=o[v+2]=255*(1-g),o[v+3]=255}if(4==s)for(c=0;c>1)]>>4-4*(1&c)&15;o[v]=o[v+1]=o[v+2]=17*(15-g),o[v+3]=255}if(8==s)for(c=0;c>3)]>>7-(7&c)&1;o[v]=o[v+1]=o[v+2]=255*g,o[v+3]=255}if(2==s)for(c=0;c>2)]>>6-2*(3&c)&3;o[v]=o[v+1]=o[v+2]=85*g,o[v+3]=255}if(8==s)for(c=0;c>8,o[v+1]=b[256+p]>>8,o[v+2]=b[512+p]>>8,o[v+3]=255}}else if(5==f){var m=4<(_=r.t258?r.t258.length:4)?1:0;for(c=0;c>>1))+(1&M)];var k,D=a[k+2]-128,F=a[k+3]-128,G=U+((F>>2)+(F>>3)+(F>>5)),N=U-((D>>2)+(D>>4)+(D>>5))-((F>>1)+(F>>3)+(F>>4)+(F>>5)),S=U+(D+(D>>1)+(D>>2)+(D>>6));o[v]=Math.max(0,Math.min(255,G)),o[v+1]=Math.max(0,Math.min(255,N)),o[v+2]=Math.max(0,Math.min(255,S)),o[v+3]=255}}}else log("Unknown Photometric interpretation: "+f);return o},x._binBE={nextZero:function(r,e){for(;0!=r[e];)e++;return e},readUshort:function(r,e){return r[e]<<8|r[e+1]},readShort:function(r,e){var t=x._binBE.ui8;return t[0]=r[e+1],t[1]=r[e+0],x._binBE.i16[0]},readInt:function(r,e){var t=x._binBE.ui8;return t[0]=r[e+3],t[1]=r[e+2],t[2]=r[e+1],t[3]=r[e+0],x._binBE.i32[0]},readUint:function(r,e){var t=x._binBE.ui8;return t[0]=r[e+3],t[1]=r[e+2],t[2]=r[e+1],t[3]=r[e+0],x._binBE.ui32[0]},readASCII:function(r,e,t){for(var i="",n=0;n>8&255,r[e+1]=255&t},writeUint:function(r,e,t){r[e]=t>>24&255,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t>>0&255},writeASCII:function(r,e,t){for(var i=0;i>>8),this._=8),this.G>>>--this._&1},Z:function(r){var e=this._,t=this.G,i=Math.min(e,r);r-=i;for(var n=t>>>(e-=i)&(1<>>8),r-=i=Math.min(8,r),n<<=i,n|=t>>>(e=8-i)&(1<>>8),n=8),-1!=(i=r[(t=r[t+(a>>>--n&1)])+2]))return e._=n,e.G=a,e.N=o,i;return-1},n.prototype={$:function(r,e){this.Q=r.i(),this.F=r.l(),this.o=r.l();var t=this.O=r.i();this.L=[];for(var i=0;i>>4]}this.g=r.i(),r.t(r.N+e-(2+2*t))},D:function(r){var e=!1;if((t=r.l())===n.q)do{var t=r.l(),i=r.l()-2;switch(t){case n.m:this.$(r,i);break;case n.K:this.W(i);break;case n.V:this.p(r,i),e=!0;break;default:r.t(r.N+i)}}while(!e)},I:function(r,e){var t=o.B(e,r);if(16==t)return-32768;var i=r.Z(t);return 0==(i&1<>>1)),r[c]=v+a(t,s[h])}u+=e}}},n.m=65475,n.K=65476,n.q=65496,n.V=65498,function(r){var e=new n(r),t=new(8 10) lastTraces.pop(); + if (lastTraces.length > 100) lastTraces.pop(); haxeTrace(v, inf); } } diff --git a/Sources/arm/Context.hx b/Sources/arm/Context.hx index f1df4a21..15f72210 100644 --- a/Sources/arm/Context.hx +++ b/Sources/arm/Context.hx @@ -421,7 +421,7 @@ class Context { for (f in BoxPreferences.filesPlugin) { if (f.startsWith("import_") && f.indexOf(ext) >= 0) { Config.enablePlugin(f); - Log.info(f + " " + tr("plugin enabled")); + Console.info(f + " " + tr("plugin enabled")); return true; } } diff --git a/Sources/arm/Plugin.hx b/Sources/arm/Plugin.hx index 3eb38d89..611d8e8b 100644 --- a/Sources/arm/Plugin.hx +++ b/Sources/arm/Plugin.hx @@ -82,7 +82,6 @@ class ArmBridge { public static var Context = arm.Context; public static var History = arm.History; public static var Layers = arm.Layers; - public static var Log = arm.Log; public static var Operator = arm.Operator; public static var Plugin = arm.Plugin; public static var Project = arm.Project; @@ -117,8 +116,9 @@ class ZuiBridge { } @:expose("console") -class Console { - public static var log = arm.Log.trace; +class ConsoleBridge { + public static var log = arm.Console.log; + public static var error = arm.Console.error; } @:keep diff --git a/Sources/arm/Project.hx b/Sources/arm/Project.hx index aa9d370d..ce0f4683 100644 --- a/Sources/arm/Project.hx +++ b/Sources/arm/Project.hx @@ -57,7 +57,7 @@ class Project { public static function projectOpen() { UIFiles.show("arm", false, function(path: String) { if (!path.endsWith(".arm")) { - Log.error(Strings.error0()); + Console.error(Strings.error0()); return; } diff --git a/Sources/arm/io/ExportArm.hx b/Sources/arm/io/ExportArm.hx index 481dba85..9357d1ef 100644 --- a/Sources/arm/io/ExportArm.hx +++ b/Sources/arm/io/ExportArm.hx @@ -127,7 +127,7 @@ class ExportArm { recent.unshift(Project.filepath); Config.save(); - Log.info("Project saved."); + Console.info("Project saved."); } static function exportNode(n: TNode, assets: Array = null) { diff --git a/Sources/arm/io/ExportTexture.hx b/Sources/arm/io/ExportTexture.hx index 4656eb21..cea300d1 100644 --- a/Sources/arm/io/ExportTexture.hx +++ b/Sources/arm/io/ExportTexture.hx @@ -92,7 +92,7 @@ class ExportTexture { trace("Textures exported in " + (iron.system.Time.realTime() - timer)); #end - Log.info("Textures exported."); + Console.info("Textures exported."); } static function runBakeMaterial(path: String) { diff --git a/Sources/arm/io/ImportArm.hx b/Sources/arm/io/ImportArm.hx index 4fb3810e..59dab786 100644 --- a/Sources/arm/io/ImportArm.hx +++ b/Sources/arm/io/ImportArm.hx @@ -504,7 +504,7 @@ class ImportArm { } static function makePink(abs: String) { - Log.error(Strings.error2() + " " + abs); + Console.error(Strings.error2() + " " + abs); var b = Bytes.alloc(4); b.set(0, 255); b.set(1, 0); diff --git a/Sources/arm/io/ImportAsset.hx b/Sources/arm/io/ImportAsset.hx index 02d31650..249a73ba 100644 --- a/Sources/arm/io/ImportAsset.hx +++ b/Sources/arm/io/ImportAsset.hx @@ -55,7 +55,7 @@ class ImportAsset { run(path, dropX, dropY, showBox); } else { - Log.error(Strings.error1()); + Console.error(Strings.error1()); } } } diff --git a/Sources/arm/io/ImportBlend.hx b/Sources/arm/io/ImportBlend.hx index 983e2cc8..307ea3f8 100644 --- a/Sources/arm/io/ImportBlend.hx +++ b/Sources/arm/io/ImportBlend.hx @@ -22,7 +22,7 @@ class ImportBlend { Data.getBlob(path, function(b: Blob) { var bl = new BlendParser(b); if (bl.dna == null) { - Log.error(Strings.error3()); + Console.error(Strings.error3()); return; } @@ -411,13 +411,13 @@ class ImportBlend { Data.getBlob(path, function(b: Blob) { var bl = new BlendParser(b); if (bl.dna == null) { - Log.error(Strings.error3()); + Console.error(Strings.error3()); return; } var mats = bl.get("Material"); if (mats.length == 0) { - Log.error("Error: No materials found"); + Console.error("Error: No materials found"); return; } @@ -459,7 +459,7 @@ class ImportBlend { node = node.get("next"); } if (node.get("idname") != "ShaderNodeBsdfPrincipled") { - Log.error("Error: No Principled BSDF node found"); + Console.error("Error: No Principled BSDF node found"); continue; } diff --git a/Sources/arm/io/ImportFont.hx b/Sources/arm/io/ImportFont.hx index acc4f5e8..c5fc22df 100644 --- a/Sources/arm/io/ImportFont.hx +++ b/Sources/arm/io/ImportFont.hx @@ -12,7 +12,7 @@ class ImportFont { public static function run(path: String) { for (f in Project.fonts) { if (f.file == path) { - Log.info(Strings.info0()); + Console.info(Strings.info0()); return; } } diff --git a/Sources/arm/io/ImportKeymap.hx b/Sources/arm/io/ImportKeymap.hx index c1e324a0..9d173b07 100644 --- a/Sources/arm/io/ImportKeymap.hx +++ b/Sources/arm/io/ImportKeymap.hx @@ -7,7 +7,7 @@ class ImportKeymap { public static function run(path: String) { if (!Path.isJson(path)) { - Log.error(Strings.error1()); + Console.error(Strings.error1()); return; } @@ -16,6 +16,6 @@ class ImportKeymap { File.copy(path, dstPath); // Copy to preset folder arm.ui.BoxPreferences.fetchKeymaps(); // Refresh file list arm.ui.BoxPreferences.presetHandle.position = arm.ui.BoxPreferences.getPresetIndex(); - Log.info("Keymap '" + filename + "' imported."); + Console.info("Keymap '" + filename + "' imported."); } } diff --git a/Sources/arm/io/ImportMesh.hx b/Sources/arm/io/ImportMesh.hx index b466ce16..fc8f2c86 100644 --- a/Sources/arm/io/ImportMesh.hx +++ b/Sources/arm/io/ImportMesh.hx @@ -23,7 +23,7 @@ class ImportMesh { public static function run(path: String, _clearLayers = true, replaceExisting = true) { if (!Path.isMesh(path)) { if (!Context.enableImportPlugin(path)) { - Log.error(Strings.error1()); + Console.error(Strings.error1()); return; } } @@ -90,7 +90,7 @@ class ImportMesh { public static function makeMesh(mesh: Dynamic, path: String) { if (mesh == null || mesh.posa == null || mesh.nora == null || mesh.inda == null || mesh.posa.length == 0) { - Log.error(Strings.error3()); + Console.error(Strings.error3()); return; } @@ -169,7 +169,7 @@ class ImportMesh { } static function equirectUnwrap(mesh: Dynamic) { - Log.error(Strings.error4()); + Console.error(Strings.error4()); var verts = Std.int(mesh.posa.length / 4); mesh.texa = new Int16Array(verts * 2); var n = new Vec4(); diff --git a/Sources/arm/io/ImportPlugin.hx b/Sources/arm/io/ImportPlugin.hx index c789c630..8ad798b1 100644 --- a/Sources/arm/io/ImportPlugin.hx +++ b/Sources/arm/io/ImportPlugin.hx @@ -7,7 +7,7 @@ class ImportPlugin { public static function run(path: String) { if (!Path.isPlugin(path)) { - Log.error(Strings.error1()); + Console.error(Strings.error1()); return; } @@ -15,6 +15,6 @@ class ImportPlugin { var dstPath = Path.data() + Path.sep + "plugins" + Path.sep + filename; File.copy(path, dstPath); // Copy to plugin folder arm.ui.BoxPreferences.filesPlugin = null; // Refresh file list - Log.info("Plugin '" + filename + "' imported."); + Console.info("Plugin '" + filename + "' imported."); } } diff --git a/Sources/arm/io/ImportTexture.hx b/Sources/arm/io/ImportTexture.hx index 099b2b36..afdbbece 100644 --- a/Sources/arm/io/ImportTexture.hx +++ b/Sources/arm/io/ImportTexture.hx @@ -11,7 +11,7 @@ class ImportTexture { public static function run(path: String, hdrAsEnvmap = true) { if (!Path.isTexture(path)) { if (!Context.enableImportPlugin(path)) { - Log.error(Strings.error1()); + Console.error(Strings.error1()); return; } } @@ -27,7 +27,7 @@ class ImportTexture { }); }); } - Log.info(Strings.info0()); + Console.info(Strings.info0()); return; } } diff --git a/Sources/arm/io/ImportTheme.hx b/Sources/arm/io/ImportTheme.hx index 36ab69d6..bb3d6af7 100644 --- a/Sources/arm/io/ImportTheme.hx +++ b/Sources/arm/io/ImportTheme.hx @@ -7,7 +7,7 @@ class ImportTheme { public static function run(path: String) { if (!Path.isJson(path)) { - Log.error(Strings.error1()); + Console.error(Strings.error1()); return; } @@ -18,6 +18,6 @@ class ImportTheme { Config.raw.theme = filename; arm.ui.BoxPreferences.themeHandle.position = arm.ui.BoxPreferences.getThemeIndex(); Config.loadTheme(Config.raw.theme); - Log.info("Theme '" + filename + "' imported."); + Console.info("Theme '" + filename + "' imported."); } } diff --git a/Sources/arm/render/Uniforms.hx b/Sources/arm/render/Uniforms.hx index 913e0ecf..8aebbb55 100644 --- a/Sources/arm/render/Uniforms.hx +++ b/Sources/arm/render/Uniforms.hx @@ -125,7 +125,7 @@ class Uniforms { result = js.Lib.eval(script); } catch(e: Dynamic) { - Log.trace(e); + Console.log(e); } } return result; diff --git a/Sources/arm/ui/BoxExport.hx b/Sources/arm/ui/BoxExport.hx index 92cc4eb9..4621c4f6 100644 --- a/Sources/arm/ui/BoxExport.hx +++ b/Sources/arm/ui/BoxExport.hx @@ -146,9 +146,9 @@ class BoxExport { fetchPresets(); preset = null; hpreset.position = files.indexOf(filename.substr(0, filename.length - 5)); // Strip .json - Log.info("Preset '" + filename + "' imported."); + Console.info("Preset '" + filename + "' imported."); } - else Log.error(Strings.error1()); + else Console.error(Strings.error1()); }); } diff --git a/Sources/arm/ui/BoxPreferences.hx b/Sources/arm/ui/BoxPreferences.hx index 756aec62..422b373c 100644 --- a/Sources/arm/ui/BoxPreferences.hx +++ b/Sources/arm/ui/BoxPreferences.hx @@ -485,7 +485,7 @@ let h1 = new zui.Handle(); plugin.drawUI = function(ui) { if (ui.panel(h1, 'New Plugin')) { if (ui.button('Button')) { - arm.Log.error('Hello'); + console.error('Hello'); } } } @@ -538,7 +538,7 @@ plugin.drawUI = function(ui) { iron.data.Data.getBlob("plugins/" + f, function(blob: kha.Blob) { TabScript.hscript.text = blob.toString(); iron.data.Data.deleteBlob("plugins/" + f); - Log.info("Script opened"); + Console.info("Script opened"); }); } diff --git a/Sources/arm/ui/TabConsole.hx b/Sources/arm/ui/TabConsole.hx index 4298808a..930e3ee6 100644 --- a/Sources/arm/ui/TabConsole.hx +++ b/Sources/arm/ui/TabConsole.hx @@ -13,8 +13,8 @@ class TabConsole { public static function draw() { var ui = UISidebar.inst.ui; - var title = Log.messageTimer > 0 ? Log.message + " " : tr("Console"); - var color = Log.messageTimer > 0 ? Log.messageColor : -1; + var title = Console.messageTimer > 0 ? Console.message + " " : tr("Console"); + var color = Console.messageTimer > 0 ? Console.messageColor : -1; var statush = Config.raw.layout[LayoutStatusH]; if (ui.tab(UIStatus.inst.statustab, title, false, color) && statush > UIStatus.defaultStatusH * ui.SCALE()) { @@ -23,10 +23,10 @@ class TabConsole { ui.row([1 / 20, 1 / 20]); if (ui.button(tr("Clear"))) { - Log.lastTraces = []; + Console.lastTraces = []; } if (ui.button(tr("Export"))) { - var str = Log.lastTraces.join("\n"); + var str = Console.lastTraces.join("\n"); UIFiles.show("txt", true, function(path: String) { var f = UIFiles.filename; if (f == "") f = tr("untitled"); @@ -38,7 +38,7 @@ class TabConsole { ui.endSticky(); - for (t in Log.lastTraces) { + for (t in Console.lastTraces) { ui.text(t); } } diff --git a/Sources/arm/ui/TabScript.hx b/Sources/arm/ui/TabScript.hx index e9455c65..8bd64db7 100644 --- a/Sources/arm/ui/TabScript.hx +++ b/Sources/arm/ui/TabScript.hx @@ -27,7 +27,7 @@ class TabScript { js.Lib.eval(hscript.text); } catch(e: Dynamic) { - Log.trace(e); + Console.log(e); } } if (ui.button(tr("Clear"))) { diff --git a/Sources/arm/ui/UIMenu.hx b/Sources/arm/ui/UIMenu.hx index d377df97..b6b074ee 100644 --- a/Sources/arm/ui/UIMenu.hx +++ b/Sources/arm/ui/UIMenu.hx @@ -72,7 +72,7 @@ class UIMenu { if (menuButton(ui, tr("Import Envmap..."))) { UIFiles.show("hdr", false, function(path: String) { if (!path.endsWith(".hdr")) { - Log.error("Error: .hdr file expected"); + Console.error("Error: .hdr file expected"); return; } ImportAsset.run(path); diff --git a/Sources/arm/ui/UISidebar.hx b/Sources/arm/ui/UISidebar.hx index abf4912e..9d5a5c9e 100644 --- a/Sources/arm/ui/UISidebar.hx +++ b/Sources/arm/ui/UISidebar.hx @@ -469,9 +469,9 @@ class UISidebar { function updateUI() { - if (Log.messageTimer > 0) { - Log.messageTimer -= Time.delta; - if (Log.messageTimer <= 0) UIStatus.inst.statusHandle.redraws = 2; + if (Console.messageTimer > 0) { + Console.messageTimer -= Time.delta; + if (Console.messageTimer <= 0) UIStatus.inst.statusHandle.redraws = 2; } if (!App.uiEnabled) return;