code/vexptoolbox/vrutil.py
def addWorldLockedCanvas(msg='Text', title='Title', pos=[0, 2, 2], billboard=False,
                         resolution=(1920, 1080), size=(1.92, 1.08), font_size=50):
    """ Add a world-locked text panel, e.g. for experiment instructions.
    Convenience function for Vizard's vizinfo functionality with useful VR defaults.
    
    Args:
        msg (str): Initial message text
        title (str): Title bar text for InfoPanel
        pos (3-tuple): World position for canvas center
        billboard (bool): If True, keep canvas facing the viewer
        resolution (tuple): Pixel resolution of virtual canvas as (x, y)
        size (tuple): Size of canvas object in meters as (x, y)
        font_size (int): Text font size
    
    Returns: Vizard node3d object containing the GUI canvas
    """
    canvas = viz.addGUICanvas(align=viz.ALIGN_CENTER)
    canvas.setPosition(pos)
    canvas.setRenderWorld(resolution=resolution, size=size)
    canvas.setMouseStyle(0)
    if billboard:
        canvas.billboard(viz.BILLBOARD_YAXIS_GLOBAL)
    
    panel = vizinfo.InfoPanel(text=msg, 
                              title=title, 
                              parent=canvas, 
                              key=None, 
                              fontSize=font_size,
                              align=viz.ALIGN_CENTER,
                              wrapWidth=resolution[0],
                              icon=False)    
    canvas.panel = panel 

    return canvas
 Add a world-locked text panel, e.g. for experiment instructions.
    Convenience function for Vizard's vizinfo functionality with useful VR defaults.
    
    Args:
        msg (str): Initial message text
        title (str): Title bar text for InfoPanel
        pos (3-tuple): World position for canvas center
        billboard (bool): If True, keep canvas facing the viewer
        resolution (tuple): Pixel resolution of virtual canvas as (x, y)
        size (tuple): Size of canvas object in meters as (x, y)
        font_size (int): Text font size
    
    Returns: Vizard node3d object containing the GUI canvas
    
Add a world-locked text panel, e.g. for experiment instructions.
Convenience function for Vizard's vizinfo functionality with useful VR defaults.
Add a world - locked text panel e . g . for experiment instructions . Convenience function for Vizard ' s vizinfo functionality with useful VR defaults .
def addWorldLockedCanvas(msg='Text', title='Title', pos=[0, 2, 2], billboard=False,
                         resolution=(1920, 1080), size=(1.92, 1.08), font_size=50):
    canvas = viz.addGUICanvas(align=viz.ALIGN_CENTER)
    canvas.setPosition(pos)
    canvas.setRenderWorld(resolution=resolution, size=size)
    canvas.setMouseStyle(0)
    if billboard:
        canvas.billboard(viz.BILLBOARD_YAXIS_GLOBAL)
    panel = vizinfo.InfoPanel(text=msg, 
                              title=title, 
                              parent=canvas, 
                              key=None, 
                              fontSize=font_size,
                              align=viz.ALIGN_CENTER,
                              wrapWidth=resolution[0],
                              icon=False)    
    canvas.panel = panel 
    return canvas
def addWorldLockedCanvas ( msg = 'Text' , title = 'Title' , pos = [ 0 , 2 , 2 ] , billboard = False , resolution = ( 1920 , 1080 ) , size = ( 1.92 , 1.08 ) , font_size = 50 ) : canvas = viz . addGUICanvas ( align = viz . ALIGN_CENTER ) canvas . setPosition ( pos ) canvas . setRenderWorld ( resolution = resolution , size = size ) canvas . setMouseStyle ( 0 ) if billboard : canvas . billboard ( viz . BILLBOARD_YAXIS_GLOBAL ) panel = vizinfo . InfoPanel ( text = msg , title = title , parent = canvas , key = None , fontSize = font_size , align = viz . ALIGN_CENTER , wrapWidth = resolution [ 0 ] , icon = False ) canvas . panel = panel return canvas
Add a world-locked text panel, e.g.
Add a world - locked text panel e . g .
""" Add a world-locked text panel, e.g. for experiment instructions.
    Convenience function for Vizard's vizinfo functionality with useful VR defaults.
    
    Args:
        msg (str): Initial message text
        title (str): Title bar text for InfoPanel
        pos (3-tuple): World position for canvas center
        billboard (bool): If True, keep canvas facing the viewer
        resolution (tuple): Pixel resolution of virtual canvas as (x, y)
        size (tuple): Size of canvas object in meters as (x, y)
        font_size (int): Text font size
    
    Returns: Vizard node3d object containing the GUI canvas
    """
msg
Initial message text
Initial message text
title
Title bar text for InfoPanel
Title bar text for InfoPanel
pos
World position for canvas center
World position for canvas center
billboard
If True, keep canvas facing the viewer
If True keep canvas facing the viewer
resolution
Pixel resolution of virtual canvas as (x, y)
Pixel resolution of virtual canvas as ( x y )
size
Size of canvas object in meters as (x, y)
Size of canvas object in meters as ( x y )
font_size
Text font size
Text font size