Spaces:
Sleeping
Sleeping
Update public/sketch.js
Browse files- public/sketch.js +6 -6
public/sketch.js
CHANGED
@@ -174,7 +174,7 @@ function setup() {
|
|
174 |
//—————————
|
175 |
|
176 |
// Buttons
|
177 |
-
start_capture_button=createButton("
|
178 |
start_capture_button.mousePressed(() => {
|
179 |
camIsON = true;
|
180 |
if(!active_rearcam){
|
@@ -241,7 +241,7 @@ function setup() {
|
|
241 |
|
242 |
}
|
243 |
|
244 |
-
start_button = createButton('
|
245 |
start_button.mousePressed(() => {
|
246 |
live = true;
|
247 |
current_instructions = input_instructions.value()
|
@@ -250,7 +250,7 @@ function setup() {
|
|
250 |
call_api(socket, current_instructions)
|
251 |
})
|
252 |
|
253 |
-
stop_button = createButton('
|
254 |
stop_button.mousePressed(() => {
|
255 |
live = false;
|
256 |
waiting = false;
|
@@ -267,9 +267,9 @@ function setup() {
|
|
267 |
//redraw()
|
268 |
})
|
269 |
|
270 |
-
input_instructions = createInput("
|
271 |
|
272 |
-
change_instructions = createButton("
|
273 |
change_instructions.mousePressed(() => {
|
274 |
current_instructions = input_instructions.value()
|
275 |
})
|
@@ -287,7 +287,7 @@ function setup() {
|
|
287 |
function draw() {
|
288 |
background(220);
|
289 |
textAlign(CENTER);
|
290 |
-
text('
|
291 |
|
292 |
if(capture != undefined){
|
293 |
|
|
|
174 |
//—————————
|
175 |
|
176 |
// Buttons
|
177 |
+
start_capture_button=createButton("打开摄像头")
|
178 |
start_capture_button.mousePressed(() => {
|
179 |
camIsON = true;
|
180 |
if(!active_rearcam){
|
|
|
241 |
|
242 |
}
|
243 |
|
244 |
+
start_button = createButton('开启实时视觉识别');
|
245 |
start_button.mousePressed(() => {
|
246 |
live = true;
|
247 |
current_instructions = input_instructions.value()
|
|
|
250 |
call_api(socket, current_instructions)
|
251 |
})
|
252 |
|
253 |
+
stop_button = createButton('停止');
|
254 |
stop_button.mousePressed(() => {
|
255 |
live = false;
|
256 |
waiting = false;
|
|
|
267 |
//redraw()
|
268 |
})
|
269 |
|
270 |
+
input_instructions = createInput("镜头前发生什么了? ")
|
271 |
|
272 |
+
change_instructions = createButton("更改指示")
|
273 |
change_instructions.mousePressed(() => {
|
274 |
current_instructions = input_instructions.value()
|
275 |
})
|
|
|
287 |
function draw() {
|
288 |
background(220);
|
289 |
textAlign(CENTER);
|
290 |
+
text('打开你的网络摄像头', width/2, height/2);
|
291 |
|
292 |
if(capture != undefined){
|
293 |
|