top

CAPH.WUI.ENGINE.RENDERING.PLANEGEOMETRY

PlaneGeometry is typically used for creating a plane rectangle with user defined 'width' and 'height'.


Constructor

PlaneGeometry

Description
Geometry 'PlaneGeometry' method allows you to create plane geometry for an object. Return a factory to create PlanGeometry.
Emulator SupportY
SDK ConstraintNone
Example
var AccRendering = caph.wui.engine.rendering;

var basePage = new AccRendering.BasePage();

var geometry = new AccRendering.PlanGeometry().build(100, 100);

var matrial = new AccRendering.BasicMaterial();
var object = new AccRendering.Mesh3d(geometry, matrial.build({ color: Math.random() * 0xffffff, opacity: 0.5 }));

basePage.add(object);

var renderer = new AccRendering.CanvasRenderer();
renderer.render(basePage);

Methods

build

Description
Geometry 'PlaneGeometry.build' method allows you to create plane geometry for an object.
Parameters
■width
  - Number
  - Width along the X axis.
■height
  - Number
  - Height along the Y axis.
■widthSegments (Optional)
  - Number
  - [default : 1] 
■heightSegments (Optional)
  - Number
  - [default : 1]
Return■Object
  - An instance of THREE.PlaneGeometry
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;

var basePage = new AccRendering.BasePage();

var geometry = new AccRendering.PlanGeometry().build(100, 100);

var matrial = new AccRendering.BasicMaterial();
var object = new AccRendering.Mesh3d(geometry, matrial.build({ color: Math.random() * 0xffffff, opacity: 0.5 }));

basePage.add(object);

var renderer = new AccRendering.CanvasRenderer();
renderer.render(basePage);

PlaneGeometry

Description
(Constructor) Geometry 'PlaneGeometry' method allows you to create plane geometry for an object. Return a factory to create PlanGeometry.
Parameters
■Void
Return■Object
  - A factory to create a PlaneGeometry
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;

var basePage = new AccRendering.BasePage();

var geometry = new AccRendering.PlanGeometry().build(100, 100);

var matrial = new AccRendering.BasicMaterial();
var object = new AccRendering.Mesh3d(geometry, matrial.build({ color: Math.random() * 0xffffff, opacity: 0.5 }));

basePage.add(object);

var renderer = new AccRendering.CanvasRenderer();
renderer.render(basePage);