Create a 3D solid box. The base of the box is parallel to the XY plane. The center of the box is at coordinates 0,0,0.

syntaxSyntax:
new DlxCube(length, width, height, style)

Parameters

Parameter Description
length The length corresponds to the X-axis.
width The width corresponds to the Y-axis.
height The height corresponds to the Z-axis.
style A Dlx3DStyle object or the index of the style. There are 10 styles available with indexes from 0 to 9.

Example

  Copy codeCopy code
function OnBuild3DModel()
{
  var ctx = FWiz.Get3DModelCtx();
  var style = FWiz.Get3DStyle(0);
  style.SetStyle("gold");
  var cube = new DlxCube(10, 20, 30, style);
  ctx.Add(cube);
}

See also