Open
Description
Describe the bug
I am setting the render-mode
on my TresCanvas
to on-demand
. I am using the CameraControls
for controlling orbiting. I expect the @render
emitter to fire only briefly when mounting the scene. But instead, it fires on every frame.
<TresCanvas
preset="realistic"
render-mode="on-demand"
@render="console.log('rendering ...')"
>
<TresPerspectiveCamera />
<CameraControls v-bind="controlsState" make-default />
<!-- rest of the scene -->
</TresCanvas>
Commenting out the rest of the scene does not change the behavior, when commenting out <CameraControls />
, on-demand returns to working as expected.
FYI: It does not happen with <OrbitControls />
component.
Reproduction
https://stackblitz.com/edit/tresjs-minimal-reproduction-gj1p2u?file=src%2FApp.vue
Steps to reproduce
- Open console and verify that the
@render
emitter is firing theconsole.log
- Comment out
<CameraControls v-bind="controlsState" make-default />
and check the console to verify that logging stops after a few render loops
System Info
No response
Used Package Manager
npm
Code of Conduct
- I agree to follow this project's Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Assignees
Type
Projects
Status
No status
Activity