Learn to Code via Tutorials on Repl.it!

← Back to all posts
how to make augmented reality
BrightSideSide (4)

⚫first, you need to get a 3d model you can do so by making your own one in Blender of paint 3d

⚫Then export the model as a GLB file and upload it to repl.it

⚫Finally, add this code to your website:

<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>

<model-viewer src="untitled.GLB(or what ever your glb file is called)" alt="A 3D model of an astronaut" ar ar-modes="webxr scene-viewer quick-look" environment-image="neutral" auto-rotate camera-controls></model-viewer>

{the AR only works in android devices}

if you're having trouble understanding or have any question feel free to comment