MCPcopy Create free account
hub / github.com/ml5js/ml5-library / startStop

Function startStop

examples/p5js/StyleTransfer/StyleTransfer_Video/sketch.js:50–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49// Start and stop the transfer process
50function startStop() {
51 if (isTransferring) {
52 select('#startStop').html('Start');
53 } else {
54 select('#startStop').html('Stop');
55 // Make a transfer using the video
56 style.transfer(gotResult);
57 }
58 isTransferring = !isTransferring;
59}
60
61// When we get the results, update the result image src
62function gotResult(err, img) {

Callers

nothing calls this directly

Calls 1

transferMethod · 0.45

Tested by

no test coverage detected