Skip to content

Conversation

@maartenbreddels
Copy link
Collaborator

@mgeier: I gave you credits for the 2nd commits.

Replaces #273 by allowing a pythreejs Controls. Example usage:

import pythreejs
import ipyvolume as ipv
import numpy as np
fig = ipv.figure()
ipv.plot_trisurf([0, 0, 3., 3.], [0, 4., 0, 4.], 2,
           triangles=[[0, 2, 3], [0, 3, 1]])
ipv.show()

control = pythreejs.OrbitControls(controlling=fig.camera)
fig.controls = control
control.autoRotate = True
# the controls does not update itself, but if we toggle this setting, ipyvolume will update the controls
# fig.render_continuous = True

@maartenbreddels maartenbreddels changed the title Feat pythreejs controls Feat: pythreejs controls Oct 29, 2019
@maartenbreddels maartenbreddels changed the title Feat: pythreejs controls Feature: pythreejs controls Oct 29, 2019
@coveralls
Copy link

coveralls commented Oct 29, 2019

Coverage Status

Coverage increased (+0.004%) to 66.227% when pulling 5b8c728 on feat_pythreejs_controls into fad27f9 on master.

@mgeier
Copy link
Contributor

mgeier commented Nov 11, 2019

Do I understand this correctly:

This allows users to explicitly specify (properly functioning) pythreejs.OrbitControls, but it doesn't change anything in the default behavior?

If yes, this is not at all what I intended to do in #273.
I wanted the default to be reasonable.
And in the long run, I wanted to try to make "orbit" controls the default, because I don't like this "trackball" thing.

Being able to explicitly specify OrbitControls is a great feature, but something quite different.

@maartenbreddels
Copy link
Collaborator Author

This allows users to explicitly specify (properly functioning) pythreejs.OrbitControls, but it doesn't change anything in the default behavior?

yes.

Commented noted, I think this gives users more flexibility, without changing the current behavior, which I think is fine.

@maartenbreddels maartenbreddels merged commit 982c149 into master Mar 30, 2020
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

Successfully merging this pull request may close these issues.

4 participants