tschaub 4d97b583c6 Match the current Filter Effects spec
This commit is a cherry-pick of 19f7778.

The current draft of the [filter spec](https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html)
describes brightness, contrast, hue-rotate, and saturate functions that
roughly match our layer's setBrightness, setContrast, setHue, and
setSaturation methods.  These changes make the range of our methods match
the corresponding functions in the spec.  The one exception is the
brightness function.  The spec says it has a range of 0 to positive infinity.
The WebKit implementation accepts a range of -1 to 1 (as of
https://github.com/WebKit/webkit/commit/8f4765e569).  There's an open
(ticket)[https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647] recommending
that the spec be changed to match.

I'm not stuck on having our methods match those of the filter spec, but the
parity would be nice.

These changes leave the WebGL map renderer "broken" (whacky colors).  It would
be straightforward to update the current fragment shader to handle the new
range of hue, but the brightness, contrast, and saturation handling will
need to be reworked.

For inspiration, here are the color transformation
matrix calculations the WebKit filters:
8f4765e569/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp (L64-80)

Conflicts:

	src/ol/renderer/dom/domlayerrenderer.js
2012-12-12 15:18:34 +01:00
2012-09-28 21:55:48 +02:00
2012-12-12 15:18:34 +01:00
2012-10-19 21:56:59 +02:00
2012-11-04 19:08:55 +01:00
2012-10-17 17:43:27 +02:00
2012-09-29 11:51:53 +02:00
2012-11-09 11:45:58 +01:00
2012-11-14 12:45:07 +01:00

OpenLayers 3

Travis CI Status

Build it

Run make:

$ ./build.py

Run the examples in debug mode

Run the Plovr web server with:

$ ./build.py serve

Then, either open one of the example html files from the examples directory directly in your browser, or start a simple webserver, for example:

$ python -mSimpleHTTPServer

and explore the examples/ directory, for example by opening http://localhost:8000/examples/side-by-side.html.

You can turn off compilation by appending ?mode=RAW to the URL, for example http://localhost:8000/examples/side-by-side.html?mode=RAW.

Run tests

Run the plovr web server (see above), and either open the test/ol.html file in the browser (e.g. http://localhost:8000/test/ol.html), or run ./build.py test on the console (headless testing with PhantomJS).

See also the test-specific readme.

Run the linter

First, install the Closure Linter. Then:

$ ./build.py lint

Add examples

The examples are located in the examples directory. Adding a new example implies creating two files in this directory, a .html file and .js file. See examples/full-screen.html and examples/full-screen.js for instance.

The .html file needs to include a script tag with loader.js?id=<example_name> as its src. For example, if the two files for the examples are myexample.js and myexample.html then id should be set to myexample in the loader.js URL.

make serve should be stopped and restarted for the loader.js?id=<example_name> script tag to refer to a valid URL. make serve triggers the examples target which creates Plovr JSON file for each example.

Description
Languages
JavaScript 99%
CSS 0.6%
Handlebars 0.3%
Shell 0.1%