GeoDiffusionStyle(param)

new GeoDiffusionStyle(param)

Parameters:
Name Type Description
param Object
Properties
Name Type Attributes Default Description
opacity Number <optional>
1 不透明度
color Array.<Number> <optional>
[1,1,1] 叠加的颜色
blending Boolean <optional>
false 是否混色
tailing Boolean <optional>
false 物体的拖尾效果(垂直发光)
radial Boolean <optional>
false 物体的屏幕径向拖尾效果(扩散发光)
effect Boolean <optional>
false 发光效果
glowStrength Number <optional>
0.5 发光强度
type GeoDiffusionType <optional>
THING.EARTH.GeoDiffusionType.TextureRotate 扩散类型 THING.EARTH.GeoDiffusionType.Cylinder,THING.EARTH.GeoDiffusionType.TextureRotate,THING.EARTH.GeoDiffusionType.TextureScale
url String <optional>
贴图路径
speed Number <optional>
1 扩散速度
radius Number <optional>
500 扩散圆半径
extrudeHeight Number <optional>
300 扩散高度 type=THING.EARTH.GeoDiffusionType.Cylinder时生效
startPosition Number <optional>
0 扩散开始的位置(0~1) type=THING.EARTH.GeoDiffusionType.TextureScale时生效
endPosition Number <optional>
1 扩散结束的位置(0~1) type=THING.EARTH.GeoDiffusionType.TextureScale时生效
alphaGradient Object <optional>
扩散的透明度曲线 例如{0:0.0,0.5:1,1:0.0} key代表扩散到的位置 value代表此时的透明度 type=THING.EARTH.GeoDiffusionType.TextureScale时生效
linePositionRatio Number <optional>
0 扩散边框扫面线在扫描圆的位置(0~1)type=THING.EARTH.GeoDiffusionType.TextureScale时生效
lineColor Array.<Number> <optional>
[1,1,1] 扩散边框扫面线的颜色 type=THING.EARTH.GeoDiffusionType.TextureScale时生效
lineOpacity Number <optional>
1 扩散边框扫面线的透明度(0~1) type=THING.EARTH.GeoDiffusionType.TextureScale时生效
lineWidthRatio Number <optional>
0.01 扩散边框扫面线宽占扩散圆半径的比例 type=THING.EARTH.GeoDiffusionType.TextureScale时生效
lerpType LerpType <optional>
THING.LerpType.Linear.None 扫描速度变化曲线

Extends

Members

alphaGradient :Object

Example
geoObject.renderer.alphaGradient = { 0:0,0.5:1,1:0};

blending :Boolean

开启/关闭混色

Overrides:
Default Value:
  • false
Example
geoObject.style.blending = true;

color :Array.<Number>

叠加的颜色

Overrides:
Default Value:
  • [1,1,1]
Example
geoPoint.style.color = [1,0,0];// 设置填充色为红色

depthTest :Boolean

获取/设置是否进行深度测试

Overrides:
Default Value:
  • true

depthWrite :Boolean

获取/设置是否写入深度

Overrides:
Default Value:
  • true

effect :Boolean

获取/设置 发光效果

Overrides:
Default Value:
  • false
Example
geoObject.style.effect = true; //开启发光效果

endPosition :Number

extrudeHeight :Number

glowStrength :Number

获取/设置发光强度

Overrides:
Default Value:
  • 0.5

lerpType :LerpType

获取/设置扫光速度变化曲线

lights :Boolean

获取/设置是否接受光照

Overrides:
Default Value:
  • false

lineColor :Array.<Number>

lineOpacity :Number

获取/设置边线透明度 type为THING.EARTH.GeoDiffusionType.TextureScale时生效

linePositionRatio :Number

lineWidthRatio :Number

opacity :Number

获取/设置透明度

Overrides:
Default Value:
  • 1.0
Example
geoItem.style.opacity = 1; //将不透明度设置为1

outlineColor :Array.<Number>

勾边颜色

Overrides:
Example
geoPoint.style.outlineColor = [1,0,0];//设置geoPoint红色勾边
geoPoint.style.outlineColor = null;//取消勾边

radial :Boolean

开启/关闭物体的屏幕径向拖尾效果(扩散发光)

Overrides:
Default Value:
  • false

radius :Number

获取/设置扫光半径 单位米

speed :Number

获取/设置扫光速度 type为THING.EARTH.GeoDiffusionType.TextureScale时生效

startPosition :Number

tailing :Boolean

开启/关闭物体的拖尾效果(垂直发光)

Overrides:
Default Value:
  • false

readonly type :GeoDiffusionType

扫光类型 THING.EARTH.GeoDiffusionType.Cylinder,THING.EARTH.GeoDiffusionType.TextureRotate,THING.EARTH.GeoDiffusionType.TextureScale

url :String

获取/设置扫光使用的贴图纹理 type为THING.EARTH.GeoDiffusionType.TextureRotate或THING.EARTH.GeoDiffusionType.TextureScale时生效