PageSourceSearch

https://laserdrift.com/_next/static/chunks/863-a39cd96e3a3b5473.js

js laserdrift.com collected 2026-10-06 00:53:37 UTC 7,352 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[863],{2808:function(e,t,r){r.d(t,{i:function(){return i}});var o=r(6375);let i=parseInt(o.REVISION.replace(/\D+/g,""))},5486:function(e,t,r){r.d(t,{$1:function(){return mergeVertices},LZ:function(){return toCreasedNormals},Vs:function(){return toTrianglesDrawMode},qf:function(){return mergeBufferGeometries}});var o=r(6375);let mergeBufferGeometries=(e,t)=>{let r=null!==e[0].index,i=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),s={},u={},l=e[0].morphTargetsRelative,f=new o.BufferGeometry,a=0;if(e.forEach((e,o)=>{let m=0;if(r!==(null!==e.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+o+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let t in e.attributes){if(!i.has(t))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+o+'. All geometries must have compatible attributes; make sure "'+t+'" attribute exists among all geometries, or in none of them.'),null;void 0===s[t]&&(s[t]=[]),s[t].push(e.attributes[t]),m++}if(m!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+o+". Make sure all geometries have the same number of attributes."),null;if(l!==e.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+o+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let t in e.morphAttributes){if(!n.has(t))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+o+".  .morphAttributes must be consistent throughout all geometries."),null;void 0===u[t]&&(u[t]=[]),u[t].push(e.morphAttributes[t])}if(f.userData.mergedUserData=f.userData.mergedUserData||[],f.userData.mergedUserData.push(e.userData),t){let t;if(e.index)t=e.index.count;else{if(void 0===e.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+o+". The geometry must have either an index or a position attribute"),null;t=e.attributes.position.count}f.addGroup(a,t,o),a+=t}}),r){let t=0,r=[];e.forEach(e=>{let o=e.index;for(let e=0;e<o.count;++e)r.push(o.getX(e)+t);t+=e.attributes.position.count}),f.setIndex(r)}for(let e in s){let t=mergeBufferAttributes(s[e]);if(!t)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+e+" attribute."),null;f.setAttribute(e,t)}for(let e in u){let t=u[e][0].length;if(0===t)break;f.morphAttributes=f.morphAttributes||{},f.morphAttributes[e]=[];for(let r=0;r<t;++r){let t=[];for(let o=0;o<u[e].length;++o)t.push(u[e][o][r]);let o=mergeBufferAttributes(t);if(!o)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+e+" morphAttribute."),null;f.morphAttributes[e].push(o)}}return f},mergeBufferAttributes=e=>{let t,r,i;let n=0;if(e.forEach(e=>(void 0===t&&(t=e.array.constructor),t!==e.array.constructor)?(console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null):(void 0===r&&(r=e.itemSize),r!==e.itemSize)?(console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null):(void 0===i&&(i=e.normalized),i!==e.normalized)?(console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null):void(n+=e.array.length)),t&&r){let s=new t(n),u=0;return e.forEach(e=>{s.set(e.array,u),u+=e.array.length}),new o.BufferAttribute(s,r,i)}};function mergeVertices(e,t=1e-4){t=Math.max(t,Number.EPSILON);let r={},i=e.getIndex(),n=e.getAttribute("position"),s=i?i.count:n.count,u=0,l=Object.keys(e.attributes),f={},a={},m=[],g=["getX","getY","getZ","getW"];for(let t=0,r=l.length;t<r;t++){let r=l[t];f[r]=[];let o=e.morphAttributes[r];o&&(a[r]=Array(o.length).fill(0).map(()=>[]))}let h=Math.log10(1/t),c=Math.pow(10,h);for(let t=0;t<s;t++){let o=i?i.getX(t):t,n="";for(let t=0,r=l.length;t<r;t++){let r=l[t],i=e.getAttribute(r),s=i.itemSize;
1for(let e=0;e<s;e++)n+=`${~~(i[g[e]](o)*c)},`}if(n in r)m.push(r[n]);else{for(let t=0,r=l.length;t<r;t++){let r=l[t],i=e.getAttribute(r),n=e.morphAttributes[r],s=i.itemSize,u=f[r],m=a[r];for(let e=0;e<s;e++){let t=g[e];if(u.push(i[t](o)),n)for(let e=0,r=n.length;e<r;e++)m[e].push(n[e][t](o))}}r[n]=u,m.push(u),u++}}let b=e.clone();for(let t=0,r=l.length;t<r;t++){let r=l[t],i=e.getAttribute(r),n=new i.array.constructor(f[r]),s=new o.BufferAttribute(n,i.itemSize,i.normalized);if(b.setAttribute(r,s),r in a)for(let t=0;t<a[r].length;t++){let i=e.morphAttributes[r][t],n=new i.array.constructor(a[r][t]),s=new o.BufferAttribute(n,i.itemSize,i.normalized);b.morphAttributes[r][t]=s}}return b.setIndex(m),b}function toTrianglesDrawMode(e,t){if(t===o.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t!==o.TriangleFanDrawMode&&t!==o.TriangleStripDrawMode)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e;{let r=e.getIndex();if(null===r){let t=[],o=e.getAttribute("position");if(void 0===o)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<o.count;e++)t.push(e);e.setIndex(t),r=e.getIndex()}let i=r.count-2,n=[];if(r){if(t===o.TriangleFanDrawMode)for(let e=1;e<=i;e++)n.push(r.getX(0)),n.push(r.getX(e)),n.push(r.getX(e+1));else for(let e=0;e<i;e++)e%2==0?(n.push(r.getX(e)),n.push(r.getX(e+1)),n.push(r.getX(e+2))):(n.push(r.getX(e+2)),n.push(r.getX(e+1)),n.push(r.getX(e)))}n.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let s=e.clone();return s.setIndex(n),s.clearGroups(),s}}function toCreasedNormals(e,t=Math.PI/3){let r=Math.cos(t),i=(1+1e-10)*100,n=[new o.Vector3,new o.Vector3,new o.Vector3],s=new o.Vector3,u=new o.Vector3,l=new o.Vector3,f=new o.Vector3;function hashVertex(e){let t=~~(e.x*i),r=~~(e.y*i),o=~~(e.z*i);return`${t},${r},${o}`}let a=e.index?e.toNonIndexed():e,m=a.attributes.position,g={};for(let e=0,t=m.count/3;e<t;e++){let t=3*e,r=n[0].fromBufferAttribute(m,t+0),i=n[1].fromBufferAttribute(m,t+1),l=n[2].fromBufferAttribute(m,t+2);s.subVectors(l,i),u.subVectors(r,i);let f=new o.Vector3().crossVectors(s,u).normalize();for(let e=0;e<3;e++){let t=n[e],r=hashVertex(t);r in g||(g[r]=[]),g[r].push(f)}}let h=new Float32Array(3*m.count),c=new o.BufferAttribute(h,3,!1);for(let e=0,t=m.count/3;e<t;e++){let t=3*e,o=n[0].fromBufferAttribute(m,t+0),i=n[1].fromBufferAttribute(m,t+1),a=n[2].fromBufferAttribute(m,t+2);s.subVectors(a,i),u.subVectors(o,i),l.crossVectors(s,u).normalize();for(let e=0;e<3;e++){let o=n[e],i=hashVertex(o),s=g[i];f.set(0,0,0);for(let e=0,t=s.length;e<t;e++){let t=s[e];l.dot(t)>r&&f.add(t)}f.normalize(),c.setXYZ(t+e,f.x,f.y,f.z)}}return a.setAttribute("normal",c),a}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.