cannon.js
cannon.js copied to clipboard
Caculating offset value on bunny.js
Hello guys, I want to ask you how to cacualate offset value on bunny.js file. https://github.com/schteppe/cannon.js/blob/master/demos/js/bunny.js I tried to use https://github.com/kmammou/v-hacd to covert but the value has only Vertex and Index. This is my output file when I use hacd tool to covert. #VRML V2.0 utf8
Vertices: 39
Triangles: 74
Group { children [ Shape { appearance Appearance { material Material { diffuseColor 0.410000 0.670000 0.340000 ambientIntensity 0.400000 specularColor 0.500000 0.500000 0.500000 emissiveColor 0.000000 0.000000 0.000000 shininess 0.400000 transparency 0.500000 } } geometry IndexedFaceSet { ccw TRUE solid TRUE convex TRUE coord DEF co Coordinate { point [ -39.099159 13.937449 1.705063, 34.797333 -13.560861 -26.652462, 34.797333 13.937449 -26.652462, 39.099159 -13.560861 9.433245, -37.376896 -13.560861 -0.015787, -18.470295 0.188294 25.760464, 39.099159 13.937449 -4.307483, -14.176124 13.937449 -15.477365, -19.327599 -13.560861 26.620888, -27.066294 13.937449 17.166641, 12.461517 -13.560861 -24.071188, 39.099159 -1.529004 9.433245, 39.099159 -13.560861 -26.652462, -14.176124 -13.560861 -15.477365, -39.099159 -13.560861 3.415484, 12.461517 13.937449 -24.071188, 39.099159 13.937449 -26.652462, -16.755690 -2.387654 26.620888, -24.486729 13.937449 17.166641, -39.099159 13.937449 3.415484, -16.755690 -13.560861 26.620888, 39.099159 9.638820 -0.015787, -20.184902 0.188294 25.760464, -37.376896 13.937449 -0.015787, -23.629425 10.497469 19.747917, -9.016994 -13.560861 -17.198215, 19.335253 13.937449 -24.931612, -39.099159 -13.560861 1.705063, 37.376896 13.937449 -3.452273, -34.797333 -13.560861 8.578034, -29.638203 13.937449 14.590581, 39.099159 3.622892 5.136334, -9.016994 13.937449 -17.198215, -17.612991 -1.529004 26.620888, 19.335253 -13.560861 -24.931612, -20.184902 -13.560861 25.760464, -19.327599 -1.529004 26.620888, -34.797333 -4.107644 8.578034, -24.486729 8.780170 20.603128, ] } coordIndex [ 9, 30, 38, -1, 1, 3, 4, -1, 2, 0, 6, -1, 0, 2, 7, -1, 4, 3, 8, -1, 6, 0, 9, -1, 1, 4, 10, -1, 3, 6, 11, -1, 1, 2, 12, -1, 3, 1, 12, -1, 6, 3, 12, -1, 4, 7, 13, -1, 10, 4, 13, -1, 4, 8, 14, -1, 7, 2, 15, -1, 2, 6, 16, -1, 12, 2, 16, -1, 6, 12, 16, -1, 3, 11, 17, -1, 6, 9, 18, -1, 9, 0, 19, -1, 0, 14, 19, -1, 8, 3, 20, -1, 3, 17, 20, -1, 17, 8, 20, -1, 11, 6, 21, -1, 4, 0, 23, -1, 0, 7, 23, -1, 7, 4, 23, -1, 5, 11, 24, -1, 18, 9, 24, -1, 11, 18, 24, -1, 22, 5, 24, -1, 13, 7, 25, -1, 10, 13, 25, -1, 15, 10, 25, -1, 2, 1, 26, -1, 15, 2, 26, -1, 10, 15, 26, -1, 0, 4, 27, -1, 14, 0, 27, -1, 4, 14, 27, -1, 6, 18, 28, -1, 21, 6, 28, -1, 18, 21, 28, -1, 14, 8, 29, -1, 19, 14, 29, -1, 9, 19, 30, -1, 18, 11, 31, -1, 11, 21, 31, -1, 21, 18, 31, -1, 7, 15, 32, -1, 25, 7, 32, -1, 15, 25, 32, -1, 11, 5, 33, -1, 8, 17, 33, -1, 17, 11, 33, -1, 5, 22, 33, -1, 1, 10, 34, -1, 26, 1, 34, -1, 10, 26, 34, -1, 8, 22, 35, -1, 29, 8, 35, -1, 22, 29, 35, -1, 22, 8, 36, -1, 8, 33, 36, -1, 33, 22, 36, -1, 19, 29, 37, -1, 29, 22, 37, -1, 22, 30, 37, -1, 30, 19, 37, -1, 24, 9, 38, -1, 22, 24, 38, -1, 30, 22, 38, -1, ] } } ] }
Thank
Bump. Any info in general how to generate a file like bunny.js from the Blender add-on would be great: https://github.com/kmammou/v-hacd/issues
hi,xuyennguyen Have you solved the problem yet?
hi,xuyennguyen Have you solved the problem yet?