mensagem exibida:
Error: [object Arguments]is not a valid color representation.
p5.js says: [sketch.js, line 20] An error with message "[object Arguments]is not a valid color representation." occurred inside the p5js library when background was called. If not stated otherwise, it might be an issue with the arguments passed to background. (http://p5js.org/reference/#/p5/background)
segue abaixo o codigo:
`let imagenDeFundo; let imagenAtor; let imagenCarro;
//carros let xCarro =
function preload(){ imagenDeFundo = loadImage("imagens/estrada.png"); imagenAtor = loadImage("imagens/ator.png"); imagenCarro = loadImage("imagens/carro-1.png");
}
function setup() { createCanvas(600, 400); }
function draw() { background(imagenDeFundo);
}
function mostraAtor(){ image(imagenAtor, 130, 340, 60, 60);
}
function mostraCarro(){ image(imagenCarro, 600, 40, 50, 40); }
function movimentaCarro (){
}`