Box(widthopt, heightopt, depthopt, paramopt)

new Box(widthopt, heightopt, depthopt, paramopt)

盒子
Parameters:
Name Type Attributes Default Description
width number <optional>
1.0 宽度(自身 x 轴方向),单位:米
height number <optional>
1.0 高度(自身 y 轴方向),单位:米
depth number <optional>
1.0 深度(自身 z 轴方向),单位:米
param object <optional>
初始参数
Properties
Name Type Attributes Default Description
widthSegments number <optional>
1 宽度方向分段数
heightSegments number <optional>
1 高度方向分段数
depthSegments number <optional>
1 深度方向分段数

Members

depth :number

设置/获取 深度(自身z轴方向长度)
Default Value:
  • 1.0
Example
let box = new THING.Box();
// @expect(box.depth == 1)
box.depth = 10;
// @expect(box.depth == 10)

height :number

设置/获取 高度(自身y轴方向长度)
Default Value:
  • 1.0
Example
let box = new THING.Box();
// @expect(box.height == 1)
box.height = 10;
// @expect(box.height == 10)

width :number

设置/获取 宽度(自身x轴方向长度)
Default Value:
  • 1.0
Example
let box = new THING.Box();
// @expect(box.width == 1)
box.width = 10;
// @expect(box.width == 10)