top

CAPH.WUI.ENGINE.RENDERING.HEMISPHERELIGHT

A light source positioned directly above the scene. Affects objects using LambertMaterial or PhongMaterial.


Constructor

HemisphereLight

Description
Return a factory to create a HemisphereLight
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.Hemisphere().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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

Methods

build

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

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

HemisphereLight

Description
(Constructor) Return a factory to create a HemisphereLight
Parameters
■Void
Return■Object
  - A factory to create a HemisphereLight
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.Hemisphere().build(0xFFFF00);
light.position.set(500, 0, 0);
basePage.scene.add(light);

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