File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ debugGroup.add(targetBall)
86
86
87
87
debugGroup . visible = false
88
88
89
+ const shaderlessLight = new THREE . DirectionalLight ( 0xffffff , 1 )
90
+ shaderlessLight . position . set ( 0 , 100 , 0 )
91
+
89
92
// --------------------------------------------------------------------------------
90
93
// Postprocessing
91
94
@@ -133,6 +136,20 @@ guiMeshFog
133
136
scene . background = canUni . fogColorFar . value
134
137
} )
135
138
139
+ guiMeshFog
140
+ . add ( { disableShader : false } , "disableShader" )
141
+ . onChange ( ( disable ) => {
142
+ if ( canyonMesh ?. material ) {
143
+ if ( disable ) {
144
+ canyonMesh . material = new THREE . MeshStandardMaterial ( )
145
+ scene . add ( shaderlessLight )
146
+ } else {
147
+ canyonMesh . material = canyonMaterial
148
+ scene . remove ( shaderlessLight )
149
+ }
150
+ }
151
+ } )
152
+
136
153
// --------------------------------------------------------------------------------
137
154
// Animation
138
155
You can’t perform that action at this time.
0 commit comments