From 461d523729e4fd29ae66d76550ba38335a028c4b Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Tue, 10 Apr 2018 14:26:21 -0400 Subject: [PATCH] Add block comments to videoSensing.videoToggle and setVideoTransparency --- src/extensions/scratch3_video_sensing/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/extensions/scratch3_video_sensing/index.js b/src/extensions/scratch3_video_sensing/index.js index 1d4d818e1..f09468476 100644 --- a/src/extensions/scratch3_video_sensing/index.js +++ b/src/extensions/scratch3_video_sensing/index.js @@ -378,6 +378,12 @@ class Scratch3VideoSensingBlocks { return state.motionAmount > Number(args.REFERENCE); } + /** + * A scratch command block handle that configures the video state from + * passed arguments. + * @param {object} args - the block arguments + * @param {VideoState} args.VIDEO_STATE - the video state to set the device to + */ videoToggle (args) { const state = args.VIDEO_STATE; if (state === VideoState.OFF) { @@ -389,6 +395,13 @@ class Scratch3VideoSensingBlocks { } } + /** + * A scratch command block handle that configures the video preview's + * transparency from passed arguments. + * @param {object} args - the block arguments + * @param {number} args.TRANSPARENCY - the transparency to set the video + * preview to + */ setVideoTransparency (args) { this.runtime.ioDevices.video.setPreviewGhost(Number(args.TRANSPARENCY)); }