From fc63ebdbe80d6625a3f69b8e055ac8c8d1921b90 Mon Sep 17 00:00:00 2001 From: fustyles <34397289+fustyles@users.noreply.github.com> Date: Tue, 10 Oct 2023 21:32:53 +0800 Subject: [PATCH] Update javascript.js --- faceapi_recognize_20201012/blockly/javascript.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/faceapi_recognize_20201012/blockly/javascript.js b/faceapi_recognize_20201012/blockly/javascript.js index d533d3a216..8cacbf33b9 100644 --- a/faceapi_recognize_20201012/blockly/javascript.js +++ b/faceapi_recognize_20201012/blockly/javascript.js @@ -23,14 +23,14 @@ Blockly.JavaScript['faceapirecognize_video_one'] = function(block) { return code; }; -Blockly.JavaScript['faceapirecognize_video_capture'] = function(block) { +Blockly.JavaScript['faceapirecognize_video_capture'] = function(block) { + var value_faceimagecount = Blockly.JavaScript.valueToCode(block, 'faceimagecount', Blockly.JavaScript.ORDER_ATOMIC); var value_result = block.getFieldValue('result_'); var value_opacity = block.getFieldValue('opacity_'); var value_timer = Blockly.JavaScript.valueToCode(block, 'timer', Blockly.JavaScript.ORDER_ATOMIC); - var value_facelabel = Blockly.JavaScript.valueToCode(block, 'facelabel', Blockly.JavaScript.ORDER_ATOMIC); var value_distancelimit = Blockly.JavaScript.valueToCode(block, 'distancelimit', Blockly.JavaScript.ORDER_ATOMIC); - var code = 'faceapirecognize_video("' + value_result + '","' + value_opacity + '",' + value_timer + ',"" ,' + value_facelabel + ',-1,' + value_distancelimit + ');\n'; + var code = 'faceapirecognize_video("' + value_result + '","' + value_opacity + '",' + value_timer + ',"" ,"" ,'+value_faceimagecount*(-1)+',' + value_distancelimit + ');\n'; return code; };