mirror of https://gitee.com/antv-l7/antv-l7
improvement: renderservice add setdirty 方法
This commit is contained in:
parent
42bfc33d77
commit
7ead19302d
|
@ -2,12 +2,16 @@
|
|||
title: 发布日志
|
||||
order: 10
|
||||
---
|
||||
|
||||
## 2020.04.20 2.2 正式版本
|
||||
|
||||
###✨ Features
|
||||
|
||||
#### [L7-Draw 地图绘制组件发布](../draw/start)
|
||||
|
||||
支持基础图形绘制、平移、修改、删除
|
||||
- 绘制UI组件支持
|
||||
|
||||
- 绘制 UI 组件支持
|
||||
- 绘制圆形
|
||||
- 绘制矩形
|
||||
- 绘制点
|
||||
|
@ -15,18 +19,18 @@ order: 10
|
|||
- 绘制面
|
||||
|
||||
### 🍏 Improvements
|
||||
- 要素拾取支持添加buffer
|
||||
|
||||
- 要素拾取支持添加 buffer
|
||||
- 图层拾取支持冒泡机制,默认拾取最上层
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
- pointLayer 聚合支持多种数据格式化
|
||||
- 修复热力图移动端不能正常渲染
|
||||
- 修复3D热力图高德地图正使用
|
||||
- 修复 3D 热力图高德地图正使用
|
||||
- L7 版本锁定
|
||||
- 修复点图层描边模糊问题
|
||||
|
||||
|
||||
|
||||
## 2020.03.12 2.1 正式版
|
||||
|
||||
###✨ Features
|
||||
|
|
|
@ -62,5 +62,7 @@ export interface IRendererService {
|
|||
readPixels(options: IReadPixelsOptions): Uint8Array;
|
||||
setBaseState(): void;
|
||||
setCustomLayerDefaults(): void;
|
||||
setDirty(flag: boolean): void;
|
||||
getDirty(): boolean;
|
||||
destroy(): void;
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
const version = '2.1.15';
|
||||
const version = '2.1.20';
|
||||
export { version };
|
||||
|
|
|
@ -20,7 +20,9 @@ export default class ImageModel extends BaseModel {
|
|||
|
||||
public getUninforms(): IModelUniform {
|
||||
const { opacity } = this.layer.getLayerConfig() as IImageLayerStyleOptions;
|
||||
this.texture.update();
|
||||
if (this.rendererService.getDirty()) {
|
||||
this.texture.update();
|
||||
}
|
||||
return {
|
||||
u_opacity: opacity || 1.0,
|
||||
u_texture: this.texture,
|
||||
|
|
|
@ -38,6 +38,7 @@ export default class ReglRendererService implements IRendererService {
|
|||
private $container: HTMLDivElement | null;
|
||||
private width: number;
|
||||
private height: number;
|
||||
private isDirty: boolean;
|
||||
|
||||
public async init(
|
||||
$container: HTMLDivElement,
|
||||
|
@ -211,6 +212,14 @@ export default class ReglRendererService implements IRendererService {
|
|||
gl.disable(gl.CULL_FACE);
|
||||
}
|
||||
|
||||
public setDirty(flag: boolean): void {
|
||||
this.isDirty = flag;
|
||||
}
|
||||
|
||||
public getDirty(): boolean {
|
||||
return this.isDirty;
|
||||
}
|
||||
|
||||
public destroy = () => {
|
||||
// @see https://github.com/regl-project/regl/blob/gh-pages/API.md#clean-up
|
||||
this.gl.destroy();
|
||||
|
|
|
@ -39,8 +39,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/antvis/L7#readme",
|
||||
"dependencies": {
|
||||
|
||||
"@antv/l7": "2.1.15",
|
||||
"@antv/l7": "2.2.0",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"rollup": "^2.3.3",
|
||||
"rollup-plugin-less": "^1.1.2"
|
||||
|
|
|
@ -82,6 +82,7 @@ export default class ThreeJSLayer
|
|||
mixer.update(this.getTime());
|
||||
});
|
||||
this.rendererService.setBaseState();
|
||||
this.rendererService.setDirty(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -99,6 +100,7 @@ export default class ThreeJSLayer
|
|||
mixer.update(this.getTime());
|
||||
});
|
||||
this.rendererService.setBaseState();
|
||||
this.rendererService.setDirty(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
13
yarn.lock
13
yarn.lock
|
@ -202,6 +202,19 @@
|
|||
resolved "https://registry.npmjs.org/@antv/gl-matrix/-/gl-matrix-2.7.1.tgz#acb8e37f7ab3df01345aba4372d7942be42eba14"
|
||||
integrity sha512-oOWcVNlpELIKi9x+Mm1Vwbz8pXfkbJKykoCIOJ/dNK79hSIANbpXJ5d3Rra9/wZqK6MC961B7sybFhPlLraT3Q==
|
||||
|
||||
"@antv/l7@2.1.15":
|
||||
version "2.1.15"
|
||||
resolved "https://registry.npmjs.org/@antv/l7/-/l7-2.1.15.tgz#27121b8f22838b5ad17114a1b2895389b6b0a800"
|
||||
integrity sha512-goR3M1e2YXXEo5jp/QYd1VF9rKoAy/DlKrJ5KLE/jhzuqgw9Kp0iHSOaGE+M7tFIyL8hCoG8JXHmAK1tVyeaIw==
|
||||
dependencies:
|
||||
"@antv/l7-component" "^2.1.15"
|
||||
"@antv/l7-core" "^2.1.15"
|
||||
"@antv/l7-layers" "^2.1.15"
|
||||
"@antv/l7-maps" "^2.1.15"
|
||||
"@antv/l7-scene" "^2.1.15"
|
||||
"@antv/l7-utils" "^2.1.15"
|
||||
"@babel/runtime" "^7.7.7"
|
||||
|
||||
"@antv/scale@~0.1.1":
|
||||
version "0.1.5"
|
||||
resolved "https://registry.npmjs.org/@antv/scale/-/scale-0.1.5.tgz#243266e8b9047cf64b2fdfc40f9834cf0846496e"
|
||||
|
|
Loading…
Reference in New Issue