LightShadow

THREE.LightShadow
See theLightShadow companion object
class LightShadow(var camera: Camera) extends Object

Abstract base class for light shadow classes. These classes represent the shadow configuration for different light types.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

override def clone(): LightShadow

Returns a new light shadow instance with copied values from this instance.

Returns a new light shadow instance with copied values from this instance.

Attributes

Definition Classes
Object
def copy(source: LightShadow): LightShadow

Copies the values of the given light shadow instance to this instance.

Copies the values of the given light shadow instance to this instance.

Attributes

def dispose(): Unit

Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

Attributes

Returns the frame extends.

Returns the frame extends.

Attributes

Gets the shadow cameras frustum. Used internally by the renderer to cull objects.

Gets the shadow cameras frustum. Used internally by the renderer to cull objects.

Attributes

def getViewport(viewportIndex: Double): Vector4

Returns a viewport definition for the given viewport index.

Returns a viewport definition for the given viewport index.

Attributes

def getViewportCount(): Double

Used internally by the renderer to get the number of viewports that need to be rendered for this shadow.

Used internally by the renderer to get the number of viewports that need to be rendered for this shadow.

Attributes

def toJSON(): Object

Serializes the light shadow into JSON.

Serializes the light shadow into JSON.

Attributes

def updateMatrices(light: Light): Unit

Update the matrices for the camera and shadow, used internally by the renderer.

Update the matrices for the camera and shadow, used internally by the renderer.

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

var autoUpdate: Boolean

Enables automatic updates of the light's shadow. If you do not require dynamic lighting / shadows, you may set this to false.

Enables automatic updates of the light's shadow. If you do not require dynamic lighting / shadows, you may set this to false.

Attributes

var bias: Double

Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow.

Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow.

The default is 0. Very tiny adjustments here (in the order of 0.0001) may help reduce artifacts in shadows.

Attributes

var blurSamples: Double

The amount of samples to use when blurring a VSM shadow map.

The amount of samples to use when blurring a VSM shadow map.

Attributes

var camera: Camera
var intensity: Double

The intensity of the shadow. The default is 1. Valid values are in the range [0, 1].

The intensity of the shadow. The default is 1. Valid values are in the range [0, 1].

Attributes

var map: Object

The depth map generated using the internal camera; a location beyond a pixel's depth is in shadow. Computed internally during rendering.

The depth map generated using the internal camera; a location beyond a pixel's depth is in shadow. Computed internally during rendering.

Attributes

var mapPass: Object

The distribution map generated using the internal camera; an occlusion is calculated based on the distribution of depths. Computed internally during rendering.

The distribution map generated using the internal camera; an occlusion is calculated based on the distribution of depths. Computed internally during rendering.

Attributes

Defines the width and height of the shadow map. Higher values give better quality shadows at the cost of computation time. Values must be powers of two.

Defines the width and height of the shadow map. Higher values give better quality shadows at the cost of computation time. Values must be powers of two.

Attributes

var mapType: Double

The type of shadow texture. The default is UnsignedByteType.

The type of shadow texture. The default is UnsignedByteType.

Attributes

Model to shadow camera space, to compute location and depth in shadow map. This is computed internally during rendering.

Model to shadow camera space, to compute location and depth in shadow map. This is computed internally during rendering.

Attributes

var needsUpdate: Boolean

When set to true, shadow maps will be updated in the next render call. If you have set [[LightShadow#autoUpdate]] to false, you will need to set this property to true and then make a render call to update the light's shadow.

When set to true, shadow maps will be updated in the next render call. If you have set [[LightShadow#autoUpdate]] to false, you will need to set this property to true and then make a render call to update the light's shadow.

Attributes

var normalBias: Double

Defines how much the position used to query the shadow map is offset along the object normal. The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.

Defines how much the position used to query the shadow map is offset along the object normal. The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.

Attributes

var radius: Double

Setting this to values greater than 1 will blur the edges of the shadow. High values will cause unwanted banding effects in the shadows - a greater map size will allow for a higher value to be used here before these effects become visible.

Setting this to values greater than 1 will blur the edges of the shadow. High values will cause unwanted banding effects in the shadows - a greater map size will allow for a higher value to be used here before these effects become visible.

The property has no effect when the shadow map type is PCFSoftShadowMap and and it is recommended to increase softness by decreasing the shadow map size instead.

The property has no effect when the shadow map type is BasicShadowMap.

Attributes