Skip to content

Commit

Permalink
Example test update
Browse files Browse the repository at this point in the history
  • Loading branch information
edsaac committed Apr 11, 2024
1 parent 880ebc1 commit 751699f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stpyvista/src/stpyvista/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def experimental_vtkjs(vtksz_data: bytes, key: Optional[str] = None):
Returns
-------
dict
str
A stringified JSON with camera view properties.
"""

Expand Down
10 changes: 5 additions & 5 deletions stpyvista/test/sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ async def main():

st.set_page_config(page_icon="🧊", layout="wide")
st.title("🧊 `stpyvista`")
st.write("**Show PyVista 3D visualizations in Streamlit**")
st.write("*Show PyVista 3D visualizations in Streamlit*")

plotter = create_plotter()

if "data" not in st.session_state:
st.session_state.data = await export_vtksz(plotter)

lcol, rcol = st.columns([1,4])
lcol, rcol = st.columns(2)
with rcol:
"🌎 3D Model"
camera = experimental_vtkjs(st.session_state.data, key="experimental-stpv")

with lcol:
"🎥 Camera"
st.json(camera)

# st.header("Using panel-based export")
# stpyvista(plotter, key="stpy-sphere")

if __name__ == "__main__":
asyncio.run(main())

0 comments on commit 751699f

Please sign in to comment.