提交 9b365be7 编写于 作者: M Mr.doob

Clean up.

上级 c6bda653
......@@ -131,6 +131,7 @@ var files = {
"webgl_materials_bumpmap_skin",
"webgl_materials_cars",
"webgl_materials_channels",
"webgl_materials_compile",
"webgl_materials_cubemap",
"webgl_materials_cubemap_balls_reflection",
"webgl_materials_cubemap_balls_refraction",
......
......@@ -688,6 +688,12 @@ function WebGLRenderer( parameters ) {
};
function absNumericalSort( a, b ) {
return Math.abs( b[ 0 ] ) - Math.abs( a[ 0 ] );
}
this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
state.setMaterial( material );
......@@ -1026,52 +1032,45 @@ function WebGLRenderer( parameters ) {
}
// Sorting
// Compile
function absNumericalSort( a, b ) {
this.compile = function ( scene, camera ) {
return Math.abs( b[ 0 ] ) - Math.abs( a[ 0 ] );
lights = [];
}
this.compile = function(scene, camera){
scene.traverse( function ( object ) {
lights = [];
scene.traverse(function( object ) {
if ( object.isLight ) {
lights.push(object);
lights.push( object );
}
});
setupLights(lights,camera);
scene.traverse(function( object ) {
if (object.material) {
} );
setupLights( lights, camera );
scene.traverse( function ( object ) {
if ( object.material ) {
if ( Array.isArray( object.material ) ) {
for ( var i = 0; i < object.material.length; i ++ ) {
initMaterial(object.material[i], scene.fog, object);
initMaterial( object.material[ i ], scene.fog, object );
}
} else {
initMaterial(object.material, scene.fog, object);
initMaterial( object.material, scene.fog, object );
}
}
});
} );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册