From 2c02f30e39afecc414e9cdecb0ec58b7053d6128 Mon Sep 17 00:00:00 2001 From: ocogeclub Date: Sun, 28 Nov 2021 22:36:12 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=E7=94=9F=E6=88=90=E3=82=B9=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=97=E3=83=88=E5=86=85=E3=81=AE=E5=A4=89=E6=95=B0?= =?UTF-8?q?=E3=81=AB=5F=E3=81=AE=E3=81=A4=E3=81=91=E5=BF=98=E3=82=8C?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ugj_blocks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ugj_blocks.js b/ugj_blocks.js index d8df69b..3f3a606 100644 --- a/ugj_blocks.js +++ b/ugj_blocks.js @@ -1407,7 +1407,7 @@ Blockly.Blocks['ugj_face_init'] = { Blockly.JavaScript['ugj_face_init'] = function (block) { var code = [ "const _videoEl = document.getElementById('subdisplay');", - `const _displaySize = { width: videoEl.width, height: videoEl.height };`, + `const _displaySize = { width: _videoEl.width, height: _videoEl.height };`, "const _stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: _displaySize });", "_videoEl.srcObject = _stream;", "" @@ -1516,7 +1516,7 @@ Blockly.Blocks['ugj_face_drawrect'] = { }; Blockly.JavaScript['ugj_face_drawrect'] = function (block) { var code_draw = ` _faceapi.draw.drawDetections(_overlay, _resizedDetections);`; - if (with_landmark) { code_draw += `\n faceapi.draw.drawFaceLandmarks(overlay, resizedDetections);`; } + if (with_landmark) { code_draw += `\n _faceapi.draw.drawFaceLandmarks(_overlay, _resizedDetections);`; } var code = [ ` _faceapi.matchDimensions(_overlay, _displaySize);`, ` const _resizedDetections = _faceapi.resizeResults(_result, _displaySize);`,