ShapeDiver 3D Viewer Application, copyright (c) 2018 ShapeDiver GmbH
ApiInterfaceV1.js
Content
- Abstract definition of the ShapeDiver 3D Viewer API V1
 - This version of the API is backwards compatible with the API of the viewer V1
 
Type Definitions
- 
    
CameraLocation
 - 
    
    
A camera location and target
Type:
- Object
 
Properties:
Name Type Description positionmodule:ApiInterfaceV1~Point3d camera position
targetmodule:ApiInterfaceV1~Point3d camera target
 - 
    
Color
 - 
    
    
Color including alpha value defined by an array of 4 numbers between 0 and 255 [red, green, blue, alpha]. Further supported are all formats accepted by tinycolor.
Type:
- Array.<Number> | String | Number
 
 - 
    
ExportDefinition
 - 
    
    
Definition of an export
Type:
- Object
 
Properties:
Name Type Description idString unique id of export
pluginString plugin runtime id of export
nameString name of export
typeString type of export, currently we support 'email', 'download', and 'shapeways'
 - 
    
ExportRequestObject
 - 
    
    
Data required for requesting an export
Type:
- Object
 
Properties:
Name Type Argument Description idString <optional> 
id of export, takes precedence over idOrName and name
idOrNameString <optional> 
id or name of export, takes precedence over name
nameString <optional> 
name of export, last priority after id and idOrName
pluginString <optional> 
runtime id of plugin the export belongs to
 - 
    
ModelDataItem
 - 
    
    
Model data item
Type:
- Object
 
Properties:
Name Type Description nameString name of the data item
idString id of the data item
pluginString plugin runtime id this item belongs to
data* the data
 - 
    
ParameterDefinition
 - 
    
    
Parameter definition
Type:
- Object
 
Properties:
Name Type Argument Description idString unique id of the parameter (unique within a plugin instance)
nameString <optional> 
name of the parameter
noteString <optional> 
description of the parameter
typemodule:ApiInterfaceV1~ParameterType <optional> 
type of the parameter
decimalplacesNumber <optional> 
number of decimal places for type Float
choicesArray.<String> <optional> 
choices for type StringList
defvalNumber | String | Boolean default value, represented as string
valueNumber | String | Boolean current value of the parameter
groupString <optional> 
group of the parameter for visualization purposes
maxString <optional> 
maximum value for numeric types, max length for type String
minString <optional> 
minimum value for numeric types
pluginString <optional> 
optional runtime id of plugin the parameter belongs to
visualizationmodule:ApiInterfaceV1~ParameterVisualization <optional> 
how to visualize the parameter
 - 
    
ParameterType
 - 
    
    
Parameter type, see module:ApiInterfaceV1~ApiInterfaceV1#TYPE for values
Type:
- String
 
 - 
    
ParameterUpdateObject
 - 
    
    
Parameter update object
Type:
- Object
 
Properties:
Name Type Argument Description idString <optional> 
id of parameter, takes precedence over idOrName and name
idOrNameString <optional> 
id or name of parameter, takes precedence over name
nameString <optional> 
name of parameter, last priority after id and idOrName
pluginString <optional> 
optional runtime id of plugin the parameter belongs to
value* Parameter value to set
 - 
    
ParameterValueObject
 - 
    
    
Object describing a parameter value
Type:
- Object
 
Properties:
Name Type Argument Description idString id of parameter
nameString <optional> 
optional name of parameter
pluginString runtime id of plugin the parameter belongs to
value* Parameter value
 - 
    
ParameterVisualization
 - 
    
    
Parameter visualization, see module:ApiInterfaceV1~ApiInterfaceV1#VISUALIZATION for values
Type:
- String
 
 - 
    
Point3d
 - 
    
    
A 3d point
Type:
- Object
 
Properties:
Name Type Description xNumber x coordinate
yNumber x coordinate
zNumber x coordinate
 - 
    
ProcessCallback(topic, message)
 - 
    
    
Process callback - used by module:ApiInterfaceV1~ApiInterfaceV1#setProcessCallback
Parameters:
Name Type Description topicString process message topic, typically 'process.TOKEN' where TOKEN is the process token which was used to register the callback
messageObject process message
 - 
    
ProcessCallbackToken
 - 
    
    
Process callback token - used by module:ApiInterfaceV1~ApiInterfaceV1#setProcessCallback and module:ApiInterfaceV1~ApiInterfaceV1#clearProcessCallback
Type:
- Object
 
 - 
    
ViewerStatusCode
 - 
    
    
Viewer status code format, see module:ApiInterfaceV1~ApiInterfaceV1#STATUSCODE for values
Type:
- Number
 
 - 
    
ViewerStatusObject
 - 
    
    
Object describing the viewer status
Type:
- Object
 
Properties:
Name Type Description statusCodemodule:ApiInterfaceV1~ViewerStatusCode numeric status code
statusTextString textual representation of status code
statusInfoString further information