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

Use multiple Perf with multiple Canvas #60

Open
AlaricBaraou opened this issue Dec 18, 2024 · 1 comment
Open

Use multiple Perf with multiple Canvas #60

AlaricBaraou opened this issue Dec 18, 2024 · 1 comment

Comments

@AlaricBaraou
Copy link
Contributor

I tried to use it with multiple canvas hoping to get separate Perf info for each canvas.

Something like

<Canvas>
    <Perf />
</Canvas>
<Canvas>
    <Perf />
</Canvas>

I tried an ugly solution which consist in passing the gl of useThree ( WebGLRenderer ) to each getPerf, setPerf, usePerf hooks of the store to separate the datas.
But no matter what I did it seems like they overwrite each other. And it was getiting much more complicated than what I initially hoped.
It might be a cool improvement to be able to have x in the future, if someone feel like taking a stab at it. 👍

@AlaricBaraou
Copy link
Contributor Author

for reference, it's super ugly but kind of work.
https://github.com/AlaricBaraou/r3f-perf/tree/per-canvas-perf
For it to fully work I need too many breaking change,I might fork a version that fully work if I get the time and motivation

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

No branches or pull requests

1 participant