Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

ektogamat
Copy link
Contributor

@ektogamat ektogamat commented Jul 20, 2023

  • non minified version of glsl
  • resize/re-render issue
  • added a CSB ex

@ektogamat ektogamat mentioned this pull request Jul 20, 2023
@abernier abernier force-pushed the lensflare-update branch 2 times, most recently from e88dc66 to 8a31730 Compare July 21, 2023 09:33
const [projectedPosition] = useState(() => new THREE.Vector3())
const [mouse2d] = useState(() => new THREE.Vector2())

const ref = useRef<LensFlareEffect>(null)
Copy link
Member

@CodyJasonBennett CodyJasonBennett Jul 21, 2023

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!)

Copy link
Member

@abernier abernier Jul 21, 2023

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)

@talentlessguy
Copy link
Member

is this safe to merge?

@abernier
Copy link
Member

nope, waiting for review

@CodyJasonBennett
Copy link
Member

Would it be preferable to consume the implementation from https://github.com/ektogamat/R3F-Ultimate-Lens-Flare via NPM?

@ektogamat
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants