Class FillExtrusionsEntity

拉伸实体

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

_app?: App
_bloomRef: Ref<boolean>

是否辉光

_boxHelperObject: BoxHelper
_boxHelperRef: Ref<boolean>

是否显示包围盒

_childrens: Entity[] = []
_destroyed: boolean = false
_isDisposed?: boolean

是否已销毁

_matrixRef: Matrix4

本地矩阵响应式对象

_matrixWorldRef: Matrix4

世界矩阵响应式对象

_node: Object3D<Object3DEventMap>
_outlineRef: Ref<boolean>

是否描边效果

_ownerScene?: Scene
_pointerEventsRef: Ref<boolean>
_positionRef: Vector3

位置响应式对象

_quaternionRef: Quaternion

四元数响应式对象

_rayIntersectRecursive?: boolean

拾取时是否遍历子对象 默认为true

_rayQueryType?: RayQueryType

射线查询类型 默认为1

_rotationRef: Euler

旋转响应式对象

_scaleRef: Vector3

缩放响应式对象

_sceneData?: Record<string, any> = {}
_selectedRef: Ref<boolean>

是否选中

_visualRef: Ref<boolean>

可视响应式对象

clearHighlight: (() => void)

清除所有高亮

Type declaration

    • (): void
    • 清除所有高亮

      Returns void

Returns

data: ShallowReactive<{
    [key: string]: any;
}> = ...

Type declaration

  • [key: string]: any
entityType: string = "Entity"

实体类型

extData: {
    [key: string]: any;
} = {}

Type declaration

  • [key: string]: any
getBorderPolyline: (() => LineSegments2)

获取拉伸边框对象

Type declaration

    • (): LineSegments2
    • 获取拉伸边框对象

      Returns LineSegments2

getData: (() => FillExtrusionItemData[])

获取数据

Type declaration

getFillExtrusions: (() => Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>)

获取拉伸对象

Type declaration

    • (): Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
    • 获取拉伸对象

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

getItemDataByFaceIndex: ((faceIndex, isRefData?) => {
    positionIndex: number;
} & FillExtrusionItemData)

通过faceIndex获取

Type declaration

    • (faceIndex, isRefData?): {
          positionIndex: number;
      } & FillExtrusionItemData
    • 通过faceIndex获取

      Parameters

      • faceIndex: number

        索引

      • Optional isRefData: boolean

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

      Returns {
          positionIndex: number;
      } & FillExtrusionItemData

Param: faceIndex

索引

Param: isRefData

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

getVertexData: ((isGetAll?) => SymbolItemData[])

获取顶点数据

Type declaration

getVertexSymbol: (() => SymbolEntity)

获取顶点对象

Type declaration

instanceId: number = ++AppObject._instanceIdCounter
isEntity: boolean = true
isItemHighlight: ((id) => boolean)

获取某项高亮与否

Type declaration

    • (id): boolean
    • 获取某项高亮与否

      Parameters

      • id: string

        id

      Returns boolean

Param: id

id

Returns

isShowVertex: (() => boolean)

是否显示顶点

Type declaration

    • (): boolean
    • 是否显示顶点

      Returns boolean

moduleManager: ModuleManager = ...
onSetApp: Signal = ...
options: EntityOptions
rayIntersectObject?: Object3D<Object3DEventMap>

拾取时实体对象,默认为entity.node

refreshHighlight: (() => void)

刷新高亮数据

Type declaration

    • (): void
    • 刷新高亮数据

      Returns void

setData: ((data) => void)

修改数据

Type declaration

setDepths: ((data) => void)

设置每项的拉伸后的深度、颜色、透明度值

Type declaration

    • (data): void
    • 设置每项的拉伸后的深度、颜色、透明度值

      Parameters

      • data: {
            color2?: ColorRepresentation;
            depth?: number;
            index: number;
            opacity?: number;
        }[]

      Returns void

Returns

setItemHighlight: ((id, ishighlight?, disableAutoRefreshData?) => void)

设置某项高亮与否

Type declaration

    • (id, ishighlight?, disableAutoRefreshData?): void
    • 设置某项高亮与否

      Parameters

      • id: string

        id

      • Optional ishighlight: boolean

        是否

      • Optional disableAutoRefreshData: boolean

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

      Returns void

Param: id

id

Param: ishighlight

是否

Param: disableAutoRefreshData

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

Returns

setShowVertex: ((show, symbolStyleOptions?) => void)

设置是否显示顶点

Type declaration

    • (show, symbolStyleOptions?): void
    • 设置是否显示顶点

      Parameters

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

          像素大小拾取

        • Optional style?: SymbolMaterialProps

          样式

        • Optional useBvh?: boolean

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

      Returns void

signal: {
    onAdd: Signal;
    onBeforeAdd: Signal;
    onBeforeRemove: Signal;
    onKeyDown: Signal;
    onKeyUp: Signal;
    onMouseClick: Signal;
    onMouseDblClick: Signal;
    onMouseDown: Signal;
    onMouseEnter: Signal;
    onMouseLeave: Signal;
    onMouseMove: Signal;
    onMouseOut: Signal;
    onMouseOver: Signal;
    onMouseUp: Signal;
    onMouseWheel: Signal;
    onPointerDown: Signal;
    onPointerMove: Signal;
    onPointerUp: Signal;
    onRayIntersect: Signal;
    onRemove: Signal;
} = ...

Type declaration

updateHightStyle: ((style) => void)

更新高亮样式

Type declaration

    • (style): void
    • 更新高亮样式

      Parameters

      • style: MeshBasicMaterialParameters

      Returns void

updateStyle: ((style) => void)

更新样式

Type declaration

    • (style): void
    • 更新样式

      Parameters

      • style: MeshBasicMaterialParameters

      Returns void

uuid: string = ...
defaultModules: (EntityModuleConstructor | [EntityModuleConstructor, any])[] = []

Accessors

  • get app(): App
  • Returns App

  • set app(value): void
  • Parameters

    Returns void

  • get bloom(): boolean
  • Returns boolean

  • set bloom(val): void
  • Parameters

    • val: boolean

    Returns void

  • get bloomRef(): Ref<boolean>
  • Returns Ref<boolean>

  • get boxHelperRef(): Ref<boolean>
  • Returns Ref<boolean>

  • get castShadow(): boolean
  • Returns boolean

  • set castShadow(val): void
  • Parameters

    • val: boolean

    Returns void

  • get childrens(): Entity[]
  • Returns Entity[]

  • set childrens(child): void
  • Parameters

    Returns void

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

    Returns boolean

  • get frustumCulled(): boolean
  • Returns boolean

  • set frustumCulled(val): void
  • Parameters

    • val: boolean

    Returns void

  • get isDisposed(): boolean
  • Returns boolean

  • get matrix(): Matrix4
  • Returns Matrix4

  • get matrixWorld(): Matrix4
  • Returns Matrix4

  • get node(): Object3D<Object3DEventMap>
  • Returns Object3D<Object3DEventMap>

  • set node(obj): void
  • Parameters

    • obj: Object3D<Object3DEventMap>

    Returns void

  • get outline(): boolean
  • Returns boolean

  • set outline(val): void
  • Parameters

    • val: boolean

    Returns void

  • get outlineRef(): Ref<boolean>
  • Returns Ref<boolean>

  • get parent(): Entity
  • Returns Entity

  • set parent(val): void
  • Parameters

    Returns void

  • get pointerEvents(): boolean
  • Returns boolean

  • set pointerEvents(b): void
  • Parameters

    • b: boolean

    Returns void

  • get pointerEventsRef(): Ref<boolean>
  • Returns Ref<boolean>

  • get position(): Vector3
  • Returns Vector3

  • get quaternion(): Quaternion
  • Returns Quaternion

  • get rayIntersectRecursive(): boolean
  • Returns boolean

  • set rayIntersectRecursive(b): void
  • Parameters

    • b: boolean

    Returns void

  • get rayQueryType(): RayQueryType
  • Returns RayQueryType

  • set rayQueryType(b): void
  • Parameters

    Returns void

  • get receiveShadow(): boolean
  • Returns boolean

  • set receiveShadow(val): void
  • Parameters

    • val: boolean

    Returns void

  • get rotation(): Euler
  • Returns Euler

  • get scale(): Vector3
  • Returns Vector3

  • get selected(): boolean
  • Returns boolean

  • set selected(val): void
  • Parameters

    • val: boolean

    Returns void

  • get selectedRef(): Ref<boolean>
  • Returns Ref<boolean>

  • get visible(): boolean
  • Returns boolean

  • set visible(val): void
  • Parameters

    • val: boolean

    Returns void

  • get visibleRef(): Ref<boolean>
  • Returns Ref<boolean>

Methods

  • 增加模块,如果模块已存在,则返回之前的模型,等同于this.addModule(xxx)

    Type Parameters

    Parameters

    • type: (new (entity?, obj?) => T)
        • new (entity?, obj?): T
        • Parameters

          • Optional entity: any
          • Optional obj: U

          Returns T

    • Optional params: U

    Returns T

  • 增加一个自定义动作脚本

    Parameters

    • func: ((context) => void | BehaviorStatus)

      脚本函数

        • (context): void | BehaviorStatus
        • Parameters

          • context: {
                elapsed: number;
                entity: Entity;
                timeDelta: number;
                [key: string]: any;
            }
            • [key: string]: any
            • elapsed: number
            • entity: Entity
            • timeDelta: number

          Returns void | BehaviorStatus

    • Optional id: string

      脚本id

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • cb: Function

    Returns void

  • 增加模型边框线

    Parameters

    • Optional option: LineBasicMaterialParameters
    • Optional isHideMesh: boolean

      是否隐藏mesh本身(默认false)

    Returns void

  • 增加模块,如果模块已存在,则返回之前的模型,等同于this.add(xxx)

    Type Parameters

    Parameters

    • type: (new (entity?, obj?) => T)

      模块类

        • new (entity?, obj?): T
        • Parameters

          • Optional entity: any
          • Optional obj: U

          Returns T

    • Optional params: U

      参数

    Returns T

  • Parameters

    • objs: Object3D<Object3DEventMap> | Object3D<Object3DEventMap>[]

    Returns void

  • Parameters

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

    Returns void

  • 调用模块中的函数

    Parameters

    • methodName: string
    • Rest ...args: any

    Returns void

  • 移除模型边框线

    Returns void

  • Destroy self.

    Returns void

  • 触发指定事件名称.

    Parameters

    • event: string

      Event name

    • Rest ...data: any

      Data

    Returns boolean

    • Whether the dispatching is successful
  • Parameters

    • fn: (() => any)
        • (): any
        • Returns any

    Returns void

  • 返回注册的所有事件名.

    Returns string[]

    所有事件名

  • 获取物体的外包盒

    Parameters

    • Optional inLocalSpace: boolean

      局部空间

    • Optional mapModeSceneSpace: boolean

      地图模式下返回场景空间坐标

    Returns Box3

  • 获取模块

    Type Parameters

    Parameters

    • type: (new (entity?, obj?) => T)

      模型类型

        • new (entity?, obj?): T
        • Parameters

          • Optional entity: any
          • Optional obj: U

          Returns T

    Returns T

  • Parameters

    • id: string

    Returns Object3D<Object3DEventMap>

  • Parameters

    • name: string

    Returns Object3D<Object3DEventMap>

  • Parameters

    • name: string
    • value: string

    Returns Object3D<Object3DEventMap>

  • Parameters

    • uuid: string

    Returns Object3D<Object3DEventMap>

  • Parameters

    • name: string

    Returns Object3D<Object3DEventMap>[]

  • Parameters

    • name: string
    • value: string

    Returns Object3D<Object3DEventMap>[]

  • 确定是否存在事件侦听

    Parameters

    • event: string

      事件名

    Returns boolean

    返回是否存在相应的事件

  • 判断实体是否是mesh实体或包含mesh实体模块

    Returns boolean

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

    Parameters

    • event: string

      Event name

    Returns number

    The count of listeners

  • 移除监听.

    Parameters

    • event: string

      Event name

    • Optional fn: Function

      Function, If is undefined, delete all corresponding event listeners.

    Returns EventDispatcher

  • Parameters

    • callback: ((app) => void)
        • (app): void
        • Parameters

          Returns void

    Returns void

  • 移除一个自定义动作脚本

    Parameters

    • id: string

      脚本id

    Returns void

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

    Parameters

    • Optional event: string

      Event name, delete all events if not passed

    Returns void

  • 移除模块

    Type Parameters

    Parameters

    • type: (new (entity?, obj?) => T)

      模型类型

        • new (entity?, obj?): T
        • Parameters

          • Optional entity: any
          • Optional obj: U

          Returns T

    Returns void

  • Parameters

    • objs: Object3D<Object3DEventMap> | Object3D<Object3DEventMap>[]

    Returns void

  • 替换材质

    Parameters

    • material: Material | Material[]

    Returns void

  • 设置高亮

    Parameters

    • Optional color: ColorRepresentation
    • Optional opacity: number

    Returns void

  • 设置透明度

    Parameters

    • opacity: number

      透明度0(完全透明)-1(不透明)

    • Optional isAccOpacity: boolean

      是否累加透明度(ture和之前透明度相乘,false直接设置透明度)

    Returns void

  • Parameters

    • callback: ((ent) => any)
        • (ent): any
        • Parameters

          Returns any

    • Optional filter: ((ent) => boolean)
        • (ent): boolean
        • Parameters

          Returns boolean

    Returns void

  • Parameters

    • callback: ((ent) => any)
        • (ent): any
        • Parameters

          Returns any

    • Optional filter: ((ent) => boolean)
        • (ent): boolean
        • Parameters

          Returns boolean

    Returns void

  • 给一个已加入场景中的对象关联一个实体

    Parameters

    • obj: Object3D<Object3DEventMap>

      已加入场景中的对象

    • Optional splitSubEntity: boolean

      是否把子对象拆成子实体 (默认false)

    • Optional overwriteEntity: boolean

      当有关联的实体时,重新再生成一个实体相关联 (默认false)

    • Optional app: App

      应用对象,默认用当前的

    Returns Entity

  • Parameters

    • json: Record<string, any>
    • objects: Map<string, Object3D<Object3DEventMap>>

    Returns Entity

  • 通过一个或多个object3d对象创建一个实体

    Parameters

    • objs: Object3D<Object3DEventMap> | Object3D<Object3DEventMap>[]

    Returns Entity

  • 通过一个obejct获取所属的实体

    Parameters

    • object: Object3D<Object3DEventMap>

      物体对象

    • Optional canChildEntity: boolean

      是否获取到子实体。默认false. false的话表示获取的是最上级的实体对象。true获取的是所属的子实体对象

    Returns Entity