File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ let apertureChangeSpeed = 1;
3737let focusDistance = 132.0 ;
3838let increaseFocusDist = false ;
3939let decreaseFocusDist = false ;
40+ let focusDistanceChangeSpeed = 1 ;
4041let pixelRatio = 1.0 ;
4142let windowIsBeingResized = false ;
4243let TWO_PI = Math . PI * 2 ;
@@ -943,14 +944,14 @@ function animate()
943944
944945 if ( increaseFocusDist )
945946 {
946- focusDistance += 1 ;
947+ focusDistance += ( 1 * focusDistanceChangeSpeed ) ;
947948 pathTracingUniforms . uFocusDistance . value = focusDistance ;
948949 cameraIsMoving = true ;
949950 increaseFocusDist = false ;
950951 }
951952 if ( decreaseFocusDist )
952953 {
953- focusDistance -= 1 ;
954+ focusDistance -= ( 1 * focusDistanceChangeSpeed ) ;
954955 if ( focusDistance < 1 )
955956 focusDistance = 1 ;
956957 pathTracingUniforms . uFocusDistance . value = focusDistance ;
You can’t perform that action at this time.
0 commit comments