Kinrany / vue-p5

Vue component for p5.js
125 stars 16 forks source link

TypeError: sketch.createCapture is not a function #24

Closed khuqen closed 4 years ago

khuqen commented 4 years ago

Error in v-on handler: "TypeError: sketch.createCapture is not a function"

when i using sketch.createCapture function

    setup(sketch) {
      sketch.createCanvas(960, 540);
      let constraints = {
        video: {
          mandatory: {
            minWidth: 1920,
            minHeight: 1080
          },
          optional: [{ maxFrameRate: 10 }]
        },
        audio: false
      };
      sketch.line(100, 200, 200, 300);
      this.capture = sketch.createCapture(constraints);
    }
Kinrany commented 4 years ago

Hi, thanks for the report!

Could you try using vue-p5@next and see if that works?

If you're using a script, it's <script src="https://unpkg.com/vue-p5@next"></script>

Kinrany commented 4 years ago

vue-p5@0.8.2 is out, so this should be fixed now.