Skip to content

Commit

Permalink
Update Rainbow.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlightnexus authored Sep 29, 2023
1 parent 3e6b743 commit cc1a667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/interactivePrism/Rainbow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const Rainbow = forwardRef(
const material = useRef(null);
const { width, height } = useThree((state) => state.viewport);
// calculate the maximum length the rainbow has to have to reach all screen corners
const length = Math.hypot(width, height) + 2.5; // add 1.5 to due motion of the rainbow
const length = (Math.hypot(width, height) + 2.5)/2; // add 1.5 to due motion of the rainbow
useFrame((state, delta) => {
// Only update if material.current.speed is not zero
if (material.current.speed !== 0) {
Expand Down

0 comments on commit cc1a667

Please sign in to comment.