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

setVariable method won't reflect on the scene, after the window has been resized #158

Open
rvkoon opened this issue Oct 17, 2023 · 3 comments
Labels
question Further information is requested

Comments

@rvkoon
Copy link

rvkoon commented Oct 17, 2023

Hey Spline team,
First of all, congrats for your amazing work.

I'm in trouble with one of my scenes. I have a simple torus knot and I change its weight binding on an html input range.
The weight is stored within a react state, and when this state updates, the spline scene calls the method setVariable to update the knot weight.
No issue to do so, everything working great.. until I change the screen size.
In fact, I have a window resize event on the same knot, in order to handle responsiveness.

So what happens is :

  1. everything works great when changing weight
  2. resizing screen ( to enter mobile view ) => works
  3. changing weight variable not working anymore

context is Next.js 13

@superguigui
Copy link
Contributor

Hi! Do you mind sharing your scene so we can test and reproduce?
If you don't want to share your scene here you can send your scene link at [email protected] with a link to this issue.
Thanks!

@Andergraw
Copy link

Hey Spline team, First of all, congrats for your amazing work.

I'm in trouble with one of my scenes. I have a simple torus knot and I change its weight binding on an html input range. The weight is stored within a react state, and when this state updates, the spline scene calls the method setVariable to update the knot weight. No issue to do so, everything working great.. until I change the screen size. In fact, I have a window resize event on the same knot, in order to handle responsiveness.

So what happens is :

  1. everything works great when changing weight
  2. resizing screen ( to enter mobile view ) => works
  3. changing weight variable not working anymore

context is Next.js 13

Hi both!
Could I get some help? I am trying to do exactly the same without success. I don't know how to initialize the variables correctly from the React side. Besides, I don't know how can I assign my state variable to it. I have already done that with the rotation and position of an object, but not with a variable.
Any help would be much appreciated.
Thank you for your work with this repo!

@indriks
Copy link

indriks commented Mar 5, 2024

Also interested on this.

@marcofugaro marcofugaro added the question Further information is requested label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants