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 functionfunction 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.
render: no bool Should 3d scene be rendered immediately or not.
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.
onTrigger: no function onTrigger callback is general callback for events happening in 3d scene. Parameted passed to onTrigger callback is object with type and data fields. Supported types are: ‘PointerClicked’, ‘PointerMoved’
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) {});
                                        
                                    

Example

                                        
var options = {    
    distID:  '1',
    solution3DName: 'My_solution',
    projectName: 'My_project',
    solution3DID:  '1',
    containerID: 'container3d_replace',
    onLoadingChanged: function(loading) {
        loadingBar.style.width = loading.progress + "%";
    },
    onTrigger: (e) => {
        if (e.type === 'PointerClicked') {
            const objectData = e.data[0];
            if (objectData) {
                Unlimited3D.isFeedbackMarker({ name: objectData.name }, (r) => {
                    if (r) {
                        Unlimited3D.removeFeedbackMarker({ name: objectData.name }, (r1) => { console.log(r1); });
                    } else {
                        Unlimited3D.createFeedbackMarker({
                            name: 'Feedback',
                            targetName: objectData.name,
                            targetType: objectData.type,
                            material: null,
                            position: [...objectData.position],
                            radius: 2,
                            radiusMode: 'Relative',
                            color: '#00af00',
                        }, (r2) => { console.log(r2); });
                    }
                });
            }
        }
    }
};
Unlimited3D.init(options, {},function(error, status){
    if (error || !status) {
        console.log(error);
        return;
    }
});
                                        
                                    

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

Changes material options.

changeMaterialOptions({ material, options : {} }, callback);
Parameters:
Name Required Type Description
material: yes string Material name.
options: yes object Options Object.
color: no string Color name.
metalness: no float Metalness level.
roughness: no float Roughness level.
opacity: no float Opacity leve.
transparent: no bool Transparency.
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.changeMaterialOptions({ material: 'material_name', options : {
    color: '#ffffff',
    metalness: 1.3,
    roughness: 1.1,
    opacity: 0.8,
    transparent: 0.5,
} });
                                        
                                    

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( function(error, results ){ console.log(results) });
                                        
                                    

set part transformation properties

Changes position and scale of part

setPartTransformationProperties({ name, position, scale}, 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); });
                                        
                                    

Set annotation transformation properties

Changes position, scale and rotation of annotation.

setAnnotationTransformationProperties({name, position, scale, rotation}, callback)
Parameters:
Name Required Type Description
name: yes string Name of annotation.
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]).
rotation: no array array for new rotation. It must be of length 3 and contain only numbers([90, 90, 90]).
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.setAnnotationTransformationProperties({
        name: 'annotation_name',
        position: [10, 10, 5], 
        scale: [14, 13, 7], 
        rotation: [90, 45, 45]
});
                                        
                                    

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.

Example

                                        
Unlimited3D.setAutoRotateSpeed({ speed : 5 });
                                        
                                    

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.

Example

                                        
Unlimited3D.activateCameraControl({ name:'camera_name' });
                                        
                                    

Is active camera

Check if specified camera is active

isActiveCamera({ 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.

Example

                                        
Unlimited3D.isActiveCamera({ name:'camera_name' }, (e,r)=>{ console.log(e,r) } );
                                        
                                    

Is active camera control

Check if specified camera control is active.

isActiveCameraControl({ 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.

Example

                                        
Unlimited3D.isActiveCameraControl({ name:'Camera Mobile control' }, (e,r)=>{ console.log(e,r) } );
                                        
                                    

Get camera position

Return 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

Changes camera position.

setCameraPosition({ position : [0, 0, 0] } , callback);
Parameters:
Name Required Type Description
position: yes array Array for new position. 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.

Example

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

Get camera target

Returns 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

Choose camera target

setCameraTarget({ target : [0, 0, 0] } , callback);
Parameters:
Name Required Type Description
target: yes array Array for new camera target. 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.

Example

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

Reset camera position

Resets camera position.

resetCameraPosition({ 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.

Example

                                        
resetCameraPosition({ name:'camera_name' });
                                        
                                    

Reset camera target

Resets 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.

Example

                                        
Unlimited3D.resetCameraTarget( (e,r)=>{console.log(e,r) });
                                        
                                    

Enable camera controls

Enables camera controls.

enableCameraControls({ enable : true } , callback);
Parameters:
Name Required Type Description
enable: yes bool should camera controls 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.enableCameraControls({ enable : true });
                                        
                                    

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' });
                                        
                                    

Update camera control

Updates camera control.

updateCameraControl({ name, minAzimuthAngle : null, maxAzimuthAngle : null, minPolarAngle : null, maxPolarAngle : null, panSpeed : null, minDistance: null, maxDistance: null }, callback);
Parameters:
Name Required Type Description
name: yes string Name of camera control.
minAzimuthAngle: no float Minimum azimuth angle.
maxAzimuthAngle: no float Maximum azimuth angle.
minPolarAngle: no float Minimum polar angle.
maxPolarAngle: no float Maximum polar angle.
panSpeed: no float Set pan speed.
minDistance: no float Minimum distance
maxDistance: no float Maximum distance
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.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
});
                                        
                                    

Get available cameras

Returns names of camera.

getAvailableCameras(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.getAvailableCameras(function(error, result) { console.log(result); });
                                        
                                    

Get snapshot

Get snapshot of selected area.

getSnapshot({ width, height} , callback);
Parameters:
Name Required Type Description
width: yes int Resolution of the snapshot (px).
height: yes init Height of the snapshot (px).
result: no string Changes the way snapshot result is returned. Possible values: 'url', 'blob', 'base64'. Default is 'url'
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.getSnapshot({ width : 1280, height : 720 });
                                        
                                    

Example

                                        
Unlimited3D.getSnapshot({ width : 1280, height : 720, result: "base64" });
                                        
                                    

Viewport


Set viewport transparent

Set viewport to be transparent.

setViewportTransparent({ viewport }, callback);
Parameters:
Name Required Type Description
viewport: yes string Viewport 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.setViewportTransparent({ viewport: 'viewport_name' });
                                        
                                    

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

Sets specified renderer as active.

activateRenderer({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Name of renderer.
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.activateRenderer({ name: 'renderer_name' });
                                        
                                    

Is active renderer

Check if specified renderer is active.

isActiveRenderer({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Name of renderer.
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.activateRenderer({
     name:'renderer_name'
}, function(error,response){ 
    console.log(response) 
});
                                        
                                    

Groups


Change group material

Changes group material.

changeGroupMaterial({ groupObjects : [] }, callback);
Parameters:
Name Required Type Description
groupObjects: yes array Array of parts.
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.changeGroupMaterial({
      groupObjects : ['name1','name2','name2'] 
});
                                        
                                    

Model


Enable object control

Enables object control.

enableObjectControl({ name, enable : true }, callback);
Parameters:
Name Required Type Description
name: yes string Name of object.
enable: yes bool Should object control 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.enableObjectControl({ 
     name:'object_name',
     enable : true 
});
                                        
                                    

Get model position

Returns model position.

getModelPosition({ name }, callback);
Parameters:
Name Required Type Description
name: yes string Name of model.
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.getModelPosition({
    name: 'model_name' 
}, function(error, response){ 
    console.log(response);
});
                                        
                                    

Show models

Shows models.

showModels({ models : [] }, callback);
Parameters:
Name Required Type Description
models: yes array Array of models.
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.showModels({ models : ['Model_name1', 'Model_name2'] });
                                        
                                    

Hide models

Hides models.

hideModels({ models : [] }, callback);
Parameters:
Name Required Type Description
models: yes array Array of models.
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.hideModels({ models : ['Model_name1', 'Model_name2'] });
                                        
                                    

Show only models

Shows models only.

showOnlyModels({ models : [] }, callback);
Parameters:
Name Required Type Description
models: yes array Array of models.
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.showOnlyModels({ models : ['Model_name1', 'Model_name2'] });
                                        
                                    

Update Object Controls

Updates 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 Name of object.
mode: no string Mode can have String "Translate" or "Rotate"
maxDistance: no float Maximum distance.
minDistance: no float Minimum distance.
zoomEnabled: no bool Should zoom be enabled.
rotationSpeed: no float Speed of rotation.
rotationSpeedTouch: no float Rotation speed touch.
horizontalRotationEnabled: no bool Should horizontal rotation be enabled.
verticalRotationEnabled: no bool Should vertical rotation 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.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, 
});
                                        
                                    

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

Returns selected part.

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.

Example

                                        
Unlimited3D.getSelected(function(error, response){ console.log(response) });
                                        
                                    

Get selectable

Returns selectable position.

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.

Example

                                        
Unlimited3D.getSelectable(function(error, response){ console.log(response) });
                                        
                                    

Add selectable

Adds selectable parts.

addSelectable({ partNames : [] }, callback);
Parameters:
Name Required Type Description
partNames: yes array Array of parts.
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.addSelectable({ partNames : ['name1','name2','name3'] });
                                        
                                    

Set selectable

Sets selectable.

setSelectable({ partNames : [] }, callback);
Parameters:
Name Required Type Description
partNames: yes array Array of parts.
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.setSelectable({ partNames : ['name1','name2','name3'] });
                                        
                                    

Set all selectable

Sets 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.

Example

                                        
Unlimited3D.setAllSelectable(function(error, response){ console.log(response) });
                                        
                                    

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"});
                                        
                                    

Distribution Info


Get distribution info

Get distribution information for solution

Unlimited3d.getDistributionInfo({ solution3DID }, callback);
Parameters:
Name Required Type Description
solution3DID: yes Int ID of solution.
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.getDistributionInfo({ solution3DID: 1 }, (e, info) => console.log(info));
                                        
                                    

Get latest distribution info

Get latest distribution information for solution.

Unlimited3d.getLatestDistributionInfo({ solution3DID }, callback);
Parameters:
Name Required Type Description
solution3DID: yes Int ID of solution.
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.getLatestDistributionInfo({ solution3DID: 1 }, (e, info) => console.log(info));
                                        
                                    

Rendering


Render

Render 3d scene. If scene is already rendered, it will be destroyed and rendered again.

Unlimited3d.render(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.render(function(error, result) { console.log(result); });
                                        
                                    

Overlay


Get Available Overlays

Get Available Overlays.

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

Example

                                        
Unlimited3D.getAvailableOverlays((error, result) => console.log(result));
                                        
                                    

Get Part Overlays

Get active overlay for the provided part.

getPartOverlays({ 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.getPartOverlays({ part: 'PartName' }, (error, result) => console.log(result));
                                        
                                    

Set Overlay To Part

Sets passed overlay to specified part.

setOverlayToPart({ overlay, part }, callback)
Parameters:
Name Required Type Description
overlay: yes string Name of overlay to set
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.setOverlayToPart({ overlay: 'OverlayName, part: 'PartName' }, (error) => console.log(error));
                                        
                                    

Remove Overlay From Part

Removes overlay from specified part.

removeOverlayFromPart({ overlay, part }, callback)
Parameters:
Name Required Type Description
overlay: yes string Name of overlay to remove
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.removeOverlayFromPart({ overlay: 'OverlayName, part: 'PartName' }, (error) => console.log(error));
                                        
                                    

Update overlay

Updates options of overlay.

updateOverlay({ overlay, overlayEntry, options : {} });
Parameters:
Name Required Type Description
overlay: yes string Name of overlay to update.
overlayEntry: yes string Name of overlay item 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
fontStyle: no string Font style. Possible values: 'normal' 'italic', 'oblique'.
enabled: no bool Is overlay item enabled.
opacity: no float Opacity of overlay item. Possible values [0.0, 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

                                        
Unlimited3D.updateOverlay({ 
    overlay: 'Overlay',
    overlayEntry: 'Image',
    options: { imageUrl: 'url-to-image' }
});
                                        
                                    

Example

                                        
Unlimited3D.updateOverlay({ 
    overlay: 'Material',
    overlayEntry: 'Text',
    options: {
         text: 'Hello',
         fontUrl: 'url-to-font',
         fontColor: '#000000',
         fontScale: 0.2,
         fontWeight: 'normal',
         fontSpacing: 0.0  
    }
});
                                        
                                    

Add entry to overlay

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

addEntryToOverlay({ overlay, overlayEntry, index : null });
Parameters:
Name Required Type Description
overlay: yes string Name of overlay to which entry should be added
overlayEntry: yes string Name of overlay entry to add
index: no intiger Index of the overlay entry
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.addEntryToOverlay({ overlay: 'overlay_name', overlayEntry: 'overlayEntry_name', index : 5 });
                                        
                                    

Remove entry from overlay

Remove entry from overlay.

removeEntryFromOverlay({ overlay, overlayEntry });
Parameters:
Name Required Type Description
overlay: yes string Name of overlay from which entry should be removed.
overlayEntry: no string Name of overlay entry to remove.
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.removeEntryFromOverlay({ overlay: 'overlay_name', overlayEntry: 'overlayEntry_name' });
                                        
                                    

Decoration


Activates decoration on parts

If decoration is not specified, current decoration from scene will be used.

activateDecorationOnParts({ parts : [], decoration : null });
Parameters:
Name Required Type Description
parts: yes array Parts on which to apply decoration.
decoration: no string Decoration to use.
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.activateDecorationOnParts({ parts : ['part_name'], decoration : 'decoration _name' });
                                        
                                    

Deactivates decoration from parts

Deactivates decoration from parts.

deactivateDecorationFromParts({ parts : [] }, callback);
Parameters:
Name Required Type Description
parts: yes array Parts from which to remove decoration.
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.deactivateDecorationFromParts({ parts : ['part_name1', 'part_name2'] });
                                        
                                    

Feedback


Create feedback marker

Returns object with data about created object, including correct object name etc.

createFeedbackMarker({ name, targetName, targetType, material, position, radius, radiusMode, color, });
Parameters:
Name Required Type Description
name: yes string Name of feedback marker, if it is not unique, it will add suffix with numeration.
targetName: no string Name of the object on top of which feedback should be created, it can be used to calculate marker size.
targetType: no string Type of the object on top of which feedback should be created, it can be used to calculate marker size.
material: no string Custom material that will be user instead of single color material.
position: no array Position where marker will be created.
radius: no float Radius of marker, how value will be applied depends on radiusMode
radiusMode: no string Mode to determine the size of marker.
color: no string Color of marker 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.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))
                                        
                                    

Remove feedback marker

Remove feedback marker.

removeFeedbackMarker({ name });
Parameters:
Name Required Type Description
name: yes string name of the marker, it should be name returned in the result object of createFeedbackMarker call.
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.removeFeedbackMarker({ name:"name_marker" });
                                        
                                    

Is feedback marker

Returns true if object with given name is marker.

isFeedbackMarker({ name });
Parameters:
Name Required Type Description
name: no string name of the object.
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.isFeedbackMarker({ name:"name_marker" });
                                        
                                    

Get all feedback markers

Returns array of all marker names created in the scene.

getAllFeedbackMarkers(callback = emptyFunc);
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

                                        
getAllFeedbackMarkers((error ,response) => { console.log(erorr ,response) });
                                        
                                    
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.