Relative Content

Tag Archive for reactjsmapbox-gl-jsdeck.gl

DeckGL custom layer, error setting accessor attribute

import { PathLayer } from ‘deck.gl’ export default class FlowPathLayer extends PathLayer { initializeState() { super.initializeState() this.getAttributeManager()?.addInstanced({ instanceDirection: { size: 1, accessor: ‘getDirection’, defaultValue: 1, }, }) } getShaders() { const shaders = super.getShaders() shaders.inject[‘vs:#decl’] += ` attribute float instanceDirection; uniform float dashStart; ` shaders.inject[‘vs:#main-end’] += ` vDashOffset += dashStart;` return shaders } draw(opts) { […]