<!-- SOLID-PLAYTIME · part 77 -->
omBufferAttribute(n,v),l.fromBufferAttribute(n,y),r.add(c),o.add(c),l.add(c),n.setXYZ(p,r.x,r.y,r.z),n.setXYZ(v,o.x,o.y,o.z),n.setXYZ(y,l.x,l.y,l.z)}else for(let f=0,h=e.count;f<h;f+=3)i.fromBufferAttribute(e,f+0),s.fromBufferAttribute(e,f+1),a.fromBufferAttribute(e,f+2),c.subVectors(a,s),u.subVectors(i,s),c.cross(u),n.setXYZ(f+0,c.x,c.y,c.z),n.setXYZ(f+1,c.x,c.y,c.z),n.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)yn.fromBufferAttribute(t,e),yn.normalize(),t.setXYZ(e,yn.x,yn.y,yn.z)}toNonIndexed(){function t(r,o){let{array:l,itemSize:c,normalized:u}=r,f=new l.constructor(o.length*c),h=0,p=0;for(let v=0,y=o.length;v<y;v++){if(r.isInterleavedBufferAttribute)h=o[v]*r.data.stride+r.offset;else h=o[v]*c;for(let U=0;U<c;U++)f[p++]=l[h++]}return new tn(f,c,u)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new me,n=this.index.array,i=this.attributes;for(let r in i){let o=i[r],l=t(o,n);e.setAttribute(r,l)}let s=this.morphAttributes;for(let r in s){let o=[],l=s[r];for(let c=0,u=l.length;c<u;c++){let f=l[c],h=t(f,n);o.push(h)}e.morphAttributes[r]=o}e.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let r=0,o=a.length;r<o;r++){let l=a[r];e.addGroup(l.start,l.count,l.materialIndex)}return e}toJSON(){let t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!=="")t.name=this.name;if(Object.keys(this.userData).length>0)t.userData=this.userData;if(this.parameters!==void 0){let o=this.parameters;for(let l in o)if(o[l]!==void 0)t[l]=o[l];return t}t.data={attributes:{}};let e=this.index;if(e!==null)t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)};let n=this.attributes;for(let o in n){let l=n[o];t.data.attributes[o]=l.toJSON(t.data)}let i={},s=!1;for(let o in this.morphAttributes){let l=this.morphAttributes[o],c=[];for(let u=0,f=l.length;u<f;u++){let h=l[u];c.push(h.toJSON(t.data))}if(c.length>0)i[o]=c,s=!0}if(s)t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;if(a.length>0)t.data.groups=JSON.parse(JSON.stringify(a));let r=this.boundingSphere;if(r!==null)t.data.boundingSphere=r.toJSON();return t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;if(n!==null)this.setIndex(n.clone());let i=t.attributes;for(let l in i){let c=i[l];this.setAttribute(l,c.clone(e))}let s=t.morphAttributes;for(let l in s){let c=[],u=s[l];for(let f=0,h=u.length;f<h;f++)c.push(u[f].clone(e));this.morphAttributes[l]=c}this.morphTargetsRelative=t.morphTargetsRelative;let a=t.groups;for(let l=0,c=a.length;l<c;l++){let u=a[l];this.addGroup(u.start,u.count,u.materialIndex)}let r=t.boundingBox;if(r!==null)this.boundingBox=r.clone();let o=t.boundingSphere;if(o!==null)this.boundingSphere=o.clone();return this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}var mb=new ie,or=new Yo,Wh=new Ns,Ub=new C,Yh=new C,Qh=new C,qh=new C,Em=new C,Zh=new C,gb=new C,Kh=new C;class At extends Ne{constructor(t=new me,e=new Pn){super();this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){if(super.copy(t,e),t.morphTargetInfluences!==void 0)this.morphTargetInfluences=t.morphTargetInfluences.slice();if(t.morphTargetDictionary!==void 0)this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary);return this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;s<a;s++){let r=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[r]=s}}}}getVertexPosition(t,e){let n=this.geometry,i=n.attributes.position,s=n.morphAttributes.position,a=n.morphTargetsRelative;e.fromBufferAttribute(i,t);let r=this.morphTargetInfluences;if(s&&r){Zh.set(0,0,0);for(let o=0,l=s.length;o<l;o++){let c=r[o],u=s[o];if(c===0)continue;if(Em.fromBufferAttribute(u,t),a)Zh.addScaledVector(Em,c);else Zh.addScaledVector(Em.sub(e),c)}e.add(Zh)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;if(i===void 0)return;if(n.boundingSphere===null)n.computeBoundingSphere();if(Wh.copy(n.boundingSphere),Wh.applyMatrix4(s),or.copy(t.ray).recast(t.near),Wh.containsPoint(or.origin)===!1){if(or.intersectSphere(Wh,Ub)===null)return;if(or.origin.distanc