Open-Source rocks!

Opportunities to learn and give back


Tools and libraries like three.js, BabylonJS and PlayCanvas have made my journey exploring WebXR for prototyping interactions possible. In addition to being quite powerful, rivalling even native VR development options, these libraries are open-source! My recent explorations using them have renewed my appreciation for open-source software, as it is not just about the code out in the open, but also the strong community of contributors and collaborators that form around them. I try to consciously open-source most demos, examples and personal projects I work on as my way of giving back to this community. VR/AR APIs change rapidly, so most things I was able to learn while working in this domain was by reading others’ code. I hope through open-sourcing my code, I inspire people to try out WebXR and quicken its adoption even by a bit. This also encourages me to write better code and document my process clearly.

Then there is the occasional chance when one happens upon a bug/feature while working with open-source. Logging such instances on the project’s issue tracker/discussion board either as a new post or adding to existing discsusions in one of the first steps (after ascertaining this is indeed a bug/feature of course ;D). But if all the stars align and you have the knowledge and opportunity to contribute, then why not go ahead?

Such were my thoughts as I found a bug while working on a three.js demo about attaching objects to tracked hands inside AR/VR. A quick fix and one merged MR later, my demo worked perfectly! I learned quite a bit through the process, as each open-source community/project has its own intricacies when it comes to contributions. With this experience under my belt, I feel more ready to be part of the three.js community and WebXR codebases in general.

I have also contributed a dev feature for testing web extensions to the Wolvic repository. Wolvic is an open-source browser for XR devices based on the Firefox Reality codebase, and this feature released in v1.3 made Wolvic the first XR browser to have experimental support for installing web extensions locally through a downloaded file. Previously, a user could only install specific extensions from the Firefox Add-on store that had been marked as working with XR. For any other extension though, the browser would simply download the .xpi file but there was no way of installing it. I got my feet wet with the repo by first fixing a smaller build related issue marked as a “good first issue” before attempting to add the extension installation feature. Understanding the layout of a large browser project and singling out a specific part to work on was immensely satisfying for me. I was able to get a nice workflow going for local extension installation within a few days, including integration with exisiting UI dialogs, thanks to the prompt and detailed feedback from Sergio @ Wolvic!

I also ran across a bug while experimenting with WebXR and the WASM integration for Faust (Functional Audio Stream), a functional programming language for sound synthesis and audio processing. While mapping the pitchbend WebMIDI control to a Faust synth instrument, I realized the MIDI signals were not getting sent correctly to the WASM core because of a bug in the wrapper code. A quick fix later, I was able to map various attributes of a Flute synth DSP like pitch and breath control to the position of a VR controller and the trigger axis respectively! The fact I could get such a demo working shows that a modern day browser environment provides endless opportunities for innovation and experimentation!

It isn’t always about fixing bugs, as sometimes even slightly better help and documentation can make someone’s day! I am a big fan of the Exercism website and community, especially their #12in23 challenge to learn and solve challenges in 12 languages within 2023. Each month has a dedicated theme which inspires me to explore different languages and programming paradigms. They also have discussions with creators and maintainers of languages for each month! I was happy to contribute back to this community by adding some documentation to one of their exercises in the Clojure track.

Going back quite a bit, my first experience with open-source contribution was with the wonderful library for conducting (VR) experiments in Unity, UXF. In this case, it wasn’t a bug but some features I wanted to see (discussed here and here) in the library. The maintainer gave me quick feedback which made my experience really smooth.

I hope I have many more opportunities to contribute to any open-source efforts!

Ayaskant Panigrahi

Hopelessly in love with clean code and unobtrusive design!

XR Developer & Researcher