I'm attempting to display a 3D model in Three.JS that has been converted to UTF8 format using Won's WebGL Loader ( http://code.google.com/p/webgl-loader/ ). I don't know how to convert the metadata outputted from WebGL Loader into what Three.JS expects, and a Google Search and read through the source hasn't shed any insight. The output of WebGLLoader and input requirements for Three.JS listed below.
WebGL Loader Output:
MODELS['abc_normals.obj'] = {
materials: {
},
decodeParams: {
decodeOffsets: [-8192,-88,-2278,0,0,-511,-511,-511],
decodeScales: [0.012115,0.012115,0.012115,0.000978,0.000978,0.001957,0.001957,0.001957],
},
urls: {
'abc_normals.utf8': [
{ material: '',
attribRange: [0, 8288],
indexRange: [66304, 14914],
bboxes: 111046,
names: ['default', ],
lengths: [44742, ],
},
],
}
};
Three.JS requirements:
{ scale: 0.815141, offsetX: -0.371823, offsetY: -0.011920, offsetZ: -0.416061 }