Augmented reality test

I’m trying to get running a very basic augmented reality example using this lib:


and not success yet.

The video feed inside the webview is not even streaming.

Does anyone already tried something like this?

<App Background="#333">
    <DockPanel>
        <StatusBarBackground Dock="Top"/>

        <NativeViewHost>
            <WebView Dock="Fill" ux:Name="webview"/>
        </NativeViewHost>
        <Button Background="#fff" Text="Click" Dock="Bottom" Height="10%">
            <Clicked>
                <LoadHtml TargetNode="webview">
                    <HTML>
                        <![CDATA[
                            <!doctype HTML>
                            <html>
                                <script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
                                <script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"></script>
                                <body style='margin : 0px; overflow: hidden;'>
                                    <h1>AR!</h1>
                                    <a-scene embedded arjs>
                                    <a-marker preset="hiro">
                                        <a-box position='0 0.5 0' material='color: black;'></a-box>
                                    </a-marker>
                                    <a-entity camera></a-entity>
                                    </a-scene>
                                </body>
                            </html>
                        ]]>
                    </HTML>
                </LoadHtml>
            </Clicked>
        </Button>

        <BottomBarBackground Dock="Bottom" />
    </DockPanel>
</App>

Has anybody successfully tried this lib?

Hi Hector.

I don’t think anyone has tried running that on Fuse yet. The WebView implementation in Fuse is also very minimalistic, so it may be that what you’re trying to do there simply isn’t technically viable.

In general, Fuse apps should not be “just a wrapper for a webview”. A better approach to complex solutions like augmented reality would be wrapping Cocoapods/Gradle libraries in Uno, if you can find some. That’s definitely more complicated than just JS, but it is so for a good reason.

Thanks for your honest reply Uldis. For this kind of App I think we are going native.

Greetings