Note: HoloJs implements a minimal DOM, just enough to fully implement WebGL. Most DOM operations, like creating elements, CSS, etc. will fail. DOM support is restricted to the following elements: window, canvas, image.HoloJs extends the web standards with interfaces that abstract the underlying hardware and make it easier to create experiences for various form factors and headsets:
- CanvasVR represents the rendering surface of the currently attached device. An attached device can be a HoloLens, Windows Mixed Reality headset, or in the absence of these a 2D desktop window. The script application does not need to manage this canvas element. Obtaining a CanvasVR element is done through the standard document.createElement(...).
- Spatial Mapping. HoloLens only. To be documented.
- Voice commands. To be documented.
- Spatial anchors. Currently HoloLens only. To be documented.
How to use HoloJsDepending on goals, HoloJs can be used in a variety of ways:
- Build from scratch and embedd in your C++ project. This approach is
if the existing HoloJs implementation does not meet
requirements and modifying the underlying C++ code can achieve your goals. An example would be
support for additional headsets (Oculus, HTC Vive, etc.), platforms (Android, Linux, etc.) or
more platform features to the script app.
Clone the code from https://github.com/Microsoft/HoloJS and follow the build instructions
Under the hoodInternally, HoloJs uses a variety of open source components to create the hosting environment:
- ANGLE provides the WebGL implementation for the Win32 platform.
- Microsoft ANGLE provides the WebGL implementation for the UWP and HoloLens platform.
- LabSound provides the WebAudio implementation, including spatial audio rendering.
- ChakraCore debugger provides the debugger protocol implementation that enables editing and debugging HoloJs apps using Visual Studio Code.
- Win2D provides the implementation for canvas's 2D context on the Windows platform.
- ZipLib provides cross platform archive decompression.