new SnowLayer()
点图层
- Source:
- View2D/Visuals/Three/SnowLayer.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 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
-
图层id
Type:
- String
- Default Value:
-
- '1'
- Source:
- View2D/Visuals/Three/SnowLayer.js
-
opacity :Number
-
透明度 0-1
Type:
- Number
- Default Value:
-
- 1.0
- Source:
- View2D/Visuals/Three/SnowLayer.js
-
visible :Boolean
-
可见性
Type:
- Boolean
- Default Value:
-
- true
- Source:
- View2D/Visuals/Three/SnowLayer.js
Methods
-
addTo(three)
-
关联Three
Parameters:
Name Type Description three
GeoGlobe.Visuals.Three - Source:
- View2D/Visuals/Three/SnowLayer.js
-
createSnowSprites(options)
-
创建雪花粒子对象
Parameters:
Name Type Description options
Object 参数对象 - Source:
- View2D/Visuals/Three/SnowLayer.js
Returns:
snow 雪花粒子- Type
- Object
-
getSize(options)
-
粒子尺寸的GET属性
Parameters:
Name Type Description options
Object - Source:
- View2D/Visuals/Three/SnowLayer.js
Returns:
size - 尺寸值- Type
- Number
-
getTexture(options)
-
纹理图片资源路径GET属性
Parameters:
Name Type Description options
Object - Source:
- View2D/Visuals/Three/SnowLayer.js
Returns:
texture - 图片纹理资源路径- Type
- String
-
getVisible()
-
获得雪花粒子的显示和隐藏状态
- Source:
- View2D/Visuals/Three/SnowLayer.js
-
remove()
-
从父对象中移除自己
- Source:
- View2D/Visuals/Three/SnowLayer.js
-
render()
-
绘制
- Source:
- View2D/Visuals/Three/SnowLayer.js
-
setVisible(visible)
-
设置雪花粒子的显示和隐藏状态
Parameters:
Name Type Description visible
Boolean - Source:
- View2D/Visuals/Three/SnowLayer.js