aframe-playground

A playground for learning about A-frame

View the Project on GitHub jgbarah/aframe-playground

Setting up the environment

Some of the demos can be run just by loading the corresponding HTML file in the browser (File | Open File). But in general, it is better to access them through a HTTP (web) server, and some of the demos will only work properly if accessed that way. In fact, some of the demos will only run if served via Secure HTTP (HTTPS).

Having a HTTP or HTTPS server serving the HTML files for you is not difficult. You can use some site in the Net that allows you to upload the files there, or you can set up your own HTTP server in your computer.

Using some site that serves the files

Using your own HTTP / HTTPS server

There are many (simple) options to serve a directory in your computer via HTTP or HTTPS:

python3 -m http.server

This will make the server accesible in port 8000 of the computer where it runs. From a browser in that computer, the web server will be accessible as http://localhost:8000. Instructions for Python2 are a bit different. See details in running a simple HTTP server.

openssl req -x509 -newkey rsa:4096 -nodes -sha256 -keyout key.pem -out cert.pem -days 365
openssl s_server -key key.pem -cert cert.pem -accept 4443 -WWW

The server will be listening in port 4443, and therefore it will be accesible as https://localhost:4443

OPENSSL_CONF=/dev/null budo --port 7000 --live --open --ssl --key ./node_modules/public-encrypt/test/test_key.pem --cert ./node_modules/public-encrypt/test/test_cert.pem --cors

The server will be listening in port 7000, and therefore it will be accesible as https://localhost:7000

webpack serve --mode development --content-base dist/

See how to make the server act as a HTTPS server, in the documentation for the devServer.https option, and in the documentation included in this section of this tutorial

Final notice: These servers can also be used to check the demos with VR or AR devices, such as Oculus Quest. For that, you need to know the IP address of your computer, and then instead of using localhost, use the IP address.