export function create() {
    var source = "const e=\"function\"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError(\"Cannot convert undefined or null to object\");const t=Object(e);for(let e=1,n=arguments.length;e<n;++e){const n=arguments[e];if(null!=n)for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e])}return t},n=\"undefined\"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():\"\";n.indexOf(\"firefox\");-1!==n.indexOf(\"safari\")&&-1==n.indexOf(\"chrom\")&&(n.indexOf(\"version/15.4\")>=0||n.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==n.indexOf(\"webkit\")&&n.indexOf(\"edge\"),n.indexOf(\"macintosh\"),\"undefined\"!=typeof WorkerGlobalScope&&\"undefined\"!=typeof OffscreenCanvas&&(self,WorkerGlobalScope),function(){let e=!1;try{const n=Object.defineProperty({},\"passive\",{get:function(){e=!0}});window.addEventListener(\"_\",null,n),window.removeEventListener(\"_\",null,n)}catch(e){}}(),new Array(6);const t=\"GENERATE_BUFFERS\",o=[],r={vertexPosition:0,indexPosition:0};function i(e,n,t,o,r){e[n+0]=t,e[n+1]=o,e[n+2]=r}function s(e,n,t,s,f,c){const l=3+f,a=e[n+0],u=e[n+1],d=o;d.length=f;for(let t=0;t<d.length;t++)d[t]=e[n+2+t];let g=c?c.vertexPosition:0,x=c?c.indexPosition:0;const h=g/l;return i(t,g,a,u,0),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,1),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,2),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,3),d.length&&t.set(d,g+3),g+=l,s[x++]=h,s[x++]=h+1,s[x++]=h+3,s[x++]=h+1,s[x++]=h+2,s[x++]=h+3,r.vertexPosition=g,r.indexPosition=x,r}const f=self;f.onmessage=n=>{const o=n.data;if(o.type===t){const n=3,t=2,r=o.customAttributesCount,i=t+r,c=new Float32Array(o.renderInstructions),l=c.length/i,a=4*l*(r+n),u=new Uint32Array(6*l),d=new Float32Array(a);let g;for(let e=0;e<c.length;e+=i)g=s(c,e,d,u,r,g);const x=e({vertexBuffer:d.buffer,indexBuffer:u.buffer,renderInstructions:c.buffer},o);f.postMessage(x,[d.buffer,u.buffer,c.buffer])}};";
    return new Worker(typeof Blob === 'undefined'
        ? 'data:application/javascript;base64,' + Buffer.from(source, 'binary').toString('base64')
        : URL.createObjectURL(new Blob([source], { type: 'application/javascript' })));
}
//# sourceMappingURL=webgl.js.map