Skip to content

Group 分组 ​

安装 ​

sh
npm install @poggi/geography-entity
pnpm add @poggi/geography-entity
yarn add @poggi/geography-entity

基本用法 ​

通过Group构建一个分组,便于统一管理实体的显示与销毁

loading

API ​

Attributes ​

属性名说明类型默认值
properties自定义数据集any-
children子集(Entity | BaseEntity | SingleEntity)[]-

methods ​

constructor(container: Container)

构造函数

addChild(child: Entity | BaseEntity | SingleEntity):string

添加子集(返回唯一编号)

lookAtChild(uuid: string, offset?: HeadingPitchRange, height?: number)

根据唯一编号,观看某个子集

setChildVisible(uuid: string, visible: boolean)

根据唯一编号,设置某个子集的显示状态

setVisible(visible: boolean)

设置显示状态

destroy()

销毁

destroyChild(uuid: string)

根据唯一编号,销毁某个子集