Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完善构建方案 & 容器 Bug 修复 #84

Merged
merged 14 commits into from
Nov 25, 2019
Merged

完善构建方案 & 容器 Bug 修复 #84

merged 14 commits into from
Nov 25, 2019

Conversation

xiaoiver
Copy link
Contributor

Bugfix:

  • 修复全局容器服务在多场景多图层下的问题
  • 补充容器服务说明文档

新增特性:

  • 支持自定义后处理效果,详见说明文档

构建方案:

  • 输出 TS 类型文件
  • 发布 beta.10 版本

@netlify
Copy link

netlify bot commented Nov 25, 2019

Deploy preview for trusting-saha-7bb4e5 ready!

Built with commit d941358

https://deploy-preview-84--trusting-saha-7bb4e5.netlify.com

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.


L7 自定义了一套较为灵活的渲染管线,在后处理效果方面提供了最大程度的扩展性。除了直接使用内置的常用效果(例如下图中 ColorHalftone、六边形像素化、噪声、Sepia),开发者还可以自定义任何后处理效果,在场景中完成注册即可应用到任意图层上。

![](./screenshots/multi-scene.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


IoC(Inversion of Control) 控制反转这种设计模式将对象的创建销毁、依赖关系交给容器处理,是以上设计原则的一种经典实践。其中它的一种实现 DI(Dependency Injection) 即依赖注入在工程领域应用十分广泛(下图来自 [Dependency-Injection-in-practice-CodeCAMP.pdf](http://www.mono.hr/Pdf/Dependency-Injection-in-practice-CodeCAMP.pdf)),最著名的当属 Spring:

![](./screenshots/di-containers.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


下面我们以 [glfx.js](http://evanw.github.io/glfx.js/demo/) 中的 Dot Screen 效果(下图)为例,介绍如何在 PolygonLayer 中应用这种效果。完整 DEMO 代码[在此]()。

![](./screenshots/custom-effect.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

* 便于测试。测试用例中替换渲染引擎服务为基于 headless-gl 的渲染服务。

下图清晰的展示了切换引擎和底图时均不会影响核心代码:
![](./screenshots/packages.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

试想如果我们只有一个全局容器,其中绑定的所有服务自然也都成了全局服务,在多场景下(页面中一个高德地图、一个 Mapbox)销毁高德地图的渲染服务,将影响到 Mapbox 的展示。

下图为 L7 的四个独立场景(两个高德、两个 Mapbox)DEMO 展示效果,它们应该是能互不干扰运行的:
![](./screenshots/multi-scene.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


最终效果如下:

![](./screenshots/dotscreen.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

@lgtm-com
Copy link

lgtm-com bot commented Nov 25, 2019

This pull request introduces 5 alerts and fixes 40 when merging d941358 into 686a67b - view on LGTM.com

new alerts:

  • 5 for Unused variable, import, function or class

fixed alerts:

  • 40 for Unused variable, import, function or class

lzxue pushed a commit that referenced this pull request Mar 5, 2020
* feat(core): support hierarchical containers

* feat(multipassrenderer): support custom postprocessing pass

* build(rollup): output CDN bundle to @antv/l7/dist

* build(tsc): generate TS declaration files

* chore(prerelease): prerelease beta.10
lzxue pushed a commit that referenced this pull request Mar 5, 2020
* feat(core): support hierarchical containers

* feat(multipassrenderer): support custom postprocessing pass

* build(rollup): output CDN bundle to @antv/l7/dist

* build(tsc): generate TS declaration files

* chore(prerelease): prerelease beta.10
lzxue pushed a commit that referenced this pull request Mar 5, 2020
* feat(core): support hierarchical containers

* feat(multipassrenderer): support custom postprocessing pass

* build(rollup): output CDN bundle to @antv/l7/dist

* build(tsc): generate TS declaration files

* chore(prerelease): prerelease beta.10
lzxue pushed a commit that referenced this pull request Mar 6, 2020
* feat(core): support hierarchical containers

* feat(multipassrenderer): support custom postprocessing pass

* build(rollup): output CDN bundle to @antv/l7/dist

* build(tsc): generate TS declaration files

* chore(prerelease): prerelease beta.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant