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

Re-instance THREE instances via args prop reactivity #366

Closed
4 tasks done
alvarosabu opened this issue Aug 17, 2023 · 0 comments · Fixed by #367
Closed
4 tasks done

Re-instance THREE instances via args prop reactivity #366

alvarosabu opened this issue Aug 17, 2023 · 0 comments · Fixed by #367
Assignees
Labels
bug Something isn't working

Comments

@alvarosabu
Copy link
Member

Description

As a developer using TresJS, I would like to change reactively the constructor params via args prop, which is not possible at the moment.

<script lang="ts" setup>
// renderer.domElement is undefined at the beginning. 
</script>

<template>
  <TresOrbitControls  :args="[activeCamera || camera, renderer?.domElement || domElement]" />
 </template>

Suggested solution

Add logic to nodeOps to re-instance the THREE object when args change

Alternative

No response

Additional context

No response

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant