With the following code:
import type { BloomEffect } from "postprocessing";
import { useFrame } from "@react-three/fiber";
import { Bloom } from "@react-three/postprocessing";
import { useRef } from "react";
const MyBloom = () => {
const bloom = useRef<typeof BloomEffect | null>(null);
useFrame((state, delta) => {
bloom.current.intensity = 2;
});
return <Bloom ref={bloom} />
}
I get the following error:
Property 'intensity' does not exist on type 'typeof BloomEffect'.
The code works though - am I doing something wrong or is there an issue with the types?
With the following code:
I get the following error:
The code works though - am I doing something wrong or is there an issue with the types?