| 169 | } |
| 170 | |
| 171 | draw({uniforms}): void { |
| 172 | const {widthUnits, widthScale, widthMinPixels, widthMaxPixels, wrapLongitude} = this.props; |
| 173 | const model = this.state.model!; |
| 174 | const lineProps: LineProps = { |
| 175 | widthUnits: UNIT[widthUnits], |
| 176 | widthScale, |
| 177 | widthMinPixels, |
| 178 | widthMaxPixels, |
| 179 | useShortestPath: wrapLongitude ? 1 : 0 |
| 180 | }; |
| 181 | model.shaderInputs.setProps({line: lineProps}); |
| 182 | model.draw(this.context.renderPass); |
| 183 | |
| 184 | if (wrapLongitude) { |
| 185 | // Render a second copy for the clipped lines at the 180th meridian |
| 186 | model.shaderInputs.setProps({line: {...lineProps, useShortestPath: -1}}); |
| 187 | model.draw(this.context.renderPass); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | protected _getModel(): Model { |
| 192 | /* |