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

help in using setter function with folder #491

Open
rmr-code opened this issue Feb 7, 2024 · 0 comments
Open

help in using setter function with folder #491

rmr-code opened this issue Feb 7, 2024 · 0 comments

Comments

@rmr-code
Copy link

rmr-code commented Feb 7, 2024

Hello:

I am using a folder as below:

const r1 = useControls({Blue: folder({
        x: {value: ring1json.position[0], min: -3, max: 3, step:0.1},
        y: {value: ring1json.position[1], min: 0.08, max: 2, step: 0.2},
        z: {value: ring1json.position[2], min: -3, max: 3, step: 0.1},
        move: {value: true}
    })});

I need to disable x, y, z when move is set to false. So I assume I need to use the set function for r1 and update the disable attribute of x, y and z. However, when I am trying to add the set function I get an "object is not iterable error"

I have tried

const [{r1}, setR1] = ...

const[r1, setR1] = ....

What is the correct syntax to get the set function? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant