Closed JuanCab closed 6 years ago
The radius is only meant for initial geometry creation. I guess it cold be made readonly. To resize the ball change the scale of the Mesh object instead.
Thank you, changing the scale of the Mesh did the trick! However, the example notebook needs to be fixed.
Agreed! Todos:
There might be some other issues with making it read only, so I'm dropping that, and instead refer to the three.js docs:
Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
Will fix the example now.
I was playing with the examples at https://github.com/jupyter-widgets/pythreejs/blob/master/examples/Examples.ipynb because I was unable to dynamically change the radius of a sphere in my notebook when I discovered that the sample code doesn't work for me.
Using pythreejs-1.0.0, when I run the following:
I get an animation of a blue color ball moving in circles, but the radius of the ball doesn't update after being initially set to 1, despite the fact that
ball.geometry.radius
is being updated.