Api Documentation - V2.6.0

Methods

# activateAnimationState(animationSet, animationState, callbackopt)

Activates animation state.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

animationState string

Name of animation state.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateAnimationState({
  animationSet: 'AnimationSet1',
  animationState: 'AnimationState1'
});

# activateAnimationTransition(animationSet, animationTransition, callbackopt)

Activates animation transition.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

animationTransition string

Name of animation transition.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateAnimationTransition({
  animationSet: 'AnimationSet1',
  animationTransition: 'AnimationTransition1'
});

# activateCamera(name, preventDefaultopt, callbackopt)

Sets specified camera as active on scene.

Parameters:
Name Type Attributes Description
name string

Name of camera.

preventDefault boolean <optional>

Prevents camera from jumping to default position when activated. Default is false.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateCamera({ name: 'Camera_1' });

# activateCameraControl(name, callbackopt)

Sets specified camera controls as active on scene.

Parameters:
Name Type Attributes Description
name string

Name of camera controls.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateCameraControl({ name:'CC_name1' });

# activateDecorationOnParts(parts, decorationopt, callbackopt)

Activates decoration on parts.

Parameters:
Name Type Attributes Description
parts Array.<string>

Parts on which to apply decoration.

decoration string <optional>

Decoration to use.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateDecorationOnParts({ parts : ['part_name'], decoration : 'decoration _name' });

# activateModifier(modifier, callbackopt)

Activates specified modifier.

Parameters:
Name Type Attributes Description
modifier string

Name of modifier to activate.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateModifier({ modifier: "NameOfModifier" });

# activateObjectControl(callbackopt)

Activates object controls.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateObjectControl();

# activateOverlayControls(callbackopt)

Activates overlay controls.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateOverlayControls();

# activateRenderer(name, callbackopt)

Sets specified renderer as active.

Parameters:
Name Type Attributes Description
name string

Name of renderer.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateRenderer({ name: 'Renderer_name1' });

# activateTransition(transition, targetopt, durationopt, configopt, callbackopt)

Activates specified transition.

Parameters:
Name Type Attributes Description
transition string

Name of transition to activate.

target string <optional>

Name of transition target. If not specified, transition will use previously defined target.

duration number <optional>

Duration of transition in milliseconds.

config Object <optional>

Object containg properties of transition to change depending on transition type. Example: position, scale

callback noResultCallback <optional>

Called after action is completed.

Examples
onPointerClick: function(objectsClick) {
  if(objectsClick.length>0 && objectsClick[0].type == 'annotation') {
    if( objectsClick[0].shortName == 'AnnotationName' ){
        Unlimited3D.activateTransition({transition: 'NameOfTransition'});
    }
  }
}
Unlimited3D.activateTransition({transition: 'NameOfTransition'});

# activateViewport(name, callbackopt)

Sets specified viewport as active.

Parameters:
Name Type Attributes Description
name string

Name of viewport.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.activateViewport({ name: "ViewportName" });

# addEntryToOverlay(overlay, overlayEntry, indexopt, callbackopt)

Add entry to overlay. If index is not specified entry will be added to end.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay to which entry should be added.

overlayEntry string

Name of overlay entry to add.

index number <optional>

Index of the overlay entry.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.addEntryToOverlay({ overlay: 'overlay_name', overlayEntry: 'overlayEntry_name', index : 5 });

# addSelectable(partNames, callbackopt)

Adds selectable parts.

Parameters:
Name Type Attributes Description
partNames Array.<string>

Names of parts.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.addSelectable({ partNames : ['PartName1','PartName2','PartName3'] });

# applyMaterialToAllParts(material, callbackopt)

Applies specified material to all parts.

Parameters:
Name Type Attributes Description
material string

Name of material.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.applyMaterialToAllParts({ material: 'MaterialName' });

# changeAnnotationMaterial(annotations, material, callbackopt)

Sets specified material to specified annotations.

Parameters:
Name Type Attributes Description
annotations Array.<string>

Names of annotations for which material should be set.

material string

Name of material.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeAnnotationMaterial({ annotations: ['Anno1', 'Anno2'], material : 'MaterialName' });

# changeBackgroundColor(viewport, coloropt, opacityopt, callbackopt)

Changes background color and background opacity of scene.

Parameters:
Name Type Attributes Description
viewport string

Name of viewport.

color string <optional>

Background color value, default is '#ffffff'.

opacity number <optional>

Background opacity, default is 1.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeBackgroundColor({ viewport: "Viewer", color: "#cccccc", opacity: 0.5 });

# changeGlobalEnvMap(textureName, callbackopt)

Change global environment map.

Parameters:
Name Type Attributes Description
textureName string

Name of previously created environment texture.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeGlobalEnvMap({ textureName: 'Texture1' });

# changeGlobalEnvMapIntensity(intensityopt, callbackopt)

Change global environment map intensity.

Parameters:
Name Type Attributes Description
intensity number <optional>

Intensity value, default is 1.0.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeGlobalEnvMapIntensity({ intensity: 0.5 });

# changeGroupMaterial(groupObjects, callbackopt)

Changes group material.

Parameters:
Name Type Attributes Description
groupObjects Array.<string>

Array of parts.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeGroupMaterial({
      groupObjects : ['name1','name2','name2']
});

# changeMaterial(parts, material, callbackopt)

Sets material to specified parts.

Parameters:
Name Type Attributes Description
parts Array.<string>

Names of parts.

material string

Name of material.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeMaterial({ parts: ['PartName'], material: 'MaterialName' });

# changeMaterialColor(material, color, callbackopt)

Sets color of specified material.

Parameters:
Name Type Attributes Description
material string

Name of material.

color string

Color can be hex string, 'rgb(r, g, b)' string where values are in range 0...255, 'cmyk(c, m, y, k)' string where values are in range 0...100 or 'pantone(name)' string where name is one of Pantone color names.

callback noResultCallback <optional>

Called after action is completed.

Example
// hex
Unlimited3D.changeMaterialColor({material : "material_name", color: '#ffffff' });
// rgb
Unlimited3D.changeMaterialColor({material : "material_name", color: 'rgb(255, 255, 255)' });
// cmyk
Unlimited3D.changeMaterialColor({material : "material_name", color: 'cmyk(4, 5, 6, 10)' });
// pantone
Unlimited3D.changeMaterialColor({material : "material_name", color: 'pantone(2150 C)' });

# changeMaterialMap(material, texture, mapType, callbackopt)

Sets material map of specified type to specified texture.

Parameters:
Name Type Attributes Description
material string

Name of material.

texture string

Name of texture to set.

mapType string

type of map. Only diffuseMap map type is currently fully supported.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeMaterialMap({ material: 'Material01', texture: 'Texture01', mapType: 'diffuseMap' }, (error) => { console.log(error); });

# changeMaterialOptions(material, options, metalnessopt, roughnessopt, callbackopt)

Sets options for specified material.

Parameters:
Name Type Attributes Description
material string

Name of material.

options Object

Material options.

color string <optional>

Hex value of material color.

opacity number <optional>

Opacity value of material.

transparent boolean <optional>

If material is transparent.

metalness number <optional>

Metalness value of material.

roughness number <optional>

Roughness value of material.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeMaterialOptions({ material: 'material_name1', options: { color: '#fff' } });

# changeMaterials(partObjects, callbackopt)

Sets materials to specified parts as defined by partObjects.

Parameters:
Name Type Attributes Description
partObjects Array.<Object>

Set specified material on provided parts.

parts Array.<string>

Names of parts.

material string

Name of material.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeMaterials({ partObjects: [ {parts: ['Part1','Part2'], material: 'Mat1'} ] });

# changeMaterialsOptions(materials, options, metalnessopt, roughnessopt, callbackopt)

Sets options for specified materials.

Parameters:
Name Type Attributes Description
materials Array.<string>

Names of materials.

options Object

Material options.

color string <optional>

Hex value of material color.

opacity number <optional>

Opacity value of material.

transparent boolean <optional>

If material is transparent.

metalness number <optional>

Metalness value of material.

roughness number <optional>

Roughness value of material.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeMaterialsOptions({ materials: ['material_name1', 'material_name2'], options: { color: '#fff' } });

# changeTextOptions(textName, optionsopt, callbackopt)

Sets 3D text options.

Parameters:
Name Type Attributes Description
textName string

Name of 3D text.

options Object <optional>

Object containing specified options.

text string <optional>

Text content.

horAlignment string <optional>

Horizontal alignment of 3D text.

verAlignment string <optional>

Vertical alignment of 3D text.

fontUrl string <optional>

url of TTF font file.

size number <optional>

Size of 3D text. Mesh scale should be used instead.

height number <optional>

Height of 3D text.

bevelEnabled number <optional>

If bevel (smoother edges) is enabled.

bevelThickness number <optional>

Thickness of bevel part of 3D text.

bevelSize number <optional>

Size of bevel part of 3D text.

bevelOffset number <optional>

Offset of bevel part of 3D text.

bevelSegments number <optional>

Number of segments for bevel part of 3D text.

curvePoints Array.<number> <optional>

Points (as 3 numbers each) of curve that 3D text should follow, if it's empty array, curve is not used.

curveSegments number <optional>

Number of segments in 3D text.

curveOffset number <optional>

Offset of 3D text on the curve, default is 0.

curvePreview boolean <optional>

If preview of curve with given points is shown.

curveRotate number <optional>

Rotation of text on the curve, default is 0.

callback noResultCallback <optional>

Called after action is completed.

# changeTextureTransform(texture, transform, callbackopt)

Sets specified texture transform values.

Parameters:
Name Type Attributes Description
texture string

Name of texture.

transform Object

transform values.

offsetU number <optional>

Offset value by U axis.

offsetV number <optional>

Offset value by V axis.

repeatU number <optional>

Repeat value by U axis.

repeatV number <optional>

Repeat value by V axis.

centerU number <optional>

Center value by U axis.

centerV number <optional>

Center value by V axis.

rotation number <optional>

Rotation value in degrees.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.changeTextureTransform({ texture: 'Texture01', transform: {
  centerU: 0.5,
  centerV: 0.5,
  offsetU: 0,
  offsetV: 0,
  repeatU: 1,
  repeatV: 1,
  rotation: 0,
}}, (error) => { console.log(error); });

# cloneMaterial(material, callbackopt)

Clones specified material as a shallow copy (textures between cloned and original material are shared).

Parameters:
Name Type Attributes Description
material string

Name of the material to clone.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.cloneMaterial({ material: 'Mat-name' });

# createFeedbackMarker(name, targetName, targetType, materialopt, positionopt, radiusopt, radiusMode, color, callbackopt)

Creates new feedback marker.

Parameters:
Name Type Attributes Description
name string

Name of feedback marker.

targetName string

Name of the object on top of which feedback should be created, it can be used to calculate marker size.

targetType string

Type of the object on top of which feedback should be created, it can be used to calculate marker size.

material string <optional>

Custom material that will be user instead of single color material.

position Array.<number> <optional>

Position where marker will be created.

radius number <optional>

Radius of marker, how value will be applied depends on radiusMode.

radiusMode string

Mode to determine the size of marker.

color string

Color of marker material.

callback createFeedbackMarkerCallback <optional>

Called after action is completed.

Example
Unlimited3D.createFeedbackMarker({
  name: 'Marker',
  targetName: 'Part Name,
  targetType: 'part',
  material: 'Material',
  position: [0, 0, 0],
  radius: 1.0,
  radiusMode: 'Absolute',
  color: '#ffffff',
}, (e, marker) => console.log(marker));

# createOverlayEntry(type, name, callbackopt)

Creates new overlay entry.

Parameters:
Name Type Attributes Description
type string

Can be 'Text' or 'Image'.

name string

Name of overlay entry.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.createOverlayEntry({ type: 'Text', name: 'overlayEntry_name' }, (e, r) => console.log(e, r));

# createTextureFromImage(url, name, optionsopt, callbackopt)

Creates texture with specified initial options from external image url.

Parameters:
Name Type Attributes Description
url string

url of image.

name string

Name of created texture. If already exists, -num suffix is added.

options Object <optional>

initial options for texture.

encoding string <optional>

Texture encoding, could be 'sRGBEncoding' or 'LinearEncoding'. Default is 'sRGBEncoding'.

format string <optional>

Texture format, could be 'RGBAFormat' or 'RGBFormat'. Default is 'RGBAFormat'.

flipY boolean <optional>

If texture should be flipped by Y axis. Default is true.

wrapS string <optional>

Texture wrapping by X axis. Could be 'ClampToEdgeWrapping', 'RepeatWrapping' or 'MirroredRepeatWrapping'. Default is 'RepeatWrapping'.

wrapT string <optional>

Texture wrapping by Y axis. Could be 'ClampToEdgeWrapping', 'RepeatWrapping' or 'MirroredRepeatWrapping'. Default is 'RepeatWrapping'.

minFilter string <optional>

Texture minifying filter.

magFilter string <optional>

Texture magnifying filter.

premultiplyAlpha boolean <optional>

If alpha should be premultiplied.

extension string <optional>

Texture file extension to determine texture type if url doesn't contain it.

isEquirectangular boolean <optional>

If texture should be used as panorama environment texture.

callback createTextureFromImageCallback <optional>

Called after action is completed. // Returns // { // name: 'Texture Name' // shortName: "Texture Short Name" // type: "texture" // } Unlimited3D.createTextureFromImage({ url: 'some url', name: 'Texture1' }, (error, result) => { console.log(error, result); });

# deactivateDecorationFromParts(parts, callbackopt)

Deactivates decoration on parts.

Parameters:
Name Type Attributes Description
parts Array.<string>

Parts from which to remove decoration.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.deactivateDecorationFromParts({ parts : ['part_name1', 'part_name2'] });

# deactivateObjectControl(callbackopt)

Deactivates object controls.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.deactivateObjectControl();

# deactivateOverlayControls(callbackopt)

Deactivates overlay controls.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.deactivateOverlayControls();

# deactivateTransition(transition, callbackopt)

Deactivates transition if it is currently active.

Parameters:
Name Type Attributes Description
transition string

Name of transition to deactivate.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.deactivateTransition({transition: 'NameOfTransition'});

# dispose(callbackopt)

Explicitly releases library freeing all it's resources.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

# enableAnalitycsCollection(enableopt, callbackopt)

Enables collecting of analitycs information.

Parameters:
Name Type Attributes Description
enable boolean <optional>

If collecting is enabled, default is true.

callback noResultCallback <optional>

Called after action is completed.

# enableAutoRotate(enableopt, callbackopt)

Enables or disables current camera’s auto rotation around target.

Parameters:
Name Type Attributes Description
enable boolean <optional>

If auto rotate is enabled. Default is true.

callback noResultCallback <optional>

Called after action is completed.

# enableCameraControls(enableopt, callbackopt)

Enables camera controls.

Parameters:
Name Type Attributes Description
enable boolean <optional>

Should camera controls be enabled, default is true.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.enableCameraControls({ enable : false });

# enableGlobalAOMap(enableopt, callbackopt)

Enable global ambient occlusion map.

Parameters:
Name Type Attributes Description
enable boolean <optional>

if ambient occlusion map should be enabled, default is true.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.enableGlobalAOMap({ enable: false });

# exportToGLB(optionsopt, callbackopt)

Exports current scene to GLB. Export should be previously allowed in solution.

Parameters:
Name Type Attributes Description
options Object <optional>

Export options.

meshNodes Array.<string> <optional>

List of mesh nodes to export, otherwise all active nodes are exported.

overlaysVisible boolean <optional>

if overlays are exported.

decalsVisible boolean <optional>

if decals are exported.

decalsOffsetFactor number <optional>

offset factor for decals to avoid z-fighting.

callback exportToGLBCallback <optional>

Called after action is completed.

# getActiveOverlayEntryForOverlayControls(callbackopt)

Gets active overlay entry for overlay controls.

Parameters:
Name Type Attributes Description
callback getActiveOverlayEntryForOverlayControlsCallback <optional>

Called after action is completed.

Example
// Returns
// {
//   name: "OverlayEntryName"
//   shortName: "OverlayEntryName"
//   type: "overlayEntry"
// }
Unlimited3D.getActiveOverlayEntryForOverlayControls();

# getAllFeedbackMarkers(callbackopt)

Gets names of all available feedback markers.

Parameters:
Name Type Attributes Description
callback getAllFeedbackMarkersCallback <optional>

Called after action is completed.

Example
// Returns
// {
//   names: [
//     'Feedback Marker',
//   ],
// }
Unlimited3D.getAllFeedbackMarkers((error ,response) => { console.log(error ,response); });

# getAnnotationPosition(name, callbackopt)

Gets position of specified annotation.

Parameters:
Name Type Attributes Description
name string

Name of annotation.

callback getAnnotationPositionCallback <optional>

Called after action is completed.

Example
// Returns
[0, 0, 0]
Unlimited3D.getAnnotationPosition((error, result) => { console.log(result); });

# getAnnotationsWithMaterial(material, callbackopt)

Gets names of annotations with the specified material.

Parameters:
Name Type Attributes Description
material string

Name of material.

callback getAnnotationsWithMaterialCallback <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//        type: 'annotation',
//        shortName: 'Annotation Short Name',
//        name: 'Annotation Name'
//     }
// ]
Unlimited3D.getAnnotationsWithMaterial({ material: 'MaterialName' }, (error, result) => { console.log(error, result); });

# getAvailableAnimationSets(callbackopt)

Gets all available animation sets.

Parameters:
Name Type Attributes Description
callback getAvailableAnimationSetsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     name: "AnimationSet"
//     shortName: "AnimationSet"
//     type: "animationSet"
//   }
// ]
Unlimited3D.getAvailableAnimationSets( (error, result) => console.log(result));

# getAvailableAnimationStates(animationSet, callbackopt)

Gets all available animation states.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback getAvailableAnimationStatesCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     type: 'animationState',
//     shortName: 'State Short Name',
//     name: 'State Name',
//     animationSetName: 'Set Name',
//     animationSetShortName: 'Set Short Name'
//   }
// ]
Unlimited3D.getAvailableAnimationStates({ animationSet: 'AnimationSet1' }, (error, result) => console.log(result));

# getAvailableAnimationTransitions(animationSet, callbackopt)

Gets all available animation transitions.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback getAvailableAnimationTransitionsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     type: 'animationTransition',
//     shortName: 'Transition Short Name',
//     name: 'Transition Name',
//     animationSetName: 'Set Name',
//     animationSetShortName: 'Set Short Name'
//   }
// ]
Unlimited3D.getAvailableAnimationTransitions(
  { animationSet: 'animation_set_name' },
  (error,result) => console.log(result) )
);

# getAvailableAnnotations(callbackopt)

Gets available annotations.

Parameters:
Name Type Attributes Description
callback getAvailableAnnotationsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     name: 'AnnotationName',
//     shortName: 'AnnotationName',
//     type: 'annotation'
//   }
// ]
Unlimited3D.getAvailableAnnotations((error, result) => { console.log(result); });

# getAvailableCameras(callbackopt)

Gets available cameras.

Parameters:
Name Type Attributes Description
callback getAvailableCamerasCallback <optional>

Called after action is completed.

# getAvailableCustomParts(callbackopt)

Gets available custom parts.

Parameters:
Name Type Attributes Description
callback getAvailableCustomPartsCallback <optional>

Called after action is completed.

# getAvailableMaterials(callbackopt)

Gets all available materials.

Parameters:
Name Type Attributes Description
callback getAvailableMaterialsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//        name: "Matname-Mat"
//        shortName: "Matname-Mat"
//        type: "material"
//     }
// ]
Unlimited3D.getAvailableMaterials((error, result) => { console.log(error, result); });

# getAvailableModifiers(callbackopt)

Gets info about available modifiers.

Parameters:
Name Type Attributes Description
callback getAvailableModifiersCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     name: "ModifierName"
//     shortName: "ModifierName"
//     type: "modifier"
//   }
// ]
Unlimited3D.getAvailableModifiers(function(error, result) { console.log(result); });

# getAvailableOverlayEntries(callbackopt)

Gets all available overlay entries.

Parameters:
Name Type Attributes Description
callback getAvailableOverlayEntriesCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//      name: "Overlay Entry Name",
//      shortName: "Overlay Entry Short Name",
//      type: "overlayEntry"
//   }
// ]
Unlimited3D.getAvailableOverlayEntries(() => {});

# getAvailableOverlays(callbackopt)

Gets available overlays.

Parameters:
Name Type Attributes Description
callback getAvailableOverlaysCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     entries: [
//       {
//         name: "Overlay Entry Name",
//         shortName: "Overlay Entry Short Name",
//         type: "overlayEntry",
//       }
//     ],
//     name: "Overlay Name",
//     shortName: "Overlay Short Name",
//     type: "overlay"
//   }
// ]
Unlimited3D.getAvailableOverlays((error, result) => console.log(result));

# getAvailableParts(callbackopt)

Gets available parts.

Parameters:
Name Type Attributes Description
callback getAvailablePartsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//        name: 'PartName',
//        shortName: 'PartNode',
//        type: 'part'
//     }
// ]
Unlimited3D.getAvailableParts((error, result) => { console.log(error, result); });

# getAvailableTextures(callbackopt)

Gets textures that are previously created using createTextureFromImage call.

Parameters:
Name Type Attributes Description
callback getAvailableTexturesCallback <optional>

Called after action is completed. // Returns // [ // { // name: 'Texture Name' // shortName: 'Texture Short Name' // type: 'texture' // } // ] Unlimited3D.getAvailableTextures((error, result) => { console.log(error, result); });

# getAvailableTransitions(callbackopt)

Gets info about available modifier transitions.

Parameters:
Name Type Attributes Description
callback getAvailableTransitionsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     name: "TransitionName"
//     shortName: "TransitionName"
//     targetType: "camera"
//     type: "transition"
//   }
// ]
Unlimited3D.getAvailableTransitions(function(error, result) { console.log(result); });

# getCameraOptions(callbackopt)

Gets camera options for currently active camera.

Parameters:
Name Type Attributes Description
callback getCameraOptionsCallback <optional>

Called after action is completed.

Example
// Returns
// {
//   far: 347.1001387305146,
//   fov: 35,
//   maxDistance: 6,
//   minDistance: 1.5,
//   near: 0.01
// }
Unlimited3D.getCameraOptions( (error, result) => console.log(result) );

# getCameraPosition(callbackopt)

Gets camera position.

Parameters:
Name Type Attributes Description
callback getCameraPositionCallback <optional>

Called after action is completed.

# getCameraTarget(callbackopt)

Gets target of current active camera.

Parameters:
Name Type Attributes Description
callback getCameraTargetCallback <optional>

Called after action is completed.

Example
// Returns
// [0, 0.6, 0]
Unlimited3D.getCameraTarget(function(error, result) { console.log(result); });

# getConfigJSON(callbackopt)

Exports current scene configuration to JSON object. It can be used at init to load current scene state. Configuration currently doesn't support immediate API calls such as animation or transition calls.

Parameters:
Name Type Attributes Description
callback getConfigJSONCallback <optional>

Called after action is completed.

# getCurrentAnimationState(animationSet, callbackopt)

Gets current animation state.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback getCurrentAnimationStateCallback <optional>

Called after action is completed.

Example
Unlimited3D.getCurrentAnimationState({ animationSet: 'animation_set_name' }, (error,result) => console.log(result));

# getCurrentAnimationTransition(animationSet, callbackopt)

Gets current animation transition.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback getCurrentAnimationStateCallback <optional>

Called after action is completed.

Example
Unlimited3D.getCurrentAnimationTransition({ animationSet: 'animation_set_name' }, (error,result) => console.log(result));

# getDistributionInfo(solution3DID, callbackopt)

Gets distribution information objects for solution.

Parameters:
Name Type Attributes Description
solution3DID string

Solution ID.

callback getDistributionInfoCallback <optional>

Called after action is completed.

Example
Unlimited3d.getDistributionInfo({ solution3DID: 1 }, (e, info) => console.log(info));

# getHiddenParts(callbackopt)

Gets hidden parts on the scene.

Parameters:
Name Type Attributes Description
callback getHiddenPartsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//        name: 'PartName',
//        shortName: 'PartNode',
//        type: 'part'
//     }
// ]
Unlimited3D.getHiddenParts((error, result) => { console.log(error, result); });

# getLatestDistributionInfo(solution3DID, callbackopt)

Gets latest distribution information for solution.

Parameters:
Name Type Attributes Description
solution3DID string

Solution ID.

callback getLatestDistributionInfoCallback <optional>

Called after action is completed.

Example
Unlimited3d.getLatestDistributionInfo({ solution3DID: 1 }, (e, info) => console.log(info));

# getMaterial(part, callbackopt)

Gets name of active material for the provided part.

Parameters:
Name Type Attributes Description
part string

Part name.

callback getMaterialCallback <optional>

Called after action is completed.

Example
// Returns 'Material name'
Unlimited3D.getMaterial({ part: 'partName' }, (error, result) => { console.log(error, result); });

# getMaterialMapTransform(material, mapType, callbackopt)

Gets texture transform values of current material map type.

Parameters:
Name Type Attributes Description
material string

Name of material.

mapType string

Type of map (only diffuseMap is currently fully supported).

callback getMaterialMapTransformCallback <optional>

Called after action is completed.

Example
// Returns
// {
//     centerU: 0.5
//     centerV: 0.5
//     offsetU: 0
//     offsetV: 0
//     repeatU: 1
//     repeatV: 1
//     rotation: 0
// }
Unlimited3D.getMaterialMapTransform({ material: 'Material01', mapType: 'diffuseMap' }, (error, result) => { console.log(error, result); });

# getModelPosition(name, callbackopt)

Gets model position.

Parameters:
Name Type Attributes Description
name string

Name of model.

callback getModelPositionCallback <optional>

Called after action is completed.

Example
// Returns
// [0, 0, 0]
Unlimited3D.getModelPosition({ name: 'ModelName' }, (e, r) => { console.log(r); });

# getOverlayConfig(overlay, overlayEntry, callbackopt)

Gets current overlay configuration for given overlay and it's overlay entry.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay.

overlayEntry string

Name of overlay entry.

callback getOverlayConfigCallback <optional>

Called after action is completed.

Example
Unlimited3D.getOverlayConfig({
  overlay: 'overlay1',
  overlayEntry: 'overlayEntry1'
}, (error, result) => { console.log(result); });

# getOverlayOverlayEntries(overlay, callbackopt)

Gets available overlay entries in specified overlay.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay.

callback getOverlayOverlayEntriesCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//      name: "Overlay Entry Name",
//      shortName: "Overlay Entry Short Name",
//      type: "overlayEntry"
//   }
// ]
Unlimited3D.getOverlayOverlayEntries({ overlay: 'Overlay01' }, (error, result) => { console.log(result); });

# getOverlaySnapshot(saveEnabledopt, outputFileNameopt, overlay, partsopt, resolutionopt, backgroundColoropt, backgroundOpacityopt, showUVsopt, showUVEdgesopt, uvColoropt, uvOpacityopt, uvEdgeColoropt, uvEdgeWidthopt, callbackopt)

Gets snapshot of overlay with uv map of given part.

Parameters:
Name Type Attributes Description
saveEnabled boolean <optional>

If result image should be saved as file.

outputFileName string <optional>

File name of saved image, saveEnabled must be true.

overlay string

Name of overlay for which to create snapshot.

parts Array.<string> <optional>

If present, uv map of parts will be drawn in the background (only one part is currently supported).

resolution number <optional>

Resolution of created image (for example, 1024)

backgroundColor string <optional>

Color of background of created image.

backgroundOpacity number <optional>

Opacity of background of created image.

showUVs boolean <optional>

If uv lines are shown.

showUVEdges boolean <optional>

If uv edges are shown.

uvColor string <optional>

Color of uv map of created image.

uvOpacity number <optional>

Opacity of uv map of created image if present.

uvEdgeColor string <optional>

Color of edges of uv map of created image.

uvEdgeWidth number <optional>

Width of uv edge lines.

callback noResultCallback <optional>

Called after action is completed.

# getOverlaysWithOverlayEntry(overlayEntry, callbackopt)

Gets overlays that contain given overlay entry.

Parameters:
Name Type Attributes Description
overlayEntry string

Name of overlay entry.

callback getOverlaysWithOverlayEntryCallback <optional>

Called after action is completed.

Example
// [
//   {
//     name: "Overlay Name",
//     shortName: "Overlay Short Name",
//     type: "overlay"
//   }
// ]
Unlimited3D.getOverlaysWithOverlayEntry({ overlayEntry: 'Overlay Entry name' }, () => {});

# getPartCenter(name, callbackopt)

Gets part center.

Parameters:
Name Type Attributes Description
name string

Name of part.

callback getPartCenterCallback <optional>

Called after action is completed.

Example
// Returns
// [0, 0, 0]
Unlimited3D.getPartCenter({ name: 'PartName' }, (error, result) => { console.log(result); } );

# getPartOverlays(part, callbackopt)

Gets overlays for specified part.

Parameters:
Name Type Attributes Description
part string

Part name.

callback getPartOverlaysCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     entries: [
//       {
//         name: "Overlay Entry Name",
//         shortName: "Overlay Entry Short Name",
//         type: "overlayEntry",
//       }
//     ],
//     name: "Overlay Name",
//     shortName: "Overlay Short Name",
//     type: "overlay"
//   }
// ]
Unlimited3D.getPartOverlays({ part: 'PartName' }, (error, result) => console.log(result));

# getPartPosition(name, callbackopt)

Gets part position.

Parameters:
Name Type Attributes Description
name string

Name of part.

callback getPartPositionCallback <optional>

Called after action is completed.

Example
// Returns
// [0, 0, 0]
Unlimited3D.getPartPosition({ name: 'PartName' }, (e, r) => { console.log(r); });

# getPartsWithMaterial(material, callbackopt)

Gets names of parts with the specified material.

Parameters:
Name Type Attributes Description
material string

Name of material.

callback getPartsWithMaterialCallback <optional>

Called after action is completed.

Example
// [
//     {
//        type: 'part',
//        shortName: 'Material short name',
//        name: 'Material name'
//     }
// ]
Unlimited3D.getPartsWithMaterial({ material: 'MaterialName' }, (error, result) => { console.log(error, result); });

# getSelectable(callbackopt)

Gets all selectable objects.

Parameters:
Name Type Attributes Description
callback getSelectableCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     name: 'SelectableName',
//     shortName: 'SelectableName',
//     type: 'part'
//   }
// ]
Unlimited3D.getSelectable((error, result) => { console.log(result); });

# getSelectableParts(callbackopt)

Gets all selectable parts.

Parameters:
Name Type Attributes Description
callback getSelectablePartsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//   {
//     name: 'SelectableName',
//     shortName: 'SelectableName',
//     type: 'part'
//   }
// ]
Unlimited3D.getSelectableParts((error, result) => { console.log(result); });

# getSelectedAnnotations(callbackopt)

Gets currently selected annotations.

Parameters:
Name Type Attributes Description
callback getSelectedAnnotations <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//         name: 'Annotation Name',
//         shortName: 'Annotation Short Name',
//         type: 'annotation'
//     }
// ]
Unlimited3D.getSelectedAnnotations((error, result) => { console.log(result); });

# getSelectedParts(callbackopt)

Gets currently selected parts.

Parameters:
Name Type Attributes Description
callback getSelectedPartsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//        name: 'SelectedName',
//        shortName: 'SelectedName',
//        type: 'part'
//     }
// ]
Unlimited3D.getSelectedParts((error, result) => { console.log(result); });

# getSnapshot(widthopt, heightopt, methodopt, resultopt, callbackopt)

Gets snapshot image of current render.

Parameters:
Name Type Attributes Description
width number <optional>

Width of rendered image.

height number <optional>

Height of rendered image.

method string <optional>

'hires' or 'legacy', default is 'hires'.

result string <optional>

'blob', 'url' or 'base64', default is 'url'.

callback getSnapshotCallback <optional>

Called after action is completed.

Example
Unlimited3D.getSnapshot({ width: 1280, height: 720, result: "base64" }, (error, result) => { console.log(result); });

# getTextInfo(textName, callbackopt)

Gets info about specified 3D text geometry.

Parameters:
Name Type Attributes Description
textName

Name of 3D text.

callback getTextInfo <optional>

Called after action is completed.

# getTextureTransform(texture, callbackopt)

Gets texture transform values.

Parameters:
Name Type Attributes Description
texture string

Name of texture.

callback getTextureTransformCallback <optional>

Called after action is completed.

Example
// {
//     centerU: 0.5
//     centerV: 0.5
//     offsetU: 0
//     offsetV: 0
//     repeatU: 1
//     repeatV: 1
//     rotation: 0
// }
Unlimited3D.getTextureTransform({ texture: 'Texture01' }, (error, result) => { console.log(error, result); });

# getVisibleParts(callbackopt)

Gets visible parts on the scene.

Parameters:
Name Type Attributes Description
callback getVisiblePartsCallback <optional>

Called after action is completed.

Example
// Returns
// [
//     {
//        name: 'PartName',
//        shortName: 'PartNode',
//        type: 'part'
//     }
// ]
Unlimited3D.getVisibleParts((error, result) => { console.log(error, result); });

# hideAnnotations(annotations, callbackopt)

Hides specified annotations on the scene.

Parameters:
Name Type Attributes Description
annotations Array.<string>

Names of annotations.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.hideAnnotations({ annotations: ['Anno1', 'Anno2'] });

# hideCustomParts(customParts, callbackopt)

Hides specified custom parts on the scene.

Parameters:
Name Type Attributes Description
customParts Array.<string>

Names of custom parts.

callback noResultCallback <optional>

Called after action is completed.

# hideLights(lights, callbackopt)

Hides specified lights on the scene.

Parameters:
Name Type Attributes Description
lights Array.<string>

Names of lights.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.hideLights({ lights:['Light1', 'Light2'] });

# hideModels(models, callbackopt)

Hides specified models.

Parameters:
Name Type Attributes Description
models Array.<string>

Names of models to hide.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.hideModels({ models: ['ModelName1', 'ModelName2'] });

# hideParts(parts, callbackopt)

Hides specified model parts from scene.

Parameters:
Name Type Attributes Description
parts Array.<string>

Names of parts.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.hideParts({ parts: ['PartName'] });

# init(options, configuration, callbackopt)

Initializes Unlimited3D library.

Parameters:
Name Type Attributes Description
options Object

Following options object fields are required. You can find them on platform, in publish menu, after solution was published.

distID string

ID of distribution.

solution3DName string

Name of solution.

projectName string

Name of project that campaign belongs to.

solution3DID string

ID of solution.

container3D string

ID of html element to which canvas will be attached The rest of the fields are not required, but can be passed to customize behaviour.

collectAnalytics boolean <optional>

Determines whether analytics will be collected. NOTE: Impression and load time analytics are always collected, regardless of this option.

onPointerClick eventCallback <optional>

Called whenever user clicks on the scene. First and only parameter is an array of objects in format.

onPointerMove eventCallback <optional>

Called whenever user moves mouse around the scene. First and only parameter is an array of objects in format.

onLoadingChanged eventCallback <optional>

Called when loading of models and textures has changed. First and only parameter is an object contain information about loading status.

onCameraInteraction eventCallback <optional>

Called when user moves camera using mouse or touch.

render boolean

Should 3D scene be rendered immediately or not.

configuration Object

Configuration object is used for loading custom (saved) options before scene is loaded.

callback initCallback <optional>

Called after action is completed.

# isActiveCamera(name, callbackopt)

Checks if specified camera is active.

Parameters:
Name Type Attributes Description
name string

Name of camera.

callback isActiveCameraCallback <optional>

Called after action is completed.

Example
// Returns
// true
Unlimited3D.isActiveCamera({ name: 'Camera_name1' }, (error, result) => { console.log(error, result); });

# isActiveCameraControl(name, callbackopt)

Checks if specified camera controls are active.

Parameters:
Name Type Attributes Description
name string

Name of camera controls.

callback isActiveCameraControlCallback <optional>

Called after action is completed.

Example
// Returns
// true
Unlimited3D.isActiveCameraControl({ name: 'Camera Mobile control' }, (error, result) => { console.log(error, result); });

# isActiveRenderer(name, callbackopt)

Checks if specified renderer is active.

Parameters:
Name Type Attributes Description
name string

Name of renderer.

callback isActiveRendererCallback <optional>

Called after action is completed.

Example
// Returns
// true
Unlimited3D.isActiveRenderer({ name: 'Renderer1' }, (error, result) => { console.log(error, result); });

# isActiveViewport(name, callbackopt)

Checks if specified viewport is active.

Parameters:
Name Type Attributes Description
name string

Name of viewport.

callback isActiveViewportCallback <optional>

Called after action is completed.

Example
// Returns
// true
Unlimited3D.isActiveViewport({ name: 'Viewport1' }, (error, result) => { console.log(error, result); });

# isAnimationSetPlaying(animationSet, callbackopt)

Is animation set playing.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback isAnimationSetPlayingCallback <optional>

Called after action is completed.

Example
Unlimited3D.isAnimationSetPlaying({ animationSet: 'animation_set_name' }, (error, result) => { console.log(result); });

# isFeedbackMarker(name, callbackopt)

Is object with specified name feedback marker.

Parameters:
Name Type Attributes Description
name string

Name of feedback marker.

callback isFeedbackMarkerCallback <optional>

Called after action is completed.

Example
Unlimited3D.isFeedbackMarker({ name: 'FeedbackMarkerName' }, (error,result) => { console.log(result); });

# isPartSelected(part, callbackopt)

Checks if part is selected.

Parameters:
Name Type Attributes Description
part string

Name of part.

callback isPartSelected <optional>

Called after action is completed.

Example
// Returns
// true
Unlimited3D.isPartSelected({ part: 'part_name' }, (error, result) => { console.log(result); });

# isPartVisible(part, callbackopt)

Checks if a part is visible.

Parameters:
Name Type Attributes Description
part string

Name of part.

callback isPartVisibleCallback <optional>

Called after action is completed. // Returns true Unlimited3D.isPartVisible({ part: 'part_name' }, (error, result) => { console.log(result); });

# isVisibleLight(name, callbackopt)

Checks if specified light is visible in the scene.

Parameters:
Name Type Attributes Description
name string

Name of light.

callback isVisibleLightCallback <optional>

Called after action is completed.

Example
// Returns
// true
Unlimited3D.isVisibleLight({ name: 'Light1' }, (error, result) => { console.log(error, result); });

# playAnimationSet(animationSet, callbackopt)

Play animation set.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.playAnimationSet({ animationSet: 'animation_set_name' });

# removeEntryFromOverlay(overlay, overlayEntry, callbackopt)

Remove entry from overlay.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay from which entry should be removed.

overlayEntry string

Name of overlay entry to remove.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.removeEntryFromOverlay({ overlay: 'overlay_name', overlayEntry: 'overlayEntry_name' });

# removeFeedbackMarker(name, callbackopt)

Removes feedback marker.

Parameters:
Name Type Attributes Description
name string

Name of feedback marker.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.removeFeedbackMarker({ name:"name_marker" });

# removeOverlayFromPart(overlay, part, callbackopt)

Removes overlay from specified part.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay to set.

part string

Part name.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.removeOverlayFromPart({ overlay: 'OverlayName, part: 'PartName' }, (error) => console.log(error));

# render(callbackopt)

Renders 3D scene. If scene is already rendered, it will be destroyed and rendered again.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.render((error) => { console.log('success'); });

# resetCameraPosition(name, callbackopt)

Resets camera position.

Parameters:
Name Type Attributes Description
name string

Name of camera.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.resetCameraPosition({ name:'camera_name' });

# resetCameraTarget(callbackopt)

Resets camera target of active camera.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.resetCameraTarget();

# resetTextureTransform(texture, callbackopt)

Resets transform values for specified texture to default values.

Parameters:
Name Type Attributes Description
texture string

Name of texture.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.resetTextureTransform({ texture: 'Texture01' }, (error) => { console.log(error); });

# selectAllPartsExcept(parts, callbackopt)

Selects all but specified parts. Parts must be selectable.

Parameters:
Name Type Attributes Description
parts Array.<string>

Names of parts.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.selectAllPartsExcept(['PartName1', 'PartName2']);

# selectParts(parts, callbackopt)

Selects specified parts. Parts must be selectable.

Parameters:
Name Type Attributes Description
parts Array.<string>

Names of parts.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.selectParts(['PartName1', 'PartName2']);

# setActiveOverlayEntryForOverlayControls(overlayEntry, callbackopt)

Sets active overlay entry for overlay controls.

Parameters:
Name Type Attributes Description
overlayEntry string

Name of active overlay entry.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setActiveOverlayEntryForOverlayControls({ overlayEntry: 'OverlayEntryName' });

# setAllSelectable(callbackopt)

Sets all parts as selectable.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setAllSelectable();

# setAnnotationTransformationProperties(name, positionopt, scaleopt, rotationopt, callbackopt)

Sets transform properties of annotations.

Parameters:
Name Type Attributes Description
name string

Names of annotation.

position Array.<number> <optional>

Position of annotation as array of 3 numbers.

scale Array.<number> <optional>

Scale of annotation as array of 3 numbers.

rotation Array.<number> <optional>

Rotation of annotation as array of 3 numbers.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setAnnotationTransformationProperties({
  name: 'annotation_name',
  position: [10, 10, 5],
  scale: [14, 13, 7],
  rotation: [90, 45, 45]
});

# setAutoRotateSpeed(speedopt, callbackopt)

Changes speed of current camera auto rotation.

Parameters:
Name Type Attributes Description
speed number <optional>

Speed of rotation. Default is 1.

callback noResultCallback <optional>

Called after action is completed.

# setCameraOptions(numberopt, numberopt, numberopt, numberopt, numberopt, callbackopt)

Sets options for currently active camera.

Parameters:
Name Type Attributes Description
number <optional>

fov - Field of view, angle of camera view vertically.

number <optional>

near - Near clipping plane distance.

number <optional>

far - Far clipping plane distance.

number <optional>

minDistance - Minimum distance that camera can be zoomed in.

number <optional>

maxDistance - Maximum distance that camera can be zoomed out.

callback noResultCallback <optional>

Called after action is completed.

# setCameraPosition(positionopt, callbackopt)

Sets position of currently active camera.

Parameters:
Name Type Attributes Description
position <optional>

Position as array of 3 values. Default is [0, 0, 0].

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setCameraPosition({ position: [1, 2, 1] });

# setCameraTarget(targetopt, callbackopt)

Sets target of currently active camera.

Parameters:
Name Type Attributes Description
target <optional>

Target as array of 3 values. Default is [0, 0, 0].

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setCameraTarget({ target : [0, 3, 0] });

# setCustomPartTransformationProperties(name, optionsopt, callbackopt)

Sets transform properties of custom part.

Parameters:
Name Type Attributes Description
name string

Names of custom part.

options Object <optional>

Transform options.

position Array.<number> <optional>

Position of custom part as array of 3 numbers.

scale Array.<number> <optional>

Scale of custom part as array of 3 numbers.

rotation Array.<number> <optional>

Rotation of custom part as array of 3 numbers.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setCustomPartTransformationProperties({
  name: 'custom_part_name',
  options: {
    position: [10, 10, 5],
    scale: [14, 13, 7],
    rotation: [90, 45, 45],
  },
});

# setModelPosition(name, positionopt, callbackopt)

Sets position of model.

Parameters:
Name Type Attributes Description
name string

Name of model.

position Array.<number> <optional>

Position value.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setModelPosition({ name: 'ModelName', position: [1, 0, 0] });

# setObjectControlTarget(target, callbackopt)

Sets target part for object controls.

Parameters:
Name Type Attributes Description
target string

Name of target part.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setObjectControlTarget({ target: 'TargetName' });

# setOverlayControlsTarget(target, callbackopt)

Sets overlay controls target part.

Parameters:
Name Type Attributes Description
target string | null

target part, null to remove existing target.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setOverlayControlsTarget({ target: 'PartName' });

# setOverlayEntryFilter(overlayEntryFilter, callbackopt)

Sets overlay entries that are managed by overlay controls, if null then all entries are managed. This filter is reset to null if target part is changed.

Parameters:
Name Type Attributes Description
overlayEntryFilter Array.<string> | null

array of names of overlay entries or null.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setOverlayEntryFilter({ overlayEntryFilter: ['OverlayEntryName1', 'OverlayEntryName2'] });

# setOverlayToPart(overlay, part, callbackopt)

Sets overlay to specified part.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay to set.

part string

Part name.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setOverlayToPart({ overlay: 'OverlayName, part: 'PartName' }, (error) => console.log(error));

# setPartTransformationProperties(name, positionopt, rotationopt, scaleopt, callbackopt)

Sets transformations (position, rotation, scale) of specified part.

Parameters:
Name Type Attributes Description
name string

Name of part.

position Array.<number> <optional>

Position value.

rotation Array.<number> <optional>

Rotation value as quaternion.

scale Array.<number> <optional>

Scale value.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setPartTransformationProperties({
   name: 'PartName',
   position: [1.2, 1, 1],
   scale: [1, 1, 2]
});

# setSelectable(partNames, callbackopt)

Sets selectable parts.

Parameters:
Name Type Attributes Description
partNames Array.<string>

Names of parts.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.setSelectable({ partNames : ['PartName1','PartName2','PartName3'] });

# showAllParts(callbackopt)

Shows all parts on scene.

Parameters:
Name Type Attributes Description
callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showAllParts();

# showAnnotations(annotationObjects, callbackopt)

Shows annotations specified as annotationObjects on scene.

Parameters:
Name Type Attributes Description
annotationObjects Array.<Object>

Set specified material on provided annotations.

annotations Array.<string>

Names of annotations.

material string <optional>

Name of material. If specified, it will be set for all annotations in partObjects before parts are shown.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showAnnotations({
  annotationObjects: [
    {
      annotations: ['Anno3'],
      material: 'MaterialName'
    }
  ]
});

# showCustomParts(customPartObjects, callbackopt)

Shows custom parts specified as customPartObjects on scene.

Parameters:
Name Type Attributes Description
customPartObjects Array.<Object>

Set specified material on provided custom parts.

customParts Array.<string>

Names of custom parts.

material string <optional>

Name of material. If specified, it will be set for all custom parts in customPartObjects before custom parts are shown.

callback noResultCallback <optional>

Called after action is completed.

# showLights(lights, callbackopt)

Shows specified lights on the scene.

Parameters:
Name Type Attributes Description
lights Array.<string>

Names of lights.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showLights({ lights:['Light1', 'Light2'] });

# showModels(models, callbackopt)

Shows specified models.

Parameters:
Name Type Attributes Description
models Array.<string>

Names of models to show.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showModels({ models: ['ModelName1', 'ModelName2'] });

# showOnlyAnnotations(annotationObjects, callbackopt)

Shows annotations specified as annotationObjects on scene, hides all other annotations.

Parameters:
Name Type Attributes Description
annotationObjects Array.<Object>

Set specified material on provided annotations.

annotations Array.<string>

Names of annotations.

material string <optional>

Name of material. If specified, it will be set for all annotations in annotationObjects before annotations are shown.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showOnlyAnnotations({
  annotationObjects:[
    {
      annotations: ['Anno3'],
       material: 'MaterialName'
    }
  ]
});

# showOnlyCustomParts(customPartObjects, callbackopt)

Shows only custom parts specified as customPartObjects on scene, other custom parts are hidden.

Parameters:
Name Type Attributes Description
customPartObjects Array.<Object>

Set specified material on provided custom parts.

customParts Array.<string>

Names of custom parts.

material string <optional>

Name of material. If specified, it will be set for all custom parts in customPartObjects before custom parts are shown.

callback noResultCallback <optional>

Called after action is completed.

# showOnlyLights(lights, callbackopt)

Shows only specified lights and hides all other lights.

Parameters:
Name Type Attributes Description
lights Array.<string>

Names of lights.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showOnlyLights( { lights: ['light_name1','light_name2'] } );

# showOnlyModels(models, callbackopt)

Shows only specified models while the rest are hidden.

Parameters:
Name Type Attributes Description
models Array.<string>

Names of models to show.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showOnlyModels({ models: ['ModelName1', 'ModelName2'] });

# showOnlyParts(partObjects, callbackopt)

Shows only parts specified by partObjects on scene.

Parameters:
Name Type Attributes Description
partObjects Array.<Object>

Set specified material on provided parts.

parts Array.<string>

Names of parts.

material string <optional>

Name of material. If specified, it will be set for all parts in partObjects before parts are shown.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showOnlyParts({
    partObjects: [
        {
            parts: ['PartName1', 'PartName2'],
            material: 'MatName1',
        },
        {
            parts: ['PartName3', 'PartName4'],
        }
    ]
});

# showParts(partObjects, callbackopt)

Shows parts specified as partObjects on scene.

Parameters:
Name Type Attributes Description
partObjects Array.<Object>

Set specified material on provided parts.

parts Array.<string>

Names of parts.

material string <optional>

Name of material. If specified, it will be set for all parts in partObjects before parts are shown.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.showParts({
    partObjects: [
        {
            parts: ['PartName1', 'PartName2'],
            material: 'MatName1',
        },
        {
            parts: ['PartName3', 'PartName4'],
        }
    ]
});

# stopAnimationSet(animationSet, callbackopt)

Stop animation set.

Parameters:
Name Type Attributes Description
animationSet string

Name of animation set.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.stopAnimationSet({ animationSet: 'animation_set_name' });

# switchMaterials(oldMaterial, newMaterial, callbackopt)

Sets material to newMaterial for all parts that have oldMaterial as active material.

Parameters:
Name Type Attributes Description
oldMaterial string

name of material that should be changed.

newMaterial string

Name of material that is set.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.switchMaterials({ oldMaterial: 'OldMaterialName', newMaterial: 'NMaterialName' });

# updateCameraControl(name, minAzimuthAngleopt, maxAzimuthAngleopt, minPolarAngleopt, maxPolarAngleopt, panSpeedopt, minDistanceopt, maxDistanceopt, callbackopt)

Updates camera control.

Parameters:
Name Type Attributes Description
name string

Name of camera control.

minAzimuthAngle number <optional>

Minimum azimuth angle.

maxAzimuthAngle number <optional>

Maximum azimuth angle.

minPolarAngle number <optional>

Minimum polar angle.

maxPolarAngle number <optional>

Maximum polar angle.

panSpeed number <optional>

Pan speed.

minDistance number <optional>

Minimum distance.

maxDistance number <optional>

Maximum distance.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.updateCameraControl({
  name: 'Contol_name',
  minAzimuthAngle : 1.1,
  maxAzimuthAngle : 1.5,
  minPolarAngle : 1.0,
  maxPolarAngle : 2.0,
  panSpeed : 5.5,
  minDistance: 1.1,
  maxDistance: 1.5
});

# updateCameraToScene(distanceFactoropt, callbackopt)

Updates camera position, near, far, minDistance and maxDistance based on current scene and camera fov (field of view).

Parameters:
Name Type Attributes Description
distanceFactor <optional>

factor that is multiplied with calculated camera distance, default is 1.0

callback noResultCallback <optional>

Called after action is completed.

# updateObjectControls(modeopt, targetOnSelectionopt, minPolarAngleopt, maxPolarAngleopt, minAzimuthAngleopt, maxAzimuthAngleopt, dampingFactoropt, draggingDampingFactoropt, polarRotateSpeedopt, azimuthRotateSpeedopt, callbackopt)

Updates object controls options.

Parameters:
Name Type Attributes Description
mode string <optional>

'Rotate' or 'Translate', default is 'Rotate'.

targetOnSelection boolean <optional>

If target should be changed when part is selected.

minPolarAngle number <optional>

Minimal vertical angle.

maxPolarAngle number <optional>

Maximal vertical angle.

minAzimuthAngle number <optional>

Minimal horizontal angle.

maxAzimuthAngle number <optional>

Maximal horizontal angle.

dampingFactor number <optional>

Damping factor after dragging.

draggingDampingFactor number <optional>

Damping factor while dragging.

polarRotateSpeed number <optional>

Vertical rotate speed.

azimuthRotateSpeed number <optional>

Horizontal rotate speed.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.updateObjectControls({
  name: 'object_name',
  mode: 'Rotate',
  maxDistance : 10.2,
  minDistance : 2.6,
  zoomEnabled : true,
  zoomSpeed : 5.1,
  rotationSpeed : 10.6,
  rotationSpeedTouch : 1.1,
  horizontalRotationEnabled : false,
  verticalRotationEnabled : true,
});

# updateOverlay(overlay, overlayEntry, optionsopt, callbackopt)

Updates options of overlay.

Parameters:
Name Type Attributes Description
overlay string

Name of overlay to set.

overlayEntry string

Name of overlay entry to set.

options Object <optional>

Overlay options.

fontUrl string <optional>

Url to font to use for overlay text.

imageUrl string <optional>

Url to use as image for overlay.

text string <optional>

Text to display in overlay.

fontColor string <optional>

Color of text in hex.

fontScale number <optional>

Scale of the font. Minimum value 0.0.

fontWeight string <optional>

Font Weight. Possible values: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'.

fontSpacing number <optional>

Font Spacing. Minimum value 1.0.

fontStyle string <optional>

Font style. Possible values: 'normal' 'italic', 'oblique'.

enabled boolean <optional>

Is overlay item enabled.

opacity number <optional>

Opacity of overlay item. Possible values [0.0, 1.0].

flipH boolean <optional>

Flips the overlay texture horizontally.

flipV boolean <optional>

Flips the overlay texture vertically.

scalingMode string <optional>

Scale overlay values : 'scaleToFit', 'scaleToFill' and 'fill', 'fill' is default value.

scalingAlignment Array.<string> <optional>

Array of two values that determines horizontal and vertical alignment of overlay if scaling mode is scaleToFit or scaleToFill. First value should be 'left', 'center' or 'right', second value 'up', 'center' or 'down'.

scale Array.<number> <optional>

Scale accept two parameters in array, first is on X-axis and Y-axis.

tiling <optional>

...

repeat <optional>

...

padding number <optional>

Padding on overlay.

offset Array.<number> <optional>

Moves image on object part.

callback noResultCallback <optional>

Called after action is completed.

Examples
Unlimited3D.updateOverlay({
    overlay: 'OverlayName',
    overlayEntry: 'Image',
    options: { imageUrl: 'url-to-image' }
});
Unlimited3D.updateOverlay({
    overlay: 'OverlayName',
    overlayEntry: 'Text',
    options: {
         text: 'Hello',
         fontUrl: 'url-to-font',
         fontColor: '#000000',
         fontScale: 0.2,
         fontWeight: 'normal',
         fontSpacing: 0.0,
         enabled: true,
    }
});
Unlimited3D.updateOverlay({
    overlay: 'OverlayName',
    overlayEntry: 'Image',
    options: {
        scalingMode: 'scaleToFill',
        scalingAlignment: ['center', 'down']
    }
});

# updateOverlayControls(resolutionopt, targetOnSelectionopt, frameFillColoropt, frameOpacityopt, frameWidthopt, showSideBoundsopt, boundFillColoropt, boundStrokeColoropt, boundScaleopt, boundFillScaleopt, backgroundColoropt, backgroundOpacityopt, callbackopt)

Updates overlay controls options.

Parameters:
Name Type Attributes Description
resolution number <optional>

Resolution of texture rendered by overlay controls.

targetOnSelection boolean <optional>

If target should be changed when part is selected.

frameFillColor string <optional>

Color of frame that represents boundaries of overlay entry.

frameOpacity string <optional>

Opacity of frame that represents boundaries of overlay entry.

frameWidth number <optional>

Width of frame that represents boundaries of overlay entry.

showSideBounds boolean <optional>

If side bounds for lateral scaling are enabled.

boundFillColor string <optional>

Fill color of symbols on the corners of boundaries.

boundStrokeColor string <optional>

Stroke color of symbols on the corners of boundaries.

boundScale number <optional>

Scale of symbols on the corners of boundaries.

boundFillScale number <optional>

Scale of fill part of symbols relative to whole symbols on the corners of boundaries.

backgroundColor string <optional>

Color of area for active overlay entry.

backgroundOpacity number <optional>

Opacity of area for active overlay entry.

callback noResultCallback <optional>

Called after action is completed.

Example
Unlimited3D.updateOverlayControls({ frameFillColor: '#ff0000', backgroundOpacity: 0.1 });

Type Definitions

# createFeedbackMarkerCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Info about created feedback marker.

# createTextureFromImageCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Texture info if successful.

type string

Should be 'texture'.

shortName string

Texture short name.

name string

Texture name.

# eventCallback(event)

Parameters:
Name Type Description
event Object

Event object.

# exportToGLBCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Binary data as typed array of exported GLB if successful.

# getActiveOverlayEntryForOverlayControlsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Info for active overlay entry if successful.

type string

Should be 'overlayEntry'.

shortName string

Overlay entry short name.

name string

Overlay entry name.

# getAllFeedbackMarkersCallback(error, result, names)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Info about feedback markers.

names Array.<string>

Names of available feedback markers.

# getAnnotationPositionCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<number>

Position of annotation as array of 3 numbers.

# getAnnotationsWithMaterialCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Annotations with specified material if successful.

type string

Should be 'annotation'.

shortName string

Annotation short name.

name string

Annotation name.

# getAvailableAnimationSetsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info about animation sets.

type string

Should be 'animationSet'.

shortName string

Overlay entry short name.

name string

Overlay entry name.

# getAvailableAnimationStatesCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info about animation states.

type string

Should be 'animationState'.

shortName string

Animation state short name.

name string

Animation state name.

# getAvailableAnimationTransitionsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info about animation transitions.

type string

Should be 'animationTransition'.

shortName string

Animation transition short name.

name string

Animation transition name.

# getAvailableAnnotationsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Materials if successful.

type string

Should be 'annotation'.

shortName string

Annotation short name.

name string

Annotation name.

# getAvailableCamerasCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Cameras if successful.

type string

Should be 'camera'.

shortName string

Camera short name.

name string

Camera part name.

# getAvailableCustomPartsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Materials if successful.

type string

Should be 'customPart'.

shortName string

Custom part short name.

name string

Custom part name.

# getAvailableMaterialsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Materials if successful.

type string

Should be 'material'.

shortName string

Material short name.

name string

Material name.

# getAvailableModifiersCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info for available modifiers if successful.

type string

Should be 'modifier'.

shortName string

Modifier short name.

name string

Modifier name.

# getAvailableOverlayEntriesCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info about overlay entries.

type string

Should be 'overlayEntry'.

shortName string

Overlay entry short name.

name string

Overlay entry name.

# getAvailableOverlaysCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info for available overlays if successful.

type string

Should be 'overlay'.

shortName string

Overlay short name.

name string

Overlay name.

entries Array.<Object>

Info for overlay entries of each overlay.

entries[].type string

Should be 'overlayEntry'.

entries[].shortName string

Overlay entry short name.

entries[].name string

Overlay entry name.

# getAvailablePartsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Parts if successful.

type string

Should be 'part'.

shortName string

Part short name.

name string

Part name.

# getAvailableTexturesCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info for available textures if successful.

type string

Should be 'texture'.

shortName string

Texture short name.

name string

Texture name.

# getAvailableTransitionsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info for available transitions if successful.

type string

Should be 'transition'.

shortName string

Transition short name.

name string

Transition name.

targetType string

Transition target type.

# getCameraOptionsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Camera options object if successful.

fov number

Field of view, angle of camera view vertically.

near number

Near clipping plane distance.

far number

Far clipping plane distance.

minDistance number

Minimum distance that camera can be zoomed in.

maxDistance number

Maximum distance that camera can be zoomed out.

# getCameraPositionCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<number>

Camera position if successful.

# getCameraTargetCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<number>

Camera target if successful.

# getConfigJSONCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Object with distribution configuration.

# getCurrentAnimationStateCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Info about animation state.

type string

Should be 'animationState'.

shortName string

Animation state short name.

name string

Animation state name.

# getCurrentAnimationTransitionCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Info about animation transition.

type string

Should be 'animationTransition'.

shortName string

Animation transition short name.

name string

Animation transition name.

# getDistributionInfoCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<object>

Array of distribution information objects if successful.

# getHiddenPartsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Parts if successful.

type string

Should be 'part'.

shortName string

Part short name.

name string

Part name.

# getLatestDistributionInfoCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result object

Latest distribution information object if successful.

# getMaterialCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result string

Name of material if successful.

# getMaterialMapTransformCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Texture transform values if successful.

offsetU number

Offset value by U axis.

offsetV number

Offset value by V axis.

repeatU number

Repeat value by U axis.

repeatV number

Repeat value by V axis.

centerU number

Center value by U axis.

centerV number

Center value by V axis.

rotation number

Rotation value in degrees.

# getModelPositionCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<number>

Model position if successful.

# getOverlayConfigCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Object containing overlay configuration if successful.

# getOverlayOverlayEntriesCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info about overlay entries in overlay.

type string

Should be 'overlayEntry'.

shortName string

Overlay entry short name.

name string

Overlay entry name.

# getOverlaysWithOverlayEntryCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info about overlays.

type string

Should be 'overlay'.

shortName string

Overlay short name.

name string

Overlay name.

# getPartCenterCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<number>

Part center if successful.

# getPartOverlaysCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Info for overlays if successful.

type string

Should be 'overlay'.

shortName string

Overlay short name.

name string

Overlay name.

entries Array.<Object>

Info for overlay entries of each overlay.

entries[].type string

Should be 'overlayEntry'.

entries[].shortName string

Overlay entry short name.

entries[].name string

Overlay entry name.

# getPartPositionCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<number>

Part position if successful.

# getPartsWithMaterialCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Parts with specified material if successful.

type string

Should be 'part'.

shortName string

Part short name.

name string

Part name.

# getSelectableCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Selectable objects if successful.

type string

Type of selectable object.

shortName string

Selectable object short name.

name string

Selectable object name.

# getSelectablePartsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Selectable parts if successful.

type string

Should be 'part'.

shortName string

Selectable part short name.

name string

Selectable part name.

# getSelectedAnnotationsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Annotations with specified material if successful.

type string

Should be 'annotation'.

shortName string

Annotation short name.

name string

Annotation name.

# getSelectedPartsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Parts if successful.

type string

Should be 'part'.

shortName string

Part short name.

name string

Part name.

# getSnapshotCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Snapshot in the form of blob, temporary url or base64 string.

# getTextInfoCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

3D text geometry info.

# getTextureTransformCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Texture transform values if successful.

offsetU number

Offset value by U axis.

offsetV number

Offset value by V axis.

repeatU number

Repeat value by U axis.

repeatV number

Repeat value by V axis.

centerU number

Center value by U axis.

centerV number

Center value by V axis.

rotation number

Rotation value in degrees.

# getVisiblePartsCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Array.<Object>

Parts if successful.

type string

Should be 'part'.

shortName string

Part short name.

name string

Part name.

# initCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result Object

Status of initialization if successful.

# isActiveCameraCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if camera is active and if call is successful.

# isActiveCameraControlCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if camera controls are active and if call is successful.

# isActiveRendererCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if renderer is active and if call is successful.

# isActiveViewportCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if viewport is active and if call is successful.

# isAnimationSetPlayingCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if animation set is playing.

# isFeedbackMarkerCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if object is feedback marker.

# isPartSelected(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if part is selected and if call is successful.

# isPartVisibleCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if visible and call is successful.

# isVisibleLightCallback(error, result)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.

result boolean

true if light is visible in the scene and if call is successful.

# noResultCallback(error)

Parameters:
Name Type Description
error Object | null

null if successful, otherwise error object.