#28672 closed enhancement (fixed)

Three.js: Camera viewpoint for scene

Reported by: paulmasson Owned by:
Priority: major Milestone: sage-9.1
Component: graphics Keywords: threejs
Cc: egourgoulhon, jipilab Merged in:
Authors: Paul Masson Reviewers: Jean-Philippe Labbé
Report Upstream: N/A Work issues:
Branch: 8768faf (Commits, GitHub, GitLab) Commit: 8768fafd05184815c1798e25bbd5b1f55c91745b
Dependencies: Stopgaps:

Status badges


This ticket will replicate the behavior described in this comment

Change History (14)

comment:1 Changed 21 months ago by paulmasson

  • Keywords threejs added

comment:2 Changed 21 months ago by paulmasson

  • Status changed from new to needs_info
  • Summary changed from Three.js: Allowing setting of camera viewpoint in scene to Three.js: Camera viewpoint for scene

comment:3 Changed 21 months ago by paulmasson

  • Branch set to u/paulmasson/viewpoint

comment:4 Changed 21 months ago by paulmasson

  • Commit set to da0f77c3f0ad24554ffddb187be8f0c43f577f25

Jean-Philippe, this is a preliminary version of the functionality you're currently using in jmol. The menu option "Camera Info" has been changed to "Get Viewpoint". When selected it will copy a string of the form "[x,y,z] angle" to your clipboard, which you can then paste directly into the Sage command.

RIght now there is no visible confirmation that the functionality is working. We could also have a pop-up alert with the same string, but I'm not particularly fond of those because they break the flow and create extra work.

Try it out for a few examples and let me know if this is close to what you want. The projection in the tikz images appears to be orthogonal, so it doesn't look exactly the same to me as the web page graphic.

New commits:

da0f77cPreliminary viewpoint retrieval

comment:5 Changed 21 months ago by jipilab

Hi Paul,

I'm currently on the road for another week. I will test this as soon as I get some time; if not then right when I get back to the office.

comment:6 Changed 21 months ago by git

  • Commit changed from da0f77c3f0ad24554ffddb187be8f0c43f577f25 to 2299dd44340696cff29b23c6b6b1ba3458b4fa53

Branch pushed to git repo; I updated commit sha1. New commits:

2299dd4Preliminary viewpoint retrieval

comment:7 Changed 21 months ago by paulmasson

After all of the effort it took to build 9.beta6, I've copied the same code to a new branch based on that version. Don't want to have to rebuild any previous versions at this point.

Jean-Philippe, if you want to get this into Sage 9 then I need to hear from you sooner rather than later.

comment:8 Changed 21 months ago by git

  • Commit changed from 2299dd44340696cff29b23c6b6b1ba3458b4fa53 to 8768fafd05184815c1798e25bbd5b1f55c91745b

Branch pushed to git repo; I updated commit sha1. New commits:

8768fafAdd message for viewpoint

comment:9 Changed 21 months ago by paulmasson

Figured out a simple way to add a disappearing message. Better user experience.

comment:10 Changed 19 months ago by embray

  • Milestone changed from sage-9.0 to sage-9.1

Ticket retargeted after milestone closed

comment:11 Changed 18 months ago by jipilab

  • Authors set to Paul Masson
  • Reviewers set to Jean-Philippe Labbé
  • Status changed from needs_info to needs_review

Amazing!!!! It works perfectly in sage9.1beta2. I will be able to update the tutorial with this. The user experience will be much more simple! It's great!

For the orthogonal projection: yes that's how it works... Unfortunately, perspective is not really featured in tikz AFAIK.

Sorry for the delay it took... I put it in needs review for the sake of the patchbot. Once it has the green light, I believe it is good to go!

comment:12 Changed 18 months ago by paulmasson

Jean-Philippe, the only changes in this ticket are in JavaScript, which this bot isn't testing (and it marks the template as unsafe at the start of the log). The failing tests are in parts of Sage that have nothing to do with this ticket. This needs to get in to handle #29192. Are we good to go?

comment:13 Changed 18 months ago by jipilab

  • Status changed from needs_review to positive_review

Agreed. The failing tests are not related to this ticket. It's good to go!

comment:14 Changed 18 months ago by vbraun

  • Branch changed from u/paulmasson/viewpoint to 8768fafd05184815c1798e25bbd5b1f55c91745b
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.