mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
Merge pull request #1061 from kchadha/video-transparency-save-load-fix
Fix video transparency save/load issue.
This commit is contained in:
commit
5b9dc4df77
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,7 @@ const Runtime = require('../../engine/runtime');
|
||||||
const ArgumentType = require('../../extension-support/argument-type');
|
const ArgumentType = require('../../extension-support/argument-type');
|
||||||
const BlockType = require('../../extension-support/block-type');
|
const BlockType = require('../../extension-support/block-type');
|
||||||
const Clone = require('../../util/clone');
|
const Clone = require('../../util/clone');
|
||||||
|
const Cast = require('../../util/cast');
|
||||||
const Video = require('../../io/video');
|
const Video = require('../../io/video');
|
||||||
|
|
||||||
const VideoMotion = require('./library');
|
const VideoMotion = require('./library');
|
||||||
|
@ -474,8 +475,9 @@ class Scratch3VideoSensingBlocks {
|
||||||
* preview to
|
* preview to
|
||||||
*/
|
*/
|
||||||
setVideoTransparency (args) {
|
setVideoTransparency (args) {
|
||||||
this.globalVideoTransparency = args.TRANSPARENCY;
|
const transparency = Cast.toNumber(args.TRANSPARENCY);
|
||||||
this.runtime.ioDevices.video.setPreviewGhost(Number(args.TRANSPARENCY));
|
this.globalVideoTransparency = transparency;
|
||||||
|
this.runtime.ioDevices.video.setPreviewGhost(transparency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue