Skip to main content

API Documentation

Version:
intro

General

init

Initializes Unlimited3D library.

Parameters:

NameTypeAttributesDescription
optionsObjectRequiredFollowing options object fields are required. You can find them on platform, in publish menu, after solution was published.
options.distIDstringRequiredID of distribution.
options.solution3DNamestringRequiredName of solution.
options.projectNamestringRequiredName of project that campaign belongs to.
options.solution3DIDstringRequiredID of solution.
options.container3DstringRequiredID of html element to which canvas will be attached The rest of the fields are not required, but can be passed to customize behaviour.
options.collectAnalyticsbooleanOptionalDetermines whether analytics will be collected. NOTE: Impression and load time analytics are always collected, regardless of this option.
options.onPointerClickeventCallbackOptionalCalled whenever user clicks on the scene. First and only parameter is an array of objects in format.
options.onPointerMoveeventCallbackOptionalCalled whenever user moves mouse around the scene. First and only parameter is an array of objects in format.
options.onLoadingChangedeventCallbackOptionalCalled when loading of models and textures has changed. First and only parameter is an object contain information about loading status.
options.onCameraInteractioneventCallbackOptionalCalled when user moves camera using mouse or touch.
options.onTriggereventCallbackOptionalCalled when user triggers an action.
options.renderbooleanRequiredShould 3D scene be rendered immediately or not.
configurationObjectRequiredConfiguration object is used for loading custom (saved) options before scene is loaded. It is either in format from examples or newer format returned by getConfigJSON call.
callbackinitCallbackOptionalCalled after action is completed.

Examples

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', 'model_name_1.fbx:RootNode'],
hide: ['PartName', 'model_name_2.fbx:RootNode'],
override: ['PartName'],
materials: {
'MaterialName': ['PartName'],
},
},
materials: {
'MaterialName': {
color: '#ffffff',
},
},
switchMaterials: {
'MaterialToHide': 'MaterialToShow',
},
};

Unlimited3D.init(options, configuration, function(e) {});
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;
}
});

dispose

Explicitly releases library freeing all it's resources.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

render

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

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

enableAnalitycsCollection

Enables collecting of analitycs information.

Parameters:

NameTypeAttributesDescription
enablebooleanOptionalIf collecting is enabled, default is true.
callbacknoResultCallbackOptionalCalled after action is completed.

activateRenderer

Sets specified renderer as active.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of renderer.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

isActiveRenderer

Checks if specified renderer is active.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of renderer.
callbackisActiveRendererCallbackOptionalCalled after action is completed.

Examples

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

getSnapshot

Gets snapshot image of current render.

Parameters:

NameTypeAttributesDescription
widthnumberOptionalWidth of rendered image.
heightnumberOptionalHeight of rendered image.
methodstringOptional'hires' or 'legacy', default is 'hires'.
resultstringOptional'blob', 'url' or 'base64', default is 'url'.
callbackgetSnapshotCallbackOptionalCalled after action is completed.

Examples

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


Distribution Info

getDistributionInfo

Gets distribution information objects for solution.

Parameters:

NameTypeAttributesDescription
solution3DIDstringRequiredSolution ID.
callbackgetDistributionInfoCallbackOptionalCalled after action is completed.

Examples

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

getLatestDistributionInfo

Gets latest distribution information for solution.

Parameters:

NameTypeAttributesDescription
solution3DIDstringRequiredSolution ID.
callbackgetLatestDistributionInfoCallbackOptionalCalled after action is completed.

Examples

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


Analytics

sendAnalytics

Sends analytics data

Parameters:

NameTypeAttributesDescription
typestringRequiredtype of analytics data
restanyRequiredrest arguments
callbacknoResultCallbackRequired[callback] - Called after action is completed.


Material

getMaterial

Gets name of active material for the provided part.

Parameters:

NameTypeAttributesDescription
partstringRequiredPart name.
callbackgetMaterialCallbackOptionalCalled after action is completed.

Examples

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

getPartsWithMaterial

Gets names of parts with the specified material.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
callbackgetPartsWithMaterialCallbackOptionalCalled after action is completed.

Examples

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

getAnnotationsWithMaterial

Gets names of annotations with the specified material.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
callbackgetAnnotationsWithMaterialCallbackOptionalCalled after action is completed.

Examples

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

getAvailableMaterials

Gets all available materials.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableMaterialsCallbackOptionalCalled after action is completed.

Examples

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

changeMaterial

Sets material to specified parts.

Parameters:

NameTypeAttributesDescription
partsArray.<string>RequiredNames of parts.
materialstringRequiredName of material.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeMaterials

Sets materials to specified parts as defined by partObjects.

Parameters:

NameTypeAttributesDescription
partObjectsArray.<Object>RequiredSet specified material on provided parts.
partObjects[].partsArray.<string>RequiredNames of parts.
partObjects[].materialstringRequiredName of material.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

applyMaterialToAllParts

Applies specified material to all parts.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

switchMaterials

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

Parameters:

NameTypeAttributesDescription
oldMaterialstringRequiredname of material that should be changed.
newMaterialstringRequiredName of material that is set.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeMaterialColor

Sets color of specified material.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
colorstringRequiredColor can be hex string, 'rgb(r, g, b)' string where values are in range 0...255, 'cmyk(c, m, y, k)' string where values are in range 0...100 or 'pantone(name)' string where name is one of Pantone color names.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeMaterialOptions

Sets options for specified material.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
optionsObjectRequiredMaterial options.
options.colorstringOptionalHex value of material color.
options.opacitynumberOptionalOpacity value of material.
options.transparentbooleanOptionalIf material is transparent.
metalnessnumberOptionalMetalness value of material.
roughnessnumberOptionalRoughness value of material.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeMaterialsOptions

Sets options for specified materials.

Parameters:

NameTypeAttributesDescription
materialsArray.<string>RequiredNames of materials.
optionsObjectRequiredMaterial options.
options.colorstringOptionalHex value of material color.
options.opacitynumberOptionalOpacity value of material.
options.transparentbooleanOptionalIf material is transparent.
metalnessnumberOptionalMetalness value of material.
roughnessnumberOptionalRoughness value of material.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

cloneMaterial

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

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of the material to clone.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getMaterialMapTransform

Gets texture transform values of current material map type.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
mapTypestringRequiredType of map (only diffuseMap is currently fully supported).
callbackgetMaterialMapTransformCallbackOptionalCalled after action is completed.

Examples

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

changeMaterialMap

Sets material map of specified type to specified texture.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material.
texturestringRequiredName of texture to set.
mapTypestringRequiredtype of map. Only diffuseMap map type is currently fully supported.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeGroupMaterial

Changes group material.

Parameters:

NameTypeAttributesDescription
groupObjectsArray.<string>RequiredArray of parts.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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


Annotation

changeAnnotationMaterial

Sets specified material to specified annotations.

Parameters:

NameTypeAttributesDescription
annotationsArray.<string>RequiredNames of annotations for which material should be set.
materialstringRequiredName of material.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showAnnotations

Shows annotations specified as annotationObjects on scene.

Parameters:

NameTypeAttributesDescription
annotationObjectsArray.<Object>RequiredSet specified material on provided annotations.
annotationObjects[].annotationsArray.<string>RequiredNames of annotations.
annotationObjects[].materialstringOptionalName of material. If specified, it will be set for all annotations in partObjects before parts are shown.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

hideAnnotations

Hides specified annotations on the scene.

Parameters:

NameTypeAttributesDescription
annotationsArray.<string>RequiredNames of annotations.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showOnlyAnnotations

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

Parameters:

NameTypeAttributesDescription
annotationObjectsArray.<Object>RequiredSet specified material on provided annotations.
annotationObjects[].annotationsArray.<string>RequiredNames of annotations.
annotationObjects[].materialstringOptionalName of material. If specified, it will be set for all annotations in annotationObjects before annotations are shown.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getAvailableAnnotations

Gets available annotations.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableAnnotationsCallbackOptionalCalled after action is completed.

Examples

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

setAnnotationTransformationProperties

Sets transform properties of annotations.

Parameters:

NameTypeAttributesDescription
namestringRequiredNames of annotation.
positionArray.<number>OptionalPosition of annotation as array of 3 numbers.
scaleArray.<number>OptionalScale of annotation as array of 3 numbers.
rotationArray.<number>OptionalRotation of annotation as array of 3 numbers.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getAnnotationPosition

Gets position of specified annotation.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of annotation.
callbackgetAnnotationPositionCallbackOptionalCalled after action is completed.

Examples

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

annotationFadeEffect

Fades active annotations in or out based on number of visible annotations and their distance to the camera. Uses annotation material opacity.

Parameters:

NameTypeAttributesDescription
visibleCountNumberRequiredNumber of annotations that will be visible at once. Default is 2.
fadeDurationNumberRequiredDuration of the fading animation in miliseconds. Default is 500ms.
easingStringRequiredEasing function used for the fading animation. Default is Quadratic.InOut.
enabledAnnotationsArray.<String>RequiredArray containing names of annotations to be affected by the effect. If empty, all annotations are affected. Default is an empty array.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.annotationFadeEffect({visibleCount=2, fadeDuration = 500, easing = "Quadratic.InOut", enabledAnnotations = []})


Texture

createTextureFromImage

Creates texture with specified initial options from external image url.

Parameters:

NameTypeAttributesDescription
urlstringRequiredurl of image.
namestringRequiredName of created texture. If already exists, -num suffix is added.
optionsObjectOptionalinitial options for texture.
options.encodingstringOptionalTexture encoding, could be 'sRGBEncoding' or 'LinearEncoding'. Default is 'sRGBEncoding'.
options.formatstringOptionalTexture format, could be 'RGBAFormat' or 'RGBFormat'. Default is 'RGBAFormat'.
options.flipYbooleanOptionalIf texture should be flipped by Y axis. Default is true.
options.wrapSstringOptionalTexture wrapping by X axis. Could be 'ClampToEdgeWrapping', 'RepeatWrapping' or 'MirroredRepeatWrapping'. Default is 'RepeatWrapping'.
options.wrapTstringOptionalTexture wrapping by Y axis. Could be 'ClampToEdgeWrapping', 'RepeatWrapping' or 'MirroredRepeatWrapping'. Default is 'RepeatWrapping'.
options.minFilterstringOptionalTexture minifying filter.
options.magFilterstringOptionalTexture magnifying filter.
options.premultiplyAlphabooleanOptionalIf alpha should be premultiplied.
options.extensionstringOptionalTexture file extension to determine texture type if url doesn't contain it.
options.isEquirectangularbooleanOptionalIf texture should be used as panorama environment texture.
callbackcreateTextureFromImageCallbackOptionalCalled after action is completed.

Examples

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

getAvailableTextures

Gets textures that are previously created using createTextureFromImage call.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableTexturesCallbackOptionalCalled after action is completed.

Examples

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

getTextureTransform

Gets texture transform values.

Parameters:

NameTypeAttributesDescription
texturestringRequiredName of texture.
callbackgetTextureTransformCallbackOptionalCalled after action is completed.

Examples

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

changeTextureTransform

Sets specified texture transform values.

Parameters:

NameTypeAttributesDescription
texturestringRequiredName of texture.
transformObjectRequiredtransform values.
transform.offsetUnumberOptionalOffset value by U axis.
transform.offsetVnumberOptionalOffset value by V axis.
transform.repeatUnumberOptionalRepeat value by U axis.
transform.repeatVnumberOptionalRepeat value by V axis.
transform.centerUnumberOptionalCenter value by U axis.
transform.centerVnumberOptionalCenter value by V axis.
transform.rotationnumberOptionalRotation value in degrees.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

resetTextureTransform

Resets transform values for specified texture to default values.

Parameters:

NameTypeAttributesDescription
texturestringRequiredName of texture.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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


Part

hideParts

Hides specified model parts from scene.

Parameters:

NameTypeAttributesDescription
partsArray.<string>RequiredNames of parts.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showParts

Shows parts specified as partObjects on scene.

Parameters:

NameTypeAttributesDescription
partObjectsArray.<Object>RequiredSet specified material on provided parts.
partObjects[].partsArray.<string>RequiredNames of parts.
partObjects[].materialstringOptionalName of material. If specified, it will be set for all parts in partObjects before parts are shown.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showAllParts

Shows all parts on scene.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.showAllParts();

showOnlyParts

Shows only parts specified by partObjects on scene.

Parameters:

NameTypeAttributesDescription
partObjectsArray.<Object>RequiredSet specified material on provided parts.
partObjects[].partsArray.<string>RequiredNames of parts.
partObjects[].materialstringOptionalName of material. If specified, it will be set for all parts in partObjects before parts are shown.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getAvailableParts

Gets available parts.

Parameters:

NameTypeAttributesDescription
callbackgetAvailablePartsCallbackOptionalCalled after action is completed.

Examples

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

getVisibleParts

Gets visible parts on the scene.

Parameters:

NameTypeAttributesDescription
callbackgetVisiblePartsCallbackOptionalCalled after action is completed.

Examples

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

getHiddenParts

Gets hidden parts on the scene.

Parameters:

NameTypeAttributesDescription
callbackgetHiddenPartsCallbackOptionalCalled after action is completed.

Examples

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

isPartVisible

Checks if a part is visible.

Parameters:

NameTypeAttributesDescription
partstringRequiredName of part.
callbackisPartVisibleCallbackOptionalCalled after action is completed.

Examples

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

getPartPosition

Gets part position.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of part.
callbackgetPartPositionCallbackOptionalCalled after action is completed.

Examples

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

getPartRotation

Gets part Rotation.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of part.
callbackgetPartRotationCallbackOptionalCalled after action is completed.
errorObject | nullRequirednull if successful, otherwise error object.
resultArray.<Object>RequiredPart rotation if successful (in XYZ order).

Examples

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

setPartTransformationProperties

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

Parameters:

NameTypeAttributesDescription
namestringRequiredName of part.
positionArray.<number>OptionalPosition value.
rotationArray.<number>OptionalRotation value as quaternion.
scaleArray.<number>OptionalScale value.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getPartCenter

Gets part center.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of part.
callbackgetPartCenterCallbackOptionalCalled after action is completed.

Examples

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


Selection

selectParts

Selects specified parts. Parts must be selectable.

Parameters:

NameTypeAttributesDescription
partsArray.<string>RequiredNames of parts.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

selectAllPartsExcept

Selects all but specified parts. Parts must be selectable.

Parameters:

NameTypeAttributesDescription
partsArray.<string>RequiredNames of parts.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getSelectedParts

Gets currently selected parts.

Parameters:

NameTypeAttributesDescription
callbackgetSelectedPartsCallbackOptionalCalled after action is completed.

Examples

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

getSelectedAnnotations

Gets currently selected annotations.

Parameters:

NameTypeAttributesDescription
callbackgetSelectedAnnotationsOptionalCalled after action is completed.

Examples

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

isPartSelected

Checks if part is selected.

Parameters:

NameTypeAttributesDescription
partstringRequiredName of part.
callbackisPartSelectedOptionalCalled after action is completed.

Examples

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

getSelectable

Gets all selectable objects.

Parameters:

NameTypeAttributesDescription
callbackgetSelectableCallbackOptionalCalled after action is completed.

Examples

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

getSelectableParts

Gets all selectable parts.

Parameters:

NameTypeAttributesDescription
callbackgetSelectablePartsCallbackOptionalCalled after action is completed.

Examples

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

addSelectable

Adds selectable parts.

Parameters:

NameTypeAttributesDescription
partNamesArray.<string>RequiredNames of parts.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

setSelectable

Sets selectable parts.

Parameters:

NameTypeAttributesDescription
partNamesArray.<string>RequiredNames of parts.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

setAllSelectable

Sets all parts as selectable.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.setAllSelectable();


Camera

activateCamera

Sets specified camera as active on scene.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of camera.
preventDefaultbooleanOptionalPrevents camera from jumping to default position when activated. Default is false.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

activateCameraControl

Sets specified camera controls as active on scene.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of camera controls.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

isActiveCamera

Checks if specified camera is active.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of camera.
callbackisActiveCameraCallbackOptionalCalled after action is completed.

Examples

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

isActiveCameraControl

Checks if specified camera controls are active.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of camera controls.
callbackisActiveCameraControlCallbackOptionalCalled after action is completed.

Examples

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

enableAutoRotate

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

Parameters:

NameTypeAttributesDescription
enablebooleanOptionalIf auto rotate is enabled. Default is true.
callbacknoResultCallbackOptionalCalled after action is completed.

setAutoRotateSpeed

Changes speed of current camera auto rotation.

Parameters:

NameTypeAttributesDescription
speednumberOptionalSpeed of rotation. Default is 1.
callbacknoResultCallbackOptionalCalled after action is completed.

getAvailableCameras

Gets available cameras.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableCamerasCallbackOptionalCalled after action is completed.

getCameraPosition

Gets camera position.

Parameters:

NameTypeAttributesDescription
callbackgetCameraPositionCallbackOptionalCalled after action is completed.

setCameraPosition

Sets position of currently active camera.

Parameters:

NameTypeAttributesDescription
positionanyOptionalPosition as array of 3 values. Default is [0, 0, 0].
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getCameraTarget

Gets target of current active camera.

Parameters:

NameTypeAttributesDescription
callbackgetCameraTargetCallbackOptionalCalled after action is completed.

Examples

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

setCameraTarget

Sets target of currently active camera.

Parameters:

NameTypeAttributesDescription
targetanyOptionalTarget as array of 3 values. Default is [0, 0, 0].
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getCameraOptions

Gets camera options for currently active camera.

Parameters:

NameTypeAttributesDescription
callbackgetCameraOptionsCallbackOptionalCalled after action is completed.

Examples

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

setCameraOptions

Sets options for currently active camera.

Parameters:

NameTypeAttributesDescription
numberanyOptionalfov - Field of view, angle of camera view vertically.
numberanyOptionalnear - Near clipping plane distance.
numberanyOptionalfar - Far clipping plane distance.
numberanyOptionalminDistance - Minimum distance that camera can be zoomed in.
numberanyOptionalmaxDistance - Maximum distance that camera can be zoomed out.
callbacknoResultCallbackOptionalCalled after action is completed.

updateCameraToScene

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

Parameters:

NameTypeAttributesDescription
distanceFactoranyOptionalfactor that is multiplied with calculated camera distance, default is 1.0
callbacknoResultCallbackOptionalCalled after action is completed.

resetCameraPosition

Resets camera position.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of camera.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

resetCameraTarget

Resets camera target of active camera.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.resetCameraTarget();

enableCameraControls

Enables camera controls.

Parameters:

NameTypeAttributesDescription
enablebooleanOptionalShould camera controls be enabled, default is true.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.enableCameraControls({ enable : false });

updateCameraControl

Updates camera control.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of camera control.
minAzimuthAnglenumberOptionalMinimum azimuth angle.
maxAzimuthAnglenumberOptionalMaximum azimuth angle.
minPolarAnglenumberOptionalMinimum polar angle.
maxPolarAnglenumberOptionalMaximum polar angle.
panSpeednumberOptionalPan speed.
minDistancenumberOptionalMinimum distance.
maxDistancenumberOptionalMaximum distance.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getRealtimeCameraPosition

Gets camera position realtime position at any given time.

Parameters:

NameTypeAttributesDescription
callbackgetRealtimeCameraPositionCallbackOptionalCalled after action is completed.

updateSceneLayout

Recalculates camera position and target in order to fit selected part or parts within the camera frustum.

Parameters:

NameTypeAttributesDescription
partsArray.<String>RequiredArray of part names to be focused on by the camera.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.updateSceneLayout({ parts: ['part1', 'part2'] });


Viewport

isActiveViewport

Checks if specified viewport is active.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of viewport.
callbackisActiveViewportCallbackOptionalCalled after action is completed.

Examples

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

activateViewport

Sets specified viewport as active.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of viewport.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeBackgroundColor

Changes background color and background opacity of scene.

Parameters:

NameTypeAttributesDescription
viewportstringRequiredName of viewport.
colorstringOptionalBackground color value, default is '#ffffff'.
opacitynumberOptionalBackground opacity, default is 1.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeGlobalEnvMap

Change global environment map.

Parameters:

NameTypeAttributesDescription
textureNamestringRequiredName of previously created environment texture.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

changeGlobalEnvMapIntensity

Change global environment map intensity.

Parameters:

NameTypeAttributesDescription
intensitynumberOptionalIntensity value, default is 1.0.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.changeGlobalEnvMapIntensity({ intensity: 0.5 });

enableGlobalAOMap

Enable global ambient occlusion map.

Parameters:

NameTypeAttributesDescription
enablebooleanOptionalif ambient occlusion map should be enabled, default is true.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.enableGlobalAOMap({ enable: false });


Light

isVisibleLight

Checks if specified light is visible in the scene.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of light.
callbackisVisibleLightCallbackOptionalCalled after action is completed.

Examples

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

showLights

Shows specified lights on the scene.

Parameters:

NameTypeAttributesDescription
lightsArray.<string>RequiredNames of lights.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

hideLights

Hides specified lights on the scene.

Parameters:

NameTypeAttributesDescription
lightsArray.<string>RequiredNames of lights.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showOnlyLights

Shows only specified lights and hides all other lights.

Parameters:

NameTypeAttributesDescription
lightsArray.<string>RequiredNames of lights.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

createLight

Creates a new light entity.

Parameters:

NameTypeAttributesDescription
lightstringRequiredName of the new light entity.
optionsObjectOptionalLight creation options.
options.typestringOptionalType of light to be created ('Directional', 'Hemisphere', 'Spot', etc.)
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.createLight({light: "NewLight", options:{type: "Directional"}}, (e,r)=>console.log(e,r))

updateLight

Updates options of light entity.

Parameters:

NameTypeAttributesDescription
lightstringRequiredName of the light entity.
optionsObjectOptionalLight options.
options.positionArray.<number>OptionalArray of x, y and z values for light position.
options.targetArray.<number>OptionalArray of x, y and z values for light target.
options.colorstringOptionalHex String of the light color.
options.castShadowbooleanOptionalIf custom part casts shadows to other parts (default false).
options.intensitynumberOptionalIntensity of the light.
options.radiusnumberOptionalRadius of the light.

Examples

Unlimited3D.updateLight({light: "Test123", options:{color: "#FF0000"}}, (e,r)=>console.log(e,r))


3D Text

changeTextOptions

Sets 3D text options.

Parameters:

NameTypeAttributesDescription
textNamestringRequiredName of 3D text.
optionsObjectOptionalObject containing specified options.
options.textstringOptionalText content.
options.horAlignmentstringOptionalHorizontal alignment of 3D text.
options.verAlignmentstringOptionalVertical alignment of 3D text.
options.fontUrlstringOptionalurl of TTF font file.
options.sizenumberOptionalSize of 3D text. Mesh scale should be used instead.
options.heightnumberOptionalHeight of 3D text.
options.bevelEnablednumberOptionalIf bevel (smoother edges) is enabled.
options.bevelThicknessnumberOptionalThickness of bevel part of 3D text.
options.bevelSizenumberOptionalSize of bevel part of 3D text.
options.bevelOffsetnumberOptionalOffset of bevel part of 3D text.
options.bevelSegmentsnumberOptionalNumber of segments for bevel part of 3D text.
options.curvePointsArray.<number>OptionalPoints (as 3 numbers each) of curve that 3D text should follow, if it's empty array, curve is not used.
options.curveSegmentsnumberOptionalNumber of segments in 3D text.
options.curveOffsetnumberOptionalOffset of 3D text on the curve, default is 0.
options.curvePreviewbooleanOptionalIf preview of curve with given points is shown.
options.curveRotatenumberOptionalRotation of text on the curve, default is 0.
callbacknoResultCallbackOptionalCalled after action is completed.

getTextInfo

Gets info about specified 3D text geometry.

Parameters:

NameTypeAttributesDescription
textNameanyRequiredName of 3D text.
callbackgetTextInfoOptionalCalled after action is completed.


Custom Part

showCustomParts

Shows custom parts specified as customPartObjects on scene.

Parameters:

NameTypeAttributesDescription
customPartObjectsArray.<Object>RequiredSet specified material on provided custom parts.
customPartObjects[].customPartsArray.<string>RequiredNames of custom parts.
customPartObjects[].materialstringOptionalName of material. If specified, it will be set for all custom parts in customPartObjects before custom parts are shown.
callbacknoResultCallbackOptionalCalled after action is completed.

hideCustomParts

Hides specified custom parts on the scene.

Parameters:

NameTypeAttributesDescription
customPartsArray.<string>RequiredNames of custom parts.
callbacknoResultCallbackOptionalCalled after action is completed.

showOnlyCustomParts

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

Parameters:

NameTypeAttributesDescription
customPartObjectsArray.<Object>RequiredSet specified material on provided custom parts.
customPartObjects[].customPartsArray.<string>RequiredNames of custom parts.
customPartObjects[].materialstringOptionalName of material. If specified, it will be set for all custom parts in customPartObjects before custom parts are shown.
callbacknoResultCallbackOptionalCalled after action is completed.

getAvailableCustomParts

Gets available custom parts.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableCustomPartsCallbackOptionalCalled after action is completed.

setCustomPartTransformationProperties

Parameters:

NameTypeAttributesDescription
namestringRequiredNames of custom part.
optionsObjectOptionalTransform options.
options.positionArray.<number>OptionalPosition of custom part as array of 3 numbers.
options.scaleArray.<number>OptionalScale of custom part as array of 3 numbers.
options.rotationArray.<number>OptionalRotation of custom part as array of 3 numbers.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

createCustomPart

Creates a new custom part.

Parameters:

NameTypeAttributesDescription
customPartstringRequiredName of the new custom part.
optionsObjectOptionalCustom Part creation options.
options.typestringOptionalType of custom part to be created ('Plane', 'Sphere', etc.)
options.materialstringOptionalExisting material to be applied to the new custom part.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.createCustomPart({customPart: "NewCustomPartName", options:{type: "Plane", material: "Default"}}, (e,r)=>console.log(e,r))

updateCustomPart

Updates options of custom part.

Parameters:

NameTypeAttributesDescription
customPartstringRequiredName of the custom part.
optionsObjectOptionalCustom part options.
options.positionArray.<number>OptionalArray of x, y and z values for position.
options.rotationArray.<number>OptionalArray of x, y and z values for rotation.
options.scaleArray.<number>OptionalArray of x, y and z values for scale.
options.frustumCulledbooleanOptionalIf custom part is frustum culled (default true).
options.receiveShadowbooleanOptionalIf custom part receives shadows from the scene (default false).
options.castShadowbooleanOptionalIf custom part casts shadows to other parts (default false).
options.renderOrdernumberOptionalRender order of custom part (default is 0).

Examples

Unlimited3D.updateCustomPart({customPart: "customPartName", options: {position:[0, 0, -0.1]}},(e,r)=>console.log(e,r))


Action

getAvailableTransitions

Gets info about available modifier transitions.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableTransitionsCallbackOptionalCalled after action is completed.

Examples

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

getAvailableModifiers

Gets info about available modifiers.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableModifiersCallbackOptionalCalled after action is completed.

Examples

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

activateModifier

Activates specified modifier.

Parameters:

NameTypeAttributesDescription
modifierstringRequiredName of modifier to activate.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

activateTransition

Activates specified transition.

Parameters:

NameTypeAttributesDescription
transitionstringRequiredName of transition to activate.
targetstringOptionalName of transition target. If not specified, transition will use previously defined target.
durationnumberOptionalDuration of transition in milliseconds.
configObjectOptionalObject containg properties of transition to change depending on transition type. Example: position, scale
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

deactivateTransition

Deactivates transition if it is currently active.

Parameters:

NameTypeAttributesDescription
transitionstringRequiredName of transition to deactivate.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

activateObjectControl

Activates object controls.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.activateObjectControl();

deactivateObjectControl

Deactivates object controls.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.deactivateObjectControl();

updateObjectControls

Updates object controls options.

Parameters:

NameTypeAttributesDescription
modestringOptional'Rotate' or 'Translate', default is 'Rotate'.
targetOnSelectionbooleanOptionalIf target should be changed when part is selected.
minPolarAnglenumberOptionalMinimal vertical angle.
maxPolarAnglenumberOptionalMaximal vertical angle.
minAzimuthAnglenumberOptionalMinimal horizontal angle.
maxAzimuthAnglenumberOptionalMaximal horizontal angle.
dampingFactornumberOptionalDamping factor after dragging.
draggingDampingFactornumberOptionalDamping factor while dragging.
polarRotateSpeednumberOptionalVertical rotate speed.
azimuthRotateSpeednumberOptionalHorizontal rotate speed.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

setObjectControlTarget

Sets target part for object controls.

Parameters:

NameTypeAttributesDescription
targetstringRequiredName of target part.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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


Overlay

activateOverlayControls

Activates overlay controls.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.activateOverlayControls();

deactivateOverlayControls

Deactivates overlay controls.

Parameters:

NameTypeAttributesDescription
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.deactivateOverlayControls();

setActiveOverlayEntryForOverlayControls

Sets active overlay entry for overlay controls.

Parameters:

NameTypeAttributesDescription
overlayEntrystringRequiredName of active overlay entry.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getActiveOverlayEntryForOverlayControls

Gets active overlay entry for overlay controls.

Parameters:

NameTypeAttributesDescription
callbackgetActiveOverlayEntryForOverlayControlsCallbackOptionalCalled after action is completed.

Examples

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

setOverlayEntryFilter

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

Parameters:

NameTypeAttributesDescription
overlayEntryFilterArray.<string> | nullRequiredarray of names of overlay entries or null.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

updateOverlayControls

Updates overlay controls options.

Parameters:

NameTypeAttributesDescription
resolutionnumberOptionalResolution of texture rendered by overlay controls.
targetOnSelectionbooleanOptionalIf target should be changed when part is selected.
frameFillColorstringOptionalColor of frame that represents boundaries of overlay entry.
frameOpacitystringOptionalOpacity of frame that represents boundaries of overlay entry.
frameWidthnumberOptionalWidth of frame that represents boundaries of overlay entry.
showSideBoundsbooleanOptionalIf side bounds for lateral scaling are enabled.
boundFillColorstringOptionalFill color of symbols on the corners of boundaries.
boundStrokeColorstringOptionalStroke color of symbols on the corners of boundaries.
boundScalenumberOptionalScale of symbols on the corners of boundaries.
boundFillScalenumberOptionalScale of fill part of symbols relative to whole symbols on the corners of boundaries.
boundShapestringOptionalShape of bound symbol. Can be 'square' or 'circle'. Default is 'square'.
backgroundColorstringOptionalColor of area for active overlay entry.
backgroundOpacitynumberOptionalOpacity of area for active overlay entry.
colorPickEnabledbooleanOptionalIf color picking trigger is enabled (OverlayControlsColor trigger).
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

setOverlayControlsTarget

Sets overlay controls target part.

Parameters:

NameTypeAttributesDescription
targetstring | nullRequiredtarget part, null to remove existing target.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getOverlaySnapshot

Gets snapshot of overlay with uv map of given part.

Parameters:

NameTypeAttributesDescription
saveEnabledbooleanOptionalIf result image should be saved as file.
outputFileNamestringOptionalFile name of saved image, saveEnabled must be true.
overlaystringRequiredName of overlay for which to create snapshot.
partsArray.<string>OptionalIf present, uv map of parts will be drawn in the background (only one part is currently supported).
resolutionnumberOptionalResolution of created image (for example, 1024)
backgroundColorstringOptionalColor of background of created image.
backgroundOpacitynumberOptionalOpacity of background of created image.
showUVsbooleanOptionalIf uv lines are shown.
showUVEdgesbooleanOptionalIf uv edges are shown.
uvColorstringOptionalColor of uv map of created image.
uvOpacitynumberOptionalOpacity of uv map of created image if present.
uvEdgeColorstringOptionalColor of edges of uv map of created image.
uvEdgeWidthnumberOptionalWidth of uv edge lines.
callbackgetOverlaySnapshotCallbackOptionalCalled after action is completed.

getAvailableOverlays

Gets available overlays.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableOverlaysCallbackOptionalCalled after action is completed.

Examples

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

getPartOverlays

Gets overlays for specified part.

Parameters:

NameTypeAttributesDescription
partstringRequiredPart name.
callbackgetPartOverlaysCallbackOptionalCalled after action is completed.

Examples

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

setOverlayToPart

Sets overlay to specified part.

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay to set.
partstringRequiredPart name.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

setOverlayEntriesToOverlay

Sets overlay entries to overlay.

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay to set entries to.
entriesArray.<string>RequiredArray of overlay entries to be set to overlay (order: back to front).
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.setOverlayEntriesToOverlay({overlay:'overlayName', entries:['overlayEntryName1', 'overlayEntryName2', 'overlayEntryName3']}, (e,r)=>{console.log(e,r)})

removeOverlayFromPart

Removes overlay from specified part.

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay to set.
partstringRequiredPart name.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

updateOverlay

Updates options of overlay.

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay to set.
overlayEntrystringRequiredName of overlay entry to set.
optionsObjectOptionalOverlay options.
options.fontUrlstringOptionalUrl to font to use for overlay text.
options.imageUrlstringOptionalUrl to use as image for overlay.
options.textstringOptionalText to display in overlay.
options.dFontColorstringOptionalColor of text in hex.
options.fontScalenumberOptionalScale of the font. Minimum value 0.0.
options.fontWeightstringOptionalFont Weight. Possible values: 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'.
options.fontSpacingnumberOptionalFont Spacing. Minimum value 1.0.
options.fontStylestringOptionalFont style. Possible values: 'normal' 'italic', 'oblique'.
options.enabledbooleanOptionalIs overlay item enabled.
options.opacitynumberOptionalOpacity of overlay item. Possible values [0.0, 1.0].
options.flipHbooleanOptionalFlips the overlay texture horizontally.
options.flipVbooleanOptionalFlips the overlay texture vertically.
options.scalingModestringOptionalScale overlay values : 'scaleToFit', 'scaleToFill' and 'fill', 'fill' is default value.
options.scalingAlignmentArray.<string>OptionalArray of two values that determines horizontal and vertical alignment of overlay if scaling mode is scaleToFit or scaleToFill. First value should be 'left', 'center' or 'right', second value 'up', 'center' or 'down'.
options.scaleArray.<number>OptionalScale accept two parameters in array, first is on X-axis and Y-axis.
options.tilinganyOptional...
options.repeatanyOptional...
options.paddingnumberOptionalPadding on overlay.
options.offsetArray.<number>OptionalMoves image on object part.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getOverlayConfig

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

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay.
overlayEntrystringRequiredName of overlay entry.
callbackgetOverlayConfigCallbackOptionalCalled after action is completed.

Examples

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

getOverlayOverlayEntries

Gets available overlay entries in specified overlay.

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay.
callbackgetOverlayOverlayEntriesCallbackOptionalCalled after action is completed.

Examples

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

getOverlaysWithOverlayEntry

Gets overlays that contain given overlay entry.

Parameters:

NameTypeAttributesDescription
overlayEntrystringRequiredName of overlay entry.
callbackgetOverlaysWithOverlayEntryCallbackOptionalCalled after action is completed.

Examples

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

getAvailableOverlayEntries

Gets all available overlay entries.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableOverlayEntriesCallbackOptionalCalled after action is completed.

Examples

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

addEntryToOverlay

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

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay to which entry should be added.
overlayEntrystringRequiredName of overlay entry to add.
indexnumberOptionalIndex of the overlay entry.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

removeEntryFromOverlay

Remove entry from overlay.

Parameters:

NameTypeAttributesDescription
overlaystringRequiredName of overlay from which entry should be removed.
overlayEntrystringRequiredName of overlay entry to remove.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

createOverlayEntry

Creates new overlay entry.

Parameters:

NameTypeAttributesDescription
typestringRequiredCan be 'Text' or 'Image'.
namestringRequiredName of overlay entry.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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


Model

getModelPosition

Gets model position.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of model.
callbackgetModelPositionCallbackOptionalCalled after action is completed.

Examples

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

setModelPosition

Sets position of model.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of model.
positionArray.<number>OptionalPosition value.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showModels

Shows specified models.

Parameters:

NameTypeAttributesDescription
modelsArray.<string>RequiredNames of models to show.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

hideModels

Hides specified models.

Parameters:

NameTypeAttributesDescription
modelsArray.<string>RequiredNames of models to hide.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

showOnlyModels

Shows only specified models while the rest are hidden.

Parameters:

NameTypeAttributesDescription
modelsArray.<string>RequiredNames of models to show.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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


Unclassified

cloneModel

Clones given model.

Parameters:

NameTypeAttributesDescription
modelstringRequiredName of the model to be cloned.
callbackcloneModelCallbackRequiredCalled after action is completed, returns cloned model data.

setConfigLogEnabled

Sets if configuration will be logged for upcoming calls.

Parameters:

NameTypeAttributesDescription
valuebooleanRequired


Decoration

activateDecorationOnParts

Activates decoration on parts.

Parameters:

NameTypeAttributesDescription
partsArray.<string>RequiredParts on which to apply decoration.
decorationstringOptionalDecoration to use.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

deactivateDecorationFromParts

Deactivates decoration on parts.

Parameters:

NameTypeAttributesDescription
partsArray.<string>RequiredParts from which to remove decoration.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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


Animation

getAvailableAnimationSets

Gets all available animation sets.

Parameters:

NameTypeAttributesDescription
callbackgetAvailableAnimationSetsCallbackOptionalCalled after action is completed.

Examples

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

getAvailableAnimationStates

Gets all available animation states.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbackgetAvailableAnimationStatesCallbackOptionalCalled after action is completed.

Examples

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

getAvailableAnimationTransitions

Gets all available animation transitions.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbackgetAvailableAnimationTransitionsCallbackOptionalCalled after action is completed.

Examples

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

playAnimationSet

Play animation set.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

stopAnimationSet

Stop animation set.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

isAnimationSetPlaying

Is animation set playing.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbackisAnimationSetPlayingCallbackOptionalCalled after action is completed.

Examples

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

activateAnimationState

Activates animation state.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
animationStatestringRequiredName of animation state.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

activateAnimationTransition

Activates animation transition.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
animationTransitionstringRequiredName of animation transition.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

getCurrentAnimationState

Gets current animation state.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbackgetCurrentAnimationStateCallbackOptionalCalled after action is completed.

Examples

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

getCurrentAnimationTransition

Gets current animation transition.

Parameters:

NameTypeAttributesDescription
animationSetstringRequiredName of animation set.
callbackgetCurrentAnimationStateCallbackOptionalCalled after action is completed.

Examples

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

setMorphTarget

Sets Morph target value for a given model name and morph target name.

Parameters:

NameTypeAttributesDescription
modelStringRequiredName of the target model that contains morph target.
morphTargetStringRequiredName of the morph target whose value needs changing.
valueNumberRequiredValue to be set to this morph target. Values range is 0-1.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.setMorphTarget({ model: 'modelName', morphTarget: 'morphTargetName', value: 0.5 });

getModelMorphTargets

Gets names of morph targets available in a model.

Parameters:

NameTypeAttributesDescription
modelstringRequiredName of model to be queried for morph targets.
callbackgetModelMorphTargetsCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.getModelMorphTargets({ model: 'modelName' }, (error, result) => { console.log(error, result); });

isAnimatedMaterialMap

Checks if material map is animated texture

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material which map is checked.
mapTypestringRequiredType of material map.
callbackisAnimatedMaterialMapCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.isAnimatedMaterialMap({ material: 'materialName', mapType: 'alphaMap' }, (error, result) => { console.log(error, result); });

getAnimatedMaterialMapCurrent

Gets relative value of current frame in [0., 1.] range.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material for which map is queried.
mapTypestringRequiredType of material map.
callbackgetAnimatedMaterialMapCurrentCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.getAnimatedMaterialMapCurrent({ material: 'materialName', mapType: 'alphaMap' }, (error, result) => { console.log(error, result); });

setAnimatedMaterialMapCurrent

Sets relative value of current frame in [0., 1.] range.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material for which map is queried.
mapTypestringRequiredType of material map.
valuenumberRequiredRelative frame value in range [0., 1.]
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.setAnimatedMaterialMapCurrent({ material: 'materialName', mapType: 'alphaMap', value: 0.4 }, (error, result) => { console.log(error, result); });

playAnimatedMaterialMap

Plays animated material map from the current frame.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material for which map is queried.
mapTypestringRequiredType of material map.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.playAnimatedMaterialMap({ material: 'materialName', mapType: 'alphaMap' }, (error, result) => { console.log(error, result); });

pauseAnimatedMaterialMap

Pauses animated material map at the current frame.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material for which map is queried.
mapTypestringRequiredType of material map.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.pauseAnimatedMaterialMap({ material: 'materialName', mapType: 'alphaMap' }, (error, result) => { console.log(error, result); });

stopAnimatedMaterialMap

Stops animated material map and resets current frame.

Parameters:

NameTypeAttributesDescription
materialstringRequiredName of material for which map is queried.
mapTypestringRequiredType of material map.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.stopAnimatedMaterialMap({ material: 'materialName', mapType: 'alphaMap' }, (error, result) => { console.log(error, result); });


Feedback

createFeedbackMarker

Creates new feedback marker.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of feedback marker.
targetNamestringRequiredName of the object on top of which feedback should be created, it can be used to calculate marker size.
targetTypestringRequiredType of the object on top of which feedback should be created, it can be used to calculate marker size.
materialstringOptionalCustom material that will be user instead of single color material.
positionArray.<number>OptionalPosition where marker will be created.
radiusnumberOptionalRadius of marker, how value will be applied depends on radiusMode.
radiusModestringRequiredMode to determine the size of marker.
colorstringRequiredColor of marker material.
callbackcreateFeedbackMarkerCallbackOptionalCalled after action is completed.

Examples

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

removeFeedbackMarker

Removes feedback marker.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of feedback marker.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

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

isFeedbackMarker

Is object with specified name feedback marker.

Parameters:

NameTypeAttributesDescription
namestringRequiredName of feedback marker.
callbackisFeedbackMarkerCallbackOptionalCalled after action is completed.

Examples

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

getAllFeedbackMarkers

Gets names of all available feedback markers.

Parameters:

NameTypeAttributesDescription
callbackgetAllFeedbackMarkersCallbackOptionalCalled after action is completed.

Examples

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


Export & AR

exportToGLB

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

Parameters:

NameTypeAttributesDescription
optionsObjectOptionalExport options.
options.meshNodesArray.<string>OptionalList of mesh nodes to export, otherwise all active nodes are exported.
options.overlaysVisiblebooleanOptionalif overlays are exported.
options.decalsVisiblebooleanOptionalif decals are exported.
options.decalsOffsetFactornumberOptionaloffset factor for decals to avoid z-fighting.
options.convertImagesbooleanOptionalconvertImages to given format, default is false.
options.imageFormatstringOptionalformat of converted images, default is 'png'.
options.imageQualitynumberOptionalquality of converted images, default is 1.0.
options.imageSizeLimitnumberOptionalmaximum size of converted images (size is dimensions for square textures), default is null.
options.flipYtoUVbooleanOptionalflip images based on uv settings, default is false.
options.materialColorToLinearbooleanOptionalconvert material color to linear. Default is true.
callbackexportToGLBCallbackOptionalCalled after action is completed.

getConfigJSON

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

Parameters:

NameTypeAttributesDescription
callbackgetConfigJSONCallbackOptionalCalled after action is completed.

exportToUSDZ

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

Parameters:

NameTypeAttributesDescription
optionsObjectOptionalExport options.
options.meshNodesArray.<string>OptionalList of mesh nodes to export, otherwise all active nodes are exported.
options.overlaysVisiblebooleanOptionalif overlays are exported.
options.decalsVisiblebooleanOptionalif decals are exported.
options.decalsOffsetFactornumberOptionaloffset factor for decals to avoid z-fighting.
callbackexportToUSDZCallbackOptionalCalled after action is completed.

toggleAR

Parameters:

NameTypeAttributesDescription
deviceStringRequiredTarget device. Currently supported options are 'ios' and 'android'.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.toggleAR({ device: 'android' });

xr

Toggles Live Augmented Reality (AR) on the fly. This method generates an AR experience from the configured scene without needing predefined AR files. It supports cross-platform functionality, handling iOS, Android, and desktop devices. The method determines the device type and executes the appropriate AR process.

Parameters:

NameTypeAttributesDescription
optionsObjectOptionalConfiguration options for the AR session.
options.forceDevicestringOptionalManually specifies the device type to be used. Valid values are 'ios', 'android', 'visionpro', and 'desktop'. If not specified, the device type is determined automatically.
options.partsArray.<string>OptionalList of parts to include in the AR session.
options.landingPageObjectOptionalCustomization options for the AR landing page.
options.landingPage.bodyObjectOptionalStyles for the landing page body.
options.landingPage.logoObjectOptionalConfiguration for the landing page logo, including styles.
options.landingPage.spinnerObjectOptionalConfiguration for the landing page spinner, including styles and text styles.
options.landingPage.buttonObjectOptionalConfiguration for the landing page button, including text and styles.
callbackxrCallbackOptionalA callback function that is called upon completion of the AR session.

Examples

// Initiate an AR session on an Android device with specific parts
Unlimited3D.xr({ forceDevice: 'android', parts: ['part1', 'part2'] });

// Initiate an AR session with a customized landing page. URLs for assets need to be public links.
Unlimited3D.xr({
landingPage: {
body: { background: '#fff' },
logo: { styles: { backgroundImage: 'url(./custom-logo.png)' } },
spinner: { styles: { backgroundImage: 'url(./custom-spinner.gif)' } },
button: { text: 'Start AR Experience', styles: { background: '#f00' } }
}
});

getConfigLogEnabled

If configuration is logged for upcoming API calls.



Postprocessing

changeBloomOptions

Changes values for Bloom Postprocessing effect.

Parameters:

NameTypeAttributesDescription
chainNameStringRequiredName of the postprocessing chain to be affected.
optionsStringRequiredObject containing options to be changed as key-value pairs. Allowed keys are 'blIntensity', 'blLuminanceThreshold', 'blLuminanceSmoothing' and 'blRadius'.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.changeBloomOptions({ chainName: 'POST PROCESSING', options: { blIntensity: 3 } } );

changePostprocessingOptions

Changes values Postprocessing chain.

Parameters:

NameTypeAttributesDescription
chainNameStringRequiredName of the postprocessing chain to be affected.
optionsStringRequiredObject containing options to be changed. Options are named in upper case, just like on the platform.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.changePostprocessingOptions({
chainName: 'POST PROCESSING',
options: {
"DOF": {
Enabled: true,
FocalLength: 1
},
"COLOR ADJUSTMENT": {
Enabled: false,
}
},
}, (error, result) => { console.log(error, result) });

enablePostProcessing

Enable or disable postprocessing.

Parameters:

NameTypeAttributesDescription
enablebooleanOptionalif ambient occlusion map should be enabled, default is true.
callbacknoResultCallbackOptionalCalled after action is completed.

Examples

Unlimited3D.enablePostProcessing({ enable: false });