BufferGeometry

BoxBufferGeometry

This is the BufferGeometry port of BoxGeometry.

Example

var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var cube = new THREE.Mesh( geometry, material ); scene.add( cube );

Constructor

BoxBufferGeometry(width, height, depth, widthSegments, heightSegments, 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.
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.

Properties

.parameters

Using the above example code above as our basis:

geometry.parameters; // outputs an object {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined} cube.geometry.parameters; // as above cube.geometry.parameters.width; // === 1 cube.geometry.parameters.widthSegments // === undefined.

Source

src/extras/geometries/BoxBufferGeometry.js
Edit