0xa5d9232c…5604sent to0xa7d8d9ef…d270·#15,540,980·view on Etherscan
){let o,a=e,s=t,c=a.length,n=[],i=2;o=0==r?0:3;for(let e=0;e<c;e++){let t=a.charAt(e);if("f"==t){0==o?i=2==i?6:2:1==o?i=2==i?4:4==i?2:4:2==o?i=2==i?6:6==i?2:6:3==o?i=3==i?5:3:4==o&&(i=5==i?7:5),n.push(new Go3d(2,void 0,void 0,void 0,void 0,void 0,s.faces[i],s));let e=n[n.length-1];s=e}else"+"==t?o<3?(o+=1,o>2&&(o=0)):(o+=1,o>4&&(o=3)):"/"==t&&(o=o<3?3:0)}return n}}class Face{constructor(e,t,r,o){this.type=o,this.facePts=[],this.center=new p5.Vector,this.facePts[0]=createVector(e.x,e.y,e.z),this.facePts[1]=createVector(t.x,t.y,t.z),this.facePts[2]=createVector(r.x,r.y,r.z),this.center=vertex_average(this.facePts),this.normal=p5.Vector.sub(this.facePts[1],this.facePts[0]).cross(p5.Vector.sub(this.facePts[2],this.facePts[0])),this.normal.mult(-1),this.normal.normalize()}}