Commit Graph

25934 Commits

Author SHA1 Message Date
Olivier Guyot 5ffca0633c Webgl Points / Add support for feature hit detection
For now only `forEachFeatureAtCoordinate` is implemented.

Each time the viewport is rendered, another similar render pass is
done using the specific hit detection instructions. Feature uid's are
encoded in the r,g,b,a channels and can then be decoded on the fly.

Note: the `readPixels` operation is taking a lot of time,
around 10-20ms each frame.
2019-06-28 09:12:20 +02:00
Olivier Guyot 38920867fb Webgl Helper / Add a method to prepare drawing to render targets 2019-06-28 09:12:20 +02:00
Olivier Guyot 6224d749c4 WebGL / Introduced the WebGLRenderTarget class
This utility class simplifies rendering to a texture & reading the
results of the render.

It also allows clearing its content before a new render.
2019-06-28 09:12:20 +02:00
Olivier Guyot 1257ade199 Webgl renderer / rename function to avoid confusion
`getBlankTexture` was too close to `WebGLHelper#createTexture`
2019-06-28 09:12:20 +02:00
Olivier Guyot f25a16d90c Webgl helper / rework create texture utils
Now only one util is available: `createTexture`, which
is tested and allows binding an image and reusing an existing texture.
2019-06-28 09:12:20 +02:00
Olivier Guyot b6425187de Remove unused WebGLShader class 2019-06-28 09:06:16 +02:00
Olivier Guyot 2b5e5459ab Webgl points / add hit detection buffers generation
Hit detection is done by rendering features with their id encoded in the
color attribute. A parallel set of render instructions and a second
vertex buffer is used specifically for that.
2019-06-28 09:06:16 +02:00
Olivier Guyot 8145b358c0 Webgl renderer / add id encode/decode utils 2019-06-28 09:06:16 +02:00
Olivier Guyot 034e0be76f Vector Source / index all features by uid
Previously features were indexed by uid only when they
did not have a defined id.
A new method was added: `getFeatureByUid`. This is not part of
the public API.
This will facilitate the lookup of features for hit detection.
2019-06-28 09:06:16 +02:00
Andreas Hocevar 6b60b25e8b Merge pull request #9728 from ahocevar/remove-package-lock
Remove accidently added package-lock.json
2019-06-28 09:04:39 +02:00
ahocevar 9bceccb5d1 Remove accidently added package-lock.json 2019-06-27 22:05:20 +02:00
Tim Schaub a4b76b2a00 Merge pull request #9719 from petrsloup/special-maptiler-key
Use special MapTiler API key dedicated for OpenLayers examples
2019-06-25 17:41:32 -06:00
Petr Sloup 61fdf965ba Use special MapTiler API key dedicated for OpenLayers examples 2019-06-25 16:34:58 +02:00
Frédéric Junod 9e928b996c Merge pull request #9714 from fredj/f9662
Update the circle style after setRadius calls
2019-06-25 16:15:48 +02:00
Frédéric Junod 3d60dfdeeb Merge pull request #9718 from fredj/cleanup
Remove unused variable in ol/renderer/webgl/PointsLayer
2019-06-25 15:37:23 +02:00
Frederic Junod 54c670de77 Remove unused variable in ol/renderer/webgl/PointsLayer 2019-06-25 15:24:00 +02:00
Frederic Junod 9aa11d2e11 Update the circle style after setRadius calls 2019-06-25 10:42:52 +02:00
Frederic Junod 0d6368d4ec Remove underscore from protected function, fix indentation, remove typecast 2019-06-25 10:40:11 +02:00
Frédéric Junod caac90e8d7 Merge pull request #9711 from fredj/viewParams_space
Remove extra space for the 'viewParams' attribute
2019-06-25 08:29:22 +02:00
Tim Schaub 7464cedff7 6.0.0-beta.11 v6.0.0-beta.11 2019-06-24 17:06:04 -06:00
Tim Schaub 51c49e36bc Merge pull request #9712 from tschaub/mvt-id
Allow an arbitrary tag to be used as feature id
2019-06-24 16:42:06 -06:00
Andreas Hocevar b29099a278 Merge pull request #9709 from ahocevar/circleci-puppeteer
Try to make rendering tests run again in puppeteer
2019-06-24 21:59:32 +02:00
Tim Schaub 08c494dd11 Allow an arbitrary tag to be used as feature id 2019-06-24 12:01:12 -06:00
Frederic Junod c428421586 Remove extra space for the 'viewParams' attribute 2019-06-24 16:28:04 +02:00
ahocevar c0a2549285 Try to make rendering tests run again in puppeteer 2019-06-24 10:20:47 +02:00
ahocevar 2df5f85018 Set version to 6.0.0-beta.10 2019-06-24 09:52:07 +02:00
Andreas Hocevar 4a0d6ce43c Merge pull request #9705 from ahocevar/vectortile-render-optimizations
Vector tile renderer optimizations and fixes
2019-06-24 09:50:56 +02:00
Andreas Hocevar 187969cbb3 Merge pull request #9706 from ahocevar/non-browser-screen-check
Do not use self to check browser features
2019-06-24 09:48:59 +02:00
ahocevar 8cdfc6e17c Do not use self to check browser features 2019-06-23 14:26:40 +02:00
ahocevar 9cd35d67a9 Fix clipping and clearing 2019-06-23 14:23:32 +02:00
ahocevar 4d2fa476a3 Simpler z sort 2019-06-23 14:22:56 +02:00
ahocevar f864c05070 Less frame budget restrictions 2019-06-23 14:07:22 +02:00
ahocevar 3557271e5a Use Image.prototype.decode also in Safari 2019-06-23 14:06:14 +02:00
Andreas Hocevar 8a49e06ebd Merge pull request #9704 from ahocevar/vectortile-reuse-issue
Handle container reuse properly when layers are added/removed
2019-06-22 19:33:59 +02:00
ahocevar 6783f6adb9 Handle container reuse properly when layers are added/removed 2019-06-22 19:12:39 +02:00
Tim Schaub 5eb27f7704 Merge pull request #9703 from openlayers/greenkeeper/eslint-6.0.0
Update eslint to the latest version 🚀
2019-06-22 07:13:34 -06:00
greenkeeper[bot] df240fe905 chore(package): update eslint to version 6.0.0 2019-06-22 04:08:47 +00:00
Frédéric Junod 300522e3cc Merge pull request #9701 from fredj/overlay_will-change
Remove will-change CSS rule for Overlay container
2019-06-21 16:36:27 +02:00
Tim Schaub 3ede6e32be Merge pull request #9702 from lutzhelm/typecheck-iiif
Fix several TypeScript type check problems
2019-06-21 07:53:59 -06:00
Tim Schaub ce45a10063 Merge pull request #9700 from KaiVolland/9692-typescript
Solves typescript related issues
2019-06-21 07:48:15 -06:00
Tim Schaub 2438ef167b Merge pull request #9699 from petrsloup/maptiler-url-fix
Fix MapTiler API usage
2019-06-21 07:46:42 -06:00
Lutz Helm d6dc7a926d Fix several TypeScript type check problems 2019-06-21 15:26:28 +02:00
Frederic Junod 6e6a2cae06 Use version 4 TileJSON from mapbox 2019-06-21 14:33:26 +02:00
Frederic Junod a6ebad008f Remove will-change CSS rule for Overlay container
Fixes #9467
Fixes #9139

Chrome doesn't force a composition if the `will-change` CSS rule is different from `transform` or `opacity`.
See https://bugs.chromium.org/p/chromium/issues/detail?id=960953
2019-06-21 14:22:46 +02:00
Kai Volland ed5d4aaf6d Fixes typing issue in mat4.js 2019-06-21 13:35:40 +02:00
Kai Volland f507efe77d Fixes typing issue in Composite.js 2019-06-21 13:31:27 +02:00
Kai Volland 83173cd385 Fixes typing issue in VectorTile.js 2019-06-21 13:30:35 +02:00
Kai Volland b6b91abc27 Fixes typing issue in DragPan.js 2019-06-21 13:28:56 +02:00
Petr Sloup 05c791efcd Fix MapTiler API usage 2019-06-21 11:22:24 +02:00
Tim Schaub 2342626a57 Merge pull request #9698 from openlayers/greenkeeper/puppeteer-1.18.0
Update puppeteer to the latest version 🚀
2019-06-20 23:33:59 -06:00