jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
942 stars 188 forks source link

Exposing play method to AnimationAction (hiding controller) #190

Closed JuanCab closed 6 years ago

JuanCab commented 6 years ago

So, as I was exploring options for 'reseting' the view, I discovered the JS side has a play method for AnimationAction which would have served my purposes quite nicely. I was going to access it via controller.exec_three_obj_method('play') but could not figure out a way to hide the four button Play controller. There doesn't appear to be a clear way control AnimationAction programmatically.

vidartf commented 6 years ago

Thanks, this has been on the todo list for a while, but it fell between the cracks. I submitted a PR to expose access to the custom methods in #191.

could not figure out a way to hide the four button Play controller

You shouldn't need to display the AnimationAction to use it. All the logic is in the model. Simply do not put the variable as the last statement of a cell, or in a call to display().