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

Doc error in Camera.projection_mode() #8516

Open
SPOREIII opened this issue Apr 20, 2024 · 0 comments
Open

Doc error in Camera.projection_mode() #8516

SPOREIII opened this issue Apr 20, 2024 · 0 comments
Labels
doc Documentation related issues & PRs

Comments

@SPOREIII
Copy link

doc link
The documentation states that to change the projection mode you should pass 0 or 1.

Camera projection mode, 0 for perspective and 1 for orthogonal.

But passing in an integer parameter will result in an error:

TypeError: projection_mode(): incompatible function arguments. The following argument types are supported:
    1. (self: taichi._lib.core.taichi_python.PyCamera, arg0: taichi::ui::ProjectionMode) -> None

Invoked with: <taichi._lib.core.taichi_python.PyCamera object at 0x0000022D54A6E8B0>, 1

I found that the correct way to do it is to pass in 'ti.ui.ProjectionMode.Orthogonal' or 'ti.ui.ProjectionMode.Perspective'

@SPOREIII SPOREIII added the doc Documentation related issues & PRs label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation related issues & PRs
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant