TypeScript is very powerful programming language than can express complex ideas in a simple way. In this tutorial Matas Ubarevicius builds a simple 3D cube with TypeScript and bitbybit-runner.js library.
Simple geometry of OCCT cube is used on purpose. Main goal is to learn how you can integrate our 3D TypeScript code into your JavaScript web development workflows.
Final result
You can either visit StackBlitz project page or copy these code snippets into your website to make the result from this tutorial appear on your website.
TypeScript code
In the following TypeScript code you will find the final code that was exported to JavaScript via "Export to Runner" popover.
You can also download this static index.html file and open it in your browser to see the result. It contains all of the styling, html and script inside it.