Can I make a universal app using HTML that runs on

2020-06-17 06:11发布

问题:

I believe these statement are true:

1) All Universal Apps Work As Holograms

2) Universal Apps can be built using HTML/JS

Does this mean I can build a holographic universal app using web technologies? For example a holographic visualizations dashboard in D3.js?

回答1:

It's still too early to say definitively, but here is some info I could find.

UPDATE: There is now a library called HoloJS which allows devs to write apps in html.

First your assumptions 1 and 2 are correct. There are ways to build UWP (Universal Windows Platform) apps in javascript/html. This means you could write a UWP JS app which can run webgl in a 2D window placed somewhere in your environment. You could also run your app on Microsoft Edge.

So if all you want to do is display a 2D dashboard in a 3D room, yes it looks very possible. If you want the application to render 3D objects all around the user, there are some problems you will need to work around.

Quoted from https://forums.hololens.com/discussion/80/is-it-possible-to-use-webgl-with-hololens-repost#latest:

 "Holographic apps are powered by the same graphics stack as the rest of the Windows 10 ecosystem. That means that just like the Xbox and Win32 games, apps for HoloLens are built on top of DirectX."

So you're kind of stuck with either Unity or DirectX if you want 3D visualizations that surround the user. BUT there could be a way...

A user at the bottom of this page http://forums.hololens.com/discussion/80/is-it-possible-to-use-webgl-with-hololens-repost said:

"That is interesting idea. If I understand correctly, you are trying to hook    your Edge browser with your HoloLens and project 3D graphics with WebGL on your Edge browser based on the REST APIs available from HoloLens"

So, you could perhaps fullscreen your app or find some way to ensure it is in front of your user's face and then use a server to direct API calls from the hololens to your web-app in order to transform your geometry around the user.

It might be worth it to look into integrating D3 visualizations inside a threejs app if you want the holographic visualizations. https://www.youtube.com/watch?v=bWjn1N4SJsk

If you just want a 2D screen in the environment then develop as normal and use Edge inside the hololens.