question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting camera position must be updated via home button

See original GitHub issue

This might just be a matter of documentation, but I can’t seem to get the camera to reset positions correctly. I’m dealing with a large mesh whose bounding box is approximately centered at the origin and that extends from roughly -100 to 100 in each dimension. Everything about the display seems fine until I try to set the camera position. My code looks something like this:

import ipyvolume as ipv
f = ipv.figure(width=600, height=600)
m = ipv.plot_trisurf(x, y, z, ...)
# setup view from bottom of the mesh
f.camera.up = (0, -1, 0)
f.camera.position = (0, 0, -150)
f.camera.fov = 0.65
f.camera.lookAt([0,0,0])
ipv.show()

When I execute this, the mesh appears correctly, but the camera appears to be very very close to the top of the mesh looking down; if I then push the home-button in the upper right corner of the display region, the camera moves to the correct position with the correct fov and orientation.

It seems likely that there is an update function that I’m failing to call. My first thought was that I needed something like f.exec_three_obj_method('reset') (per this bug report in pythreejs), but that doesn’t appear to have changed anything.

Thanks in advance, and for maintaining this library!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
maartenbreddelscommented, Sep 19, 2018

I hope it works, it’s a fix anyway, I hope it also fixes your issue.

0reactions
noahbensoncommented, Sep 18, 2018

Great, thanks so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adjust settings for the side or Home button on iPhone
Go to Settings > Accessibility, then tap Side Button (on an iPhone with Face ID) or Home Button (on other iPhone models). Set...
Read more >
10 Hidden iPhone Camera Features Every Photographer ...
Discover 10 hidden iPhone camera features that will dramatically improve your photos...and give you ultimate control over your iPhone camera.
Read more >
Manage app permissions for your camera in Windows
Manage app permissions for your camera in Windows · Select Start > Settings > Privacy & security > Camera, then make sure Camera...
Read more >
Manage your Android device's location settings - Nexus Help
Understand the location settings available on your phone ... Earthquake alerts for your Android device: To get updates for nearby earthquakes on your...
Read more >
22 Essential iOS Settings to Help Boost Your iPhone's ... - CNET
1. Stop apps from tracking your exact location · 2. Turn the back of your iPhone into a button · 3. Bring back...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found