| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
|
Example:
const collection = new BufferPointCollection({primitiveCountMax: 1024});
const point = new BufferPoint();
const material = new BufferPointMaterial({color: Color.WHITE});
// Create a new point, temporarily bound to 'point' local variable.
collection.add({
position: new Cartesian3(0.0, 0.0, 0.0),
material
}, point);
// Iterate over all points in collection, temporarily binding 'point'
// local variable to each, and updating point material.
for (let i = 0; i < collection.primitiveCount; i++) {
collection.get(i, point);
point.setMaterial(material);
}
Experimental
此功能尚未最终确定,可能会在 Cesium 标准弃用政策之外发生变化。
See:
Extends
Methods
add(options, result) → BufferPoint
使用指定选项向集合添加新点。一个
BufferPoint 实例会链接到新点,
若提供 'result' 参数则使用该实例,否则创建新实例。对于重复调用,
建议重用单个 BufferPoint 实例,而不是在每次调用时
分配新实例。
| Name | Type | Description |
|---|---|---|
options |
BufferPointOptions | |
result |
BufferPoint |
