new EntityGroup(entities, position)
定义一个实体组
更改entities中每个实体的indexInEntityGroup为该实体在实体组内的编号
| Name | Type | Description |
|---|---|---|
entities | Array.<Box3Entity> | 实体组内的实体 |
position | Box3Vector3 | 实体组中心位置 |
- Source
Members
entities :Array.<Box3Entity>
实体组内的实体
- Array.<Box3Entity>
- Source
position :Box3Vector3
实体组中心位置
- Box3Vector3
- Source
entities :Array.<Box3Entity>
实体组内的实体
- Array.<Box3Entity>
- Source
position :Box3Vector3
实体组中心位置
- Box3Vector3
- Source
Methods
adjustmentEntityPosition(entity)
调整实体组中指定实体的位置
会更改该实体的position和meshOffest
更改实体的offest属性为该实体调整位置时的meshOffest
| Name | Type | Description |
|---|---|---|
entity | Box3Entity | 要调整的实体 |
- Source
removeEntity(index)
在实体组内移除实体
| Name | Type | Description |
|---|---|---|
index | number | 该实体在实体组内的编号,一般为 |
- Source
animate(keyframes, playbackInfo)
实体组动画
| Name | Type | Description |
|---|---|---|
keyframes | Array.<Box3EntityKeyframe> | 动画关键帧 |
playbackInfo | Box3AnimationPlaybackConfig | 动画配置信息 |
- Source
adjustmentEntityPosition(entity)
调整实体组中指定实体的位置
会更改该实体的position和meshOffest
更改实体的offest属性为该实体调整位置时的meshOffest
| Name | Type | Description |
|---|---|---|
entity | Box3Entity | 要调整的实体 |
- Source
removeEntity(index)
在实体组内移除实体
| Name | Type | Description |
|---|---|---|
index | number | 该实体在实体组内的编号,一般为 |
- Source
animate(keyframes, playbackInfo)
实体组动画
| Name | Type | Description |
|---|---|---|
keyframes | Array.<Box3EntityKeyframe> | 动画关键帧 |
playbackInfo | Box3AnimationPlaybackConfig | 动画配置信息 |
- Source