Tresjs / cientos

Collection of useful helpers and fully functional, ready-made abstractions for TresJS
https://cientos.tresjs.org/
MIT License
288 stars 40 forks source link

useFBO abstraction #149

Closed alvarosabu closed 1 year ago

alvarosabu commented 1 year ago

Description

As a Developer using TresJS I would like to have a composable useFBO that leverages the effort of creating a THREE.WebGLRenderTarget

const target = useFBO({ stencilBuffer: false })

Drei's https://github.com/pmndrs/drei/blob/master/src/core/useFBO.tsx

Reference: https://github.com/pmndrs/drei/tree/master#usefbo

Suggested solution

Implement a composable that accepts:

And returns the renderTarget, The rendertarget should be automatically disposed when unmounted.

Alternative

No response

Additional context

No response

Validations

kekkorider commented 1 year ago

Any update on this? 🙂

JaimeTorrealba commented 1 year ago

@kekkorider Would you like to take this?

kekkorider commented 1 year ago

I can give it a try 🤓

JaimeTorrealba commented 1 year ago

@kekkorider fantastic! We're here to help, so please feel free to contact me in discord (Io anche parlo italiano) or Alvaro