Git Product home page Git Product logo

Comments (5)

dghez avatar dghez commented on August 12, 2024 1

Hey there, kinda agree. I was trying to use provide/inject from dom component to tresjs component ( to avoid prop drilling) but without luck, than i saw this issue trying to do the same.

I remember i had the same issue on react & r3f and they have a custom thing https://github.com/pmndrs/drei?tab=readme-ov-file#usecontextbridge, maybe can be useful to solve this?

from tres.

alvarosabu avatar alvarosabu commented on August 12, 2024

Hi, @Sea-DH1 this is a design limitation, the CustomizeContext.vue component belongs to the Vue renderer while everything inside of TresCanvas is another renderer (the custom renderer for threejs), they have different contexts.

That is also the reason you can't see the components inside the TresCanvas, because VueDevtools component tab is not meant to work with custom renderer objects.

To be able to inspect your components, a custom tab for vue devtools has been available since 3.7.0:

Official.Vue.chrome.devtools.TresJS.plugin.mp4

from tres.

Sea-DH1 avatar Sea-DH1 commented on August 12, 2024

But in the CustomizeContext.vue component, the custom provide cannot be obtained

from tres.

alvarosabu avatar alvarosabu commented on August 12, 2024

@Sea-DH1 as of now you can't share context between the Vue renderer and the Tres renderer. You can use a normal state for it.

from tres.

Sea-DH1 avatar Sea-DH1 commented on August 12, 2024

@alvarosabu
If the component level is deep, it is not very convenient to use the status

from tres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.