Skip to content

Getting scene refs. #33

Answered by ffdead
mokargas asked this question in Q&A
Feb 18, 2024 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

Got it!

You also need to make sure the canvas children render inside your local scenes (sceneA, sceneB) instead of the global scene.
I pushed a new version v8.13.1 where the ScrollScene accepts a scene property. If provided it will portal the children to that scene. e693906

So you can do something like:

// somewhere globally
const sceneA = new Scene()
// in your UI component
<ScrolllScene track={ref} scene={sceneA}>...</ScrollScene>

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@mokargas
Comment options

@ffdead
Comment options

Answer selected by ffdead
@ffdead
Comment options

@ffdead
Comment options

@mokargas
Comment options

@ffdead
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants