Closed ZacZhangzhuo closed 8 months ago
Wait, I should put out a better solution that also solves #209 . I convert it into draft and will work on it.
maybe do you have any clue about the break point of the camera? sometimes it becomes blank and not useable. there might be some trick in setting the params. @Licini
@ZacZhangzhuo We should also allow using programmable API to achieve this besides config. Something like
viewer = App()
...
viewer.camera.top_view()
viewer.show()
or
viewer = App(view_port="top")
...
viewer.show()
Hi @Licini , I updated the solution and it is ready to be reviewed:
CUSTOM
option, but in PERSPECTIVE
you can define the target, position and any other params.TOP
, FRONT
, and RIGHT
are also configurable, like the target
. Except for the position
@ZacZhangzhuo We should also allow using programmable API to achieve this besides config. Something like
viewer = App() ... viewer.camera.top_view() viewer.show()
or
viewer = App(view_port="top") ... viewer.show()
Almost there, as Tom mentioned, let's make view_port
to viewport
and view_mode
to viewmode
. And please add kwarg to App init api e.g. App(viewport="Top")
changed, you can use the below code to exam:
viewer = App(viewport="front")
viewer.show()
since this is a small update, I have not put an example yet. but the doc is updated in the tutorial_configuration
:
2. In-code definition which overwrites the configuration:
::
>>> from compas_view2.app import App
>>> viewer = App(viewmode="lighted", viewport = "top", enable_sceneform=True, enable_propertyform=True, enable_sidebar=True, width=2000, height=1000)
let me know if you think we should add an extra example file.
also, the underscores of other options in the config:
like enable_propertyform, flow_view_size, zoom_selected, view_perspective, background_color, and selection_color,
are not changed. let me know if you want to change them too.
sorry i approved this by accident. will leave the approval up to @Licini
@ZacZhangzhuo if you bring in the latest changes from main the docs will build a lot faster...
@ZacZhangzhuo if you bring in the latest changes from main the docs will build a lot faster...
thanks for the update change!
What type of change is this?
Added
view_angle
andcamera
in the config. This should close #207 .Thanks @tomvanmele for the proposal.