Classes
Type Definitions
-
CustomAttribute{Object}
-
A description of a custom attribute to be passed on to the GPU, with a value different for each feature.
Properties:
Name Type Description namestring Attribute name.
callbackfunction This callback computes the numerical value of the attribute for a given feature (properties are available as 2nd arg for quicker access).
-
FeatureCacheItem{Object}
-
Object that holds a reference to a feature, its geometry and properties. Used to optimize rebuildBuffers by accessing these objects quicker.
Properties:
Name Type Description featuremodule:ol/Feature~Feature Feature
propertiesObject.<string, *> Feature properties
geometrymodule:ol/geom~Geometry Feature geometry
-
Options{Object}
-
- In the vertex shader as an
attributeby prefixing it witha_ - In the fragment shader as a
varyingby prefixing it withv_Please note that these can only be numerical values.
Properties:
Name Type Argument Description attributesArray.<module:ol/renderer/webgl/PointsLayer~CustomAttribute> <optional>
These attributes will be read from the features in the source and then passed to the GPU. The
nameproperty of each attribute will serve as its identifier:vertexShaderstring Vertex shader source, mandatory.
fragmentShaderstring Fragment shader source, mandatory.
hitVertexShaderstring <optional>
Vertex shader source for hit detection rendering.
hitFragmentShaderstring <optional>
Fragment shader source for hit detection rendering.
uniformsObject.<string, module:ol/webgl/Helper~UniformValue> <optional>
Uniform definitions for the post process steps Please note that
u_textureis reserved for the main texture slot.postProcessesArray.<module:ol/renderer/webgl/Layer~PostProcessesOptions> <optional>
Post-processes definitions
- In the vertex shader as an
OpenLayers