STLLoadertest three.js

JavaScript performance comparison

Revision 9 of this test case created

Preparation code

<script src="https://rawgithub.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://rawgithub.com/mrdoob/three.js/389cf29b6bbbb43f0e6ab1e04a759ea999c1b30d/examples/js/loaders/STLLoader.js"></script>
<script>
  var old_version = THREE.STLLoader;
</script>
<script src="https://rawgithub.com/gero3/three.js/bd7fda284d34cbb76ef120beed21ab55815e2089/examples/js/loaders/STLLoader.js"></script>

<script>
  var latest_version = THREE.STLLoader;
</script>
<script src="https://rawgithub.com/mrdoob/three.js/master/examples/js/loaders/STLLoader.js"></script>
<script>
  var new_version = THREE.STLLoader;
</script>


<script>
    var url = "http://corsify.appspot.com/https://dl.dropboxusercontent.com/u/63997063/Three/Matterform/dristanSTL.stl"
    var ArraybufferVersion,StringVersion;
                var request1 = new XMLHttpRequest();

                request1.addEventListener( 'load', function ( event ) {
                        ArraybufferVersion=  event.target.response;
                }, false );

                request1.open( 'GET', url, true );
                request1.responseType = "arraybuffer";
                request1.send( null );

        var xhr = new XMLHttpRequest();

        function onloaded( event ) {
                if ( event.target.status === 200 || event.target.status === 0 ) {
                                StringVersion= event.target.responseText;
                }
        }

        xhr.addEventListener( 'load', onloaded, false );

        xhr.overrideMimeType('text/plain; charset=x-user-defined');
        xhr.open( 'GET', url, true );
        xhr.send( null );

</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
old version
var test = new old_version()
test.parse(ArraybufferVersion)
pending…
new version
var test = new new_version()
test.parse(StringVersion)
pending…
latest version 1
var test = new latest_version()
test.parse(StringVersion)
pending…
latest version 2
var test = new latest_version()
test.parse(ArraybufferVersion)
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment