top

CAPH.WUI.ENGINE.RENDERING.AMBIENTLIGHT

AmbientLight has no position or direction. This illuminates a BasePage equally throughout.


Constructor

AmbientLight

Description
AmbientLight 'build' method is used to build AmbientLight object
Parameters
hex Number-Numeric value of the RGB component of the color. -This creates an Ambientlight with a color.
Emulator SupportY
SDK ConstraintNone
Example
var AccRendering = caph.wui.engine.rendering;

var basePage = new AccRendering.BasePage();

var geometry = new AccRendering.SphereGeometry().build(100, 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 light = new AccRendering.AmbientLight().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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

Methods

build

Description
AmbientLight 'build' method is used to build AmbientLight object
Parameters
■hex
  - Number
  - Numeric value of the RGB component of the color.
  - This creates an Ambientlight with a color.
Return■Object
  - An instance of THREE.AmbientLight
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;

var basePage = new AccRendering.BasePage();

var geometry = new AccRendering.SphereGeometry().build(100, 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 light = new AccRendering.AmbientLight().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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

AmbientLight

Description
(Constructor) AmbientLight 'build' method is used to build AmbientLight object
Parameters
■hex
  - Number
  - Numeric value of the RGB component of the color.
  - This creates an Ambientlight with a color.
Return■Object
  - An instance of AmbientLight
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;

var basePage = new AccRendering.BasePage();

var geometry = new AccRendering.SphereGeometry().build(100, 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 light = new AccRendering.AmbientLight().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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