Static
startStatic
startStatic
startStatic
stopStatic
diffStatic
diffStatic
diffStatic
diffStatic
diffLoad comparator model for compare tool This returns a promise which will be resolved when the comparator model is loaded
teamspace
model ID
Specific revision ID/tag to load
returns a promise that resolves upon comparator model finished loading.
Static
diffStatic
diffStatic
diffStatic
diffStatic
diffStatic
diffStatic
diffStatic
ResetStatic
disableStatic
disableStatic
disableStatic
enableStatic
enableStatic
enableStatic
enableStatic
hideStatic
initInitialise Unity.
function to call when an error occurs. This function should take a string(message), boolean(requires reload), boolean(came from unity).
Static
loadLoading another model. NOTE: this will also clear the canvas of existing models Use branch = master and revision = head to get the latest revision. If you want to know when the model finishes loading, use [[onLoaded]]
name of teamspace
name of model
ID of the branch (deprecated value)
ID of revision
returns a promise that resolves when the model start loading.
Static
loadLaunch the Unity Game. *
the html dom of the unity canvas
host server URL (e.g. https://www.3drepo.io)
returns a promise which resolves when the game is loaded.
Static
offStatic
resetStatic
setAPIHostSet API host urls. This is needs to be called before loading model.
list of API names to use. (e.g ["https://api1.www.3drepo.io/api/"])
Static
setAPIKeyStatic
setStatic
setStatic
setStatic
setStatic
setStatic
setStatic
showStatic
toggleStatic
quitStatic
addStatic
mapStatic
mapStatic
mapStatic
removeStatic
resetStatic
clearStatic
disableStatic
disableStatic
disableStatic
enableStatic
enableStatic
enableStatic
setStatic
setStatic
disableStatic
getGet Object Status within the viewer. This will return you the list of objects that are currently set invisible, and a list of object that are currently highlighted.
The object status will be returned via the promise provided.
name of teamspace
name of the model
Static
hideStatic
moveMove mesh/meshes by a given transformation matrix. NOTE: this currently only works as desired in Synchro Scenarios
teamspace of the model
modelID the meshes belongs in
array of mesh unique IDs
array of 16 numbers, representing the transformation on the meshes (row major)
Static
requestStatic
requestStatic
resetMove mesh/meshes by a given transformation matrix. NOTE: this currently only works as desired in Synchro Scenarios
teamspace of the model
modelID the meshes belongs in
array of mesh unique IDs
Static
setSets the navigations interaction off
Static
setSets the navigations interaction on
Static
setStatic
setStatic
setStatic
setXRayStatic
setXRayStatic
showStatic
toggleStatic
updateUpdate the clipping plane to the given direction teamspace and model is only needed if the viewpoint is relative to a model Clipping plane is defined by the plane normal, distance from origin and it's direction direction = -1 means it will clip anything above the plane, 1 otherwise.
object containing the clipping plane
if set to true, A callback to [[viewer]].clipBroadcast will be called after it is set.
Optional
account: stringname of teamspace
Optional
model: stringname of model
UnityUtil.updateClippingPlanes([{normal : [0,-1,0], distance: 10, clipDirection: -1}], false)
Static
zoomStatic
backStatic
bottomStatic
centreStatic
frontStatic
helicopterStatic
helicopterStatic
helicopterStatic
leftStatic
resetStatic
rightStatic
setSet navigation mode.
This can be either "HELICOPTER" or "TURNTABLE"
Static
setChange the camera configuration teamspace and model is only needed if the viewpoint is relative to a model
3D point in space where the camera should be
Up vector
forward vector
point in space the camera is looking at. (pivot point)
Optional
projectionType: booleanOptional
orthographicSize: numberOptional
account: stringname of teamspace
Optional
model: stringname of model
Static
topStatic
clearStatic
highlightHighlight objects
name of teamspace
name of model
array of unique IDs associated with the objects to highlight
RGB value of the highlighting colour
If set to true, existing highlighted objects will stay highlighted. Also any objects that are already highlighted will be unhighlighted
If set to true, existing highlighted objects will be forced to re-highlight itself. This is typically used for re-colouring a highlight ] or when you want a specific set of objects to stay highlighted when toggle mode is on
Static
overrideOverride the colour of given object(s)
teamspace the meshes resides in
model ID the meshes resides in
unique IDs of the meshes to operate on
RGB value of the override color (note: alpha will be ignored)
Static
overrideOverride the alpha value of given object(s) If you are setting opacity to 0, use toggleVisibility instead.
teamspace the meshes resides in
model ID the meshes resides in
unique IDs of the meshes to operate on
opacity (>0 - 1) value to override with
Static
resetStatic
resetStatic
startStatic
stopStatic
unhighlightStatic
unityA URL containing the subfolder under unityUrl where the Unity build and its associated dependencies can be found. This should usually be set to "/unity/Build"
Static
unityContains a list of calls to make during the Unity Update method. One call is made per Unity frame.
Static
usingStatic
verboseStatic
viewerviewer can be assigned, containing any callback function the user wishes to hook onto. The following functions are supported:
viewer.clipBroadcast(object): Called when a clipping plane broadcast occurs with the new clipping plane information
viewer.numClipPlanesUpdated(int): Called when the number of clipping planes changed, with the latest number of clipping planes in place
viewer.objectSelected(object): Notify the user which object/pin is clicked after a mouse event
viewer.objectsSelected(object): Notify the user which objects is selected after a rectangular select event
viewer.pickPointEvent(object): Notify the user what position within the 3D world was clicked after a mouse event.
UnityUtil.viewer = {
numClipPlanesUpdated = (nPlanes) => console.log(`Current no. planes: ${nPlanes}`}
Static
addStatic
Private
clearStatic
clearStatic
createStatic
deselectStatic
deselectStatic
hideStatic
hideStatic
onStatic
onStatic
onStatic
onStatic
pauseStatic
resumeStatic
selectStatic
selectStatic
setStatic
setStatic
setStatic
setStatic
setStatic
setStatic
setStatic
setStatic
setStatic
setStatic
showStatic
showStatic
unityStatic
useStatic
useStatic
zoomStatic
changeStatic
dropAdd a bookmark pin
Identifier for the pin
point in space where the pin should generate
normal vector for the pin (note: this is no longer used)
RGB value for the colour of the pin
Static
dropAdd an issue pin
Identifier for the pin
point in space where the pin should generate
normal vector for the pin (note: this is no longer used)
RGB value for the colour of the pin
Static
dropAdd a Risk pin
Identifier for the pin
point in space where the pin should generate
normal vector for the pin (note: this is no longer used)
RGB value for the colour of the pin
Static
removeStatic
setStatic
setStatic
setSets the three parameters that control the fade in and out of the Supermesh bounding boxes based on camera distance
how quickly the bounds fade-in with respect to the distance from the camera (to the far plane). (Does not have to be between 0 and 1 - making it larger will make the fade in more gradual.)
distance from the far plane that the bounds should start to fade out. When this is zero the bounds will not fade out. Should otherwise be above 1.
how sharply the fade out occurs
UnityUtil.SetStreamingBundlesFade(0.7,1.6,5);
Static
setStatic
setStatic
setStatic
setStatic
setStatic
setThe amount of space the geometry streaming should leave in the unmanaged heap. The unmanaged heap is not measured directly, but considered to be the space between the top of the Unity heap (typically 2Gb) and the top of the managed heap. (The available space for geometry will shrink dynamically as the managed heap grows, always leaving thresholdInMb available to Unity for other uses).
Generated using TypeDoc
Start clip editing in box mode