create release

This commit is contained in:
nicolalandro 2021-11-21 14:10:22 +01:00
parent d716f028f9
commit 91a429ba25
2 changed files with 17 additions and 1 deletions

View File

@ -24,6 +24,22 @@ Use in a Jupyter notebook to display a .obj 3D file:
obj2html('model.obj', 'index.html') obj2html('model.obj', 'index.html')
display(HTML('index.html')) display(HTML('index.html'))
Use in streamlit app to display a .obj 3D file and create download button:
.. code-block:: python
import streamlit as st
import streamlit.components.v1 as components
from obj2html import obj2html
html_string = obj2html("model.obj", html_elements_only=True)
components.html(html_string)
with open("model.obj") as f:
st.download_button('Download model.obj', f, file_name="download_name.obj")
.. image:: https://gitlab.com/nicolalandro/obj2html/-/raw/main/imgs/streamlit_example.png
:alt: Streamlit example
It is also possible to set the scale factor, light and camera options: It is also possible to set the scale factor, light and camera options:
.. code-block:: python .. code-block:: python

View File

@ -7,7 +7,7 @@ with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pipy_readme.
setup( setup(
name = 'obj2html', name = 'obj2html',
packages = ['obj2html'], packages = ['obj2html'],
version = '0.13', version = '0.14',
license='MIT', license='MIT',
description = 'Create an html with three.js that contains the given .obj file.', description = 'Create an html with three.js that contains the given .obj file.',
long_description = long_des, long_description = long_des,