jupyter-widgets / pythreejs

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

the camera example doesn't seem to work #42

Closed stonebig closed 7 years ago

stonebig commented 8 years ago

on windows/firefox/python3.4/ipywidgets5.1.3/ipython4.2.0/traitlets4.2.1 ... jovyan_camera_firefox

the rest is ok.

stonebig commented 8 years ago

as a complementary comment, this whole lot series of jupyter nbextension enable --py *** is becoming painfull. I hope a Jupyter menu or option would allow to detect and install them all.

jupyter-notebook nbextension enable --py --all_that_you_find_and_recognize_via_pip_list
misolietavec commented 7 years ago

Very weird issue, windows-style. I think, code should be typed, not "screenshooted". It is not clear how the expected result should look like. Anyway, typing this:

geometry = SphereGeometry(radius=4)
# t = ImageTexture(imageuri="")   how can be texture created from empty uri???
material = LambertMaterial(color="green",opacity=0.2,transparent=True)
sphere = Mesh(geometry=geometry,material=material)
point = Mesh(geometry = SphereGeometry(radius=.5),
             material=LambertMaterial(color="red",transparent=False))
c = PerspectiveCamera(position=[0, 7, 7],
        children=[DirectionalLight(color='white', position=[8, 8, 2], intensity=0.5)])
scene = Scene(children=[sphere, point, AmbientLight(color="#777777")])
# p = Picker(event='mousemove', root=sphere)
renderer = Renderer(camera=c, scene = scene, controls=[OrbitControls(controlling=c)])
# coords = Text()   from where is the Text, what should this do???
# display(coords)   we have no Text, so no display...
display(renderer)

gives big sphere and small red sphere inside, thanks to opacity of bigger sphere (pythreejs 0.3.1). I do not understand the purpose of Picker here.

Without further explanation from author of this issue there is nothing to do.

vidartf commented 7 years ago

Closing this as missing information.