Stunning work by some of the folks at MS who have put together their vision for what this library should be. The result is nearly identical, so I'm recommending their library over this one. https://github.com/microsoft/holojs
A C++ Windows Runtime Component for hosting Windows Holographic apps built with Javascript and WebGL.
To provide a familiar environment for web developers who are interested in holographic development for Microsoft HoloLens and Windows Holographic.
- This library is completely devoid of memory management. I'm not a C++ developer so I've left memory management as an excercise for later
libEGL.dll
andlibGLES.dll
were compiled using Microsoft's fork of ANGLE with support for Windows Holographic- At the moment, shaders for specific libraries have to be updated to support holographics
This project is very experimental, and as such I've taken some somewhat novel approaches to some difficult problems. Nothing provided here is recommended for production environments at this point.
HolographicJS is built atop large open source efforts, including:
- ChakraCore by Microsoft -- though a few JSRT specific calls are used
- ANGLE by Google (and adapted by Microsoft for our purposes)
- OpenGL by Khronos Group.
- Influenced by Ejecta
The goal of this project is to achieve rendering holograms using Javascript with minimal or no adjustments to existing 3D libraries. Where required, HoloLens specific solutions should be employed.
- Clone the repo
- Open the HolographicJS solution
- Run the
HolographicJSTest
app on your HoloLens or HoloLens emulatorapp.js
is a demonstration of a plain holographic WebGL app in JSapp.three.js
is a work in progress demonstration of ThreeJS support
This is an example of how HolographicJS can be used within a Universal Windows app.
// Called when the CoreWindow object is created (or re-created).
void App::SetWindow(CoreWindow^ window)
{
window->VisibilityChanged +=
ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &App::OnVisibilityChanged);
window->Closed +=
ref new TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &App::OnWindowClosed);
try {
holographicJS = ref new Host(window);
}
catch (Exception^ e) {
OutputDebugString(e->Message->Data());
}
}
// Initializes scene resources
void App::Load(Platform::String^ entryPoint)
{
holographicJS->RunScript(L"app.js");
}
// This method is called after the window becomes active.
void App::Run()
{
while (!mWindowClosed)
{
if (mWindowVisible)
{
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent);
holographicJS->ProcessNextTask();
}
else
{
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending);
}
}
}
In no particular order:
- Implement entire WebGL 1.x spec
- Port to C++/WinRT for improved performance
- Remove Edge Mode Chakra dependency
- Provide high level interfaces for spatial mapping, shared experiences
- Three.js support