class Platform { constructor(x, y, width) { this.x = x; this.y = y; this.width = width; this.height = 0.02; this.color = 'rgb(0, 255, 0)'; } update() { } } Platform.texture = new Image(); Platform.texture.src = "img/grass.png";