mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-30 16:10:08 -04:00
Better glows (#152)
* Strip out old script glowing in thread management * Add new tracking mechanism for glowing scripts * Track parents and use them to determine script glows * Use top-block for a thread if there's nothing on the stack * Remove `console.log`
This commit is contained in:
parent
797f844de3
commit
5df0acc895
7 changed files with 107 additions and 28 deletions
src/engine
|
@ -41,6 +41,7 @@ var execute = function (sequencer, thread) {
|
|||
}
|
||||
// Skip through the block.
|
||||
// (either hat with no predicate, or missing op).
|
||||
thread.requestScriptGlowInFrame = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -110,6 +111,12 @@ var execute = function (sequencer, thread) {
|
|||
}
|
||||
});
|
||||
|
||||
if (typeof primitiveReportedValue === 'undefined') {
|
||||
// No value reported - potentially a command block.
|
||||
// Edge-activated hats don't request a glow; all commands do.
|
||||
thread.requestScriptGlowInFrame = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle any reported value from the primitive, either directly returned
|
||||
* or after a promise resolves.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue