my question is about the error: Uncaught ReferenceError: createSlider is not defined

0

I'm making a flappy bird style game, but I'm having a problem with Slider, I think it's something with a library or the way I declare the variable or createSlider, but I tried to change and nothing solves the design is not original my it comes from the channel "the codding train, Coding Challenge # 41: Clappy Bird!" it uses this variable exactly in 11:42 in the video I will leave attached the link and the code.

var bird; //variável passaro
var pipes = []; //variavel das paredes
var mic;
var slider;

function setup() {
   createCanvas(400, 600); //tamanho da janela 400x600
   mic = new p5.AudioIn(); //para chamar a biblioteca de microfone
   mic.start(); //para aparecer o pop up no navegador para aceitar a usar o    microfone
   bird = new Bird(); //para mostrar o passaro na tela
   pipes.push(new Pipe()); //para mostrar as paredes
   slider = createSlider(0, 1, 0.2, 0.01);
}
    
asked by anonymous 25.10.2018 / 16:55

1 answer

0

You're right, it's missing a dependency to have the createSlider function.

In your HTML you have to import the p5js library, because it is the one that has the createSlider function.

You can see the full code he created in github repository . p>     

25.10.2018 / 17:12