top

CAPH.WUI.ENGINE.RENDERING.AREALIGHT

With AreaLight, object will illuminate in the scene with given properties. Emanating shape (usually rectangular or circular) can be declared.


Constructor

AreaLight

Description
constructs a AreaLight
Parameters
hex NumberNumeric value of the RGB component of the color.
intensity Number Numeric value of the light's strength/intensity.
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.AreaLight().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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

Methods

build

Description
AreaLight 'build' method is used to build AreaLight object
Parameters
■hex
  - Number
  - Numeric value of the RGB component of the color.
■intensity
  - Number
  - Numeric value of the light's strength/intensity.
Return■Object
  - An instance of THREE.AreaLight
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.AreaLight().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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

AreaLight

Description
(Constructor) constructs a AreaLight
Parameters
■hex
  - Number
  - Numeric value of the RGB component of the color.
■intensity
  - Number
  - Numeric value of the light's strength/intensity.
Return■Object
  - An instance of AreaLight
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.AreaLight().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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