<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Runtime - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> <script src="scripts/nav.js" defer></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav > <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="-_StackFrame.html">_StackFrame</a><ul class='methods'><li data-type='method'><a href="-_StackFrame.html#.create">create</a></li><li data-type='method'><a href="-_StackFrame.html#.release">release</a></li><li data-type='method'><a href="-_StackFrame.html#reset">reset</a></li><li data-type='method'><a href="-_StackFrame.html#reuse">reuse</a></li></ul></li><li><a href="BLE.html">BLE</a><ul class='methods'><li data-type='method'><a href="BLE.html#connectPeripheral">connectPeripheral</a></li><li data-type='method'><a href="BLE.html#didReceiveCall">didReceiveCall</a></li><li data-type='method'><a href="BLE.html#disconnect">disconnect</a></li><li data-type='method'><a href="BLE.html#handleDisconnectError">handleDisconnectError</a></li><li data-type='method'><a href="BLE.html#isConnected">isConnected</a></li><li data-type='method'><a href="BLE.html#read">read</a></li><li data-type='method'><a href="BLE.html#requestPeripheral">requestPeripheral</a></li><li data-type='method'><a href="BLE.html#startNotifications">startNotifications</a></li><li data-type='method'><a href="BLE.html#write">write</a></li></ul></li><li><a href="BlockCached.html">BlockCached</a></li><li><a href="Blocks.html">Blocks</a><ul class='methods'><li data-type='method'><a href="Blocks.html#_addScript">_addScript</a></li><li data-type='method'><a href="Blocks.html#_deleteScript">_deleteScript</a></li><li data-type='method'><a href="Blocks.html#_getBackdropField">_getBackdropField</a></li><li data-type='method'><a href="Blocks.html#_getBlockParams">_getBlockParams</a></li><li data-type='method'><a href="Blocks.html#_getCostumeField">_getCostumeField</a></li><li data-type='method'><a href="Blocks.html#_getCustomBlockInternal">_getCustomBlockInternal</a></li><li data-type='method'><a href="Blocks.html#_getSoundField">_getSoundField</a></li><li data-type='method'><a href="Blocks.html#_getSpriteField">_getSpriteField</a></li><li data-type='method'><a href="Blocks.html#blocklyListen">blocklyListen</a></li><li data-type='method'><a href="Blocks.html#blockToXML">blockToXML</a></li><li data-type='method'><a href="Blocks.html#changeBlock">changeBlock</a></li><li data-type='method'><a href="Blocks.html#createBlock">createBlock</a></li><li data-type='method'><a href="Blocks.html#deleteBlock">deleteBlock</a></li><li data-type='method'><a href="Blocks.html#emitProjectChanged">emitProjectChanged</a></li><li data-type='method'><a href="Blocks.html#getAllVariableAndListReferences">getAllVariableAndListReferences</a></li><li data-type='method'><a href="Blocks.html#getBlock">getBlock</a></li><li data-type='method'><a href="Blocks.html#getBranch">getBranch</a></li><li data-type='method'><a href="Blocks.html#getFields">getFields</a></li><li data-type='method'><a href="Blocks.html#getInputs">getInputs</a></li><li data-type='method'><a href="Blocks.html#getMutation">getMutation</a></li><li data-type='method'><a href="Blocks.html#getNextBlock">getNextBlock</a></li><li data-type='method'><a href="Blocks.html#getOpcode">getOpcode</a></li><li data-type='method'><a href="Blocks.html#getProcedureDefinition">getProcedureDefinition</a></li><li data-type='method'><a href="Blocks.html#getProcedureParamNamesAndIds">getProcedureParamNamesAndIds</a></li><li data-type='method'><a href="Blocks.html#getProcedureParamNamesIdsAndDefaults">getProcedureParamNamesIdsAndDefaults</a></li><li data-type='method'><a href="Blocks.html#getScripts">getScripts</a></li><li data-type='method'><a href="Blocks.html#getTopLevelScript">getTopLevelScript</a></li><li data-type='method'><a href="Blocks.html#moveBlock">moveBlock</a></li><li data-type='method'><a href="Blocks.html#mutationToXML">mutationToXML</a></li><li data-type='method'><a href="Blocks.html#resetCache">resetCache</a></li><li data-type='method'><a href="Blocks.html#runAllMonitored">runAllMonitored</a></li><li data-type='method'><a href="Blocks.html#toXML">toXML</a></li><li data-type='method'><a href="Blocks.html#updateAssetName">updateAssetName</a></li><li data-type='method'><a href="Blocks.html#updateBlocksAfterVarRename">updateBlocksAfterVarRename</a></li><li data-type='method'><a href="Blocks.html#updateTargetSpecificBlocks">updateTargetSpecificBlocks</a></li></ul></li><li><a href="Boost.html">Boost</a><ul class='methods'><li data-type='method'><a href="Boost.html#_clearPort">_clearPort</a></li><li data-type='method'><a href="Boost.html#_onConnect">_onConnect</a></li><li data-type='method'><a href="Boost.html#_onMessage">_onMessage</a></li><li data-type='method'><a href="Boost.html#_pingDevice">_pingDevice</a></li><li data-type='method'><a href="Boost.html#_registerSensorOrMotor">_registerSensorOrMotor</a></li><li data-type='method'><a href="Boost.html#boostColorForIndex">boostColorForIndex</a></li><li data-type='method'><a href="Boost.html#connect">connect</a></li><li data-type='method'><a href="Boost.html#disconnect">disconnect</a></li><li data-type='method'><a href="Boost.html#generateInputCommand">generateInputCommand</a></li><li data-type='method'><a href="Boost.html#generateOutputCommand">generateOutputCommand</a></li><li data-type='method'><a href="Boost.html#isConnected">isConnected</a></li><li data-type='method'><a href="Boost.html#motor">motor</a></li><li data-type='method'><a href="Boost.html#reset">reset</a></li><li data-type='method'><a href="Boost.html#scan">scan</a></li><li data-type='method'><a href="Boost.html#send">send</a></li><li data-type='method'><a href="Boost.html#setLED">setLED</a></li><li data-type='method'><a href="Boost.html#setLEDMode">setLEDMode</a></li><li data-type='method'><a href="Boost.html#stopAll">stopAll</a></li><li data-type='method'><a href="Boost.html#stopAllMotors">stopAllMotors</a></li></ul></li><li><a href="BoostMotor.html">BoostMotor</a><ul class='methods'><li data-type='method'><a href="BoostMotor.html#_clearDurationTimeout">_clearDurationTimeout</a></li><li data-type='method'><a href="BoostMotor.html#_clearRotationState">_clearRotationState</a></li><li data-type='method'><a href="BoostMotor.html#_setNewDurationTimeout">_setNewDurationTimeout</a></li><li data-type='method'><a href="BoostMotor.html#_turnOn">_turnOn</a></li><li data-type='method'><a href="BoostMotor.html#turnOff">turnOff</a></li><li data-type='method'><a href="BoostMotor.html#turnOnFor">turnOnFor</a></li><li data-type='method'><a href="BoostMotor.html#turnOnForDegrees">turnOnForDegrees</a></li><li data-type='method'><a href="BoostMotor.html#turnOnForever">turnOnForever</a></li></ul></li><li><a href="BT.html">BT</a><ul class='methods'><li data-type='method'><a href="BT.html#connectPeripheral">connectPeripheral</a></li><li data-type='method'><a href="BT.html#didReceiveCall">didReceiveCall</a></li><li data-type='method'><a href="BT.html#disconnect">disconnect</a></li><li data-type='method'><a href="BT.html#handleDisconnectError">handleDisconnectError</a></li><li data-type='method'><a href="BT.html#isConnected">isConnected</a></li><li data-type='method'><a href="BT.html#requestPeripheral">requestPeripheral</a></li></ul></li><li><a href="CanvasPool.html">CanvasPool</a><ul class='methods'><li data-type='method'><a href="CanvasPool.html#clear">clear</a></li><li data-type='method'><a href="CanvasPool.html#create">create</a></li><li data-type='method'><a href="CanvasPool.html#release">release</a></li></ul></li><li><a href="CentralDispatch.html">CentralDispatch</a><ul class='methods'><li data-type='method'><a href="CentralDispatch.html#_getServiceProvider">_getServiceProvider</a></li><li data-type='method'><a href="CentralDispatch.html#_onDispatchMessage">_onDispatchMessage</a></li><li data-type='method'><a href="CentralDispatch.html#addWorker">addWorker</a></li><li data-type='method'><a href="CentralDispatch.html#callSync">callSync</a></li><li data-type='method'><a href="CentralDispatch.html#setService">setService</a></li><li data-type='method'><a href="CentralDispatch.html#setServiceSync">setServiceSync</a></li></ul></li><li><a href="Clone.html">Clone</a><ul class='methods'><li data-type='method'><a href="Clone.html#.simple">simple</a></li></ul></li><li><a href="Cloud.html">Cloud</a><ul class='methods'><li data-type='method'><a href="Cloud.html#clear">clear</a></li><li data-type='method'><a href="Cloud.html#postData">postData</a></li><li data-type='method'><a href="Cloud.html#requestDeleteVariable">requestDeleteVariable</a></li><li data-type='method'><a href="Cloud.html#requestRenameVariable">requestRenameVariable</a></li><li data-type='method'><a href="Cloud.html#requestUpdateVariable">requestUpdateVariable</a></li><li data-type='method'><a href="Cloud.html#setProvider">setProvider</a></li><li data-type='method'><a href="Cloud.html#setStage">setStage</a></li><li data-type='method'><a href="Cloud.html#updateCloudVariable">updateCloudVariable</a></li></ul></li><li><a href="Comment.html">Comment</a></li><li><a href="EV3Motor.html">EV3Motor</a><ul class='methods'><li data-type='method'><a href="EV3Motor.html#_portMask">_portMask</a></li><li data-type='method'><a href="EV3Motor.html#_runValues">_runValues</a></li><li data-type='method'><a href="EV3Motor.html#coast">coast</a></li><li data-type='method'><a href="EV3Motor.html#coastAfter">coastAfter</a></li><li data-type='method'><a href="EV3Motor.html#turnOnFor">turnOnFor</a></li></ul></li><li><a href="GdxFor.html">GdxFor</a><ul class='methods'><li data-type='method'><a href="GdxFor.html#_onConnect">_onConnect</a></li><li data-type='method'><a href="GdxFor.html#_onSensorValueChanged">_onSensorValueChanged</a></li><li data-type='method'><a href="GdxFor.html#connect">connect</a></li><li data-type='method'><a href="GdxFor.html#disconnect">disconnect</a></li><li data-type='method'><a href="GdxFor.html#isConnected">isConnected</a></li><li data-type='method'><a href="GdxFor.html#reset">reset</a></li><li data-type='method'><a href="GdxFor.html#scan">scan</a></li></ul></li><li><a href="MicroBit.html">MicroBit</a><ul class='methods'><li data-type='method'><a href="MicroBit.html#_checkPinState">_checkPinState</a></li><li data-type='method'><a href="MicroBit.html#_onConnect">_onConnect</a></li><li data-type='method'><a href="MicroBit.html#_onMessage">_onMessage</a></li><li data-type='method'><a href="MicroBit.html#connect">connect</a></li><li data-type='method'><a href="MicroBit.html#disconnect">disconnect</a></li><li data-type='method'><a href="MicroBit.html#displayMatrix">displayMatrix</a></li><li data-type='method'><a href="MicroBit.html#displayText">displayText</a></li><li data-type='method'><a href="MicroBit.html#isConnected">isConnected</a></li><li data-type='method'><a href="MicroBit.html#reset">reset</a></li><li data-type='method'><a href="MicroBit.html#scan">scan</a></li><li data-type='method'><a href="MicroBit.html#send">send</a></li></ul></li><li><a href="Profiler.html">Profiler</a><ul class='methods'><li data-type='method'><a href="Profiler.html#.available">available</a></li><li data-type='method'><a href="Profiler.html#.idByName">idByName</a></li><li data-type='method'><a href="Profiler.html#.nameById">nameById</a></li><li data-type='method'><a href="Profiler.html#frame">frame</a></li><li data-type='method'><a href="Profiler.html#idByName">idByName</a></li><li data-type='method'><a href="Profiler.html#increment">increment</a></li><li data-type='method'><a href="Profiler.html#nameById">nameById</a></li><li data-type='method'><a href="Profiler.html#reportFrames">reportFrames</a></li><li data-type='method'><a href="Profiler.html#start">start</a></li><li data-type='method'><a href="Profiler.html#stop">stop</a></li></ul></li><li><a href="ProfilerFrame.html">ProfilerFrame</a></li><li><a href="RateLimiter.html">RateLimiter</a><ul class='methods'><li data-type='method'><a href="RateLimiter.html#okayToSend">okayToSend</a></li></ul></li><li><a href="RenderedTarget.html">RenderedTarget</a><ul class='methods'><li data-type='method'><a href="RenderedTarget.html#_getRenderedDirectionAndScale">_getRenderedDirectionAndScale</a></li><li data-type='method'><a href="RenderedTarget.html#addCostume">addCostume</a></li><li data-type='method'><a href="RenderedTarget.html#addSound">addSound</a></li><li data-type='method'><a href="RenderedTarget.html#clearEffects">clearEffects</a></li><li data-type='method'><a href="RenderedTarget.html#colorIsTouchingColor">colorIsTouchingColor</a></li><li data-type='method'><a href="RenderedTarget.html#deleteCostume">deleteCostume</a></li><li data-type='method'><a href="RenderedTarget.html#deleteSound">deleteSound</a></li><li data-type='method'><a href="RenderedTarget.html#dispose">dispose</a></li><li data-type='method'><a href="RenderedTarget.html#duplicate">duplicate</a></li><li data-type='method'><a href="RenderedTarget.html#getBounds">getBounds</a></li><li data-type='method'><a href="RenderedTarget.html#getBoundsForBubble">getBoundsForBubble</a></li><li data-type='method'><a href="RenderedTarget.html#getCostumeIndexByName">getCostumeIndexByName</a></li><li data-type='method'><a href="RenderedTarget.html#getCostumes">getCostumes</a></li><li data-type='method'><a href="RenderedTarget.html#getCurrentCostume">getCurrentCostume</a></li><li data-type='method'><a href="RenderedTarget.html#getName">getName</a></li><li data-type='method'><a href="RenderedTarget.html#getSounds">getSounds</a></li><li data-type='method'><a href="RenderedTarget.html#goBackwardLayers">goBackwardLayers</a></li><li data-type='method'><a href="RenderedTarget.html#goBehindOther">goBehindOther</a></li><li data-type='method'><a href="RenderedTarget.html#goForwardLayers">goForwardLayers</a></li><li data-type='method'><a href="RenderedTarget.html#goToBack">goToBack</a></li><li data-type='method'><a href="RenderedTarget.html#goToFront">goToFront</a></li><li data-type='method'><a href="RenderedTarget.html#initAudio">initAudio</a></li><li data-type='method'><a href="RenderedTarget.html#initDrawable">initDrawable</a></li><li data-type='method'><a href="RenderedTarget.html#isSprite">isSprite</a></li><li data-type='method'><a href="RenderedTarget.html#isTouchingColor">isTouchingColor</a></li><li data-type='method'><a href="RenderedTarget.html#isTouchingEdge">isTouchingEdge</a></li><li data-type='method'><a href="RenderedTarget.html#isTouchingObject">isTouchingObject</a></li><li data-type='method'><a href="RenderedTarget.html#isTouchingPoint">isTouchingPoint</a></li><li data-type='method'><a href="RenderedTarget.html#isTouchingSprite">isTouchingSprite</a></li><li data-type='method'><a href="RenderedTarget.html#keepInFence">keepInFence</a></li><li data-type='method'><a href="RenderedTarget.html#makeClone">makeClone</a></li><li data-type='method'><a href="RenderedTarget.html#onGreenFlag">onGreenFlag</a></li><li data-type='method'><a href="RenderedTarget.html#onStopAll">onStopAll</a></li><li data-type='method'><a href="RenderedTarget.html#postSpriteInfo">postSpriteInfo</a></li><li data-type='method'><a href="RenderedTarget.html#renameCostume">renameCostume</a></li><li data-type='method'><a href="RenderedTarget.html#renameSound">renameSound</a></li><li data-type='method'><a href="RenderedTarget.html#reorderCostume">reorderCostume</a></li><li data-type='method'><a href="RenderedTarget.html#reorderSound">reorderSound</a></li><li data-type='method'><a href="RenderedTarget.html#setCostume">setCostume</a></li><li data-type='method'><a href="RenderedTarget.html#setDirection">setDirection</a></li><li data-type='method'><a href="RenderedTarget.html#setDraggable">setDraggable</a></li><li data-type='method'><a href="RenderedTarget.html#setEffect">setEffect</a></li><li data-type='method'><a href="RenderedTarget.html#setRotationStyle">setRotationStyle</a></li><li data-type='method'><a href="RenderedTarget.html#setSay">setSay</a></li><li data-type='method'><a href="RenderedTarget.html#setSize">setSize</a></li><li data-type='method'><a href="RenderedTarget.html#setVisible">setVisible</a></li><li data-type='method'><a href="RenderedTarget.html#setXY">setXY</a></li><li data-type='method'><a href="RenderedTarget.html#startDrag">startDrag</a></li><li data-type='method'><a href="RenderedTarget.html#stopDrag">stopDrag</a></li><li data-type='method'><a href="RenderedTarget.html#toJSON">toJSON</a></li><li data-type='method'><a href="RenderedTarget.html#updateAllDrawableProperties">updateAllDrawableProperties</a></li></ul></li><li><a href="Runtime.html">Runtime</a><ul class='methods'><li data-type='method'><a href="Runtime.html#_buildCustomFieldTypeForScratchBlocks">_buildCustomFieldTypeForScratchBlocks</a></li><li data-type='method'><a href="Runtime.html#_buildMenuForScratchBlocks">_buildMenuForScratchBlocks</a></li><li data-type='method'><a href="Runtime.html#_constructInlineImageJson">_constructInlineImageJson</a></li><li data-type='method'><a href="Runtime.html#_convertBlockForScratchBlocks">_convertBlockForScratchBlocks</a></li><li data-type='method'><a href="Runtime.html#_convertButtonForScratchBlocks">_convertButtonForScratchBlocks</a></li><li data-type='method'><a href="Runtime.html#_convertForScratchBlocks">_convertForScratchBlocks</a></li><li data-type='method'><a href="Runtime.html#_convertMenuItems">_convertMenuItems</a></li><li data-type='method'><a href="Runtime.html#_convertPlaceholders">_convertPlaceholders</a></li><li data-type='method'><a href="Runtime.html#_convertSeparatorForScratchBlocks">_convertSeparatorForScratchBlocks</a></li><li data-type='method'><a href="Runtime.html#_defaultScratchLinkSocketFactory">_defaultScratchLinkSocketFactory</a></li><li data-type='method'><a href="Runtime.html#_emitProjectRunStatus">_emitProjectRunStatus</a></li><li data-type='method'><a href="Runtime.html#_fillExtensionCategory">_fillExtensionCategory</a></li><li data-type='method'><a href="Runtime.html#_getMonitorThreadCount">_getMonitorThreadCount</a></li><li data-type='method'><a href="Runtime.html#_makeExtensionMenuId">_makeExtensionMenuId</a></li><li data-type='method'><a href="Runtime.html#_pushMonitors">_pushMonitors</a></li><li data-type='method'><a href="Runtime.html#_pushThread">_pushThread</a></li><li data-type='method'><a href="Runtime.html#_refreshExtensionPrimitives">_refreshExtensionPrimitives</a></li><li data-type='method'><a href="Runtime.html#_registerBlockPackages">_registerBlockPackages</a></li><li data-type='method'><a href="Runtime.html#_registerExtensionPrimitives">_registerExtensionPrimitives</a></li><li data-type='method'><a href="Runtime.html#_restartThread">_restartThread</a></li><li data-type='method'><a href="Runtime.html#_step">_step</a></li><li data-type='method'><a href="Runtime.html#_stopThread">_stopThread</a></li><li data-type='method'><a href="Runtime.html#_updateGlows">_updateGlows</a></li><li data-type='method'><a href="Runtime.html#addMonitorScript">addMonitorScript</a></li><li data-type='method'><a href="Runtime.html#addTarget">addTarget</a></li><li data-type='method'><a href="Runtime.html#allScriptsDo">allScriptsDo</a></li><li data-type='method'><a href="Runtime.html#attachAudioEngine">attachAudioEngine</a></li><li data-type='method'><a href="Runtime.html#attachRenderer">attachRenderer</a></li><li data-type='method'><a href="Runtime.html#attachStorage">attachStorage</a></li><li data-type='method'><a href="Runtime.html#attachV2BitmapAdapter">attachV2BitmapAdapter</a></li><li data-type='method'><a href="Runtime.html#attachV2SVGAdapter">attachV2SVGAdapter</a></li><li data-type='method'><a href="Runtime.html#changeCloneCounter">changeCloneCounter</a></li><li data-type='method'><a href="Runtime.html#clonesAvailable">clonesAvailable</a></li><li data-type='method'><a href="Runtime.html#configureScratchLinkSocketFactory">configureScratchLinkSocketFactory</a></li><li data-type='method'><a href="Runtime.html#connectPeripheral">connectPeripheral</a></li><li data-type='method'><a href="Runtime.html#createNewGlobalVariable">createNewGlobalVariable</a></li><li data-type='method'><a href="Runtime.html#disableProfiling">disableProfiling</a></li><li data-type='method'><a href="Runtime.html#disconnectPeripheral">disconnectPeripheral</a></li><li data-type='method'><a href="Runtime.html#dispose">dispose</a></li><li data-type='method'><a href="Runtime.html#disposeTarget">disposeTarget</a></li><li data-type='method'><a href="Runtime.html#emitBlockDragUpdate">emitBlockDragUpdate</a></li><li data-type='method'><a href="Runtime.html#emitBlockEndDrag">emitBlockEndDrag</a></li><li data-type='method'><a href="Runtime.html#emitMicListening">emitMicListening</a></li><li data-type='method'><a href="Runtime.html#emitProjectChanged">emitProjectChanged</a></li><li data-type='method'><a href="Runtime.html#emitProjectLoaded">emitProjectLoaded</a></li><li data-type='method'><a href="Runtime.html#enableProfiling">enableProfiling</a></li><li data-type='method'><a href="Runtime.html#fireTargetWasCreated">fireTargetWasCreated</a></li><li data-type='method'><a href="Runtime.html#fireTargetWasRemoved">fireTargetWasRemoved</a></li><li data-type='method'><a href="Runtime.html#getBlocksJSON">getBlocksJSON</a></li><li data-type='method'><a href="Runtime.html#getBlocksXML">getBlocksXML</a></li><li data-type='method'><a href="Runtime.html#getEditingTarget">getEditingTarget</a></li><li data-type='method'><a href="Runtime.html#getIsEdgeActivatedHat">getIsEdgeActivatedHat</a></li><li data-type='method'><a href="Runtime.html#getIsHat">getIsHat</a></li><li data-type='method'><a href="Runtime.html#getLabelForOpcode">getLabelForOpcode</a></li><li data-type='method'><a href="Runtime.html#getOpcodeFunction">getOpcodeFunction</a></li><li data-type='method'><a href="Runtime.html#getPeripheralIsConnected">getPeripheralIsConnected</a></li><li data-type='method'><a href="Runtime.html#getScratchLinkSocket">getScratchLinkSocket</a></li><li data-type='method'><a href="Runtime.html#getSpriteTargetByName">getSpriteTargetByName</a></li><li data-type='method'><a href="Runtime.html#getTargetByDrawableId">getTargetByDrawableId</a></li><li data-type='method'><a href="Runtime.html#getTargetById">getTargetById</a></li><li data-type='method'><a href="Runtime.html#getTargetForStage">getTargetForStage</a></li><li data-type='method'><a href="Runtime.html#glowBlock">glowBlock</a></li><li data-type='method'><a href="Runtime.html#glowScript">glowScript</a></li><li data-type='method'><a href="Runtime.html#greenFlag">greenFlag</a></li><li data-type='method'><a href="Runtime.html#isActiveThread">isActiveThread</a></li><li data-type='method'><a href="Runtime.html#isWaitingThread">isWaitingThread</a></li><li data-type='method'><a href="Runtime.html#makeMessageContextForTarget">makeMessageContextForTarget</a></li><li data-type='method'><a href="Runtime.html#moveExecutable">moveExecutable</a></li><li data-type='method'><a href="Runtime.html#quietGlow">quietGlow</a></li><li data-type='method'><a href="Runtime.html#registerPeripheralExtension">registerPeripheralExtension</a></li><li data-type='method'><a href="Runtime.html#removeExecutable">removeExecutable</a></li><li data-type='method'><a href="Runtime.html#requestAddMonitor">requestAddMonitor</a></li><li data-type='method'><a href="Runtime.html#requestBlocksUpdate">requestBlocksUpdate</a></li><li data-type='method'><a href="Runtime.html#requestHideMonitor">requestHideMonitor</a></li><li data-type='method'><a href="Runtime.html#requestRedraw">requestRedraw</a></li><li data-type='method'><a href="Runtime.html#requestRemoveMonitor">requestRemoveMonitor</a></li><li data-type='method'><a href="Runtime.html#requestRemoveMonitorByTargetId">requestRemoveMonitorByTargetId</a></li><li data-type='method'><a href="Runtime.html#requestShowMonitor">requestShowMonitor</a></li><li data-type='method'><a href="Runtime.html#requestTargetsUpdate">requestTargetsUpdate</a></li><li data-type='method'><a href="Runtime.html#requestToolboxExtensionsUpdate">requestToolboxExtensionsUpdate</a></li><li data-type='method'><a href="Runtime.html#requestUpdateMonitor">requestUpdateMonitor</a></li><li data-type='method'><a href="Runtime.html#scanForPeripheral">scanForPeripheral</a></li><li data-type='method'><a href="Runtime.html#setCompatibilityMode">setCompatibilityMode</a></li><li data-type='method'><a href="Runtime.html#setEditingTarget">setEditingTarget</a></li><li data-type='method'><a href="Runtime.html#setExecutablePosition">setExecutablePosition</a></li><li data-type='method'><a href="Runtime.html#start">start</a></li><li data-type='method'><a href="Runtime.html#startHats">startHats</a></li><li data-type='method'><a href="Runtime.html#stopAll">stopAll</a></li><li data-type='method'><a href="Runtime.html#stopForTarget">stopForTarget</a></li><li data-type='method'><a href="Runtime.html#toggleScript">toggleScript</a></li><li data-type='method'><a href="Runtime.html#updateCurrentMSecs">updateCurrentMSecs</a></li><li data-type='method'><a href="Runtime.html#visualReport">visualReport</a></li></ul></li><li><a href="global.html#RuntimeScriptCache">RuntimeScriptCache</a></li><li><a href="Scratch3BoostBlocks.html">Scratch3BoostBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3BoostBlocks.html#_forEachMotor">_forEachMotor</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#_getTiltAngle">_getTiltAngle</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#_isTilted">_isTilted</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#getMotorPosition">getMotorPosition</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#getTiltAngle">getTiltAngle</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#isTilted">isTilted</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#motorOff">motorOff</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#motorOn">motorOn</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#motorOnFor">motorOnFor</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#motorOnForRotation">motorOnForRotation</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#seeingColor">seeingColor</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#setLightHue">setLightHue</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#setMotorDirection">setMotorDirection</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#setMotorPower">setMotorPower</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#whenColor">whenColor</a></li><li data-type='method'><a href="Scratch3BoostBlocks.html#whenTilted">whenTilted</a></li></ul></li><li><a href="Scratch3CoreExample.html">Scratch3CoreExample</a><ul class='methods'><li data-type='method'><a href="Scratch3CoreExample.html#exampleOpcode">exampleOpcode</a></li><li data-type='method'><a href="Scratch3CoreExample.html#getInfo">getInfo</a></li></ul></li><li><a href="Scratch3Ev3Blocks.html">Scratch3Ev3Blocks</a><ul class='methods'><li data-type='method'><a href="Scratch3Ev3Blocks.html#_forEachMotor">_forEachMotor</a></li><li data-type='method'><a href="Scratch3Ev3Blocks.html#_formatMenu">_formatMenu</a></li><li data-type='method'><a href="Scratch3Ev3Blocks.html#getInfo">getInfo</a></li></ul></li><li><a href="Scratch3GdxForBlocks.html">Scratch3GdxForBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3GdxForBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3GdxForBlocks.html#magnitude">magnitude</a></li></ul></li><li><a href="Scratch3MakeyMakeyBlocks.html">Scratch3MakeyMakeyBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3MakeyMakeyBlocks.html#_clearkeyPressBuffer">_clearkeyPressBuffer</a></li><li data-type='method'><a href="Scratch3MakeyMakeyBlocks.html#getInfo">getInfo</a></li></ul></li><li><a href="Scratch3MicroBitBlocks.html">Scratch3MicroBitBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3MicroBitBlocks.html#_getTiltAngle">_getTiltAngle</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#_isTilted">_isTilted</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#displayClear">displayClear</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#displaySymbol">displaySymbol</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#displayText">displayText</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#getTiltAngle">getTiltAngle</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#isButtonPressed">isButtonPressed</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#isTilted">isTilted</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#whenButtonPressed">whenButtonPressed</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#whenGesture">whenGesture</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#whenPinConnected">whenPinConnected</a></li><li data-type='method'><a href="Scratch3MicroBitBlocks.html#whenTilted">whenTilted</a></li></ul></li><li><a href="Scratch3MusicBlocks.html">Scratch3MusicBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3MusicBlocks.html#_beatsToSec">_beatsToSec</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_buildMenu">_buildMenu</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_checkStackTimer">_checkStackTimer</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_clampBeats">_clampBeats</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_decodeSound">_decodeSound</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_getMusicState">_getMusicState</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_loadAllSounds">_loadAllSounds</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_onTargetCreated">_onTargetCreated</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_playDrumForBeats">_playDrumForBeats</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_playDrumNum">_playDrumNum</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_playNote">_playNote</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_ratioForPitchInterval">_ratioForPitchInterval</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_selectSampleIndexForNote">_selectSampleIndexForNote</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_setInstrument">_setInstrument</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_stackTimerNeedsInit">_stackTimerNeedsInit</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_startStackTimer">_startStackTimer</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_storeSound">_storeSound</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#_updateTempo">_updateTempo</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#changeTempo">changeTempo</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#getTempo">getTempo</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#midiPlayDrumForBeats">midiPlayDrumForBeats</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#midiSetInstrument">midiSetInstrument</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#playDrumForBeats">playDrumForBeats</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#playNoteForBeats">playNoteForBeats</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#restForBeats">restForBeats</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#setInstrument">setInstrument</a></li><li data-type='method'><a href="Scratch3MusicBlocks.html#setTempo">setTempo</a></li></ul></li><li><a href="Scratch3PenBlocks.html">Scratch3PenBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3PenBlocks.html#_alphaToTransparency">_alphaToTransparency</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_clampColorParam">_clampColorParam</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_clampPenSize">_clampPenSize</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_getPenLayerID">_getPenLayerID</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_getPenState">_getPenState</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_initColorParam">_initColorParam</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_legacyUpdatePenColor">_legacyUpdatePenColor</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_onTargetCreated">_onTargetCreated</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_onTargetMoved">_onTargetMoved</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_setOrChangeColorParam">_setOrChangeColorParam</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_transparencyToAlpha">_transparencyToAlpha</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_updatePenColor">_updatePenColor</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#_wrapColor">_wrapColor</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#changePenColorParamBy">changePenColorParamBy</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#changePenHueBy">changePenHueBy</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#changePenShadeBy">changePenShadeBy</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#changePenSizeBy">changePenSizeBy</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#clear">clear</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#penDown">penDown</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#penUp">penUp</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#setPenColorParamTo">setPenColorParamTo</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#setPenColorToColor">setPenColorToColor</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#setPenHueToNumber">setPenHueToNumber</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#setPenShadeToNumber">setPenShadeToNumber</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#setPenSizeTo">setPenSizeTo</a></li><li data-type='method'><a href="Scratch3PenBlocks.html#stamp">stamp</a></li></ul></li><li><a href="Scratch3Text2SpeechBlocks.html">Scratch3Text2SpeechBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#_getExtensionLocaleForSupportedLocale">_getExtensionLocaleForSupportedLocale</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#_getSpeechSynthLocale">_getSpeechSynthLocale</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#_getState">_getState</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#_getSupportedLocales">_getSupportedLocales</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#_onTargetCreated">_onTargetCreated</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#_stopAllSpeech">_stopAllSpeech</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#getCurrentLanguage">getCurrentLanguage</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#getEditorLanguage">getEditorLanguage</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#getLanguageMenu">getLanguageMenu</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#getVoiceMenu">getVoiceMenu</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#isSupportedLanguage">isSupportedLanguage</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#setCurrentLanguage">setCurrentLanguage</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#setLanguage">setLanguage</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#setVoice">setVoice</a></li><li data-type='method'><a href="Scratch3Text2SpeechBlocks.html#speakAndWait">speakAndWait</a></li></ul></li><li><a href="Scratch3TranslateBlocks.html">Scratch3TranslateBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3TranslateBlocks.html#_getSupportedLanguages">_getSupportedLanguages</a></li><li data-type='method'><a href="Scratch3TranslateBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3TranslateBlocks.html#getLanguageCodeFromArg">getLanguageCodeFromArg</a></li><li data-type='method'><a href="Scratch3TranslateBlocks.html#getTranslate">getTranslate</a></li><li data-type='method'><a href="Scratch3TranslateBlocks.html#getViewerLanguage">getViewerLanguage</a></li><li data-type='method'><a href="Scratch3TranslateBlocks.html#getViewerLanguageCode">getViewerLanguageCode</a></li></ul></li><li><a href="Scratch3VideoSensingBlocks.html">Scratch3VideoSensingBlocks</a><ul class='methods'><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#_analyzeLocalMotion">_analyzeLocalMotion</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#_buildMenu">_buildMenu</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#_getMotionState">_getMotionState</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#_loop">_loop</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#reset">reset</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#setVideoTransparency">setVideoTransparency</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#updateVideoDisplay">updateVideoDisplay</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#videoOn">videoOn</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#videoToggle">videoToggle</a></li><li data-type='method'><a href="Scratch3VideoSensingBlocks.html#whenMotionGreaterThan">whenMotionGreaterThan</a></li></ul></li><li><a href="Scratch3WeDo2Blocks.html">Scratch3WeDo2Blocks</a><ul class='methods'><li data-type='method'><a href="Scratch3WeDo2Blocks.html#_forEachMotor">_forEachMotor</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#_getTiltAngle">_getTiltAngle</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#_isTilted">_isTilted</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#_noteToTone">_noteToTone</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#getDistance">getDistance</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#getInfo">getInfo</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#getTiltAngle">getTiltAngle</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#isTilted">isTilted</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#motorOff">motorOff</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#motorOn">motorOn</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#motorOnFor">motorOnFor</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#playNoteFor">playNoteFor</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#setLightHue">setLightHue</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#setMotorDirection">setMotorDirection</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#startMotorPower">startMotorPower</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#whenDistance">whenDistance</a></li><li data-type='method'><a href="Scratch3WeDo2Blocks.html#whenTilted">whenTilted</a></li></ul></li><li><a href="ScratchLinkDeviceAdapter.html">ScratchLinkDeviceAdapter</a></li><li><a href="ScratchLinkWebSocket.html">ScratchLinkWebSocket</a></li><li><a href="SharedDispatch.html">SharedDispatch</a><ul class='methods'><li data-type='method'><a href="SharedDispatch.html#_deliverResponse">_deliverResponse</a></li><li data-type='method'><a href="SharedDispatch.html#_getServiceProvider">_getServiceProvider</a></li><li data-type='method'><a href="SharedDispatch.html#_isRemoteService">_isRemoteService</a></li><li data-type='method'><a href="SharedDispatch.html#_onDispatchMessage">_onDispatchMessage</a></li><li data-type='method'><a href="SharedDispatch.html#_onMessage">_onMessage</a></li><li data-type='method'><a href="SharedDispatch.html#_remoteCall">_remoteCall</a></li><li data-type='method'><a href="SharedDispatch.html#_remoteTransferCall">_remoteTransferCall</a></li><li data-type='method'><a href="SharedDispatch.html#_storeCallbacks">_storeCallbacks</a></li><li data-type='method'><a href="SharedDispatch.html#call">call</a></li><li data-type='method'><a href="SharedDispatch.html#transferCall">transferCall</a></li></ul></li><li><a href="Sprite.html">Sprite</a><ul class='methods'><li data-type='method'><a href="Sprite.html#addCostumeAt">addCostumeAt</a></li><li data-type='method'><a href="Sprite.html#createClone">createClone</a></li><li data-type='method'><a href="Sprite.html#deleteCostumeAt">deleteCostumeAt</a></li><li data-type='method'><a href="Sprite.html#removeClone">removeClone</a></li></ul></li><li><a href="Target.html">Target</a><ul class='methods'><li data-type='method'><a href="Target.html#clearEdgeActivatedValues">clearEdgeActivatedValues</a></li><li data-type='method'><a href="Target.html#createComment">createComment</a></li><li data-type='method'><a href="Target.html#createVariable">createVariable</a></li><li data-type='method'><a href="Target.html#deleteMonitors">deleteMonitors</a></li><li data-type='method'><a href="Target.html#deleteVariable">deleteVariable</a></li><li data-type='method'><a href="Target.html#dispose">dispose</a></li><li data-type='method'><a href="Target.html#duplicateVariable">duplicateVariable</a></li><li data-type='method'><a href="Target.html#duplicateVariables">duplicateVariables</a></li><li data-type='method'><a href="Target.html#fixUpVariableReferences">fixUpVariableReferences</a></li><li data-type='method'><a href="Target.html#getAllVariableNamesInScopeByType">getAllVariableNamesInScopeByType</a></li><li data-type='method'><a href="Target.html#getCustomState">getCustomState</a></li><li data-type='method'><a href="Target.html#getName">getName</a></li><li data-type='method'><a href="Target.html#lookupBroadcastByInputValue">lookupBroadcastByInputValue</a></li><li data-type='method'><a href="Target.html#lookupBroadcastMsg">lookupBroadcastMsg</a></li><li data-type='method'><a href="Target.html#lookupOrCreateList">lookupOrCreateList</a></li><li data-type='method'><a href="Target.html#lookupOrCreateVariable">lookupOrCreateVariable</a></li><li data-type='method'><a href="Target.html#lookupVariableById">lookupVariableById</a></li><li data-type='method'><a href="Target.html#lookupVariableByNameAndType">lookupVariableByNameAndType</a></li><li data-type='method'><a href="Target.html#mergeVariables">mergeVariables</a></li><li data-type='method'><a href="Target.html#onGreenFlag">onGreenFlag</a></li><li data-type='method'><a href="Target.html#postSpriteInfo">postSpriteInfo</a></li><li data-type='method'><a href="Target.html#renameVariable">renameVariable</a></li><li data-type='method'><a href="Target.html#resolveVariableSharingConflictsWithTarget">resolveVariableSharingConflictsWithTarget</a></li><li data-type='method'><a href="Target.html#setCustomState">setCustomState</a></li><li data-type='method'><a href="Target.html#shareLocalVariableToSprite">shareLocalVariableToSprite</a></li><li data-type='method'><a href="Target.html#shareLocalVariableToStage">shareLocalVariableToStage</a></li><li data-type='method'><a href="Target.html#updateEdgeActivatedValue">updateEdgeActivatedValue</a></li></ul></li><li><a href="TaskQueue.html">TaskQueue</a><ul class='methods'><li data-type='method'><a href="TaskQueue.html#_refill">_refill</a></li><li data-type='method'><a href="TaskQueue.html#_refillAndSpend">_refillAndSpend</a></li><li data-type='method'><a href="TaskQueue.html#_runTasks">_runTasks</a></li><li data-type='method'><a href="TaskQueue.html#_spend">_spend</a></li><li data-type='method'><a href="TaskQueue.html#cancel">cancel</a></li><li data-type='method'><a href="TaskQueue.html#cancelAll">cancelAll</a></li><li data-type='method'><a href="TaskQueue.html#do">do</a></li></ul></li><li><a href="Thread.html">Thread</a><ul class='methods'><li data-type='method'><a href="Thread.html#atStackTop">atStackTop</a></li><li data-type='method'><a href="Thread.html#getParam">getParam</a></li><li data-type='method'><a href="Thread.html#goToNextBlock">goToNextBlock</a></li><li data-type='method'><a href="Thread.html#initParams">initParams</a></li><li data-type='method'><a href="Thread.html#isRecursiveCall">isRecursiveCall</a></li><li data-type='method'><a href="Thread.html#peekParentStackFrame">peekParentStackFrame</a></li><li data-type='method'><a href="Thread.html#peekStack">peekStack</a></li><li data-type='method'><a href="Thread.html#peekStackFrame">peekStackFrame</a></li><li data-type='method'><a href="Thread.html#popStack">popStack</a></li><li data-type='method'><a href="Thread.html#pushParam">pushParam</a></li><li data-type='method'><a href="Thread.html#pushReportedValue">pushReportedValue</a></li><li data-type='method'><a href="Thread.html#pushStack">pushStack</a></li><li data-type='method'><a href="Thread.html#reuseStackForNextBlock">reuseStackForNextBlock</a></li><li data-type='method'><a href="Thread.html#stopThisScript">stopThisScript</a></li></ul></li><li><a href="Variable.html">Variable</a></li><li><a href="VideoMotion.html">VideoMotion</a><ul class='methods'><li data-type='method'><a href="VideoMotion.html#addFrame">addFrame</a></li><li data-type='method'><a href="VideoMotion.html#analyzeFrame">analyzeFrame</a></li><li data-type='method'><a href="VideoMotion.html#getLocalMotion">getLocalMotion</a></li><li data-type='method'><a href="VideoMotion.html#reset">reset</a></li></ul></li><li><a href="VideoMotionView.html">VideoMotionView</a><ul class='methods'><li data-type='method'><a href="VideoMotionView.html#_components">_components</a></li><li data-type='method'><a href="VideoMotionView.html#_eachAddress">_eachAddress</a></li><li data-type='method'><a href="VideoMotionView.html#_eachCell">_eachCell</a></li><li data-type='method'><a href="VideoMotionView.html#_grads">_grads</a></li><li data-type='method'><a href="VideoMotionView.html#draw">draw</a></li></ul></li><li><a href="VirtualMachine.html">VirtualMachine</a><ul class='methods'><li data-type='method'><a href="VirtualMachine.html#_addSprite2">_addSprite2</a></li><li data-type='method'><a href="VirtualMachine.html#_addSprite3">_addSprite3</a></li><li data-type='method'><a href="VirtualMachine.html#addBackdrop">addBackdrop</a></li><li data-type='method'><a href="VirtualMachine.html#addCostume">addCostume</a></li><li data-type='method'><a href="VirtualMachine.html#addCostumeFromLibrary">addCostumeFromLibrary</a></li><li data-type='method'><a href="VirtualMachine.html#addSound">addSound</a></li><li data-type='method'><a href="VirtualMachine.html#addSprite">addSprite</a></li><li data-type='method'><a href="VirtualMachine.html#attachAudioEngine">attachAudioEngine</a></li><li data-type='method'><a href="VirtualMachine.html#attachRenderer">attachRenderer</a></li><li data-type='method'><a href="VirtualMachine.html#attachStorage">attachStorage</a></li><li data-type='method'><a href="VirtualMachine.html#attachV2BitmapAdapter">attachV2BitmapAdapter</a></li><li data-type='method'><a href="VirtualMachine.html#attachV2SVGAdapter">attachV2SVGAdapter</a></li><li data-type='method'><a href="VirtualMachine.html#blockListener">blockListener</a></li><li data-type='method'><a href="VirtualMachine.html#clear">clear</a></li><li data-type='method'><a href="VirtualMachine.html#configureScratchLinkSocketFactory">configureScratchLinkSocketFactory</a></li><li data-type='method'><a href="VirtualMachine.html#connectPeripheral">connectPeripheral</a></li><li data-type='method'><a href="VirtualMachine.html#deleteCostume">deleteCostume</a></li><li data-type='method'><a href="VirtualMachine.html#deleteSound">deleteSound</a></li><li data-type='method'><a href="VirtualMachine.html#deleteSprite">deleteSprite</a></li><li data-type='method'><a href="VirtualMachine.html#deserializeProject">deserializeProject</a></li><li data-type='method'><a href="VirtualMachine.html#disconnectPeripheral">disconnectPeripheral</a></li><li data-type='method'><a href="VirtualMachine.html#downloadProjectId">downloadProjectId</a></li><li data-type='method'><a href="VirtualMachine.html#duplicateCostume">duplicateCostume</a></li><li data-type='method'><a href="VirtualMachine.html#duplicateSound">duplicateSound</a></li><li data-type='method'><a href="VirtualMachine.html#duplicateSprite">duplicateSprite</a></li><li data-type='method'><a href="VirtualMachine.html#emitTargetsUpdate">emitTargetsUpdate</a></li><li data-type='method'><a href="VirtualMachine.html#emitWorkspaceUpdate">emitWorkspaceUpdate</a></li><li data-type='method'><a href="VirtualMachine.html#exportSprite">exportSprite</a></li><li data-type='method'><a href="VirtualMachine.html#flyoutBlockListener">flyoutBlockListener</a></li><li data-type='method'><a href="VirtualMachine.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="VirtualMachine.html#getCostume">getCostume</a></li><li data-type='method'><a href="VirtualMachine.html#getLocale">getLocale</a></li><li data-type='method'><a href="VirtualMachine.html#getPeripheralIsConnected">getPeripheralIsConnected</a></li><li data-type='method'><a href="VirtualMachine.html#getPlaygroundData">getPlaygroundData</a></li><li data-type='method'><a href="VirtualMachine.html#getSoundBuffer">getSoundBuffer</a></li><li data-type='method'><a href="VirtualMachine.html#getTargetIdForDrawableId">getTargetIdForDrawableId</a></li><li data-type='method'><a href="VirtualMachine.html#getVariableValue">getVariableValue</a></li><li data-type='method'><a href="VirtualMachine.html#greenFlag">greenFlag</a></li><li data-type='method'><a href="VirtualMachine.html#installTargets">installTargets</a></li><li data-type='method'><a href="VirtualMachine.html#loadProject">loadProject</a></li><li data-type='method'><a href="VirtualMachine.html#monitorBlockListener">monitorBlockListener</a></li><li data-type='method'><a href="VirtualMachine.html#postIOData">postIOData</a></li><li data-type='method'><a href="VirtualMachine.html#postSpriteInfo">postSpriteInfo</a></li><li data-type='method'><a href="VirtualMachine.html#refreshWorkspace">refreshWorkspace</a></li><li data-type='method'><a href="VirtualMachine.html#renameCostume">renameCostume</a></li><li data-type='method'><a href="VirtualMachine.html#renameSound">renameSound</a></li><li data-type='method'><a href="VirtualMachine.html#renameSprite">renameSprite</a></li><li data-type='method'><a href="VirtualMachine.html#reorderCostume">reorderCostume</a></li><li data-type='method'><a href="VirtualMachine.html#reorderSound">reorderSound</a></li><li data-type='method'><a href="VirtualMachine.html#reorderTarget">reorderTarget</a></li><li data-type='method'><a href="VirtualMachine.html#saveProjectSb3">saveProjectSb3</a></li><li data-type='method'><a href="VirtualMachine.html#scanForPeripheral">scanForPeripheral</a></li><li data-type='method'><a href="VirtualMachine.html#setCompatibilityMode">setCompatibilityMode</a></li><li data-type='method'><a href="VirtualMachine.html#setEditingTarget">setEditingTarget</a></li><li data-type='method'><a href="VirtualMachine.html#setLocale">setLocale</a></li><li data-type='method'><a href="VirtualMachine.html#setTurboMode">setTurboMode</a></li><li data-type='method'><a href="VirtualMachine.html#setVariableValue">setVariableValue</a></li><li data-type='method'><a href="VirtualMachine.html#shareBlocksToTarget">shareBlocksToTarget</a></li><li data-type='method'><a href="VirtualMachine.html#shareCostumeToTarget">shareCostumeToTarget</a></li><li data-type='method'><a href="VirtualMachine.html#shareSoundToTarget">shareSoundToTarget</a></li><li data-type='method'><a href="VirtualMachine.html#start">start</a></li><li data-type='method'><a href="VirtualMachine.html#startDrag">startDrag</a></li><li data-type='method'><a href="VirtualMachine.html#stopAll">stopAll</a></li><li data-type='method'><a href="VirtualMachine.html#stopDrag">stopDrag</a></li><li data-type='method'><a href="VirtualMachine.html#toJSON">toJSON</a></li><li data-type='method'><a href="VirtualMachine.html#updateBitmap">updateBitmap</a></li><li data-type='method'><a href="VirtualMachine.html#updateSoundBuffer">updateSoundBuffer</a></li><li data-type='method'><a href="VirtualMachine.html#updateSvg">updateSvg</a></li><li data-type='method'><a href="VirtualMachine.html#variableListener">variableListener</a></li></ul></li><li><a href="WeDo2.html">WeDo2</a><ul class='methods'><li data-type='method'><a href="WeDo2.html#_checkBatteryLevel">_checkBatteryLevel</a></li><li data-type='method'><a href="WeDo2.html#_clearPort">_clearPort</a></li><li data-type='method'><a href="WeDo2.html#_onConnect">_onConnect</a></li><li data-type='method'><a href="WeDo2.html#_onMessage">_onMessage</a></li><li data-type='method'><a href="WeDo2.html#_registerSensorOrMotor">_registerSensorOrMotor</a></li><li data-type='method'><a href="WeDo2.html#connect">connect</a></li><li data-type='method'><a href="WeDo2.html#disconnect">disconnect</a></li><li data-type='method'><a href="WeDo2.html#generateInputCommand">generateInputCommand</a></li><li data-type='method'><a href="WeDo2.html#generateOutputCommand">generateOutputCommand</a></li><li data-type='method'><a href="WeDo2.html#isConnected">isConnected</a></li><li data-type='method'><a href="WeDo2.html#motor">motor</a></li><li data-type='method'><a href="WeDo2.html#playTone">playTone</a></li><li data-type='method'><a href="WeDo2.html#reset">reset</a></li><li data-type='method'><a href="WeDo2.html#scan">scan</a></li><li data-type='method'><a href="WeDo2.html#send">send</a></li><li data-type='method'><a href="WeDo2.html#setLED">setLED</a></li><li data-type='method'><a href="WeDo2.html#setLEDMode">setLEDMode</a></li><li data-type='method'><a href="WeDo2.html#stopAll">stopAll</a></li><li data-type='method'><a href="WeDo2.html#stopAllMotors">stopAllMotors</a></li><li data-type='method'><a href="WeDo2.html#stopLED">stopLED</a></li><li data-type='method'><a href="WeDo2.html#stopTone">stopTone</a></li></ul></li><li><a href="WeDo2Motor.html">WeDo2Motor</a><ul class='methods'><li data-type='method'><a href="WeDo2Motor.html#_clearTimeout">_clearTimeout</a></li><li data-type='method'><a href="WeDo2Motor.html#_setNewTimeout">_setNewTimeout</a></li><li data-type='method'><a href="WeDo2Motor.html#startBraking">startBraking</a></li><li data-type='method'><a href="WeDo2Motor.html#turnOff">turnOff</a></li><li data-type='method'><a href="WeDo2Motor.html#turnOn">turnOn</a></li><li data-type='method'><a href="WeDo2Motor.html#turnOnFor">turnOnFor</a></li></ul></li><li><a href="WeDo2Motor.BRAKE_TIME_MS.html">BRAKE_TIME_MS</a></li><li><a href="WorkerDispatch.html">WorkerDispatch</a><ul class='methods'><li data-type='method'><a href="WorkerDispatch.html#_getServiceProvider">_getServiceProvider</a></li><li data-type='method'><a href="WorkerDispatch.html#_onDispatchMessage">_onDispatchMessage</a></li><li data-type='method'><a href="WorkerDispatch.html#setService">setService</a></li></ul></li></ul><h3>Events</h3><ul><li><a href="Runtime.html#event:targetWasCreated">targetWasCreated</a></li></ul><h3>Global</h3><ul><li><a href="global.html#_motionVectorOut">_motionVectorOut</a></li><li><a href="global.html#_prepareBlockProfiling">_prepareBlockProfiling</a></li><li><a href="global.html#_RuntimeScriptCache">_RuntimeScriptCache</a></li><li><a href="global.html#_stackFrameFreeList">_stackFrameFreeList</a></li><li><a href="global.html#_videoMotionViewComponentsTmp">_videoMotionViewComponentsTmp</a></li><li><a href="global.html#adapter">adapter</a></li><li><a href="global.html#addExtensionOp">addExtensionOp</a></li><li><a href="global.html#ALTO_ID">ALTO_ID</a></li><li><a href="global.html#AMOUNT_SCALE">AMOUNT_SCALE</a></li><li><a href="global.html#ARABIC_ID">ARABIC_ID</a></li><li><a href="global.html#ArgumentType">ArgumentType</a></li><li><a href="global.html#ArgumentTypeMap">ArgumentTypeMap</a></li><li><a href="global.html#assetData">assetData</a></li><li><a href="global.html#AxisValues">AxisValues</a></li><li><a href="global.html#BLEBatteryCheckInterval">BLEBatteryCheckInterval</a></li><li><a href="global.html#BLECharacteristic">BLECharacteristic</a></li><li><a href="global.html#BLECommand">BLECommand</a></li><li><a href="global.html#BLEDataStoppedError">BLEDataStoppedError</a></li><li><a href="global.html#BLESendInterval">BLESendInterval</a></li><li><a href="global.html#BLESendRateMax">BLESendRateMax</a></li><li><a href="global.html#BLEService">BLEService</a></li><li><a href="global.html#BLETimeout">BLETimeout</a></li><li><a href="global.html#BLEUUID">BLEUUID</a></li><li><a href="global.html#blockFunctionProfilerFrame">blockFunctionProfilerFrame</a></li><li><a href="global.html#blockFunctionProfilerId">blockFunctionProfilerId</a></li><li><a href="global.html#blockIconURI">blockIconURI</a></li><li><a href="global.html#BlockType">BlockType</a></li><li><a href="global.html#blockUtility">blockUtility</a></li><li><a href="global.html#BoostBLE">BoostBLE</a></li><li><a href="global.html#BoostColor">BoostColor</a></li><li><a href="global.html#BoostColorIndex">BoostColorIndex</a></li><li><a href="global.html#BoostColorSampleSize">BoostColorSampleSize</a></li><li><a href="global.html#BoostHubProperty">BoostHubProperty</a></li><li><a href="global.html#BoostHubPropertyOperation">BoostHubPropertyOperation</a></li><li><a href="global.html#BoostIO">BoostIO</a></li><li><a href="global.html#BoostIOEvent">BoostIOEvent</a></li><li><a href="global.html#BoostMessage">BoostMessage</a></li><li><a href="global.html#BoostMode">BoostMode</a></li><li><a href="global.html#BoostMotorDirection">BoostMotorDirection</a></li><li><a href="global.html#BoostMotorEndState">BoostMotorEndState</a></li><li><a href="global.html#BoostMotorLabel">BoostMotorLabel</a></li><li><a href="global.html#BoostMotorMaxPowerAdd">BoostMotorMaxPowerAdd</a></li><li><a href="global.html#BoostMotorProfile">BoostMotorProfile</a></li><li><a href="global.html#BoostMotorState">BoostMotorState</a></li><li><a href="global.html#BoostOutputExecution">BoostOutputExecution</a></li><li><a href="global.html#BoostOutputSubCommand">BoostOutputSubCommand</a></li><li><a href="global.html#BoostPingInterval">BoostPingInterval</a></li><li><a href="global.html#BoostPort10000223OrOlder">BoostPort10000223OrOlder</a></li><li><a href="global.html#BoostPortFeedback">BoostPortFeedback</a></li><li><a href="global.html#BoostTiltDirection">BoostTiltDirection</a></li><li><a href="global.html#BTSendRateMax">BTSendRateMax</a></li><li><a href="global.html#cloudDataManager">cloudDataManager</a></li><li><a href="global.html#ColorParam">ColorParam</a></li><li><a href="global.html#compressInputTree">compressInputTree</a></li><li><a href="global.html#defineMessages">defineMessages</a></li><li><a href="global.html#deserialize">deserialize</a></li><li><a href="global.html#deserializeBlocks">deserializeBlocks</a></li><li><a href="global.html#deserializeCostume">deserializeCostume</a></li><li><a href="global.html#deserializeFields">deserializeFields</a></li><li><a href="global.html#deserializeInputDesc">deserializeInputDesc</a></li><li><a href="global.html#deserializeInputs">deserializeInputs</a></li><li><a href="global.html#deserializeSound">deserializeSound</a></li><li><a href="global.html#domToBlock">domToBlock</a></li><li><a href="global.html#domToBlocks">domToBlocks</a></li><li><a href="global.html#Ev3Args">Ev3Args</a></li><li><a href="global.html#Ev3Command">Ev3Command</a></li><li><a href="global.html#Ev3Device">Ev3Device</a></li><li><a href="global.html#Ev3Encoding">Ev3Encoding</a></li><li><a href="global.html#Ev3Label">Ev3Label</a></li><li><a href="global.html#Ev3Mode">Ev3Mode</a></li><li><a href="global.html#Ev3MotorMenu">Ev3MotorMenu</a></li><li><a href="global.html#Ev3Opcode">Ev3Opcode</a></li><li><a href="global.html#Ev3PairingPin">Ev3PairingPin</a></li><li><a href="global.html#Ev3SensorMenu">Ev3SensorMenu</a></li><li><a href="global.html#execute">execute</a></li><li><a href="global.html#executeProfilerFrame">executeProfilerFrame</a></li><li><a href="global.html#executeProfilerId">executeProfilerId</a></li><li><a href="global.html#extensionWorker">extensionWorker</a></li><li><a href="global.html#FACING_THRESHOLD">FACING_THRESHOLD</a></li><li><a href="global.html#FACING_THRESHOLD_OFFSET">FACING_THRESHOLD_OFFSET</a></li><li><a href="global.html#FEMALE_GIANT_RATE">FEMALE_GIANT_RATE</a></li><li><a href="global.html#FEMALE_TENOR_RATE">FEMALE_TENOR_RATE</a></li><li><a href="global.html#fetchBitmapCanvas_">fetchBitmapCanvas_</a></li><li><a href="global.html#finalResponseTimeoutDurationMs">finalResponseTimeoutDurationMs</a></li><li><a href="global.html#flatten">flatten</a></li><li><a href="global.html#FORCE_THRESHOLD">FORCE_THRESHOLD</a></li><li><a href="global.html#FREEFALL_ROTATION_FACTOR">FREEFALL_ROTATION_FACTOR</a></li><li><a href="global.html#FREEFALL_THRESHOLD">FREEFALL_THRESHOLD</a></li><li><a href="global.html#GDXFOR_SENSOR">GDXFOR_SENSOR</a></li><li><a href="global.html#GDXFOR_UPDATE_RATE">GDXFOR_UPDATE_RATE</a></li><li><a href="global.html#generateVariableIdGetter">generateVariableIdGetter</a></li><li><a href="global.html#GestureValues">GestureValues</a></li><li><a href="global.html#getAssetUrl">getAssetUrl</a></li><li><a href="global.html#getCached">getCached</a></li><li><a href="global.html#getExtensionIdForOpcode">getExtensionIdForOpcode</a></li><li><a href="global.html#getProjectUrl">getProjectUrl</a></li><li><a href="global.html#getScripts">getScripts</a></li><li><a href="global.html#GIANT_ID">GIANT_ID</a></li><li><a href="global.html#GRAVITY">GRAVITY</a></li><li><a href="global.html#handleReport">handleReport</a></li><li><a href="global.html#HEIGHT">HEIGHT</a></li><li><a href="global.html#iconURI">iconURI</a></li><li><a href="global.html#int32ArrayToNumber">int32ArrayToNumber</a></li><li><a href="global.html#isPromise">isPromise</a></li><li><a href="global.html#KEY_BUFFER_LENGTH">KEY_BUFFER_LENGTH</a></li><li><a href="global.html#KEY_ID_DOWN">KEY_ID_DOWN</a></li><li><a href="global.html#KEY_ID_LEFT">KEY_ID_LEFT</a></li><li><a href="global.html#KEY_ID_RIGHT">KEY_ID_RIGHT</a></li><li><a href="global.html#KEY_ID_SPACE">KEY_ID_SPACE</a></li><li><a href="global.html#KEY_ID_UP">KEY_ID_UP</a></li><li><a href="global.html#KEY_NAME">KEY_NAME</a></li><li><a href="global.html#KEY_NAME_LIST">KEY_NAME_LIST</a></li><li><a href="global.html#KITTEN_ID">KITTEN_ID</a></li><li><a href="global.html#listenAndWaitBlockTimeoutMs">listenAndWaitBlockTimeoutMs</a></li><li><a href="global.html#loadCostume">loadCostume</a></li><li><a href="global.html#loadCostumeFromAsset">loadCostumeFromAsset</a></li><li><a href="global.html#loadSound">loadSound</a></li><li><a href="global.html#loadSoundFromAsset">loadSoundFromAsset</a></li><li><a href="global.html#LOCAL_AMOUNT_SCALE">LOCAL_AMOUNT_SCALE</a></li><li><a href="global.html#LOCAL_MAX_AMOUNT">LOCAL_MAX_AMOUNT</a></li><li><a href="global.html#LOCAL_THRESHOLD">LOCAL_THRESHOLD</a></li><li><a href="global.html#maybeFormatMessage">maybeFormatMessage</a></li><li><a href="global.html#menuIconURI">menuIconURI</a></li><li><a href="global.html#MicroBitButtons">MicroBitButtons</a></li><li><a href="global.html#MicroBitGestures">MicroBitGestures</a></li><li><a href="global.html#MicroBitPinState">MicroBitPinState</a></li><li><a href="global.html#MicroBitTiltDirection">MicroBitTiltDirection</a></li><li><a href="global.html#motionVector">motionVector</a></li><li><a href="global.html#mutationAdpater">mutationAdpater</a></li><li><a href="global.html#mutatorTagToObject">mutatorTagToObject</a></li><li><a href="global.html#nextId">nextId</a></li><li><a href="global.html#numberToInt32Array">numberToInt32Array</a></li><li><a href="global.html#OUTPUT">OUTPUT</a></li><li><a href="global.html#parseBlock">parseBlock</a></li><li><a href="global.html#parseBlockList">parseBlockList</a></li><li><a href="global.html#parseMonitorObject">parseMonitorObject</a></li><li><a href="global.html#parseProcedureArgIds">parseProcedureArgIds</a></li><li><a href="global.html#parseProcedureArgMap">parseProcedureArgMap</a></li><li><a href="global.html#parseScratchAssets">parseScratchAssets</a></li><li><a href="global.html#parseScratchObject">parseScratchObject</a></li><li><a href="global.html#parseScripts">parseScripts</a></li><li><a href="global.html#performance">performance</a></li><li><a href="global.html#profilerNames">profilerNames</a></li><li><a href="global.html#PushPullValues">PushPullValues</a></li><li><a href="global.html#renderBenchmarkData">renderBenchmarkData</a></li><li><a href="global.html#rendererDrawProfilerId">rendererDrawProfilerId</a></li><li><a href="global.html#ReporterScope">ReporterScope</a></li><li><a href="global.html#runBenchmark">runBenchmark</a></li><li><a href="global.html#sb2import">sb2import</a></li><li><a href="global.html#SCRATCH_KEY_NAME">SCRATCH_KEY_NAME</a></li><li><a href="global.html#scratchAtan2">scratchAtan2</a></li><li><a href="global.html#ScratchBlocksConstants">ScratchBlocksConstants</a></li><li><a href="global.html#scratchDegrees">scratchDegrees</a></li><li><a href="global.html#SensingAttribute">SensingAttribute</a></li><li><a href="global.html#SensingSubject">SensingSubject</a></li><li><a href="global.html#SEQUENCE_HAT_TIMEOUT">SEQUENCE_HAT_TIMEOUT</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#serializeAssets">serializeAssets</a></li><li><a href="global.html#serializeBlock">serializeBlock</a></li><li><a href="global.html#serializeBlocks">serializeBlocks</a></li><li><a href="global.html#serializeCostume">serializeCostume</a></li><li><a href="global.html#serializeCostumes">serializeCostumes</a></li><li><a href="global.html#serializeFields">serializeFields</a></li><li><a href="global.html#serializeInputs">serializeInputs</a></li><li><a href="global.html#serializePrimitiveBlock">serializePrimitiveBlock</a></li><li><a href="global.html#serializeSound">serializeSound</a></li><li><a href="global.html#serializeSounds">serializeSounds</a></li><li><a href="global.html#serializeTarget">serializeTarget</a></li><li><a href="global.html#serializeVariables">serializeVariables</a></li><li><a href="global.html#SERVER_HOST">SERVER_HOST</a></li><li><a href="global.html#SERVER_TIMEOUT">SERVER_TIMEOUT</a></li><li><a href="global.html#serverTimeoutMs">serverTimeoutMs</a></li><li><a href="global.html#serverURL">serverURL</a></li><li><a href="global.html#SHAKEN_THRESHOLD">SHAKEN_THRESHOLD</a></li><li><a href="global.html#soup_">soup_</a></li><li><a href="global.html#specMap">specMap</a></li><li><a href="global.html#specMapBlock">specMapBlock</a></li><li><a href="global.html#SPEECH_VOLUME">SPEECH_VOLUME</a></li><li><a href="global.html#spriteName">spriteName</a></li><li><a href="global.html#SQUEAK_ID">SQUEAK_ID</a></li><li><a href="global.html#START">START</a></li><li><a href="global.html#START_SIZE">START_SIZE</a></li><li><a href="global.html#stepProfilerId">stepProfilerId</a></li><li><a href="global.html#stepThreadProfilerFrame">stepThreadProfilerFrame</a></li><li><a href="global.html#stepThreadProfilerId">stepThreadProfilerId</a></li><li><a href="global.html#stepThreadsInnerProfilerFrame">stepThreadsInnerProfilerFrame</a></li><li><a href="global.html#stepThreadsInnerProfilerId">stepThreadsInnerProfilerId</a></li><li><a href="global.html#stepThreadsProfilerId">stepThreadsProfilerId</a></li><li><a href="global.html#STOP">STOP</a></li><li><a href="global.html#STOP_SIZE">STOP_SIZE</a></li><li><a href="global.html#STORE_WAITING">STORE_WAITING</a></li><li><a href="global.html#targetId">targetId</a></li><li><a href="global.html#TargetType">TargetType</a></li><li><a href="global.html#TENOR_ID">TENOR_ID</a></li><li><a href="global.html#THRESHOLD">THRESHOLD</a></li><li><a href="global.html#TILT_THRESHOLD">TILT_THRESHOLD</a></li><li><a href="global.html#TiltAxisValues">TiltAxisValues</a></li><li><a href="global.html#TO_DEGREE">TO_DEGREE</a></li><li><a href="global.html#uid">uid</a></li><li><a href="global.html#VideoState">VideoState</a></li><li><a href="global.html#WeDo2Command">WeDo2Command</a></li><li><a href="global.html#WeDo2ConnectID">WeDo2ConnectID</a></li><li><a href="global.html#WeDo2Device">WeDo2Device</a></li><li><a href="global.html#WeDo2Mode">WeDo2Mode</a></li><li><a href="global.html#WeDo2MotorDirection">WeDo2MotorDirection</a></li><li><a href="global.html#WeDo2MotorLabel">WeDo2MotorLabel</a></li><li><a href="global.html#WeDo2TiltDirection">WeDo2TiltDirection</a></li><li><a href="global.html#WeDo2Unit">WeDo2Unit</a></li><li><a href="global.html#WIDTH">WIDTH</a></li><li><a href="global.html#WINSIZE">WINSIZE</a></li><li><a href="global.html#xmlEscape">xmlEscape</a></li></ul> </nav> <div id="main"> <h1 class="page-title">Runtime</h1> <section> <header> <h2> Runtime </h2> <div class="class-description"><p>Manages targets, scripts, and the sequencer.</p></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Runtime"><span class="type-signature"></span>new Runtime<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id=".BLOCK_DRAG_END"><span class="type-signature">(static, constant) </span>BLOCK_DRAG_END<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for block drag end.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".BLOCK_DRAG_UPDATE"><span class="type-signature">(static, constant) </span>BLOCK_DRAG_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for block drag update.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".BLOCK_GLOW_OFF"><span class="type-signature">(static, constant) </span>BLOCK_GLOW_OFF<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for unglowing a block.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".BLOCK_GLOW_ON"><span class="type-signature">(static, constant) </span>BLOCK_GLOW_ON<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for glowing a block.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".BLOCKS_NEED_UPDATE"><span class="type-signature">(static, constant) </span>BLOCKS_NEED_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that a block was updated and needs to be rerendered.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".BLOCKSINFO_UPDATE"><span class="type-signature">(static, constant) </span>BLOCKSINFO_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that blocksInfo was updated.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".EXTENSION_ADDED"><span class="type-signature">(static, constant) </span>EXTENSION_ADDED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that an extension was added.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".EXTENSION_FIELD_ADDED"><span class="type-signature">(static, constant) </span>EXTENSION_FIELD_ADDED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that an extension as asked for a custom field to be added</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".HAS_CLOUD_DATA_UPDATE"><span class="type-signature">(static, constant) </span>HAS_CLOUD_DATA_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for a cloud data update to this project.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".MAX_CLONES"><span class="type-signature">(static, constant) </span>MAX_CLONES<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>How many clones can be created at a time.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id=".MIC_LISTENING"><span class="type-signature">(static, constant) </span>MIC_LISTENING<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name to indicate that the microphone is being used to stream audio.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".MONITORS_UPDATE"><span class="type-signature">(static, constant) </span>MONITORS_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for monitors update.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERIPHERAL_CONNECTED"><span class="type-signature">(static, constant) </span>PERIPHERAL_CONNECTED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that a peripheral has connected. This causes the status button in the blocks menu to indicate 'connected'.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERIPHERAL_CONNECTION_LOST_ERROR"><span class="type-signature">(static, constant) </span>PERIPHERAL_CONNECTION_LOST_ERROR<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that a peripheral connection has been lost. This causes a 'peripheral connection lost' error alert to display.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERIPHERAL_DISCONNECTED"><span class="type-signature">(static, constant) </span>PERIPHERAL_DISCONNECTED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that a peripheral has been intentionally disconnected. This causes the status button in the blocks menu to indicate 'disconnected'.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERIPHERAL_LIST_UPDATE"><span class="type-signature">(static, constant) </span>PERIPHERAL_LIST_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for updating the available set of peripheral devices. This causes the peripheral connection modal to update a list of available peripherals.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERIPHERAL_REQUEST_ERROR"><span class="type-signature">(static, constant) </span>PERIPHERAL_REQUEST_ERROR<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that a peripheral has encountered a request error. This causes the peripheral connection modal to switch to an error state.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERIPHERAL_SCAN_TIMEOUT"><span class="type-signature">(static, constant) </span>PERIPHERAL_SCAN_TIMEOUT<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for reporting that a peripheral has not been discovered. This causes the peripheral connection modal to show a timeout state.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PROJECT_CHANGED"><span class="type-signature">(static, constant) </span>PROJECT_CHANGED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for report that a change was made that can be saved</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PROJECT_LOADED"><span class="type-signature">(static, constant) </span>PROJECT_LOADED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for project loaded report.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PROJECT_RUN_START"><span class="type-signature">(static, constant) </span>PROJECT_RUN_START<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name when threads start running. Used by the UI to indicate running status.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PROJECT_RUN_STOP"><span class="type-signature">(static, constant) </span>PROJECT_RUN_STOP<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name when threads stop running Used by the UI to indicate not-running status.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PROJECT_START"><span class="type-signature">(static, constant) </span>PROJECT_START<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name when the project is started (threads may not necessarily be running).</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PROJECT_STOP_ALL"><span class="type-signature">(static, constant) </span>PROJECT_STOP_ALL<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for project being stopped or restarted by the user. Used by blocks that need to reset state.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".RUNTIME_DISPOSED"><span class="type-signature">(static, constant) </span>RUNTIME_DISPOSED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name when the runtime dispose has been called.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".RUNTIME_STARTED"><span class="type-signature">(static, constant) </span>RUNTIME_STARTED<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name when the runtime tick loop has been started.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".SCRIPT_GLOW_OFF"><span class="type-signature">(static, constant) </span>SCRIPT_GLOW_OFF<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for unglowing a script.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".SCRIPT_GLOW_ON"><span class="type-signature">(static, constant) </span>SCRIPT_GLOW_ON<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for glowing a script.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".STAGE_HEIGHT"><span class="type-signature">(static, constant) </span>STAGE_HEIGHT<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>Height of the stage, in pixels.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id=".STAGE_WIDTH"><span class="type-signature">(static, constant) </span>STAGE_WIDTH<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>Width of the stage, in pixels.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id=".STOP_FOR_TARGET"><span class="type-signature">(static, constant) </span>STOP_FOR_TARGET<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for target being stopped by a stop for target call. Used by blocks that need to stop individual targets.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".TARGETS_UPDATE"><span class="type-signature">(static, constant) </span>TARGETS_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for targets update report.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".THREAD_STEP_INTERVAL"><span class="type-signature">(static) </span>THREAD_STEP_INTERVAL<span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>How rapidly we try to step threads by default, in ms.</p> </div> <h4 class="name" id=".THREAD_STEP_INTERVAL_COMPATIBILITY"><span class="type-signature">(static) </span>THREAD_STEP_INTERVAL_COMPATIBILITY<span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>In compatibility mode, how rapidly we try to step threads, in ms.</p> </div> <h4 class="name" id=".TOOLBOX_EXTENSIONS_NEED_UPDATE"><span class="type-signature">(static, constant) </span>TOOLBOX_EXTENSIONS_NEED_UPDATE<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for report that a change was made to an extension in the toolbox.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".TURBO_MODE_OFF"><span class="type-signature">(static, constant) </span>TURBO_MODE_OFF<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for turning off turbo mode.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".TURBO_MODE_ON"><span class="type-signature">(static, constant) </span>TURBO_MODE_ON<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for turning on turbo mode.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".VISUAL_REPORT"><span class="type-signature">(static, constant) </span>VISUAL_REPORT<span class="type-signature"> :string</span></h4> <dl class="details"> </dl> <div class="description"> <p>Event name for visual value report.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="_blockInfo"><span class="type-signature">(private) </span>_blockInfo<span class="type-signature"> :Array.<<a href="global.html#CategoryInfo">CategoryInfo</a>></span></h4> <dl class="details"> </dl> <div class="description"> <p>Map to look up all block information by extended opcode.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="global.html#CategoryInfo">CategoryInfo</a>></span> </li> </ul> <h4 class="name" id="_cloneCounter"><span class="type-signature"></span>_cloneCounter<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>Currently known number of clones, used to enforce clone limit.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="_editingTarget"><span class="type-signature">(nullable) </span>_editingTarget<span class="type-signature"> :<a href="Target.html">Target</a></span></h4> <dl class="details"> </dl> <div class="description"> <p>Currently known editing target for the VM.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="Target.html">Target</a></span> </li> </ul> <h4 class="name" id="_hats"><span class="type-signature"></span>_hats<span class="type-signature"> :Object.<string, Object></span></h4> <dl class="details"> </dl> <div class="description"> <p>Map to look up hat blocks' metadata. Keys are opcode for hat, values are metadata objects.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.<string, Object></span> </li> </ul> <h4 class="name" id="_lastStepDoneThreads"><span class="type-signature"></span>_lastStepDoneThreads<span class="type-signature"> :Array.<<a href="Thread.html">Thread</a>></span></h4> <dl class="details"> </dl> <div class="description"> <p>All threads that finished running and were removed from this.threads by behaviour in Sequencer.stepThreads.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Thread.html">Thread</a>></span> </li> </ul> <h4 class="name" id="_monitorState"><span class="type-signature"></span>_monitorState<span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Ordered map of all monitors, which are MonitorReporter objects.</p> </div> <h4 class="name" id="_nonMonitorThreadCount"><span class="type-signature"></span>_nonMonitorThreadCount<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>Number of non-monitor threads running during the previous frame.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="_prevMonitorState"><span class="type-signature"></span>_prevMonitorState<span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Monitor state from last tick</p> </div> <h4 class="name" id="_primitives"><span class="type-signature"></span>_primitives<span class="type-signature"> :Object.<string, function()></span></h4> <dl class="details"> </dl> <div class="description"> <p>Map to look up a block primitive's implementation function by its opcode. This is a two-step lookup: package name first, then primitive name.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.<string, function()></span> </li> </ul> <h4 class="name" id="_refreshTargets"><span class="type-signature"></span>_refreshTargets<span class="type-signature"> :boolean</span></h4> <dl class="details"> </dl> <div class="description"> <p>Flag to emit a targets update at the end of a step. When target data changes, this flag is set to true.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <h4 class="name" id="_scriptGlowsPreviousFrame"><span class="type-signature">(non-null) </span>_scriptGlowsPreviousFrame<span class="type-signature"> :Array.<!string></span></h4> <dl class="details"> </dl> <div class="description"> <p>A list of script block IDs that were glowing during the previous frame.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<!string></span> </li> </ul> <h4 class="name" id="_steppingInterval"><span class="type-signature">(non-null) </span>_steppingInterval<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>A reference to the current runtime stepping interval, set by a <code>setInterval</code>.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="addCloudVariable"><span class="type-signature"></span>addCloudVariable<span class="type-signature"> :function</span></h4> <dl class="details"> </dl> <div class="description"> <p>A function that tracks a new cloud variable in the runtime, updating the cloud variable limit. Calling this function will emit a cloud data update event if this is the first cloud variable being added.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">function</span> </li> </ul> <h4 class="name" id="canAddCloudVariable"><span class="type-signature"></span>canAddCloudVariable<span class="type-signature"> :function</span></h4> <dl class="details"> </dl> <div class="description"> <p>A function which checks whether a new cloud variable can be added to the runtime.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">function</span> </li> </ul> <h4 class="name" id="compatibilityMode"><span class="type-signature"></span>compatibilityMode<span class="type-signature"> :Boolean</span></h4> <dl class="details"> </dl> <div class="description"> <p>Whether the project is in "compatibility mode" (30 TPS).</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Boolean</span> </li> </ul> <h4 class="name" id="currentStepTime"><span class="type-signature">(non-null) </span>currentStepTime<span class="type-signature"> :number</span></h4> <dl class="details"> </dl> <div class="description"> <p>Current length of a step. Changes as mode switches, and used by the sequencer to calculate WORK_TIME.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="executableTargets"><span class="type-signature"></span>executableTargets<span class="type-signature"> :Array.<!<a href="Target.html">Target</a>></span></h4> <dl class="details"> </dl> <div class="description"> <p>Targets in reverse order of execution. Shares its order with drawables.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<!<a href="Target.html">Target</a>></span> </li> </ul> <h4 class="name" id="flyoutBlocks"><span class="type-signature">(non-null) </span>flyoutBlocks<span class="type-signature"> :<a href="Blocks.html">Blocks</a></span></h4> <dl class="details"> </dl> <div class="description"> <p>Storage container for flyout blocks. These will execute on <code>_editingTarget.</code></p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="Blocks.html">Blocks</a></span> </li> </ul> <h4 class="name" id="hasCloudData"><span class="type-signature"></span>hasCloudData<span class="type-signature"> :function</span></h4> <dl class="details"> </dl> <div class="description"> <p>Check wether the runtime has any cloud data.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">function</span> </li> </ul> <h4 class="name" id="ioDevices"><span class="type-signature"></span>ioDevices<span class="type-signature"> :Object.<string, Object></span></h4> <dl class="details"> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.<string, Object></span> </li> </ul> <h4 class="name" id="monitorBlockInfo"><span class="type-signature">(private) </span>monitorBlockInfo<span class="type-signature"> :object</span></h4> <dl class="details"> </dl> <div class="description"> <p>Map to look up all monitor block information by opcode.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="monitorBlocks"><span class="type-signature">(non-null) </span>monitorBlocks<span class="type-signature"> :<a href="Blocks.html">Blocks</a></span></h4> <dl class="details"> </dl> <div class="description"> <p>Storage container for monitor blocks. These will execute on a target maybe</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="Blocks.html">Blocks</a></span> </li> </ul> <h4 class="name" id="peripheralExtensions"><span class="type-signature"></span>peripheralExtensions<span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>A list of extensions, used to manage hardware connection.</p> </div> <h4 class="name" id="profiler"><span class="type-signature"></span>profiler<span class="type-signature"> :<a href="Profiler.html">Profiler</a></span></h4> <dl class="details"> </dl> <div class="description"> <p>A runtime profiler that records timed events for later playback to diagnose Scratch performance.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="Profiler.html">Profiler</a></span> </li> </ul> <h4 class="name" id="redrawRequested"><span class="type-signature"></span>redrawRequested<span class="type-signature"> :boolean</span></h4> <dl class="details"> </dl> <div class="description"> <p>Whether any primitive has requested a redraw. Affects whether <code>Sequencer.stepThreads</code> will yield after stepping each thread. Reset on every frame.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <h4 class="name" id="removeCloudVariable"><span class="type-signature"></span>removeCloudVariable<span class="type-signature"> :function</span></h4> <dl class="details"> </dl> <div class="description"> <p>A function which updates the runtime's cloud variable limit when removing a cloud variable and emits a cloud update event if the last of the cloud variables is being removed.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">function</span> </li> </ul> <h4 class="name" id="sequencer"><span class="type-signature">(non-null) </span>sequencer<span class="type-signature"> :<a href="Sequencer.html">Sequencer</a></span></h4> <dl class="details"> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="Sequencer.html">Sequencer</a></span> </li> </ul> <h4 class="name" id="targets"><span class="type-signature"></span>targets<span class="type-signature"> :Array.<!<a href="Target.html">Target</a>></span></h4> <dl class="details"> </dl> <div class="description"> <p>Target management and storage.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<!<a href="Target.html">Target</a>></span> </li> </ul> <h4 class="name" id="threads"><span class="type-signature"></span>threads<span class="type-signature"> :Array.<<a href="Thread.html">Thread</a>></span></h4> <dl class="details"> </dl> <div class="description"> <p>A list of threads that are currently running in the VM. Threads are added when execution starts and pruned when execution ends.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Thread.html">Thread</a>></span> </li> </ul> <h4 class="name" id="turboMode"><span class="type-signature"></span>turboMode<span class="type-signature"> :Boolean</span></h4> <dl class="details"> </dl> <div class="description"> <p>Whether the project is in "turbo mode."</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Boolean</span> </li> </ul> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="_buildCustomFieldTypeForScratchBlocks"><span class="type-signature"></span>_buildCustomFieldTypeForScratchBlocks<span class="signature">(fieldName, output, outputShape, categoryInfo)</span><span class="type-signature"> → {object}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Build the scratch-blocks JSON needed for a fieldType. Custom field types need to be namespaced to the extension so that extensions can't interfere with each other</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fieldName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The name of the field</p></td> </tr> <tr> <td class="name"><code>output</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The output of the field</p></td> </tr> <tr> <td class="name"><code>outputShape</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Shape of the field (from ScratchBlocksConstants)</p></td> </tr> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>The category the field belongs to (Used to set its colors)</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>Object to be inserted into scratch-blocks</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="_buildMenuForScratchBlocks"><span class="type-signature">(private) </span>_buildMenuForScratchBlocks<span class="signature">(menuName, menuInfo, categoryInfo)</span><span class="type-signature"> → {object}</span></h4> <dl class="details"> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>items</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="attributes"> </td> <td class="description last"><p>an array of menu items or a function to retrieve such an array</p></td> </tr> <tr> <td class="name"><code>acceptReporters</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>if true, allow dropping reporters onto this menu</p></td> </tr> </tbody> </table> <div class="description"> <p>Build the scratch-blocks JSON for a menu. Note that scratch-blocks treats menus as a special kind of block.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>menuName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the name of the menu</p></td> </tr> <tr> <td class="name"><code>menuInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>a description of this menu and its items</p></td> </tr> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#CategoryInfo">CategoryInfo</a></span> </td> <td class="description last"><p>the category for this block</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>a JSON-esque object ready for scratch-blocks' consumption</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="_constructInlineImageJson"><span class="type-signature">(private) </span>_constructInlineImageJson<span class="signature">(argInfo)</span><span class="type-signature"> → {object}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Helper for _convertPlaceholdes which handles inline images which are a specialized case of block "arguments".</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>argInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>Metadata about the inline image as specified by the extension</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>JSON blob for a scratch-blocks image field.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="_convertBlockForScratchBlocks"><span class="type-signature">(private) </span>_convertBlockForScratchBlocks<span class="signature">(blockInfo, categoryInfo)</span><span class="type-signature"> → {<a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Convert ExtensionBlockMetadata into scratch-blocks JSON & XML, and generate a proxy function.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>blockInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionBlockMetadata">ExtensionBlockMetadata</a></span> </td> <td class="description last"><p>the block to convert</p></td> </tr> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#CategoryInfo">CategoryInfo</a></span> </td> <td class="description last"><p>the category for this block</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>the converted & original block information</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a></span> </dd> </dl> <h4 class="name" id="_convertButtonForScratchBlocks"><span class="type-signature">(private) </span>_convertButtonForScratchBlocks<span class="signature">(buttonInfo, categoryInfo)</span><span class="type-signature"> → {<a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a>}</span></h4> <dl class="details"> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>func</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the callback name</p></td> </tr> </tbody> </table> <div class="description"> <p>Convert a button for scratch-blocks. A button has no opcode but specifies a callback name in the <code>func</code> field.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>buttonInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionBlockMetadata">ExtensionBlockMetadata</a></span> </td> <td class="description last"><p>the button to convert</p></td> </tr> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#CategoryInfo">CategoryInfo</a></span> </td> <td class="description last"><p>the category for this button</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>the converted & original button information</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a></span> </dd> </dl> <h4 class="name" id="_convertForScratchBlocks"><span class="type-signature">(private) </span>_convertForScratchBlocks<span class="signature">(blockInfo, categoryInfo)</span><span class="type-signature"> → {<a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Convert ExtensionBlockMetadata into data ready for scratch-blocks.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>blockInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionBlockMetadata">ExtensionBlockMetadata</a></span> </td> <td class="description last"><p>the block info to convert</p></td> </tr> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#CategoryInfo">CategoryInfo</a></span> </td> <td class="description last"><p>the category for this block</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>the converted & original block information</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a></span> </dd> </dl> <h4 class="name" id="_convertMenuItems"><span class="type-signature">(private) </span>_convertMenuItems<span class="signature">(menuItems)</span><span class="type-signature"> → {object}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Convert the given extension menu items into the scratch-blocks style of list of pairs. If the menu is dynamic (e.g. the passed in argument is a function), return the input unmodified.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>menuItems</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>an array of menu items or a function to retrieve such an array</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>an array of 2 element arrays or the original input function</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="_convertPlaceholders"><span class="type-signature">(private) </span>_convertPlaceholders<span class="signature">(context, match, placeholder)</span><span class="type-signature"> → {string}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Helper for _convertForScratchBlocks which handles linearization of argument placeholders. Called as a callback from string#replace. In addition to the return value the JSON and XML items in the context will be filled.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>context</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>information shared with _convertForScratchBlocks about the block, etc.</p></td> </tr> <tr> <td class="name"><code>match</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the overall string matched by the placeholder regex, including brackets: '[FOO]'.</p></td> </tr> <tr> <td class="name"><code>placeholder</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the name of the placeholder being matched: 'FOO'.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>scratch-blocks placeholder for the argument: '%1'.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id="_convertSeparatorForScratchBlocks"><span class="type-signature">(private) </span>_convertSeparatorForScratchBlocks<span class="signature">(blockInfo, categoryInfo)</span><span class="type-signature"> → {<a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Generate a separator between blocks categories or sub-categories.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>blockInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionBlockMetadata">ExtensionBlockMetadata</a></span> </td> <td class="description last"><p>the block to convert</p></td> </tr> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#CategoryInfo">CategoryInfo</a></span> </td> <td class="description last"><p>the category for this block</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>the converted & original block information</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#ConvertedBlockInfo">ConvertedBlockInfo</a></span> </dd> </dl> <h4 class="name" id="_defaultScratchLinkSocketFactory"><span class="type-signature"></span>_defaultScratchLinkSocketFactory<span class="signature">(type)</span><span class="type-signature"> → {ScratchLinkSocket}</span></h4> <dl class="details"> </dl> <div class="description"> <p>The default scratch link socket creator, using websockets to the installed device manager.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Either BLE or BT</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The new scratch link socket (a WebSocket object)</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">ScratchLinkSocket</span> </dd> </dl> <h4 class="name" id="_emitProjectRunStatus"><span class="type-signature"></span>_emitProjectRunStatus<span class="signature">(nonMonitorThreadCount)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit run start/stop after each tick. Emits when <code>this.threads.length</code> goes between non-zero and zero</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>nonMonitorThreadCount</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The new nonMonitorThreadCount</p></td> </tr> </tbody> </table> <h4 class="name" id="_fillExtensionCategory"><span class="type-signature">(private) </span>_fillExtensionCategory<span class="signature">(categoryInfo, extensionInfo)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Read extension information, convert menus, blocks and custom field types and store the results in the provided category object.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>categoryInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#CategoryInfo">CategoryInfo</a></span> </td> <td class="description last"><p>the category to be filled</p></td> </tr> <tr> <td class="name"><code>extensionInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionMetadata">ExtensionMetadata</a></span> </td> <td class="description last"><p>the extension metadata to read</p></td> </tr> </tbody> </table> <h4 class="name" id="_getMonitorThreadCount"><span class="type-signature"></span>_getMonitorThreadCount<span class="signature">(threads<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {number}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get the number of threads in the given array that are monitor threads (threads that update monitor values, and don't count as running a script).</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>threads</code></td> <td class="type"> <span class="param-type">Array.<<a href="Thread.html">Thread</a>></span> </td> <td class="description last"><p>The set of threads to look through.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The number of monitor threads in threads.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> <h4 class="name" id="_makeExtensionMenuId"><span class="type-signature">(private) </span>_makeExtensionMenuId<span class="signature">(menuName, extensionId)</span><span class="type-signature"> → {string}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Generate an extension-specific menu ID.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>menuName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the name of the menu.</p></td> </tr> <tr> <td class="name"><code>extensionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the ID of the extension hosting the menu.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>the constructed ID.</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id="_pushMonitors"><span class="type-signature"></span>_pushMonitors<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Queue monitor blocks to sequencer to be run.</p> </div> <h4 class="name" id="_pushThread"><span class="type-signature"></span>_pushThread<span class="signature">(id<span class="signature-attributes">non-null</span>, target<span class="signature-attributes">non-null</span>, opts<span class="signature-attributes">nullable</span>)</span><span class="type-signature"> → (non-null) {<a href="Thread.html">Thread</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Create a thread and push it to the list of threads.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>ID of block that starts the stack.</p></td> </tr> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>Target to run thread on.</p></td> </tr> <tr> <td class="name"><code>opts</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>optional arguments</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>stackClick</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>true if the script was activated by clicking on the stack</p></td> </tr> <tr> <td class="name"><code>updateMonitor</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>true if the script should update a monitor value</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The newly created thread.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Thread.html">Thread</a></span> </dd> </dl> <h4 class="name" id="_refreshExtensionPrimitives"><span class="type-signature">(private) </span>_refreshExtensionPrimitives<span class="signature">(extensionInfo)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Reregister the primitives for an extension</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionMetadata">ExtensionMetadata</a></span> </td> <td class="description last"><p>new info (results of running getInfo) for an extension</p></td> </tr> </tbody> </table> <h4 class="name" id="_registerBlockPackages"><span class="type-signature">(private) </span>_registerBlockPackages<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-todo">To Do:</dt> <dd class="tag-todo"> <ul> <li>Prefix opcodes with package name.</li> </ul> </dd> </dl> <div class="description"> <p>Register default block packages with this runtime.</p> </div> <h4 class="name" id="_registerExtensionPrimitives"><span class="type-signature">(private) </span>_registerExtensionPrimitives<span class="signature">(extensionInfo)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Register the primitives provided by an extension.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#ExtensionMetadata">ExtensionMetadata</a></span> </td> <td class="description last"><p>information about the extension (id, blocks, etc.)</p></td> </tr> </tbody> </table> <h4 class="name" id="_restartThread"><span class="type-signature"></span>_restartThread<span class="signature">(thread<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {<a href="Thread.html">Thread</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Restart a thread in place, maintaining its position in the list of threads. This is used by <code>startHats</code> to and is necessary to ensure 2.0-like execution order. Test project: https://scratch.mit.edu/projects/130183108/</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>thread</code></td> <td class="type"> <span class="param-type"><a href="Thread.html">Thread</a></span> </td> <td class="description last"><p>Thread object to restart.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The restarted thread.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Thread.html">Thread</a></span> </dd> </dl> <h4 class="name" id="_step"><span class="type-signature"></span>_step<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Repeatedly run <code>sequencer.stepThreads</code> and filter out inactive threads after each iteration.</p> </div> <h4 class="name" id="_stopThread"><span class="type-signature"></span>_stopThread<span class="signature">(thread<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Stop a thread: stop running it immediately, and remove it from the thread list later.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>thread</code></td> <td class="type"> <span class="param-type"><a href="Thread.html">Thread</a></span> </td> <td class="description last"><p>Thread object to remove from actives</p></td> </tr> </tbody> </table> <h4 class="name" id="_updateGlows"><span class="type-signature"></span>_updateGlows<span class="signature">(optExtraThreads<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit glows/glow clears for scripts after a single tick. Looks at <code>this.threads</code> and notices which have turned on/off new glows.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>optExtraThreads</code></td> <td class="type"> <span class="param-type">Array.<<a href="Thread.html">Thread</a>></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Optional list of inactive threads.</p></td> </tr> </tbody> </table> <h4 class="name" id="addMonitorScript"><span class="type-signature"></span>addMonitorScript<span class="signature">(topBlockId<span class="signature-attributes">non-null</span>, optTarget<span class="signature-attributes">nullable</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Enqueue a script that when finished will update the monitor for the block.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>topBlockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>ID of block that starts the script.</p></td> </tr> <tr> <td class="name"><code>optTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>target Target to run script on. If not supplied, uses editing target.</p></td> </tr> </tbody> </table> <h4 class="name" id="addTarget"><span class="type-signature"></span>addTarget<span class="signature">(target)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Add a target to the runtime. This tracks the sprite pane ordering of the target. The target still needs to be put into the correct execution order after calling this function.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>target to add</p></td> </tr> </tbody> </table> <h4 class="name" id="allScriptsDo"><span class="type-signature"></span>allScriptsDo<span class="signature">(f<span class="signature-attributes">non-null</span>, optTarget<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Run a function <code>f</code> for all scripts in a workspace. <code>f</code> will be called with two parameters:</p> <ul> <li>the top block ID of the script.</li> <li>the target that owns the script.</li> </ul> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>f</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last"><p>Function to call for each script.</p></td> </tr> <tr> <td class="name"><code>optTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Optionally, a target to restrict to.</p></td> </tr> </tbody> </table> <h4 class="name" id="attachAudioEngine"><span class="type-signature"></span>attachAudioEngine<span class="signature">(audioEngine<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Attach the audio engine</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>audioEngine</code></td> <td class="type"> <span class="param-type">AudioEngine</span> </td> <td class="description last"><p>The audio engine to attach</p></td> </tr> </tbody> </table> <h4 class="name" id="attachRenderer"><span class="type-signature"></span>attachRenderer<span class="signature">(renderer<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Attach the renderer</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>renderer</code></td> <td class="type"> <span class="param-type">RenderWebGL</span> </td> <td class="description last"><p>The renderer to attach</p></td> </tr> </tbody> </table> <h4 class="name" id="attachStorage"><span class="type-signature"></span>attachStorage<span class="signature">(storage<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Attach the storage module</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>storage</code></td> <td class="type"> <span class="param-type">ScratchStorage</span> </td> <td class="description last"><p>The storage module to attach</p></td> </tr> </tbody> </table> <h4 class="name" id="attachV2BitmapAdapter"><span class="type-signature"></span>attachV2BitmapAdapter<span class="signature">(bitmapAdapter<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Set the bitmap adapter for the VM/runtime, which converts scratch 2 bitmaps to scratch 3 bitmaps. (Scratch 3 bitmaps are all bitmap resolution 2)</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>bitmapAdapter</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>The adapter to attach</p></td> </tr> </tbody> </table> <h4 class="name" id="attachV2SVGAdapter"><span class="type-signature"></span>attachV2SVGAdapter<span class="signature">(svgAdapter<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Set the svg adapter, which converts scratch 2 svgs to scratch 3 svgs</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>svgAdapter</code></td> <td class="type"> <span class="param-type">SvgRenderer</span> </td> <td class="description last"><p>The adapter to attach</p></td> </tr> </tbody> </table> <h4 class="name" id="changeCloneCounter"><span class="type-signature"></span>changeCloneCounter<span class="signature">(changeAmount)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Update the clone counter to track how many clones are created.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>changeAmount</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>How many clones have been created/destroyed.</p></td> </tr> </tbody> </table> <h4 class="name" id="clonesAvailable"><span class="type-signature"></span>clonesAvailable<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Return whether there are clones available.</p> </div> <h5>Returns:</h5> <div class="param-desc"> <p>True until the number of clones hits Runtime.MAX_CLONES.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="configureScratchLinkSocketFactory"><span class="type-signature"></span>configureScratchLinkSocketFactory<span class="signature">(factory)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Configure how ScratchLink sockets are created. Factory must consume a "type" parameter either BT or BLE.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>factory</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>The new factory for creating ScratchLink sockets.</p></td> </tr> </tbody> </table> <h4 class="name" id="connectPeripheral"><span class="type-signature"></span>connectPeripheral<span class="signature">(extensionId, peripheralId)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Connect to the extension's specified peripheral.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the id of the extension.</p></td> </tr> <tr> <td class="name"><code>peripheralId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>the id of the peripheral.</p></td> </tr> </tbody> </table> <h4 class="name" id="createNewGlobalVariable"><span class="type-signature"></span>createNewGlobalVariable<span class="signature">(variableName, optVarId, optVarType)</span><span class="type-signature"> → {<a href="Variable.html">Variable</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Create a new global variable avoiding conflicts with other variable names.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>variableName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The desired variable name for the new global variable. This can be turned into a fresh name as necessary.</p></td> </tr> <tr> <td class="name"><code>optVarId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>An optional ID to use for the variable. A new one will be generated if a falsey value for this parameter is provided.</p></td> </tr> <tr> <td class="name"><code>optVarType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The type of the variable to create. Defaults to Variable.SCALAR_TYPE.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The new variable that was created.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Variable.html">Variable</a></span> </dd> </dl> <h4 class="name" id="disableProfiling"><span class="type-signature"></span>disableProfiling<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Turn off profiling.</p> </div> <h4 class="name" id="disconnectPeripheral"><span class="type-signature"></span>disconnectPeripheral<span class="signature">(extensionId)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Disconnect from the extension's connected peripheral.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the id of the extension.</p></td> </tr> </tbody> </table> <h4 class="name" id="dispose"><span class="type-signature"></span>dispose<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Dispose all targets. Return to clean state.</p> </div> <h4 class="name" id="disposeTarget"><span class="type-signature"></span>disposeTarget<span class="signature">(disposingTarget<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Dispose of a target.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>disposingTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>Target to dispose of.</p></td> </tr> </tbody> </table> <h4 class="name" id="emitBlockDragUpdate"><span class="type-signature"></span>emitBlockDragUpdate<span class="signature">(areBlocksOverGui)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit whether blocks are being dragged over gui</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>areBlocksOverGui</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>True if blocks are dragged out of blocks workspace, false otherwise</p></td> </tr> </tbody> </table> <h4 class="name" id="emitBlockEndDrag"><span class="type-signature"></span>emitBlockEndDrag<span class="signature">(blocks, topBlockId)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit event to indicate that the block drag has ended with the blocks outside the blocks workspace</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>blocks</code></td> <td class="type"> <span class="param-type">Array.<object></span> </td> <td class="description last"><p>The set of blocks dragged to the GUI</p></td> </tr> <tr> <td class="name"><code>topBlockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The original id of the top block being dragged</p></td> </tr> </tbody> </table> <h4 class="name" id="emitMicListening"><span class="type-signature"></span>emitMicListening<span class="signature">(listening)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit an event to indicate that the microphone is being used to stream audio.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>listening</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>true if the microphone is currently listening.</p></td> </tr> </tbody> </table> <h4 class="name" id="emitProjectChanged"><span class="type-signature"></span>emitProjectChanged<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Report that the project has changed in a way that would affect serialization</p> </div> <h4 class="name" id="emitProjectLoaded"><span class="type-signature"></span>emitProjectLoaded<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Report that the project has loaded in the Virtual Machine.</p> </div> <h4 class="name" id="enableProfiling"><span class="type-signature"></span>enableProfiling<span class="signature">(onFrame)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Turn on profiling.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>onFrame</code></td> <td class="type"> <span class="param-type">Profiler/FrameCallback</span> </td> <td class="description last"><p>A callback handle passed a profiling frame when the profiler reports its collected data.</p></td> </tr> </tbody> </table> <h4 class="name" id="fireTargetWasCreated"><span class="type-signature"></span>fireTargetWasCreated<span class="signature">(newTarget, sourceTarget<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Report that a new target has been created, possibly by cloning an existing target.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>newTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>the newly created target.</p></td> </tr> <tr> <td class="name"><code>sourceTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>the target used as a source for the new clone, if any.</p></td> </tr> </tbody> </table> <h5>Fires:</h5> <ul> <li><a href="Runtime.html#event:targetWasCreated">Runtime#event:targetWasCreated</a></li> </ul> <h4 class="name" id="fireTargetWasRemoved"><span class="type-signature"></span>fireTargetWasRemoved<span class="signature">(target)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Report that a clone target is being removed.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>the target being removed</p></td> </tr> </tbody> </table> <h5>Fires:</h5> <ul> <li>Runtime#event:targetWasRemoved</li> </ul> <h4 class="name" id="getBlocksJSON"><span class="type-signature"></span>getBlocksJSON<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>an array containing the scratch-blocks JSON information for each dynamic block.</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Array.<string></span> </dd> </dl> <h4 class="name" id="getBlocksXML"><span class="type-signature"></span>getBlocksXML<span class="signature">()</span><span class="type-signature"> → {Array.<object>}</span></h4> <dl class="details"> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the category / extension ID</p></td> </tr> <tr> <td class="name"><code>xml</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the XML text for this category, starting with <code><category></code> and ending with <code></category></code></p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>scratch-blocks XML for each category of extension blocks, in category order.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Array.<object></span> </dd> </dl> <h4 class="name" id="getEditingTarget"><span class="type-signature"></span>getEditingTarget<span class="signature">()</span><span class="type-signature"> → (nullable) {<a href="Target.html">Target</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get the editing target.</p> </div> <h5>Returns:</h5> <div class="param-desc"> <p>The editing target.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Target.html">Target</a></span> </dd> </dl> <h4 class="name" id="getIsEdgeActivatedHat"><span class="type-signature"></span>getIsEdgeActivatedHat<span class="signature">(opcode<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Return whether an opcode represents an edge-activated hat block.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>opcode</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The opcode to look up.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>True if the op is known to be a edge-activated hat.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="getIsHat"><span class="type-signature"></span>getIsHat<span class="signature">(opcode<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Return whether an opcode represents a hat block.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>opcode</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The opcode to look up.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>True if the op is known to be a hat.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="getLabelForOpcode"><span class="type-signature"></span>getLabelForOpcode<span class="signature">(extendedOpcode)</span><span class="type-signature"> → {object}</span></h4> <dl class="details"> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>category</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>the category for this opcode</p></td> </tr> <tr> <td class="name"><code>labelFn</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>function to generate the label for this opcode</p></td> </tr> <tr> <td class="name"><code>label</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>the label for this opcode if <code>labelFn</code> is absent</p></td> </tr> </tbody> </table> <div class="description"> <p>Get the label or label function for an opcode</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extendedOpcode</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the opcode you want a label for</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>object with label and category</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="getOpcodeFunction"><span class="type-signature"></span>getOpcodeFunction<span class="signature">(opcode<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {function}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Retrieve the function associated with the given opcode.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>opcode</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The opcode to look up.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The function which implements the opcode.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> <h4 class="name" id="getPeripheralIsConnected"><span class="type-signature"></span>getPeripheralIsConnected<span class="signature">(extensionId)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Returns whether the extension has a currently connected peripheral.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the id of the extension.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>whether the extension has a connected peripheral.</li> </ul> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="getScratchLinkSocket"><span class="type-signature"></span>getScratchLinkSocket<span class="signature">(type)</span><span class="type-signature"> → {ScratchLinkSocket}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get a scratch link socket.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Either BLE or BT</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The scratch link socket.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">ScratchLinkSocket</span> </dd> </dl> <h4 class="name" id="getSpriteTargetByName"><span class="type-signature"></span>getSpriteTargetByName<span class="signature">(spriteName)</span><span class="type-signature"> → (nullable) {<a href="Target.html">Target</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get the first original (non-clone-block-created) sprite given a name.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>spriteName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Name of sprite to look for.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>Target representing a sprite of the given name.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Target.html">Target</a></span> </dd> </dl> <h4 class="name" id="getTargetByDrawableId"><span class="type-signature"></span>getTargetByDrawableId<span class="signature">(drawableID)</span><span class="type-signature"> → (nullable) {<a href="Target.html">Target</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get a target by its drawable id.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>drawableID</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>drawable id of target to find</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The target, if found</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Target.html">Target</a></span> </dd> </dl> <h4 class="name" id="getTargetById"><span class="type-signature"></span>getTargetById<span class="signature">(targetId)</span><span class="type-signature"> → (nullable) {<a href="Target.html">Target</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get a target by its id.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>targetId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Id of target to find.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>The target, if found.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Target.html">Target</a></span> </dd> </dl> <h4 class="name" id="getTargetForStage"><span class="type-signature"></span>getTargetForStage<span class="signature">()</span><span class="type-signature"> → (nullable) {<a href="Target.html">Target</a>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Get a target representing the Scratch stage, if one exists.</p> </div> <h5>Returns:</h5> <div class="param-desc"> <p>The target, if found.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="Target.html">Target</a></span> </dd> </dl> <h4 class="name" id="glowBlock"><span class="type-signature"></span>glowBlock<span class="signature">(blockId<span class="signature-attributes">nullable</span>, isGlowing)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit feedback for block glowing (used in the sequencer).</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>blockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>ID for the block to update glow</p></td> </tr> <tr> <td class="name"><code>isGlowing</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last"><p>True to turn on glow; false to turn off.</p></td> </tr> </tbody> </table> <h4 class="name" id="glowScript"><span class="type-signature"></span>glowScript<span class="signature">(topBlockId<span class="signature-attributes">nullable</span>, isGlowing)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit feedback for script glowing.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>topBlockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>ID for the top block to update glow</p></td> </tr> <tr> <td class="name"><code>isGlowing</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last"><p>True to turn on glow; false to turn off.</p></td> </tr> </tbody> </table> <h4 class="name" id="greenFlag"><span class="type-signature"></span>greenFlag<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Start all threads that start with the green flag.</p> </div> <h4 class="name" id="isActiveThread"><span class="type-signature"></span>isActiveThread<span class="signature">(thread<span class="signature-attributes">nullable</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Return whether a thread is currently active/running.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>thread</code></td> <td class="type"> <span class="param-type"><a href="Thread.html">Thread</a></span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>Thread object to check.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>True if the thread is active/running.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isWaitingThread"><span class="type-signature"></span>isWaitingThread<span class="signature">(thread<span class="signature-attributes">nullable</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Return whether a thread is waiting for more information or done.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>thread</code></td> <td class="type"> <span class="param-type"><a href="Thread.html">Thread</a></span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>Thread object to check.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>True if the thread is waiting</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="makeMessageContextForTarget"><span class="type-signature"></span>makeMessageContextForTarget<span class="signature">(target<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Create a context ("args") object for use with <code>formatMessage</code> on messages which might be target-specific.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>the target to use as context. If a target is not provided, default to the current editing target or the stage.</p></td> </tr> </tbody> </table> <h4 class="name" id="moveExecutable"><span class="type-signature"></span>moveExecutable<span class="signature">(executableTarget, delta)</span><span class="type-signature"> → {number}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Move a target in the execution order by a relative amount.</p> <p>A positve number will make the target execute earlier. A negative number will make the target execute later in the order.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>executableTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>target to move</p></td> </tr> <tr> <td class="name"><code>delta</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>number of positions to move target by</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>new position in execution order</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> <h4 class="name" id="quietGlow"><span class="type-signature"></span>quietGlow<span class="signature">(scriptBlockId<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>"Quiet" a script's glow: stop the VM from generating glow/unglow events about that script. Use when a script has just been deleted, but we may still be tracking glow data about it.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>scriptBlockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Id of top-level block in script to quiet.</p></td> </tr> </tbody> </table> <h4 class="name" id="registerPeripheralExtension"><span class="type-signature"></span>registerPeripheralExtension<span class="signature">(extensionId, extension)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Register an extension that communications with a hardware peripheral by id, to have access to it and its peripheral functions in the future.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the id of the extension.</p></td> </tr> <tr> <td class="name"><code>extension</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"><p>the extension to register.</p></td> </tr> </tbody> </table> <h4 class="name" id="removeExecutable"><span class="type-signature"></span>removeExecutable<span class="signature">(executableTarget)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Remove a target from the execution set.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>executableTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>target to remove</p></td> </tr> </tbody> </table> <h4 class="name" id="requestAddMonitor"><span class="type-signature"></span>requestAddMonitor<span class="signature">(monitor<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Add a monitor to the state. If the monitor already exists in the state, updates those properties that are defined in the given monitor record.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>monitor</code></td> <td class="type"> <span class="param-type">MonitorRecord</span> </td> <td class="description last"><p>Monitor to add.</p></td> </tr> </tbody> </table> <h4 class="name" id="requestBlocksUpdate"><span class="type-signature"></span>requestBlocksUpdate<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit an event that indicates that the blocks on the workspace need updating.</p> </div> <h4 class="name" id="requestHideMonitor"><span class="type-signature"></span>requestHideMonitor<span class="signature">(monitorId<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Hides a monitor and returns success/failure of action.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>monitorId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>ID of the monitor to hide.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>true if monitor exists and was updated, false otherwise</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="requestRedraw"><span class="type-signature"></span>requestRedraw<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Tell the runtime to request a redraw. Use after a clone/sprite has completed some visible operation on the stage.</p> </div> <h4 class="name" id="requestRemoveMonitor"><span class="type-signature"></span>requestRemoveMonitor<span class="signature">(monitorId<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Removes a monitor from the state. Does nothing if the monitor already does not exist in the state.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>monitorId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>ID of the monitor to remove.</p></td> </tr> </tbody> </table> <h4 class="name" id="requestRemoveMonitorByTargetId"><span class="type-signature"></span>requestRemoveMonitorByTargetId<span class="signature">(targetId<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Removes all monitors with the given target ID from the state. Does nothing if the monitor already does not exist in the state.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>targetId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Remove all monitors with given target ID.</p></td> </tr> </tbody> </table> <h4 class="name" id="requestShowMonitor"><span class="type-signature"></span>requestShowMonitor<span class="signature">(monitorId<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Shows a monitor and returns success/failure of action. not exist in the state.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>monitorId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>ID of the monitor to show.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>true if monitor exists and was updated, false otherwise</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="requestTargetsUpdate"><span class="type-signature"></span>requestTargetsUpdate<span class="signature">(target<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit a targets update at the end of the step if the provided target is the original sprite</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>Target requesting the targets update</p></td> </tr> </tbody> </table> <h4 class="name" id="requestToolboxExtensionsUpdate"><span class="type-signature"></span>requestToolboxExtensionsUpdate<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit an event that indicates that the toolbox extension blocks need updating.</p> </div> <h4 class="name" id="requestUpdateMonitor"><span class="type-signature"></span>requestUpdateMonitor<span class="signature">(monitor<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Update a monitor in the state and report success/failure of update.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>monitor</code></td> <td class="type"> <span class="param-type">Map</span> </td> <td class="description last"><p>Monitor values to update. Values on the monitor with overwrite values on the old monitor with the same ID. If a value isn't defined on the new monitor, the old monitor will keep its old value.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>true if monitor exists in the state and was updated, false if it did not exist.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="scanForPeripheral"><span class="type-signature"></span>scanForPeripheral<span class="signature">(extensionId)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Tell the specified extension to scan for a peripheral.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>extensionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>the id of the extension.</p></td> </tr> </tbody> </table> <h4 class="name" id="setCompatibilityMode"><span class="type-signature"></span>setCompatibilityMode<span class="signature">(compatibilityModeOn)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Set whether we are in 30 TPS compatibility mode.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>compatibilityModeOn</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p>True iff in compatibility mode.</p></td> </tr> </tbody> </table> <h4 class="name" id="setEditingTarget"><span class="type-signature"></span>setEditingTarget<span class="signature">(editingTarget<span class="signature-attributes">non-null</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Set the current editing target known by the runtime.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>editingTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>New editing target.</p></td> </tr> </tbody> </table> <h4 class="name" id="setExecutablePosition"><span class="type-signature"></span>setExecutablePosition<span class="signature">(executableTarget, newIndex)</span><span class="type-signature"> → {number}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Set a target to execute at a specific position in the execution order.</p> <p>Infinity will set the target to execute first. 0 will set the target to execute last (before the stage).</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>executableTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="description last"><p>target to move</p></td> </tr> <tr> <td class="name"><code>newIndex</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>position in execution order to place the target</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>new position in the execution order</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> <h4 class="name" id="start"><span class="type-signature"></span>start<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Set up timers to repeatedly step in a browser.</p> </div> <h4 class="name" id="startHats"><span class="type-signature"></span>startHats<span class="signature">(requestedHatOpcode<span class="signature-attributes">non-null</span>, optMatchFields<span class="signature-attributes">opt</span>, optTarget<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Thread.html">Thread</a>>}</span></h4> <dl class="details"> </dl> <div class="description"> <p>Start all relevant hats.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>requestedHatOpcode</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>Opcode of hats to start.</p></td> </tr> <tr> <td class="name"><code>optMatchFields</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Optionally, fields to match on the hat.</p></td> </tr> <tr> <td class="name"><code>optTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Optionally, a target to restrict to.</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> <p>List of threads started by this function.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Thread.html">Thread</a>></span> </dd> </dl> <h4 class="name" id="stopAll"><span class="type-signature"></span>stopAll<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Stop "everything."</p> </div> <h4 class="name" id="stopForTarget"><span class="type-signature"></span>stopForTarget<span class="signature">(target<span class="signature-attributes">non-null</span>, optThreadException<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Stop any threads acting on the target.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>Target to stop threads for.</p></td> </tr> <tr> <td class="name"><code>optThreadException</code></td> <td class="type"> <span class="param-type"><a href="Thread.html">Thread</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Optional thread to skip.</p></td> </tr> </tbody> </table> <h4 class="name" id="toggleScript"><span class="type-signature"></span>toggleScript<span class="signature">(topBlockId<span class="signature-attributes">non-null</span>, opts<span class="signature-attributes">nullable</span>)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Toggle a script.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>topBlockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>ID of block that starts the script.</p></td> </tr> <tr> <td class="name"><code>opts</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>optional arguments to toggle script</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>target ID for target to run script on. If not supplied, uses editing target.</p></td> </tr> <tr> <td class="name"><code>stackClick</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <nullable><br> </td> <td class="description last"><p>true if the user activated the stack by clicking, false if not. This determines whether we show a visual report when turning on the script.</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="updateCurrentMSecs"><span class="type-signature"></span>updateCurrentMSecs<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Update a millisecond timestamp value that is saved on the Runtime. This value is helpful in certain instances for compatibility with Scratch 2, which sometimes uses a <code>currentMSecs</code> timestamp value in Interpreter.as</p> </div> <h4 class="name" id="visualReport"><span class="type-signature"></span>visualReport<span class="signature">(blockId, value)</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description"> <p>Emit value for reporter to show in the blocks.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>blockId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>ID for the block.</p></td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Value to show associated with the block.</p></td> </tr> </tbody> </table> <h3 class="subsection-title">Events</h3> <h4 class="name" id="event:targetWasCreated">targetWasCreated</h4> <dl class="details"> </dl> <div class="description"> <p>Event fired after a new target has been created, possibly by cloning an existing target.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>newTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>the newly created target.</p></td> </tr> <tr> <td class="name"><code>sourceTarget</code></td> <td class="type"> <span class="param-type"><a href="Target.html">Target</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>the target used as a source for the new clone, if any.</p></td> </tr> </tbody> </table> <h5>Listeners of This Event:</h5> <ul> <li><a href="Scratch3MusicBlocks.html#_onTargetCreated">Scratch3MusicBlocks#_onTargetCreated</a></li> <li><a href="Scratch3PenBlocks.html#_onTargetCreated">Scratch3PenBlocks#_onTargetCreated</a></li> <li><a href="Scratch3SoundBlocks.html#_onTargetCreated">Scratch3SoundBlocks#_onTargetCreated</a></li> <li><a href="Scratch3Text2SpeechBlocks.html#_onTargetCreated">Scratch3Text2SpeechBlocks#_onTargetCreated</a></li> </ul> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. </footer> <script>prettyPrint();</script> <script src="scripts/polyfill.js"></script> <script src="scripts/linenumber.js"></script> </body> </html>