Releases: maptalks/maptalks-gl-layers
Releases · maptalks/maptalks-gl-layers
V0.31.0 Released
不兼容修改
- PointLayer/LineStringLayer/PolygonLayer/ExtrudePolygonLayer,调用identify返回的结果由原有的 [Geometry] 改为 [{ geometry: Geometry, coordinate, data, point}],这同样也会影响map.identify方法的回调参数(来源于layer.identify)
新功能
Geo3DTilesLayer
- 3dtiles图层增加了对glb或gltf格式瓦片的支持, maptalks/issues#425
- Geo3DTilesLayer的service上pointSize和pointOpacity增加对function-type支持,支持根据zoom设置不同的点云大小和透明度,maptalks/issues#546
GLTFLayer
- GLTFMarker增加对gltf中每个node单独设置是否动画,maptalks/issues#512, symbol上增加了属性:
animationNodes: [0, 1, 2]
,用来指定启用动画的节点(node),值是数组,数组中每个值是节点的序号 - GLTFMarker增加绕指定坐标旋转的api,
gltfMarker.rotateAround(coord, degree)
, maptalks/issues#495 - GLTFMarker增加读取GLTF json的方法,可用于获取gltf中的node和相应属性值,
gltfMarker.getGLTFJSON()
,maptalks/issues#491 - GLTFMarker增加highlight指定GLTF nodes的方法,
gltfMarker.highlightNodes([{ nodeIndex: 0, color, opacity }])
,maptalks/issues#491 - GLTFMarker的cancelHighlight支持传入nodes 序号数组,取消指定node的highlight,maptalks/issues#491
- GLTFMarker增加outline指定GLTF nodes的方法,
gltfMarker.outlineNodes([0, 1, 2])
,maptalks/issues#491 - GLTFMarker的cancelOuline支持传入nodes 序号数组,取消指定node的outline,maptalks/issues#491
VectorTileLayer和点线面图层
- vt图层的fill插件和PolygonLayer的symbol增加了新的属性:
polygonPatternFileOrigin
(经纬度),polygonPatternFileWidth
和polygonPatternFileHeight
(单位米),用于指定填充图片左上角起始坐标和图片的长度和宽度 - vt图层的fill渲染插件和Polygon的symbol中增加了新的属性,
uvOffsetInMeter
,用于指定symbol.uvOffset的单位是否是米 - vt图层的lit插件和ExtrudePolygonLayer的material中增加了新的属性,
textureOrigin
和textureWidth
,用于指定纹理图片左上角的坐标(经纬度)和纹理图片的宽度(单位为米) - 点线面图层的identify结果中增加coordinate, maptalks/issues#540
- PolygonLayer的symbol增加polygonPatternUV属性,用于手动为每个端点设置uv坐标,uv坐标为多边形端点(包括空洞)展平后的对应数组,其形式为
polygonPatternUV: [u0, v0, u1, v1, ...., uN, vN]
(实验性特性)
其他
- weather中增加了 snowIntesity,用于控制雪量,默认为0.5, maptalks/issues#531
- 地形增加了对水淹分析的支持,maptalks/issues#477
Bug修改
- 通过可视范围剔除,优化了Mask的性能
- 解决transformControl事件中,target对象不正确的问题, maptalks/issues#533
- 解决因为采样精度不够,ColorMask边缘锯齿严重的问题, maptalks/issues#504
- 解决点云数据转换精度不够时,数据会出现偏移的问题,maptalks/issues#547
- 解决vt,3dtiles,gltf图层的http请求header中referrer不正确的问题,maptalks/issues#554
- 解决地形瓦片级别大于maxAvailableZoom时,没有正常resample得到正确高程值的问题, maptalks/issues#525
- 解决地形临时资源没有正确清理,导致图层发生变化时的报错, maptalks/issues#555
- 升级tinyqueue的版本,解决某些版本webpack的打包问题
- 解决后处理打开后,因为polygonOffset不正确造成polygon描边的模糊问题, maptalks/issues#536
- 解决marker只设置了文字,无法正常碰撞检测的问题, maptalks/issues#532
- 解决数据量较大时,点线面图层无法正常identify的问题, maptalks/issues#541
- 解决没有正确设置PolygonOffset,导致ExtrudePolygonLayer顶面和PointLayer高度没有对齐的问题, maptalks/issues#544
- 文字和图标渲染中增加alphaTest,解决highlight和bloom时,文字和图标发光区域是矩形的问题, maptalks/issues#550
Breaking Changes
- PointLayer/LineStringLayer/PolygonLayer/ExtrudePolygonLayer, the call to identify returns [Geometry] instead of [geometry]. point}], which also affects the callback parameters of the map.identify method (from layer.identify)
What's New
Geo3DTilesLayer
- 3dtiles layer adds support for tiles in glb or gltf format, maptalks/issues#425
- Geo3DTilesLayer's pointSize and pointOpacity on service add support for function-type, support for setting different point cloud size and transparency based on zoom, maptalks/issues#546
GLTFLayer
- GLTFMarker adds support for setting whether or not to animate each node in the gltf individually, maptalks/issues#512, added attribute to symbol:
animationNodes: [0, 1, 2]
to specify nodes with animation enabled, the values are arrays and each value in the array is the node's serial number - GLTFMarker add api to rotate around specified coordinates,
gltfMarker.rotateAround(coord, degree)
, maptalks/issues#495 - GLTFMarker add method to read GLTF json,
gltfMarker.getGLTFJSON()
, maptalks/issues#491 - GLTFMarker adds method to highlight specified GLTF nodes,
gltfMarker.highlightNodes([{ nodeIndex: 0, color, opacity }])
,maptalks/issues#491 - GLTFMarker's cancelHighlight supports passing an array of nodes' serial numbers to cancel the highlight of a given node, maptalks/issues#491.
- GLTFMarker add method to outline specified GLTF nodes,
gltfMarker.outlineNodes([0, 1, 2])
,maptalks/issues#491 - GLTFMarker's cancelOuline supports passing in an array of nodes, canceling the outline of the specified node,maptalks/issues#491
VectorTileLayer and PointLineLayer
polygonPatternFileHeight``` (in meters), which specify the coordinates of the top-left corner start of the fill image and the length and width of the image
- New properties,
uvOffsetInMeter
, have been added to the fill rendering plugin for vt layers and to Polygon's symbol to specify whether symbol.uvOffset is in meters or not. - New properties,
textureOrigin
and ``textureWidth```, have been added to the lit plugin of the vt layer and the material of the ExtrudePolygonLayer to specify the coordinates of the upper left corner of the texture image (latitude and longitude) and the width of the texture image in meters - Add coordinate to the identify result of the PointLineSurface layer, maptalks/issues#540
- PolygonLayer's symbol adds polygonPatternUV attribute for manually setting uv coordinates for each endpoint, which is the corresponding array of polygon endpoints (including voids) after spreading, in the form of
polygonPatternUV: [u0, v0, u1, v1, .... , uN, vN]
(experimental characterization)
Other
- snowIntesity added to weather for controlling snow amount, defaults to 0.5, maptalks/issues#531
- terrain added support for flooding analysis, maptalks/issues#477
Bug fixes
- Optimized performance of Mask by visual range culling
- Resolve issue with incorrect target object in transformControl event, maptalks/issues#533
- Solve the problem of ColorMask edge jaggedness due to insufficient sampling precision, maptalks/issues#504
- Solve the problem that point cloud data will be offset when the conversion accuracy is not enough, maptalks/issues#547
- Solve the problem that the referrer in the header of http request for vt, 3dtiles, and gltf layers is not correct, maptalks/issues#554
- Resolve issue where terrain tile level is greater than maxAvailableZoom and does not resample properly to get the correct elevation value, maptalks/issues#525
- Fix an error when terrain temporary resources are not cleaned up correctly, resulting in layer changes, maptalks/issues#555
- Upgrade the version of tinyqueue to fix a packaging problem with some versions of webpack.
- Solve the problem of blurring polygon stroke when post-processing is opened due to incorrect polygonOffset. maptalks/issues#536
- Solve the problem of collision detection when marker is only set to text, maptalks/issues#532
- Solve the problem that the point, line, and surface layers can not be identified properly when there is a large amount of data. maptalks/issues#541
- Solve the problem that ExtrudePolygonLayer top surface and PointLayer height are not aligned when PolygonOffset is not set correctly, maptalks/issues#544
- Add alphaTest to text and icon rendering to solve the problem that text and icon glow area is rectangle when highlight and bloom, maptalks/issues#550
V0.30.0 Released
Breaking Changes
- lit material中取消了对uvRotation的支持
- 地面填充图片设置取消了对uvRotation的支持
新功能
- 增加了GroupGLLayer,地面填充图片的位置与大小设置功能:
- fill渲染插件的symbol增加了polygonPatternFileWidth和polygonPatternFileHeight,单位为米,用于设置填充图片的高和宽
- fill渲染插件的symbol增加了polygonPatternFileOrigin,填充图片原点的坐标,示例:
ground: {
enable: true,
renderPlugin: {
type: "fill"
},
symbol: {
polygonOpacity: 1,
polygonPatternFile: './peppers.png',
polygonPatternFileOrigin: map.getCenter().toArray(), //原点经纬度
polygonPatternFileWidth: 100,
polygonPatternFileHeight: 100
}
}
- lit渲染插件的symbol.material增加了textureWidth,单位为米,用于设置填充图片的宽度
- lit渲染插件的symbol.material增加了textureOrigin,填充图片原点的坐标,示例:
ground: {
enable: true,
renderPlugin: {
type: "lit"
},
symbol: {
polygonOpacity: 1,
material: {
baseColorTexture: './peppers.png',
uvOffsetAnim: [10, 20],
noiseTexture: './noise.png',
uvScale: [2, 2],
uvOffset: [50, 0],
uvOffsetInMeter: true,
textureOrigin: map.getCenter().toArray(), //原点经纬度
textureWidth: 100, // meter
}
}
}
- fill的symbol和lit的symbol.material中增加了uvOffsetInMeter设置,如果设置为true,则uvOffset和uvAnimOffset中值的单位变为米
Bug修改
- 解决GLTFLineString在identity投影下的若干bug
Breaking Changes
- uvRotation support has been removed from lit material.
- uvRotation support has been removed from ground pattern image settings.
New features
- Added GroupGLLayer, position and size settings for ground pattern images:
- add polygonPatternFileWidth and polygonPatternFileHeight in meters to the symbol of the fill rendering plugin, used to set the height and width of the pattern image
- The symbol of the fill render plugin adds polygonPatternFileOrigin, the coordinates of the origin of the pattern image, example:
ground: {
enable: true,
renderPlugin: {
type: "fill"
},
symbol: {
polygonOpacity: 1,
polygonPatternFile: '. /peppers.png',
polygonPatternFileOrigin: map.getCenter().toArray(), // origin latitude and longitude
polygonPatternFileWidth: 100, //Pattern File width in meter
polygonPatternFileHeight: 100
}
}
- lit render plugin's symbol.material adds textureWidth in meters to set the width of the filled image
- The symbol.material of the lit render plugin adds textureOrigin, the coordinates of the origin of the fill image, example:
ground: {
enable: true,
renderPlugin: {
type: "lit"
},
symbol: {
polygonOpacity: 1,
material: {
baseColorTexture: './peppers.png',
uvOffsetAnim: [10, 20],
noiseTexture: './noise.png',
uvScale: [2, 2],
uvOffset: [50, 0],
uvOffsetInMeter: true,
textureOrigin: map.getCenter().toArray(),
textureWidth: 100, // meter
}
}
}
- Added uvOffsetInMeter setting to symbol.material of fill and symbol.material of lit, if set to true, the unit of the value in uvOffset and uvAnimOffset will be changed to meter.
Bug fixes
- Resolve several bugs in GLTFLineString under identity projection.
V0.29.1 Released
Bug fixes
- Fix a typo in texture mipmap regl may cause crash
V0.29.0 Released
新特性
- Geo3DTilesLayer.identify增加对pnts和i3dm数据的支持
Bug修改
- 解决开启bloom后处理后,terrain永远发光的问题 maptalks/issues#519
- 解决水淹分析不能正常运行的问题, maptalks/issues#511
- 解决剖面分析没有正常运行的问题, maptalks/issues#520
- 解决可视域分析调节垂直水平角度时的绘制问题, maptalks/issues#521
- 解决regl中纹理长宽不一致时生成mipmap的bug
- 解决fusion.gl状态管理,导致的ThreeLayer, PointLayer和GLTFLineString的冲突问题, maptalks/issues#528
- 解决PointLayer中,symbol不支持textDx和textDy的function-type的问题, maptalks/issues#523
New Features
- Geo3DTilesLayer.identify adds support for pnts and i3dm data.
Bug fixes
- Solve the problem that terrain always glows after bloom post-processing is turned on maptalks/issues#519
- Resolve issue where flooding analysis did not run properly maptalks/issues#511
- Solve the problem that profile analysis does not work properly, maptalks/issues#520
- Resolve a plotting issue when adjusting the vertical and horizontal angles in the viewable area analysis, maptalks/issues#521
- Solve the bug of generating mipmap when texture width is not equal with height in regl.
- Resolve fusion.gl state management, resulting in conflicts between ThreeLayer, PointLayer and GLTFLineString, maptalks/issues#528
- Solve the problem that symbols do not support textDx and textDy function-types in PointLayer, maptalks/issues#523
V0.28.0 Released
新功能
- 3dtiles 增加对横轴墨卡托或高斯克吕格(traverse mercator)投影的支持,用于在城市2000坐标系下加载3dtiles或i3s格式数据
- GLTFMarker的symbol中增加doubleSided属性
- GroupGLLayer的queryTerrain增加out参数接收结果,以减少创建的新数组
- VectorTileLayer的options中增加featureIdProperty,用于从Feature属性中指定某个属性为数据id
- VectorTilerLayer增加setFeatureState/removeFeatureState/getFeatureState方法,用于从外部数据源为vt设置属性,maptalks/issues#496
- VectorTileLayer的gltf-lit的symbol中增加对modelHeight的支持
Bug修改
- 修正了水淹分析的bug
- 修正fusion.gl切换webgl上下文的问题,maptalks/issues#503, maptalks/issues#493
- 解决GLTFManager加载模型时的空指针异常, maptalks/issues#501
- VectorTileLayer去掉开启SSR时的polygonOffset, maptalks/issues#505
- 点线面图层解决polygonOffset设定问题, maptalks/issues#500
- 解决LineStringLayer line gradient插件的绘制问题, maptalks/issues#513
- VectorTileLayer接收瓦片数据时永远重绘, maptalks/issues#488
- vt图层只在uv数据存在时调用createTangent
New features
- 3dtiles Add support for transverse Mercator or Gaussian Kluge (traverse mercator) projections for loading 3dtiles or i3s format data in the chinese city 2000 coordinate system
- Add doubleSided to symbol of GLTFMarker.
- GroupGLLayer's queryTerrain adds out parameter to receive results to minimize creating new arrays
- VectorTileLayer's options adds featureIdProperty to specify a property as a data id from the feature property
- VectorTilerLayer add setFeatureState/removeFeatureState/getFeatureState methods for setting a property for vt from an external data source, maptalks/issues#496
- Add support for modelHeight in VectorTileLayer's gltf-lit's symbols.
Bug fixes
- Fixed bug in flooding analysis
- Fix fusion.gl switching webgl context, maptalks/issues#503, maptalks/issues#493
- Resolve null pointer exception when loading models in GLTFManager, maptalks/issues#501
- VectorTileLayer removes polygonOffset when SSR is turned on, maptalks/issues#505
- PointLineLayer fixes polygonOffset setting, maptalks/issues#500
- LineStringLayer line gradient plugin drawing problem solved, maptalks/issues#513
- VectorTileLayer always redraws when receiving tile data, maptalks/issues#488
- vt layer only calls createTangent when uv data is present
V0.27.3 Released
Bug Fixes
- Fix normals computing in tbn-packer without indices
V0.27.2 Released
Bug Fixes
- Add support for array type coordinates in MultiGLTFMarker, maptalks/issues#485
- Fix gltf with blob bin
- Reduce default ambient.prefilterCubeSize to 128
- Upgrade tbn-packer to fix normal computing
- Log worker error in console with Geo3DTilesLayer
V0.27.1 Released
Bug Fixes
- Fix context switch in fusion.gl, maptalks/issues#483
V0.27.0 Released
新特性
- VectorTileLayer的native-point插件,symbol.markerFill增加了function-type支持 maptalks/issues#466
- 地图没有缩放时不重绘矢量瓦片,显著提升地形上VectorTileLayer在移动和旋转地图时的绘制性能
- Geo3DTilesLayer给service上添加新的配置项unlit,设为true时则忽略光照,直接绘制本身纹理
- Geo3DTilesLayer给service上添加新的配置项polygonFill,用于设置模型颜色,可以为css颜色或四位归一化数组
- Geo3DTilesLayer给service上添加新的配置项hsv,三位归一化数组,用于为模型调色,设置模型颜色的色相,饱和度和明度
- 材质没有unlit扩展时,Geo3DTilesLayer会在worker中为瓦片模型自动计算法线值
- MultiGLTFMarker增加了针对单个模型设置bloom的功能,将数据的bloom属性设置为true即可, maptalks/issues#451
Bug修改
- vt图层解决textName为空格时的报错和绘制问题, maptalks/issues#462
- 解决terrain在4326投影下,影像瓦片错位的问题, maptalks/issues#468
- 解决用GroupGLLayer.addLayer添加瓦片图层时,地形影像的绘制问题, maptalks/issues#469
- 确保地形剪切的数据边长为 2^n + 1,解决某些情况下的报错, maptalks/issues#472
- 解决地形中纹理坐标的计算错误,解决地形绘制时纹理错误造成的缝隙
- 解决Geo3DTilesLayer没有回收缓存的GLTF模型造成的内存泄漏
- 解决GLTFMarker会响应UIComponent上点击事件的问题, maptalks/issues#471
- 解决MultiGLTFMarker偶发性没有正确的触发事件的问题, maptalks/issues#461
New features
- Native-point plugin for VectorTileLayer, symbol.markerFill adds function-type support maptalks/issues#466
- Vector tiles are not redrawn when the map is not scaled, significantly improving the drawing performance of VectorTileLayer on terrain when moving and rotating the map
- Geo3DTilesLayer add new config item unlit to service, when set to true, it ignores lighting and draws its own texture directly.
- Geo3DTilesLayer add a new config item polygonFill to service, it can set the model color, it can be css color or 4-bit normalized array.
- Geo3DTilesLayer adds a new config item hsv to the service, a three-bit normalized array, which can be used to tint the model and set the hue, saturation and lightness of the model color.
- Geo3DTilesLayer will automatically calculate normals for tile models in the worker when the material does not have an unlit extension.
- MultiGLTFMarker add the function to set bloom for individual model, set the bloom attribute of data to true, maptalks/issues#451
Bug fixes
- vt layer to solve the error and drawing problem when textName is a space, maptalks/issues#462
- Solve the problem of image tile misalignment when terrain is in 4326 projection. maptalks/issues#468
- Fix a problem with terrain image drawing when adding a tile layer with GroupGLLayer.addLayer, maptalks/issues#469
- Ensure that the data side of terrain clipping is 2^n + 1, to solve the error reported in some cases, maptalks/issues#472
- Resolve miscalculation of texture coordinates in terrain, resolve gaps caused by texture errors when terrain is drawn
- Solve memory leak caused by Geo3DTilesLayer not reclaiming cached GLTF models.
- Solve the problem that GLTFMarker will respond to click events on UIComponent maptalks/issues#471
- Fix an issue where MultiGLTFMarker occasionally does not trigger events correctly, maptalks/issues#461
V0.26.1 Released
Bug Fixes
- Fix a typo when delete terrain texture