@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
3 lines (2 loc) • 850 B
JavaScript
import{o as e,ap as t,f as n,B as f}from"./index-B8IgtevW.esm.min.js";function s(s,r,i,o,u,l,g){const h=s._device,a=4*o,w=h.createTexture({size:[a,1],format:"rgba32float",usage:e.TEXTURE_BINDING|e.COPY_DST});h.queue.writeTexture({texture:w},u.buffer,{bytesPerRow:16*a},{width:a,height:1});const B=new t(r.length);for(let e=0;e<r.length;e++)B[e]=r[e];const E=n(s,B,f.VERTEX),T=n(s,i,f.VERTEX);let c=null,j=null;if(l&&g){const e=new t(l.length);for(let t=0;t<l.length;t++)e[t]=l[t];c=n(s,e,f.VERTEX),j=n(s,g,f.VERTEX)}return{boneTexture:w,boneCount:o,jointsBuffer:E,weightsBuffer:T,joints:r,weights:i,boneMatrices:u,joints1Buffer:c,weights1Buffer:j,joints1:l??null,weights1:g??null,_skinBuffers:{jointsBuffer:E,weightsBuffer:T,joints1Buffer:c,weights1Buffer:j}}}export{s as createSkeleton};
//# sourceMappingURL=create-skeleton-BKHzMJ5P.esm.min.js.map