UofTMADLab / reach

A VR format for Twine
0 stars 0 forks source link

add text formatting syntax #42

Open titaniumbones opened 4 years ago

titaniumbones commented 4 years ago

the standard twine story formats have syntax for bold, italic, and underlined text. It would be nice to have these in reach as well.

samesimilar commented 4 years ago

I will take another look at this but I think that a-frame's text rendering system doesn't support rich-formatted text. It has to render the text first to a texture then upload it to the GPU, so we don't get the benefit of the browser's text rendering system. It's very limited unfortunately.

I might be able to add options to select different fonts, but that would affect the entire block of text as a whole. The alternative for now would be pre-render the text to an image, and show the image instead.

samesimilar commented 4 years ago

I'll see if I can integrate https://github.com/mayognaise/aframe-html-shader Perhaps in a new "formatted text" panel that will render formatted text: <[[TextPassageName]]>