Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(gl, vectors, camera) {
this.gl = gl
this.camera = camera
this.options = { countries: { enabled: true } }
this.countries = topojson.feature(vectors, vectors.objects.countries)
this.canvas = d3.select('.map-canvas').append('canvas')
.attr('class', 'svg-layer')
this.ctx = this.canvas.node().getContext('2d')
this.projection = projection.geoSatellite()
this.path = geo.geoPath().projection(this.projection).context(this.ctx)
window.addEventListener('resize', () => { this.resize() })
this.resize()
this.draw()
}