Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Three.js: Camera viewpoint for scene #28672

Closed
paulmasson mannequin opened this issue Oct 29, 2019 · 18 comments
Closed

Three.js: Camera viewpoint for scene #28672

paulmasson mannequin opened this issue Oct 29, 2019 · 18 comments

Comments

@paulmasson
Copy link
Mannequin

paulmasson mannequin commented Oct 29, 2019

This ticket will replicate the behavior described in this comment

CC: @egourgoulhon @jplab

Component: graphics

Keywords: threejs

Author: Paul Masson

Branch/Commit: 8768faf

Reviewer: Jean-Philippe Labbé

Issue created by migration from https://trac.sagemath.org/ticket/28672

@paulmasson paulmasson mannequin added this to the sage-9.0 milestone Oct 29, 2019
@paulmasson paulmasson mannequin added c: graphics labels Oct 29, 2019
@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Oct 29, 2019

Changed keywords from none to threejs

@paulmasson paulmasson mannequin changed the title Three.js: Allowing setting of camera viewpoint in scene Three.js: Camera viewpoint for scene Nov 9, 2019
@paulmasson paulmasson mannequin added the s: needs info label Nov 9, 2019
@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 9, 2019

Branch: u/paulmasson/viewpoint

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 9, 2019

Commit: da0f77c

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 9, 2019

comment:4

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

@jplab
Copy link

jplab commented Nov 9, 2019

comment:5

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.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 22, 2019

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

2299dd4Preliminary viewpoint retrieval

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 22, 2019

Changed commit from da0f77c to 2299dd4

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 22, 2019

comment:7

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.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 23, 2019

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

8768fafAdd message for viewpoint

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 23, 2019

Changed commit from 2299dd4 to 8768faf

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 23, 2019

comment:9

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

@embray
Copy link
Contributor

embray commented Jan 6, 2020

comment:10

Ticket retargeted after milestone closed

@embray embray modified the milestones: sage-9.0, sage-9.1 Jan 6, 2020
@jplab
Copy link

jplab commented Jan 31, 2020

Reviewer: Jean-Philippe Labbé

@jplab
Copy link

jplab commented Jan 31, 2020

Author: Paul Masson

@jplab
Copy link

jplab commented Jan 31, 2020

comment:11

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!

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Feb 13, 2020

comment:12

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?

@jplab
Copy link

jplab commented Feb 14, 2020

comment:13

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

@vbraun
Copy link
Member

vbraun commented Feb 19, 2020

Changed branch from u/paulmasson/viewpoint to 8768faf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants