Estoy tratando de cargar una imagen y de alguna manera me arroja un error, lo he intentado de diferentes maneras pero no puedo solucionarlo. ¿Alguien puede ayudarme? Gracias por sus respuestas.
class Sprite { constructor({position, imageSrc, scale = 1, framesMax = 1}) { this.position = position this.width = 50 this.height = 150 this.image = new Image() this.image.src = imageSrc // here the inspector shows an error this.scale = scale this.framesMax = framesMax this.framesCurrent = 0 this.framesElapsed = 0 this.framesHold = 6 }` const player = new Fighter({posición: { x: 0, y: 0 }, velocidad: { x: 0, y: 0 }, desplazamiento: { x: 0, y: 0 }, imageSrc: './img/samuraiMack/Fall.png', fotogramas máx.: 8 })