From 282f07f4a3f1c0fa31179b4f9ba9c9e933d1b122 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 15 Jul 2024 18:44:50 +0900 Subject: [PATCH] Updates --- assets/index-BXh8CfvM.css | 1 - assets/{index-CaKVcG8Q.js => index-Cd_-3AZh.js} | 6 +++--- assets/index-DqyVXp2l.css | 1 + index.html | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 assets/index-BXh8CfvM.css rename assets/{index-CaKVcG8Q.js => index-Cd_-3AZh.js} (99%) create mode 100644 assets/index-DqyVXp2l.css diff --git a/assets/index-BXh8CfvM.css b/assets/index-BXh8CfvM.css deleted file mode 100644 index b447d5d..0000000 --- a/assets/index-BXh8CfvM.css +++ /dev/null @@ -1 +0,0 @@ -.app{min-height:100vh;overflow-x:auto}header{display:flex;justify-content:center;position:sticky;left:0;font-size:xxx-large;font-weight:700;padding-bottom:2%}main{padding-left:2%}.option{padding-right:2%;position:fixed;right:0}.inputAndCal{display:flex}.inputText{font-size:large;padding:10px;width:334px;min-height:171px;resize:vertical}.miniInput{display:grid;position:relative;left:3px;height:80px}.inputNumber{font-size:large;width:130px;height:35px}.calButton{font-size:large;font-weight:700;position:relative;cursor:pointer;top:2px;width:130px;height:40px;background-color:#00eedada;color:#fff;transition:background-color .01s;border-radius:8px;border:none}.calButton:hover{background-color:#00eeda62}.calButton:active{background-color:#00eeda}.selectCenter{display:flex;position:relative;top:4px;justify-content:center}.optionCheckbox{display:grid;position:relative;top:8px}.hydra{padding-top:2%;width:464px}.hydraSize{position:relative;top:3px;cursor:pointer;width:350px;height:14px}.hydraRange{position:relative;top:3px;left:16px;cursor:pointer;width:350px;height:14px}footer{padding-left:2%;position:sticky;left:0;top:100vh;background-color:#affdd6} diff --git a/assets/index-CaKVcG8Q.js b/assets/index-Cd_-3AZh.js similarity index 99% rename from assets/index-CaKVcG8Q.js rename to assets/index-Cd_-3AZh.js index d640802..fe6bcac 100644 --- a/assets/index-CaKVcG8Q.js +++ b/assets/index-Cd_-3AZh.js @@ -1662,7 +1662,7 @@ void main() { `),E==="vert"?B+=`#define VERTEX_SHADER `:E==="frag"&&(B+=`#define FRAGMENT_SHADER `),I&&(B+="precision ".concat(I,` float; -`)),B}},{key:"_getEmptyTexture",value:function(){var E;return this._emptyTexture||((E=new a.default.Image(1,1)).set(0,0,255),this._emptyTexture=new a.default.Texture(this,E)),this._emptyTexture}},{key:"getTexture",value:function(E){E instanceof a.default.Framebuffer&&(E=E.color);var I=this.textures.get(E);return I||(I=new a.default.Texture(this,E),this.textures.set(E,I),I)}},{key:"getDiffusedTexture",value:function(E){var I,B,W=this;return this.diffusedTextures.get(E)!=null?this.diffusedTextures.get(E):(I=Math.floor(E.height/E.width*200),B=this._pInst.createFramebuffer({width:200,height:I,density:1}),this.diffusedShader||(this.diffusedShader=this._pInst.createShader(F.imageLightVert,F.imageLightDiffusedFrag)),B.draw(function(){W._pInst.shader(W.diffusedShader),W.diffusedShader.setUniform("environmentMap",E),W._pInst.noStroke(),W._pInst.rectMode(h.CENTER),W._pInst.noLights(),W._pInst.rect(0,0,200,I)}),this.diffusedTextures.set(E,B),B)}},{key:"getSpecularTexture",value:function(E){var I=this;if(this.specularTextures.get(E)!=null)return this.specularTextures.get(E);for(var B,W=[],$=this._pInst.createFramebuffer({width:512,height:512,density:1}),te=Math.log(512)/Math.log(2),se=(this.specularShader||(this.specularShader=this._pInst.createShader(F.imageLightVert,F.imageLightSpecularFrag)),512);1<=se;se/=2)(function(fe){$.resize(fe,fe);var ie=1-Math.log(fe)/Math.log(2)/te;$.draw(function(){I._pInst.shader(I.specularShader),I._pInst.clear(),I.specularShader.setUniform("environmentMap",E),I.specularShader.setUniform("roughness",ie),I._pInst.noStroke(),I._pInst.noLights(),I._pInst.plane(fe,fe)}),W.push($.get().drawingContext.getImageData(0,0,fe,fe))})(se);return $.remove(),B=new s.MipmapTexture(this,W,{}),this.specularTextures.set(E,B),B}},{key:"activeFramebuffer",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||null}},{key:"createFramebuffer",value:function(E){return new a.default.Framebuffer(this,E)}},{key:"_setStrokeUniforms",value:function(E){E.bindShader(),E.setUniform("uUseLineColor",this._useLineColor),E.setUniform("uMaterialColor",this.curStrokeColor),E.setUniform("uStrokeWeight",this.curStrokeWeight),E.setUniform("uStrokeCap",R[this.curStrokeCap]),E.setUniform("uStrokeJoin",C[this.curStrokeJoin])}},{key:"_setFillUniforms",value:function(E){var I=this,B=(E.bindShader(),this.mixedSpecularColor=d(this.curSpecularColor),0>7,127&ge,ne>>7,127&ne);for(var we=0;we>7,127&Pe,0,0)}}return{cellImageInfo:K,dimOffset:He,dimImageInfo:xe}}}}]),f}();h.default.RendererGL.prototype._renderText=function(f,g,j,M,k){if(this._textFont&&typeof this._textFont!="string"){if(!(k<=M)&&this._doFill){if(this._isOpenType()){f.push();var k=this._doStroke,T=this.drawMode,P=(this._doStroke=!1,this.drawMode=b.TEXTURE,this._textFont.font),R=(R=this._textFont._fontInfo)||(this._textFont._fontInfo=new i(P)),j=this._textFont._handleAlignment(this,g,j,M),M=this._textSize/P.unitsPerEm,C=(this.translate(j.x,j.y,0),this.scale(M,M,1),this.GL),j=!this._defaultFontShader,D=this._getFontShader(),A=(D.init(),D.bindShader(),j&&(D.setUniform("uGridImageSize",[64,64]),D.setUniform("uCellsImageSize",[64,64]),D.setUniform("uStrokeImageSize",[64,64]),D.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),F=(A||((M=this._textGeom=new h.default.Geometry(1,1,function(){for(var de=0;de<=1;de++)for(var ce=0;ce<=1;ce++)this.vertices.push(new h.default.Vector(ce,de,0)),this.uvs.push(ce,de)})).computeFaces().computeNormals(),A=this.createBuffers("glyph",M)),!0),j=!1,M=void 0;try{for(var N,G=this.retainedMode.buffers.text[Symbol.iterator]();!(F=(N=G.next()).done);F=!0)N.value._prepareBuffer(A,D)}catch(de){j=!0,M=de}finally{try{F||G.return==null||G.return()}finally{if(j)throw M}}this._bindBuffer(A.indexBuffer,C.ELEMENT_ARRAY_BUFFER),D.setUniform("uMaterialColor",this.curFillColor),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var q=0,V=null,z=P.stringToGlyphs(g),Y=!0,Q=!1,oe=void 0;try{for(var E,I=z[Symbol.iterator]();!(Y=(E=I.next()).done);Y=!0){var B,W,$=E.value,te=(V&&(q+=P.getKerningValue(V,$)),R.getGlyphInfo($));te.uGlyphRect&&(B=te.rowInfo,W=te.colInfo,D.setUniform("uSamplerStrokes",te.strokeImageInfo.imageData),D.setUniform("uSamplerRowStrokes",B.cellImageInfo.imageData),D.setUniform("uSamplerRows",B.dimImageInfo.imageData),D.setUniform("uSamplerColStrokes",W.cellImageInfo.imageData),D.setUniform("uSamplerCols",W.dimImageInfo.imageData),D.setUniform("uGridOffset",te.uGridOffset),D.setUniform("uGlyphRect",te.uGlyphRect),D.setUniform("uGlyphOffset",q),D.bindTextures(),C.drawElements(C.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),q+=$.advanceWidth,V=$}}catch(de){Q=!0,oe=de}finally{try{Y||I.return==null||I.return()}finally{if(Q)throw oe}}}finally{D.unbindShader(),this._doStroke=k,this.drawMode=T,C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),f.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return f}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":269,"../core/main":280,"./p5.RendererGL.Retained":336,"./p5.Shader":338,"core-js/modules/es.array.iterator":164,"core-js/modules/es.object.get-own-property-descriptor":183,"core-js/modules/es.object.to-string":187,"core-js/modules/es.regexp.exec":192,"core-js/modules/es.string.iterator":197,"core-js/modules/es.string.split":203,"core-js/modules/es.string.sub":205,"core-js/modules/es.symbol":209,"core-js/modules/es.symbol.description":207,"core-js/modules/es.symbol.iterator":208,"core-js/modules/es.weak-map":241,"core-js/modules/web.dom-collections.iterator":243}]},{},[264])(264)})})(Ih);var Ry=Ih.exports;const Iy=xd(Ry);var kl=function(){return kl=Object.assign||function(r){for(var n,_=1,t=arguments.length;_{let n="",_=0,t=0,w=0,x=0,c="thr",m=!1,a=!1,h=!0;r.setup=()=>{r.createCanvas(0,0),r.textAlign(r.CENTER,r.CENTER),r.frameRate(Uy)},r.updateWithProps=b=>{const y=n,s=_,u=t,l=w,d=x,p=c,o=m,i=a;({inputNumberList:n,numberSize:_,numberRange:t,numberHeight:w,sequenceHeight:x,select:c,delete1:m,deleteline:a}=b),(y!==n||s!==_||u!==t||l!==w||d!==x||p!==c||o!==m||i!==a)&&(h=!0)},r.draw=()=>{try{if(h){h=!1;const b=n.split(/\n/).filter(d=>d.trim()!=="");if(b.length===0){r.resizeCanvas(0,0);return}const y=b.map(d=>Dh(d)),s=y.reduce((d,{depth:p})=>d+(1+p)*w,0)+(b.length-1)*x,u=(.5+Math.max(...y.map(({width:d})=>d)))*t;r.resizeCanvas(u,s);let l=0;y.forEach(({array:d,depth:p})=>{Ml(d,r,_,t,w,l,p,c,m,a),l+=(1+p)*w+x})}}catch(b){console.error("Error in draw function:",b)}}};function Dh(r){const n=r.match(/\([\d,]+\)/g);if(n){const _=n.map(x=>x.slice(1,-1).split(",").map(c=>parseInt(c)).filter(c=>!isNaN(c))),t=Math.max(..._.map(x=>x.length));_.forEach(x=>{for(;x.lengthparseInt(t)).filter(t=>!isNaN(t));return{array:_,depth:Gy(_),width:_.length}}}function Gy(r){let n=0;for(;!ku(r,n)[1].every(_=>_===-1);)n++;return n}function yo(r){const n=r.length,_=r[0].length;let t=[];for(let w=0;w<_;w++){let x=[];for(let c=0;c{s.forEach((l,d)=>{const p=(.5+d)*t,o=(.5+c-u)*w+x;if(u===0)n.text(l,p,o);else{const i=y[u-1][d];if((!a||!s.every((f,g)=>d!==y[u][g])||i!==-1||y[u][d]!==-1)&&n.text(l,p,o),!h&&i!==-1){const f=(.5+i)*t,g=o+w;n.line(p,o+_/2,f,g-_/2),n.line(p,o+_/2,p,g-_/2)}}})})}else{let b=Ol(r,c);if(m==="0-Y"){const y=Fh(r,b);Ml(y,n,_,t,w,x,c,m,a,h)}else r.forEach((y,s)=>{y.forEach((u,l)=>{const d=(.5+l)*t,p=(.5+s)*w+x;if(s!==c&&n.text(u,d,p),s!==0){const o=b[s-1][l];if(!h&&o!==-1){const i=(.5+o)*t,f=p-w;n.line(d,p-_/2,i,f+_/2),n.line(d,p-_/2,d,f+_/2)}}})})}}function Nh(r,n){let _=Array(r.length);for(let t=r.length-1;t>-1;t--){let w=[];for(let x=0;x-1;t--){let w=[];for(let x=0;xGh(r,a));return[r,c]}const[_,t]=ku(r,n-1),w=_.map((c,m)=>t[m]===-1?1:c-_[t[m]]),x=Bh(w,t);return[w,x]}function Ol(r,n){const _=[];for(let t=0;t<=n;t++)_.push(Uh(r,t));return _}function Uh(r,n){if(n===0)return r[0].map((x,c)=>Gh(r[0],c));const _=Uh(r,n-1);return Bh(r[n],_)}function Bh(r,n){return r.map((_,t)=>{let w=t;for(;(w=n[w])!==-1&&r[t]<=r[w];);return w})}function Gh(r,n){let _=n-1;for(;_>=0&&r[_]>=r[n];)_--;return _}function zy(r,n,_){let t=r.length-1;for(;r[t][r[0].length-1]===0;)t--;const w=n[t][r[0].length-1];let x=[],c=[];for(let h=0;h{const f=r.split(/\n/).filter(T=>T.trim()!=="");if(f.length===0||!_)return;const g=Dh(f[f.length-1]);let j=[],M=[];if(Tl(g.array)){const T=Cl(g.array,g.depth).matSeq;M=Cl(g.array,g.depth).matParent,j=Nh(T,M)}else j=[...g.array],M=Ol(j,g.depth);const k=zy(j,M,parseInt(_));if(Tl(g.array)){const T=Ol(k,k.length-1);let R=Fh(k,T).toString();R=r+` +`)),B}},{key:"_getEmptyTexture",value:function(){var E;return this._emptyTexture||((E=new a.default.Image(1,1)).set(0,0,255),this._emptyTexture=new a.default.Texture(this,E)),this._emptyTexture}},{key:"getTexture",value:function(E){E instanceof a.default.Framebuffer&&(E=E.color);var I=this.textures.get(E);return I||(I=new a.default.Texture(this,E),this.textures.set(E,I),I)}},{key:"getDiffusedTexture",value:function(E){var I,B,W=this;return this.diffusedTextures.get(E)!=null?this.diffusedTextures.get(E):(I=Math.floor(E.height/E.width*200),B=this._pInst.createFramebuffer({width:200,height:I,density:1}),this.diffusedShader||(this.diffusedShader=this._pInst.createShader(F.imageLightVert,F.imageLightDiffusedFrag)),B.draw(function(){W._pInst.shader(W.diffusedShader),W.diffusedShader.setUniform("environmentMap",E),W._pInst.noStroke(),W._pInst.rectMode(h.CENTER),W._pInst.noLights(),W._pInst.rect(0,0,200,I)}),this.diffusedTextures.set(E,B),B)}},{key:"getSpecularTexture",value:function(E){var I=this;if(this.specularTextures.get(E)!=null)return this.specularTextures.get(E);for(var B,W=[],$=this._pInst.createFramebuffer({width:512,height:512,density:1}),te=Math.log(512)/Math.log(2),se=(this.specularShader||(this.specularShader=this._pInst.createShader(F.imageLightVert,F.imageLightSpecularFrag)),512);1<=se;se/=2)(function(fe){$.resize(fe,fe);var ie=1-Math.log(fe)/Math.log(2)/te;$.draw(function(){I._pInst.shader(I.specularShader),I._pInst.clear(),I.specularShader.setUniform("environmentMap",E),I.specularShader.setUniform("roughness",ie),I._pInst.noStroke(),I._pInst.noLights(),I._pInst.plane(fe,fe)}),W.push($.get().drawingContext.getImageData(0,0,fe,fe))})(se);return $.remove(),B=new s.MipmapTexture(this,W,{}),this.specularTextures.set(E,B),B}},{key:"activeFramebuffer",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||null}},{key:"createFramebuffer",value:function(E){return new a.default.Framebuffer(this,E)}},{key:"_setStrokeUniforms",value:function(E){E.bindShader(),E.setUniform("uUseLineColor",this._useLineColor),E.setUniform("uMaterialColor",this.curStrokeColor),E.setUniform("uStrokeWeight",this.curStrokeWeight),E.setUniform("uStrokeCap",R[this.curStrokeCap]),E.setUniform("uStrokeJoin",C[this.curStrokeJoin])}},{key:"_setFillUniforms",value:function(E){var I=this,B=(E.bindShader(),this.mixedSpecularColor=d(this.curSpecularColor),0>7,127&ge,ne>>7,127&ne);for(var we=0;we>7,127&Pe,0,0)}}return{cellImageInfo:K,dimOffset:He,dimImageInfo:xe}}}}]),f}();h.default.RendererGL.prototype._renderText=function(f,g,j,M,k){if(this._textFont&&typeof this._textFont!="string"){if(!(k<=M)&&this._doFill){if(this._isOpenType()){f.push();var k=this._doStroke,T=this.drawMode,P=(this._doStroke=!1,this.drawMode=b.TEXTURE,this._textFont.font),R=(R=this._textFont._fontInfo)||(this._textFont._fontInfo=new i(P)),j=this._textFont._handleAlignment(this,g,j,M),M=this._textSize/P.unitsPerEm,C=(this.translate(j.x,j.y,0),this.scale(M,M,1),this.GL),j=!this._defaultFontShader,D=this._getFontShader(),A=(D.init(),D.bindShader(),j&&(D.setUniform("uGridImageSize",[64,64]),D.setUniform("uCellsImageSize",[64,64]),D.setUniform("uStrokeImageSize",[64,64]),D.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),F=(A||((M=this._textGeom=new h.default.Geometry(1,1,function(){for(var de=0;de<=1;de++)for(var ce=0;ce<=1;ce++)this.vertices.push(new h.default.Vector(ce,de,0)),this.uvs.push(ce,de)})).computeFaces().computeNormals(),A=this.createBuffers("glyph",M)),!0),j=!1,M=void 0;try{for(var N,G=this.retainedMode.buffers.text[Symbol.iterator]();!(F=(N=G.next()).done);F=!0)N.value._prepareBuffer(A,D)}catch(de){j=!0,M=de}finally{try{F||G.return==null||G.return()}finally{if(j)throw M}}this._bindBuffer(A.indexBuffer,C.ELEMENT_ARRAY_BUFFER),D.setUniform("uMaterialColor",this.curFillColor),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var q=0,V=null,z=P.stringToGlyphs(g),Y=!0,Q=!1,oe=void 0;try{for(var E,I=z[Symbol.iterator]();!(Y=(E=I.next()).done);Y=!0){var B,W,$=E.value,te=(V&&(q+=P.getKerningValue(V,$)),R.getGlyphInfo($));te.uGlyphRect&&(B=te.rowInfo,W=te.colInfo,D.setUniform("uSamplerStrokes",te.strokeImageInfo.imageData),D.setUniform("uSamplerRowStrokes",B.cellImageInfo.imageData),D.setUniform("uSamplerRows",B.dimImageInfo.imageData),D.setUniform("uSamplerColStrokes",W.cellImageInfo.imageData),D.setUniform("uSamplerCols",W.dimImageInfo.imageData),D.setUniform("uGridOffset",te.uGridOffset),D.setUniform("uGlyphRect",te.uGlyphRect),D.setUniform("uGlyphOffset",q),D.bindTextures(),C.drawElements(C.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),q+=$.advanceWidth,V=$}}catch(de){Q=!0,oe=de}finally{try{Y||I.return==null||I.return()}finally{if(Q)throw oe}}}finally{D.unbindShader(),this._doStroke=k,this.drawMode=T,C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),f.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return f}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":269,"../core/main":280,"./p5.RendererGL.Retained":336,"./p5.Shader":338,"core-js/modules/es.array.iterator":164,"core-js/modules/es.object.get-own-property-descriptor":183,"core-js/modules/es.object.to-string":187,"core-js/modules/es.regexp.exec":192,"core-js/modules/es.string.iterator":197,"core-js/modules/es.string.split":203,"core-js/modules/es.string.sub":205,"core-js/modules/es.symbol":209,"core-js/modules/es.symbol.description":207,"core-js/modules/es.symbol.iterator":208,"core-js/modules/es.weak-map":241,"core-js/modules/web.dom-collections.iterator":243}]},{},[264])(264)})})(Ih);var Ry=Ih.exports;const Iy=xd(Ry);var kl=function(){return kl=Object.assign||function(r){for(var n,_=1,t=arguments.length;_{let n="",_=0,t=0,w=0,x=0,c="thr",m=!1,a=!1,h=!0;r.setup=()=>{r.createCanvas(0,0),r.textAlign(r.CENTER,r.CENTER),r.frameRate(Uy)},r.updateWithProps=b=>{const y=n,s=_,u=t,l=w,d=x,p=c,o=m,i=a;({inputNumberList:n,numberSize:_,numberRange:t,numberHeight:w,sequenceHeight:x,select:c,delete1:m,deleteline:a}=b),(y!==n||s!==_||u!==t||l!==w||d!==x||p!==c||o!==m||i!==a)&&(h=!0)},r.draw=()=>{try{if(h){h=!1;const b=n.split(/[\n\s]/).filter(d=>d.trim()!=="");if(b.length===0){r.resizeCanvas(0,0);return}const y=b.map(d=>Dh(d)),s=y.reduce((d,{depth:p})=>d+(1+p)*w,0)+(b.length-1)*x,u=(.5+Math.max(...y.map(({width:d})=>d)))*t;r.resizeCanvas(u,s);let l=0;y.forEach(({array:d,depth:p})=>{Ml(d,r,_,t,w,l,p,c,m,a),l+=(1+p)*w+x})}}catch(b){console.error("Error in draw function:",b)}}};function Dh(r){const n=r.match(/\([\d,]+\)/g);if(n){const _=n.map(x=>x.slice(1,-1).split(",").map(c=>parseInt(c)).filter(c=>!isNaN(c))),t=Math.max(..._.map(x=>x.length));_.forEach(x=>{for(;x.lengthparseInt(t)).filter(t=>!isNaN(t));return{array:_,depth:Gy(_),width:_.length}}}function Gy(r){let n=0;for(;!ku(r,n)[1].every(_=>_===-1);)n++;return n}function yo(r){const n=r.length,_=r[0].length;let t=[];for(let w=0;w<_;w++){let x=[];for(let c=0;c{s.forEach((l,d)=>{const p=(.5+d)*t,o=(.5+c-u)*w+x;if(u===0)n.text(l,p,o);else{const i=y[u-1][d];if((!a||!s.every((f,g)=>d!==y[u][g])||i!==-1||y[u][d]!==-1)&&n.text(l,p,o),!h&&i!==-1){const f=(.5+i)*t,g=o+w;n.line(p,o+_/2,f,g-_/2),n.line(p,o+_/2,p,g-_/2)}}})})}else{let b=Ol(r,c);if(m==="0-Y"){const y=Fh(r,b);Ml(y,n,_,t,w,x,c,m,a,h)}else r.forEach((y,s)=>{y.forEach((u,l)=>{const d=(.5+l)*t,p=(.5+s)*w+x;if(s!==c&&n.text(u,d,p),s!==0){const o=b[s-1][l];if(!h&&o!==-1){const i=(.5+o)*t,f=p-w;n.line(d,p-_/2,i,f+_/2),n.line(d,p-_/2,d,f+_/2)}}})})}}function Nh(r,n){let _=Array(r.length);for(let t=r.length-1;t>-1;t--){let w=[];for(let x=0;x-1;t--){let w=[];for(let x=0;xGh(r,a));return[r,c]}const[_,t]=ku(r,n-1),w=_.map((c,m)=>t[m]===-1?1:c-_[t[m]]),x=Bh(w,t);return[w,x]}function Ol(r,n){const _=[];for(let t=0;t<=n;t++)_.push(Uh(r,t));return _}function Uh(r,n){if(n===0)return r[0].map((x,c)=>Gh(r[0],c));const _=Uh(r,n-1);return Bh(r[n],_)}function Bh(r,n){return r.map((_,t)=>{let w=t;for(;(w=n[w])!==-1&&r[t]<=r[w];);return w})}function Gh(r,n){let _=n-1;for(;_>=0&&r[_]>=r[n];)_--;return _}function zy(r,n,_){let t=r.length-1;for(;r[t][r[0].length-1]===0;)t--;const w=n[t][r[0].length-1];let x=[],c=[];for(let h=0;h{const f=r.split(/[\n\s]/).filter(T=>T.trim()!=="");if(f.length===0||!_)return;const g=Dh(f[f.length-1]);let j=[],M=[];if(Tl(g.array)){const T=Cl(g.array,g.depth).matSeq;M=Cl(g.array,g.depth).matParent,j=Nh(T,M)}else j=[...g.array],M=Ol(j,g.depth);const k=zy(j,M,parseInt(_));if(Tl(g.array)){const T=Ol(k,k.length-1);let R=Fh(k,T).toString();R=r+` `+R,n(R)}else{const P=yo(k).map(C=>"("+C.slice(0,-1).toString()+")");let R=r+` -`+P.toString().replace(/\),\(/g,")(");n(R)}};return lt.jsxs("div",{className:"app",children:[lt.jsx("header",{children:"why mounTain"}),lt.jsxs("main",{children:[lt.jsxs("div",{className:"option",children:[lt.jsxs("div",{className:"inputAndCal",children:[lt.jsx("textarea",{className:"inputText",value:r,onChange:f=>n(f.target.value),placeholder:"入力A",autoComplete:"off",rows:5,cols:50}),lt.jsxs("div",{className:"miniInput",children:[lt.jsx("input",{className:"inputNumber",value:_,onChange:f=>t(f.target.value),type:"number",placeholder:"入力B",autoComplete:"off",min:"0"}),lt.jsx("button",{onClick:()=>i(),className:"calButton",children:"A[B]を計算"}),lt.jsx("div",{className:"selectCenter",children:lt.jsx("div",{className:"select is-rounded is-normal",children:lt.jsxs("select",{value:s,onChange:f=>u(f.target.value),children:[lt.jsx("option",{value:"0-Y",children:"0-Y"}),lt.jsx("option",{value:"BMS",children:"BMS"}),lt.jsx("option",{value:"thr",children:"そのまま"})]})})}),lt.jsxs("div",{className:"optionCheckbox",children:[lt.jsxs("label",{className:"checkbox",children:[lt.jsx("input",{type:"checkbox",checked:p,onChange:()=>o(!p)})," 線を削除"]}),s==="0-Y"||s==="thr"?lt.jsxs("label",{className:"checkbox",children:[lt.jsx("input",{type:"checkbox",checked:l,onChange:()=>d(!l)})," 余分な1を削除"]}):lt.jsx(lt.Fragment,{})]})]})]}),lt.jsx("div",{className:"hydra",children:lt.jsxs("ul",{children:[lt.jsxs("li",{children:["数字の大きさ:",lt.jsx("input",{className:"hydraSize",value:w,onChange:f=>x(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]}),lt.jsxs("li",{children:["数字間の幅:",lt.jsx("input",{className:"hydraRange",value:c,onChange:f=>m(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]}),lt.jsxs("li",{children:["数字間の高さ:",lt.jsx("input",{className:"hydraSize",value:a,onChange:f=>h(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]}),lt.jsxs("li",{children:["数列間の高さ:",lt.jsx("input",{className:"hydraSize",value:b,onChange:f=>y(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]})]})})]}),lt.jsx(Fy,{sketch:By,inputNumberList:r,numberSize:w,numberRange:c,numberHeight:a,sequenceHeight:b,select:s,delete1:l,deleteline:p})]}),lt.jsxs("footer",{children:[lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%83%96%E3%83%AD%E3%82%B0:%E3%82%86%E3%81%8D%E3%81%A8/%5C(0%5C)-Y%E6%95%B0%E5%88%97",target:"_blank",rel:"noreferrer",children:'"0-Y sequence"'})," and ",lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%83%96%E3%83%AD%E3%82%B0:BashicuHyudora/BASIC%E8%A8%80%E8%AA%9E%E3%81%AB%E3%82%88%E3%82%8B%E5%B7%A8%E5%A4%A7%E6%95%B0%E3%81%AE%E3%81%BE%E3%81%A8%E3%82%81#%E3%83%90%E3%82%B7%E3%82%AF%E8%A1%8C%E5%88%97%E6%95%B0(Bashicu_matrix_number)",target:"_blank",rel:"noreferrer",children:'"Bashicu matrix"'})," were defined by ",lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC:%E3%82%86%E3%81%8D%E3%81%A8",target:"_blank",rel:"noreferrer",children:"ゆきと"})," and ",lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC:BashicuHyudora",target:"_blank",rel:"noreferrer",children:"Bashicu"}),", respectively.",lt.jsx("br",{}),"The program ",lt.jsx("a",{href:"https://github.com/SanukiMiyatsuko/why_mountain",target:"_blank",rel:"noreferrer",children:"https://github.com/SanukiMiyatsuko/why_mountain"})," is licensed by ",lt.jsx("a",{href:"https://creativecommons.org/licenses/by-sa/3.0/legalcode",target:"_blank",rel:"noreferrer",children:"Creative Commons Attribution-ShareAlike 3.0 Unported License"}),".",lt.jsx("br",{}),"I referred to ",lt.jsx("a",{href:"https://naruyoko.github.io/whYmountain/",target:"_blank",rel:"noreferrer",children:"whY mountain"})," by ",lt.jsx("a",{href:"https://github.com/Naruyoko",target:"_blank",rel:"noreferrer",children:"Naruyoko"}),".",lt.jsx("br",{}),"Last updated: 2024/07/13"]})]})}Aa.createRoot(document.getElementById("root")).render(lt.jsx(Il.StrictMode,{children:lt.jsx(Vy,{})})); +`+P.toString().replace(/\),\(/g,")(");n(R)}};return lt.jsxs("div",{className:"app",children:[lt.jsx("header",{children:"why mounTain"}),lt.jsxs("main",{children:[lt.jsx("div",{className:"optionAndCal",children:lt.jsx("div",{className:"option",children:lt.jsx("div",{className:"inputCon",children:lt.jsxs("div",{className:"inputTab",children:[lt.jsx("textarea",{className:"inputText",value:r,onChange:f=>n(f.target.value),placeholder:"入力A",autoComplete:"off",rows:5,cols:50}),lt.jsxs("div",{className:"miniInput",children:[lt.jsx("input",{className:"inputNumber",value:_,onChange:f=>t(f.target.value),type:"number",placeholder:"入力B",autoComplete:"off",min:"0"}),lt.jsxs("select",{value:s,onChange:f=>u(f.target.value),children:[lt.jsx("option",{value:"0-Y",children:"0-Y"}),lt.jsx("option",{value:"BMS",children:"BMS"}),lt.jsx("option",{value:"thr",children:"そのまま"})]}),lt.jsx("button",{className:"calButton",onClick:()=>i(),children:"A[B]を計算"})]}),lt.jsxs("div",{className:"optionCheckbox",children:[lt.jsxs("label",{className:"checkbox",children:[lt.jsx("input",{type:"checkbox",checked:p,onChange:()=>o(!p)})," 線を削除"]}),s!=="BMS"?lt.jsxs("label",{className:"checkbox",children:[lt.jsx("input",{type:"checkbox",checked:l,onChange:()=>d(!l)})," 余分な1を削除"]}):lt.jsx(lt.Fragment,{})]}),lt.jsx("div",{className:"hydra",children:lt.jsxs("ul",{children:[lt.jsxs("li",{children:["数字の大きさ:",lt.jsx("input",{className:"hydraSize",value:w,onChange:f=>x(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]}),lt.jsxs("li",{children:["数字間の幅:",lt.jsx("input",{className:"hydraRange",value:c,onChange:f=>m(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]}),lt.jsxs("li",{children:["数字間の高さ:",lt.jsx("input",{className:"hydraSize",value:a,onChange:f=>h(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]}),lt.jsxs("li",{children:["数列間の高さ:",lt.jsx("input",{className:"hydraSize",value:b,onChange:f=>y(parseInt(f.target.value)),min:"0",max:"200",type:"range"})]})]})})]})})})}),lt.jsx(Fy,{sketch:By,inputNumberList:r,numberSize:w,numberRange:c,numberHeight:a,sequenceHeight:b,select:s,delete1:l,deleteline:p})]}),lt.jsxs("footer",{children:[lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%83%96%E3%83%AD%E3%82%B0:%E3%82%86%E3%81%8D%E3%81%A8/%5C(0%5C)-Y%E6%95%B0%E5%88%97",target:"_blank",rel:"noreferrer",children:'"0-Y sequence"'})," and ",lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%83%96%E3%83%AD%E3%82%B0:BashicuHyudora/BASIC%E8%A8%80%E8%AA%9E%E3%81%AB%E3%82%88%E3%82%8B%E5%B7%A8%E5%A4%A7%E6%95%B0%E3%81%AE%E3%81%BE%E3%81%A8%E3%82%81#%E3%83%90%E3%82%B7%E3%82%AF%E8%A1%8C%E5%88%97%E6%95%B0(Bashicu_matrix_number)",target:"_blank",rel:"noreferrer",children:'"Bashicu matrix"'})," were defined by ",lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC:%E3%82%86%E3%81%8D%E3%81%A8",target:"_blank",rel:"noreferrer",children:"ゆきと"})," and ",lt.jsx("a",{href:"https://googology.fandom.com/ja/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC:BashicuHyudora",target:"_blank",rel:"noreferrer",children:"Bashicu"}),", respectively.",lt.jsx("br",{}),"The program ",lt.jsx("a",{href:"https://github.com/SanukiMiyatsuko/why_mountain",target:"_blank",rel:"noreferrer",children:"https://github.com/SanukiMiyatsuko/why_mountain"})," is licensed by ",lt.jsx("a",{href:"https://creativecommons.org/licenses/by-sa/3.0/legalcode",target:"_blank",rel:"noreferrer",children:"Creative Commons Attribution-ShareAlike 3.0 Unported License"}),".",lt.jsx("br",{}),"I referred to ",lt.jsx("a",{href:"https://naruyoko.github.io/whYmountain/",target:"_blank",rel:"noreferrer",children:"whY mountain"})," by ",lt.jsx("a",{href:"https://github.com/Naruyoko",target:"_blank",rel:"noreferrer",children:"Naruyoko"}),".",lt.jsx("br",{}),"Last updated: 2024/07/13"]})]})}Aa.createRoot(document.getElementById("root")).render(lt.jsx(Il.StrictMode,{children:lt.jsx(Vy,{})})); diff --git a/assets/index-DqyVXp2l.css b/assets/index-DqyVXp2l.css new file mode 100644 index 0000000..785c4e6 --- /dev/null +++ b/assets/index-DqyVXp2l.css @@ -0,0 +1 @@ +.app{min-height:100vh;overflow-x:auto}header{display:flex;justify-content:center;position:sticky;left:0;font-size:xxx-large;font-weight:700;padding-bottom:1%}main{padding-left:2%}.optionAndCal{position:fixed;right:0;z-index:1}.option{position:relative;right:0}.inputCon{display:block;background-color:#0000;border:1px solid #00000033;border-radius:10px;min-width:250px;min-height:232px;resize:both;direction:rtl;overflow:hidden}.inputTab{direction:ltr;width:100%;height:100%;display:grid;grid-template-rows:1fr 40px 37px 103px;background-color:#fff}.inputText{width:100%;height:100%;background-color:#0000;border-radius:10px 10px 0 0;border:none;font-size:large;padding-top:8px;padding-left:10px;resize:none;overflow:auto;white-space:nowrap}.inputText:focus{outline:0}.miniInput{display:flex;position:relative;top:0;width:100%}.inputNumber{font-size:large;padding-left:12px;width:100%;height:40px;min-width:40px;border:1px solid #00000033;border-radius:10px 0 0 10px}.inputNumber:focus{outline:0}select{width:100%;height:40px;min-width:98px;padding-left:12px;padding-right:12px;border:1px solid #00000033;border-left:none;border-right:none}select:focus{outline:0}.calButton{font-size:large;font-weight:700;cursor:pointer;width:100%;height:40px;min-width:104px;background-color:#00eedada;color:#fff;transition:background-color .01s;border:none;border-radius:0 10px 10px 0}.calButton:hover{background-color:#00eeda62}.calButton:active{background-color:#00eeda}.optionCheckbox{display:flex;width:100%;height:100%}label{margin:11px}label::selection{background-color:#0000;color:#000}.hydra{padding-left:12px;width:100%;height:100%}li::selection{background-color:#0000;color:#000}.hydraSize{position:relative;top:3px;cursor:pointer;width:calc(100% - 124px);height:14px}.hydraRange{position:relative;top:3px;left:16px;cursor:pointer;width:calc(100% - 124px);height:14px}footer{padding-left:2%;position:sticky;left:0;top:100vh;background-color:#affdd6} diff --git a/index.html b/index.html index 1e781d1..ca81eb6 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ why mounTain - - + +