How to integrate a WebGL canvas in a page

I am trying to figure out how to incorporate an interactive 3D visualization into a Hugo documentation site. Has anyone been successful in that task?

Hi! We meet again!

There is nothing specific that relates webgl and Hugo. As long as you have your static assets (e.g. JS to load and render your model) and the template you use generates the appropriate markup, things will just work.

I link you to one of the (unpublished) branches of my website that does this on the projects page: https://github.com/hnarayanan/harishnarayanan.org/tree/thinkbot-demo

Poke around layouts/section/projects.html and the static/scripts/thinkbot-demo.js and you’ll get the idea. If this what you want then you can move this idea into your templates.

Awesome, thanks for the reply.

I spent the day experimenting with Hugo and WebGL but not having much luck yet. I will take a look at your thinkbot-demo, and see if I can get to an understanding how this is intended to be constructed. Your reply is much appreciated, and I’ll keep you abreast of my progress.

Thank you.