mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Add block comments to videoSensing.videoToggle and setVideoTransparency
This commit is contained in:
parent
d4037808a7
commit
461d523729
1 changed files with 13 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue