RainLayer

GeoGlobe.Visuals.Three. RainLayer

new RainLayer()

点图层
Example
//构造地图对象
 var map = new GeoGlobe.Map({
    style: Cfg.style,
    container: 'map',
    zoom: 16,
    bearing: -47,
	pitch: 45,
    units: "degrees",
    center: [114.26734490525155, 30.594607628267966]
});
 //构造THREE可视化图层
 var threebox = new GeoGlobe.Visuals.Three();
 //添加到地图中
 threebox.addTo(map);
 //构造点图层
 var rainLayer = new GeoGlobe.Visuals.Three.RainLayer({
	id: 'rain',
	texture: '../../images/sprites/rain.png',
	size: 10,
    visible: true,
    opacity: 1
});
 //添加到THREE图层
 rainLayer.addTo(threebox);
 //绘制
 threebox.render();

Members

id :String

Default Value:
  • '1'
图层id
Type:
  • String

opacity :Number

Default Value:
  • 1.0
透明度 0-1
Type:
  • Number

visible :Boolean

Default Value:
  • true
可见性
Type:
  • Boolean

Methods

addTo(three)

关联Three
Parameters:
Name Type Description
three GeoGlobe.Visuals.Three

createRainSprites(options) → {Object}

创建粒子对象
Parameters:
Name Type Description
options Object 参数对象
Returns:
rain 雨粒子
Type
Object

getSize(options) → {Number}

粒子尺寸的GET属性
Parameters:
Name Type Description
options Object
Returns:
size - 尺寸值
Type
Number

getTexture(options) → {String}

纹理图片资源路径GET属性
Parameters:
Name Type Description
options Object
Returns:
texture - 图片纹理资源路径
Type
String

getVisible()

获得粒子的显示和隐藏状态

remove()

从父对象中移除自己

render()

绘制

setVisible(visible)

设置粒子的显示和隐藏状态
Parameters:
Name Type Description
visible Boolean