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

Updated builds.

上级 be75f8a5
......@@ -29772,7 +29772,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
f3( face[ 2 ]+ offset, face[ 1 ]+ offset, face[ 0 ] + offset, true );
f3( face[ 2 ]+ offset, face[ 1 ]+ offset, face[ 0 ] + offset );
}
......@@ -29784,7 +29784,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset, false );
f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset );
}
......@@ -29795,7 +29795,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
f3( face[ 2 ], face[ 1 ], face[ 0 ], true );
f3( face[ 2 ], face[ 1 ], face[ 0 ] );
}
......@@ -29804,7 +29804,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps, false );
f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps );
}
}
......@@ -29870,7 +29870,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
}
function f3( a, b, c, isBottom ) {
function f3( a, b, c ) {
a += shapesOffset;
b += shapesOffset;
......@@ -29879,7 +29879,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
// normal, color, material
scope.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
var uvs = isBottom ? uvgen.generateBottomUV( scope, shape, options, a, b, c ) : uvgen.generateTopUV( scope, shape, options, a, b, c );
var uvs = uvgen.generateTopUV( scope, a, b, c );
scope.faceVertexUvs[ 0 ].push( uvs );
......@@ -29895,8 +29895,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
scope.faces.push( new THREE.Face3( a, b, d, null, null, extrudeMaterial ) );
scope.faces.push( new THREE.Face3( b, c, d, null, null, extrudeMaterial ) );
var uvs = uvgen.generateSideWallUV( scope, shape, wallContour, options, a, b, c, d,
stepIndex, stepsLength, contourIndex1, contourIndex2 );
var uvs = uvgen.generateSideWallUV( scope, a, b, c, d );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 0 ], uvs[ 1 ], uvs[ 3 ] ] );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 1 ], uvs[ 2 ], uvs[ 3 ] ] );
......@@ -29907,11 +29906,13 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
THREE.ExtrudeGeometry.WorldUVGenerator = {
generateTopUV: function( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC ) {
var a = geometry.vertices[ indexA ];
var b = geometry.vertices[ indexB ];
var c = geometry.vertices[ indexC ];
generateTopUV: function ( geometry, indexA, indexB, indexC ) {
var vertices = geometry.vertices;
var a = vertices[ indexA ];
var b = vertices[ indexB ];
var c = vertices[ indexC ];
return [
new THREE.Vector2( a.x, a.y ),
......@@ -29921,20 +29922,14 @@ THREE.ExtrudeGeometry.WorldUVGenerator = {
},
generateBottomUV: function( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC ) {
generateSideWallUV: function ( geometry, indexA, indexB, indexC, indexD ) {
return this.generateTopUV( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC );
},
generateSideWallUV: function( geometry, extrudedShape, wallContour, extrudeOptions,
indexA, indexB, indexC, indexD, stepIndex, stepsLength,
contourIndex1, contourIndex2 ) {
var vertices = geometry.vertices;
var a = geometry.vertices[ indexA ];
var b = geometry.vertices[ indexB ];
var c = geometry.vertices[ indexC ];
var d = geometry.vertices[ indexD ];
var a = vertices[ indexA ];
var b = vertices[ indexB ];
var c = vertices[ indexC ];
var d = vertices[ indexD ];
if ( Math.abs( a.y - b.y ) < 0.01 ) {
return [
......@@ -30084,7 +30079,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
var c = face[ 2 ] + shapesOffset;
this.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
this.faceVertexUvs[ 0 ].push( uvgen.generateBottomUV( this, shape, options, a, b, c ) );
this.faceVertexUvs[ 0 ].push( uvgen.generateTopUV( this, a, b, c ) );
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册