<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: .obj to .dae</title>
	<atom:link href="http://www.c3dl.org/index.php/c3dl-dev/obj-to-dae/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.c3dl.org/index.php/c3dl-dev/obj-to-dae/</link>
	<description>WebGL made easy!</description>
	<lastBuildDate>Tue, 16 Aug 2011 14:23:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Joe Hocking</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/obj-to-dae/comment-page-1/#comment-1341</link>
		<dc:creator>Joe Hocking</dc:creator>
		<pubDate>Mon, 28 Feb 2011 19:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.c3dl.org/?p=491#comment-1341</guid>
		<description>&quot;JavaScript can’t directly read files&quot;

This blog post is so old that you may already know about this, but I did figure out how to load binary data in JavaScript; I hacked in a .ply loader for a project I&#039;m doing with C3DL.

The following is a copy-paste of all my notes when I was researching how to load binary files in JavaScript, but long story short you can use overrideMimeType() to make the XMLHttpRequest command return the unaltered byte array instead of trying to interpret the text streaming in.


//code adapted from http://www.storiesinflight.com/js_binary_loader/index.html
//and http://robert.accettura.com/blog/2006/12/02/xmlhttpreqoverridemimetype-in-ie7/
//and http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html
//and http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx

//XMLHttpRequest origins documented http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx
//http://msdn.microsoft.com/en-us/library/cc534581%28VS.85%29.aspx
//http://developer.apple.com/internet/webcontent/xmlhttpreq.html

//extracting data from binary stream
//http://stackoverflow.com/questions/1240408/reading-bytes-from-javascript-string

//use this class to turn the byte array into integers, floats, etc.
//http://blog.vjeux.com/2010/javascript/javascript-binary-reader.html

//but use this version to correct problem in float decoding
//http://www.terrybutler.co.uk/2010/07/27/html5-quake-ii-md2-model-loader-and-renderer/</description>
		<content:encoded><![CDATA[<p>&#8220;JavaScript can’t directly read files&#8221;</p>
<p>This blog post is so old that you may already know about this, but I did figure out how to load binary data in JavaScript; I hacked in a .ply loader for a project I&#8217;m doing with C3DL.</p>
<p>The following is a copy-paste of all my notes when I was researching how to load binary files in JavaScript, but long story short you can use overrideMimeType() to make the XMLHttpRequest command return the unaltered byte array instead of trying to interpret the text streaming in.</p>
<p>//code adapted from <a href="http://www.storiesinflight.com/js_binary_loader/index.html" rel="nofollow">http://www.storiesinflight.com/js_binary_loader/index.html</a><br />
//and <a href="http://robert.accettura.com/blog/2006/12/02/xmlhttpreqoverridemimetype-in-ie7/" rel="nofollow">http://robert.accettura.com/blog/2006/12/02/xmlhttpreqoverridemimetype-in-ie7/</a><br />
//and <a href="http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html" rel="nofollow">http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html</a><br />
//and <a href="http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx</a></p>
<p>//XMLHttpRequest origins documented <a href="http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx" rel="nofollow">http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx</a><br />
//http://msdn.microsoft.com/en-us/library/cc534581%28VS.85%29.aspx<br />
//http://developer.apple.com/internet/webcontent/xmlhttpreq.html</p>
<p>//extracting data from binary stream<br />
//http://stackoverflow.com/questions/1240408/reading-bytes-from-javascript-string</p>
<p>//use this class to turn the byte array into integers, floats, etc.<br />
//http://blog.vjeux.com/2010/javascript/javascript-binary-reader.html</p>
<p>//but use this version to correct problem in float decoding<br />
//http://www.terrybutler.co.uk/2010/07/27/html5-quake-ii-md2-model-loader-and-renderer/</p>
]]></content:encoded>
	</item>
</channel>
</rss>

