shamansir / elm-aframe / AFrame.Components.Shadow

Shadow

See AFrame.Components.Light for corresponding light component.

type_ : AFrame.Variants.Shadow.Shadow -> AFrame.Properties.Property

Defines shadow map type (basic, pcf, pcfsoft) with varying appearance and performance characteristics.

Default : pcf (percentage closer filtering)

Cast / Receive

cast : Basics.Bool -> AFrame.Properties.Property

Whether the entity casts shadows onto the surrounding scene.

Default : true

receive : Basics.Bool -> AFrame.Properties.Property

Whether the entity receives shadows from the surrounding scene.

Default : true

Shadow Map

shadowMapWidth : Basics.Int -> AFrame.Properties.Property

Displays a visual aid showing the shadow camera’s position and frustum. This is the light’s view of the scene, used to project shadows.

Default : false

shadowMapHeight : Basics.Int -> AFrame.Properties.Property

Displays a visual aid showing the shadow camera’s position and frustum. This is the light’s view of the scene, used to project shadows.

Default : false

Shadow Camera Cube

shadowCameraLeft : Basics.Float -> AFrame.Properties.Property

Left plane of shadow camera frustum.

directional

Default : -5

shadowCameraTop : Basics.Float -> AFrame.Properties.Property

Top plane of shadow camera frustum.

directional

Default : 5

shadowCameraRight : Basics.Float -> AFrame.Properties.Property

Right plane of shadow camera frustum.

directional

Default : 5

shadowCameraBottom : Basics.Float -> AFrame.Properties.Property

Bottom plane of shadow camera frustum.

directional

Default : -5

shadowCameraNear : Basics.Float -> AFrame.Properties.Property

Near plane of shadow camera frustum.

Default : 0.5

shadowCameraFar : Basics.Float -> AFrame.Properties.Property

Far plane of shadow camera frustum.

Default : 500

Shadow Camera Options

shadowCameraFov : Basics.Float -> AFrame.Properties.Property

Shadow camera’s FOV.

point, spot

Default : 50

shadowCameraVisible : Basics.Bool -> AFrame.Properties.Property

Displays a visual aid showing the shadow camera’s position and frustum. This is the light’s view of the scene, used to project shadows.

Default : false

Configuration

shadowBias : Basics.Float -> AFrame.Properties.Property

Offset depth when deciding whether a surface is in shadow. Tiny adjustments here (in the order of +/-0.0001) may reduce artifacts in shadows.

Default : 0

autoUpdate : Basics.Bool -> AFrame.Properties.Property

Whether to dynamically update the shadow map every frame. Disable and manually update by setting renderer.shadowMap.needsUpdate = true for best performance. Calculating shadow maps is expensive.

Default : true

enabled : Basics.Bool -> AFrame.Properties.Property

Whether to disable shadows globally, even if there is a shadow component and a light with castShadow: true enabled.

Default : true