MetadataClassProperty

new Cesium.MetadataClassProperty(options)

元数据属性,作为 MetadataClass 的一部分。

请参阅 3D 元数据规范 了解 3D 瓦片

Name Type Description
options object 对象,具有以下属性:
Name Type Default Description
id string 属性的 ID。
type MetadataType 属性的类型,例如 SCALAR、VEC2、VEC3。
componentType MetadataComponentType optional 属性的组件类型。这包括整数(例如 INT8 或 UINT16)和浮点(FLOAT32 和 FLOAT64)值。
enumType MetadataEnum optional 属性的枚举类型。仅当 type 为 ENUM 时定义。
isArray boolean false optional 如果属性是数组(固定长度或可变长度),则为 True,否则为 false。
isVariableLengthArray boolean false optional 如果属性是可变长度数组,则为 True, 否则为 false。
arrayLength number optional 数组元素的数量。仅针对固定长度数组定义。
normalized boolean false optional 属性是否被归一化。
min number | Array.<number> | Array.<Array.<number>> optional 一个数字或一个数字数组,存储此属性的最小允许值。仅当 type 为数字类型时定义。
max number | Array.<number> | Array.<Array.<number>> optional 存储此属性的最大允许值的数字或数字数组。仅当 type 为数字类型时定义。
offset number | Array.<number> | Array.<Array.<number>> optional 作为值转换的一部分要添加到属性值的偏移量。
scale number | Array.<number> | Array.<Array.<number>> optional 作为值转换的一部分,要乘以属性值的比例。
noData boolean | number | string | Array optional 表示 null 值的 no-data sentinel 值。
default boolean | number | string | Array optional 未定义实体的属性值时使用的默认值。
required boolean false optional 属性是否为必填项。
name string optional 属性的名称。
description string optional 属性的描述。
semantic string optional 描述应如何解释此属性的标识符。
extras * optional 额外的用户定义属性。
extensions object optional 包含扩展的对象。
Experimental

此功能使用的是 3D Tiles 规范的一部分,该规范不是最终版本,并且可能会在没有 Cesium 标准弃用策略的情况下进行更改。

Members

readonly arrayLength : number

数组元素的数量。仅针对 fixed-size 定义 阵列。
属性的组件类型。这包括 integer (例如 INT8 或 UINT16)和浮点(FLOAT32 和 FLOAT64)值

readonly default : boolean|number|string|Array

未定义实体的属性值时使用的默认值。

readonly description : string

属性的描述。
属性的枚举类型。仅当 type 为 ENUM 时定义。
包含扩展的对象。
额外的用户定义属性。
属性的 ID。
如果属性是数组(固定长度或可变长度),则为 True, 否则 false 。

readonly isVariableLengthArray : boolean

如果属性是可变长度数组,则为 True,否则为 false。

readonly max : number|Array.<number>|Array.<Array.<number>>

一个数字或数字数组,用于存储此属性的最大允许值。仅当 type 为数字类型时定义。

readonly min : number|Array.<number>|Array.<Array.<number>>

一个数字或数字数组,用于存储此属性的最小允许值。仅当 type 为数字类型时定义。
属性的名称。

readonly noData : boolean|number|string|Array

表示 null 值的 no-data sentinel 值

readonly normalized : boolean

属性是否已规范化。

readonly offset : number|Array.<number>|Array.<Array.<number>>

作为值转换的一部分添加到属性值的偏移量。 This is always defined, even when `hasValueTransform` is `false`. If the class property JSON itself did not define it, then it will be initialized to the default value.
属性是否为必填项。

readonly scale : number|Array.<number>|Array.<Array.<number>>

作为值转换的一部分,要乘以属性值的比例。 This is always defined, even when `hasValueTransform` is `false`. If the class property JSON itself did not define it, then it will be initialized to the default value.
描述应如何解释此属性的标识符。
属性的类型,例如 SCALAR、VEC2、VEC3
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.