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

Updated builds.

上级 be75f8a5
...@@ -29772,7 +29772,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { ...@@ -29772,7 +29772,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) { for ( i = 0; i < flen; i ++ ) {
face = faces[ 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 ) { ...@@ -29784,7 +29784,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) { for ( i = 0; i < flen; i ++ ) {
face = faces[ 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 ) { ...@@ -29795,7 +29795,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) { for ( i = 0; i < flen; i ++ ) {
face = faces[ 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 ) { ...@@ -29804,7 +29804,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) { for ( i = 0; i < flen; i ++ ) {
face = faces[ 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 ) { ...@@ -29870,7 +29870,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
} }
function f3( a, b, c, isBottom ) { function f3( a, b, c ) {
a += shapesOffset; a += shapesOffset;
b += shapesOffset; b += shapesOffset;
...@@ -29879,7 +29879,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { ...@@ -29879,7 +29879,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
// normal, color, material // normal, color, material
scope.faces.push( new THREE.Face3( a, b, c, null, null, 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 ); scope.faceVertexUvs[ 0 ].push( uvs );
...@@ -29895,8 +29895,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { ...@@ -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( a, b, d, null, null, extrudeMaterial ) );
scope.faces.push( new THREE.Face3( b, c, 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, var uvs = uvgen.generateSideWallUV( scope, a, b, c, d );
stepIndex, stepsLength, contourIndex1, contourIndex2 );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 0 ], uvs[ 1 ], uvs[ 3 ] ] ); scope.faceVertexUvs[ 0 ].push( [ uvs[ 0 ], uvs[ 1 ], uvs[ 3 ] ] );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 1 ], uvs[ 2 ], uvs[ 3 ] ] ); scope.faceVertexUvs[ 0 ].push( [ uvs[ 1 ], uvs[ 2 ], uvs[ 3 ] ] );
...@@ -29907,11 +29906,13 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { ...@@ -29907,11 +29906,13 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
THREE.ExtrudeGeometry.WorldUVGenerator = { THREE.ExtrudeGeometry.WorldUVGenerator = {
generateTopUV: function( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC ) { generateTopUV: function ( geometry, indexA, indexB, indexC ) {
var a = geometry.vertices[ indexA ]; var vertices = geometry.vertices;
var b = geometry.vertices[ indexB ];
var c = geometry.vertices[ indexC ]; var a = vertices[ indexA ];
var b = vertices[ indexB ];
var c = vertices[ indexC ];
return [ return [
new THREE.Vector2( a.x, a.y ), new THREE.Vector2( a.x, a.y ),
...@@ -29921,20 +29922,14 @@ THREE.ExtrudeGeometry.WorldUVGenerator = { ...@@ -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 ); var vertices = geometry.vertices;
},
generateSideWallUV: function( geometry, extrudedShape, wallContour, extrudeOptions,
indexA, indexB, indexC, indexD, stepIndex, stepsLength,
contourIndex1, contourIndex2 ) {
var a = geometry.vertices[ indexA ]; var a = vertices[ indexA ];
var b = geometry.vertices[ indexB ]; var b = vertices[ indexB ];
var c = geometry.vertices[ indexC ]; var c = vertices[ indexC ];
var d = geometry.vertices[ indexD ]; var d = vertices[ indexD ];
if ( Math.abs( a.y - b.y ) < 0.01 ) { if ( Math.abs( a.y - b.y ) < 0.01 ) {
return [ return [
...@@ -30084,7 +30079,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) { ...@@ -30084,7 +30079,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
var c = face[ 2 ] + shapesOffset; var c = face[ 2 ] + shapesOffset;
this.faces.push( new THREE.Face3( a, b, c, null, null, material ) ); 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.
先完成此消息的编辑!
想要评论请 注册