Class GlLinesModule

webgl线模块,用来绘制批量线(没有线宽)

Hierarchy (view full)

Implements

Constructors

Properties

_app?: App
_destroyed: boolean = false
appRenderIndex: number = 0
entity: Entity
extData: {
    [key: string]: any;
} = {}

Type declaration

  • [key: string]: any
gllines: Line<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
highlightData: GlLineItemData[]
highlightGlLines: Line<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
highlightIndexMap: Map<string, number> = ...
highlightStyle: LineBasicMaterialParameters | LineDashedMaterialParameters
instanceId: number = ++AppObject._instanceIdCounter
onSetApp: Signal = ...
posIndex: Map<number, {
    lineIndex: number;
    positionIndex: number;
}> = ...

Type declaration

  • lineIndex: number
  • positionIndex: number
showVertex: boolean
style: LineBasicMaterialParameters | LineDashedMaterialParameters
vertexEntity: SymbolEntity
vertexStyle?: SymbolMaterialProps & {
    pointBorderColor?: ColorRepresentation;
    pointColor?: ColorRepresentation;
    pointSize?: number;
}

Type declaration

  • Optional pointBorderColor?: ColorRepresentation
  • Optional pointColor?: ColorRepresentation
  • Optional pointSize?: number
moduleName: string = "GlLinesModule"

Accessors

  • get app(): App
  • Returns App

  • set app(value): void
  • Parameters

    Returns void

  • get destroyed(): boolean
  • Whether it has been destroyed.

    Returns boolean

  • get enabled(): boolean
  • Indicates whether the component is enabled.

    Returns boolean

  • set enabled(value): void
  • Parameters

    • value: boolean

    Returns void

Methods

  • Parameters

    • toClassInst: any
    • Optional methodNames: string[]
    • Optional addMethods: string[]
    • Optional filterName: string[]

    Returns void

  • 清除所有高亮

    Returns void

  • 触发指定事件名称.

    Parameters

    • event: string

      Event name

    • Rest ...data: any

      Data

    Returns boolean

    • Whether the dispatching is successful
  • 获取线对象

    Returns Line<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>

  • 通过Index获取

    Parameters

    • index: number

      索引

    • Optional isRefData: boolean

      返回的是否是数据引用的对象,默认false,将克隆新的数据

    Returns {
        data: GlLineItemData;
        positionIndex: number;
    } | {
        color?: ColorRepresentation | ColorRepresentation[];
        coordinates: [number, number, number][];
        data: undefined;
        id?: string;
        positionIndex: number;
        showVertex?: boolean;
    }

  • 确定是否存在事件侦听

    Parameters

    • event: string

      事件名

    Returns boolean

    返回是否存在相应的事件

  • 获取某项高亮与否

    Parameters

    • id: string

      id

    Returns boolean

  • 是否显示顶点

    Returns boolean

  • 返回具有指定事件名称的侦听总数.

    Parameters

    • event: string

      Event name

    Returns number

    The count of listeners

  • 刷新高亮数据

    Returns void

  • 通过事件名移除所有监听.

    Parameters

    • Optional event: string

      Event name, delete all events if not passed

    Returns void

  • 修改数据

    Parameters

    Returns void

  • 设置某项高亮与否

    Parameters

    • id: string

      id

    • Optional ishighlight: boolean

      是否

    • Optional disableAutoRefreshData: boolean

      不自动刷新,需要调用 refreshHighlight 来刷新

    Returns void

  • 设置是否显示顶点

    Parameters

    • show: boolean
    • Optional symbolStyleOptions: {
          pixelRaycasting?: boolean;
          style?: SymbolMaterialProps;
          useBvh?: boolean;
      }
      • Optional pixelRaycasting?: boolean

        像素大小拾取

      • Optional style?: SymbolMaterialProps

        样式

      • Optional useBvh?: boolean

        是否使用bvh射线查询。默认是

    Returns void

  • Returns {
        app: App;
        children: {
            getValue: (() => boolean);
            label: string;
            setValue: ((v) => void);
            type: string;
        }[];
        expanded: boolean;
        label: string;
        type: string;
    }

    • app: App
    • children: {
          getValue: (() => boolean);
          label: string;
          setValue: ((v) => void);
          type: string;
      }[]
    • expanded: boolean
    • label: string
    • type: string
  • 更新高亮样式

    Parameters

    • style: LineBasicMaterialParameters | LineDashedMaterialParameters

    Returns void

  • 更新样式

    Parameters

    • style: LineBasicMaterialParameters | LineDashedMaterialParameters

    Returns void