1
1
<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'
6
4
7
5
const gl = {
8
6
clearColor: ' #82DBC5' ,
@@ -12,13 +10,6 @@ const gl = {
12
10
outputColorSpace: SRGBColorSpace ,
13
11
toneMapping: NoToneMapping ,
14
12
}
15
-
16
- const bloomParams = reactive ({
17
- luminanceThreshold: 0.2 ,
18
- luminanceSmoothing: 0.3 ,
19
- intensity: 4.0 ,
20
- blendFunction: BlendFunction .ADD ,
21
- })
22
13
</script >
23
14
24
15
<template >
@@ -30,17 +21,13 @@ const bloomParams = reactive({
30
21
<OrbitControls />
31
22
<TresMesh >
32
23
<TresSphereGeometry :args =" [2, 32, 32]" />
33
- <TresMeshStandardMaterial
34
- color =" hotpink"
35
- :emissive =" new Color('hotpink')"
36
- :emissive-intensity =" 9"
37
- />
24
+ <TresMeshNormalMaterial />
38
25
</TresMesh >
39
26
<TresGridHelper />
40
27
<TresAmbientLight :intensity =" 1" />
41
28
<Suspense >
42
29
<EffectComposer >
43
- <Bloom v-bind = " bloomParams " />
30
+ <Glitch />
44
31
</EffectComposer >
45
32
</Suspense >
46
33
</TresCanvas >
0 commit comments