/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{dot as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{transformMat4 as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";class n{}class c{numProfilesPerJoin(){return 1}extrude(t,r,e){for(let i=0;i<r.vertices.length;++i)e(t.frame,r.vertices[i],r.normals[i],!1)}}class l{constructor(t,r){this.cutoffAngle=t,this.numBendSubdivisions=r}numProfilesPerJoin(){return this.numBendSubdivisions+1}extrude(r,i,s){const o=h,{rotationAngle:n,rotationRight:c,frame:l}=r;if(Math.abs(n)>=this.cutoffAngle){const m=r.rotationFrameUp;for(let h=0;h<this.numBendSubdivisions+1;++h){t(u,.5*-n+h*n/this.numBendSubdivisions,m),a(o,l,u);for(let t=0;t<i.vertices.length;++t){if(e(i.vertices[t],c)*n>=0)s(o,i.vertices[t],i.normals[t],!1);else{s(l,r.applyMiterStretch(f,i.vertices[t]),i.normals[t],!0)}}}}else for(let t=0;t<this.numBendSubdivisions+1;++t)for(let o=0;o<i.vertices.length;++o){const t=e(i.vertices[o],c)*n>=0;s(l,r.applyMiterStretch(f,i.vertices[o]),i.normals[o],!t)}}}class m{constructor(){this.up=o(),this.right=o()}}function a(t,r,e){s(t.up,r.up,e),s(t.right,r.right,e)}const f=i(),u=r(),h=new m;export{m as Frame2D,l as MiterExtruder,n as PathExtruder,c as SimpleExtruder};
