Closed musicist288 closed 10 years ago
Looks fantastic! Will check it out tomorrow and then merge.. Thanks!!!
Just checked the code and it works great for file urls!
Sadly, it doesn't work for local files! Something like:
var m = new X.mesh();
m.file = 'test.stl';
m.filedata = someArraybuffer;
results in: Uncaught TypeError: Cannot call method 'getResponseHeader' of null
This is kind of essential since we use this feature for http://slicedrop.com
Do you have any idea how to solve it?
Added mime types lookup for files when loader tries to check for a file format.
Also created a
getExtension
method inX.file
instead of constructing it incheckFileFormat
.Custom mime types were used for file formats that didn't have anything official.
Took the empty string out of the extensions lookup and defaulted to 'application/dicom' if the lookup returns undefined. Ran all of the tests. It looks like selenium test for test_dcm.html was broken before these commits.