您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

README.md 2.8KB


Tools 🌎

Auxiliary tools in 3D scenes to facilitate various measurements and markings in the scene

DC.Plot

PLot Tool

example

let plot = new DC.Plot(viewer, {})
plot.draw(DC.OverlayType.POINT, (overlay) => {}, {})

creation

  • constructor(viewer,[options])

    • parameters
    • {Viewer} viewer:场景
    • {Object} options:属性
    • returns plot
// options(optional)
{
  "icon_center": "**.png",
  "icon_anchor": "**.png",
  "icon_midAnchor": "**.png",
  "icon_size": [12, 12],
  "clampToModel":false
}

methods

  • draw(type,callback,[style],[clampToModel])

    • parameters
    • {String} type OverlayType
    • {Function} callback
    • {Object} style
    • {Boolean} clampToModel: Whether the point gets the surface coordinates, if false, it will get the current 3D coordinates of the mouse
    • returns this
  • edit(overlay,callback,[clampToModel])

    • parameters
    • {Overlay} overlay
    • {Function} callback
    • {Boolean} clampToModel: Whether the point gets the surface coordinates, if false, it will get the current 3D coordinates of the mouse
    • returns this
  • stop()

    • returns this

DC.PositionEditor

Position Editor Tool

example

let positionEditor = new DC.PositionEditor(viewer)

creation

  • constructor(viewer,[options])

    • parameters
    • {Viewer} viewer
    • {Object} options
    • returns positionEditor
// options(optional)
{
  "arrow": true, // whether the auxiliary axis is an arrow
  "width": 8, // auxiliary axis width
  "depthFail": true, // whether the auxiliary axis supports depth test
  "axisLineScale": 1 // auxiliary axis scale
}

properties

  • {Overlay} overlay readonly

methods

  • activate(type, callback)

    • parameters
    • {String} type
    • {Function} callback parameter :position
    • returns this
  • deactivate()

    • returns this

DC.ModelManager

Model Manager Tool

example

let manager = new DC.ModelManager(viewer, layer.getOverlays())

creation

  • constructor(viewer,models,[options])

    • parameters
    • {Viewer} viewer
    • {Array} models
    • {Object} options
    • returns manager
// options(optional)
{
  "disappearHeight": 1000,
  "disappearSeconds": 0.5,
  "appearSeconds": 0.5
}

properties

  • {Array} models

methods

  • spread(height, seconds)

    • parameters
    • {Number} height
    • {Number} seconds
    • returns this
  • combine(seconds)

    • parameters
    • {Number} seconds
    • returns this
  • showModel(modelIndex)

    • parameters
    • {Number} modelIndex
    • returns this
  • restore()

    • returns this