A simple app that generates WebVR code for scenes made using A-Frame primitives and displays the corresponding HTML code
A-frame is a really nice and easy to use web framework for creating VR and AR experiences.
-
Documentation - The official A-Frame documentation
-
Features - A super collection of A-Frame components.
-
More Examples - More A-Frame Example codes
This app is meant to be a starting point for WebVR. You can play around with VR primitives like a-box, a-sphere and generate simple VR scenes. Also, the corresponding html code is generated. Access the app here: https://share.streamlit.io/jojo96/webvrcodegenerator/main/ar.py
Some of the various supported primitives are:
- a-box
- a-sphere
- a-ring
- a-cylinder
- a-torus-knot
- a-plane
Also, one can include point light or ambient light in the scene, change environment or add fog!!
These various options can be selected in the sidebar and the button Generate Web VR will render the VR Scene and generate HTML code. This HTML code can be saved in an index.html file and served using a web server.
You can use the ZapWorks command-line tool to serve your HTML folder over HTTPS for access on your local computer:
zapworks serve .
Remember to run the command within the folder that has your saved index.html file.
This is how the app looks in real time.
git clone https://github.com/jojo96/WebVRCodeGenerator.git
cd WebVRCodeGenerator
streamlit run ar.py
A page would open in our browser and you can interact with the streamlit app.