taichi
taichi copied to clipboard
Doc error in Camera.projection_mode()
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'