-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lensflare update #231
base: master
Are you sure you want to change the base?
Lensflare update #231
Conversation
ektogamat
commented
Jul 20, 2023
•
edited by abernier
Loading
edited by abernier
- non minified version of glsl
- resize/re-render issue
- added a CSB ex
Also adding some changes to the secondary story.
25594ab
to
51fbf4e
Compare
e88dc66
to
8a31730
Compare
8a31730
to
1cb5ea7
Compare
const [projectedPosition] = useState(() => new THREE.Vector3()) | ||
const [mouse2d] = useState(() => new THREE.Vector2()) | ||
|
||
const ref = useRef<LensFlareEffect>(null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need a non-null assertion there to clear the earlier error.
const ref = useRef<LensFlareEffect>(null!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just tried in c9788b3 but still yelling about typeof LensFlareEffect
:
Type 'MutableRefObject<LensFlareEffect>' is not assignable to type 'Ref<typeof LensFlareEffect> | undefined'.
Type 'MutableRefObject<LensFlareEffect>' is not assignable to type 'RefObject<typeof LensFlareEffect>'.
Types of property 'current' are incompatible.
Property 'prototype' is missing in type 'LensFlareEffect' but required in type 'typeof LensFlareEffect'.ts(2322)
319a60e
to
b2827a2
Compare
b2827a2
to
baf0b60
Compare
is this safe to merge? |
nope, waiting for review |
Would it be preferable to consume the implementation from https://github.com/ektogamat/R3F-Ultimate-Lens-Flare via NPM? |
Hey Cody. Thank you for the feedback. That is possible, but I would say that it would limit its usage because most of the devs might never find it. Having this inside the library would make it easier to find and help many developers in the future. But I can understand that I'm not being very helpful in porting it to TypeScript due to my lack of knowledge in this field. |