Documentation

3D Viewer

Description

3D Viewer addon allows users to embed 3D models saved in Wavefront OBJ file format (more about this format can be found on Wikipedia).

Properties

The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
OBJ File OBJ file containing model description
MTL File Additional file with materials (colors and textures) definitions
Initial Rotation X Initial rotation in X-axis (default to 0)
Initial Rotation Y Initial rotation in Y-axis (default to 0)
Initial Rotation Z Initial rotation in Z-axis (default to 0)
Model Color Fallback color for all meshes (default to #EEEEEE)
Background Color 1 Color at the top of the background (default to #CCCCCC)
Background Color 1 Color at the bottom of the background (default to #EEEEEE)
Render Mode Render mode (default to smooth)

Supported commands

Command name Params Description
hide --- Hide the addon.
show --- Show the addon.
rotateX angle Rotates a model around the X-axis. The angle must be a positive integer.
rotateY angle Rotates a model around the Y-axis by a given angle in degrees. The angle must be a positive integer.
rotateZ angle Rotates a model around the Z-axis by a given angle in degrees. The angle must be a positive integer.
rotateZ angle Rotates a model around the Z-axis by a given angle in degrees. The angle must be a positive integer.
startRotationX angle, delay Continuously rotates a model around the X-axis by a given angle in degrees with given delays between each rotation. The angle and the delay must be positive integers.
stopRotationX --- Stops the continuous rotation around the X-axis.
startRotationY angle, delay Continuously rotates a model around the Y-axis by a given angle in degrees with given delays between each rotation. The angle and the delay must be positive integers.
stopRotationY --- Stops the continuous rotation around the Y-axis.
startRotationZ angle, delay Continuously rotates a model around the Z-axis by a given angle in degrees with given delays between each rotation. The angle and the delay must be positive integers.
stopRotationZ --- Stops the continuous rotation around the Z-axis.
stopAllRotations --- Stops all continuous rotations around each axis.
setQuality quality Changes a rendering quality. The quality parameter can be one of the three: 'low', 'standard' (default) and 'high'.

CSS classes

Class name Description
viewer-3d-wrapper Main class containing the entire Addon's content.

Advanced Connector integration

Each command supported by the 3D Viewer addon can be used in the Advanced Connector addon's scripts. The below example shows how to show and hide addon when the Text module's gap content changes (i.e. by putting in it elements from the Source List).

    EVENTSTART
    Source:Text2
    Value:1
    SCRIPTSTART
        var viewer = presenter.playerController.getModule('Viewer_3D1');
        viewer.show();
    SCRIPTEND
    EVENTEND
    EVENTSTART
    Source:Text2
    Value:2
    SCRIPTSTART
        var viewer = presenter.playerController.getModule('Viewer_3D1');
        viewer.hide();
    SCRIPTEND
    EVENTEND

Demo presentation

Demo presentation contains examples on how to use the 3D Viewer addon.