mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
Add set preview ghost
This commit is contained in:
parent
da05e673fa
commit
d512042415
1 changed files with 11 additions and 1 deletions
|
@ -167,8 +167,9 @@ class Video {
|
||||||
}
|
}
|
||||||
|
|
||||||
_disablePreview () {
|
_disablePreview () {
|
||||||
if (this._skin) {
|
if (this._skin && this._drawable) {
|
||||||
this._skin.clear();
|
this._skin.clear();
|
||||||
|
this._drawable.updateProperties({visible: false});
|
||||||
}
|
}
|
||||||
this._renderPreviewFrame = null;
|
this._renderPreviewFrame = null;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +214,16 @@ class Video {
|
||||||
|
|
||||||
this._renderPreviewFrame();
|
this._renderPreviewFrame();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the preview ghost effect
|
||||||
|
* @param {number} ghost from 0 (visible) to 100 (invisible) - ghost effect
|
||||||
|
*/
|
||||||
|
setPreviewGhost (ghost) {
|
||||||
|
if (this._drawable) {
|
||||||
|
this._drawable.updateProperties({ghost});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get videoReady () {
|
get videoReady () {
|
||||||
|
|
Loading…
Reference in a new issue