Class: RainLayer

.Visuals.Three. RainLayer


new RainLayer()

点图层
Source:
View2D/Visuals/Three/RainLayer.js
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

图层id
Type:
  • String
Default Value:
  • '1'
Source:
View2D/Visuals/Three/RainLayer.js

opacity :Number

透明度 0-1
Type:
  • Number
Default Value:
  • 1.0
Source:
View2D/Visuals/Three/RainLayer.js

visible :Boolean

可见性
Type:
  • Boolean
Default Value:
  • true
Source:
View2D/Visuals/Three/RainLayer.js

Methods


addTo(three)

关联Three
Parameters:
Name Type Description
three GeoGlobe.Visuals.Three
Source:
View2D/Visuals/Three/RainLayer.js

createRainSprites(options)

创建粒子对象
Parameters:
Name Type Description
options Object 参数对象
Source:
View2D/Visuals/Three/RainLayer.js
Returns:
rain 雨粒子
Type
Object

getSize(options)

粒子尺寸的GET属性
Parameters:
Name Type Description
options Object
Source:
View2D/Visuals/Three/RainLayer.js
Returns:
size - 尺寸值
Type
Number

getTexture(options)

纹理图片资源路径GET属性
Parameters:
Name Type Description
options Object
Source:
View2D/Visuals/Three/RainLayer.js
Returns:
texture - 图片纹理资源路径
Type
String

getVisible()

获得粒子的显示和隐藏状态
Source:
View2D/Visuals/Three/RainLayer.js

remove()

从父对象中移除自己
Source:
View2D/Visuals/Three/RainLayer.js

render()

绘制
Source:
View2D/Visuals/Three/RainLayer.js

setVisible(visible)

设置粒子的显示和隐藏状态
Parameters:
Name Type Description
visible Boolean
Source:
View2D/Visuals/Three/RainLayer.js