11<script setup lang="ts">
2- import { Bloom , EffectComposer } from ' @tresjs/post-processing/pmndrs'
3- import { BlendFunction } from ' postprocessing'
4- import { BasicShadowMap , Color , NoToneMapping , SRGBColorSpace } from ' three'
5- import { reactive } from ' vue'
2+ import { EffectComposer , Glitch } from ' @tresjs/post-processing/pmndrs'
3+ import { BasicShadowMap , NoToneMapping , SRGBColorSpace } from ' three'
64
75const gl = {
86 clearColor: ' #82DBC5' ,
@@ -12,13 +10,6 @@ const gl = {
1210 outputColorSpace: SRGBColorSpace ,
1311 toneMapping: NoToneMapping ,
1412}
15-
16- const bloomParams = reactive ({
17- luminanceThreshold: 0.2 ,
18- luminanceSmoothing: 0.3 ,
19- intensity: 4.0 ,
20- blendFunction: BlendFunction .ADD ,
21- })
2213 </script >
2314
2415<template >
@@ -30,17 +21,13 @@ const bloomParams = reactive({
3021 <OrbitControls />
3122 <TresMesh >
3223 <TresSphereGeometry :args =" [2, 32, 32]" />
33- <TresMeshStandardMaterial
34- color =" hotpink"
35- :emissive =" new Color('hotpink')"
36- :emissive-intensity =" 9"
37- />
24+ <TresMeshNormalMaterial />
3825 </TresMesh >
3926 <TresGridHelper />
4027 <TresAmbientLight :intensity =" 1" />
4128 <Suspense >
4229 <EffectComposer >
43- <Bloom v-bind = " bloomParams " />
30+ <Glitch />
4431 </EffectComposer >
4532 </Suspense >
4633 </TresCanvas >
0 commit comments