taichi
taichi copied to clipboard
GGUI Refactorization
This issue enumerates a list of defects of GGUI that should be resolved before 1.1 release. Might overlap with #5423 .
If you have any thoughts regarding to GGUI, please feel free to place your comments here. 🤗
Renames
- [ ]
Camera
should be constructed merely by its init instead ofmake_camera()
; - [ ]
Window.get_canvas()
is inconsistent withWindow.GUI
, renameGUI
toget_gui
to hint the user that there exists a cost to create an wrapper object; - [ ]
Window.write_image()
should be renamed tosave_image
to avoid confusion of 'writing an image to the window'.
Handiness
- [ ] Set default values to any (potentially) optional API, including
Gui.begin()
andCamera.track_user_inputs()
; note that the later one doesn't default to values commonly used in taichi examples; - [ ] Default clear color to dark gray, to help users check if they have successfully drawn sth;
- [ ] Support constant,
np.ndarray
,ti.ndarray
andti.field
at the same time for attributes likevertex-color
; and remove dedicated per-vertex param likeper_vertex_color
(#5311 ); - [ ] Support numeric keys in event handlers (#5277 ).
Correctness
- [x] Ensure any kernel launch is submitted by synchronization before GGUI (#5131 );
- [ ] DPI factor is not handled in GGUI, leading to a different appearance;
- [x] Check out potential reasons
Camera.track_user_inputs
could fail like in https://github.com/bwzhao/TaichiPIC/tree/1689d61463f83d4713407dbb8acd2ffffed0671e.
Event Handling
- [ ] Confusing usage of
Window.is_pressed
andWindow.get_events
; encapsulate to more semanticalis_key_down()
,is_key_up()
,is_key_pressed
(up to down) andis_key_released
(down to up).
Feature Requests
- [ ] Line drawing with adaptive line width;
- [ ] MSAA.
cc @ailzhang @YuCrazing @Morcki
Check out potential reasons Camera.track_user_inputs could fail like in https://github.com/bwzhao/TaichiPIC/tree/1689d61463f83d4713407dbb8acd2ffffed0671e.
solved, refer to this link : https://github.com/bwzhao/TaichiPIC/issues/3
Check out potential reasons Camera.track_user_inputs could fail like in https://github.com/bwzhao/TaichiPIC/tree/1689d61463f83d4713407dbb8acd2ffffed0671e.
solved, refer to this link : bwzhao/TaichiPIC#3
Thanks!