Olivier Guyot
ff3cc9b4d0
Expressions / renamed operator pow to ^
...
To be more in line with Mapbox style spec
2019-10-25 14:55:44 +02:00
Olivier Guyot
acf973751b
Webgl / added time and resolution as default uniforms
...
Also added the `zoom` and `resolution` style operators
2019-10-25 14:55:44 +02:00
Olivier Guyot
e843b2cfc0
Expressions / adaptation and cleanup after stretch operator removal
...
The examples have been fixed as well.
2019-10-25 14:55:44 +02:00
Olivier Guyot
719495587c
Expressions / rework the interpolate operator
...
This operator is now able to map numbers to output ranges as well as colors,
making the stretch operator unnecessary. Also allows giving multiple stops,
like in Mapbox style spec.
2019-10-25 14:55:44 +02:00
Olivier Guyot
fc98704bcb
Expressions / adds a test for a complex combination of operators
2019-10-25 14:55:44 +02:00
Olivier Guyot
27c530ec64
Expressions / introduce the match operator
...
This operator allows mapping from input values to output values of different
kinds and handles variable arguments count.
2019-10-25 14:55:44 +02:00
Olivier Guyot
e3f7d29bb2
Expressions / add utilities for using strings in GLSL & more type checking
...
It is now possible to specify a type hint when parsing an expression, which
helps determine the output value type.
When no single output type can be inferred, an error is thrown.
For strings, every literal value will be replaced by a number and a map of
these associations will be kept in the parsing context, which is passed
recursively.
2019-10-25 14:55:44 +02:00
Olivier Guyot
5712792772
Expressions / add more tests for conversion to GLSL
2019-10-25 14:55:44 +02:00
Olivier Guyot
bcf7649b9a
Expressions / store the variables & attributes in the context
2019-10-25 14:55:44 +02:00
Olivier Guyot
7e4119d580
Expressions / restored the parsing logic with better type checking
...
Converting expressions to GLSL is now done in ol/style/expressions, with the
same logic as before in ol/webgl/ShaderBuilder.
2019-10-25 14:55:44 +02:00
Olivier Guyot
72903d6454
Expressions / added operator declarations & type checking logic
2019-10-25 14:55:44 +02:00
Olivier Guyot
35af80b433
Style / add an ol/style/expressions module
...
This module will contain the utilities and operator declarations
for literal style expressions, boh for type checking and parsing
2019-10-25 14:55:44 +02:00