Documentation
3D Viewer
Description
The 3D Viewer module 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 the model's description. |
MTL File | Additional file with definitions of materials (colors and textures). |
Initial Rotation X | Initial rotation in the X-axis (default is set to 0). |
Initial Rotation Y | Initial rotation in the Y-axis (default is set to 0). |
Initial Rotation Z | Initial rotation in the Z-axis (default is set to 0). |
Model Color | Fallback color for all the meshes (default is set to #EEEEEE). |
Background Color 1 | Color at the top of the background (default is set to #CCCCCC). |
Background Color 2 | Color at the bottom of the background (default is set to #EEEEEE). |
Render Mode | Render mode allowing to choose the smooth (default), points, wireframe, or flat rendering. |
Supported commands
Command name | Params | Description |
---|---|---|
hide | --- | Hides the module if it is visible. |
show | --- | Shows the module if it is hidden. |
rotateX | angle | Rotates the model around the X-axis. The angle must be a positive integer. |
rotateY | angle | Rotates the model around the Y-axis by a given angle in degrees. The angle must be a positive integer. |
rotateZ | angle | Rotates the model around the Z-axis by a given angle in degrees. The angle must be a positive integer. |
rotateZ | angle | Rotates the model around the Z-axis by a given angle in degrees. The angle must be a positive integer. |
startRotationX | angle, delay | Continuously rotates the 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 the 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 the 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 the 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 content of the module. |
Advanced Connector integration
Each command supported by the 3D Viewer module can be used in the Advanced Connector module's scripts. The below example demonstrates how to show and hide the module 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 module.