Appearance
KBE3D / KBCore / Cesium / ShowGeometryInstanceAttribute
类: ShowGeometryInstanceAttribute
Value and type information for per-instance geometry attribute that determines if the geometry instance will be shown.
示例
ts
const instance = new Cesium.GeometryInstance({
geometry : new Cesium.BoxGeometry({
vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL,
minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0),
maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0)
}),
modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 1000000.0), new Cesium.Matrix4()),
id : 'box',
attributes : {
show : new Cesium.ShowGeometryInstanceAttribute(false)
}
});参数
Determines if the geometry instance will be shown.
属性
value
value:
Uint8Array
The values for the attributes stored in a typed array.
componentDatatype
readonlycomponentDatatype:ComponentDatatype
The datatype of each component in the attribute, e.g., individual elements in ColorGeometryInstanceAttribute#value.
componentsPerAttribute
readonlycomponentsPerAttribute:number
The number of components in the attributes, i.e., ColorGeometryInstanceAttribute#value.
normalize
readonlynormalize:boolean
When <code>true</code> and <code>componentDatatype</code> is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
方法
toValue()
statictoValue(show:boolean,result?:Uint8Array<ArrayBufferLike>):Uint8Array
Converts a boolean show to a typed array that can be used to assign a show attribute.
参数
show
boolean
The show value.
result?
Uint8Array<ArrayBufferLike>
The array to store the result in, if undefined a new instance will be created.
返回
Uint8Array
The modified result parameter or a new instance if result was undefined.
示例
ts
const attributes = primitive.getGeometryInstanceAttributes('an id');
attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show);构造函数
构造函数
new ShowGeometryInstanceAttribute(
show?:boolean):ShowGeometryInstanceAttribute
参数
show?
boolean
返回
ShowGeometryInstanceAttribute
