Skip to content

RandomizedLights

<RandomizedLights /> internally creates multiple lights and jiggles them. You would normally add it as a child of <AccumulativeShadows />.

It is based on this Drei component.

Usage

vue
  <RandomizedLights
    :ambient="0.25"
    :bias="0.001"
    :count="8"
    :intensity="Math.PI"
    :map-size="1024"
    :position="[5, 5, -10]"
    :radius="2"
  />

Props

PropDescriptionDefault
countNumber of lights8
radiusRadius of the jiggle, higher values make softer light1
intensityLight intensityMath.PI
ambient"Ambient occlusion" to directional light ratio, lower values mean less AO0.5
castShadowIf the lights cast shadowstrue
biasDefault shadow bias0
mapSizeSize of the lights' shadow map512
sizeSize of the lights' shadow camera frustum10
nearLights' shadow camera near value0.5
farLights' shadow camera far value500
positionPosition[5, 5, -10]