天天看點

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