Olivier Guyot
a6f65df8c4
View / add a resolveConstraints method to end interactions
...
This will help making sure that the view will come back to a "rested" state
once the interactions are over.
Interactions no longer need to handle the animation back to a rested state,
they simply call `endInteraction` with the desired duration and direction.
2019-02-22 15:01:30 +01:00
Olivier Guyot
1c5fd62e43
View / refactor how zoom and resolution are computed
...
This commit aims to simplify the computation of zoom and resolution in the
View class.
Previously zoom levels and resolution computations were mixed in different places,
ie resolution constraints, initial values, etc.
Now the View class only has the `getZoomForResolution` and `getResolutionForZoom`
methods to convert from one system to another.
Other than that, most computations use the resolution system internally.
The `constrainResolution` method also does not exist anymore, and is replaced
by `getValidResolution` and `getValidZoomLevel` public methods.
2019-02-22 15:01:30 +01:00
Olivier Guyot
1f379a06a4
View / add support for viewport extent constraint
...
This introduces a breaking change:
The `extent` view option now constrains the whole viewport and not just the
view center.
The option `constrainOnlyCenter` was added to keep the previous behaviour.
Constraining the whole viewport and not only the view center means
that the center and resolution constraints must be applied with a knowledge of
the viewport size.
2019-02-22 15:01:30 +01:00
Olivier Guyot
e6c4b2ffd1
View / make the constrainResolution function private
...
Other classes should not need to worry about constraining the resolution
or not, as the View will eventually do this on its own.
2019-02-22 15:01:30 +01:00
Olivier Guyot
3c1e3779e2
View / add a method to compute a valid zoom level
...
The `getValidZoomLevel` apply the current resolution constraint to return
a value that is guaranteed valid.
This is used for interactions & controls which need a target value to work:
the +/- buttons, the zoom clider, the dragbox zoom and the mouse wheel zoom.
2019-02-22 15:01:30 +01:00
Olivier Guyot
4e1ece16ed
View / implemented begin- and endInteraction methods
2019-02-22 15:01:30 +01:00
Olivier Guyot
1cb934dbe3
View / implement intermediate values for center/rot/res
...
The view now has targetCenter, targetRotation and targetResolution members.
These hold the new values given by set* methods. The actual view parameters are then changed by
calling `applyParameters_`.
2019-02-22 15:01:30 +01:00
Olivier Guyot
831c23d212
Fix heatmap example for IE
2018-12-28 16:24:56 +01:00
Olivier Guyot
33c717e159
Use a cleaner way to create a webgl context
2018-12-28 16:10:38 +01:00
Olivier Guyot
62c7a49943
Webgl points / added a texture option & improved doc
2018-12-28 15:53:07 +01:00
Olivier Guyot
0acfd7ab59
WebGL points / Added a color attribute
2018-12-28 15:53:07 +01:00
Olivier Guyot
27b0cf18e7
Update default shaders in documentation of webgl classes
2018-12-07 09:32:52 +01:00
Olivier Guyot
8e4c66a49e
Regenerate new test renders & remove the --ignore-gpu-blacklist flag
2018-12-07 09:09:19 +01:00
Olivier Guyot
2c4a959e55
Generally fixed the webgl heatmap layer
...
Things done:
- stay closer to the original rendering in canvas
- get rid of the intermediary blur step
- use the new callbacks in the webgl points renderer
- premultiply alpha in the last postprocessing step
2018-12-07 09:02:02 +01:00
Olivier Guyot
b532a489d4
Webgl points / fix weird glitches by premultiplying alpha
2018-12-07 09:02:02 +01:00
Olivier Guyot
f177a2bcd5
Simple handling of layer opacity in webgl points layer
...
Now the layer opacity is simply handled by a CSS property on the layer DOM element. As such it does not have to be
taken into account in shaders.
2018-12-07 09:02:02 +01:00
Olivier Guyot
a6989af00a
Webgl points layer / added callbacks for attributes
...
Now opacity, rotateWithView and tex coords can be set with callbacks per feature.
2018-12-07 08:57:12 +01:00
Olivier Guyot
2367fbb1ea
Webgl / do not enable missing attributes
...
Some expected attributes might not end up in the compiled shader. In this case, skip calling enableVertexAttrib
2018-12-07 08:57:03 +01:00
Olivier Guyot
662d9122f5
Use --ignore-gpu-blacklist to fix Webgl rendering in CircleCI
2018-11-20 11:52:32 +01:00
Olivier Guyot
0b23e94a2a
Fixed internal var name on WebGLPoints renderer.
2018-11-19 13:11:23 +01:00
jahow
6b82cf0b84
Simplified the API of WebGLHelper
...
Now the shader and program caches are simply arrays of native WebGL created objects.
The WebGLHelper simply takes the sources of the frag and vert shader and produces a program.
This removes 2 classes & reduces the general verbosity of the API.
Also a `getShaderCompilationErrors` was added on `WebGLHelper` to help debug GLSL errors.
2018-11-19 13:11:23 +01:00
jahow
76b1a7f96b
Add a rendering test for basic points rendering in webgl.
2018-11-19 09:41:29 +01:00
jahow
d0e0c8fc3a
Add rendering test for heatmap layer
2018-11-19 09:41:20 +01:00
Olivier Guyot
1ae1b60308
Rename webgl-new to webgl
2018-11-16 14:05:06 +01:00
Olivier Guyot
40d5f4efe7
Added unit tests for the WebGLHelper class
2018-11-16 14:05:06 +01:00
Olivier Guyot
72cf7b13fa
removed existing webgl rendering unit tests
2018-11-16 14:05:04 +01:00
Olivier Guyot
66a74ac019
Renamed WebGLBuffer to WebGLArrayBuffer to avoid conflicts
...
In the future this should be reworked to have a clearer API in general.
2018-11-16 14:02:10 +01:00
Olivier Guyot
a84559d1fb
Added documentation & fixed linting for WebGL classes
2018-11-16 14:02:10 +01:00
Olivier Guyot
cb77e10179
Removed the legacy shader build system
2018-11-16 14:02:10 +01:00
Olivier Guyot
874047a928
The heatmap layer now has a configurable blur
2018-11-16 14:02:10 +01:00
Olivier Guyot
530bcd0c88
Improve handling of uniforms in webgl helper
2018-11-16 14:02:10 +01:00
Olivier Guyot
94524fb431
Webgl Helper now handles uniforms with framestate as input
2018-11-16 14:02:10 +01:00
Olivier Guyot
716256e8f3
Cleaned up the heatmap layer & use dynamic radius
2018-11-16 14:02:10 +01:00
Olivier Guyot
fb8bf785dd
Use the gradient texture in the heatmap layer
2018-11-16 14:02:10 +01:00
Olivier Guyot
4a275c543a
Use post-processes in the heatmap example
2018-11-16 14:02:10 +01:00
Olivier Guyot
0c1424c5bb
Added the concept of post process passes for webgl
2018-11-16 14:02:10 +01:00
Olivier Guyot
7fa2189fe9
Remove the bulk of the WebGL legacy code.
...
Things left to do:
* redo an icon layer example
* redo a clipping layer example
* update docs where WebGL renderers are mentioned
2018-11-16 14:02:08 +01:00
Olivier Guyot
d3294730f1
Renamed WebGLContext to Helper for clarity
2018-11-16 14:01:21 +01:00
Olivier Guyot
494b817f47
Use the new webgl renderer in the heatmap layer
2018-11-16 14:01:21 +01:00
Olivier Guyot
51becf1c2e
Allow custom post processing & improve blending
2018-11-16 14:01:21 +01:00
Olivier Guyot
298af9ca0f
added the concept of frame buffer in webgl context
2018-11-16 14:01:21 +01:00
Olivier Guyot
81807c5910
Added size & position callbacks
2018-11-16 14:01:21 +01:00
Olivier Guyot
3c5eac13c9
Handle alpha & custom shaders in renderer
2018-11-16 14:01:21 +01:00
Olivier Guyot
154a046130
Added texcoord in default shader
2018-11-16 14:01:20 +01:00
Olivier Guyot
583dfb8e9d
Actually make the renderer work
2018-11-16 14:01:20 +01:00
Olivier Guyot
1c11dc5311
Improved shader compilation & fixed PointsLayer ones
2018-11-16 14:01:20 +01:00
Olivier Guyot
97b16be572
Added attribute handling
2018-11-16 14:01:20 +01:00
Olivier Guyot
fc20dc986c
Better handle uniform locations in shaders
2018-11-16 14:01:20 +01:00
Olivier Guyot
66efee9e22
Add vertex shaders to pointslayer
2018-11-16 14:01:20 +01:00
Olivier Guyot
71270efa75
Added a new WebGLPointsRenderer
2018-11-16 14:01:20 +01:00
Olivier Guyot
0a0d6c22f5
Modified the WebGLContext to be used independantly
2018-11-16 14:01:20 +01:00
Olivier Guyot
a3f9c6b724
Update change log w/ breaking changes
2018-11-15 17:13:46 +01:00
Olivier Guyot
3ac46ad10b
Removed old control
2018-11-15 17:12:40 +01:00
Olivier Guyot
d5c390e726
Fixed tests & linting
2018-11-15 17:12:40 +01:00
Olivier Guyot
1b8a6baa35
Added extent handling to graticule layer
2018-11-15 17:12:40 +01:00
Olivier Guyot
94bcb8a0f6
Added wrapX option on graticule
2018-11-15 17:12:40 +01:00
Olivier Guyot
c69366ec0a
Updated the sphere mollweide example
2018-11-15 17:12:40 +01:00
Olivier Guyot
4ee75359c0
Implemented a feature pool for lines and labels
2018-11-15 17:12:40 +01:00
Olivier Guyot
adb1bd7a31
First version to handle lines only
2018-11-15 17:12:40 +01:00
Olivier Guyot
dbd6dad4f3
Add a new Graticule layer, nothing rendered for now
2018-11-15 17:12:40 +01:00
Olivier Guyot
593632daea
Fix the OverviewMap control & example
...
Layers must now always be specified for the control.
Base example was amended to reflect that.
The breaking change was added in the update notes.
2018-11-15 12:04:49 +01:00