2016-06-01 10:04:56 -04:00
|
|
|
<!doctype html>
|
|
|
|
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Scratch VM Playground</title>
|
|
|
|
<link rel="stylesheet" href="playground.css">
|
2016-06-01 10:47:47 -04:00
|
|
|
<link rel="stylesheet" href="../node_modules/highlightjs/styles/zenburn.css">
|
2016-06-01 10:04:56 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
2016-06-01 10:18:08 -04:00
|
|
|
<div id="vm-devtools">
|
2016-06-01 14:17:18 -04:00
|
|
|
<h2>Scratch VM Playground</h2>
|
|
|
|
<button id="greenflag">Green flag</button>
|
|
|
|
<button id="stopall">Stop</button>
|
2016-06-07 20:44:08 -04:00
|
|
|
<p>
|
|
|
|
<a id="threadexplorer-link" href="#">VM Threads</a><br />
|
|
|
|
<a id="blockexplorer-link" href="#">VM Block Representation</a>
|
|
|
|
</p>
|
|
|
|
<div id="tab-threadexplorer">
|
|
|
|
Thread explorer
|
|
|
|
<pre id="threadexplorer"></pre>
|
|
|
|
</div>
|
2016-06-01 10:18:08 -04:00
|
|
|
<div id="tab-blockexplorer">
|
2016-06-07 20:44:08 -04:00
|
|
|
Block explorer
|
2016-06-01 10:47:47 -04:00
|
|
|
<pre id="blockexplorer"></pre>
|
2016-06-01 10:18:08 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-06-01 10:04:56 -04:00
|
|
|
<div id="blocks"></div>
|
2016-06-01 10:18:08 -04:00
|
|
|
|
2016-06-01 10:04:56 -04:00
|
|
|
<xml id="toolbox" style="display: none">
|
|
|
|
<category name="Events">
|
|
|
|
<block type="event_whenflagclicked"></block>
|
|
|
|
<block type="event_whenbroadcastreceived"></block>
|
|
|
|
<block type="event_broadcast"></block>
|
|
|
|
</category>
|
|
|
|
<category name="Control">
|
|
|
|
<block type="control_forever"></block>
|
|
|
|
<block type="control_repeat">
|
|
|
|
<value name="TIMES">
|
|
|
|
<shadow type="math_number">
|
|
|
|
<field name="NUM">4</field>
|
|
|
|
</shadow>
|
|
|
|
</value>
|
|
|
|
</block>
|
|
|
|
<block type="control_if"></block>
|
|
|
|
<block type="control_if_else"></block>
|
|
|
|
<block type="control_stop"></block>
|
|
|
|
<block type="control_wait">
|
|
|
|
<value name="DURATION">
|
|
|
|
<shadow type="math_number">
|
|
|
|
<field name="NUM">1</field>
|
|
|
|
</shadow>
|
|
|
|
</value>
|
|
|
|
</block>
|
|
|
|
</category>
|
|
|
|
<category name="Wedo">
|
|
|
|
<block type="wedo_setcolor"></block>
|
|
|
|
<block type="wedo_motorspeed"></block>
|
|
|
|
<block type="wedo_whentilt"></block>
|
|
|
|
<block type="wedo_whendistanceclose"></block>
|
|
|
|
</category>
|
|
|
|
<category name="Operators">
|
|
|
|
<block type="math_add">
|
|
|
|
<value name="NUM1">
|
|
|
|
<shadow type="math_number">
|
|
|
|
<field name="NUM">0</field>
|
|
|
|
</shadow>
|
|
|
|
</value>
|
|
|
|
<value name="NUM2">
|
|
|
|
<shadow type="math_number">
|
|
|
|
<field name="NUM">0</field>
|
|
|
|
</shadow>
|
|
|
|
</value>
|
|
|
|
</block>
|
|
|
|
<block type="logic_equals">
|
|
|
|
<value name="VALUE1">
|
|
|
|
<shadow type="text">
|
|
|
|
<field name="TEXT">0</field>
|
|
|
|
</shadow>
|
|
|
|
</value>
|
|
|
|
<value name="VALUE2">
|
|
|
|
<shadow type="text">
|
|
|
|
<field name="TEXT">0</field>
|
|
|
|
</shadow>
|
|
|
|
</value>
|
|
|
|
</block>
|
|
|
|
</category>
|
|
|
|
</xml>
|
|
|
|
|
2016-06-01 10:47:47 -04:00
|
|
|
<!-- Syntax highlighter -->
|
|
|
|
<script src="../node_modules/highlightjs/highlight.pack.min.js"></script>
|
2016-06-01 10:04:56 -04:00
|
|
|
<!-- Scratch Blocks -->
|
|
|
|
<!-- For easier development between the two, use `npm link` -->
|
|
|
|
<script src="../node_modules/scratch-blocks/blockly_compressed_vertical.js"></script>
|
|
|
|
<script src="../node_modules/scratch-blocks/blocks_compressed.js"></script>
|
|
|
|
<script src="../node_modules/scratch-blocks/blocks_compressed_vertical.js"></script>
|
|
|
|
<!-- Compiled VM -->
|
|
|
|
<script src="../vm.js"></script>
|
|
|
|
<!-- Playground -->
|
|
|
|
<script src="./playground.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|