提交 41812cf1 编写于 作者: M Mr.doob

Code style fixes.

上级 6669550a
......@@ -2337,9 +2337,9 @@ THREE.WebGLRenderer = function ( parameters ) {
case 'sa':
// TODO: Optimize this.
for( var i = 0; i < value.length; i ++ ) {
for ( var i = 0; i < value.length; i ++ ) {
for( var propertyName in uniform.properties ) {
for ( var propertyName in uniform.properties ) {
var property = uniform.properties[ propertyName ];
var locationProperty = location[ i ][ propertyName ];
......@@ -2672,7 +2672,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
uniforms.shadow = -1;
uniforms.shadow = - 1;
}
......@@ -2698,7 +2698,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
uniforms.shadow = -1;
uniforms.shadow = - 1;
}
......@@ -2731,7 +2731,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
uniforms.shadow = -1;
uniforms.shadow = - 1;
}
......
......@@ -54,49 +54,66 @@ THREE.WebGLProgram = ( function () {
//console.log("THREE.WebGLProgram: ACTIVE UNIFORM:", name);
var matches = structRe.exec(name);
if( matches ) {
var matches = structRe.exec( name );
if ( matches ) {
var structName = matches[1];
var structProperty = matches[2];
var structName = matches[ 1 ];
var structProperty = matches[ 2 ];
var uniformsStruct = uniforms[ structName ];
if( ! uniformsStruct ) {
if ( ! uniformsStruct ) {
uniformsStruct = uniforms[ structName ] = {};
}
uniformsStruct[ structProperty ] = location;
continue;
}
matches = arrayStructRe.exec(name);
if( matches ) {
matches = arrayStructRe.exec( name );
var arrayName = matches[1];
var arrayIndex = matches[2];
var arrayProperty = matches[3];
if ( matches ) {
var arrayName = matches[ 1 ];
var arrayIndex = matches[ 2 ];
var arrayProperty = matches[ 3 ];
var uniformsArray = uniforms[ arrayName ];
if( ! uniformsArray ) {
if ( ! uniformsArray ) {
uniformsArray = uniforms[ arrayName ] = [];
}
var uniformsArrayIndex = uniformsArray[ arrayIndex ];
if( ! uniformsArrayIndex ) {
if ( ! uniformsArrayIndex ) {
uniformsArrayIndex = uniformsArray[ arrayIndex ] = {};
}
uniformsArrayIndex[ arrayProperty ] = location;
continue;
}
matches = arrayRe.exec(name)
if( matches ) {
matches = arrayRe.exec( name );
var arrayName = matches[1];
if ( matches ) {
var arrayName = matches[ 1 ];
uniforms[ arrayName ] = location;
continue;
}
uniforms[ name ] = location;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册