Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

Latest commit

 

History

History
45 lines (37 loc) · 3.63 KB

File metadata and controls

45 lines (37 loc) · 3.63 KB

Smoke

<Smoke /> is a component that renders a smoke in your scene. It is an abstraction that use a combination of textures, transparency and some calculation, to create a beautiful smoke - cloud - fog effect

Usage

::: warning Smoke componente comes with a default texture abstraction it needs to be wrapped by a Suspense component :::

You can use <Smoke /> component without passing any props, but still if you want you can tweak the props to find the best setup for you

<template>
  <TresCanvas>
    ...
    <Suspense>
      <Smoke />
    </Suspense>
    ...
  </TresCanvas>
</template>

Props

NameTypeDescriptionDefaultRequired
colorTresColorThe color of the smoke.
'#ffffff'No
opacitynumberThe strength of the opacity.
0.5No
speednumberThe rotation speed of the smoke.
0.4No
depthnumberThe base depth.
1.5No
segmentsnumberThe number of smoke to render.
20No
SpreadXnumberSpread factor on the X axis.
20No
SpreadYnumberSpread factor on the Y axis.
20No
Scalenumbercontrols the overall size of the smoke segments
1No
texturestringThe texture of the smoke.
default component textureNo
depthTestbooleanThe depthTest.
trueNo