Allow setting the camera "field of view"
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
It doesn't seem possible to set the 3D camera field of view (fov).
(Re: my post to Stackoverflow.)
Looking at the source code, I see that:
In https://github.com/plotly/plotly.js/blob/master/src/plots/gl3d/scene.js, it uses glPlot3d.createScene and sets the options in proto.prepareOptions.
In https://github.com/gl-vis/gl-plot3d/blob/master/scene.js#L179, the allowed options include the field-of-view parameter fovy (field-of-view in the vertical direction), which defaults to Math.PI/4 (45 degrees).
For 3D graphics, a 45-degree vertical field-of-view typically gives an exaggerated perspective. It corresponds to about a 28mm camera lens.
It would be nice for plotly.graph_objects.layout.scene.Camera to include a fovy parameter (in radians).
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Definition von plotly.py's layout.scene.Camera und verfolge, wie die Kameraoptionen plotly.js erreichen. Lies src/plots/gl3d/scene.js, insbesondere proto.prepareOptions, und vergleiche dessen Optionen mit gl-plot3d's scene.js etwa bei Zeile 179. Das Ziel ist erreicht, wenn die Python-Kamera-API fovy im Bogenmaß akzeptiert und an die 3D-Szene weitergibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100