Set the Default Viewer

If you have an HTML5-enabled web browser, you can view virtual worlds with either the default Simulink® 3D Animation™ Viewer or your web browser. You determine the viewer for displaying your scene using the vrsetpref and vrgetpref commands.

This procedure assumes that you are working with a PC platform.

  1. When you install Simulink 3D Animation, the Simulink 3D Animation viewer is the default viewer. If you are not sure whether the default has been changed, you can determine your default viewer by typing:


    The MATLAB® Command Window displays

    ans = 
                                DataTypeBool: 'logical'
                               DataTypeInt32: 'double'
                               DataTypeFloat: 'double'
                       DefaultCanvasNavPanel: 'opaque'
                          DefaultCanvasUnits: 'normalized'
                       DefaultEditorPosition: [822 123 661 703]
                          DefaultEditorTriad: 'bottomleft'
                   DefaultFigureAntialiasing: 'on'
              DefaultFigureCaptureFileFormat: 'tif'
                DefaultFigureCaptureFileName: '%f_anim_%n.tif'
                      DefaultFigureDeleteFcn: ''
                       DefaultFigureLighting: 'on'
                 DefaultFigureMaxTextureSize: 'auto'
                       DefaultFigureNavPanel: 'halfbar'
                       DefaultFigureNavZones: 'off'
                       DefaultFigurePosition: [5 92 576 380]
         DefaultFigureRecord2DCompressMethod: 'auto'
        DefaultFigureRecord2DCompressQuality: 75
               DefaultFigureRecord2DFileName: '%f_anim_%n.avi'
                    DefaultFigureRecord2DFPS: 15
                      DefaultFigureStatusBar: 'on'
                       DefaultFigureTextures: 'on'
                        DefaultFigureToolBar: 'on'
                       DefaultFigureTooltips: 'on'
                   DefaultFigureTransparency: 'on'
                          DefaultFigureTriad: 'none'
                      DefaultFigureWireframe: 'off'
                               DefaultViewer: 'internal'
                DefaultWorldRecord3DFileName: '%f_anim_%n.wrl'
                      DefaultWorldRecordMode: 'manual'
                  DefaultWorldRecordInterval: [0 0]
                      DefaultWorldRemoteView: 'off'
                      DefaultWorldTimeSource: 'external'
                                      Editor: '*BUILTIN'
                        EditorPreserveLayout: 'off'
                          EditorSavePosition: 'on'
                                    HttpPort: 8123
                             TransportBuffer: 5
                            TransportTimeout: 20
                                      VrPort: 8124

The DefaultViewer property is set to 'internal'. The Simulink 3D Animation Viewer is the default viewer for viewing virtual worlds. Any virtual worlds that you open are displayed in the viewer.

  1. For example, at the MATLAB command prompt, type


    The Planets example is loaded and the virtual world is displayed in the Simulink 3D Animation Viewer.

  2. To view the virtual world through the web browser, from the MATLAB command prompt, use the view and vrview commands.

  3. Reset the Simulink 3D Animation Viewer as your default viewer by typing:


Alternatively, you can use the MATLAB File menu Preferences dialog box. See Set Simulink 3D Animation Preferences.)

See Also


Related Examples

Was this topic helpful?