Skip to content

Commit

Permalink
[gui] Restore make_camera API (as a helper function) (#8397)
Browse files Browse the repository at this point in the history
Issue: #

### Brief Summary

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at fce608a</samp>

Added `make_camera` function to `taichi.ui` module. This function
simplifies the creation of `Camera` objects for graphics applications.

### Walkthrough

<!--
copilot:walkthrough
-->
### <samp>🤖 Generated by Copilot at fce608a</samp>

* Add `make_camera` function to `taichi.ui` module
([link](https://github.com/taichi-dev/taichi/pull/8397/files?diff=unified&w=0#diff-d74902103a42239b732ecd5e2a4d676995fe132f99a01a7082b7558ea23725f0R16-R18))

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
bobcao3 and pre-commit-ci[bot] authored Oct 31, 2023
1 parent b8d7ffd commit b2d553f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/taichi/ui/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
ProjectionMode = _ti_core.ProjectionMode if _ti_core.GGUI_AVAILABLE else None
"""Camera projection mode, 0 for perspective and 1 for orthogonal.
"""


def make_camera():
return Camera()

0 comments on commit b2d553f

Please sign in to comment.