|
@@ -38,7 +38,7 @@ class BoxGeometry extends Geometry {
|
|
|
|
|
|
class BoxBufferGeometry extends BufferGeometry {
|
|
|
|
|
|
- constructor( width, height, depth, widthSegments, heightSegments, depthSegments ) {
|
|
|
+ constructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) {
|
|
|
|
|
|
super();
|
|
|
|
|
@@ -55,15 +55,11 @@ class BoxBufferGeometry extends BufferGeometry {
|
|
|
|
|
|
const scope = this;
|
|
|
|
|
|
- width = width || 1;
|
|
|
- height = height || 1;
|
|
|
- depth = depth || 1;
|
|
|
-
|
|
|
// segments
|
|
|
|
|
|
- widthSegments = Math.floor( widthSegments ) || 1;
|
|
|
- heightSegments = Math.floor( heightSegments ) || 1;
|
|
|
- depthSegments = Math.floor( depthSegments ) || 1;
|
|
|
+ widthSegments = Math.floor( widthSegments );
|
|
|
+ heightSegments = Math.floor( heightSegments );
|
|
|
+ depthSegments = Math.floor( depthSegments );
|
|
|
|
|
|
// buffers
|
|
|
|