Loading...

Thank you for getting in touch!

We appreciate you contacting us. Our team will get back in touch with you soon!

Have a great day!

API DOCUMENTATION

Help Center

Init

Initializes Unlimited3D library.

init(options, configuration, callback)
Parameters:
Name Required Type Description
options: yes object Following options object fields are required. You can find them on platform, in publish menu, after solution was published.
distID: yes string ID of distribution.
solution3DName: yes string Name of campaign(solution).
projectName: yes string Name of project that campaign belongs to.
solution3DName: yes string ID of campaign(solution).
containerID: yes 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: no bool Determines whether or not analytics will be collected. NOTE: Impression and load time analytics are always collected, regardless of this option
onPointerClick: no function Called whenever user clicks on the scene First and only parameter is an array of objects in format.
onPointerMove: no function Called whenever user moves mouse around the scene First and only parameter is an array of objects in format.
onLoadingChanged: no function Called when loading of models and textures has changed First and only parameter is an object contain information about loading status.
onCameraInteraction: no function Called when user moves camera using mouse or touch.
configuration: no object Cofiguration object is used for loading custom(saved) options before scene is loaded.
camera: no string Camera Name.
viewport: no string Viewport Name.
renderer: no string Renderer Name.
lights: no object Lights with three child- show:, hide:, override:.
show: no array Light names, add to scene.
hide: no array Light names, remove from scene.
override: no array Light names, only these will be in scene.
annotations: no object Annotations with three child- show:, hide:, override:.
show: no array Annotation names, add to scene.
hide: no array Annotation names, remove from scene.
override: no array Annotation names, only these will be in scene..
materials: no object Materials of annotations.
MaterialName: no array Set material to annotations.
parts: no object Change parts.
show: no array Part names, add to scene.
hide: no array Part names, remove from scene.
override: no array Part names, only these will be in scene.
materials: no object Materials of parts.
MaterialName: no object set material to parts.
cameraControl: no object should auto rotate be enabled.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
var options = {
      distID:  '1',
      solution3DName: 'My_solution',
      projectName: 'My_project',
      solution3DID:  '1',
      containerID: 'container3d_replace',
      onLoadingChanged: function (loading) {};
      Unlimited3D.init(options,{},function(e))};
  // With configuration
      var configuration = {
          camera: 'CameraName',
          cameraControl: { autoRotate: true},
          viewport: 'ViewportName',
          renderer: 'RendererName',
          lights: {
            show: ['LightName'],
            hide: ['LightName'],
            override: ['LightName'],
          },
          annotations: {
            show: ['AnnotationName'],
            hide: ['AnnotationName'],
            override: ['AnnotationName'],
            materials: {
              'MaterialName': ['AnnotationName'],
            },
          },
          parts: {
            show: ['PartName'],
            hide: ['PartName'],
            override: ['PartName'],
            materials: {
                'MaterialName': ['PartName'],
            },
          },
          materials: {
            'MaterialName': {
                color: '#ffffff',
            },
          },
          switchMaterials: {
            'MaterialToHide': 'MaterialToShow',
          },
        };
        Unlimited3D.init(options, configuration, function(e) {});
                                        
                                    

Material


Change Material

Sets passed material to specified parts.

changeMaterial({ parts : [], material }, callback);
Parameters:
Name Required Type Description
parts: yes array Names of parts.
material: yes string Name of material.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

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

Get material

Get active material for the provided part.

getMaterial({ part }, callback);
Parameters:
Name Required Type Description
part: yes string Part name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getMaterial({ part:'partName' }, function(e,r){console.log(e,r)});
                                        
                                    

Get available materials

getAvailableMaterials(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.getAvailableMaterials(function(error, result) { console.log(result); });
                                        
                                    

Change materials

changeMaterials({ partObjects : [] }, callback);
Parameters:
Name Required Type Description
partObjects: yes array Set specified material on provided parts.
parts: yes array
material: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

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

Apply material to all parts

Apply specified material to all parts.

applyMaterialToAllParts({ material }, callback);
Parameters:
Name Required Type Description
material: yes string Material name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Switch materials

Switch material by name.

switchMaterials({ oldMaterial, newMaterial }, callback);
Parameters:
Name Required Type Description
oldMaterial: yes string Old material name.
newMaterial: yes string New material name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Change material color

Change material color.

changeMaterialColor({ material, color : '#ffffff' }, callback);
Parameters:
Name Required Type Description
material: yes string Material name.
color: yes string Color name in hex.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.changeMaterialColor({material : "material_name", color: '#ffffff' });
                                        
                                    

Change material options

changeMaterialOptions({ material, options = {} }, callback);
Parameters:
Name Required Type Description
material: yes string
options: yes object
color: no string
metalness: no float
roughness: no float
opacity: no float
transparent: no bool
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Update material overlay

Updates options of materials overlay.

updateMaterialOverlay({ material, overlay, options : { text, fontUrl, imageUrl, fontColor, fontScale, fontWeight, fontSpacing } }, callback = emptyFunc);
Parameters:
Name Required Type Description
material: yes string Name of material with overlay to update.
overlay: yes string Name of overlay to update.
fontUrl: no string Url to font to use for overlay text.
imageUrl: no string Url to use as image for overlay.
text: no string Text to display in overlay.
fontColor: no string Color of text in hex.
fontScale: no float Scale of the font. Minimum value 0.0.
fontWeight: no string Font Weight. Possible values: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'.
fontSpacing: no float Font Spacing. Minimum value 1.0
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
// Update Image Overlay
Unlimited3D.updateMaterialOverlay({ material: 'Material', overlay: 'ImageOverlay', options: { imageUrl: 'url-to-image' }});
                                        
                                    

Example

                                        
// Update Text Overlay
Unlimited3D.updateMaterialOverlay({ material: 'Material', overlay: 'TextOverlay', options: { text: 'Hello', fontUrl: 'url-to-font', fontColor: '#000000', fontScale: 0.2, fontWeight: 'normal', fontSpacing: 0.0  }});
                                        
                                    

Part


Hide parts

Hides specified model parts from scene.

hideParts({ parts : [] }, callback);
Parameters:
Name Required Type Description
parts: yes array Names of parts to hide.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

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

Show parts

Shows specified parts on scene.

showParts({ partObjects : [] }, callback);
Parameters:
Name Required Type Description
partObjects: yes array If material is not specified parts in that group will use their default material.
name ['PartName']: yes array Part name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.showParts({partObjects:[{parts:['PartName']}]});
                                        
                                    

Show all parts

showAllParts(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Show only parts

Display specified parts and hide all other parts in the scene.

showOnlyParts({ partObjects : [] }, callback);
Parameters:
Name Required Type Description
partObjects: yes array Shows specified parts on scene.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.showOnlyParts({
    partObjects:[
        {
            parts: ["PartName3", "PartName4"],
        }
    ]
});
                                        
                                    

Get available parts

getAvailableParts(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.getAvailableParts(function(error, result) { console.log(result); });
                                        
                                    

Get visible parts

getVisibleParts(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

    Unlimited3D.getVisibleParts(function(error, result) { console.log(result); });
                                        
                                    

Get hidden parts

getHiddenParts(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.getHiddenParts(function(error, result) { console.log(result); });
                                        
                                    

Is part visible

Check if a part is visible.

isPartVisible({ part }, callback);
Parameters:
Name Required Type Description
part: yes string Part name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.isPartVisible({ part: "part_name"}, function(error,result){console.log(result)} );
                                        
                                    

Select parts

selectParts({ parts }, callback);
Parameters:
Name Required Type Description
parts: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.selectParts(['PartName'])
                                        
                                    

Select all parts except

Selects all parts in the scene except the ones listed in the array.

selectAllPartsExcept({ parts : [] }, callback);
Parameters:
Name Required Type Description
parts: yes array Array of parts name
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Get selected parts

Get selected parts.

getSelectedParts(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getSelectableParts(function(error, result) { console.log(result); });
                                        
                                    

Is part selected

Check if a part is selected.

isPartSelected({ part }, callback);
Parameters:
Name Required Type Description
part: yes string Part name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.isPartSelected({ part: "part_name"}, function(error,result){console.log(result)} );
                                        
                                    

Get selectable parts

Get selectable parts.

getSelectableParts(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getSelectableParts(function(error, result) { console.log(result); });
                                        
                                    

Get part position

Get part position.

getPartPosition({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Part name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getPartPosition({ name: 'part_name'},function(error, result) { console.log(result); } );
                                        
                                    

Get part center

Get part center.

getPartCenter({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Part name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getPartCenter({ name: 'part_name'},function(error, result) { console.log(result); } );
                                        
                                    

Show custom parts

Shows specified custom parts on scene.

showCustomParts({ customPartObjects = [] }, callback)
Parameters:
Name Required Type Description
customPartObjects: yes array Names of parts to show
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success. Hide annotations

Example

                                        
Unlimited3D.showCustomParts({
   customPartObjects :[{ customParts:["CustomPartName"] }]
});
                                        
                                    

Hide custom parts

Hides specified custom parts from scene.

hideCustomParts({ customParts = [] }, callback)
Parameters:
Name Required Type Description
customParts: yes array Names of parts to hide
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success. Hide annotations

Example

                                        
Unlimited3D.hideCustomParts({
    customParts:["CustomPartName"]
});
                                        
                                    

Show only custom parts

Shows only specified custom parts on scene.

showOnlyCustomParts({ customPartObjects = [] }, callback)
Parameters:
Name Required Type Description
customPartObjects: yes array Names of part to show
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success. Hide annotations

Example

                                        
Unlimited3D.showOnlyCustomParts({
     showCustomParts:[{customParts:["CustomPartName"]}]
});
                                        
                                    

Get available custom parts

Returns names of custom parts available

getAvailableCustomParts( callback )
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success. Hide annotations

Example

                                        
Unlimited3D.getAvailableCustomParts((e, parts) => console.log(parts));
                                        
                                    

set part transformation properties

Changes position and scale of part

setPartTransformationProperties({ name, position, scale, rotation }, callback)
Parameters:
Name Required Type Description
name: yes string name of the part
position: no array array for new position. It must be of length 3 and contain only numbers([1, 1, 1])
scale: no array array for new scale. It must be of length 3 and contain only numbers([1, 1, 1])
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success. Hide annotations

Example

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

Light


Show lights

Adds specified lights to scene.

showLights({ lights : [] }, callback);
Parameters:
Name Required Type Description
lights: yes array Names of lights to show.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

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

Hide lights

Removes specified lights from scene.

hideLights({ lights : [] }, callback);
Parameters:
Name Required Type Description
lights: yes array Names of lights to hide.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

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

Is visible light

Check if a light is visible.

isVisibleLight({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Light name.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.isVisibleLight({ name : "Light_name"}, function(error,result){console.log(result)} );
                                        
                                    

Show only lights

Show only the lights listed in the array and hide all other lights.

showOnlyLights({ lights : [] }, callback);
Parameters:
Name Required Type Description
lights: yes array Names of lights to show.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Annotation


Show annotations

Adds specified annotations to scene.

showAnnotations({ annotationObjects : [] }, callback);
Parameters:
Name Required Type Description
annotationObjects: yes array If material is not specified annotations in that group will use their default.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.showAnnotations({
    annotationObjects:[
         {
               annotations: ["Anno3"],
               "MaterialName"
         }
    ]
})
                                        
                                    

Hide annotations

Removes specified annotations from scene.

hideAnnotations({ annotations : [] }, callback);
Parameters:
Name Required Type Description
annotations: yes array Names of annotations to hide.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Change annotation material

Sets passed material to specified annotation.

changeAnnotationMaterial({ annotations : [], material }, callback);
Parameters:
Name Required Type Description
annotations: yes array Names of annotations to change material.
material: yes string Name of material.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Get selected annotations

Get Selected annotations

getSelectedAnnotations(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getSelectedAnnotations( function(error, results ){ console.log(results) });
                                        
                                    

Show only annotations

Shows specified annotations to scene.

showOnlyAnnotations({ annotationObjects : [] }, callback);
Parameters:
Name Required Type Description
annotationObjects: yes array If material is not specified annotations in that group will use their default.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Get available annotations

getAvailableAnnotations(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.getAvailableAnnotations(function(error, result) { console.log(result); });
                                        
                                    

Camera


Enable auto rotate

Enables current camera’s auto rotation around target.

enableAutoRotate({ enable : true }, callback);
Parameters:
Name Required Type Description
enable: yes bool should auto rotate be enabled.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.enableAutoRotate({enable:true});
                                        
                                    

Set auto rotate speed

Changes speed of current camera auto rotation.

setAutoRotateSpeed({ speed : 1 } , callback);
Parameters:
Name Required Type Description
speed: yes float Set speed of ratation
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Activate camera control

Set specified camera as active on scene

activateCameraControl({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Name of camera to activate
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Is active camera

isActiveCamera({ name }, callback);
Parameters:
Name Required Type Description
name: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Is active camera control

isActiveCameraControl({ name }, callback);
Parameters:
Name Required Type Description
name: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Get camera position

getCameraPosition(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.getCameraPosition(function(error, result) { console.log(result); });
                                        
                                    

Set camera position

setCameraPosition({ position : [0, 0, 0] } , callback);
Parameters:
Name Required Type Description
position: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Get camera target

getCameraTarget(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        

  Unlimited3D.getCameraTarget(function(error, result) { console.log(result); });
                                        
                                    

Set camera target

setCameraTarget({ target : [0, 0, 0] } , callback);
Parameters:
Name Required Type Description
target: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Reset camera position

resetCameraPosition({ name }, callback)
Parameters:
Name Required Type Description
name: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Reset camera target

resetCameraTarget(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Enable camera controls

enableCameraControls({ enable : true } , callback);
Parameters:
Name Required Type Description
enable: yes bool
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Get snapshot

getSnapshot({ width : 1280, height : 720 } , callback);
Parameters:
Name Required Type Description
width: yes int
height: yes int
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Update camera control

updateCameraControl({ name, minAzimuthAngle : null, maxAzimuthAngle : null, minPolarAngle : null, maxPolarAngle : null, panSpeed : null }, callback);
Parameters:
Name Required Type Description
name: yes string
minAzimuthAngle: yes float
maxAzimuthAngle: yes float
minPolarAngle: yes float
maxPolarAngle: yes float
panSpeed: yes float
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Activate camera

Set specified camera as active on scene

activateCamera({ name, preventDefault}, callback )
Parameters:
Name Required Type Description
name: yes string Name of camera to activate
preventDefault: no bool Prevents camera from jumping to default position when activated
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Viewport


Set viewport transparent

setViewportTransparent({ viewport }, callback);
Parameters:
Name Required Type Description
viewport: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Change background color

Changes background color and background opacity of scene

changeBackgroundColor({ viewport , color , opacity }, callback)
Parameters:
Name Required Type Description
viewport: yes string Name of viewport
color: no string Change background color
opacity: no float Change background opacity
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Renderer


Activate renderer

activateRenderer({ name }, callback);
Parameters:
Name Required Type Description
name: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Is active renderer

isActiveRenderer({ name }, callback);
Parameters:
Name Required Type Description
name: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Groups


Change group material

changeGroupMaterial({ groupObjects : [] }, callback);
Parameters:
Name Required Type Description
groupObjects: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Model


Enable object control

enableObjectControl({ name, enable : true }, callback);
Parameters:
Name Required Type Description
name: yes string
enable: yes bool
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Get model position

getModelPosition({ name }, callback);
Parameters:
Name Required Type Description
name: yes string
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Show models

showModels({ models : [] }, callback);
Parameters:
Name Required Type Description
models: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Hide models

hideModels({ models : [] }, callback);
Parameters:
Name Required Type Description
models: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Show only models

showOnlyModels({ models : [] }, callback);
Parameters:
Name Required Type Description
models: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Update Object Controls

updateObjectControls({name, mode = null, maxDistance = null, minDistance = null, zoomEnabled = null, zoomSpeed = null, rotationSpeed = null, rotationSpeedTouch = null, horizontalRotationEnabled = null, verticalRotationEnabled = null, }, callback)
Parameters:
Name Required Type Description
name: yes string
mode: no string Mode can have String "Translate" or "Rotate"
maxDistance: no float
minDistance: no float
zoomEnabled: no bool
rotationSpeed: no float
rotationSpeedTouch: no float
horizontalRotationEnabled: no bool
verticalRotationEnabled: no bool
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Enable analitycs collection

Enable/disable collection of analytics.

enableAnalitycsCollection({ enable }, callback);
Parameters:
Name Required Type Description
enable: yes bool escription: Enable/disable collection of analytics. NOTE: Impression and load time analytics are always collected, regardless of this option.
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.enableAnalitycsCollection({enable : true});
                                        
                                    

Selectable


Get selected

getSelected(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Get selectable

getSelectable(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Add selectable

addSelectable({ partNames : [] }, callback);
Parameters:
Name Required Type Description
partNames: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Set selectable

setSelectable({ partNames : [] }, callback);
Parameters:
Name Required Type Description
partNames: yes array
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Set all selectable

setAllSelectable(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Actions


Get available transitions

Returns names of modifiers transitions.

getAvailableTransitions(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getAvailableTransitions(function(error, result) { console.log(result); });
                                        
                                    

Activate transition

Activates specified transition

activateTransition({ transition, target, duration, config = {}, callback})
Parameters:
Name Required Type Description
transition: yes string Name of transition to activate
target: no string Name of transitions target. If not specified transition will use target set in Unlimited3D designer
duration: no float Duration of transition in ms
config: no object Object containg properties of transition to change. Example: position, scale
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

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

Get available modifiers

Returns names of modifiers available.

getAvailableModifiers(callback);
Parameters:
Name Required Type Description
callback: no function Callback function called after action is completed first parameter returned is error, which is set to null in case of success.

Example

                                        
Unlimited3D.getAvailableModifiers(function(error, result) { console.log(result); });
                                        
                                    

Activate modifier

Activates specified modifier

activateModifier({ modifier });
Parameters:
Name Required Type Description
modifier: yes string Name of modifier to activate

Example

                                        
Unlimited3D.activateModifier({modifier: "NameOfModifier"});
                                        
                                    
We use cookies in order to offer you the most relevant experiences. Please accept cookies for optimal performance. For more information, read our Privacy Policy.