STLLoadertest three.js

JavaScript performance comparison

Test case created by gero3

Preparation code

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

<script>
    var url = "http://corsify.appspot.com/https://c9.io/gero3/threejs_stlloader/workspace/pseudo_ueberhemisphere_500k_10cm.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(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