pmndrs / drei

🥉 useful helpers for react-three-fiber
https://drei.pmnd.rs/
MIT License
7.85k stars 641 forks source link

Question about View #1957

Open DDman1984 opened 1 month ago

DDman1984 commented 1 month ago

Hi, guy I see a demo about View

According to my understanding of code, does constructing a view also simultaneously create a mesh object in the scene? If this is correct, would there be performance issues when displaying a high-polygon model? In other words, if I have N views intending to display a model with 1,000,000 triangles, will the scene need to render N * 1,000,000 triangles simultaneously?

In practice, I did observe the triangle count on the Perf monitor steadily increasing in the scene....

talkingtab commented 1 month ago

If you create <View/> nothing shows. Same with

<View>
</View>

So you must create the meshes or nothing is displayed.

The sandbox you linked to is gone, but in the original is this one I think https://codesandbox.io/p/sandbox/multiple-views-with-uniform-controls-r9w2ob?file=%2Fsrc%2FApp.js

if you delete the {children} of the SidePanel, nothing shows up.