A simple, almost ‘no code’ 3D-Viewer for HTML pages
The open-source PCB design program KiCad has a great feature: you can view created circuit boards in 3D. For online documentation, I didn’t want to miss out on this neat feature, so I wrote a small module that allows you to integrate, with very little effort, KiCad 3D models (and other 3D files) into HTML pages.
<link rel="stylesheet" href="./jo3dview.css"> <script type="importmap"> { "imports": { "three": "https://unpkg.com/three@latest/build/three.module.js", "three/addons/": "https://unpkg.com/three@latest/examples/jsm/" } } </script> <script type="module" defer src="./jo3dview.js"></script>
<div id="mviewer" class="jo3dviewer" style="width: 90vw; height: 80vh;"> <div id="mloader" class="jo3dloader"></div> </div>
view3d('mviewer', './rak3172sip.glb', 1.2, 'mloader');
Build This Project
Bring this design to life with the Elektor PCB Service, powered by Eurocircuits. Upload the project files and order professionally manufactured PCBs or assembled boards through a proven European production platform.
Supporting KiCad, Eagle, Gerber, and ODB++ formats, the service is suitable for everything from prototypes and validation builds to series production and volume manufacturing.
Made in Europe. Fast. Reliable. Professional.

Discussion (0 comments)