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

Code clean up.

上级 8b74317c
......@@ -116,8 +116,8 @@ THREE.CTMLoader.prototype.load = function( url, callback, parameters ) {
var ctmFile = files[ i ];
var e1 = Date.now();
// console.log( "CTM data parse time [worker]: " + (e1-s) + " ms" );
var e1 = Date.now();
// console.log( "CTM data parse time [worker]: " + (e1-s) + " ms" );
if ( useBuffers ) {
......@@ -129,8 +129,8 @@ THREE.CTMLoader.prototype.load = function( url, callback, parameters ) {
}
var e = Date.now();
console.log( "model load time [worker]: " + (e-e1) + " ms, total: " + (e-s));
var e = Date.now();
console.log( "model load time [worker]: " + (e-e1) + " ms, total: " + (e-s));
}
......@@ -229,7 +229,7 @@ THREE.CTMLoader.prototype.createModelBuffers = function ( file, callback ) {
// attributes
var attributes = scope.attributes;
attributes[ "index" ] = { itemSize: 1, array: vertexIndexArray };
attributes[ "index" ] = { itemSize: 1, array: vertexIndexArray };
attributes[ "position" ] = { itemSize: 3, array: vertexPositionArray };
if ( vertexNormalArray !== undefined )
......@@ -432,15 +432,15 @@ THREE.CTMLoader.prototype.createModelClassic = function ( file, callback ) {
function f3n ( scope, normals, a, b, c, mi, nai, nbi, nci ) {
var nax = normals[ nai * 3 ],
var nax = normals[ nai * 3 ],
nay = normals[ nai * 3 + 1 ],
naz = normals[ nai * 3 + 2 ],
nbx = normals[ nbi * 3 ],
nbx = normals[ nbi * 3 ],
nby = normals[ nbi * 3 + 1 ],
nbz = normals[ nbi * 3 + 2 ],
ncx = normals[ nci * 3 ],
ncx = normals[ nci * 3 ],
ncy = normals[ nci * 3 + 1 ],
ncz = normals[ nci * 3 + 2 ];
......
......@@ -273,15 +273,15 @@ THREE.BufferGeometry.prototype = {
ab.subVectors( pA, pB );
cb.cross( ab );
normals[ vA * 3 ] += cb.x;
normals[ vA * 3 ] += cb.x;
normals[ vA * 3 + 1 ] += cb.y;
normals[ vA * 3 + 2 ] += cb.z;
normals[ vB * 3 ] += cb.x;
normals[ vB * 3 ] += cb.x;
normals[ vB * 3 + 1 ] += cb.y;
normals[ vB * 3 + 2 ] += cb.z;
normals[ vC * 3 ] += cb.x;
normals[ vC * 3 ] += cb.x;
normals[ vC * 3 + 1 ] += cb.y;
normals[ vC * 3 + 2 ] += cb.z;
......@@ -314,7 +314,7 @@ THREE.BufferGeometry.prototype = {
ab.subVectors( pA, pB );
cb.cross( ab );
normals[ i ] = cb.x;
normals[ i ] = cb.x;
normals[ i + 1 ] = cb.y;
normals[ i + 2 ] = cb.z;
......@@ -352,7 +352,7 @@ THREE.BufferGeometry.prototype = {
n = 1.0 / Math.sqrt( x * x + y * y + z * z );
normals[ i ] *= n;
normals[ i ] *= n;
normals[ i + 1 ] *= n;
normals[ i + 2 ] *= n;
......@@ -530,7 +530,7 @@ THREE.BufferGeometry.prototype = {
test = tmp2.dot( tan2[ v ] );
w = ( test < 0.0 ) ? -1.0 : 1.0;
tangents[ v * 4 ] = tmp.x;
tangents[ v * 4 ] = tmp.x;
tangents[ v * 4 + 1 ] = tmp.y;
tangents[ v * 4 + 2 ] = tmp.z;
tangents[ v * 4 + 3 ] = w;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册