mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
store the ghost effect in case preview is setup after it was last set
This commit is contained in:
parent
e20723994f
commit
d0a71dcaf9
1 changed files with 2 additions and 0 deletions
|
@ -196,6 +196,7 @@ class Video {
|
||||||
* @param {number} ghost from 0 (visible) to 100 (invisible) - ghost effect
|
* @param {number} ghost from 0 (visible) to 100 (invisible) - ghost effect
|
||||||
*/
|
*/
|
||||||
setPreviewGhost (ghost) {
|
setPreviewGhost (ghost) {
|
||||||
|
this._ghost = ghost;
|
||||||
if (this._drawable) {
|
if (this._drawable) {
|
||||||
this.runtime.renderer.updateDrawableProperties(this._drawable, {ghost});
|
this.runtime.renderer.updateDrawableProperties(this._drawable, {ghost});
|
||||||
}
|
}
|
||||||
|
@ -271,6 +272,7 @@ class Video {
|
||||||
// if we haven't already created and started a preview frame render loop, do so
|
// if we haven't already created and started a preview frame render loop, do so
|
||||||
if (!this._renderPreviewFrame) {
|
if (!this._renderPreviewFrame) {
|
||||||
renderer.updateDrawableProperties(this._drawable, {
|
renderer.updateDrawableProperties(this._drawable, {
|
||||||
|
ghost: this._ghost,
|
||||||
visible: true
|
visible: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue