You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.
Hi, I was trying to use three-elements inside a LitElement-based web component with Shadow DOM enabled and ended up finding that the current way of referencing other three objects by a selector isn't compatible with Shadow DOM
From what I could see in the v0.4 code, this util is only used when fetching the camera in a scene and when applying a prop using the ref directive.
I was thinking of possible solutions, one I came up with is trying to run the querySelector from the three-game ancestor, and maybe asking users to disable shadow DOM for web components meant to be used as descendants of a three-game.
But there might be a better solution.
As for workarounds, at least for setting a custom camera you can run the following code in your connectedCallback (or firstUpdated in Lit's case):
Hi, I was trying to use three-elements inside a LitElement-based web component with Shadow DOM enabled and ended up finding that the current way of referencing other three objects by a selector isn't compatible with Shadow DOM
From what I could see in the v0.4 code, this util is only used when fetching the camera in a scene and when applying a prop using the ref directive.
I was thinking of possible solutions, one I came up with is trying to run the querySelector from the three-game ancestor, and maybe asking users to disable shadow DOM for web components meant to be used as descendants of a three-game.
But there might be a better solution.
As for workarounds, at least for setting a custom camera you can run the following code in your connectedCallback (or firstUpdated in Lit's case):
The text was updated successfully, but these errors were encountered: