@simversus/yjvis • Docs
@simversus/yjvis / ColorTable
Class: ColorTable
颜色映射表,将属性数据映射为颜色
Extends
Constructors
new ColorTable()
new ColorTable():
ColorTable
Returns
Overrides
Defined in
scene/ColorTable.ts:87
Properties
arithmeticColors
arithmeticColors:
string
[] =defaultHexColors
等差数列颜色节点,颜色为16进制字符串或者符合CSS颜色规范的字符串
Defined in
scene/ColorTable.ts:64
classHierarchy
classHierarchy:
ClassEnum
[]
Deprecated
Inherited from
Defined in
core/baseObject.ts:96
directUse
directUse:
boolean
=false
是否直接使用属性数据,不进行映射,属性数据的分量数必须是3,如果属性数据类型是Uint8Array
,则直接作为0~255颜色,反之视为0~1的颜色
Defined in
scene/ColorTable.ts:75
isUseArithmeticLength
isUseArithmeticLength:
boolean
=true
是否使用序列颜色的个数作为纹理颜色数
Defined in
scene/ColorTable.ts:79
label
label:
string
自定义标识
Inherited from
Defined in
core/baseObject.ts:104
nanColor
nanColor:
Number3
nan值的颜色
Default
[255, 255, 255]
Defined in
scene/ColorTable.ts:51
preset
preset:
Preset
预设颜色节点,key为属性值,value为颜色值
Defined in
scene/ColorTable.ts:68
range?
optional
range: [number
,number
]
颜色映射的范围,超出范围的属性值采用两端的颜色
Defined in
scene/ColorTable.ts:55
rangeRatio
rangeRatio: [
number
,number
]
按比例方式设置range,范围为[0,1]代表0%~100%,如果range为undefined才生效
Defined in
scene/ColorTable.ts:60
userData
userData:
any
用户自定义数据
Inherited from
Defined in
core/baseObject.ts:100
uuid
uuid:
number
唯一标识符
Inherited from
Defined in
core/baseObject.ts:92
TEXTURE_LABEL
static
TEXTURE_LABEL:string
='TEXTURE_LABEL'
Internal
Defined in
scene/ColorTable.ts:46
Accessors
mtime
get
mtime():number
Returns
number
Inherited from
Defined in
core/baseObject.ts:118
Methods
changed()
changed():
void
标记对象为已修改
Returns
void
Inherited from
Defined in
core/baseObject.ts:128
is()
is(
t
):boolean
Parameters
• t: ClassEnum
Returns
boolean
Inherited from
Defined in
core/baseObject.ts:122
release()
release():
void
销毁该对象
Returns
void
Inherited from
Defined in
core/baseObject.ts:134
scalarToColors()
scalarToColors(
dataArray
,componentId
):DataArray
Internal
根据属性数据/分量获取颜色数据
Parameters
• dataArray: DataArray
• componentId: number
Returns
Defined in
scene/ColorTable.ts:173
scalarToTexture()
scalarToTexture(
colorArray
,componentId
,texture
):object
Internal
将标量映射到纹理上
Parameters
• colorArray: DataArray
• componentId: number
• texture: Texture
Returns
object
texture
texture:
Texture
uvData
uvData:
TypedArray
=uv.data
Defined in
scene/ColorTable.ts:95