Real 3d engine is too easy (Threejs etc). Inside this oldschool type of engine, there isn't really such a concept as the polygon/triangle. Instead the world is made of extruded lines, tricks, hacks, and texture mapping with horizontal/vert strips. Code is pure html5 js, no additional libraries/extensions/apis etc.