diff --git a/docs/api/geometries/BoxBufferGeometry.html b/docs/api/geometries/BoxBufferGeometry.html index 47a05ba53320515316234f91058a9fc8938346aa..2465afb0dcc5c42ec71bae95a04237158eb53c99 100644 --- a/docs/api/geometries/BoxBufferGeometry.html +++ b/docs/api/geometries/BoxBufferGeometry.html @@ -1,7 +1,7 @@ - + @@ -44,9 +44,9 @@

[name]([page:Float width], [page:Float height], [page:Float depth], [page:Integer widthSegments], [page:Integer heightSegments], [page:Integer depthSegments])

- width — Width of the sides on the X axis.
- height — Height of the sides on the Y axis.
- depth — Depth of the sides on the Z axis.
+ width — Width of the sides on the X axis. Default is 1.
+ height — Height of the sides on the Y axis. Default is 1.
+ depth — Depth of the sides on the Z axis. Default is 1.
widthSegments — Optional. Number of segmented faces along the width of the sides. Default is 1.
heightSegments — Optional. Number of segmented faces along the height of the sides. Default is 1.
depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1. diff --git a/docs/api/geometries/BoxGeometry.html b/docs/api/geometries/BoxGeometry.html index 3c61a73eac02ef1c97bbab810df6bd8ea1c05a2c..49fe287bf240682c5efc603d9a6d62b5e525db58 100644 --- a/docs/api/geometries/BoxGeometry.html +++ b/docs/api/geometries/BoxGeometry.html @@ -1,7 +1,7 @@ - + @@ -44,9 +44,9 @@

[name]([page:Float width], [page:Float height], [page:Float depth], [page:Integer widthSegments], [page:Integer heightSegments], [page:Integer depthSegments])

- width — Width of the sides on the X axis.
- height — Height of the sides on the Y axis.
- depth — Depth of the sides on the Z axis.
+ width — Width of the sides on the X axis. Default is 1.
+ height — Height of the sides on the Y axis. Default is 1.
+ depth — Depth of the sides on the Z axis. Default is 1.
widthSegments — Optional. Number of segmented faces along the width of the sides. Default is 1.
heightSegments — Optional. Number of segmented faces along the height of the sides. Default is 1.
depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1. diff --git a/docs/api/geometries/PlaneBufferGeometry.html b/docs/api/geometries/PlaneBufferGeometry.html index 90dfd44f1133f47e571e0e8f377ad5ce8c7c91d1..a118bbb6e33fe0b3a722322a76f1c9663b3b4966 100644 --- a/docs/api/geometries/PlaneBufferGeometry.html +++ b/docs/api/geometries/PlaneBufferGeometry.html @@ -1,7 +1,7 @@ - + @@ -44,8 +44,8 @@

[name]([page:Float width], [page:Float height], [page:Integer widthSegments], [page:Integer heightSegments])

- width — Width along the X axis.
- height — Height along the Y axis.
+ width — Width along the X axis. Default is 1.
+ height — Height along the Y axis. Default is 1.
widthSegments — Optional. Default is 1.
heightSegments — Optional. Default is 1.
diff --git a/docs/api/geometries/PlaneGeometry.html b/docs/api/geometries/PlaneGeometry.html index 24639c91b8fbea461ad79359f41b3837fe6e7428..48cf3a0a3123030846dccd664ab8b5d761b87596 100644 --- a/docs/api/geometries/PlaneGeometry.html +++ b/docs/api/geometries/PlaneGeometry.html @@ -15,22 +15,22 @@
A class for generating plane geometries
- - + +

Example

@@ -44,8 +44,8 @@

[name]([page:Float width], [page:Float height], [page:Integer widthSegments], [page:Integer heightSegments])

- width — Width along the X axis.
- height — Height along the Y axis.
+ width — Width along the X axis. Default is 1.
+ height — Height along the Y axis. Default is 1.
widthSegments — Optional. Default is 1.
heightSegments — Optional. Default is 1.
diff --git a/src/geometries/BoxGeometry.js b/src/geometries/BoxGeometry.js index a9c04a4d0e781c4bc66e806c2222e7668acdc467..b4dc01436162934c54b78e6a49776c3aa1c9f56a 100644 --- a/src/geometries/BoxGeometry.js +++ b/src/geometries/BoxGeometry.js @@ -52,6 +52,10 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments, var scope = this; + width = width || 1; + height = height || 1; + depth = depth || 1; + // segments widthSegments = Math.floor( widthSegments ) || 1; diff --git a/src/geometries/PlaneGeometry.js b/src/geometries/PlaneGeometry.js index 56ecae7501597d4355f6aa8a0195c2ac569f7c30..6b4fb3fa17021cb01c034646b917cc95643c4149 100644 --- a/src/geometries/PlaneGeometry.js +++ b/src/geometries/PlaneGeometry.js @@ -45,6 +45,9 @@ function PlaneBufferGeometry( width, height, widthSegments, heightSegments ) { heightSegments: heightSegments }; + width = width || 1; + height = height || 1; + var width_half = width / 2; var height_half = height / 2;