ShadowMapViewer class

This is a helper for visualising a given light's shadow map. It works for shadow casting lights: DirectionalLight and SpotLight. It renders out the shadow map and displays it on a HUD.

Example usage: 1) Import ShadowMapViewer into your app.

2) Create a shadow casting light and name it optionally:
	var light = new DirectionalLight( 0xffffff, 1 );
	light.castShadow = true;
	light.name = 'Sun';

3) Create a shadow map viewer for that light and set its size and position optionally:
	var shadowMapViewer = new ShadowMapViewer( light );
	shadowMapViewer.size.set( 128, 128 );	//width, height  default: 256, 256
	shadowMapViewer.position.set( 10, 10 );	//x, y in pixel	 default: 0, 0 (top left corner)

4) Render the shadow map viewer in your render loop:
	shadowMapViewer.render( renderer );

5) Optionally: Update the shadow map viewer on window resize:
	shadowMapViewer.updateForWindowResize();

6) If you set the position or size members directly, you need to call shadowMapViewer.update();

Constructors

ShadowMapViewer(dynamic light, dynamic innerWidth, dynamic innerHeight)

Properties

camera ↔ OrthographicCamera
getter/setter pair
enabled bool
getter/setter pair
frame Map<String, num>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
innerHeight num
getter/setter pair
innerWidth num
getter/setter pair
light ↔ Light
getter/setter pair
mesh ↔ Mesh
getter/setter pair
position Map<String, num>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scene ↔ Scene
getter/setter pair
size Map<String, num>
getter/setter pair
uniforms Map<String, dynamic>
getter/setter pair
userAutoClearSetting bool
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(dynamic renderer) → dynamic
resetPosition() → dynamic
setPosition(dynamic x, dynamic y) → dynamic
setSize(dynamic width, dynamic height) → dynamic
toString() String
A string representation of this object.
inherited
update() → dynamic
updateForWindowResize() → dynamic

Operators

operator ==(Object other) bool
The equality operator.
inherited