Skip to content

CircleShadow

<CircleShadow /> is a cheap, texture-based radial gradient on a THREE.PlaneGeometry.

Usage

vue
<script setup lang="ts">
import { CircleShadow, OrbitControls } from '@tresjs/cientos'
import { TresCanvas } from '@tresjs/core'
</script>

<template>
  <TresCanvas clear-color="#82DBC5">
    <TresPerspectiveCamera />
    <OrbitControls />
    <TresGroup :position-y="-0.5">
      <TresMesh :position-y="1">
        <TresBoxGeometry />
        <TresMeshNormalMaterial />
      </TresMesh>
      <CircleShadow :scale="1.5" />
    </TresGroup>
  </TresCanvas>
</template>

Props

All props are optional.

NameDescriptionDefault
colorColor of the shadow as a Color | number | string'black'
opacityOpacity of the shadow0.5
offsetPlacement of the first radial gradient color stop. 0.0 is the center of the circle. 1.0 is edge.0
fogWhether the material is affected by fogfalse
depthWriteWhether rendering the material has any effect on the depth bufferfalse