tres
tres copied to clipboard
On demand Rendering
Is your feature request related to a problem? Please describe. In scenes that are not continuously changing, it could be a massive performance improvement to only trigger rendering when things change.
Describe the solution you'd like
This feature should be optional. A prop on TresCanvas to activate it would be handy. There could be some kind of callback that can be used to request a render (something like requestTick
). This callback should be available in all child components of TresCanvas. It has to be called manually whenever changes are made that change the scene. This also means that internal entities (like OrbitControls
for example) have to call it whenever they change.
Suggested solution See above.
Maybe I'm misunderstanding, but couldn't you just pause/resume the render loop to implement that?
Maybe I'm misunderstanding, but couldn't you just pause/resume the render loop to implement that?
I think that approach would not be sufficient. pausing the render loop manually means, you woul'd have to manually resume the rendering in a lot of situations. Just some examples: Resizing of the canvas, changes in the render props, changes on materials, camera position changes (OrbitControls for example).
Please tell me, is there any progress on this feature that can be discussed?
Unfortunately, there is no progress on this.
@Tinoooo I was talking with le grish (thretle author) about it, they implementing a task scheduling for it. Some food for inspiration
https://threlte.xyz/docs/learn/basics/render-modes#mode-on-demand