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!

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

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

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

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.

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.

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.

Get material

getMaterial({ part }, callback);
Parameters:
Name Required Type Description
part: yes string Get active material for the provided part.
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 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

applyMaterialToAllParts({ material }, callback);
Parameters:
Name Required Type Description
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.

Switch materials

switchMaterials({ oldMaterial, newMaterial }, callback);
Parameters:
Name Required Type Description
oldMaterial: yes string
newMaterial: 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 annotation material

changeAnnotationMaterial({ annotations : [], material }, callback);
Parameters:
Name Required Type Description
annotations: 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.

Change material color

changeMaterialColor({ material, color : '#ffffff' }, callback);
Parameters:
Name Required Type Description
material: yes string
color: 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 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

showOnlyParts({ partObjects : [] }, callback);
Parameters:
Name Required Type Description
partObjects: 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 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); });
                                    
                                

Show groups

showGroups({ groups : [] }, callback);
Parameters:
Name Required Type Description
groups: 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 groups

hideGroups({ groups : [] }, callback);
Parameters:
Name Required Type Description
groups: 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.

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.

Is part visible

isPartVisible({ part }, callback);
Parameters:
Name Required Type Description
part: 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.

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

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

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.

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.

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.

Is part selected

isPartSelected({ part }, callback);
Parameters:
Name Required Type Description
part: 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.

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.

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

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.

Is visible light

isVisibleLight({ 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 only lights

showOnlyLights({ lights : [] }, callback);
Parameters:
Name Required Type Description
lights: 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 annotations

showOnlyAnnotations({ annotationObjects : [] }, callback);
Parameters:
Name Required Type Description
annotationObjects: 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 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); });
                                    
                                

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.

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.

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.

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.

Get part position

getPartPosition({ 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 part center

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

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.

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.

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

Get Available 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); });
                                    
                                

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.

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.

Change background color

Changes background color and background opacity of scene

changeBackgroundColor({ profile, color , opacity }, callback)
Parameters:
Name Required Type Description
profile: 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({ 
       profile: "Viewer", color = "#CCCCCC", opacity = 0.5 
 })
                                    
                                

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

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

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