77 *
88 * curveSegments: <int>, // number of points on the curves
99 * steps: <int>, // number of points for z-side extrusions / used for subdividing segments of extrude spline too
10- * amount : <float>, // Depth to extrude the shape
10+ * depth : <float>, // Depth to extrude the shape
1111 *
1212 * bevelEnabled: <bool>, // turn on bevel
1313 * bevelThickness: <float>, // how deep into the original shape bevel goes
@@ -93,7 +93,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
9393
9494 var curveSegments = options . curveSegments !== undefined ? options . curveSegments : 12 ;
9595 var steps = options . steps !== undefined ? options . steps : 1 ;
96- var amount = options . amount !== undefined ? options . amount : 100 ;
96+ var depth = options . depth !== undefined ? options . depth : 100 ;
9797
9898 var bevelEnabled = options . bevelEnabled !== undefined ? options . bevelEnabled : true ;
9999 var bevelThickness = options . bevelThickness !== undefined ? options . bevelThickness : 6 ;
@@ -104,6 +104,15 @@ function ExtrudeBufferGeometry( shapes, options ) {
104104
105105 var uvgen = options . UVGenerator !== undefined ? options . UVGenerator : WorldUVGenerator ;
106106
107+ // deprecated options
108+
109+ if ( options . amount !== undefined ) {
110+
111+ console . warn ( 'THREE.ExtrudeBufferGeometry: amount has been renamed to depth.' ) ;
112+ depth = options . amount ;
113+
114+ }
115+
107116 //
108117
109118 var extrudePts , extrudeByPath = false ;
@@ -444,7 +453,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
444453
445454 if ( ! extrudeByPath ) {
446455
447- v ( vert . x , vert . y , amount / steps * s ) ;
456+ v ( vert . x , vert . y , depth / steps * s ) ;
448457
449458 } else {
450459
@@ -478,7 +487,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
478487 for ( i = 0 , il = contour . length ; i < il ; i ++ ) {
479488
480489 vert = scalePt2 ( contour [ i ] , contourMovements [ i ] , bs ) ;
481- v ( vert . x , vert . y , amount + z ) ;
490+ v ( vert . x , vert . y , depth + z ) ;
482491
483492 }
484493
@@ -495,7 +504,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
495504
496505 if ( ! extrudeByPath ) {
497506
498- v ( vert . x , vert . y , amount + z ) ;
507+ v ( vert . x , vert . y , depth + z ) ;
499508
500509 } else {
501510
0 commit comments