Skip to content

Commit b7b319a

Browse files
author
Brandyn A. White
committed
Added example
Signed-off-by: Brandyn A. White <[email protected]>
1 parent 5718ae0 commit b7b319a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ar.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ hPreviewToPhoto: Each preview image has a different area (not all sizes are supp
1515
displayWarpView([Array hPhotoToGlass]) : void
1616
Warps each preview image to the display such that it overlaps with what the user sees (works for objects > 7ft away, currently supported resolutions are 640x360 and 1280x720). If the hPhotoToGlass homography is not provided a default is used; however, it won't match perfectly, each Glass is slightly different and they only need to be calibrated once.
1717

18+
.. code-block:: guess
19+
20+
<html style="width:100%; height:100%; overflow:hidden">
21+
<body style="width:100%; height:100%; overflow:hidden; margin:0">
22+
<script>
23+
function main() {
24+
if (WS.scriptVersion(1)) return;
25+
WS.displayWarpView()
26+
WS.cameraOn(.1, 360, 640);
27+
}
28+
window.onload = main;
29+
</script></body></html>
30+
31+
1832
warpPreviewSampleGlass([Function callback]) : void
1933
Publishes the next preview image it gets, AR server uses it to match subsequent images to, a local copy is stored and can be drawn on using WS.warpDraw.
2034

0 commit comments

Comments
 (0)