microsoft / HoloJS

Provides a framework for creating holographic apps using JavaScript and WebGL.
MIT License
1.19k stars 114 forks source link

Failure in file SpatialMapping.cpp, line 25 #132

Closed nosy-b closed 6 years ago

nosy-b commented 6 years ago

Hi! The surface-reconstruction function works great when I deploy the ThreeJSApp-Vs2017 (and uncomment it at the end of the app.js)

But when I try to use it in my javascript application through HoloJsWebViewer-Vs2017 I got an error: Failure in file SpatialMapping.cpp, line 25

Do you have any clue?

Thanks!

Almost-Done commented 6 years ago

The viewer app does not have the "Spatial Perception" capability enabled, which is needed to allow access to surface reconstruction. To enable it, edit the package.appxmanifest file of the viewer app:

image

nosy-b commented 6 years ago

Yes I thought about that and checked for the ThreeJSApp-Vs2017 package.appxmanifest to make it similar for the WebViewer and I did (only internet and microphone are checked). There is no spatial perception activated for the ThreeJSApp but it works. (I don't have spatial perception capabilities checkbox to enable strangely)

EDIT: Ok I made it work! Weirdly in Vs2017, package.appxmanifests for ThreeJSApp or WebViewer don't have Spatial Perception checkbox. Don't know why it appears on yours but not mine https://developercommunity.visualstudio.com/content/problem/72534/packageappxmanifest-editor-in-visual-studio-does-n.html but I could see the tag when I edited the file with a text editor. So I manually added after adding the namespace on top cause only uap3 was declared.

Almost-Done commented 6 years ago

I remember having to add the capability manually a couple of months ago but yesterday when I checked it was on the UI so there's some variability between versions of Visual Studio.