商域无疆 (http://blog.csdn.net/omni360/)
本文遵循“署名-非商业用途-保持一致”创作公用协议
转载请保留此句:商域无疆 - 本博客专注于 敏捷开发及移动和物联设备研究:数据可视化、GOLANG、Html5、WEBGL、THREE.JS,否则,出自本博客的文章拒绝转载或再转载,谢谢合作。
俺也是刚开始学,好多地儿肯定不对还请见谅.
以下代码是THREE.JS 源码文件中objects/LOD.js文件的注释.
更多更新在 : https://github.com/omni360/three.js.sourcecode
/**
* @author mikael emtinger / http://gomo.se/
* @author alteredq / http://alteredqualia.com/
* @author mrdoob / http://mrdoob.com/
*/
/*
///LOD对象,LOD技术即Levels of Detail的简称,意为多细节层次。LOD技术指根据物体模型的节点在显示环境中所处的位置和重要度,决定物体渲染的资源分配,降低非重要物体的面数和细节度,从而获得高效率的渲染运算。
/// 注释摘抄自http://blog.csdn.net/u011209953/article/details/37863701
///用法: var geometry = [
///
/// [ new THREE.IcosahedronGeometry( 100, 4 ), 50 ],
/// [ new THREE.IcosahedronGeometry( 100, 3 ), 300 ],
/// [ new THREE.IcosahedronGeometry( 100, 2 ), 1000 ],
/// [ new THREE.IcosahedronGeometry( 100, 1 ), 2000 ],
/// [ new THREE.IcosahedronGeometry( 100, 0 ), 8000 ]
///
/// ]; //创建几何体对象.
///
/// var material = new THREE.MeshLambertMaterial( { color: 0xffffff, wireframe: true } ); //创建材质
///
/// var i, j, mesh, lod;
///
/// for ( j = 0; j < 1000; j ++ ) {
///
/// lod = new THREE.LOD(); //创建lod对象
///
/// for ( i = 0; i < geometry.length; i ++ ) {
///
/// mesh = new THREE.Mesh( geometry[ i ][ 0 ], material );
/// mesh.scale.set( 1.5, 1.5, 1.5 );
/// mesh.updateMatrix();
/// mesh.matrixAutoUpdate = false;
/// lod.addLevel( mesh, geometry[ i ][ 1 ] ); /