tres icon indicating copy to clipboard operation
tres copied to clipboard

Rethink `useTresReady`

Open alvarosabu opened this issue 8 months ago • 2 comments

Description

As a maintainer of TresJS, I would like to improve the naming and practices used for the useTresReady composable, which is a mix of a composable and a lifecycle hook and see if the usercase is relevant

Suggested solution

Rethink https://github.com/Tresjs/tres/blob/main/src/composables/useTresReady/index.ts

Alternative

No response

Additional context

#712

Validations

alvarosabu avatar Apr 16 '25 07:04 alvarosabu

In the scope of this issue we should cleanup the composable calls in event callbacks. This already leads to an onUnmounted call when there is not component instance yet. See console warning.

Tinoooo avatar Apr 23 '25 09:04 Tinoooo

@alvarosabu Before this PR, there was logic that assumed the renderer would be ready after 100 ms, as Tres was considered "degenerate." What does this mean and do we still need it?

Tinoooo avatar Apr 23 '25 10:04 Tinoooo