new SnowLayer()
点图层
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 snowLayer = new GeoGlobe.Visuals.Three.SnowLayer({
id: 'snow',
texture: '../../images/sprites/snowflake.png',
size: 10,
visible: true,
opacity: 1
});
//添加到THREE图层
snowLayer.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 |
createSnowSprites(options) → {Object}
创建雪花粒子对象
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | 参数对象 |
Returns:
snow 雪花粒子
- 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 |