Model

This is the core class to represent the geometry.

new Model(modelData: any)
Parameters
modelData (any)
Instance Members
getRoot()
getRootId()
getBoundingBox()
getUpVector()
is2d()
isLoadDone()
isObjectTreeCreated()
getProperties(dbId, onSuccessCallback, onErrorCallback)
getCategories(onSuccessCallback, onErrorCallback)
getLevels(onSuccessCallback, onErrorCallback)
queryElements(filter, onSuccessCallback, onErrorCallback)
getObjectTree(onSuccessCallback, onErrorCallback)
search(text, onSuccessCallback, onErrorCallback, attributeNames?)

Viewer3D

This is the base class for all viewer implementations. It contains everything that is needed to connect to the viewing service and display 3D models. It also includes basic navgiation support, and context menu and extension APIs.

new Viewer3D(container: HTMLElement, config: object)
Parameters
container (HTMLElement) The viewer container. - viewer容器,一般是div盒
config (object) The initial settings object. - 关于初始设置的对象
Name Description
config.startOnInitialize boolean (default true) Set this to false if you want to defer the run to a later time by calling run() explicitly. - 如果想通过手动调用run()以推迟渲染的话,设置config.startOnInitialize为false
Properties
navigation (Navigation) : The Navigation api object.
toolController (ToolController) : The ToolController object.
utilities (ViewingUtilities) : The ViewingUtilities object.
Instance Members
initialize()
finish()
getModelById(id, fileId)
load(svfURN, options?, onSuccessCallback?, onErrorCallback?, group?, traversInto)
unloadModel(model, tearDownOnLastOne)
resize()
getCamera()
getState(filter?)
restoreState(viewerState, filter?, immediate?)
getProperties(dbid, model, onSuccessCallback?, onErrorCallback?)
search(text, onSuccessCallback, onErrorCallback, attributeNames?)
getHiddenNodes()
getIsolatedNodes()
inspect(node, bound, ifSelect, model)
isolate(node, model, modelSpecific, 模型对象, 设置为true的时候)
isolateWithoutGhosting(node, model, modelSpecific)
setBackgroundColor(red, green, blue, red2, green2, blue2)
toggleSelect(dbid, model)
select(dbids, model, noteOnly, models)
clearSelection()
getSelectionVisibility()
getSelectionCount(model, dbids)
setSelectionMode(mode)
getSelection()
getAggregateSelection(callback)
hide(node, model)
show(node, model)
showAll()
hideAll()
toggleVisibility(node, model)
areAllVisible()
setGhosting(value)
setClearView(value)
setProgressiveRendering(value)
getFOV()
setFOV(degrees)
fitToView(objectIds?)
isAllModelLoadDone(modelArr)