poly_mesh
legacy
/* supported format: .obj .mqo must be convex polygon */ { obj:({p,n,t},src)=>(console.log(src),{//function for .obj convertion p:p.map(x=>[x[2],x[1],x[0]].map(y=>y*16)),//vertices R2L n:n.map(x=>[x[2],x[1],x[0]]),//normals R2L t:t.map(x=>[x[0],x[1]]),//uvs o:p.reduce((a,x)=>x.map((y,i)=>y+(a[i]||0)),[]).map(x=>x*16/p.length)//centroid as pivot }), mqo:({p,n,t},src)=>(console.log(...src),{//function for .mqo convertion p:p.map(x=>[x[2],x[1],x[0]].map(y=>y*.16)),//vertices R2L n:n.map(x=>[x[2],x[1],x[0]]),//normals R2L t:t.map(x=>[x[0],1-x[1]]),//uvs Yflip o:src[1].translation//local coord origin as pivot }), format:bones=>({ format_version:'1.12.0', 'minecraft:geometry':[{ description:{ identifier:'geometry.armor_stand', texture_width:64,texture_height:64, visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,0,0] }, bones }] }), file_name:'armor_stand.geo.json' }
run
build:2211160
copy to clipboard
download