UNPKG

maplibre-gl

Version:

BSD licensed community fork of mapbox-gl, a WebGL interactive maps library

24 lines (17 loc) 882 B
import StyleLayer from '../style_layer'; import properties, {HillshadePaintPropsPossiblyEvaluated} from './hillshade_style_layer_properties.g'; import {Transitionable, Transitioning, PossiblyEvaluated} from '../properties'; import type {HillshadePaintProps} from './hillshade_style_layer_properties.g'; import type {LayerSpecification} from '../../style-spec/types.g'; class HillshadeStyleLayer extends StyleLayer { _transitionablePaint: Transitionable<HillshadePaintProps>; _transitioningPaint: Transitioning<HillshadePaintProps>; paint: PossiblyEvaluated<HillshadePaintProps, HillshadePaintPropsPossiblyEvaluated>; constructor(layer: LayerSpecification) { super(layer, properties); } hasOffscreenPass() { return this.paint.get('hillshade-exaggeration') !== 0 && this.visibility !== 'none'; } } export default HillshadeStyleLayer;