Open GoogleCodeExporter opened 9 years ago
The latest release of jsc3d.js (0.9.8) does not support binary stl format in
IE9. This is because loading binary data using IE9's implementation of
XmlHttpRequest is very inefficient.
jsc3d_ie.js once implemented this using a snippet of vbscript to transcode the
binary content of an stl file into a javascript array then read model from it
(for more technical details, see
http://code.google.com/p/jsc3d/source/browse/trunk/jsc3d/jsc3d_ie.js#4221). But
this seems to cost too long for transcoding and will even lock the page for a
while. So this method is not merged to jsc3d.js.
The good news is that IE10 makes promising enhancement on XHR's binary data
access. I'm just looking into IE10's dev docs and re-writing that part. All
will be in next release.
Original comment by Humu2...@gmail.com
on 20 Nov 2012 at 3:11
really thanks, however by now i solved by installing the chrome framework on
ie9 or ie10 and all is perfect!!
Original comment by mariopon...@gmail.com
on 20 Nov 2012 at 3:49
Hi i've found a way in order to convert in fast and efficient way a bynary file
to array obect on IE9.
JSC3D.StlLoader.prototype.loadBinaryFromUrl = function (urlName) {
var self = this;
var xhr = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject('MSXML2.XMLHTTP.3.0');
xhr.open('GET', urlName, true);
var browserName = navigator.appName;
xhr.responseType = "arraybuffer";
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
var scene = new JSC3D.Scene;
try {
var bytes = VBArray(xhr.responseBody).toArray(); // Only on IE!
self.parseStlBinary(scene, bytes);
} catch (e) { }
self.onload(scene);
}
};
xhr.send();
};
it seems this command :
var bytes = VBArray(xhr.responseBody).toArray();
works perfect in IE, i tested in IE9 with very large binary stl Files.
Give me your opinion if you like
hello, Mario
Original comment by mariopon...@yahoo.it
on 19 Dec 2012 at 3:01
Nice solution! It runs surprisingly fast in IE10, but does not seem to work in
IE9 for the nonsupport of 'arraybuffer' response type. I will add this to the
next release of JSC3D to enable STL loader for IE10.
Really thanks, Mario!
Original comment by Humu2...@gmail.com
on 21 Dec 2012 at 10:01
thanks to you, it's a pleasure for me to learn js by looking at your code!
But it should work on IE9 too. I use IE9 32 bit on windows 7 32 bit.
Hello, Mario
Original comment by mariopon...@gmail.com
on 21 Dec 2012 at 10:45
Mario,
I am too trying to find a way round the ie9 problem. Did your solution work
with ie9 or was the support guy right with the array issue?
Original comment by undercut...@gmail.com
on 24 Mar 2013 at 9:05
[deleted comment]
The latest edition already provides support for loading STL binary and ascii
files on IE9. Please get it from the repository.
I'll release a new download package soon.
Original comment by Humu2...@gmail.com
on 31 Jul 2013 at 2:29
Original issue reported on code.google.com by
mariopon...@gmail.com
on 20 Nov 2012 at 10:42Attachments: