首页 > 技术文章 > Threejs之性能检测stats

sunbey 2017-03-21 20:55 原文

<script src="script/stats.js"></script>
    //stats
    var stats = new Stats();
    stats.setMode(1);
    stats.domElement.style.position = 'absolute';
    stats.domElement.left = '0px';
    stats.domElement.top = '0px';
    document.body.appendChild(stats.domElement);

...

    //function render(){
        //camera.rotation.y += .01
        //renderer.render(scene, camera);
        //requestAnimationFrame(render);

        stats.update();

    //}

 

推荐阅读