krpano vr mode 不显示文本

问题描述:进入vr模式后,需要在漫游导航热点旁边添加文字说明。在pc模式,添加layer或showtext文字说明就可以。vr模式,文字说明不显示。

解决方法:将文字说明做成图片,添加到热点上,进行展示。

原因分享:见krpano官方论坛。

http://krpano.com/forum/wbb/index.php?page=Thread&threadID=13166

in (real) WebVR mode only WebGL content will be show-able - that means no HTML content,

and the elements that are currently render-able via WebGL are:
- the pano
- and distorted IMAGE hotspots

Text is difficult here because it would be necessary to get the text into the WebGL texture and there is no browser-side API for rendering html text into a canvas or WebGL texture.

The only technical possibility would be parsing the text html code manually and drawing the text via the canvas drawText() API. I'm working on that, but this is unfortunately also disadvantages - it can only support a small subset of the html/css styling possibilities, and it is slow...

The best possibility for the moment would be to use a simple pre-created image for the text (as hotspot).

Best regards,
Klaus

你可能感兴趣的:(krpano)