Spaces:
Runtime error
Runtime error
Upload 175 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +7 -0
- app_main[P-D].py +1111 -0
- blocks/Backdrops/badroom3.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/Backdrops/badroom3.sb3/8cc0b88d53345b3e337e8f028a32a4e7.png +0 -0
- blocks/Backdrops/badroom3.sb3/cd21514d0531fdffb22204e0ec5ed84a.svg +3 -0
- blocks/Backdrops/badroom3.sb3/project.json +1 -0
- blocks/Backdrops/baseball2.sb3/7be1f5b3e682813dac1f297e52ff7dca.png +0 -0
- blocks/Backdrops/baseball2.sb3/7be1f5b3e682813dac1f297e52ff7dca.svg +156 -0
- blocks/Backdrops/baseball2.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/Backdrops/baseball2.sb3/cd21514d0531fdffb22204e0ec5ed84a.svg +3 -0
- blocks/Backdrops/baseball2.sb3/project.json +56 -0
- blocks/Backdrops/beach_malibu.sb3/050615fe992a00d6af0e664e497ebf53.png +3 -0
- blocks/Backdrops/beach_malibu.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/Backdrops/beach_malibu.sb3/project.json +1 -0
- blocks/Backdrops/castle2.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/Backdrops/castle2.sb3/951765ee7f7370f120c9df20b577c22f.png +3 -0
- blocks/Backdrops/castle2.sb3/project.json +1 -0
- blocks/Backdrops/hall.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/Backdrops/hall.sb3/ea86ca30b346f27ca5faf1254f6a31e3.png +3 -0
- blocks/Backdrops/hall.sb3/project.json +1 -0
- blocks/Backdrops/jungle.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/Backdrops/jungle.sb3/f4f908da19e2753f3ed679d7b37650ca.png +3 -0
- blocks/Backdrops/jungle.sb3/project.json +1 -0
- blocks/blocks.json +2221 -0
- blocks/boolean_blocks.json +281 -0
- blocks/c_blocks.json +105 -0
- blocks/cap_blocks.json +53 -0
- blocks/classwise_blocks/control_block.json +168 -0
- blocks/classwise_blocks/data_block.json +328 -0
- blocks/classwise_blocks/event_block.json +136 -0
- blocks/classwise_blocks/look_block.json +365 -0
- blocks/classwise_blocks/motion_block.json +370 -0
- blocks/classwise_blocks/operator_block.json +409 -0
- blocks/classwise_blocks/sensing_block.json +292 -0
- blocks/classwise_blocks/sound_block.json +167 -0
- blocks/embeddings.json +0 -0
- blocks/excel_contetn/hat_block.xlsx +0 -0
- blocks/excel_contetn/stack_block.xlsx +0 -0
- blocks/hat_blocks.json +217 -0
- blocks/reporter_blocks.json +709 -0
- blocks/sprites/Batter.sprite3/592ee9ab2aeefe65cb4fb95fcd046f33.svg +57 -0
- blocks/sprites/Batter.sprite3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/sprites/Batter.sprite3/9d193bef6e3d6d8eba6d1470b8bf9351.svg +62 -0
- blocks/sprites/Batter.sprite3/baseball_sprite_motion_1.png +0 -0
- blocks/sprites/Batter.sprite3/bd4fc003528acfa847e45ff82f346eee.svg +54 -0
- blocks/sprites/Batter.sprite3/fdfde4bcbaca0f68e83fdf3f4ef0c660.svg +60 -0
- blocks/sprites/Batter.sprite3/sprite.json +67 -0
- blocks/sprites/Bear.sprite3/6f303e972f33fcb7ef36d0d8012d0975.svg +1 -0
- blocks/sprites/Bear.sprite3/83a9787d4cb6f3b7632b4ddfebf74367.wav +0 -0
- blocks/sprites/Bear.sprite3/bear_motion_2.png +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
blocks/Backdrops/beach_malibu.sb3/050615fe992a00d6af0e664e497ebf53.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
blocks/Backdrops/castle2.sb3/951765ee7f7370f120c9df20b577c22f.png filter=lfs diff=lfs merge=lfs -text
|
38 |
+
blocks/Backdrops/hall.sb3/ea86ca30b346f27ca5faf1254f6a31e3.png filter=lfs diff=lfs merge=lfs -text
|
39 |
+
blocks/Backdrops/jungle.sb3/f4f908da19e2753f3ed679d7b37650ca.png filter=lfs diff=lfs merge=lfs -text
|
40 |
+
static/assets/backdrops/ef9973bcff6d4cbc558e946028ec7d23.png filter=lfs diff=lfs merge=lfs -text
|
41 |
+
uploads/documents/LLM_based_QA_chatbot_builder.pdf filter=lfs diff=lfs merge=lfs -text
|
42 |
+
utils/__pycache__/block_relation_builder.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
app_main[P-D].py
ADDED
@@ -0,0 +1,1111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask, request, jsonify, render_template, send_from_directory
|
2 |
+
import cv2, json,base64,io,os,tempfile,logging, re
|
3 |
+
import numpy as np
|
4 |
+
from unstructured.partition.pdf import partition_pdf
|
5 |
+
from PIL import Image
|
6 |
+
# from imutils.perspective import four_point_transform
|
7 |
+
from dotenv import load_dotenv
|
8 |
+
import pytesseract
|
9 |
+
# from transformers import AutoProcessor, AutoModelForImageTextToText, AutoModelForVision2Seq
|
10 |
+
# from langchain_community.document_loaders.image_captions import ImageCaptionLoader
|
11 |
+
from werkzeug.utils import secure_filename
|
12 |
+
from langchain_groq import ChatGroq
|
13 |
+
from langgraph.prebuilt import create_react_agent
|
14 |
+
from pdf2image import convert_from_path
|
15 |
+
from concurrent.futures import ThreadPoolExecutor
|
16 |
+
from pdf2image.exceptions import PDFInfoNotInstalledError
|
17 |
+
from typing import Dict, TypedDict, Optional, Any
|
18 |
+
from langgraph.graph import StateGraph, END
|
19 |
+
import uuid
|
20 |
+
import shutil, time
|
21 |
+
from langchain_experimental.open_clip.open_clip import OpenCLIPEmbeddings
|
22 |
+
# from matplotlib.offsetbox import OffsetImage, AnnotationBbox
|
23 |
+
from io import BytesIO
|
24 |
+
from pathlib import Path
|
25 |
+
import os
|
26 |
+
|
27 |
+
# ============================== #
|
28 |
+
# INITIALIZE CLIP EMBEDDER #
|
29 |
+
# ============================== #
|
30 |
+
clip_embd = OpenCLIPEmbeddings()
|
31 |
+
|
32 |
+
# Configure logging
|
33 |
+
logging.basicConfig(
|
34 |
+
level=logging.DEBUG, # Use INFO or ERROR in production
|
35 |
+
format="%(asctime)s [%(levelname)s] %(message)s",
|
36 |
+
handlers=[
|
37 |
+
logging.FileHandler("app.log"),
|
38 |
+
logging.StreamHandler()
|
39 |
+
]
|
40 |
+
)
|
41 |
+
|
42 |
+
logger = logging.getLogger(__name__)
|
43 |
+
|
44 |
+
load_dotenv()
|
45 |
+
# os.environ["GROQ_API_KEY"] = os.getenv("GROQ_API_KEY")
|
46 |
+
groq_api_key = os.getenv("GROQ_API_KEY")
|
47 |
+
|
48 |
+
llm = ChatGroq(
|
49 |
+
model="meta-llama/llama-4-scout-17b-16e-instruct",
|
50 |
+
temperature=0,
|
51 |
+
max_tokens=None,
|
52 |
+
)
|
53 |
+
|
54 |
+
app = Flask(__name__)
|
55 |
+
|
56 |
+
# ============================== #
|
57 |
+
# TESSERACT CONFIGURATION #
|
58 |
+
# ============================== #
|
59 |
+
# Set the Tesseract executable path
|
60 |
+
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
|
61 |
+
# Set the TESSDATA_PREFIX environment variable to the directory containing the 'tessdata' folder
|
62 |
+
# This is crucial for Tesseract to find its language data files (e.g., eng.traineddata)
|
63 |
+
os.environ['TESSDATA_PREFIX'] = r'C:\Program Files\Tesseract-OCR'
|
64 |
+
|
65 |
+
poppler_path = r"C:\poppler\Library\bin"
|
66 |
+
backdrop_images_path = r"blocks\Backdrops"
|
67 |
+
sprite_images_path = r"blocks\sprites"
|
68 |
+
|
69 |
+
count = 0
|
70 |
+
BASE_DIR = Path(__file__).parent
|
71 |
+
BLOCKS_DIR = BASE_DIR / "blocks"
|
72 |
+
STATIC_DIR = BASE_DIR / "static"
|
73 |
+
GEN_PROJECT_DIR = BASE_DIR / "generated_projects"
|
74 |
+
BACKDROP_DIR = BLOCKS_DIR / "Backdrops"
|
75 |
+
SPRITE_DIR = BLOCKS_DIR / "sprites"
|
76 |
+
OUTPUT_DIR = BASE_DIR / "OUTPUTS"
|
77 |
+
DETECTED_IMAGE_DIR = OUTPUT_DIR / "DETECTED_IMAGE"
|
78 |
+
IMAGE_DIR = OUTPUT_DIR / "SCANNED_IMAGE"
|
79 |
+
JSON_DIR = OUTPUT_DIR / "EXTRACTED_JSON"
|
80 |
+
|
81 |
+
for d in (BLOCKS_DIR, STATIC_DIR, GEN_PROJECT_DIR, OUTPUT_DIR, BACKDROP_DIR, SPRITE_DIR, DETECTED_IMAGE_DIR, IMAGE_DIR, ):
|
82 |
+
d.mkdir(parents=True, exist_ok=True)
|
83 |
+
|
84 |
+
def classify_image_type(description_or_name: str) -> str:
|
85 |
+
desc = description_or_name.lower()
|
86 |
+
|
87 |
+
sprite_keywords = ["sprite", "character", "animal", "person", "creature", "robot", "figure"]
|
88 |
+
backdrop_keywords = ["background", "scene", "forest", "city", "room", "sky", "mountain", "village"]
|
89 |
+
code_block_keywords = [
|
90 |
+
"move", "turn", "wait", "repeat", "if", "else", "broadcast",
|
91 |
+
"glide", "change", "forever", "when", "switch", "costume",
|
92 |
+
"say", "think", "stop", "clone", "touching", "sensing",
|
93 |
+
"scratch", "block", "code", "set", "variable"
|
94 |
+
]
|
95 |
+
|
96 |
+
if any(kw in desc for kw in code_block_keywords):
|
97 |
+
return "code-block"
|
98 |
+
elif any(kw in desc for kw in sprite_keywords):
|
99 |
+
return "sprite"
|
100 |
+
elif any(kw in desc for kw in backdrop_keywords):
|
101 |
+
return "backdrop"
|
102 |
+
else:
|
103 |
+
return "unknown"
|
104 |
+
|
105 |
+
class GameState(TypedDict):
|
106 |
+
project_json: dict
|
107 |
+
description: str
|
108 |
+
project_id: str
|
109 |
+
project_image: str
|
110 |
+
action_plan: Optional[Dict]
|
111 |
+
pseudo_node: Optional[Dict]
|
112 |
+
temporary_node: Optional[Dict]
|
113 |
+
|
114 |
+
|
115 |
+
# Refined SYSTEM_PROMPT with more explicit Scratch JSON rules, especially for variables
|
116 |
+
SYSTEM_PROMPT = """
|
117 |
+
You are an expert AI assistant named GameScratchAgent, specialized in generating and modifying Scratch-VM 3.x game project JSON.
|
118 |
+
Your core task is to process game descriptions and existing Scratch JSON structures, then produce or update JSON segments accurately.
|
119 |
+
You possess deep knowledge of Scratch 3.0 project schema, informed by comprehensive reference materials. When generating or modifying the `blocks` section, pay extremely close attention to the following:
|
120 |
+
|
121 |
+
**Scratch Project JSON Schema Rules:**
|
122 |
+
|
123 |
+
1. **Target Structure (`project.json`'s `targets` array):**
|
124 |
+
* Each object in the `targets` array represents a Stage or a Sprite.
|
125 |
+
* `isStage`: A boolean indicating if the target is the Stage (`true`) or a Sprite (`false`).
|
126 |
+
* `name`: The name of the Stage (e.g., `"Stage"`) or the Sprite (e.g., `"Cat"`). This property replaces `objName` found in older Scratch versions.
|
127 |
+
* `variables` dictionary: This dictionary maps unique variable IDs to arrays `[variable_name, initial_value, isCloudVariable?]`.
|
128 |
+
* `variable_name`: The user-defined name of the variable.
|
129 |
+
* `initial_value`: The variable's initial value, which can be a number or a string.
|
130 |
+
* `isCloudVariable?`: (Optional) A boolean indicating if it's a cloud variable (`true`) or a local variable (`false` or absent for regular variables).
|
131 |
+
* Example: `"myVarId123": ["score", 0]`, `"cloudVarId456": ["☁ High Score", "54", true]`
|
132 |
+
* `lists` dictionary: This dictionary maps unique list IDs to arrays `[list_name, [item1, item2, ...]]`.
|
133 |
+
* Example: `"myListId789": ["my list", ["apple", "banana"]]`
|
134 |
+
* `broadcasts` dictionary: This dictionary maps unique broadcast IDs to their names.
|
135 |
+
* Example: `"myBroadcastId": "Game Over"`
|
136 |
+
* `blocks` dictionary: This dictionary contains all the blocks belonging to this target. Keys are block IDs, values are block objects.
|
137 |
+
|
138 |
+
2. **Block Structure (within a `target`'s `blocks` dictionary):**
|
139 |
+
* Every block object must have the following core properties:
|
140 |
+
* [cite_start]`opcode`: A unique internal identifier for the block's specific functionality (e.g., `"motion_movesteps"`, `"event_whenflagclicked"`)[cite: 31, 18, 439, 452].
|
141 |
+
* `parent`: The ID of the block directly above it in the script stack (or `null` for a top-level block).
|
142 |
+
* `next`: The ID of the block directly below it in the script stack (or `null` for the end of a stack).
|
143 |
+
* `inputs`: An object defining values or blocks plugged into the block's input slots. Values are **arrays**.
|
144 |
+
* `fields`: An object defining dropdown menu selections or direct internal values within the block. Values are **arrays**.
|
145 |
+
* `shadow`: `true` if it's a shadow block (e.g., a default number input that can be replaced by another block), `false` otherwise.
|
146 |
+
* `topLevel`: `true` if it's a hat block or a standalone block (not connected to a parent), `false` otherwise.
|
147 |
+
|
148 |
+
3. **`inputs` Property Details (for blocks plugged into input slots):**
|
149 |
+
* **Direct Block Connection (Reporter/Boolean block plugged in):**
|
150 |
+
* Format: `"<INPUT_NAME>": [1, "<blockId_of_plugged_block>"]`
|
151 |
+
* Example: `"CONDITION": [1, "someBooleanBlockId"]` (e.g., for an `if` block).
|
152 |
+
* **Literal Value Input (Shadow block with a literal):**
|
153 |
+
* Format: `"<INPUT_NAME>": [1, [<type_code>, "<value_string>"]]`
|
154 |
+
* `type_code`: A numeric code representing the data type. Common codes include: `4` for number, `7` for string/text, `10` for string/message.
|
155 |
+
* `value_string`: The literal value as a string.
|
156 |
+
* Examples:
|
157 |
+
* Number: `"STEPS": [1, [4, "10"]]` (for `move 10 steps` block).
|
158 |
+
* String/Text: `"MESSAGE": [1, [7, "Hello"]]` (for `say Hello` block).
|
159 |
+
* String/Message (common for text inputs): `"MESSAGE": [1, [10, "Hello!"]]` (for `say Hello! for 2 secs`).
|
160 |
+
* **C-Block Substack (blocks within a loop or conditional):**
|
161 |
+
* Format: `"<SUBSTACK_NAME>": [2, "<blockId_of_first_block_in_substack>"]`
|
162 |
+
* Common `SUBSTACK_NAME` values are `SUBSTACK` (for `if`, `forever`, `repeat`) and `SUBSTACK2` (for `else` in `if else`).
|
163 |
+
* Example: `"SUBSTACK": [2, "firstBlockInLoopId"]`
|
164 |
+
|
165 |
+
4. **`fields` Property Details (for dropdowns or direct internal values):**
|
166 |
+
* Used for dropdown menus, variable names, list names, or other static selections directly within the block.
|
167 |
+
* Format: `"<FIELD_NAME>": ["<selected_value>", null]`
|
168 |
+
* Examples:
|
169 |
+
* Dropdown: `"KEY_OPTION": ["space", null]` (for `when space key pressed`).
|
170 |
+
* Variable Name: `"VARIABLE": ["score", null]` (for `set score to 0`).
|
171 |
+
* Direction (specific motion block): `"FORWARD_BACKWARD": ["forward", null]` (for `go forward layers`).
|
172 |
+
|
173 |
+
5. **Unique IDs:**
|
174 |
+
* All block IDs, variable IDs, and list IDs must be unique strings (e.g., "myBlock123", "myVarId456", "myListId789"). Do NOT use placeholder strings like "block_id_here".
|
175 |
+
|
176 |
+
6. **No Nested `blocks` Dictionary:**
|
177 |
+
* The `blocks` dictionary should only appear once per `target` (sprite/stage). Do NOT nest a `blocks` dictionary inside an individual block definition. Blocks that are part of a substack are linked via the `SUBSTACK` input.
|
178 |
+
|
179 |
+
7. **Asset Properties (for Costumes/Sounds):**
|
180 |
+
* `assetId`, `md5ext`, `bitmapResolution`, `rotationCenterX`/`rotationCenterY` should be correctly associated with costume and sound objects within the `costumes` and `sounds` arrays.
|
181 |
+
|
182 |
+
**General Principles and Important Considerations:**
|
183 |
+
* **Backward Compatibility:** Adhere strictly to existing Scratch 3.0 opcodes and schema to ensure backward compatibility with older projects. [cite_start]Opcodes must remain consistent to prevent previously saved projects from failing to load or behaving unexpectedly[cite: 18, 19, 25, 65].
|
184 |
+
* **Forgiving Inputs:** Recognize that Scratch is designed to be "forgiving in its interpretation of inputs." [cite_start]The Scratch VM handles potentially "invalid" inputs gracefully (e.g., converting a number to a string if expected, returning default values like zero or empty strings, or performing no action) rather than crashing[cite: 20, 21, 22, 38, 39, 41]. This implies that precise type matching for inputs might be handled internally by Scratch, allowing for some flexibility in how values are provided, but the agent should aim for the most common and logical type.
|
185 |
+
"""
|
186 |
+
|
187 |
+
SYSTEM_PROMPT_JSON_CORRECTOR ="""
|
188 |
+
You are an assistant that outputs JSON responses strictly following the given schema.
|
189 |
+
If the JSON you produce has any formatting errors, missing required fields, or invalid structure, you must identify the problems and correct them.
|
190 |
+
Always return only valid JSON that fully conforms to the schema below, enclosed in triple backticks (```), without any extra text or explanation.
|
191 |
+
|
192 |
+
If you receive an invalid or incomplete JSON response, fix it by:
|
193 |
+
- Adding any missing required fields with appropriate values.
|
194 |
+
- Correcting syntax errors such as missing commas, brackets, or quotes.
|
195 |
+
- Ensuring the JSON structure matches the schema exactly.
|
196 |
+
|
197 |
+
Remember: Your output must be valid JSON only, ready to be parsed without errors.
|
198 |
+
"""
|
199 |
+
# debugger and resolver agent for Scratch 3.0
|
200 |
+
# Main agent of the system agent for Scratch 3.0
|
201 |
+
agent = create_react_agent(
|
202 |
+
model=llm,
|
203 |
+
tools=[], # No specific tools are defined here, but could be added later
|
204 |
+
prompt=SYSTEM_PROMPT
|
205 |
+
)
|
206 |
+
|
207 |
+
agent_json_resolver = create_react_agent(
|
208 |
+
model=llm,
|
209 |
+
tools=[], # No specific tools are defined here, but could be added later
|
210 |
+
prompt=SYSTEM_PROMPT_JSON_CORRECTOR
|
211 |
+
)
|
212 |
+
|
213 |
+
# Helper function to load the block catalog from a JSON file
|
214 |
+
def _load_block_catalog(file_path: str) -> Dict:
|
215 |
+
"""Loads the Scratch block catalog from a specified JSON file."""
|
216 |
+
try:
|
217 |
+
with open(file_path, 'r') as f:
|
218 |
+
catalog = json.load(f)
|
219 |
+
logger.info(f"Successfully loaded block catalog from {file_path}")
|
220 |
+
return catalog
|
221 |
+
except FileNotFoundError:
|
222 |
+
logger.error(f"Error: Block catalog file not found at {file_path}")
|
223 |
+
# Return an empty dict or raise an error, depending on desired behavior
|
224 |
+
return {}
|
225 |
+
except json.JSONDecodeError as e:
|
226 |
+
logger.error(f"Error decoding JSON from {file_path}: {e}")
|
227 |
+
return {}
|
228 |
+
except Exception as e:
|
229 |
+
logger.error(f"An unexpected error occurred while loading {file_path}: {e}")
|
230 |
+
return {}
|
231 |
+
|
232 |
+
# --- Global variable for the block catalog ---
|
233 |
+
# --- Global variable for the block catalog ---
|
234 |
+
ALL_SCRATCH_BLOCKS_CATALOG = {}
|
235 |
+
BLOCK_CATALOG_PATH = r"blocks\blocks.json" # Define the path to your JSON file
|
236 |
+
HAT_BLOCKS_PATH = r"blocks\hat_blocks.json" # Path to the hat blocks JSON file
|
237 |
+
STACK_BLOCKS_PATH = r"blocks\stack_blocks.json" # Path to the stack blocks JSON file
|
238 |
+
REPORTER_BLOCKS_PATH = r"blocks\reporter_blocks.json" # Path to the reporter blocks JSON file
|
239 |
+
BOOLEAN_BLOCKS_PATH = r"blocks\boolean_blocks.json" # Path to the boolean blocks JSON file
|
240 |
+
C_BLOCKS_PATH = r"blocks\c_blocks.json" # Path to the C blocks JSON file
|
241 |
+
CAP_BLOCKS_PATH = r"blocks\cap_blocks.json" # Path to the cap blocks JSON file
|
242 |
+
|
243 |
+
# Load the block catalogs from their respective JSON files
|
244 |
+
hat_block_data = _load_block_catalog(HAT_BLOCKS_PATH)
|
245 |
+
hat_description = hat_block_data["description"]
|
246 |
+
hat_opcodes_functionalities = "\n".join([f" - Opcode: {block['op_code']}, functionality: {block['functionality']} example: standalone use: {block['example_standalone']}" for block in hat_block_data["blocks"]])
|
247 |
+
print("Hat blocks loaded successfully.", hat_description)
|
248 |
+
boolean_block_data = _load_block_catalog(BOOLEAN_BLOCKS_PATH)
|
249 |
+
boolean_description = boolean_block_data["description"]
|
250 |
+
boolean_opcodes_functionalities = "\n".join([f" - Opcode: {block['op_code']}, functionality: {block['functionality']} example: standalone use: {block['example_standalone']}" for block in boolean_block_data["blocks"]])
|
251 |
+
|
252 |
+
c_block_data = _load_block_catalog(C_BLOCKS_PATH)
|
253 |
+
c_description = c_block_data["description"]
|
254 |
+
c_opcodes_functionalities = "\n".join([f" - Opcode: {block['op_code']}, functionality: {block['functionality']} example: standalone use: {block['example_standalone']}" for block in c_block_data["blocks"]])
|
255 |
+
|
256 |
+
cap_block_data = _load_block_catalog(CAP_BLOCKS_PATH)
|
257 |
+
cap_description = cap_block_data["description"]
|
258 |
+
cap_opcodes_functionalities = "\n".join([f" - Opcode: {block['op_code']}, functionality: {block['functionality']} example: standalone use: {block['example_standalone']}" for block in cap_block_data["blocks"]])
|
259 |
+
|
260 |
+
reporter_block_data = _load_block_catalog(REPORTER_BLOCKS_PATH)
|
261 |
+
reporter_description = reporter_block_data["description"]
|
262 |
+
reporter_opcodes_functionalities = "\n".join([f" - Opcode: {block['op_code']}, functionality: {block['functionality']} example: standalone use: {block['example_standalone']}" for block in reporter_block_data["blocks"]])
|
263 |
+
|
264 |
+
stack_block_data = _load_block_catalog(STACK_BLOCKS_PATH)
|
265 |
+
stack_description = stack_block_data["description"]
|
266 |
+
stack_opcodes_functionalities = "\n".join([f" - Opcode: {block['op_code']}, functionality: {block['functionality']} example: standalone use: {block['example_standalone']}" for block in stack_block_data["blocks"]])
|
267 |
+
|
268 |
+
# This makes ALL_SCRATCH_BLOCKS_CATALOG available globally
|
269 |
+
ALL_SCRATCH_BLOCKS_CATALOG = _load_block_catalog(BLOCK_CATALOG_PATH)
|
270 |
+
|
271 |
+
# Helper function to extract JSON from LLM response
|
272 |
+
def extract_json_from_llm_response(raw_response: str) -> dict:
|
273 |
+
# --- 1) Pull out the JSON code‑block if present ---
|
274 |
+
md = re.search(r"```(?:json)?\s*([\s\S]*?)\s*```", raw_response)
|
275 |
+
json_string = md.group(1).strip() if md else raw_response
|
276 |
+
|
277 |
+
# --- 2) Trim to the outermost { … } so we drop any prefix/suffix junk ---
|
278 |
+
first, last = json_string.find('{'), json_string.rfind('}')
|
279 |
+
if 0 <= first < last:
|
280 |
+
json_string = json_string[first:last+1]
|
281 |
+
|
282 |
+
# --- 3) PRE‑CLEANUP: remove stray assistant{…}, rogue assistant keys, fix boolean quotes ---
|
283 |
+
json_string = re.sub(r'\b\w+\s*{', '{', json_string)
|
284 |
+
json_string = re.sub(r'"assistant"\s*:', '', json_string)
|
285 |
+
json_string = re.sub(r'\b(false|true)"', r'\1', json_string)
|
286 |
+
logger.debug("Ran pre‑cleanup for stray tokens and boolean quotes.")
|
287 |
+
|
288 |
+
# --- 3.1) Fix stray inner quotes at start of name/list values ---
|
289 |
+
# e.g., { "name": " \"recent_scoress\"", ... } → "recent_scoress"
|
290 |
+
json_string = re.sub(
|
291 |
+
r'("name"\s*:\s*")\s*"',
|
292 |
+
r'\1',
|
293 |
+
json_string
|
294 |
+
)
|
295 |
+
|
296 |
+
# --- 4) Escape all embedded quotes in any `logic` value up to the next key ---
|
297 |
+
def _esc(m):
|
298 |
+
prefix, body = m.group(1), m.group(2)
|
299 |
+
return prefix + body.replace('"', r'\"')
|
300 |
+
json_string = re.sub(
|
301 |
+
r'("logic"\s*:\s*")([\s\S]+?)(?=",\s*"[A-Za-z_]\w*"\s*:\s*)',
|
302 |
+
_esc,
|
303 |
+
json_string
|
304 |
+
)
|
305 |
+
logger.debug("Escaped embedded quotes in logic fields.")
|
306 |
+
|
307 |
+
logger.debug("Quoted unquoted keys.")
|
308 |
+
|
309 |
+
# --- 6) Remove trailing commas before } or ] ---
|
310 |
+
json_string = re.sub(r',\s*(?=[}\],])', '', json_string)
|
311 |
+
json_string = re.sub(r',\s*,', ',', json_string)
|
312 |
+
logger.debug("Removed trailing commas.")
|
313 |
+
|
314 |
+
# --- 7) Balance braces: drop extra } at end if needed ---
|
315 |
+
ob, cb = json_string.count('{'), json_string.count('}')
|
316 |
+
if cb > ob:
|
317 |
+
excess = cb - ob
|
318 |
+
json_string = json_string.rstrip()[:-excess]
|
319 |
+
logger.debug(f"Stripped {excess} extra closing brace(s).")
|
320 |
+
|
321 |
+
# --- 8) Escape literal newlines in *all* string values ---
|
322 |
+
json_string = re.sub(
|
323 |
+
r'"((?:[^"\\]|\\.)*?)"',
|
324 |
+
lambda m: '"' + m.group(1).replace('\n', '\\n').replace('\r', '\\r') + '"',
|
325 |
+
json_string,
|
326 |
+
flags=re.DOTALL
|
327 |
+
)
|
328 |
+
logger.debug("Escaped newlines in strings.")
|
329 |
+
|
330 |
+
# --- 9) Final parse attempt ---
|
331 |
+
try:
|
332 |
+
return json.loads(json_string)
|
333 |
+
except json.JSONDecodeError:
|
334 |
+
logger.error("Sanitized JSON still invalid:\n%s", json_string)
|
335 |
+
raise
|
336 |
+
|
337 |
+
# Node 1: Logic updating if any issue here
|
338 |
+
def pseudo_generator_node(state: GameState):
|
339 |
+
logger.info("--- Running plan_logic_aligner_node ---")
|
340 |
+
image = state.get("image", "")
|
341 |
+
|
342 |
+
project_json = state["project_json"]
|
343 |
+
|
344 |
+
# MODIFICATION 1: Include 'Stage' in the list of names to plan for.
|
345 |
+
# It's crucial to ensure 'Stage' is always present for its global role.
|
346 |
+
target_names = [t["name"] for t in project_json["targets"]]
|
347 |
+
|
348 |
+
refinement_prompt = f"""
|
349 |
+
You are an expert in Scratch 3.0 game development, specializing in understanding block relationships (stacked, nested).
|
350 |
+
"Analyze the Scratch code-block image and generate Pseudo-Code for what this logic appears to be doing."
|
351 |
+
From Image, you also have to detect a value of Key given in Text form "Script for: ". Below is the example
|
352 |
+
Example: "Script for: Bear", "Script for:" is a key and "Bear" is value and check if there is related target name available.
|
353 |
+
|
354 |
+
**Targets in Game (Sprites and Stage) available in project_json:** {', '.join(target_names)}
|
355 |
+
|
356 |
+
--- Scratch 3.0 Block Reference ---
|
357 |
+
### Hat Blocks
|
358 |
+
Description: {hat_description}
|
359 |
+
Blocks:
|
360 |
+
{hat_opcodes_functionalities}
|
361 |
+
|
362 |
+
### Boolean Blocks
|
363 |
+
Description: {boolean_description}
|
364 |
+
Blocks:
|
365 |
+
{boolean_opcodes_functionalities}
|
366 |
+
|
367 |
+
### C Blocks
|
368 |
+
Description: {c_description}
|
369 |
+
Blocks:
|
370 |
+
{c_opcodes_functionalities}
|
371 |
+
|
372 |
+
### Cap Blocks
|
373 |
+
Description: {cap_description}
|
374 |
+
Blocks:
|
375 |
+
{cap_opcodes_functionalities}
|
376 |
+
|
377 |
+
### Reporter Blocks
|
378 |
+
Description: {reporter_description}
|
379 |
+
Blocks:
|
380 |
+
{reporter_opcodes_functionalities}
|
381 |
+
|
382 |
+
### Stack Blocks
|
383 |
+
Description: {stack_description}
|
384 |
+
Blocks:
|
385 |
+
{stack_opcodes_functionalities}
|
386 |
+
-----------------------------------
|
387 |
+
|
388 |
+
Your task is to:
|
389 |
+
If you don't find any "Code-Blocks" then,
|
390 |
+
**Don't generate Pseudo Code, and pass the message "No Code-blocks"
|
391 |
+
If you find any "Code-Blocks" then,
|
392 |
+
1. **Refine the 'logic'**: Make it precise, accurate, and fully aligned with the Game Description. Use Scratch‑consistent verbs and phrasing. **Do NOT** use raw double‑quotes inside the logic string.
|
393 |
+
|
394 |
+
2. **Structural requirements**:
|
395 |
+
- **Numeric values** `(e.g., 0, 5, 0.2, -130)` **must** be in parentheses: `(0)`, `(5)`, `(0.2)`, `(-130)`.
|
396 |
+
- **AlphaNumeric values** `(e.g., hello, say 5, 4, hi!)` **must** be in parentheses: `(hello)`, `(say 5)`, `(4)`, `(hi!)`.
|
397 |
+
- **Variables** must be in the form `[variable v]` (e.g., `[score v]`), even when used inside expressions two example use `set [score v] to (1)` or `show variable ([speed v])`.
|
398 |
+
- **Dropdown options** must be in the form `[option v]` (e.g., `[Game Start v]`, `[blue sky v]`). example use `when [space v] key pressed`.
|
399 |
+
- **Reporter blocks** used as inputs must be double‑wrapped: `((x position))`, `((y position))`. example use `if <((y position)) = (-130)> then` or `(((x position)) * (1))`.
|
400 |
+
- **Boolean blocks** in conditions must be inside `< >`, including nested ones: `<not <condition>>`, `<<cond1> and <cond2>>`,`<<cond1> or <cond2>>`.
|
401 |
+
- **Other Boolean blocks** in conditions must be inside `< >`, including nested ones or values or variables: `<(block/value/variable) * (block/value/variable)>`,`<(block/value/variable) < (block/value/variable)>`, and example of another variable`<[apple v] contains [a v]?>`.
|
402 |
+
- **Operator expressions** must use explicit Scratch operator blocks, e.g.:
|
403 |
+
```
|
404 |
+
(([ballSpeed v]) * (1.1))
|
405 |
+
```
|
406 |
+
- **Every hat block script must end** with a final `end` on its own line.
|
407 |
+
|
408 |
+
3. **Pseudo‑code formatting**:
|
409 |
+
- Represent each block or nested block on its own line.
|
410 |
+
- Indent nested blocks by 4 spaces under their parent (`forever`, `if`, etc.).
|
411 |
+
- No comments or explanatory text—just the block sequence.
|
412 |
+
- a natural language breakdown of each step taken after the event, formatted as a multi-line string representing pseudo-code. Ensure clarity and granularity—each described action should map closely to a Scratch block or tight sequence.
|
413 |
+
|
414 |
+
4. **Logic content**:
|
415 |
+
- Build clear flow for mechanics (movement, jumping, flying, scoring, collisions).
|
416 |
+
- Match each action closely to a Scratch block or tight sequence.
|
417 |
+
- Do **NOT** include any justification or comments—only the raw logic.
|
418 |
+
|
419 |
+
5. **Examples for reference**:
|
420 |
+
**Correct** pattern for a simple start script:
|
421 |
+
```
|
422 |
+
when green flag clicked
|
423 |
+
switch backdrop to [blue sky v]
|
424 |
+
set [score v] to (0)
|
425 |
+
show variable [score v]
|
426 |
+
broadcast [Game Start v]
|
427 |
+
end
|
428 |
+
```
|
429 |
+
**Correct** pattern for updating the high score variable handling:
|
430 |
+
```
|
431 |
+
when I receive [Game Over v]
|
432 |
+
if <((score)) > (([High Score v]))> then
|
433 |
+
set [High Score v] to ([score v])
|
434 |
+
end
|
435 |
+
switch backdrop to [Game Over v]
|
436 |
+
end
|
437 |
+
```
|
438 |
+
**Correct** pattern for level up and increase difficulty use:
|
439 |
+
```
|
440 |
+
when I receive [Level Up v]
|
441 |
+
change [level v] by (1)
|
442 |
+
set [ballSpeed v] to ((([ballSpeed v]) * (1.1)))
|
443 |
+
end
|
444 |
+
```
|
445 |
+
**Correct** pattern for jumping mechanics use:
|
446 |
+
```
|
447 |
+
when [space v] key pressed
|
448 |
+
if <((y position)) = (-100)> then
|
449 |
+
repeat (5)
|
450 |
+
change y by (100)
|
451 |
+
wait (0.1) seconds
|
452 |
+
change y by (-100)
|
453 |
+
wait (0.1) seconds
|
454 |
+
end
|
455 |
+
end
|
456 |
+
end
|
457 |
+
```
|
458 |
+
**Correct** pattern for continuos moving objects use:
|
459 |
+
```
|
460 |
+
when green flag clicked
|
461 |
+
go to x: (240) y: (-100)
|
462 |
+
set [speed v] to (-5)
|
463 |
+
show variable [speed v]
|
464 |
+
forever
|
465 |
+
change x by ([speed v])
|
466 |
+
if <((x position)) < (-240)> then
|
467 |
+
go to x: (240) y: (-100)
|
468 |
+
end
|
469 |
+
end
|
470 |
+
end
|
471 |
+
```
|
472 |
+
**Correct** pattern for continuos moving objects use:
|
473 |
+
```
|
474 |
+
when green flag clicked
|
475 |
+
go to x: (240) y: (-100)
|
476 |
+
set [speed v] to (-5)
|
477 |
+
show variable [speed v]
|
478 |
+
forever
|
479 |
+
change x by ([speed v])
|
480 |
+
if <((x position)) < (-240)> then
|
481 |
+
go to x: (240) y: (-100)
|
482 |
+
end
|
483 |
+
end
|
484 |
+
end
|
485 |
+
```
|
486 |
+
6. **Donot** add any explaination of logic or comments to justify or explain just put the logic content in the json.
|
487 |
+
7. **Output**:
|
488 |
+
Return **only** a JSON object, using double quotes everywhere, where the key for the pseudo-code will be the target name closest to the "Script for:" value. If no code-blocks are found, return `{"refined_logic": "No Code-blocks"}`.
|
489 |
+
|
490 |
+
```json
|
491 |
+
{{
|
492 |
+
"refined_logic":{{
|
493 |
+
"[Target name similar to script for]": {{
|
494 |
+
"plan":[
|
495 |
+
{{"pseudocode":"…your fully‑formatted pseudo‑code here…"}},
|
496 |
+
{{"pseudocode":"…your fully‑formatted pseudo‑code here…"}}
|
497 |
+
]
|
498 |
+
}}
|
499 |
+
}}
|
500 |
+
}}
|
501 |
+
```
|
502 |
+
"""
|
503 |
+
image_input = {
|
504 |
+
"type": "image_url",
|
505 |
+
"image_url": {
|
506 |
+
"url": f"data:image/png;base64,{image}"
|
507 |
+
}
|
508 |
+
}
|
509 |
+
|
510 |
+
content = [
|
511 |
+
{"type": "text", "text": refinement_prompt},
|
512 |
+
image_input
|
513 |
+
]
|
514 |
+
|
515 |
+
try:
|
516 |
+
# Invoke the main agent for logic refinement and relationship identification
|
517 |
+
response = agent.invoke({"messages": [{"role": "user", "content": content}]})
|
518 |
+
llm_output_raw = response["messages"][-1].content.strip()
|
519 |
+
parsed_llm_output = extract_json_from_llm_response(llm_output_raw)
|
520 |
+
result = parsed_llm_output
|
521 |
+
print(f"result:\n\n {result}")
|
522 |
+
|
523 |
+
except json.JSONDecodeError as error_json:
|
524 |
+
# If JSON parsing fails, use the json resolver agent
|
525 |
+
correction_prompt = (
|
526 |
+
"Your task is to correct the provided JSON string to ensure it is **syntactically perfect and adheres strictly to JSON rules**.\n"
|
527 |
+
"It must be a JSON object with `refined_logic` (string) and `block_relationships` (array of objects).\n"
|
528 |
+
f"- **Error Details**: {error_json}\n\n"
|
529 |
+
"**Strict Instructions for your response:**\n"
|
530 |
+
"1. **ONLY** output the corrected JSON. Do not include any other text or explanations.\n"
|
531 |
+
"2. Ensure all keys and string values are enclosed in **double quotes**. Escape internal quotes (`\\`).\n"
|
532 |
+
"3. No trailing commas. Correct nesting.\n\n"
|
533 |
+
"Here is the problematic JSON string to correct:\n"
|
534 |
+
f"```json\n{llm_output_raw}\n```\n"
|
535 |
+
"Corrected JSON:\n"
|
536 |
+
)
|
537 |
+
try:
|
538 |
+
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
539 |
+
corrected_output = extract_json_from_llm_response(correction_response["messages"][-1].content)
|
540 |
+
#block_relationships = corrected_output.get("block_relationships", [])
|
541 |
+
result = corrected_output
|
542 |
+
except Exception as e_corr:
|
543 |
+
logger.error(f"Failed to correct JSON output for even after retry: {e_corr}")
|
544 |
+
|
545 |
+
|
546 |
+
# Update the original action_plan in the state with the refined version
|
547 |
+
state["pseudo_code"] = result
|
548 |
+
print(f"[OVREALL REFINED PSEUDO CODE LOGIC]: {result}")
|
549 |
+
logger.info("Plan refinement and block relation analysis completed for all plans.")
|
550 |
+
return state
|
551 |
+
|
552 |
+
scratch_keywords = [
|
553 |
+
"move", "turn", "wait", "repeat", "if", "else", "broadcast",
|
554 |
+
"glide", "change", "forever", "when", "switch",
|
555 |
+
"next costume", "set", "show", "hide", "play sound",
|
556 |
+
"go to", "x position", "y position", "think", "say",
|
557 |
+
"variable", "stop", "clone",
|
558 |
+
"touching", "sensing", "pen", "clear","Scratch","Code","scratch blocks"
|
559 |
+
]
|
560 |
+
|
561 |
+
# --- FUNCTION: Extract images from saved PDF ---
|
562 |
+
def extract_images_from_pdf(pdf_path, final_json_path_2):
|
563 |
+
''' Extract images from PDF and generate structured sprite JSON '''
|
564 |
+
try:
|
565 |
+
pdf_filename = os.path.splitext(os.path.basename(pdf_path))[0] # e.g., "scratch_crab"
|
566 |
+
pdf_dir_path = os.path.dirname(pdf_path).replace("/", "\\")
|
567 |
+
|
568 |
+
# Create subfolders
|
569 |
+
extracted_image_subdir = os.path.join(
|
570 |
+
DETECTED_IMAGE_DIR, pdf_filename)
|
571 |
+
json_subdir = os.path.join(JSON_DIR, pdf_filename)
|
572 |
+
os.makedirs(extracted_image_subdir, exist_ok=True)
|
573 |
+
os.makedirs(json_subdir, exist_ok=True)
|
574 |
+
|
575 |
+
# Output paths
|
576 |
+
output_json_path = os.path.join(json_subdir, "extracted.json")
|
577 |
+
final_json_path = os.path.join(json_subdir, "extracted_sprites.json")
|
578 |
+
final_json_path_2 = os.path.join(json_subdir, "extracted_sprites_2.json")
|
579 |
+
|
580 |
+
try:
|
581 |
+
elements = partition_pdf(
|
582 |
+
filename=pdf_path,
|
583 |
+
strategy="hi_res",
|
584 |
+
extract_image_block_types=["Image"],
|
585 |
+
extract_image_block_to_payload=True, # Set to True to get base64 in output
|
586 |
+
)
|
587 |
+
except Exception as e:
|
588 |
+
raise RuntimeError(
|
589 |
+
f"❌ Failed to extract images from PDF: {str(e)}")
|
590 |
+
|
591 |
+
try:
|
592 |
+
with open(output_json_path, "w") as f:
|
593 |
+
json.dump([element.to_dict()
|
594 |
+
for element in elements], f, indent=4)
|
595 |
+
except Exception as e:
|
596 |
+
raise RuntimeError(f"❌ Failed to write extracted.json: {str(e)}")
|
597 |
+
|
598 |
+
try:
|
599 |
+
# Display extracted images
|
600 |
+
with open(output_json_path, 'r') as file:
|
601 |
+
file_elements = json.load(file)
|
602 |
+
except Exception as e:
|
603 |
+
raise RuntimeError(f"❌ Failed to read extracted.json: {str(e)}")
|
604 |
+
|
605 |
+
# Prepare manipulated sprite JSON structure
|
606 |
+
manipulated_json = {}
|
607 |
+
|
608 |
+
# SET A SYSTEM PROMPT
|
609 |
+
system_prompt = """
|
610 |
+
You are an expert in visual scene understanding.
|
611 |
+
Your Job is to analyze an image and respond acoording if asked for name give simple name by analyzing it and if ask for descrption generate a short description covering its elements.
|
612 |
+
|
613 |
+
Guidelines:
|
614 |
+
- Focus only the images given in Square Shape.
|
615 |
+
- Don't Consider Blank areas in Image as.
|
616 |
+
- Don't include generic summary or explanation outside the fields.
|
617 |
+
Return only string.
|
618 |
+
"""
|
619 |
+
agent = create_react_agent(
|
620 |
+
model=llm,
|
621 |
+
tools=[],
|
622 |
+
prompt=system_prompt
|
623 |
+
)
|
624 |
+
|
625 |
+
# If JSON already exists, load it and find the next available Sprite number
|
626 |
+
if os.path.exists(final_json_path):
|
627 |
+
with open(final_json_path, "r") as existing_file:
|
628 |
+
manipulated = json.load(existing_file)
|
629 |
+
# Determine the next available index (e.g., Sprite 4 if 1–3 already exist)
|
630 |
+
existing_keys = [int(k.replace("Sprite ", ""))
|
631 |
+
for k in manipulated.keys()]
|
632 |
+
start_count = max(existing_keys, default=0) + 1
|
633 |
+
else:
|
634 |
+
start_count = 1
|
635 |
+
|
636 |
+
sprite_count = start_count
|
637 |
+
for i, element in enumerate(file_elements):
|
638 |
+
if "image_base64" in element["metadata"]:
|
639 |
+
try:
|
640 |
+
image_data = base64.b64decode(
|
641 |
+
element["metadata"]["image_base64"])
|
642 |
+
image = Image.open(io.BytesIO(image_data)).convert("RGB")
|
643 |
+
|
644 |
+
image = upscale_image(image, scale=2)
|
645 |
+
# image.show(title=f"Extracted Image {i+1}")
|
646 |
+
image_path = os.path.join(extracted_image_subdir, f"Sprite_{i+1}.png")
|
647 |
+
image.save(image_path) # don't need to store image in local folder, process it from variable
|
648 |
+
|
649 |
+
with open(image_path, "rb") as image_file:
|
650 |
+
image_bytes = image_file.read()
|
651 |
+
img_base64 = base64.b64encode(image_bytes).decode("utf-8")
|
652 |
+
|
653 |
+
prompt_combined = """
|
654 |
+
Analyze this image and return JSON with keys:# modify prompt for "name", if it detects "code-blocks only then give name as 'scratch-block'"
|
655 |
+
{
|
656 |
+
"name": "<short name or 'scratch blocks'>" ,
|
657 |
+
"description": "<short description>"
|
658 |
+
}
|
659 |
+
Guidelines:
|
660 |
+
- If image contains logical/code blocks from Scratch (e.g., move, turn, repeat, when clicked, etc.), use 'scratch-block' as the name.
|
661 |
+
- If image is a character, object, or backdrop, give an appropriate descriptive name instead.
|
662 |
+
- Avoid generic names like 'image1' or 'picture'.
|
663 |
+
- Keep the response strictly in JSON format.
|
664 |
+
"""
|
665 |
+
|
666 |
+
content = [
|
667 |
+
{"type": "text", "text": prompt_combined},
|
668 |
+
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{img_base64}"}}
|
669 |
+
]
|
670 |
+
|
671 |
+
response = agent.invoke({"messages": [{"role": "user", "content": content}]})
|
672 |
+
result_json = json.loads(response["messages"][-1].content)
|
673 |
+
try:
|
674 |
+
name = result_json.get("name", "").strip()
|
675 |
+
description = result_json.get("description", "").strip()
|
676 |
+
except Exception as e:
|
677 |
+
logger.error(f"⚠️ Failed to extract name/description: {str(e)}")
|
678 |
+
name = "unknown"
|
679 |
+
description = "unknown"
|
680 |
+
|
681 |
+
manipulated_json[f"Sprite {sprite_count}"] = {
|
682 |
+
"name": name,
|
683 |
+
"base64": element["metadata"]["image_base64"],
|
684 |
+
"file-path": pdf_dir_path,
|
685 |
+
"description": description
|
686 |
+
}
|
687 |
+
sprite_count += 1
|
688 |
+
except Exception as e:
|
689 |
+
print(f"⚠️ Error processing Sprite {i+1}: {str(e)}")
|
690 |
+
|
691 |
+
# Save manipulated JSON
|
692 |
+
with open(final_json_path, "w") as sprite_file:
|
693 |
+
json.dump(manipulated_json, sprite_file, indent=4)
|
694 |
+
|
695 |
+
def is_code_block(name: str) -> bool:
|
696 |
+
for kw in scratch_keywords:
|
697 |
+
if kw.lower() in name.lower():
|
698 |
+
return True
|
699 |
+
return False
|
700 |
+
|
701 |
+
# Filter out code block images
|
702 |
+
filtered_sprites = {}
|
703 |
+
for key, value in manipulated_json.items():
|
704 |
+
sprite_name = value.get("name", "")
|
705 |
+
if not is_code_block(sprite_name):
|
706 |
+
filtered_sprites[key] = value
|
707 |
+
else:
|
708 |
+
logger.info(f"🛑 Excluded code block-like image: {key}")
|
709 |
+
|
710 |
+
# if not any(is_code_block(value.get("name","")) for value in manipulated_json.values()):
|
711 |
+
# return jsonify({"message":"Invalid Content"}), 400
|
712 |
+
# if not filtered_sprites:
|
713 |
+
# return "Invalid Content", {}
|
714 |
+
|
715 |
+
# Overwrite with filtered content
|
716 |
+
with open(final_json_path_2, "w") as sprite_file:
|
717 |
+
json.dump(filtered_sprites, sprite_file, indent=4)
|
718 |
+
# print(f"✅ Manipulated sprite JSON saved: {final_json_path}")
|
719 |
+
|
720 |
+
return final_json_path, manipulated_json
|
721 |
+
except Exception as e:
|
722 |
+
raise RuntimeError(f"❌ Error in extract_images_from_pdf: {str(e)}")
|
723 |
+
|
724 |
+
def similarity_matching(input_json_path: str, project_folder:str) -> str:
|
725 |
+
|
726 |
+
logger.info("🔍 Running similarity matching...")
|
727 |
+
|
728 |
+
# ============================== #
|
729 |
+
# DEFINE PATHS #
|
730 |
+
# ============================== #
|
731 |
+
|
732 |
+
image_dirs = [backdrop_images_path, sprite_images_path]
|
733 |
+
|
734 |
+
project_json_path = os.path.join(project_folder, "project.json")
|
735 |
+
|
736 |
+
# ============================== #
|
737 |
+
# READ SPRITE METADATA #
|
738 |
+
# ============================== #
|
739 |
+
with open(input_json_path, 'r') as f:
|
740 |
+
sprites_data = json.load(f)
|
741 |
+
|
742 |
+
sprite_ids, texts, sprite_base64 = [], [], []
|
743 |
+
for sid, sprite in sprites_data.items():
|
744 |
+
sprite_ids.append(sid)
|
745 |
+
texts.append(
|
746 |
+
"This is " + sprite.get("description", sprite.get("name", "")))
|
747 |
+
sprite_base64.append(sprite["base64"])
|
748 |
+
|
749 |
+
# ========================================= #
|
750 |
+
# Walk folders to collect all image paths #
|
751 |
+
# ========================================= #
|
752 |
+
folder_image_paths = [
|
753 |
+
#backdrops
|
754 |
+
BACKDROP_DIR / "badroom3.sb3" / "8cc0b88d53345b3e337e8f028a32a4e7.png",
|
755 |
+
BACKDROP_DIR / "baseball2.sb3" / "7be1f5b3e682813dac1f297e52ff7dca.png",
|
756 |
+
BACKDROP_DIR / "beach_malibu.sb3" / "050615fe992a00d6af0e664e497ebf53.png",
|
757 |
+
BACKDROP_DIR / "castle2.sb3" / "951765ee7f7370f120c9df20b577c22f.png",
|
758 |
+
BACKDROP_DIR / "hall.sb3" / "ea86ca30b346f27ca5faf1254f6a31e3.png",
|
759 |
+
BACKDROP_DIR / "jungle.sb3" / "f4f908da19e2753f3ed679d7b37650ca.png",
|
760 |
+
#sprite
|
761 |
+
SPRITE_DIR / "Batter.sprite3" / "baseball_sprite_motion_1.png",
|
762 |
+
SPRITE_DIR / "Bear.sprite3" / "bear_motion_2.png",
|
763 |
+
SPRITE_DIR / "Beetle.sprite3" / "46d0dfd4ae7e9bfe3a6a2e35a4905eae.png",
|
764 |
+
SPRITE_DIR / "cat" / "cat_motion_1.png",
|
765 |
+
SPRITE_DIR / "Centaur.sprite3" / "2373556e776cad3ba4d6ee04fc34550b.png",
|
766 |
+
SPRITE_DIR / "Crab.sprite3" / "bear_element.png",
|
767 |
+
SPRITE_DIR / "Soccer Ball.sprite3" / "cat_football.png",
|
768 |
+
]
|
769 |
+
# ============================== #
|
770 |
+
# DECODE SPRITE IMAGES #
|
771 |
+
# ============================== #
|
772 |
+
# temp_dir = tempfile.mkdtemp()
|
773 |
+
# sprite_image_paths = []
|
774 |
+
# for idx, b64 in enumerate(sprite_base64):
|
775 |
+
# image_data = base64.b64decode(b64.split(",")[-1])
|
776 |
+
# img = Image.open(BytesIO(image_data)).convert("RGB")
|
777 |
+
# temp_path = os.path.join(temp_dir, f"sprite_{idx}.png")
|
778 |
+
# img.save(temp_path)
|
779 |
+
# sprite_image_paths.append(temp_path)
|
780 |
+
# print(f"\n\n\nSPRITE IMAGE PATHS: \n{sprite_image_paths}")
|
781 |
+
|
782 |
+
# ============================== #
|
783 |
+
# EMBED SPRITE IMAGES #
|
784 |
+
# ============================== #
|
785 |
+
sprite_features = clip_embd.embed_image(sprite_base64)
|
786 |
+
|
787 |
+
# ============================== #
|
788 |
+
# COMPUTE SIMILARITIES #
|
789 |
+
# ============================== #
|
790 |
+
with open(f"{BLOCKS_DIR}/embeddings.json", "r") as f:
|
791 |
+
embedding_json = json.load(f)
|
792 |
+
# print(f"\n\n EMBEDDING JSON: {embedding_json}")
|
793 |
+
|
794 |
+
img_matrix = np.array([img["embeddings"] for img in embedding_json])
|
795 |
+
sprite_matrix = np.array(sprite_features)
|
796 |
+
|
797 |
+
similarity = np.matmul(sprite_matrix, img_matrix.T)
|
798 |
+
|
799 |
+
most_similar_indices = np.argmax(similarity, axis=1)
|
800 |
+
print(f"")
|
801 |
+
# ============= Match and copy ===============
|
802 |
+
project_data = []
|
803 |
+
copied_folders = set()
|
804 |
+
|
805 |
+
# =============================================================== #
|
806 |
+
# Loop through most similar images from Sprites folder #
|
807 |
+
# → Copy sprite assets (excluding matched image + sprite.json) #
|
808 |
+
# → Load sprite.json and append its data to project_data #
|
809 |
+
# =============================================================== #
|
810 |
+
for sprite_idx, matched_idx in enumerate(most_similar_indices):
|
811 |
+
matched_image_path = folder_image_paths[matched_idx]
|
812 |
+
matched_image_path = os.path.normpath(matched_image_path)
|
813 |
+
|
814 |
+
matched_folder = os.path.dirname(matched_image_path)
|
815 |
+
#folder_name = os.path.basename(matched_folder)
|
816 |
+
|
817 |
+
if matched_folder in copied_folders:
|
818 |
+
continue
|
819 |
+
copied_folders.add(matched_folder)
|
820 |
+
logger.info(f"Matched image path: {matched_image_path}")
|
821 |
+
|
822 |
+
sprite_json_path = os.path.join(matched_folder, 'sprite.json')
|
823 |
+
if not os.path.exists(sprite_json_path):
|
824 |
+
logger.warning(f"sprite.json not found in: {matched_folder}")
|
825 |
+
continue
|
826 |
+
|
827 |
+
with open(sprite_json_path, 'r') as f:
|
828 |
+
sprite_data = json.load(f)
|
829 |
+
# print(f"SPRITE DATA: \n{sprite_data}")
|
830 |
+
# Copy only non-matched files
|
831 |
+
for fname in os.listdir(matched_folder):
|
832 |
+
fpath = os.path.join(matched_folder, fname)
|
833 |
+
if os.path.isfile(fpath) and fname not in {os.path.basename(matched_image_path), 'sprite.json'}:
|
834 |
+
shutil.copy2(fpath, os.path.join(project_folder, fname))
|
835 |
+
# logger.info(f"Copied Sprite asset: {fname}")
|
836 |
+
project_data.append(sprite_data)
|
837 |
+
|
838 |
+
# ================================================================== #
|
839 |
+
# Loop through most similar images from Backdrops folder #
|
840 |
+
# → Copy Backdrop assets (excluding matched image + project.json) #
|
841 |
+
# → Load project.json and append its data to project_data #
|
842 |
+
# ================================================================== #
|
843 |
+
backdrop_data = [] # for backdrop-related entries
|
844 |
+
|
845 |
+
for backdrop_idx, matched_idx in enumerate(most_similar_indices):
|
846 |
+
matched_image_path = os.path.normpath(folder_image_paths[matched_idx])
|
847 |
+
|
848 |
+
# Check if the match is from the Backdrops folder
|
849 |
+
if matched_image_path.startswith(os.path.normpath(backdrop_images_path)):
|
850 |
+
matched_folder = os.path.dirname(matched_image_path)
|
851 |
+
folder_name = os.path.basename(matched_folder)
|
852 |
+
|
853 |
+
logger.info(f"Backdrop matched image: {matched_image_path}")
|
854 |
+
|
855 |
+
# Copy only non-matched files
|
856 |
+
for fname in os.listdir(matched_folder):
|
857 |
+
fpath = os.path.join(matched_folder, fname)
|
858 |
+
if os.path.isfile(fpath) and fname not in {os.path.basename(matched_image_path), 'project.json'}:
|
859 |
+
shutil.copy2(fpath, os.path.join(project_folder, fname))
|
860 |
+
# logger.info(f"Copied Backdrop asset: {fname}")
|
861 |
+
|
862 |
+
# Append backdrop's project.json
|
863 |
+
backdrop_json_path = os.path.join(matched_folder, 'project.json')
|
864 |
+
if os.path.exists(backdrop_json_path):
|
865 |
+
with open(backdrop_json_path, 'r') as f:
|
866 |
+
backdrop_json_data = json.load(f)
|
867 |
+
# print(f"SPRITE DATA: \n{backdrop_json_data}")
|
868 |
+
if "targets" in backdrop_json_data:
|
869 |
+
for target in backdrop_json_data["targets"]:
|
870 |
+
if target.get("isStage") == True:
|
871 |
+
backdrop_data.append(target)
|
872 |
+
else:
|
873 |
+
logger.warning(f"project.json not found in: {matched_folder}")
|
874 |
+
|
875 |
+
# Merge JSON structure
|
876 |
+
final_project = {
|
877 |
+
"targets": [],
|
878 |
+
"monitors": [],
|
879 |
+
"extensions": [],
|
880 |
+
"meta": {
|
881 |
+
"semver": "3.0.0",
|
882 |
+
"vm": "11.3.0",
|
883 |
+
"agent": "OpenAI ScratchVision Agent"
|
884 |
+
}
|
885 |
+
}
|
886 |
+
|
887 |
+
for sprite in project_data:
|
888 |
+
if not sprite.get("isStage", False):
|
889 |
+
final_project["targets"].append(sprite)
|
890 |
+
|
891 |
+
if backdrop_data:
|
892 |
+
all_costumes, sounds = [], []
|
893 |
+
for idx, bd in enumerate(backdrop_data):
|
894 |
+
all_costumes.extend(bd.get("costumes", []))
|
895 |
+
if idx == 0 and "sounds" in bd:
|
896 |
+
sounds = bd["sounds"]
|
897 |
+
final_project["targets"].append({
|
898 |
+
"isStage": True,
|
899 |
+
"name": "Stage",
|
900 |
+
"variables": {},
|
901 |
+
"lists": {},
|
902 |
+
"broadcasts": {},
|
903 |
+
"blocks": {},
|
904 |
+
"comments": {},
|
905 |
+
"currentCostume": 1 if len(all_costumes) > 1 else 0,
|
906 |
+
"costumes": all_costumes,
|
907 |
+
"sounds": sounds,
|
908 |
+
"volume": 100,
|
909 |
+
"layerOrder": 0,
|
910 |
+
"tempo": 60,
|
911 |
+
"videoTransparency": 50,
|
912 |
+
"videoState": "on",
|
913 |
+
"textToSpeechLanguage": None
|
914 |
+
})
|
915 |
+
|
916 |
+
with open(project_json_path, 'w') as f:
|
917 |
+
json.dump(final_project, f, indent=2)
|
918 |
+
|
919 |
+
# logger.info(f"🎉 Final project saved: {project_json_path}")
|
920 |
+
return project_json_path
|
921 |
+
|
922 |
+
def delay_for_tpm_node(state: GameState):
|
923 |
+
logger.info("--- Running DelayForTPMNode ---")
|
924 |
+
time.sleep(10) # Adjust the delay as needed
|
925 |
+
logger.info("Delay completed.")
|
926 |
+
return state
|
927 |
+
|
928 |
+
# Build the LangGraph workflow
|
929 |
+
workflow = StateGraph(GameState)
|
930 |
+
|
931 |
+
# Add all nodes to the workflow
|
932 |
+
workflow.add_node("time_delay_1", delay_for_tpm_node)
|
933 |
+
workflow.add_node("opcode_counter", pseudo_generator_node)
|
934 |
+
workflow.set_entry_point("time_delay_1")
|
935 |
+
workflow.add_edge("time_delay_1","opcode_counter")
|
936 |
+
workflow.add_edge("opcode_counter", END)
|
937 |
+
app_graph = workflow.compile()
|
938 |
+
|
939 |
+
# ============== Helper function to Upscale an Image ============== #
|
940 |
+
def upscale_image(image: Image.Image, scale: int = 2) -> Image.Image:
|
941 |
+
"""
|
942 |
+
Upscales a PIL image by a given scale factor.
|
943 |
+
"""
|
944 |
+
try:
|
945 |
+
width, height = image.size
|
946 |
+
new_size = (width * scale, height * scale)
|
947 |
+
upscaled_image = image.resize(new_size, Image.LANCZOS)
|
948 |
+
logger.info(f"✅ Upscaled image to {new_size}")
|
949 |
+
return upscaled_image
|
950 |
+
except Exception as e:
|
951 |
+
logger.error(f"❌ Error during image upscaling: {str(e)}")
|
952 |
+
return image
|
953 |
+
|
954 |
+
def create_sb3_archive(project_folder, project_id):
|
955 |
+
"""
|
956 |
+
Zips the project folder and renames it to an .sb3 file.
|
957 |
+
|
958 |
+
Args:
|
959 |
+
project_folder (str): The path to the directory containing the project.json and assets.
|
960 |
+
project_id (str): The unique ID for the project, used for naming the .sb3 file.
|
961 |
+
|
962 |
+
Returns:
|
963 |
+
str: The path to the created .sb3 file, or None if an error occurred.
|
964 |
+
"""
|
965 |
+
output_filename = os.path.join("generated_projects", project_id)
|
966 |
+
zip_path = None
|
967 |
+
sb3_path = None
|
968 |
+
try:
|
969 |
+
zip_path = shutil.make_archive(output_filename, 'zip', root_dir=project_folder)
|
970 |
+
logger.info(f"Project folder zipped to: {zip_path}")
|
971 |
+
|
972 |
+
# 2. Rename the .zip file to .sb3
|
973 |
+
sb3_path = f"{output_filename}.sb3"
|
974 |
+
os.rename(zip_path, sb3_path)
|
975 |
+
logger.info(f"Renamed {zip_path} to {sb3_path}")
|
976 |
+
|
977 |
+
return sb3_path
|
978 |
+
except Exception as e:
|
979 |
+
logger.error(f"Error creating SB3 archive for {project_id}: {e}")
|
980 |
+
# Clean up any partial files if an error occurs
|
981 |
+
if zip_path and os.path.exists(zip_path):
|
982 |
+
os.remove(zip_path)
|
983 |
+
if sb3_path and os.path.exists(sb3_path):
|
984 |
+
os.remove(sb3_path)
|
985 |
+
return None
|
986 |
+
|
987 |
+
|
988 |
+
@app.route('/')
|
989 |
+
def index():
|
990 |
+
return render_template('app_index.html')
|
991 |
+
|
992 |
+
@app.route("/download_sb3/<project_id>", methods=["GET"])
|
993 |
+
def download_sb3(project_id):
|
994 |
+
"""
|
995 |
+
Allows users to download the generated .sb3 Scratch project file.
|
996 |
+
"""
|
997 |
+
sb3_filename = f"{project_id}.sb3"
|
998 |
+
sb3_filepath = os.path.join("generated_projects", sb3_filename)
|
999 |
+
|
1000 |
+
try:
|
1001 |
+
if os.path.exists(sb3_filepath):
|
1002 |
+
logger.info(f"Serving SB3 file for project ID: {project_id}")
|
1003 |
+
# send_from_directory serves the file and handles content-disposition for download
|
1004 |
+
return send_from_directory(
|
1005 |
+
directory="generated_projects",
|
1006 |
+
path=sb3_filename,
|
1007 |
+
as_attachment=True, # This makes the browser download the file
|
1008 |
+
download_name=sb3_filename # This sets the filename for the download
|
1009 |
+
)
|
1010 |
+
else:
|
1011 |
+
logger.warning(f"SB3 file not found for ID: {project_id}")
|
1012 |
+
return jsonify({"error": "Scratch project file not found"}), 404
|
1013 |
+
except Exception as e:
|
1014 |
+
logger.error(f"Error serving SB3 file for ID {project_id}: {e}")
|
1015 |
+
return jsonify({"error": "Failed to retrieve Scratch project file"}), 500
|
1016 |
+
|
1017 |
+
# API endpoint
|
1018 |
+
@app.route('/process_pdf', methods=['POST'])
|
1019 |
+
def process_pdf():
|
1020 |
+
try:
|
1021 |
+
logger.info("Received request to process PDF.")
|
1022 |
+
if 'pdf_file' not in request.files:
|
1023 |
+
logger.warning("No PDF file found in request.")
|
1024 |
+
return jsonify({"error": "Missing PDF file in form-data with key 'pdf_file'"}), 400
|
1025 |
+
|
1026 |
+
pdf_file = request.files['pdf_file']
|
1027 |
+
if pdf_file.filename == '':
|
1028 |
+
return jsonify({"error": "Empty filename"}), 400
|
1029 |
+
|
1030 |
+
# ================================================= #
|
1031 |
+
# Generate Random UUID for project folder name #
|
1032 |
+
# ================================================= #
|
1033 |
+
project_id = str(uuid.uuid4()).replace('-', '')
|
1034 |
+
project_folder = os.path.join("outputs", f"{project_id}")
|
1035 |
+
|
1036 |
+
# =========================================================================== #
|
1037 |
+
# Create empty json in project_{random_id} folder #
|
1038 |
+
# =========================================================================== #
|
1039 |
+
os.makedirs(project_folder, exist_ok=True)
|
1040 |
+
|
1041 |
+
# Save the uploaded PDF temporarily
|
1042 |
+
filename = secure_filename(pdf_file.filename)
|
1043 |
+
temp_dir = tempfile.mkdtemp()
|
1044 |
+
saved_pdf_path = os.path.join(temp_dir, filename)
|
1045 |
+
pdf_file.save(saved_pdf_path)
|
1046 |
+
|
1047 |
+
# logger.info(f"Created project folder: {project_folder}")
|
1048 |
+
logger.info(f"Saved uploaded PDF to: {saved_pdf_path}")
|
1049 |
+
|
1050 |
+
# Extract & process
|
1051 |
+
json_path = None
|
1052 |
+
output_path, result = extract_images_from_pdf(saved_pdf_path, json_path)
|
1053 |
+
|
1054 |
+
# Check extracted_sprites.json for "scratch block" in any 'name'
|
1055 |
+
extracted_dir = os.path.join(JSON_DIR, os.path.splitext(filename)[0])
|
1056 |
+
extracted_sprites_json = os.path.join(extracted_dir, "extracted_sprites.json")
|
1057 |
+
|
1058 |
+
if not os.path.exists(extracted_sprites_json):
|
1059 |
+
return jsonify({"error": "No extracted_sprites.json found"}), 500
|
1060 |
+
|
1061 |
+
with open(extracted_sprites_json, 'r') as f:
|
1062 |
+
sprite_data = json.load(f)
|
1063 |
+
|
1064 |
+
project_output = similarity_matching(output_path, project_folder)
|
1065 |
+
logger.info("Received request to process PDF.")
|
1066 |
+
|
1067 |
+
with open(project_output, 'r') as f:
|
1068 |
+
project_skeleton = json.load(f)
|
1069 |
+
|
1070 |
+
|
1071 |
+
images = convert_from_path(saved_pdf_path, dpi=300, poppler_path=poppler_path)
|
1072 |
+
img_base64 = base64.b64encode(images).decode("utf-8")
|
1073 |
+
#image_paths = await convert_pdf_to_images_async(saved_pdf_path)
|
1074 |
+
|
1075 |
+
#updating logic here [Dev Patel]
|
1076 |
+
initial_state_dict = {
|
1077 |
+
"project_json": project_skeleton,
|
1078 |
+
"description": "The pseudo code for the script",
|
1079 |
+
"project_id": project_id,
|
1080 |
+
"project_image": img_base64,
|
1081 |
+
"action_plan": {},
|
1082 |
+
"pseudo_code": {},
|
1083 |
+
"temporary_node": {},
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
final_state_dict = app_graph.invoke(initial_state_dict) # Pass dictionary
|
1087 |
+
|
1088 |
+
final_project_json = final_state_dict['project_json'] # Access as dict
|
1089 |
+
|
1090 |
+
# Save the *final* filled project JSON, overwriting the skeleton
|
1091 |
+
with open(project_output, "w") as f:
|
1092 |
+
json.dump(final_project_json, f, indent=2)
|
1093 |
+
logger.info(f"Final project JSON saved to {project_output}")
|
1094 |
+
|
1095 |
+
# --- Call the new function to create the .sb3 file ---
|
1096 |
+
sb3_file_path = create_sb3_archive(project_folder, project_id)
|
1097 |
+
if sb3_file_path:
|
1098 |
+
logger.info(f"Successfully created SB3 file: {sb3_file_path}")
|
1099 |
+
# Instead of returning the local path, return a URL to the download endpoint
|
1100 |
+
download_url = f"/download_sb3/{project_id}"
|
1101 |
+
return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
|
1102 |
+
else:
|
1103 |
+
return jsonify(error="Failed to create SB3 archive"), 500
|
1104 |
+
|
1105 |
+
except Exception as e:
|
1106 |
+
logger.error(f"Error during processing the pdf workflow for project ID {project_id}: {e}", exc_info=True)
|
1107 |
+
return jsonify({"error": f"❌ Failed to process PDF: {str(e)}"}), 500
|
1108 |
+
|
1109 |
+
if __name__ == '__main__':
|
1110 |
+
os.makedirs("outputs", exist_ok=True)
|
1111 |
+
app.run(host='0.0.0.0', port=7860, debug=True)
|
blocks/Backdrops/badroom3.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/Backdrops/badroom3.sb3/8cc0b88d53345b3e337e8f028a32a4e7.png
ADDED
![]() |
blocks/Backdrops/badroom3.sb3/cd21514d0531fdffb22204e0ec5ed84a.svg
ADDED
|
blocks/Backdrops/badroom3.sb3/project.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["my variable",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":1,"costumes":[{"name":"backdrop1","dataFormat":"svg","assetId":"cd21514d0531fdffb22204e0ec5ed84a","md5ext":"cd21514d0531fdffb22204e0ec5ed84a.svg","rotationCenterX":240,"rotationCenterY":180},{"name":"Bedroom 3","bitmapResolution":2,"dataFormat":"png","assetId":"8cc0b88d53345b3e337e8f028a32a4e7","rotationCenterX":480,"rotationCenterY":360}],"sounds":[{"name":"pop","assetId":"83a9787d4cb6f3b7632b4ddfebf74367","dataFormat":"wav","format":"","rate":48000,"sampleCount":1123,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"11.3.0","agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"}}
|
blocks/Backdrops/baseball2.sb3/7be1f5b3e682813dac1f297e52ff7dca.png
ADDED
![]() |
blocks/Backdrops/baseball2.sb3/7be1f5b3e682813dac1f297e52ff7dca.svg
ADDED
|
blocks/Backdrops/baseball2.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/Backdrops/baseball2.sb3/cd21514d0531fdffb22204e0ec5ed84a.svg
ADDED
|
blocks/Backdrops/baseball2.sb3/project.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"targets": [
|
3 |
+
{
|
4 |
+
"isStage": true,
|
5 |
+
"name": "Stage",
|
6 |
+
"variables": { "`jEk@4|i[#Fk?(8x)AV.-my variable": ["my variable", 0] },
|
7 |
+
"lists": {},
|
8 |
+
"broadcasts": {},
|
9 |
+
"blocks": {},
|
10 |
+
"comments": {},
|
11 |
+
"currentCostume": 1,
|
12 |
+
"costumes": [
|
13 |
+
{
|
14 |
+
"name": "backdrop1",
|
15 |
+
"dataFormat": "svg",
|
16 |
+
"assetId": "cd21514d0531fdffb22204e0ec5ed84a",
|
17 |
+
"md5ext": "cd21514d0531fdffb22204e0ec5ed84a.svg",
|
18 |
+
"rotationCenterX": 240,
|
19 |
+
"rotationCenterY": 180
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"name": "Baseball 2",
|
23 |
+
"bitmapResolution": 1,
|
24 |
+
"dataFormat": "svg",
|
25 |
+
"assetId": "7be1f5b3e682813dac1f297e52ff7dca",
|
26 |
+
"rotationCenterX": 240,
|
27 |
+
"rotationCenterY": 180
|
28 |
+
}
|
29 |
+
],
|
30 |
+
"sounds": [
|
31 |
+
{
|
32 |
+
"name": "pop",
|
33 |
+
"assetId": "83a9787d4cb6f3b7632b4ddfebf74367",
|
34 |
+
"dataFormat": "wav",
|
35 |
+
"format": "",
|
36 |
+
"rate": 48000,
|
37 |
+
"sampleCount": 1123,
|
38 |
+
"md5ext": "83a9787d4cb6f3b7632b4ddfebf74367.wav"
|
39 |
+
}
|
40 |
+
],
|
41 |
+
"volume": 100,
|
42 |
+
"layerOrder": 0,
|
43 |
+
"tempo": 60,
|
44 |
+
"videoTransparency": 50,
|
45 |
+
"videoState": "on",
|
46 |
+
"textToSpeechLanguage": null
|
47 |
+
}
|
48 |
+
],
|
49 |
+
"monitors": [],
|
50 |
+
"extensions": [],
|
51 |
+
"meta": {
|
52 |
+
"semver": "3.0.0",
|
53 |
+
"vm": "11.3.0",
|
54 |
+
"agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"
|
55 |
+
}
|
56 |
+
}
|
blocks/Backdrops/beach_malibu.sb3/050615fe992a00d6af0e664e497ebf53.png
ADDED
![]() |
Git LFS Details
|
blocks/Backdrops/beach_malibu.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/Backdrops/beach_malibu.sb3/project.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["my variable",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"name":"Beach Malibu","bitmapResolution":2,"dataFormat":"png","assetId":"050615fe992a00d6af0e664e497ebf53","rotationCenterX":480,"rotationCenterY":360}],"sounds":[{"name":"pop","assetId":"83a9787d4cb6f3b7632b4ddfebf74367","dataFormat":"wav","format":"","rate":48000,"sampleCount":1123,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"11.3.0","agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"}}
|
blocks/Backdrops/castle2.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/Backdrops/castle2.sb3/951765ee7f7370f120c9df20b577c22f.png
ADDED
![]() |
Git LFS Details
|
blocks/Backdrops/castle2.sb3/project.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["my variable",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"name":"Castle 2","bitmapResolution":2,"dataFormat":"png","assetId":"951765ee7f7370f120c9df20b577c22f","rotationCenterX":480,"rotationCenterY":360}],"sounds":[{"name":"pop","assetId":"83a9787d4cb6f3b7632b4ddfebf74367","dataFormat":"wav","format":"","rate":48000,"sampleCount":1123,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"11.3.0","agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"}}
|
blocks/Backdrops/hall.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/Backdrops/hall.sb3/ea86ca30b346f27ca5faf1254f6a31e3.png
ADDED
![]() |
Git LFS Details
|
blocks/Backdrops/hall.sb3/project.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["my variable",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"name":"Hall","bitmapResolution":2,"dataFormat":"png","assetId":"ea86ca30b346f27ca5faf1254f6a31e3","rotationCenterX":480,"rotationCenterY":360}],"sounds":[{"name":"pop","assetId":"83a9787d4cb6f3b7632b4ddfebf74367","dataFormat":"wav","format":"","rate":48000,"sampleCount":1123,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"11.3.0","agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"}}
|
blocks/Backdrops/jungle.sb3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/Backdrops/jungle.sb3/f4f908da19e2753f3ed679d7b37650ca.png
ADDED
![]() |
Git LFS Details
|
blocks/Backdrops/jungle.sb3/project.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["my variable",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"name":"Jungle","bitmapResolution":2,"dataFormat":"png","assetId":"f4f908da19e2753f3ed679d7b37650ca","rotationCenterX":480,"rotationCenterY":360}],"sounds":[{"name":"pop","assetId":"83a9787d4cb6f3b7632b4ddfebf74367","dataFormat":"wav","format":"","rate":48000,"sampleCount":1123,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null}],"monitors":[],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 |
+
]
|
14 |
+
},
|
15 |
+
"fields": {},
|
16 |
+
"shadow": false,
|
17 |
+
"topLevel": true,
|
18 |
+
"x": 464,
|
19 |
+
"y": -416
|
20 |
+
},
|
21 |
+
"motion_turnright": {
|
22 |
+
"opcode": "motion_turnright",
|
23 |
+
"next": null,
|
24 |
+
"parent": null,
|
25 |
+
"inputs": {
|
26 |
+
"DEGREES": [
|
27 |
+
1,
|
28 |
+
[
|
29 |
+
4,
|
30 |
+
"15"
|
31 |
+
]
|
32 |
+
]
|
33 |
+
},
|
34 |
+
"fields": {},
|
35 |
+
"shadow": false,
|
36 |
+
"topLevel": true,
|
37 |
+
"x": 467,
|
38 |
+
"y": -316
|
39 |
+
},
|
40 |
+
"motion_turnleft": {
|
41 |
+
"opcode": "motion_turnleft",
|
42 |
+
"next": null,
|
43 |
+
"parent": null,
|
44 |
+
"inputs": {
|
45 |
+
"DEGREES": [
|
46 |
+
1,
|
47 |
+
[
|
48 |
+
4,
|
49 |
+
"15"
|
50 |
+
]
|
51 |
+
]
|
52 |
+
},
|
53 |
+
"fields": {},
|
54 |
+
"shadow": false,
|
55 |
+
"topLevel": true,
|
56 |
+
"x": 464,
|
57 |
+
"y": -210
|
58 |
+
},
|
59 |
+
"motion_goto": {
|
60 |
+
"opcode": "motion_goto",
|
61 |
+
"next": null,
|
62 |
+
"parent": null,
|
63 |
+
"inputs": {
|
64 |
+
"TO": [
|
65 |
+
1,
|
66 |
+
"@iM=Z?~GCbpC}gT7KAKY"
|
67 |
+
]
|
68 |
+
},
|
69 |
+
"fields": {},
|
70 |
+
"shadow": false,
|
71 |
+
"topLevel": true,
|
72 |
+
"x": 465,
|
73 |
+
"y": -95
|
74 |
+
},
|
75 |
+
"motion_goto_menu": {
|
76 |
+
"opcode": "motion_goto_menu",
|
77 |
+
"next": null,
|
78 |
+
"parent": "d|J?C902/xy6tD5,|dmB",
|
79 |
+
"inputs": {},
|
80 |
+
"fields": {
|
81 |
+
"TO": [
|
82 |
+
"_random_",
|
83 |
+
null
|
84 |
+
]
|
85 |
+
},
|
86 |
+
"shadow": true,
|
87 |
+
"topLevel": false
|
88 |
+
},
|
89 |
+
"motion_gotoxy": {
|
90 |
+
"opcode": "motion_gotoxy",
|
91 |
+
"next": null,
|
92 |
+
"parent": null,
|
93 |
+
"inputs": {
|
94 |
+
"X": [
|
95 |
+
1,
|
96 |
+
[
|
97 |
+
4,
|
98 |
+
"0"
|
99 |
+
]
|
100 |
+
],
|
101 |
+
"Y": [
|
102 |
+
1,
|
103 |
+
[
|
104 |
+
4,
|
105 |
+
"0"
|
106 |
+
]
|
107 |
+
]
|
108 |
+
},
|
109 |
+
"fields": {},
|
110 |
+
"shadow": false,
|
111 |
+
"topLevel": true,
|
112 |
+
"x": 468,
|
113 |
+
"y": 12
|
114 |
+
},
|
115 |
+
"motion_glideto": {
|
116 |
+
"opcode": "motion_glideto",
|
117 |
+
"next": null,
|
118 |
+
"parent": null,
|
119 |
+
"inputs": {
|
120 |
+
"SECS": [
|
121 |
+
1,
|
122 |
+
[
|
123 |
+
4,
|
124 |
+
"1"
|
125 |
+
]
|
126 |
+
],
|
127 |
+
"TO": [
|
128 |
+
1,
|
129 |
+
"{id to destination position}"
|
130 |
+
]
|
131 |
+
},
|
132 |
+
"fields": {},
|
133 |
+
"shadow": false,
|
134 |
+
"topLevel": true,
|
135 |
+
"x": 470,
|
136 |
+
"y": 129
|
137 |
+
},
|
138 |
+
"motion_glideto_menu": {
|
139 |
+
"opcode": "motion_glideto_menu",
|
140 |
+
"next": null,
|
141 |
+
"parent": null,
|
142 |
+
"inputs": {},
|
143 |
+
"fields": {
|
144 |
+
"TO": [
|
145 |
+
"_random_",
|
146 |
+
null
|
147 |
+
]
|
148 |
+
},
|
149 |
+
"shadow": true,
|
150 |
+
"topLevel": false
|
151 |
+
},
|
152 |
+
"motion_glidesecstoxy": {
|
153 |
+
"opcode": "motion_glidesecstoxy",
|
154 |
+
"next": null,
|
155 |
+
"parent": null,
|
156 |
+
"inputs": {
|
157 |
+
"SECS": [
|
158 |
+
1,
|
159 |
+
[
|
160 |
+
4,
|
161 |
+
"1"
|
162 |
+
]
|
163 |
+
],
|
164 |
+
"X": [
|
165 |
+
1,
|
166 |
+
[
|
167 |
+
4,
|
168 |
+
"0"
|
169 |
+
]
|
170 |
+
],
|
171 |
+
"Y": [
|
172 |
+
1,
|
173 |
+
[
|
174 |
+
4,
|
175 |
+
"0"
|
176 |
+
]
|
177 |
+
]
|
178 |
+
},
|
179 |
+
"fields": {},
|
180 |
+
"shadow": false,
|
181 |
+
"topLevel": true,
|
182 |
+
"x": 476,
|
183 |
+
"y": 239
|
184 |
+
},
|
185 |
+
"motion_pointindirection": {
|
186 |
+
"opcode": "motion_pointindirection",
|
187 |
+
"next": null,
|
188 |
+
"parent": null,
|
189 |
+
"inputs": {
|
190 |
+
"DIRECTION": [
|
191 |
+
1,
|
192 |
+
[
|
193 |
+
8,
|
194 |
+
"90"
|
195 |
+
]
|
196 |
+
]
|
197 |
+
},
|
198 |
+
"fields": {},
|
199 |
+
"shadow": false,
|
200 |
+
"topLevel": true,
|
201 |
+
"x": 493,
|
202 |
+
"y": 361
|
203 |
+
},
|
204 |
+
"motion_pointtowards": {
|
205 |
+
"opcode": "motion_pointtowards",
|
206 |
+
"next": null,
|
207 |
+
"parent": null,
|
208 |
+
"inputs": {
|
209 |
+
"TOWARDS": [
|
210 |
+
1,
|
211 |
+
"6xQl1pPk%9E~Znhm*:ng"
|
212 |
+
]
|
213 |
+
},
|
214 |
+
"fields": {},
|
215 |
+
"shadow": false,
|
216 |
+
"topLevel": true,
|
217 |
+
"x": 492,
|
218 |
+
"y": 463
|
219 |
+
},
|
220 |
+
"motion_pointtowards_menu": {
|
221 |
+
"opcode": "motion_pointtowards_menu",
|
222 |
+
"next": null,
|
223 |
+
"parent": "Ucm$YBs*^9GFTGXCbal@",
|
224 |
+
"inputs": {},
|
225 |
+
"fields": {
|
226 |
+
"TOWARDS": [
|
227 |
+
"_mouse_",
|
228 |
+
null
|
229 |
+
]
|
230 |
+
},
|
231 |
+
"shadow": true,
|
232 |
+
"topLevel": false
|
233 |
+
},
|
234 |
+
"motion_changexby": {
|
235 |
+
"opcode": "motion_changexby",
|
236 |
+
"next": null,
|
237 |
+
"parent": null,
|
238 |
+
"inputs": {
|
239 |
+
"DX": [
|
240 |
+
1,
|
241 |
+
[
|
242 |
+
4,
|
243 |
+
"10"
|
244 |
+
]
|
245 |
+
]
|
246 |
+
},
|
247 |
+
"fields": {},
|
248 |
+
"shadow": false,
|
249 |
+
"topLevel": true,
|
250 |
+
"x": 851,
|
251 |
+
"y": -409
|
252 |
+
},
|
253 |
+
"motion_setx": {
|
254 |
+
"opcode": "motion_setx",
|
255 |
+
"next": null,
|
256 |
+
"parent": null,
|
257 |
+
"inputs": {
|
258 |
+
"X": [
|
259 |
+
1,
|
260 |
+
[
|
261 |
+
4,
|
262 |
+
"0"
|
263 |
+
]
|
264 |
+
]
|
265 |
+
},
|
266 |
+
"fields": {},
|
267 |
+
"shadow": false,
|
268 |
+
"topLevel": true,
|
269 |
+
"x": 864,
|
270 |
+
"y": -194
|
271 |
+
},
|
272 |
+
"motion_changeyby": {
|
273 |
+
"opcode": "motion_changeyby",
|
274 |
+
"next": null,
|
275 |
+
"parent": null,
|
276 |
+
"inputs": {
|
277 |
+
"DY": [
|
278 |
+
1,
|
279 |
+
[
|
280 |
+
4,
|
281 |
+
"10"
|
282 |
+
]
|
283 |
+
]
|
284 |
+
},
|
285 |
+
"fields": {},
|
286 |
+
"shadow": false,
|
287 |
+
"topLevel": true,
|
288 |
+
"x": 861,
|
289 |
+
"y": -61
|
290 |
+
},
|
291 |
+
"motion_sety": {
|
292 |
+
"opcode": "motion_sety",
|
293 |
+
"next": null,
|
294 |
+
"parent": null,
|
295 |
+
"inputs": {
|
296 |
+
"Y": [
|
297 |
+
1,
|
298 |
+
[
|
299 |
+
4,
|
300 |
+
"0"
|
301 |
+
]
|
302 |
+
]
|
303 |
+
},
|
304 |
+
"fields": {},
|
305 |
+
"shadow": false,
|
306 |
+
"topLevel": true,
|
307 |
+
"x": 864,
|
308 |
+
"y": 66
|
309 |
+
},
|
310 |
+
"motion_ifonedgebounce": {
|
311 |
+
"opcode": "motion_ifonedgebounce",
|
312 |
+
"next": null,
|
313 |
+
"parent": null,
|
314 |
+
"inputs": {},
|
315 |
+
"fields": {},
|
316 |
+
"shadow": false,
|
317 |
+
"topLevel": true,
|
318 |
+
"x": 1131,
|
319 |
+
"y": -397
|
320 |
+
},
|
321 |
+
"motion_setrotationstyle": {
|
322 |
+
"opcode": "motion_setrotationstyle",
|
323 |
+
"next": null,
|
324 |
+
"parent": null,
|
325 |
+
"inputs": {},
|
326 |
+
"fields": {
|
327 |
+
"STYLE": [
|
328 |
+
"left-right",
|
329 |
+
null
|
330 |
+
]
|
331 |
+
},
|
332 |
+
"shadow": false,
|
333 |
+
"topLevel": true,
|
334 |
+
"x": 1128,
|
335 |
+
"y": -287
|
336 |
+
},
|
337 |
+
"motion_xposition": {
|
338 |
+
"opcode": "motion_xposition",
|
339 |
+
"next": null,
|
340 |
+
"parent": null,
|
341 |
+
"inputs": {},
|
342 |
+
"fields": {},
|
343 |
+
"shadow": false,
|
344 |
+
"topLevel": true,
|
345 |
+
"x": 1193,
|
346 |
+
"y": -136
|
347 |
+
},
|
348 |
+
"motion_yposition": {
|
349 |
+
"opcode": "motion_yposition",
|
350 |
+
"next": null,
|
351 |
+
"parent": null,
|
352 |
+
"inputs": {},
|
353 |
+
"fields": {},
|
354 |
+
"shadow": false,
|
355 |
+
"topLevel": true,
|
356 |
+
"x": 1181,
|
357 |
+
"y": -64
|
358 |
+
},
|
359 |
+
"motion_direction": {
|
360 |
+
"opcode": "motion_direction",
|
361 |
+
"next": null,
|
362 |
+
"parent": null,
|
363 |
+
"inputs": {},
|
364 |
+
"fields": {},
|
365 |
+
"shadow": false,
|
366 |
+
"topLevel": true,
|
367 |
+
"x": 1188,
|
368 |
+
"y": 21
|
369 |
+
},
|
370 |
+
"control_wait": {
|
371 |
+
"opcode": "control_wait",
|
372 |
+
"next": null,
|
373 |
+
"parent": null,
|
374 |
+
"inputs": {
|
375 |
+
"DURATION": [
|
376 |
+
1,
|
377 |
+
[
|
378 |
+
5,
|
379 |
+
"1"
|
380 |
+
]
|
381 |
+
]
|
382 |
+
},
|
383 |
+
"fields": {},
|
384 |
+
"shadow": false,
|
385 |
+
"topLevel": true,
|
386 |
+
"x": 337,
|
387 |
+
"y": 129
|
388 |
+
},
|
389 |
+
"control_repeat": {
|
390 |
+
"opcode": "control_repeat",
|
391 |
+
"next": null,
|
392 |
+
"parent": null,
|
393 |
+
"inputs": {
|
394 |
+
"TIMES": [
|
395 |
+
1,
|
396 |
+
[
|
397 |
+
6,
|
398 |
+
"10"
|
399 |
+
]
|
400 |
+
]
|
401 |
+
},
|
402 |
+
"fields": {},
|
403 |
+
"shadow": false,
|
404 |
+
"topLevel": true,
|
405 |
+
"x": 348,
|
406 |
+
"y": 265
|
407 |
+
},
|
408 |
+
"control_forever": {
|
409 |
+
"opcode": "control_forever",
|
410 |
+
"next": null,
|
411 |
+
"parent": null,
|
412 |
+
"inputs": {},
|
413 |
+
"fields": {},
|
414 |
+
"shadow": false,
|
415 |
+
"topLevel": true,
|
416 |
+
"x": 334,
|
417 |
+
"y": 439
|
418 |
+
},
|
419 |
+
"control_if": {
|
420 |
+
"opcode": "control_if",
|
421 |
+
"next": null,
|
422 |
+
"parent": null,
|
423 |
+
"inputs": {},
|
424 |
+
"fields": {},
|
425 |
+
"shadow": false,
|
426 |
+
"topLevel": true,
|
427 |
+
"x": 331,
|
428 |
+
"y": 597
|
429 |
+
},
|
430 |
+
"control_if_else": {
|
431 |
+
"opcode": "control_if_else",
|
432 |
+
"next": null,
|
433 |
+
"parent": null,
|
434 |
+
"inputs": {},
|
435 |
+
"fields": {},
|
436 |
+
"shadow": false,
|
437 |
+
"topLevel": true,
|
438 |
+
"x": 335,
|
439 |
+
"y": 779
|
440 |
+
},
|
441 |
+
"control_wait_until": {
|
442 |
+
"opcode": "control_wait_until",
|
443 |
+
"next": null,
|
444 |
+
"parent": null,
|
445 |
+
"inputs": {},
|
446 |
+
"fields": {},
|
447 |
+
"shadow": false,
|
448 |
+
"topLevel": true,
|
449 |
+
"x": 676,
|
450 |
+
"y": 285
|
451 |
+
},
|
452 |
+
"control_repeat_until": {
|
453 |
+
"opcode": "control_repeat_until",
|
454 |
+
"next": null,
|
455 |
+
"parent": null,
|
456 |
+
"inputs": {},
|
457 |
+
"fields": {},
|
458 |
+
"shadow": false,
|
459 |
+
"topLevel": true,
|
460 |
+
"x": 692,
|
461 |
+
"y": 381
|
462 |
+
},
|
463 |
+
"control_stop": {
|
464 |
+
"opcode": "control_stop",
|
465 |
+
"next": null,
|
466 |
+
"parent": null,
|
467 |
+
"inputs": {},
|
468 |
+
"fields": {
|
469 |
+
"STOP_OPTION": [
|
470 |
+
"all",
|
471 |
+
null
|
472 |
+
]
|
473 |
+
},
|
474 |
+
"shadow": false,
|
475 |
+
"topLevel": true,
|
476 |
+
"x": 708,
|
477 |
+
"y": 545,
|
478 |
+
"mutation": {
|
479 |
+
"tagName": "mutation",
|
480 |
+
"children": [],
|
481 |
+
"hasnext": "false"
|
482 |
+
}
|
483 |
+
},
|
484 |
+
"control_start_as_clone": {
|
485 |
+
"opcode": "control_start_as_clone",
|
486 |
+
"next": null,
|
487 |
+
"parent": null,
|
488 |
+
"inputs": {},
|
489 |
+
"fields": {},
|
490 |
+
"shadow": false,
|
491 |
+
"topLevel": true,
|
492 |
+
"x": 665,
|
493 |
+
"y": 672
|
494 |
+
},
|
495 |
+
"control_create_clone_of": {
|
496 |
+
"opcode": "control_create_clone_of",
|
497 |
+
"next": null,
|
498 |
+
"parent": null,
|
499 |
+
"inputs": {
|
500 |
+
"CLONE_OPTION": [
|
501 |
+
1,
|
502 |
+
"t))DW9(QSKB]3C/3Ou+J"
|
503 |
+
]
|
504 |
+
},
|
505 |
+
"fields": {},
|
506 |
+
"shadow": false,
|
507 |
+
"topLevel": true,
|
508 |
+
"x": 648,
|
509 |
+
"y": 797
|
510 |
+
},
|
511 |
+
"control_create_clone_of_menu": {
|
512 |
+
"opcode": "control_create_clone_of_menu",
|
513 |
+
"next": null,
|
514 |
+
"parent": "80yo/}Cw++Z.;x[ohh|7",
|
515 |
+
"inputs": {},
|
516 |
+
"fields": {
|
517 |
+
"CLONE_OPTION": [
|
518 |
+
"_myself_",
|
519 |
+
null
|
520 |
+
]
|
521 |
+
},
|
522 |
+
"shadow": true,
|
523 |
+
"topLevel": false
|
524 |
+
},
|
525 |
+
"control_delete_this_clone": {
|
526 |
+
"opcode": "control_delete_this_clone",
|
527 |
+
"next": null,
|
528 |
+
"parent": null,
|
529 |
+
"inputs": {},
|
530 |
+
"fields": {},
|
531 |
+
"shadow": false,
|
532 |
+
"topLevel": true,
|
533 |
+
"x": 642,
|
534 |
+
"y": 914
|
535 |
+
},
|
536 |
+
"event_whenflagclicked": {
|
537 |
+
"opcode": "event_whenflagclicked",
|
538 |
+
"next": null,
|
539 |
+
"parent": null,
|
540 |
+
"inputs": {},
|
541 |
+
"fields": {},
|
542 |
+
"shadow": false,
|
543 |
+
"topLevel": true,
|
544 |
+
"x": 166,
|
545 |
+
"y": -422
|
546 |
+
},
|
547 |
+
"event_whenkeypressed": {
|
548 |
+
"opcode": "event_whenkeypressed",
|
549 |
+
"next": null,
|
550 |
+
"parent": null,
|
551 |
+
"inputs": {},
|
552 |
+
"fields": {
|
553 |
+
"KEY_OPTION": [
|
554 |
+
"space",
|
555 |
+
null
|
556 |
+
]
|
557 |
+
},
|
558 |
+
"shadow": false,
|
559 |
+
"topLevel": true,
|
560 |
+
"x": 151,
|
561 |
+
"y": -329
|
562 |
+
},
|
563 |
+
"event_whenthisspriteclicked": {
|
564 |
+
"opcode": "event_whenthisspriteclicked",
|
565 |
+
"next": null,
|
566 |
+
"parent": null,
|
567 |
+
"inputs": {},
|
568 |
+
"fields": {},
|
569 |
+
"shadow": false,
|
570 |
+
"topLevel": true,
|
571 |
+
"x": 156,
|
572 |
+
"y": -223
|
573 |
+
},
|
574 |
+
"event_whenbackdropswitchesto": {
|
575 |
+
"opcode": "event_whenbackdropswitchesto",
|
576 |
+
"next": null,
|
577 |
+
"parent": null,
|
578 |
+
"inputs": {},
|
579 |
+
"fields": {
|
580 |
+
"BACKDROP": [
|
581 |
+
"backdrop1",
|
582 |
+
null
|
583 |
+
]
|
584 |
+
},
|
585 |
+
"shadow": false,
|
586 |
+
"topLevel": true,
|
587 |
+
"x": 148,
|
588 |
+
"y": -101
|
589 |
+
},
|
590 |
+
"event_whengreaterthan": {
|
591 |
+
"opcode": "event_whengreaterthan",
|
592 |
+
"next": null,
|
593 |
+
"parent": null,
|
594 |
+
"inputs": {
|
595 |
+
"VALUE": [
|
596 |
+
1,
|
597 |
+
[
|
598 |
+
4,
|
599 |
+
"10"
|
600 |
+
]
|
601 |
+
]
|
602 |
+
},
|
603 |
+
"fields": {
|
604 |
+
"WHENGREATERTHANMENU": [
|
605 |
+
"LOUDNESS",
|
606 |
+
null
|
607 |
+
]
|
608 |
+
},
|
609 |
+
"shadow": false,
|
610 |
+
"topLevel": true,
|
611 |
+
"x": 150,
|
612 |
+
"y": 10
|
613 |
+
},
|
614 |
+
"event_whenbroadcastreceived": {
|
615 |
+
"opcode": "event_whenbroadcastreceived",
|
616 |
+
"next": null,
|
617 |
+
"parent": null,
|
618 |
+
"inputs": {},
|
619 |
+
"fields": {
|
620 |
+
"BROADCAST_OPTION": [
|
621 |
+
"message1",
|
622 |
+
"5O!nei;S$!c!=hCT}0:a"
|
623 |
+
]
|
624 |
+
},
|
625 |
+
"shadow": false,
|
626 |
+
"topLevel": true,
|
627 |
+
"x": 141,
|
628 |
+
"y": 118
|
629 |
+
},
|
630 |
+
"event_broadcast": {
|
631 |
+
"opcode": "event_broadcast",
|
632 |
+
"next": null,
|
633 |
+
"parent": null,
|
634 |
+
"inputs": {
|
635 |
+
"BROADCAST_INPUT": [
|
636 |
+
1,
|
637 |
+
[
|
638 |
+
11,
|
639 |
+
"message1",
|
640 |
+
"5O!nei;S$!c!=hCT}0:a"
|
641 |
+
]
|
642 |
+
]
|
643 |
+
},
|
644 |
+
"fields": {},
|
645 |
+
"shadow": false,
|
646 |
+
"topLevel": true,
|
647 |
+
"x": 151,
|
648 |
+
"y": 229
|
649 |
+
},
|
650 |
+
"event_broadcastandwait": {
|
651 |
+
"opcode": "event_broadcastandwait",
|
652 |
+
"next": null,
|
653 |
+
"parent": null,
|
654 |
+
"inputs": {
|
655 |
+
"BROADCAST_INPUT": [
|
656 |
+
1,
|
657 |
+
[
|
658 |
+
11,
|
659 |
+
"message1",
|
660 |
+
"5O!nei;S$!c!=hCT}0:a"
|
661 |
+
]
|
662 |
+
]
|
663 |
+
},
|
664 |
+
"fields": {},
|
665 |
+
"shadow": false,
|
666 |
+
"topLevel": true,
|
667 |
+
"x": 157,
|
668 |
+
"y": 340
|
669 |
+
},
|
670 |
+
"sensing_touchingobject": {
|
671 |
+
"opcode": "sensing_touchingobject",
|
672 |
+
"next": null,
|
673 |
+
"parent": null,
|
674 |
+
"inputs": {
|
675 |
+
"TOUCHINGOBJECTMENU": [
|
676 |
+
1,
|
677 |
+
"xSKW9a+wTnM~h~So8Jc]"
|
678 |
+
]
|
679 |
+
},
|
680 |
+
"fields": {},
|
681 |
+
"shadow": false,
|
682 |
+
"topLevel": true,
|
683 |
+
"x": 359,
|
684 |
+
"y": 116
|
685 |
+
},
|
686 |
+
"sensing_touchingobjectmenu": {
|
687 |
+
"opcode": "sensing_touchingobjectmenu",
|
688 |
+
"next": null,
|
689 |
+
"parent": "Y(n,F@BYzwd4CiN|Bh[P",
|
690 |
+
"inputs": {},
|
691 |
+
"fields": {
|
692 |
+
"TOUCHINGOBJECTMENU": [
|
693 |
+
"_mouse_",
|
694 |
+
null
|
695 |
+
]
|
696 |
+
},
|
697 |
+
"shadow": true,
|
698 |
+
"topLevel": false
|
699 |
+
},
|
700 |
+
"sensing_touchingcolor": {
|
701 |
+
"opcode": "sensing_touchingcolor",
|
702 |
+
"next": null,
|
703 |
+
"parent": null,
|
704 |
+
"inputs": {
|
705 |
+
"COLOR": [
|
706 |
+
1,
|
707 |
+
[
|
708 |
+
9,
|
709 |
+
"#55b888"
|
710 |
+
]
|
711 |
+
]
|
712 |
+
},
|
713 |
+
"fields": {},
|
714 |
+
"shadow": false,
|
715 |
+
"topLevel": true,
|
716 |
+
"x": 360,
|
717 |
+
"y": 188
|
718 |
+
},
|
719 |
+
"sensing_coloristouchingcolor": {
|
720 |
+
"opcode": "sensing_coloristouchingcolor",
|
721 |
+
"next": null,
|
722 |
+
"parent": null,
|
723 |
+
"inputs": {
|
724 |
+
"COLOR": [
|
725 |
+
1,
|
726 |
+
[
|
727 |
+
9,
|
728 |
+
"#d019f2"
|
729 |
+
]
|
730 |
+
],
|
731 |
+
"COLOR2": [
|
732 |
+
1,
|
733 |
+
[
|
734 |
+
9,
|
735 |
+
"#2b0de3"
|
736 |
+
]
|
737 |
+
]
|
738 |
+
},
|
739 |
+
"fields": {},
|
740 |
+
"shadow": false,
|
741 |
+
"topLevel": true,
|
742 |
+
"x": 348,
|
743 |
+
"y": 277
|
744 |
+
},
|
745 |
+
"sensing_askandwait": {
|
746 |
+
"opcode": "sensing_askandwait",
|
747 |
+
"next": null,
|
748 |
+
"parent": null,
|
749 |
+
"inputs": {
|
750 |
+
"QUESTION": [
|
751 |
+
1,
|
752 |
+
[
|
753 |
+
10,
|
754 |
+
"What's your name?"
|
755 |
+
]
|
756 |
+
]
|
757 |
+
},
|
758 |
+
"fields": {},
|
759 |
+
"shadow": false,
|
760 |
+
"topLevel": true,
|
761 |
+
"x": 338,
|
762 |
+
"y": 354
|
763 |
+
},
|
764 |
+
"sensing_answer": {
|
765 |
+
"opcode": "sensing_answer",
|
766 |
+
"next": null,
|
767 |
+
"parent": null,
|
768 |
+
"inputs": {},
|
769 |
+
"fields": {},
|
770 |
+
"shadow": false,
|
771 |
+
"topLevel": true,
|
772 |
+
"x": 782,
|
773 |
+
"y": 111
|
774 |
+
},
|
775 |
+
"sensing_keypressed": {
|
776 |
+
"opcode": "sensing_keypressed",
|
777 |
+
"next": null,
|
778 |
+
"parent": null,
|
779 |
+
"inputs": {
|
780 |
+
"KEY_OPTION": [
|
781 |
+
1,
|
782 |
+
"SNlf@Im$sv%.6ULi-f3i"
|
783 |
+
]
|
784 |
+
},
|
785 |
+
"fields": {},
|
786 |
+
"shadow": false,
|
787 |
+
"topLevel": true,
|
788 |
+
"x": 762,
|
789 |
+
"y": 207
|
790 |
+
},
|
791 |
+
"sensing_keyoptions": {
|
792 |
+
"opcode": "sensing_keyoptions",
|
793 |
+
"next": null,
|
794 |
+
"parent": "7$xEUO.2hH2R6vh!$(Uj",
|
795 |
+
"inputs": {},
|
796 |
+
"fields": {
|
797 |
+
"KEY_OPTION": [
|
798 |
+
"space",
|
799 |
+
null
|
800 |
+
]
|
801 |
+
},
|
802 |
+
"shadow": true,
|
803 |
+
"topLevel": false
|
804 |
+
},
|
805 |
+
"sensing_mousedown": {
|
806 |
+
"opcode": "sensing_mousedown",
|
807 |
+
"next": null,
|
808 |
+
"parent": null,
|
809 |
+
"inputs": {},
|
810 |
+
"fields": {},
|
811 |
+
"shadow": false,
|
812 |
+
"topLevel": true,
|
813 |
+
"x": 822,
|
814 |
+
"y": 422
|
815 |
+
},
|
816 |
+
"sensing_mousex": {
|
817 |
+
"opcode": "sensing_mousex",
|
818 |
+
"next": null,
|
819 |
+
"parent": null,
|
820 |
+
"inputs": {},
|
821 |
+
"fields": {},
|
822 |
+
"shadow": false,
|
823 |
+
"topLevel": true,
|
824 |
+
"x": 302,
|
825 |
+
"y": 528
|
826 |
+
},
|
827 |
+
"sensing_mousey": {
|
828 |
+
"opcode": "sensing_mousey",
|
829 |
+
"next": null,
|
830 |
+
"parent": null,
|
831 |
+
"inputs": {},
|
832 |
+
"fields": {},
|
833 |
+
"shadow": false,
|
834 |
+
"topLevel": true,
|
835 |
+
"x": 668,
|
836 |
+
"y": 547
|
837 |
+
},
|
838 |
+
"sensing_setdragmode": {
|
839 |
+
"opcode": "sensing_setdragmode",
|
840 |
+
"next": null,
|
841 |
+
"parent": null,
|
842 |
+
"inputs": {},
|
843 |
+
"fields": {
|
844 |
+
"DRAG_MODE": [
|
845 |
+
"draggable",
|
846 |
+
null
|
847 |
+
]
|
848 |
+
},
|
849 |
+
"shadow": false,
|
850 |
+
"topLevel": true,
|
851 |
+
"x": 950,
|
852 |
+
"y": 574
|
853 |
+
},
|
854 |
+
"sensing_loudness": {
|
855 |
+
"opcode": "sensing_loudness",
|
856 |
+
"next": null,
|
857 |
+
"parent": null,
|
858 |
+
"inputs": {},
|
859 |
+
"fields": {},
|
860 |
+
"shadow": false,
|
861 |
+
"topLevel": true,
|
862 |
+
"x": 658,
|
863 |
+
"y": 703
|
864 |
+
},
|
865 |
+
"sensing_timer": {
|
866 |
+
"opcode": "sensing_timer",
|
867 |
+
"next": null,
|
868 |
+
"parent": null,
|
869 |
+
"inputs": {},
|
870 |
+
"fields": {},
|
871 |
+
"shadow": false,
|
872 |
+
"topLevel": true,
|
873 |
+
"x": 459,
|
874 |
+
"y": 671
|
875 |
+
},
|
876 |
+
"sensing_resettimer": {
|
877 |
+
"opcode": "sensing_resettimer",
|
878 |
+
"next": null,
|
879 |
+
"parent": null,
|
880 |
+
"inputs": {},
|
881 |
+
"fields": {},
|
882 |
+
"shadow": false,
|
883 |
+
"topLevel": true,
|
884 |
+
"x": 462,
|
885 |
+
"y": 781
|
886 |
+
},
|
887 |
+
"sensing_of": {
|
888 |
+
"opcode": "sensing_of",
|
889 |
+
"next": null,
|
890 |
+
"parent": null,
|
891 |
+
"inputs": {
|
892 |
+
"OBJECT": [
|
893 |
+
1,
|
894 |
+
"t+o*y;iz,!O#aT|qM_+O"
|
895 |
+
]
|
896 |
+
},
|
897 |
+
"fields": {
|
898 |
+
"PROPERTY": [
|
899 |
+
"backdrop #",
|
900 |
+
null
|
901 |
+
]
|
902 |
+
},
|
903 |
+
"shadow": false,
|
904 |
+
"topLevel": true,
|
905 |
+
"x": 997,
|
906 |
+
"y": 754
|
907 |
+
},
|
908 |
+
"sensing_of_object_menu": {
|
909 |
+
"opcode": "sensing_of_object_menu",
|
910 |
+
"next": null,
|
911 |
+
"parent": "[4I2wIG/tNc@LQ-;FbsB",
|
912 |
+
"inputs": {},
|
913 |
+
"fields": {
|
914 |
+
"OBJECT": [
|
915 |
+
"_stage_",
|
916 |
+
null
|
917 |
+
]
|
918 |
+
},
|
919 |
+
"shadow": true,
|
920 |
+
"topLevel": false
|
921 |
+
},
|
922 |
+
"sensing_current": {
|
923 |
+
"opcode": "sensing_current",
|
924 |
+
"next": null,
|
925 |
+
"parent": null,
|
926 |
+
"inputs": {},
|
927 |
+
"fields": {
|
928 |
+
"CURRENTMENU": [
|
929 |
+
"YEAR",
|
930 |
+
null
|
931 |
+
]
|
932 |
+
},
|
933 |
+
"shadow": false,
|
934 |
+
"topLevel": true,
|
935 |
+
"x": 627,
|
936 |
+
"y": 884
|
937 |
+
},
|
938 |
+
"sensing_dayssince2000": {
|
939 |
+
"opcode": "sensing_dayssince2000",
|
940 |
+
"next": null,
|
941 |
+
"parent": null,
|
942 |
+
"inputs": {},
|
943 |
+
"fields": {},
|
944 |
+
"shadow": false,
|
945 |
+
"topLevel": true,
|
946 |
+
"x": 959,
|
947 |
+
"y": 903
|
948 |
+
},
|
949 |
+
"sensing_username": {
|
950 |
+
"opcode": "sensing_username",
|
951 |
+
"next": null,
|
952 |
+
"parent": null,
|
953 |
+
"inputs": {},
|
954 |
+
"fields": {},
|
955 |
+
"shadow": false,
|
956 |
+
"topLevel": true,
|
957 |
+
"x": 833,
|
958 |
+
"y": 757
|
959 |
+
},
|
960 |
+
"operator_add": {
|
961 |
+
"opcode": "operator_add",
|
962 |
+
"next": null,
|
963 |
+
"parent": null,
|
964 |
+
"inputs": {
|
965 |
+
"NUM1": [
|
966 |
+
1,
|
967 |
+
[
|
968 |
+
4,
|
969 |
+
""
|
970 |
+
]
|
971 |
+
],
|
972 |
+
"NUM2": [
|
973 |
+
1,
|
974 |
+
[
|
975 |
+
4,
|
976 |
+
""
|
977 |
+
]
|
978 |
+
]
|
979 |
+
},
|
980 |
+
"fields": {},
|
981 |
+
"shadow": false,
|
982 |
+
"topLevel": true,
|
983 |
+
"x": 128,
|
984 |
+
"y": 153
|
985 |
+
},
|
986 |
+
"operator_subtract": {
|
987 |
+
"opcode": "operator_subtract",
|
988 |
+
"next": null,
|
989 |
+
"parent": null,
|
990 |
+
"inputs": {
|
991 |
+
"NUM1": [
|
992 |
+
1,
|
993 |
+
[
|
994 |
+
4,
|
995 |
+
""
|
996 |
+
]
|
997 |
+
],
|
998 |
+
"NUM2": [
|
999 |
+
1,
|
1000 |
+
[
|
1001 |
+
4,
|
1002 |
+
""
|
1003 |
+
]
|
1004 |
+
]
|
1005 |
+
},
|
1006 |
+
"fields": {},
|
1007 |
+
"shadow": false,
|
1008 |
+
"topLevel": true,
|
1009 |
+
"x": 134,
|
1010 |
+
"y": 214
|
1011 |
+
},
|
1012 |
+
"operator_multiply": {
|
1013 |
+
"opcode": "operator_multiply",
|
1014 |
+
"next": null,
|
1015 |
+
"parent": null,
|
1016 |
+
"inputs": {
|
1017 |
+
"NUM1": [
|
1018 |
+
1,
|
1019 |
+
[
|
1020 |
+
4,
|
1021 |
+
""
|
1022 |
+
]
|
1023 |
+
],
|
1024 |
+
"NUM2": [
|
1025 |
+
1,
|
1026 |
+
[
|
1027 |
+
4,
|
1028 |
+
""
|
1029 |
+
]
|
1030 |
+
]
|
1031 |
+
},
|
1032 |
+
"fields": {},
|
1033 |
+
"shadow": false,
|
1034 |
+
"topLevel": true,
|
1035 |
+
"x": 134,
|
1036 |
+
"y": 278
|
1037 |
+
},
|
1038 |
+
"operator_divide": {
|
1039 |
+
"opcode": "operator_divide",
|
1040 |
+
"next": null,
|
1041 |
+
"parent": null,
|
1042 |
+
"inputs": {
|
1043 |
+
"NUM1": [
|
1044 |
+
1,
|
1045 |
+
[
|
1046 |
+
4,
|
1047 |
+
""
|
1048 |
+
]
|
1049 |
+
],
|
1050 |
+
"NUM2": [
|
1051 |
+
1,
|
1052 |
+
[
|
1053 |
+
4,
|
1054 |
+
""
|
1055 |
+
]
|
1056 |
+
]
|
1057 |
+
},
|
1058 |
+
"fields": {},
|
1059 |
+
"shadow": false,
|
1060 |
+
"topLevel": true,
|
1061 |
+
"x": 138,
|
1062 |
+
"y": 359
|
1063 |
+
},
|
1064 |
+
"operator_random": {
|
1065 |
+
"opcode": "operator_random",
|
1066 |
+
"next": null,
|
1067 |
+
"parent": null,
|
1068 |
+
"inputs": {
|
1069 |
+
"FROM": [
|
1070 |
+
1,
|
1071 |
+
[
|
1072 |
+
4,
|
1073 |
+
"1"
|
1074 |
+
]
|
1075 |
+
],
|
1076 |
+
"TO": [
|
1077 |
+
1,
|
1078 |
+
[
|
1079 |
+
4,
|
1080 |
+
"10"
|
1081 |
+
]
|
1082 |
+
]
|
1083 |
+
},
|
1084 |
+
"fields": {},
|
1085 |
+
"shadow": false,
|
1086 |
+
"topLevel": true,
|
1087 |
+
"x": 311,
|
1088 |
+
"y": 157
|
1089 |
+
},
|
1090 |
+
"operator_gt": {
|
1091 |
+
"opcode": "operator_gt",
|
1092 |
+
"next": null,
|
1093 |
+
"parent": null,
|
1094 |
+
"inputs": {
|
1095 |
+
"OPERAND1": [
|
1096 |
+
1,
|
1097 |
+
[
|
1098 |
+
10,
|
1099 |
+
""
|
1100 |
+
]
|
1101 |
+
],
|
1102 |
+
"OPERAND2": [
|
1103 |
+
1,
|
1104 |
+
[
|
1105 |
+
10,
|
1106 |
+
"50"
|
1107 |
+
]
|
1108 |
+
]
|
1109 |
+
},
|
1110 |
+
"fields": {},
|
1111 |
+
"shadow": false,
|
1112 |
+
"topLevel": true,
|
1113 |
+
"x": 348,
|
1114 |
+
"y": 217
|
1115 |
+
},
|
1116 |
+
"operator_lt": {
|
1117 |
+
"opcode": "operator_lt",
|
1118 |
+
"next": null,
|
1119 |
+
"parent": null,
|
1120 |
+
"inputs": {
|
1121 |
+
"OPERAND1": [
|
1122 |
+
1,
|
1123 |
+
[
|
1124 |
+
10,
|
1125 |
+
""
|
1126 |
+
]
|
1127 |
+
],
|
1128 |
+
"OPERAND2": [
|
1129 |
+
1,
|
1130 |
+
[
|
1131 |
+
10,
|
1132 |
+
"50"
|
1133 |
+
]
|
1134 |
+
]
|
1135 |
+
},
|
1136 |
+
"fields": {},
|
1137 |
+
"shadow": false,
|
1138 |
+
"topLevel": true,
|
1139 |
+
"x": 345,
|
1140 |
+
"y": 286
|
1141 |
+
},
|
1142 |
+
"operator_equals": {
|
1143 |
+
"opcode": "operator_equals",
|
1144 |
+
"next": null,
|
1145 |
+
"parent": null,
|
1146 |
+
"inputs": {
|
1147 |
+
"OPERAND1": [
|
1148 |
+
1,
|
1149 |
+
[
|
1150 |
+
10,
|
1151 |
+
""
|
1152 |
+
]
|
1153 |
+
],
|
1154 |
+
"OPERAND2": [
|
1155 |
+
1,
|
1156 |
+
[
|
1157 |
+
10,
|
1158 |
+
"50"
|
1159 |
+
]
|
1160 |
+
]
|
1161 |
+
},
|
1162 |
+
"fields": {},
|
1163 |
+
"shadow": false,
|
1164 |
+
"topLevel": true,
|
1165 |
+
"x": 345,
|
1166 |
+
"y": 372
|
1167 |
+
},
|
1168 |
+
"operator_and": {
|
1169 |
+
"opcode": "operator_and",
|
1170 |
+
"next": null,
|
1171 |
+
"parent": null,
|
1172 |
+
"inputs": {},
|
1173 |
+
"fields": {},
|
1174 |
+
"shadow": false,
|
1175 |
+
"topLevel": true,
|
1176 |
+
"x": 701,
|
1177 |
+
"y": 158
|
1178 |
+
},
|
1179 |
+
"operator_or": {
|
1180 |
+
"opcode": "operator_or",
|
1181 |
+
"next": null,
|
1182 |
+
"parent": null,
|
1183 |
+
"inputs": {},
|
1184 |
+
"fields": {},
|
1185 |
+
"shadow": false,
|
1186 |
+
"topLevel": true,
|
1187 |
+
"x": 705,
|
1188 |
+
"y": 222
|
1189 |
+
},
|
1190 |
+
"operator_not": {
|
1191 |
+
"opcode": "operator_not",
|
1192 |
+
"next": null,
|
1193 |
+
"parent": null,
|
1194 |
+
"inputs": {},
|
1195 |
+
"fields": {},
|
1196 |
+
"shadow": false,
|
1197 |
+
"topLevel": true,
|
1198 |
+
"x": 734,
|
1199 |
+
"y": 283
|
1200 |
+
},
|
1201 |
+
"operator_join": {
|
1202 |
+
"opcode": "operator_join",
|
1203 |
+
"next": null,
|
1204 |
+
"parent": null,
|
1205 |
+
"inputs": {
|
1206 |
+
"STRING1": [
|
1207 |
+
1,
|
1208 |
+
[
|
1209 |
+
10,
|
1210 |
+
"apple "
|
1211 |
+
]
|
1212 |
+
],
|
1213 |
+
"STRING2": [
|
1214 |
+
1,
|
1215 |
+
[
|
1216 |
+
10,
|
1217 |
+
"banana"
|
1218 |
+
]
|
1219 |
+
]
|
1220 |
+
},
|
1221 |
+
"fields": {},
|
1222 |
+
"shadow": false,
|
1223 |
+
"topLevel": true,
|
1224 |
+
"x": 663,
|
1225 |
+
"y": 378
|
1226 |
+
},
|
1227 |
+
"operator_letter_of": {
|
1228 |
+
"opcode": "operator_letter_of",
|
1229 |
+
"next": null,
|
1230 |
+
"parent": null,
|
1231 |
+
"inputs": {
|
1232 |
+
"LETTER": [
|
1233 |
+
1,
|
1234 |
+
[
|
1235 |
+
6,
|
1236 |
+
"1"
|
1237 |
+
]
|
1238 |
+
],
|
1239 |
+
"STRING": [
|
1240 |
+
1,
|
1241 |
+
[
|
1242 |
+
10,
|
1243 |
+
"apple"
|
1244 |
+
]
|
1245 |
+
]
|
1246 |
+
},
|
1247 |
+
"fields": {},
|
1248 |
+
"shadow": false,
|
1249 |
+
"topLevel": true,
|
1250 |
+
"x": 664,
|
1251 |
+
"y": 445
|
1252 |
+
},
|
1253 |
+
"operator_length": {
|
1254 |
+
"opcode": "operator_length",
|
1255 |
+
"next": null,
|
1256 |
+
"parent": null,
|
1257 |
+
"inputs": {
|
1258 |
+
"STRING": [
|
1259 |
+
1,
|
1260 |
+
[
|
1261 |
+
10,
|
1262 |
+
"apple"
|
1263 |
+
]
|
1264 |
+
]
|
1265 |
+
},
|
1266 |
+
"fields": {},
|
1267 |
+
"shadow": false,
|
1268 |
+
"topLevel": true,
|
1269 |
+
"x": 664,
|
1270 |
+
"y": 521
|
1271 |
+
},
|
1272 |
+
"operator_contains": {
|
1273 |
+
"opcode": "operator_contains",
|
1274 |
+
"next": null,
|
1275 |
+
"parent": null,
|
1276 |
+
"inputs": {
|
1277 |
+
"STRING1": [
|
1278 |
+
1,
|
1279 |
+
[
|
1280 |
+
10,
|
1281 |
+
"apple"
|
1282 |
+
]
|
1283 |
+
],
|
1284 |
+
"STRING2": [
|
1285 |
+
1,
|
1286 |
+
[
|
1287 |
+
10,
|
1288 |
+
"a"
|
1289 |
+
]
|
1290 |
+
]
|
1291 |
+
},
|
1292 |
+
"fields": {},
|
1293 |
+
"shadow": false,
|
1294 |
+
"topLevel": true,
|
1295 |
+
"x": 634,
|
1296 |
+
"y": 599
|
1297 |
+
},
|
1298 |
+
"operator_mod": {
|
1299 |
+
"opcode": "operator_mod",
|
1300 |
+
"next": null,
|
1301 |
+
"parent": null,
|
1302 |
+
"inputs": {
|
1303 |
+
"NUM1": [
|
1304 |
+
1,
|
1305 |
+
[
|
1306 |
+
4,
|
1307 |
+
""
|
1308 |
+
]
|
1309 |
+
],
|
1310 |
+
"NUM2": [
|
1311 |
+
1,
|
1312 |
+
[
|
1313 |
+
4,
|
1314 |
+
""
|
1315 |
+
]
|
1316 |
+
]
|
1317 |
+
},
|
1318 |
+
"fields": {},
|
1319 |
+
"shadow": false,
|
1320 |
+
"topLevel": true,
|
1321 |
+
"x": 295,
|
1322 |
+
"y": 594
|
1323 |
+
},
|
1324 |
+
"operator_round": {
|
1325 |
+
"opcode": "operator_round",
|
1326 |
+
"next": null,
|
1327 |
+
"parent": null,
|
1328 |
+
"inputs": {
|
1329 |
+
"NUM": [
|
1330 |
+
1,
|
1331 |
+
[
|
1332 |
+
4,
|
1333 |
+
""
|
1334 |
+
]
|
1335 |
+
]
|
1336 |
+
},
|
1337 |
+
"fields": {},
|
1338 |
+
"shadow": false,
|
1339 |
+
"topLevel": true,
|
1340 |
+
"x": 307,
|
1341 |
+
"y": 674
|
1342 |
+
},
|
1343 |
+
"operator_mathop": {
|
1344 |
+
"opcode": "operator_mathop",
|
1345 |
+
"next": null,
|
1346 |
+
"parent": null,
|
1347 |
+
"inputs": {
|
1348 |
+
"NUM": [
|
1349 |
+
1,
|
1350 |
+
[
|
1351 |
+
4,
|
1352 |
+
""
|
1353 |
+
]
|
1354 |
+
]
|
1355 |
+
},
|
1356 |
+
"fields": {
|
1357 |
+
"OPERATOR": [
|
1358 |
+
"abs",
|
1359 |
+
null
|
1360 |
+
]
|
1361 |
+
},
|
1362 |
+
"shadow": false,
|
1363 |
+
"topLevel": true,
|
1364 |
+
"x": 280,
|
1365 |
+
"y": 754
|
1366 |
+
},
|
1367 |
+
"data_setvariableto": {
|
1368 |
+
"opcode": "data_setvariableto",
|
1369 |
+
"next": null,
|
1370 |
+
"parent": null,
|
1371 |
+
"inputs": {
|
1372 |
+
"VALUE": [
|
1373 |
+
1,
|
1374 |
+
[
|
1375 |
+
10,
|
1376 |
+
"0"
|
1377 |
+
]
|
1378 |
+
]
|
1379 |
+
},
|
1380 |
+
"fields": {
|
1381 |
+
"VARIABLE": [
|
1382 |
+
"my variable",
|
1383 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
1384 |
+
]
|
1385 |
+
},
|
1386 |
+
"shadow": false,
|
1387 |
+
"topLevel": true,
|
1388 |
+
"x": 348,
|
1389 |
+
"y": 241
|
1390 |
+
},
|
1391 |
+
"data_changevariableby": {
|
1392 |
+
"opcode": "data_changevariableby",
|
1393 |
+
"next": null,
|
1394 |
+
"parent": null,
|
1395 |
+
"inputs": {
|
1396 |
+
"VALUE": [
|
1397 |
+
1,
|
1398 |
+
[
|
1399 |
+
4,
|
1400 |
+
"1"
|
1401 |
+
]
|
1402 |
+
]
|
1403 |
+
},
|
1404 |
+
"fields": {
|
1405 |
+
"VARIABLE": [
|
1406 |
+
"my variable",
|
1407 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
1408 |
+
]
|
1409 |
+
},
|
1410 |
+
"shadow": false,
|
1411 |
+
"topLevel": true,
|
1412 |
+
"x": 313,
|
1413 |
+
"y": 363
|
1414 |
+
},
|
1415 |
+
"data_showvariable": {
|
1416 |
+
"opcode": "data_showvariable",
|
1417 |
+
"next": null,
|
1418 |
+
"parent": null,
|
1419 |
+
"inputs": {},
|
1420 |
+
"fields": {
|
1421 |
+
"VARIABLE": [
|
1422 |
+
"my variable",
|
1423 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
1424 |
+
]
|
1425 |
+
},
|
1426 |
+
"shadow": false,
|
1427 |
+
"topLevel": true,
|
1428 |
+
"x": 415,
|
1429 |
+
"y": 473
|
1430 |
+
},
|
1431 |
+
"data_hidevariable": {
|
1432 |
+
"opcode": "data_hidevariable",
|
1433 |
+
"next": null,
|
1434 |
+
"parent": null,
|
1435 |
+
"inputs": {},
|
1436 |
+
"fields": {
|
1437 |
+
"VARIABLE": [
|
1438 |
+
"my variable",
|
1439 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
1440 |
+
]
|
1441 |
+
},
|
1442 |
+
"shadow": false,
|
1443 |
+
"topLevel": true,
|
1444 |
+
"x": 319,
|
1445 |
+
"y": 587
|
1446 |
+
},
|
1447 |
+
"data_addtolist": {
|
1448 |
+
"opcode": "data_addtolist",
|
1449 |
+
"next": null,
|
1450 |
+
"parent": null,
|
1451 |
+
"inputs": {
|
1452 |
+
"ITEM": [
|
1453 |
+
1,
|
1454 |
+
[
|
1455 |
+
10,
|
1456 |
+
"thing"
|
1457 |
+
]
|
1458 |
+
]
|
1459 |
+
},
|
1460 |
+
"fields": {
|
1461 |
+
"LIST": [
|
1462 |
+
"MY_LIST",
|
1463 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1464 |
+
]
|
1465 |
+
},
|
1466 |
+
"shadow": false,
|
1467 |
+
"topLevel": true,
|
1468 |
+
"x": 385,
|
1469 |
+
"y": 109
|
1470 |
+
},
|
1471 |
+
"data_deleteoflist": {
|
1472 |
+
"opcode": "data_deleteoflist",
|
1473 |
+
"next": null,
|
1474 |
+
"parent": null,
|
1475 |
+
"inputs": {
|
1476 |
+
"INDEX": [
|
1477 |
+
1,
|
1478 |
+
[
|
1479 |
+
7,
|
1480 |
+
"1"
|
1481 |
+
]
|
1482 |
+
]
|
1483 |
+
},
|
1484 |
+
"fields": {
|
1485 |
+
"LIST": [
|
1486 |
+
"MY_LIST",
|
1487 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1488 |
+
]
|
1489 |
+
},
|
1490 |
+
"shadow": false,
|
1491 |
+
"topLevel": true,
|
1492 |
+
"x": 384,
|
1493 |
+
"y": 244
|
1494 |
+
},
|
1495 |
+
"data_deletealloflist": {
|
1496 |
+
"opcode": "data_deletealloflist",
|
1497 |
+
"next": null,
|
1498 |
+
"parent": null,
|
1499 |
+
"inputs": {},
|
1500 |
+
"fields": {
|
1501 |
+
"LIST": [
|
1502 |
+
"MY_LIST",
|
1503 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1504 |
+
]
|
1505 |
+
},
|
1506 |
+
"shadow": false,
|
1507 |
+
"topLevel": true,
|
1508 |
+
"x": 387,
|
1509 |
+
"y": 374
|
1510 |
+
},
|
1511 |
+
"data_insertatlist": {
|
1512 |
+
"opcode": "data_insertatlist",
|
1513 |
+
"next": null,
|
1514 |
+
"parent": null,
|
1515 |
+
"inputs": {
|
1516 |
+
"ITEM": [
|
1517 |
+
1,
|
1518 |
+
[
|
1519 |
+
10,
|
1520 |
+
"thing"
|
1521 |
+
]
|
1522 |
+
],
|
1523 |
+
"INDEX": [
|
1524 |
+
1,
|
1525 |
+
[
|
1526 |
+
7,
|
1527 |
+
"1"
|
1528 |
+
]
|
1529 |
+
]
|
1530 |
+
},
|
1531 |
+
"fields": {
|
1532 |
+
"LIST": [
|
1533 |
+
"MY_LIST",
|
1534 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1535 |
+
]
|
1536 |
+
},
|
1537 |
+
"shadow": false,
|
1538 |
+
"topLevel": true,
|
1539 |
+
"x": 366,
|
1540 |
+
"y": 527
|
1541 |
+
},
|
1542 |
+
"data_replaceitemoflist": {
|
1543 |
+
"opcode": "data_replaceitemoflist",
|
1544 |
+
"next": null,
|
1545 |
+
"parent": null,
|
1546 |
+
"inputs": {
|
1547 |
+
"INDEX": [
|
1548 |
+
1,
|
1549 |
+
[
|
1550 |
+
7,
|
1551 |
+
"1"
|
1552 |
+
]
|
1553 |
+
],
|
1554 |
+
"ITEM": [
|
1555 |
+
1,
|
1556 |
+
[
|
1557 |
+
10,
|
1558 |
+
"thing"
|
1559 |
+
]
|
1560 |
+
]
|
1561 |
+
},
|
1562 |
+
"fields": {
|
1563 |
+
"LIST": [
|
1564 |
+
"MY_LIST",
|
1565 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1566 |
+
]
|
1567 |
+
},
|
1568 |
+
"shadow": false,
|
1569 |
+
"topLevel": true,
|
1570 |
+
"x": 365,
|
1571 |
+
"y": 657
|
1572 |
+
},
|
1573 |
+
"data_itemoflist": {
|
1574 |
+
"opcode": "data_itemoflist",
|
1575 |
+
"next": null,
|
1576 |
+
"parent": null,
|
1577 |
+
"inputs": {
|
1578 |
+
"INDEX": [
|
1579 |
+
1,
|
1580 |
+
[
|
1581 |
+
7,
|
1582 |
+
"1"
|
1583 |
+
]
|
1584 |
+
]
|
1585 |
+
},
|
1586 |
+
"fields": {
|
1587 |
+
"LIST": [
|
1588 |
+
"MY_LIST",
|
1589 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1590 |
+
]
|
1591 |
+
},
|
1592 |
+
"shadow": false,
|
1593 |
+
"topLevel": true,
|
1594 |
+
"x": 862,
|
1595 |
+
"y": 117
|
1596 |
+
},
|
1597 |
+
"data_itemnumoflist": {
|
1598 |
+
"opcode": "data_itemnumoflist",
|
1599 |
+
"next": null,
|
1600 |
+
"parent": null,
|
1601 |
+
"inputs": {
|
1602 |
+
"ITEM": [
|
1603 |
+
1,
|
1604 |
+
[
|
1605 |
+
10,
|
1606 |
+
"thing"
|
1607 |
+
]
|
1608 |
+
]
|
1609 |
+
},
|
1610 |
+
"fields": {
|
1611 |
+
"LIST": [
|
1612 |
+
"MY_LIST",
|
1613 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1614 |
+
]
|
1615 |
+
},
|
1616 |
+
"shadow": false,
|
1617 |
+
"topLevel": true,
|
1618 |
+
"x": 883,
|
1619 |
+
"y": 238
|
1620 |
+
},
|
1621 |
+
"data_lengthoflist": {
|
1622 |
+
"opcode": "data_lengthoflist",
|
1623 |
+
"next": null,
|
1624 |
+
"parent": null,
|
1625 |
+
"inputs": {},
|
1626 |
+
"fields": {
|
1627 |
+
"LIST": [
|
1628 |
+
"MY_LIST",
|
1629 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1630 |
+
]
|
1631 |
+
},
|
1632 |
+
"shadow": false,
|
1633 |
+
"topLevel": true,
|
1634 |
+
"x": 876,
|
1635 |
+
"y": 342
|
1636 |
+
},
|
1637 |
+
"data_listcontainsitem": {
|
1638 |
+
"opcode": "data_listcontainsitem",
|
1639 |
+
"next": null,
|
1640 |
+
"parent": null,
|
1641 |
+
"inputs": {
|
1642 |
+
"ITEM": [
|
1643 |
+
1,
|
1644 |
+
[
|
1645 |
+
10,
|
1646 |
+
"thing"
|
1647 |
+
]
|
1648 |
+
]
|
1649 |
+
},
|
1650 |
+
"fields": {
|
1651 |
+
"LIST": [
|
1652 |
+
"MY_LIST",
|
1653 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1654 |
+
]
|
1655 |
+
},
|
1656 |
+
"shadow": false,
|
1657 |
+
"topLevel": true,
|
1658 |
+
"x": 871,
|
1659 |
+
"y": 463
|
1660 |
+
},
|
1661 |
+
"data_showlist": {
|
1662 |
+
"opcode": "data_showlist",
|
1663 |
+
"next": null,
|
1664 |
+
"parent": null,
|
1665 |
+
"inputs": {},
|
1666 |
+
"fields": {
|
1667 |
+
"LIST": [
|
1668 |
+
"MY_LIST",
|
1669 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1670 |
+
]
|
1671 |
+
},
|
1672 |
+
"shadow": false,
|
1673 |
+
"topLevel": true,
|
1674 |
+
"x": 931,
|
1675 |
+
"y": 563
|
1676 |
+
},
|
1677 |
+
"data_hidelist": {
|
1678 |
+
"opcode": "data_hidelist",
|
1679 |
+
"next": null,
|
1680 |
+
"parent": null,
|
1681 |
+
"inputs": {},
|
1682 |
+
"fields": {
|
1683 |
+
"LIST": [
|
1684 |
+
"MY_LIST",
|
1685 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
1686 |
+
]
|
1687 |
+
},
|
1688 |
+
"shadow": false,
|
1689 |
+
"topLevel": true,
|
1690 |
+
"x": 962,
|
1691 |
+
"y": 716
|
1692 |
+
},
|
1693 |
+
"sound_playuntildone": {
|
1694 |
+
"opcode": "sound_playuntildone",
|
1695 |
+
"next": null,
|
1696 |
+
"parent": null,
|
1697 |
+
"inputs": {
|
1698 |
+
"SOUND_MENU": [
|
1699 |
+
1,
|
1700 |
+
"4w%pR8G.yD%g-BwCj=uK"
|
1701 |
+
]
|
1702 |
+
},
|
1703 |
+
"fields": {},
|
1704 |
+
"shadow": false,
|
1705 |
+
"topLevel": true,
|
1706 |
+
"x": 253,
|
1707 |
+
"y": 17
|
1708 |
+
},
|
1709 |
+
"sound_sounds_menu": {
|
1710 |
+
"opcode": "sound_sounds_menu",
|
1711 |
+
"next": null,
|
1712 |
+
"parent": "Pdc$U;s8e_uUfTX`}jOo",
|
1713 |
+
"inputs": {},
|
1714 |
+
"fields": {
|
1715 |
+
"SOUND_MENU": [
|
1716 |
+
"Meow",
|
1717 |
+
null
|
1718 |
+
]
|
1719 |
+
},
|
1720 |
+
"shadow": true,
|
1721 |
+
"topLevel": false
|
1722 |
+
},
|
1723 |
+
"sound_play": {
|
1724 |
+
"opcode": "sound_play",
|
1725 |
+
"next": null,
|
1726 |
+
"parent": null,
|
1727 |
+
"inputs": {
|
1728 |
+
"SOUND_MENU": [
|
1729 |
+
1,
|
1730 |
+
"i1U{^VHb*2`9?l}=:L)/"
|
1731 |
+
]
|
1732 |
+
},
|
1733 |
+
"fields": {},
|
1734 |
+
"shadow": false,
|
1735 |
+
"topLevel": true,
|
1736 |
+
"x": 245,
|
1737 |
+
"y": 122
|
1738 |
+
},
|
1739 |
+
"sound_stopallsounds": {
|
1740 |
+
"opcode": "sound_stopallsounds",
|
1741 |
+
"next": null,
|
1742 |
+
"parent": null,
|
1743 |
+
"inputs": {},
|
1744 |
+
"fields": {},
|
1745 |
+
"shadow": false,
|
1746 |
+
"topLevel": true,
|
1747 |
+
"x": 253,
|
1748 |
+
"y": 245
|
1749 |
+
},
|
1750 |
+
"sound_changeeffectby": {
|
1751 |
+
"opcode": "sound_changeeffectby",
|
1752 |
+
"next": null,
|
1753 |
+
"parent": null,
|
1754 |
+
"inputs": {
|
1755 |
+
"VALUE": [
|
1756 |
+
1,
|
1757 |
+
[
|
1758 |
+
4,
|
1759 |
+
"10"
|
1760 |
+
]
|
1761 |
+
]
|
1762 |
+
},
|
1763 |
+
"fields": {
|
1764 |
+
"EFFECT": [
|
1765 |
+
"PITCH",
|
1766 |
+
null
|
1767 |
+
]
|
1768 |
+
},
|
1769 |
+
"shadow": false,
|
1770 |
+
"topLevel": true,
|
1771 |
+
"x": 653,
|
1772 |
+
"y": 14
|
1773 |
+
},
|
1774 |
+
"sound_seteffectto": {
|
1775 |
+
"opcode": "sound_seteffectto",
|
1776 |
+
"next": null,
|
1777 |
+
"parent": null,
|
1778 |
+
"inputs": {
|
1779 |
+
"VALUE": [
|
1780 |
+
1,
|
1781 |
+
[
|
1782 |
+
4,
|
1783 |
+
"100"
|
1784 |
+
]
|
1785 |
+
]
|
1786 |
+
},
|
1787 |
+
"fields": {
|
1788 |
+
"EFFECT": [
|
1789 |
+
"PITCH",
|
1790 |
+
null
|
1791 |
+
]
|
1792 |
+
},
|
1793 |
+
"shadow": false,
|
1794 |
+
"topLevel": true,
|
1795 |
+
"x": 653,
|
1796 |
+
"y": 139
|
1797 |
+
},
|
1798 |
+
"sound_cleareffects": {
|
1799 |
+
"opcode": "sound_cleareffects",
|
1800 |
+
"next": null,
|
1801 |
+
"parent": null,
|
1802 |
+
"inputs": {},
|
1803 |
+
"fields": {},
|
1804 |
+
"shadow": false,
|
1805 |
+
"topLevel": true,
|
1806 |
+
"x": 651,
|
1807 |
+
"y": 242
|
1808 |
+
},
|
1809 |
+
"sound_changevolumeby": {
|
1810 |
+
"opcode": "sound_changevolumeby",
|
1811 |
+
"next": null,
|
1812 |
+
"parent": null,
|
1813 |
+
"inputs": {
|
1814 |
+
"VOLUME": [
|
1815 |
+
1,
|
1816 |
+
[
|
1817 |
+
4,
|
1818 |
+
"-10"
|
1819 |
+
]
|
1820 |
+
]
|
1821 |
+
},
|
1822 |
+
"fields": {},
|
1823 |
+
"shadow": false,
|
1824 |
+
"topLevel": true,
|
1825 |
+
"x": 645,
|
1826 |
+
"y": 353
|
1827 |
+
},
|
1828 |
+
"sound_setvolumeto": {
|
1829 |
+
"opcode": "sound_setvolumeto",
|
1830 |
+
"next": null,
|
1831 |
+
"parent": null,
|
1832 |
+
"inputs": {
|
1833 |
+
"VOLUME": [
|
1834 |
+
1,
|
1835 |
+
[
|
1836 |
+
4,
|
1837 |
+
"100"
|
1838 |
+
]
|
1839 |
+
]
|
1840 |
+
},
|
1841 |
+
"fields": {},
|
1842 |
+
"shadow": false,
|
1843 |
+
"topLevel": true,
|
1844 |
+
"x": 1108,
|
1845 |
+
"y": 5
|
1846 |
+
},
|
1847 |
+
"sound_volume": {
|
1848 |
+
"opcode": "sound_volume",
|
1849 |
+
"next": null,
|
1850 |
+
"parent": null,
|
1851 |
+
"inputs": {},
|
1852 |
+
"fields": {},
|
1853 |
+
"shadow": false,
|
1854 |
+
"topLevel": true,
|
1855 |
+
"x": 1136,
|
1856 |
+
"y": 123
|
1857 |
+
},
|
1858 |
+
"looks_sayforsecs": {
|
1859 |
+
"opcode": "looks_sayforsecs",
|
1860 |
+
"next": null,
|
1861 |
+
"parent": null,
|
1862 |
+
"inputs": {
|
1863 |
+
"MESSAGE": [
|
1864 |
+
1,
|
1865 |
+
[
|
1866 |
+
10,
|
1867 |
+
"Hello!"
|
1868 |
+
]
|
1869 |
+
],
|
1870 |
+
"SECS": [
|
1871 |
+
1,
|
1872 |
+
[
|
1873 |
+
4,
|
1874 |
+
"2"
|
1875 |
+
]
|
1876 |
+
]
|
1877 |
+
},
|
1878 |
+
"fields": {},
|
1879 |
+
"shadow": false,
|
1880 |
+
"topLevel": true,
|
1881 |
+
"x": 408,
|
1882 |
+
"y": 91
|
1883 |
+
},
|
1884 |
+
"looks_say": {
|
1885 |
+
"opcode": "looks_say",
|
1886 |
+
"next": null,
|
1887 |
+
"parent": null,
|
1888 |
+
"inputs": {
|
1889 |
+
"MESSAGE": [
|
1890 |
+
1,
|
1891 |
+
[
|
1892 |
+
10,
|
1893 |
+
"Hello!"
|
1894 |
+
]
|
1895 |
+
]
|
1896 |
+
},
|
1897 |
+
"fields": {},
|
1898 |
+
"shadow": false,
|
1899 |
+
"topLevel": true,
|
1900 |
+
"x": 413,
|
1901 |
+
"y": 213
|
1902 |
+
},
|
1903 |
+
"looks_thinkforsecs": {
|
1904 |
+
"opcode": "looks_thinkforsecs",
|
1905 |
+
"next": null,
|
1906 |
+
"parent": null,
|
1907 |
+
"inputs": {
|
1908 |
+
"MESSAGE": [
|
1909 |
+
1,
|
1910 |
+
[
|
1911 |
+
10,
|
1912 |
+
"Hmm..."
|
1913 |
+
]
|
1914 |
+
],
|
1915 |
+
"SECS": [
|
1916 |
+
1,
|
1917 |
+
[
|
1918 |
+
4,
|
1919 |
+
"2"
|
1920 |
+
]
|
1921 |
+
]
|
1922 |
+
},
|
1923 |
+
"fields": {},
|
1924 |
+
"shadow": false,
|
1925 |
+
"topLevel": true,
|
1926 |
+
"x": 413,
|
1927 |
+
"y": 317
|
1928 |
+
},
|
1929 |
+
"looks_think": {
|
1930 |
+
"opcode": "looks_think",
|
1931 |
+
"next": null,
|
1932 |
+
"parent": null,
|
1933 |
+
"inputs": {
|
1934 |
+
"MESSAGE": [
|
1935 |
+
1,
|
1936 |
+
[
|
1937 |
+
10,
|
1938 |
+
"Hmm..."
|
1939 |
+
]
|
1940 |
+
]
|
1941 |
+
},
|
1942 |
+
"fields": {},
|
1943 |
+
"shadow": false,
|
1944 |
+
"topLevel": true,
|
1945 |
+
"x": 412,
|
1946 |
+
"y": 432
|
1947 |
+
},
|
1948 |
+
"looks_switchcostumeto": {
|
1949 |
+
"opcode": "looks_switchcostumeto",
|
1950 |
+
"next": null,
|
1951 |
+
"parent": null,
|
1952 |
+
"inputs": {
|
1953 |
+
"COSTUME": [
|
1954 |
+
1,
|
1955 |
+
"8;bti4wv(iH9nkOacCJ|"
|
1956 |
+
]
|
1957 |
+
},
|
1958 |
+
"fields": {},
|
1959 |
+
"shadow": false,
|
1960 |
+
"topLevel": true,
|
1961 |
+
"x": 411,
|
1962 |
+
"y": 555
|
1963 |
+
},
|
1964 |
+
"looks_costume": {
|
1965 |
+
"opcode": "looks_costume",
|
1966 |
+
"next": null,
|
1967 |
+
"parent": "Q#a,6LPWHqo9-0Nu*[SV",
|
1968 |
+
"inputs": {},
|
1969 |
+
"fields": {
|
1970 |
+
"COSTUME": [
|
1971 |
+
"costume2",
|
1972 |
+
null
|
1973 |
+
]
|
1974 |
+
},
|
1975 |
+
"shadow": true,
|
1976 |
+
"topLevel": false
|
1977 |
+
},
|
1978 |
+
"looks_nextcostume": {
|
1979 |
+
"opcode": "looks_nextcostume",
|
1980 |
+
"next": null,
|
1981 |
+
"parent": null,
|
1982 |
+
"inputs": {},
|
1983 |
+
"fields": {},
|
1984 |
+
"shadow": false,
|
1985 |
+
"topLevel": true,
|
1986 |
+
"x": 419,
|
1987 |
+
"y": 687
|
1988 |
+
},
|
1989 |
+
"looks_switchbackdropto": {
|
1990 |
+
"opcode": "looks_switchbackdropto",
|
1991 |
+
"next": null,
|
1992 |
+
"parent": null,
|
1993 |
+
"inputs": {
|
1994 |
+
"BACKDROP": [
|
1995 |
+
1,
|
1996 |
+
"-?yeX}29V*wd6W:unW0i"
|
1997 |
+
]
|
1998 |
+
},
|
1999 |
+
"fields": {},
|
2000 |
+
"shadow": false,
|
2001 |
+
"topLevel": true,
|
2002 |
+
"x": 901,
|
2003 |
+
"y": 91
|
2004 |
+
},
|
2005 |
+
"looks_backdrops": {
|
2006 |
+
"opcode": "looks_backdrops",
|
2007 |
+
"next": null,
|
2008 |
+
"parent": "`Wm^p~l[(IWzc1|wNv*.",
|
2009 |
+
"inputs": {},
|
2010 |
+
"fields": {
|
2011 |
+
"BACKDROP": [
|
2012 |
+
"backdrop1",
|
2013 |
+
null
|
2014 |
+
]
|
2015 |
+
},
|
2016 |
+
"shadow": true,
|
2017 |
+
"topLevel": false
|
2018 |
+
},
|
2019 |
+
"looks_changesizeby": {
|
2020 |
+
"opcode": "looks_changesizeby",
|
2021 |
+
"next": null,
|
2022 |
+
"parent": null,
|
2023 |
+
"inputs": {
|
2024 |
+
"CHANGE": [
|
2025 |
+
1,
|
2026 |
+
[
|
2027 |
+
4,
|
2028 |
+
"10"
|
2029 |
+
]
|
2030 |
+
]
|
2031 |
+
},
|
2032 |
+
"fields": {},
|
2033 |
+
"shadow": false,
|
2034 |
+
"topLevel": true,
|
2035 |
+
"x": 895,
|
2036 |
+
"y": 192
|
2037 |
+
},
|
2038 |
+
"looks_setsizeto": {
|
2039 |
+
"opcode": "looks_setsizeto",
|
2040 |
+
"next": null,
|
2041 |
+
"parent": null,
|
2042 |
+
"inputs": {
|
2043 |
+
"SIZE": [
|
2044 |
+
1,
|
2045 |
+
[
|
2046 |
+
4,
|
2047 |
+
"100"
|
2048 |
+
]
|
2049 |
+
]
|
2050 |
+
},
|
2051 |
+
"fields": {},
|
2052 |
+
"shadow": false,
|
2053 |
+
"topLevel": true,
|
2054 |
+
"x": 896,
|
2055 |
+
"y": 303
|
2056 |
+
},
|
2057 |
+
"looks_changeeffectby": {
|
2058 |
+
"opcode": "looks_changeeffectby",
|
2059 |
+
"next": null,
|
2060 |
+
"parent": null,
|
2061 |
+
"inputs": {
|
2062 |
+
"CHANGE": [
|
2063 |
+
1,
|
2064 |
+
[
|
2065 |
+
4,
|
2066 |
+
"25"
|
2067 |
+
]
|
2068 |
+
]
|
2069 |
+
},
|
2070 |
+
"fields": {
|
2071 |
+
"EFFECT": [
|
2072 |
+
"COLOR",
|
2073 |
+
null
|
2074 |
+
]
|
2075 |
+
},
|
2076 |
+
"shadow": false,
|
2077 |
+
"topLevel": true,
|
2078 |
+
"x": 892,
|
2079 |
+
"y": 416
|
2080 |
+
},
|
2081 |
+
"looks_seteffectto": {
|
2082 |
+
"opcode": "looks_seteffectto",
|
2083 |
+
"next": null,
|
2084 |
+
"parent": null,
|
2085 |
+
"inputs": {
|
2086 |
+
"VALUE": [
|
2087 |
+
1,
|
2088 |
+
[
|
2089 |
+
4,
|
2090 |
+
"0"
|
2091 |
+
]
|
2092 |
+
]
|
2093 |
+
},
|
2094 |
+
"fields": {
|
2095 |
+
"EFFECT": [
|
2096 |
+
"COLOR",
|
2097 |
+
null
|
2098 |
+
]
|
2099 |
+
},
|
2100 |
+
"shadow": false,
|
2101 |
+
"topLevel": true,
|
2102 |
+
"x": 902,
|
2103 |
+
"y": 527
|
2104 |
+
},
|
2105 |
+
"looks_cleargraphiceffects": {
|
2106 |
+
"opcode": "looks_cleargraphiceffects",
|
2107 |
+
"next": null,
|
2108 |
+
"parent": null,
|
2109 |
+
"inputs": {},
|
2110 |
+
"fields": {},
|
2111 |
+
"shadow": false,
|
2112 |
+
"topLevel": true,
|
2113 |
+
"x": 902,
|
2114 |
+
"y": 638
|
2115 |
+
},
|
2116 |
+
"looks_show": {
|
2117 |
+
"opcode": "looks_show",
|
2118 |
+
"next": null,
|
2119 |
+
"parent": null,
|
2120 |
+
"inputs": {},
|
2121 |
+
"fields": {},
|
2122 |
+
"shadow": false,
|
2123 |
+
"topLevel": true,
|
2124 |
+
"x": 908,
|
2125 |
+
"y": 758
|
2126 |
+
},
|
2127 |
+
"looks_hide": {
|
2128 |
+
"opcode": "looks_hide",
|
2129 |
+
"next": null,
|
2130 |
+
"parent": null,
|
2131 |
+
"inputs": {},
|
2132 |
+
"fields": {},
|
2133 |
+
"shadow": false,
|
2134 |
+
"topLevel": true,
|
2135 |
+
"x": 455,
|
2136 |
+
"y": 861
|
2137 |
+
},
|
2138 |
+
"looks_gotofrontback": {
|
2139 |
+
"opcode": "looks_gotofrontback",
|
2140 |
+
"next": null,
|
2141 |
+
"parent": null,
|
2142 |
+
"inputs": {},
|
2143 |
+
"fields": {
|
2144 |
+
"FRONT_BACK": [
|
2145 |
+
"front",
|
2146 |
+
null
|
2147 |
+
]
|
2148 |
+
},
|
2149 |
+
"shadow": false,
|
2150 |
+
"topLevel": true,
|
2151 |
+
"x": 853,
|
2152 |
+
"y": 878
|
2153 |
+
},
|
2154 |
+
"looks_goforwardbackwardlayers": {
|
2155 |
+
"opcode": "looks_goforwardbackwardlayers",
|
2156 |
+
"next": null,
|
2157 |
+
"parent": null,
|
2158 |
+
"inputs": {
|
2159 |
+
"NUM": [
|
2160 |
+
1,
|
2161 |
+
[
|
2162 |
+
7,
|
2163 |
+
"1"
|
2164 |
+
]
|
2165 |
+
]
|
2166 |
+
},
|
2167 |
+
"fields": {
|
2168 |
+
"FORWARD_BACKWARD": [
|
2169 |
+
"forward",
|
2170 |
+
null
|
2171 |
+
]
|
2172 |
+
},
|
2173 |
+
"shadow": false,
|
2174 |
+
"topLevel": true,
|
2175 |
+
"x": 851,
|
2176 |
+
"y": 999
|
2177 |
+
},
|
2178 |
+
"looks_costumenumbername": {
|
2179 |
+
"opcode": "looks_costumenumbername",
|
2180 |
+
"next": null,
|
2181 |
+
"parent": null,
|
2182 |
+
"inputs": {},
|
2183 |
+
"fields": {
|
2184 |
+
"NUMBER_NAME": [
|
2185 |
+
"number",
|
2186 |
+
null
|
2187 |
+
]
|
2188 |
+
},
|
2189 |
+
"shadow": false,
|
2190 |
+
"topLevel": true,
|
2191 |
+
"x": 458,
|
2192 |
+
"y": 1007
|
2193 |
+
},
|
2194 |
+
"looks_backdropnumbername": {
|
2195 |
+
"opcode": "looks_backdropnumbername",
|
2196 |
+
"next": null,
|
2197 |
+
"parent": null,
|
2198 |
+
"inputs": {},
|
2199 |
+
"fields": {
|
2200 |
+
"NUMBER_NAME": [
|
2201 |
+
"number",
|
2202 |
+
null
|
2203 |
+
]
|
2204 |
+
},
|
2205 |
+
"shadow": false,
|
2206 |
+
"topLevel": true,
|
2207 |
+
"x": 1242,
|
2208 |
+
"y": 753
|
2209 |
+
},
|
2210 |
+
"looks_size": {
|
2211 |
+
"opcode": "looks_size",
|
2212 |
+
"next": null,
|
2213 |
+
"parent": null,
|
2214 |
+
"inputs": {},
|
2215 |
+
"fields": {},
|
2216 |
+
"shadow": false,
|
2217 |
+
"topLevel": true,
|
2218 |
+
"x": 1249,
|
2219 |
+
"y": 876
|
2220 |
+
}
|
2221 |
+
}
|
blocks/boolean_blocks.json
ADDED
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"block_category": "Boolean Blocks",
|
3 |
+
"description": "Boolean blocks are hexagonal in shape. They represent conditions that evaluate to either 'true' or 'false' and are typically used as inputs for control flow blocks.",
|
4 |
+
"blocks": [
|
5 |
+
{
|
6 |
+
"block_name": "<() < ()>",
|
7 |
+
"block_type": "operator",
|
8 |
+
"op_code": "operator_lt",
|
9 |
+
"block_shape": "Boolean Block",
|
10 |
+
"functionality": "Checks if the first value is less than the second.",
|
11 |
+
"inputs": [
|
12 |
+
{"name": "OPERAND1", "type": "any"},
|
13 |
+
{"name": "OPERAND2", "type": "any"}
|
14 |
+
],
|
15 |
+
"example_standalone": "<(score) < (10)>",
|
16 |
+
"example_with_other_blocks": [
|
17 |
+
{
|
18 |
+
"script": "if <(score) < (10)> then\n say [Keep trying!] \nend",
|
19 |
+
"explanation": "This script causes the sprite to say 'Keep trying!' if the 'score' variable is less than 10."
|
20 |
+
}
|
21 |
+
]
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"block_name": "<() = ()>",
|
25 |
+
"block_type": "operator",
|
26 |
+
"op_code": "operator_equals",
|
27 |
+
"block_shape": "Boolean Block",
|
28 |
+
"functionality": "Checks if two values are equal.",
|
29 |
+
"inputs": [
|
30 |
+
{"name": "OPERAND1", "type": "any"},
|
31 |
+
{"name": "OPERAND2", "type": "any"}
|
32 |
+
],
|
33 |
+
"example_standalone": "<(answer) = (5)>",
|
34 |
+
"example_with_other_blocks": [
|
35 |
+
{
|
36 |
+
"script": "if <(answer) = (5)> then\n say [Correct!] \nend",
|
37 |
+
"explanation": "This script makes the sprite say 'Correct!' if the value of the 'answer' variable is exactly 5."
|
38 |
+
}
|
39 |
+
]
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"block_name": "<() > ()>",
|
43 |
+
"block_type": "operator",
|
44 |
+
"op_code": "operator_gt",
|
45 |
+
"block_shape": "Boolean Block",
|
46 |
+
"functionality": "Checks if the first value is greater than the second.",
|
47 |
+
"inputs": [
|
48 |
+
{"name": "OPERAND1", "type": "any"},
|
49 |
+
{"name": "OPERAND2", "type": "any"}
|
50 |
+
],
|
51 |
+
"example_standalone": "<([health v]) > (0)>",
|
52 |
+
"example_with_other_blocks": [
|
53 |
+
{
|
54 |
+
"script": "if <([health v]) > (0)> then\n move (10) steps\nelse\n stop [all v]\nend",
|
55 |
+
"explanation": "This script moves the sprite if its 'health' is greater than 0; otherwise, it stops all scripts."
|
56 |
+
}
|
57 |
+
]
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"block_name": "<<> and <>>",
|
61 |
+
"block_type": "operator",
|
62 |
+
"op_code": "operator_and",
|
63 |
+
"block_shape": "Boolean Block",
|
64 |
+
"functionality": "Returns 'true' if both provided Boolean conditions are 'true'.",
|
65 |
+
"inputs": [
|
66 |
+
{"name": "OPERAND1", "type": "boolean"},
|
67 |
+
{"name": "OPERAND2", "type": "boolean"}
|
68 |
+
],
|
69 |
+
"example_standalone": "<<mouse down?> and <touching [mouse-pointer]?> >",
|
70 |
+
"example_with_other_blocks": [
|
71 |
+
{
|
72 |
+
"script": "if <<mouse down?> and <touching [mouse-pointer]?> > then\n say [You're clicking me!]\nend",
|
73 |
+
"explanation": "This script makes the sprite say 'You're clicking me!' only if the mouse button is pressed AND the mouse pointer is touching the sprite."
|
74 |
+
}
|
75 |
+
]
|
76 |
+
},
|
77 |
+
{
|
78 |
+
"block_name": "<<> or <>>",
|
79 |
+
"block_type": "operator",
|
80 |
+
"op_code": "operator_or",
|
81 |
+
"block_shape": "Boolean Block",
|
82 |
+
"functionality": "Returns 'true' if at least one of the provided Boolean conditions is 'true'.",
|
83 |
+
"inputs": [
|
84 |
+
{"name": "OPERAND1", "type": "boolean"},
|
85 |
+
{"name": "OPERAND2", "type": "boolean"}
|
86 |
+
],
|
87 |
+
"example_standalone": "<<key [left arrow v] pressed?> or <key [a v] pressed?>>",
|
88 |
+
"example_with_other_blocks": [
|
89 |
+
{
|
90 |
+
"script": "if <<key [left arrow v] pressed?> or <key [a v] pressed?>> then\n change x by (-10)\nend",
|
91 |
+
"explanation": "This script moves the sprite left if either the left arrow key OR the 'a' key is pressed."
|
92 |
+
}
|
93 |
+
]
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"block_name": "<not <>>",
|
97 |
+
"block_type": "operator",
|
98 |
+
"op_code": "operator_not",
|
99 |
+
"block_shape": "Boolean Block",
|
100 |
+
"functionality": "Returns 'true' if the provided Boolean condition is 'false', and 'false' if it is 'true'.",
|
101 |
+
"inputs": [
|
102 |
+
{"name": "OPERAND", "type": "boolean"}
|
103 |
+
],
|
104 |
+
"example_standalone": "<not <mouse down?>>",
|
105 |
+
"example_with_other_blocks": [
|
106 |
+
{
|
107 |
+
"script": "if <not <touching [Sprite2 v]?>> then\n say [I'm safe!]\nend",
|
108 |
+
"explanation": "This script makes the sprite say 'I'm safe!' if it is NOT touching 'Sprite2'."
|
109 |
+
}
|
110 |
+
]
|
111 |
+
},
|
112 |
+
{
|
113 |
+
"block_name": "<() contains ()?>",
|
114 |
+
"block_type": "operator",
|
115 |
+
"op_code": "operator_contains",
|
116 |
+
"block_shape": "Boolean Block",
|
117 |
+
"functionality": "Checks if one string contains another string.",
|
118 |
+
"inputs": [
|
119 |
+
{"name": "STRING1", "type": "string"},
|
120 |
+
{"name": "STRING2", "type": "string"}
|
121 |
+
],
|
122 |
+
"example_standalone": "<[apple v] contains [a v]?>",
|
123 |
+
"example_with_other_blocks": [
|
124 |
+
{
|
125 |
+
"script": "if <[answer] contains [yes]?> then\n say [Great!]\nend",
|
126 |
+
"explanation": "This script makes the sprite say 'Great!' if the 'answer' variable contains the substring 'yes'."
|
127 |
+
}
|
128 |
+
]
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"block_name": "<touching [edge v]?>",
|
132 |
+
"block_type": "Sensing",
|
133 |
+
"op_code": "sensing_touchingobject",
|
134 |
+
"block_shape": "Boolean Block",
|
135 |
+
"functionality": "Checks if its sprite is touching the mouse-pointer, edge, or another specified sprite.",
|
136 |
+
"inputs": [
|
137 |
+
{"name": "TOUCHINGOBJECTMENU", "type": "dropdown", "options": ["mouse-pointer", "edge", "Sprite1", "..." ]}
|
138 |
+
],
|
139 |
+
"example_standalone": "<touching [edge v]?>",
|
140 |
+
"example_with_other_blocks": [
|
141 |
+
{
|
142 |
+
"script": "if <touching [Sprite v]?> then\n broadcast [Game Over v] \nend",
|
143 |
+
"explanation": "This script makes the broadcast message 'Game Over' in script if it comes into contact with the sprite."
|
144 |
+
},
|
145 |
+
{
|
146 |
+
"script": "if <touching [edge v]?> then\n bounce off edge\nend",
|
147 |
+
"explanation": "This script makes the sprite reverse direction if it comes into contact with the edge of the stage."
|
148 |
+
}
|
149 |
+
]
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"block_name": "<touching color ()?>",
|
153 |
+
"block_type": "Sensing",
|
154 |
+
"op_code": "sensing_touchingcolor",
|
155 |
+
"block_shape": "Boolean Block",
|
156 |
+
"functionality": "Checks whether its sprite is touching a specified color.",
|
157 |
+
"inputs": [
|
158 |
+
{"name": "COLOR", "type": "color"}
|
159 |
+
],
|
160 |
+
"example_standalone": "<touching color [#FF0000]?>",
|
161 |
+
"example_with_other_blocks": [
|
162 |
+
{
|
163 |
+
"script": "if <touching color [#FF0000]?> then\n change [health v] by (-1)\nend",
|
164 |
+
"explanation": "This script decreases the 'health' variable by 1 if the sprite touches any red color on the stage."
|
165 |
+
}
|
166 |
+
]
|
167 |
+
},
|
168 |
+
{
|
169 |
+
"block_name": "<color () is touching ()?>",
|
170 |
+
"block_type": "Sensing",
|
171 |
+
"op_code": "sensing_coloristouchingcolor",
|
172 |
+
"block_shape": "Boolean Block",
|
173 |
+
"functionality": "Checks whether a specific color on its sprite is touching another specified color on the stage or another sprite.",
|
174 |
+
"inputs": [
|
175 |
+
{"name": "COLOR1", "type": "color"},
|
176 |
+
{"name": "COLOR2", "type": "color"}
|
177 |
+
],
|
178 |
+
"example_standalone": "<color [#00FF00] is touching [#FF0000]?>",
|
179 |
+
"example_with_other_blocks": [
|
180 |
+
{
|
181 |
+
"script": "if <color [#00FF00] is touching [#FF0000]?> then\n say [Collision!]\nend",
|
182 |
+
"explanation": "This script makes the sprite say 'Collision!' if a green part of the sprite touches a red color elsewhere in the project."
|
183 |
+
}
|
184 |
+
]
|
185 |
+
},
|
186 |
+
{
|
187 |
+
"block_name": "<key () pressed?>",
|
188 |
+
"block_type": "Sensing",
|
189 |
+
"op_code": "sensing_keypressed",
|
190 |
+
"block_shape": "Boolean Block",
|
191 |
+
"functionality": "Checks if a specified keyboard key is currently being pressed.",
|
192 |
+
"inputs": [
|
193 |
+
{"name": "KEY_OPTION", "type": "dropdown",
|
194 |
+
"options": [
|
195 |
+
"space",
|
196 |
+
"up arrow",
|
197 |
+
"down arrow",
|
198 |
+
"right arrow",
|
199 |
+
"left arrow",
|
200 |
+
"any",
|
201 |
+
"a",
|
202 |
+
"b",
|
203 |
+
"c",
|
204 |
+
"d",
|
205 |
+
"e",
|
206 |
+
"f",
|
207 |
+
"g",
|
208 |
+
"h",
|
209 |
+
"i",
|
210 |
+
"j",
|
211 |
+
"k",
|
212 |
+
"l",
|
213 |
+
"m",
|
214 |
+
"n",
|
215 |
+
"o",
|
216 |
+
"p",
|
217 |
+
"q",
|
218 |
+
"r",
|
219 |
+
"s",
|
220 |
+
"t",
|
221 |
+
"u",
|
222 |
+
"v",
|
223 |
+
"w",
|
224 |
+
"x",
|
225 |
+
"y",
|
226 |
+
"z",
|
227 |
+
"0",
|
228 |
+
"1",
|
229 |
+
"2",
|
230 |
+
"3",
|
231 |
+
"4",
|
232 |
+
"5",
|
233 |
+
"6",
|
234 |
+
"7",
|
235 |
+
"8",
|
236 |
+
"9"
|
237 |
+
]}
|
238 |
+
],
|
239 |
+
"example_standalone": "<key [space v] pressed?>",
|
240 |
+
"example_with_other_blocks": [
|
241 |
+
{
|
242 |
+
"script": "forever\n if <key [space v] pressed?> then\n broadcast [shoot v]\n end\nend",
|
243 |
+
"explanation": "This script continuously checks if the space key is pressed and, if so, sends a 'shoot' broadcast."
|
244 |
+
}
|
245 |
+
]
|
246 |
+
},
|
247 |
+
{
|
248 |
+
"block_name": "<mouse down?>",
|
249 |
+
"block_type": "Sensing",
|
250 |
+
"op_code": "sensing_mousedown",
|
251 |
+
"block_shape": "Boolean Block",
|
252 |
+
"functionality": "Checks if the computer mouse's primary button is being clicked while the cursor is over the stage.",
|
253 |
+
"inputs": null,
|
254 |
+
"example_standalone": "<mouse down?>",
|
255 |
+
"example_with_other_blocks": [
|
256 |
+
{
|
257 |
+
"script": "if <mouse down?> then\n go to mouse-pointer\nend",
|
258 |
+
"explanation": "This script makes the sprite follow the mouse pointer only when the mouse button is held down."
|
259 |
+
}
|
260 |
+
]
|
261 |
+
},
|
262 |
+
{
|
263 |
+
"block_name": "<[my list v] contains ()?>",
|
264 |
+
"block_type": "Data",
|
265 |
+
"op_code": "data_listcontainsitem",
|
266 |
+
"block_shape": "Boolean Block",
|
267 |
+
"functionality": "Checks if a list includes a specific item.",
|
268 |
+
"inputs": [
|
269 |
+
{"name": "LIST", "type": "dropdown"},
|
270 |
+
{"name": "ITEM", "type": "any"}
|
271 |
+
],
|
272 |
+
"example_standalone": "<[inventory v] contains [key]?>",
|
273 |
+
"example_with_other_blocks": [
|
274 |
+
{
|
275 |
+
"script": "if <[inventory v] contains [key]?> then\n say [You have the key!]\nend",
|
276 |
+
"explanation": "This script makes the sprite say 'You have the key!' if the 'inventory' list contains the item 'key'."
|
277 |
+
}
|
278 |
+
]
|
279 |
+
}
|
280 |
+
]
|
281 |
+
}
|
blocks/c_blocks.json
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"block_category": "C Blocks",
|
3 |
+
"description": "C blocks are shaped like the letter 'C'. They are used to loop or conditionally execute blocks that are placed within their opening, managing the flow of scripts.",
|
4 |
+
"blocks": [
|
5 |
+
{
|
6 |
+
"block_name": "repeat ()",
|
7 |
+
"block_type": "Control",
|
8 |
+
"block_shape": "C-Block",
|
9 |
+
"op_code": "control_repeat",
|
10 |
+
"functionality": "Repeats the blocks inside it a specified number of times.",
|
11 |
+
"inputs": [
|
12 |
+
{
|
13 |
+
"name": "times",
|
14 |
+
"type": "number"
|
15 |
+
}
|
16 |
+
],
|
17 |
+
"example_standalone": "repeat (10)",
|
18 |
+
"example_with_other_blocks": [
|
19 |
+
{
|
20 |
+
"script": "when [space v] key pressed\n repeat (10)\n move (10) steps\n wait (0.1) seconds\n end",
|
21 |
+
"explanation": "This script makes the sprite move 10 steps Ten times, with a short pause after each movement on spacebar pressed."
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"script": "when [up arrow v] key pressed\n repeat (10)\n change y by (10)\n wait (0.1) seconds\n change y by (10)\n end",
|
25 |
+
"explanation": "This script makes the sprite jump, with a short pause after each movement on up arrow pressed."
|
26 |
+
}
|
27 |
+
]
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"block_name": "forever",
|
31 |
+
"block_type": "Control",
|
32 |
+
"block_shape": "C-Block",
|
33 |
+
"op_code": "control_forever",
|
34 |
+
"functionality": "Continuously runs the blocks inside it.",
|
35 |
+
"inputs": null,
|
36 |
+
"example_standalone": "forever",
|
37 |
+
"example_with_other_blocks": [
|
38 |
+
{
|
39 |
+
"script": "when green flag clicked\n forever\n move (5) steps\n if on edge, bounce\n end",
|
40 |
+
"explanation": "This script makes the sprite move endlessly and bounce off the edges of the stage, creating continuous motion."
|
41 |
+
}
|
42 |
+
]
|
43 |
+
},
|
44 |
+
{
|
45 |
+
"block_name": "if <> then",
|
46 |
+
"block_type": "Control",
|
47 |
+
"block_shape": "C-Block",
|
48 |
+
"op_code": "control_if",
|
49 |
+
"functionality": "Executes the blocks inside it only if the specified boolean condition is true. [NOTE: it takes boolean blocks as input]",
|
50 |
+
"inputs": [
|
51 |
+
{
|
52 |
+
"name": "condition",
|
53 |
+
"type": "boolean"
|
54 |
+
}
|
55 |
+
],
|
56 |
+
"example_standalone": "if <touching [mouse-pointer v]?> then",
|
57 |
+
"example_with_other_blocks": [
|
58 |
+
{
|
59 |
+
"script": "forever\n if <touching [color (red) v]?> then\n stop [this script v]\n end",
|
60 |
+
"explanation": "This script continuously checks if the sprite is touching a red color, and if so, it stops the current script."
|
61 |
+
}
|
62 |
+
]
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"block_name": "if <> then else",
|
66 |
+
"block_type": "Control",
|
67 |
+
"block_shape": "C-Block",
|
68 |
+
"op_code": "control_if_else",
|
69 |
+
"functionality": "Executes one set of blocks if the specified boolean condition is true, and a different set of blocks if the condition is false. [NOTE: it takes boolean blocks as input]",
|
70 |
+
"inputs": [
|
71 |
+
{
|
72 |
+
"name": "condition",
|
73 |
+
"type": "boolean"
|
74 |
+
}
|
75 |
+
],
|
76 |
+
"example_standalone": "if <score > (10)> then else",
|
77 |
+
"example_with_other_blocks": [
|
78 |
+
{
|
79 |
+
"script": "if <(score) > (10)> then\n say [You win!] for (2) seconds\nelse\n say [Keep trying!] for (2) seconds\nend",
|
80 |
+
"explanation": "This script checks the 'score'. If the score is greater than 10, it says 'You win!'; otherwise, it says 'Keep trying!'."
|
81 |
+
}
|
82 |
+
]
|
83 |
+
},
|
84 |
+
{
|
85 |
+
"block_name": "repeat until <>",
|
86 |
+
"block_type": "Control",
|
87 |
+
"block_shape": "C-Block",
|
88 |
+
"op_code": "control_repeat_until",
|
89 |
+
"functionality": "Repeats the blocks inside it until the specified boolean condition becomes true. [NOTE: it takes boolean blocks as input]",
|
90 |
+
"inputs": [
|
91 |
+
{
|
92 |
+
"name": "condition",
|
93 |
+
"type": "boolean"
|
94 |
+
}
|
95 |
+
],
|
96 |
+
"example_standalone": "repeat until <touching [edge v]?>",
|
97 |
+
"example_with_other_blocks": [
|
98 |
+
{
|
99 |
+
"script": "repeat until <touching [edge v]?>\n move (5) steps\nend",
|
100 |
+
"explanation": "This script makes the sprite move 5 steps repeatedly until it touches the edge of the stage."
|
101 |
+
}
|
102 |
+
]
|
103 |
+
}
|
104 |
+
]
|
105 |
+
}
|
blocks/cap_blocks.json
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"block_category": "Cap Blocks",
|
3 |
+
"description": "Cap blocks have a notch at the top and a flat bottom. They signify the end of a script, preventing any further blocks from being placed below them, and are used to terminate scripts or specific actions.",
|
4 |
+
"blocks": [
|
5 |
+
{
|
6 |
+
"block_name": "stop [v]",
|
7 |
+
"block_type": "Control",
|
8 |
+
"block_shape": "Cap Block (dynamic: can be Stack)",
|
9 |
+
"op_code": "control_stop",
|
10 |
+
"functionality": "Halts all scripts, only the current script, or other scripts within the same sprite. Its shape can dynamically change based on the selected option.",
|
11 |
+
"inputs": [
|
12 |
+
{"name": "option", "type": "dropdown", "options": ["all"]}
|
13 |
+
],
|
14 |
+
"example_standalone": "stop [all v]",
|
15 |
+
"example_with_other_blocks": [
|
16 |
+
{
|
17 |
+
"script": "if <(health) = (0)> then\n stop [all v]\nend",
|
18 |
+
"explanation": "This script stops all running scripts in the project if the 'health' variable reaches 0, typically signifying a game over condition. [9, 15]"
|
19 |
+
}
|
20 |
+
]
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"block_name": "delete this clone",
|
24 |
+
"block_type": "Control",
|
25 |
+
"block_shape": "Cap Block",
|
26 |
+
"op_code": "control_delete_this_clone",
|
27 |
+
"functionality": "Removes the clone that is executing it from the stage.",
|
28 |
+
"inputs":null,
|
29 |
+
"example_standalone": "delete this clone",
|
30 |
+
"example_with_other_blocks": [
|
31 |
+
{
|
32 |
+
"script": "when I start as a clone\n wait until <touching [edge v]?>\n delete this clone\nend",
|
33 |
+
"explanation": "This script, run by a clone, causes the clone to disappear from the stage once it touches the edge. [1]"
|
34 |
+
}
|
35 |
+
]
|
36 |
+
},
|
37 |
+
{
|
38 |
+
"block_name": "forever",
|
39 |
+
"block_type": "Control",
|
40 |
+
"block_shape": "Cap Block",
|
41 |
+
"op_code": "control_forever",
|
42 |
+
"functionality": "Continuously runs the blocks inside it.",
|
43 |
+
"inputs": null,
|
44 |
+
"example_standalone": "forever",
|
45 |
+
"example_with_other_blocks": [
|
46 |
+
{
|
47 |
+
"script": "when green flag clicked\n forever\n move (5) steps\n if on edge, bounce\n end",
|
48 |
+
"explanation": "This script makes the sprite move endlessly and bounce off the edges of the stage, creating continuous motion."
|
49 |
+
}
|
50 |
+
]
|
51 |
+
}
|
52 |
+
]
|
53 |
+
}
|
blocks/classwise_blocks/control_block.json
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"control_wait": {
|
3 |
+
"opcode": "control_wait",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {
|
7 |
+
"DURATION": [
|
8 |
+
1,
|
9 |
+
[
|
10 |
+
5,
|
11 |
+
"1"
|
12 |
+
]
|
13 |
+
]
|
14 |
+
},
|
15 |
+
"fields": {},
|
16 |
+
"shadow": false,
|
17 |
+
"topLevel": true,
|
18 |
+
"x": 337,
|
19 |
+
"y": 129
|
20 |
+
},
|
21 |
+
"control_repeat": {
|
22 |
+
"opcode": "control_repeat",
|
23 |
+
"next": null,
|
24 |
+
"parent": null,
|
25 |
+
"inputs": {
|
26 |
+
"TIMES": [
|
27 |
+
1,
|
28 |
+
[
|
29 |
+
6,
|
30 |
+
"10"
|
31 |
+
]
|
32 |
+
]
|
33 |
+
},
|
34 |
+
"fields": {},
|
35 |
+
"shadow": false,
|
36 |
+
"topLevel": true,
|
37 |
+
"x": 348,
|
38 |
+
"y": 265
|
39 |
+
},
|
40 |
+
"control_forever": {
|
41 |
+
"opcode": "control_forever",
|
42 |
+
"next": null,
|
43 |
+
"parent": null,
|
44 |
+
"inputs": {},
|
45 |
+
"fields": {},
|
46 |
+
"shadow": false,
|
47 |
+
"topLevel": true,
|
48 |
+
"x": 334,
|
49 |
+
"y": 439
|
50 |
+
},
|
51 |
+
"control_if": {
|
52 |
+
"opcode": "control_if",
|
53 |
+
"next": null,
|
54 |
+
"parent": null,
|
55 |
+
"inputs": {},
|
56 |
+
"fields": {},
|
57 |
+
"shadow": false,
|
58 |
+
"topLevel": true,
|
59 |
+
"x": 331,
|
60 |
+
"y": 597
|
61 |
+
},
|
62 |
+
"control_if_else": {
|
63 |
+
"opcode": "control_if_else",
|
64 |
+
"next": null,
|
65 |
+
"parent": null,
|
66 |
+
"inputs": {},
|
67 |
+
"fields": {},
|
68 |
+
"shadow": false,
|
69 |
+
"topLevel": true,
|
70 |
+
"x": 335,
|
71 |
+
"y": 779
|
72 |
+
},
|
73 |
+
"control_wait_until": {
|
74 |
+
"opcode": "control_wait_until",
|
75 |
+
"next": null,
|
76 |
+
"parent": null,
|
77 |
+
"inputs": {},
|
78 |
+
"fields": {},
|
79 |
+
"shadow": false,
|
80 |
+
"topLevel": true,
|
81 |
+
"x": 676,
|
82 |
+
"y": 285
|
83 |
+
},
|
84 |
+
"control_repeat_until": {
|
85 |
+
"opcode": "control_repeat_until",
|
86 |
+
"next": null,
|
87 |
+
"parent": null,
|
88 |
+
"inputs": {},
|
89 |
+
"fields": {},
|
90 |
+
"shadow": false,
|
91 |
+
"topLevel": true,
|
92 |
+
"x": 692,
|
93 |
+
"y": 381
|
94 |
+
},
|
95 |
+
"control_stop": {
|
96 |
+
"opcode": "control_stop",
|
97 |
+
"next": null,
|
98 |
+
"parent": null,
|
99 |
+
"inputs": {},
|
100 |
+
"fields": {
|
101 |
+
"STOP_OPTION": [
|
102 |
+
"all",
|
103 |
+
null
|
104 |
+
]
|
105 |
+
},
|
106 |
+
"shadow": false,
|
107 |
+
"topLevel": true,
|
108 |
+
"x": 708,
|
109 |
+
"y": 545,
|
110 |
+
"mutation": {
|
111 |
+
"tagName": "mutation",
|
112 |
+
"children": [],
|
113 |
+
"hasnext": "false"
|
114 |
+
}
|
115 |
+
},
|
116 |
+
"control_start_as_clone": {
|
117 |
+
"opcode": "control_start_as_clone",
|
118 |
+
"next": null,
|
119 |
+
"parent": null,
|
120 |
+
"inputs": {},
|
121 |
+
"fields": {},
|
122 |
+
"shadow": false,
|
123 |
+
"topLevel": true,
|
124 |
+
"x": 665,
|
125 |
+
"y": 672
|
126 |
+
},
|
127 |
+
"control_create_clone_of": {
|
128 |
+
"opcode": "control_create_clone_of",
|
129 |
+
"next": null,
|
130 |
+
"parent": null,
|
131 |
+
"inputs": {
|
132 |
+
"CLONE_OPTION": [
|
133 |
+
1,
|
134 |
+
"control_create_clone_of_menu"
|
135 |
+
]
|
136 |
+
},
|
137 |
+
"fields": {},
|
138 |
+
"shadow": false,
|
139 |
+
"topLevel": true,
|
140 |
+
"x": 648,
|
141 |
+
"y": 797
|
142 |
+
},
|
143 |
+
"control_create_clone_of_menu": {
|
144 |
+
"opcode": "control_create_clone_of_menu",
|
145 |
+
"next": null,
|
146 |
+
"parent": "control_create_clone_of",
|
147 |
+
"inputs": {},
|
148 |
+
"fields": {
|
149 |
+
"CLONE_OPTION": [
|
150 |
+
"_myself_",
|
151 |
+
null
|
152 |
+
]
|
153 |
+
},
|
154 |
+
"shadow": true,
|
155 |
+
"topLevel": false
|
156 |
+
},
|
157 |
+
"control_delete_this_clone": {
|
158 |
+
"opcode": "control_delete_this_clone",
|
159 |
+
"next": null,
|
160 |
+
"parent": null,
|
161 |
+
"inputs": {},
|
162 |
+
"fields": {},
|
163 |
+
"shadow": false,
|
164 |
+
"topLevel": true,
|
165 |
+
"x": 642,
|
166 |
+
"y": 914
|
167 |
+
}
|
168 |
+
}
|
blocks/classwise_blocks/data_block.json
ADDED
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"data_setvariableto": {
|
3 |
+
"opcode": "data_setvariableto",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {
|
7 |
+
"VALUE": [
|
8 |
+
1,
|
9 |
+
[
|
10 |
+
10,
|
11 |
+
"0"
|
12 |
+
]
|
13 |
+
]
|
14 |
+
},
|
15 |
+
"fields": {
|
16 |
+
"VARIABLE": [
|
17 |
+
"my variable",
|
18 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
19 |
+
]
|
20 |
+
},
|
21 |
+
"shadow": false,
|
22 |
+
"topLevel": true,
|
23 |
+
"x": 348,
|
24 |
+
"y": 241
|
25 |
+
},
|
26 |
+
"data_changevariableby": {
|
27 |
+
"opcode": "data_changevariableby",
|
28 |
+
"next": null,
|
29 |
+
"parent": null,
|
30 |
+
"inputs": {
|
31 |
+
"VALUE": [
|
32 |
+
1,
|
33 |
+
[
|
34 |
+
4,
|
35 |
+
"1"
|
36 |
+
]
|
37 |
+
]
|
38 |
+
},
|
39 |
+
"fields": {
|
40 |
+
"VARIABLE": [
|
41 |
+
"my variable",
|
42 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
43 |
+
]
|
44 |
+
},
|
45 |
+
"shadow": false,
|
46 |
+
"topLevel": true,
|
47 |
+
"x": 313,
|
48 |
+
"y": 363
|
49 |
+
},
|
50 |
+
"data_showvariable": {
|
51 |
+
"opcode": "data_showvariable",
|
52 |
+
"next": null,
|
53 |
+
"parent": null,
|
54 |
+
"inputs": {},
|
55 |
+
"fields": {
|
56 |
+
"VARIABLE": [
|
57 |
+
"my variable",
|
58 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
59 |
+
]
|
60 |
+
},
|
61 |
+
"shadow": false,
|
62 |
+
"topLevel": true,
|
63 |
+
"x": 415,
|
64 |
+
"y": 473
|
65 |
+
},
|
66 |
+
"data_hidevariable": {
|
67 |
+
"opcode": "data_hidevariable",
|
68 |
+
"next": null,
|
69 |
+
"parent": null,
|
70 |
+
"inputs": {},
|
71 |
+
"fields": {
|
72 |
+
"VARIABLE": [
|
73 |
+
"my variable",
|
74 |
+
"`jEk@4|i[#Fk?(8x)AV.-my variable"
|
75 |
+
]
|
76 |
+
},
|
77 |
+
"shadow": false,
|
78 |
+
"topLevel": true,
|
79 |
+
"x": 319,
|
80 |
+
"y": 587
|
81 |
+
},
|
82 |
+
"data_addtolist": {
|
83 |
+
"opcode": "data_addtolist",
|
84 |
+
"next": null,
|
85 |
+
"parent": null,
|
86 |
+
"inputs": {
|
87 |
+
"ITEM": [
|
88 |
+
1,
|
89 |
+
[
|
90 |
+
10,
|
91 |
+
"thing"
|
92 |
+
]
|
93 |
+
]
|
94 |
+
},
|
95 |
+
"fields": {
|
96 |
+
"LIST": [
|
97 |
+
"MY_LIST",
|
98 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
99 |
+
]
|
100 |
+
},
|
101 |
+
"shadow": false,
|
102 |
+
"topLevel": true,
|
103 |
+
"x": 385,
|
104 |
+
"y": 109
|
105 |
+
},
|
106 |
+
"data_deleteoflist": {
|
107 |
+
"opcode": "data_deleteoflist",
|
108 |
+
"next": null,
|
109 |
+
"parent": null,
|
110 |
+
"inputs": {
|
111 |
+
"INDEX": [
|
112 |
+
1,
|
113 |
+
[
|
114 |
+
7,
|
115 |
+
"1"
|
116 |
+
]
|
117 |
+
]
|
118 |
+
},
|
119 |
+
"fields": {
|
120 |
+
"LIST": [
|
121 |
+
"MY_LIST",
|
122 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
123 |
+
]
|
124 |
+
},
|
125 |
+
"shadow": false,
|
126 |
+
"topLevel": true,
|
127 |
+
"x": 384,
|
128 |
+
"y": 244
|
129 |
+
},
|
130 |
+
"data_deletealloflist": {
|
131 |
+
"opcode": "data_deletealloflist",
|
132 |
+
"next": null,
|
133 |
+
"parent": null,
|
134 |
+
"inputs": {},
|
135 |
+
"fields": {
|
136 |
+
"LIST": [
|
137 |
+
"MY_LIST",
|
138 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
139 |
+
]
|
140 |
+
},
|
141 |
+
"shadow": false,
|
142 |
+
"topLevel": true,
|
143 |
+
"x": 387,
|
144 |
+
"y": 374
|
145 |
+
},
|
146 |
+
"data_insertatlist": {
|
147 |
+
"opcode": "data_insertatlist",
|
148 |
+
"next": null,
|
149 |
+
"parent": null,
|
150 |
+
"inputs": {
|
151 |
+
"ITEM": [
|
152 |
+
1,
|
153 |
+
[
|
154 |
+
10,
|
155 |
+
"thing"
|
156 |
+
]
|
157 |
+
],
|
158 |
+
"INDEX": [
|
159 |
+
1,
|
160 |
+
[
|
161 |
+
7,
|
162 |
+
"1"
|
163 |
+
]
|
164 |
+
]
|
165 |
+
},
|
166 |
+
"fields": {
|
167 |
+
"LIST": [
|
168 |
+
"MY_LIST",
|
169 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
170 |
+
]
|
171 |
+
},
|
172 |
+
"shadow": false,
|
173 |
+
"topLevel": true,
|
174 |
+
"x": 366,
|
175 |
+
"y": 527
|
176 |
+
},
|
177 |
+
"data_replaceitemoflist": {
|
178 |
+
"opcode": "data_replaceitemoflist",
|
179 |
+
"next": null,
|
180 |
+
"parent": null,
|
181 |
+
"inputs": {
|
182 |
+
"INDEX": [
|
183 |
+
1,
|
184 |
+
[
|
185 |
+
7,
|
186 |
+
"1"
|
187 |
+
]
|
188 |
+
],
|
189 |
+
"ITEM": [
|
190 |
+
1,
|
191 |
+
[
|
192 |
+
10,
|
193 |
+
"thing"
|
194 |
+
]
|
195 |
+
]
|
196 |
+
},
|
197 |
+
"fields": {
|
198 |
+
"LIST": [
|
199 |
+
"MY_LIST",
|
200 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
201 |
+
]
|
202 |
+
},
|
203 |
+
"shadow": false,
|
204 |
+
"topLevel": true,
|
205 |
+
"x": 365,
|
206 |
+
"y": 657
|
207 |
+
},
|
208 |
+
"data_itemoflist": {
|
209 |
+
"opcode": "data_itemoflist",
|
210 |
+
"next": null,
|
211 |
+
"parent": null,
|
212 |
+
"inputs": {
|
213 |
+
"INDEX": [
|
214 |
+
1,
|
215 |
+
[
|
216 |
+
7,
|
217 |
+
"1"
|
218 |
+
]
|
219 |
+
]
|
220 |
+
},
|
221 |
+
"fields": {
|
222 |
+
"LIST": [
|
223 |
+
"MY_LIST",
|
224 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
225 |
+
]
|
226 |
+
},
|
227 |
+
"shadow": false,
|
228 |
+
"topLevel": true,
|
229 |
+
"x": 862,
|
230 |
+
"y": 117
|
231 |
+
},
|
232 |
+
"data_itemnumoflist": {
|
233 |
+
"opcode": "data_itemnumoflist",
|
234 |
+
"next": null,
|
235 |
+
"parent": null,
|
236 |
+
"inputs": {
|
237 |
+
"ITEM": [
|
238 |
+
1,
|
239 |
+
[
|
240 |
+
10,
|
241 |
+
"thing"
|
242 |
+
]
|
243 |
+
]
|
244 |
+
},
|
245 |
+
"fields": {
|
246 |
+
"LIST": [
|
247 |
+
"MY_LIST",
|
248 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
249 |
+
]
|
250 |
+
},
|
251 |
+
"shadow": false,
|
252 |
+
"topLevel": true,
|
253 |
+
"x": 883,
|
254 |
+
"y": 238
|
255 |
+
},
|
256 |
+
"data_lengthoflist": {
|
257 |
+
"opcode": "data_lengthoflist",
|
258 |
+
"next": null,
|
259 |
+
"parent": null,
|
260 |
+
"inputs": {},
|
261 |
+
"fields": {
|
262 |
+
"LIST": [
|
263 |
+
"MY_LIST",
|
264 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
265 |
+
]
|
266 |
+
},
|
267 |
+
"shadow": false,
|
268 |
+
"topLevel": true,
|
269 |
+
"x": 876,
|
270 |
+
"y": 342
|
271 |
+
},
|
272 |
+
"data_listcontainsitem": {
|
273 |
+
"opcode": "data_listcontainsitem",
|
274 |
+
"next": null,
|
275 |
+
"parent": null,
|
276 |
+
"inputs": {
|
277 |
+
"ITEM": [
|
278 |
+
1,
|
279 |
+
[
|
280 |
+
10,
|
281 |
+
"thing"
|
282 |
+
]
|
283 |
+
]
|
284 |
+
},
|
285 |
+
"fields": {
|
286 |
+
"LIST": [
|
287 |
+
"MY_LIST",
|
288 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
289 |
+
]
|
290 |
+
},
|
291 |
+
"shadow": false,
|
292 |
+
"topLevel": true,
|
293 |
+
"x": 871,
|
294 |
+
"y": 463
|
295 |
+
},
|
296 |
+
"data_showlist": {
|
297 |
+
"opcode": "data_showlist",
|
298 |
+
"next": null,
|
299 |
+
"parent": null,
|
300 |
+
"inputs": {},
|
301 |
+
"fields": {
|
302 |
+
"LIST": [
|
303 |
+
"MY_LIST",
|
304 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
305 |
+
]
|
306 |
+
},
|
307 |
+
"shadow": false,
|
308 |
+
"topLevel": true,
|
309 |
+
"x": 931,
|
310 |
+
"y": 563
|
311 |
+
},
|
312 |
+
"data_hidelist": {
|
313 |
+
"opcode": "data_hidelist",
|
314 |
+
"next": null,
|
315 |
+
"parent": null,
|
316 |
+
"inputs": {},
|
317 |
+
"fields": {
|
318 |
+
"LIST": [
|
319 |
+
"MY_LIST",
|
320 |
+
"o6`kIhtT{xWH+rX(5d,A"
|
321 |
+
]
|
322 |
+
},
|
323 |
+
"shadow": false,
|
324 |
+
"topLevel": true,
|
325 |
+
"x": 962,
|
326 |
+
"y": 716
|
327 |
+
}
|
328 |
+
}
|
blocks/classwise_blocks/event_block.json
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"event_whenflagclicked": {
|
3 |
+
"opcode": "event_whenflagclicked",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {},
|
7 |
+
"fields": {},
|
8 |
+
"shadow": false,
|
9 |
+
"topLevel": true,
|
10 |
+
"x": 166,
|
11 |
+
"y": -422
|
12 |
+
},
|
13 |
+
"event_whenkeypressed": {
|
14 |
+
"opcode": "event_whenkeypressed",
|
15 |
+
"next": null,
|
16 |
+
"parent": null,
|
17 |
+
"inputs": {},
|
18 |
+
"fields": {
|
19 |
+
"KEY_OPTION": [
|
20 |
+
"space",
|
21 |
+
null
|
22 |
+
]
|
23 |
+
},
|
24 |
+
"shadow": false,
|
25 |
+
"topLevel": true,
|
26 |
+
"x": 151,
|
27 |
+
"y": -329
|
28 |
+
},
|
29 |
+
"event_whenthisspriteclicked": {
|
30 |
+
"opcode": "event_whenthisspriteclicked",
|
31 |
+
"next": null,
|
32 |
+
"parent": null,
|
33 |
+
"inputs": {},
|
34 |
+
"fields": {},
|
35 |
+
"shadow": false,
|
36 |
+
"topLevel": true,
|
37 |
+
"x": 156,
|
38 |
+
"y": -223
|
39 |
+
},
|
40 |
+
"event_whenbackdropswitchesto": {
|
41 |
+
"opcode": "event_whenbackdropswitchesto",
|
42 |
+
"next": null,
|
43 |
+
"parent": null,
|
44 |
+
"inputs": {},
|
45 |
+
"fields": {
|
46 |
+
"BACKDROP": [
|
47 |
+
"backdrop1",
|
48 |
+
null
|
49 |
+
]
|
50 |
+
},
|
51 |
+
"shadow": false,
|
52 |
+
"topLevel": true,
|
53 |
+
"x": 148,
|
54 |
+
"y": -101
|
55 |
+
},
|
56 |
+
"event_whengreaterthan": {
|
57 |
+
"opcode": "event_whengreaterthan",
|
58 |
+
"next": null,
|
59 |
+
"parent": null,
|
60 |
+
"inputs": {
|
61 |
+
"VALUE": [
|
62 |
+
1,
|
63 |
+
[
|
64 |
+
4,
|
65 |
+
"10"
|
66 |
+
]
|
67 |
+
]
|
68 |
+
},
|
69 |
+
"fields": {
|
70 |
+
"WHENGREATERTHANMENU": [
|
71 |
+
"LOUDNESS",
|
72 |
+
null
|
73 |
+
]
|
74 |
+
},
|
75 |
+
"shadow": false,
|
76 |
+
"topLevel": true,
|
77 |
+
"x": 150,
|
78 |
+
"y": 10
|
79 |
+
},
|
80 |
+
"event_whenbroadcastreceived": {
|
81 |
+
"opcode": "event_whenbroadcastreceived",
|
82 |
+
"next": null,
|
83 |
+
"parent": null,
|
84 |
+
"inputs": {},
|
85 |
+
"fields": {
|
86 |
+
"BROADCAST_OPTION": [
|
87 |
+
"message1",
|
88 |
+
"5O!nei;S$!c!=hCT}0:a"
|
89 |
+
]
|
90 |
+
},
|
91 |
+
"shadow": false,
|
92 |
+
"topLevel": true,
|
93 |
+
"x": 141,
|
94 |
+
"y": 118
|
95 |
+
},
|
96 |
+
"event_broadcast": {
|
97 |
+
"opcode": "event_broadcast",
|
98 |
+
"next": null,
|
99 |
+
"parent": null,
|
100 |
+
"inputs": {
|
101 |
+
"BROADCAST_INPUT": [
|
102 |
+
1,
|
103 |
+
[
|
104 |
+
11,
|
105 |
+
"message1",
|
106 |
+
"5O!nei;S$!c!=hCT}0:a"
|
107 |
+
]
|
108 |
+
]
|
109 |
+
},
|
110 |
+
"fields": {},
|
111 |
+
"shadow": false,
|
112 |
+
"topLevel": true,
|
113 |
+
"x": 151,
|
114 |
+
"y": 229
|
115 |
+
},
|
116 |
+
"event_broadcastandwait": {
|
117 |
+
"opcode": "event_broadcastandwait",
|
118 |
+
"next": null,
|
119 |
+
"parent": null,
|
120 |
+
"inputs": {
|
121 |
+
"BROADCAST_INPUT": [
|
122 |
+
1,
|
123 |
+
[
|
124 |
+
11,
|
125 |
+
"message1",
|
126 |
+
"5O!nei;S$!c!=hCT}0:a"
|
127 |
+
]
|
128 |
+
]
|
129 |
+
},
|
130 |
+
"fields": {},
|
131 |
+
"shadow": false,
|
132 |
+
"topLevel": true,
|
133 |
+
"x": 157,
|
134 |
+
"y": 340
|
135 |
+
}
|
136 |
+
}
|
blocks/classwise_blocks/look_block.json
ADDED
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
10 |
+
10,
|
11 |
+
"Hello!"
|
12 |
+
]
|
13 |
+
],
|
14 |
+
"SECS": [
|
15 |
+
1,
|
16 |
+
[
|
17 |
+
4,
|
18 |
+
"2"
|
19 |
+
]
|
20 |
+
]
|
21 |
+
},
|
22 |
+
"fields": {},
|
23 |
+
"shadow": false,
|
24 |
+
"topLevel": true,
|
25 |
+
"x": 408,
|
26 |
+
"y": 91
|
27 |
+
},
|
28 |
+
"looks_say": {
|
29 |
+
"opcode": "looks_say",
|
30 |
+
"next": null,
|
31 |
+
"parent": null,
|
32 |
+
"inputs": {
|
33 |
+
"MESSAGE": [
|
34 |
+
1,
|
35 |
+
[
|
36 |
+
10,
|
37 |
+
"Hello!"
|
38 |
+
]
|
39 |
+
]
|
40 |
+
},
|
41 |
+
"fields": {},
|
42 |
+
"shadow": false,
|
43 |
+
"topLevel": true,
|
44 |
+
"x": 413,
|
45 |
+
"y": 213
|
46 |
+
},
|
47 |
+
"looks_thinkforsecs": {
|
48 |
+
"opcode": "looks_thinkforsecs",
|
49 |
+
"next": null,
|
50 |
+
"parent": null,
|
51 |
+
"inputs": {
|
52 |
+
"MESSAGE": [
|
53 |
+
1,
|
54 |
+
[
|
55 |
+
10,
|
56 |
+
"Hmm..."
|
57 |
+
]
|
58 |
+
],
|
59 |
+
"SECS": [
|
60 |
+
1,
|
61 |
+
[
|
62 |
+
4,
|
63 |
+
"2"
|
64 |
+
]
|
65 |
+
]
|
66 |
+
},
|
67 |
+
"fields": {},
|
68 |
+
"shadow": false,
|
69 |
+
"topLevel": true,
|
70 |
+
"x": 413,
|
71 |
+
"y": 317
|
72 |
+
},
|
73 |
+
"looks_think": {
|
74 |
+
"opcode": "looks_think",
|
75 |
+
"next": null,
|
76 |
+
"parent": null,
|
77 |
+
"inputs": {
|
78 |
+
"MESSAGE": [
|
79 |
+
1,
|
80 |
+
[
|
81 |
+
10,
|
82 |
+
"Hmm..."
|
83 |
+
]
|
84 |
+
]
|
85 |
+
},
|
86 |
+
"fields": {},
|
87 |
+
"shadow": false,
|
88 |
+
"topLevel": true,
|
89 |
+
"x": 412,
|
90 |
+
"y": 432
|
91 |
+
},
|
92 |
+
"looks_switchcostumeto": {
|
93 |
+
"opcode": "looks_switchcostumeto",
|
94 |
+
"next": null,
|
95 |
+
"parent": null,
|
96 |
+
"inputs": {
|
97 |
+
"COSTUME": [
|
98 |
+
1,
|
99 |
+
"looks_costume"
|
100 |
+
]
|
101 |
+
},
|
102 |
+
"fields": {},
|
103 |
+
"shadow": false,
|
104 |
+
"topLevel": true,
|
105 |
+
"x": 411,
|
106 |
+
"y": 555
|
107 |
+
},
|
108 |
+
"looks_costume": {
|
109 |
+
"opcode": "looks_costume",
|
110 |
+
"next": null,
|
111 |
+
"parent": "looks_switchcostumeto",
|
112 |
+
"inputs": {},
|
113 |
+
"fields": {
|
114 |
+
"COSTUME": [
|
115 |
+
"costume2",
|
116 |
+
null
|
117 |
+
]
|
118 |
+
},
|
119 |
+
"shadow": true,
|
120 |
+
"topLevel": false
|
121 |
+
},
|
122 |
+
"looks_nextcostume": {
|
123 |
+
"opcode": "looks_nextcostume",
|
124 |
+
"next": null,
|
125 |
+
"parent": null,
|
126 |
+
"inputs": {},
|
127 |
+
"fields": {},
|
128 |
+
"shadow": false,
|
129 |
+
"topLevel": true,
|
130 |
+
"x": 419,
|
131 |
+
"y": 687
|
132 |
+
},
|
133 |
+
"looks_switchbackdropto": {
|
134 |
+
"opcode": "looks_switchbackdropto",
|
135 |
+
"next": null,
|
136 |
+
"parent": null,
|
137 |
+
"inputs": {
|
138 |
+
"BACKDROP": [
|
139 |
+
1,
|
140 |
+
"looks_backdrops"
|
141 |
+
]
|
142 |
+
},
|
143 |
+
"fields": {},
|
144 |
+
"shadow": false,
|
145 |
+
"topLevel": true,
|
146 |
+
"x": 901,
|
147 |
+
"y": 91
|
148 |
+
},
|
149 |
+
"looks_backdrops": {
|
150 |
+
"opcode": "looks_backdrops",
|
151 |
+
"next": null,
|
152 |
+
"parent": "looks_switchbackdropto",
|
153 |
+
"inputs": {},
|
154 |
+
"fields": {
|
155 |
+
"BACKDROP": [
|
156 |
+
"backdrop1",
|
157 |
+
null
|
158 |
+
]
|
159 |
+
},
|
160 |
+
"shadow": true,
|
161 |
+
"topLevel": false
|
162 |
+
},
|
163 |
+
"looks_changesizeby": {
|
164 |
+
"opcode": "looks_changesizeby",
|
165 |
+
"next": null,
|
166 |
+
"parent": null,
|
167 |
+
"inputs": {
|
168 |
+
"CHANGE": [
|
169 |
+
1,
|
170 |
+
[
|
171 |
+
4,
|
172 |
+
"10"
|
173 |
+
]
|
174 |
+
]
|
175 |
+
},
|
176 |
+
"fields": {},
|
177 |
+
"shadow": false,
|
178 |
+
"topLevel": true,
|
179 |
+
"x": 895,
|
180 |
+
"y": 192
|
181 |
+
},
|
182 |
+
"looks_setsizeto": {
|
183 |
+
"opcode": "looks_setsizeto",
|
184 |
+
"next": null,
|
185 |
+
"parent": null,
|
186 |
+
"inputs": {
|
187 |
+
"SIZE": [
|
188 |
+
1,
|
189 |
+
[
|
190 |
+
4,
|
191 |
+
"100"
|
192 |
+
]
|
193 |
+
]
|
194 |
+
},
|
195 |
+
"fields": {},
|
196 |
+
"shadow": false,
|
197 |
+
"topLevel": true,
|
198 |
+
"x": 896,
|
199 |
+
"y": 303
|
200 |
+
},
|
201 |
+
"looks_changeeffectby": {
|
202 |
+
"opcode": "looks_changeeffectby",
|
203 |
+
"next": null,
|
204 |
+
"parent": null,
|
205 |
+
"inputs": {
|
206 |
+
"CHANGE": [
|
207 |
+
1,
|
208 |
+
[
|
209 |
+
4,
|
210 |
+
"25"
|
211 |
+
]
|
212 |
+
]
|
213 |
+
},
|
214 |
+
"fields": {
|
215 |
+
"EFFECT": [
|
216 |
+
"COLOR",
|
217 |
+
null
|
218 |
+
]
|
219 |
+
},
|
220 |
+
"shadow": false,
|
221 |
+
"topLevel": true,
|
222 |
+
"x": 892,
|
223 |
+
"y": 416
|
224 |
+
},
|
225 |
+
"looks_seteffectto": {
|
226 |
+
"opcode": "looks_seteffectto",
|
227 |
+
"next": null,
|
228 |
+
"parent": null,
|
229 |
+
"inputs": {
|
230 |
+
"VALUE": [
|
231 |
+
1,
|
232 |
+
[
|
233 |
+
4,
|
234 |
+
"0"
|
235 |
+
]
|
236 |
+
]
|
237 |
+
},
|
238 |
+
"fields": {
|
239 |
+
"EFFECT": [
|
240 |
+
"COLOR",
|
241 |
+
null
|
242 |
+
]
|
243 |
+
},
|
244 |
+
"shadow": false,
|
245 |
+
"topLevel": true,
|
246 |
+
"x": 902,
|
247 |
+
"y": 527
|
248 |
+
},
|
249 |
+
"looks_cleargraphiceffects": {
|
250 |
+
"opcode": "looks_cleargraphiceffects",
|
251 |
+
"next": null,
|
252 |
+
"parent": null,
|
253 |
+
"inputs": {},
|
254 |
+
"fields": {},
|
255 |
+
"shadow": false,
|
256 |
+
"topLevel": true,
|
257 |
+
"x": 902,
|
258 |
+
"y": 638
|
259 |
+
},
|
260 |
+
"looks_show": {
|
261 |
+
"opcode": "looks_show",
|
262 |
+
"next": null,
|
263 |
+
"parent": null,
|
264 |
+
"inputs": {},
|
265 |
+
"fields": {},
|
266 |
+
"shadow": false,
|
267 |
+
"topLevel": true,
|
268 |
+
"x": 908,
|
269 |
+
"y": 758
|
270 |
+
},
|
271 |
+
"looks_hide": {
|
272 |
+
"opcode": "looks_hide",
|
273 |
+
"next": null,
|
274 |
+
"parent": null,
|
275 |
+
"inputs": {},
|
276 |
+
"fields": {},
|
277 |
+
"shadow": false,
|
278 |
+
"topLevel": true,
|
279 |
+
"x": 455,
|
280 |
+
"y": 861
|
281 |
+
},
|
282 |
+
"looks_gotofrontback": {
|
283 |
+
"opcode": "looks_gotofrontback",
|
284 |
+
"next": null,
|
285 |
+
"parent": null,
|
286 |
+
"inputs": {},
|
287 |
+
"fields": {
|
288 |
+
"FRONT_BACK": [
|
289 |
+
"front",
|
290 |
+
null
|
291 |
+
]
|
292 |
+
},
|
293 |
+
"shadow": false,
|
294 |
+
"topLevel": true,
|
295 |
+
"x": 853,
|
296 |
+
"y": 878
|
297 |
+
},
|
298 |
+
"looks_goforwardbackwardlayers": {
|
299 |
+
"opcode": "looks_goforwardbackwardlayers",
|
300 |
+
"next": null,
|
301 |
+
"parent": null,
|
302 |
+
"inputs": {
|
303 |
+
"NUM": [
|
304 |
+
1,
|
305 |
+
[
|
306 |
+
7,
|
307 |
+
"1"
|
308 |
+
]
|
309 |
+
]
|
310 |
+
},
|
311 |
+
"fields": {
|
312 |
+
"FORWARD_BACKWARD": [
|
313 |
+
"forward",
|
314 |
+
null
|
315 |
+
]
|
316 |
+
},
|
317 |
+
"shadow": false,
|
318 |
+
"topLevel": true,
|
319 |
+
"x": 851,
|
320 |
+
"y": 999
|
321 |
+
},
|
322 |
+
"looks_costumenumbername": {
|
323 |
+
"opcode": "looks_costumenumbername",
|
324 |
+
"next": null,
|
325 |
+
"parent": null,
|
326 |
+
"inputs": {},
|
327 |
+
"fields": {
|
328 |
+
"NUMBER_NAME": [
|
329 |
+
"number",
|
330 |
+
null
|
331 |
+
]
|
332 |
+
},
|
333 |
+
"shadow": false,
|
334 |
+
"topLevel": true,
|
335 |
+
"x": 458,
|
336 |
+
"y": 1007
|
337 |
+
},
|
338 |
+
"looks_backdropnumbername": {
|
339 |
+
"opcode": "looks_backdropnumbername",
|
340 |
+
"next": null,
|
341 |
+
"parent": null,
|
342 |
+
"inputs": {},
|
343 |
+
"fields": {
|
344 |
+
"NUMBER_NAME": [
|
345 |
+
"number",
|
346 |
+
null
|
347 |
+
]
|
348 |
+
},
|
349 |
+
"shadow": false,
|
350 |
+
"topLevel": true,
|
351 |
+
"x": 1242,
|
352 |
+
"y": 753
|
353 |
+
},
|
354 |
+
"looks_size": {
|
355 |
+
"opcode": "looks_size",
|
356 |
+
"next": null,
|
357 |
+
"parent": null,
|
358 |
+
"inputs": {},
|
359 |
+
"fields": {},
|
360 |
+
"shadow": false,
|
361 |
+
"topLevel": true,
|
362 |
+
"x": 1249,
|
363 |
+
"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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"motion_movesteps": {
|
3 |
+
"opcode": "motion_movesteps",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {
|
7 |
+
"STEPS": [
|
8 |
+
1,
|
9 |
+
[
|
10 |
+
4,
|
11 |
+
"10"
|
12 |
+
]
|
13 |
+
]
|
14 |
+
},
|
15 |
+
"fields": {},
|
16 |
+
"shadow": false,
|
17 |
+
"topLevel": true,
|
18 |
+
"x": 464,
|
19 |
+
"y": -416
|
20 |
+
},
|
21 |
+
"motion_turnright": {
|
22 |
+
"opcode": "motion_turnright",
|
23 |
+
"next": null,
|
24 |
+
"parent": null,
|
25 |
+
"inputs": {
|
26 |
+
"DEGREES": [
|
27 |
+
1,
|
28 |
+
[
|
29 |
+
4,
|
30 |
+
"15"
|
31 |
+
]
|
32 |
+
]
|
33 |
+
},
|
34 |
+
"fields": {},
|
35 |
+
"shadow": false,
|
36 |
+
"topLevel": true,
|
37 |
+
"x": 467,
|
38 |
+
"y": -316
|
39 |
+
},
|
40 |
+
"motion_turnleft": {
|
41 |
+
"opcode": "motion_turnleft",
|
42 |
+
"next": null,
|
43 |
+
"parent": null,
|
44 |
+
"inputs": {
|
45 |
+
"DEGREES": [
|
46 |
+
1,
|
47 |
+
[
|
48 |
+
4,
|
49 |
+
"15"
|
50 |
+
]
|
51 |
+
]
|
52 |
+
},
|
53 |
+
"fields": {},
|
54 |
+
"shadow": false,
|
55 |
+
"topLevel": true,
|
56 |
+
"x": 464,
|
57 |
+
"y": -210
|
58 |
+
},
|
59 |
+
"motion_goto": {
|
60 |
+
"opcode": "motion_goto",
|
61 |
+
"next": null,
|
62 |
+
"parent": null,
|
63 |
+
"inputs": {
|
64 |
+
"TO": [
|
65 |
+
1,
|
66 |
+
"motion_goto_menu"
|
67 |
+
]
|
68 |
+
},
|
69 |
+
"fields": {},
|
70 |
+
"shadow": false,
|
71 |
+
"topLevel": true,
|
72 |
+
"x": 465,
|
73 |
+
"y": -95
|
74 |
+
},
|
75 |
+
"motion_goto_menu": {
|
76 |
+
"opcode": "motion_goto_menu",
|
77 |
+
"next": null,
|
78 |
+
"parent": "motion_goto",
|
79 |
+
"inputs": {},
|
80 |
+
"fields": {
|
81 |
+
"TO": [
|
82 |
+
"_random_",
|
83 |
+
null
|
84 |
+
]
|
85 |
+
},
|
86 |
+
"shadow": true,
|
87 |
+
"topLevel": false
|
88 |
+
},
|
89 |
+
"motion_gotoxy": {
|
90 |
+
"opcode": "motion_gotoxy",
|
91 |
+
"next": null,
|
92 |
+
"parent": null,
|
93 |
+
"inputs": {
|
94 |
+
"X": [
|
95 |
+
1,
|
96 |
+
[
|
97 |
+
4,
|
98 |
+
"0"
|
99 |
+
]
|
100 |
+
],
|
101 |
+
"Y": [
|
102 |
+
1,
|
103 |
+
[
|
104 |
+
4,
|
105 |
+
"0"
|
106 |
+
]
|
107 |
+
]
|
108 |
+
},
|
109 |
+
"fields": {},
|
110 |
+
"shadow": false,
|
111 |
+
"topLevel": true,
|
112 |
+
"x": 468,
|
113 |
+
"y": 12
|
114 |
+
},
|
115 |
+
"motion_glideto": {
|
116 |
+
"opcode": "motion_glideto",
|
117 |
+
"next": null,
|
118 |
+
"parent": null,
|
119 |
+
"inputs": {
|
120 |
+
"SECS": [
|
121 |
+
1,
|
122 |
+
[
|
123 |
+
4,
|
124 |
+
"1"
|
125 |
+
]
|
126 |
+
],
|
127 |
+
"TO": [
|
128 |
+
1,
|
129 |
+
"motion_glideto_menu"
|
130 |
+
]
|
131 |
+
},
|
132 |
+
"fields": {},
|
133 |
+
"shadow": false,
|
134 |
+
"topLevel": true,
|
135 |
+
"x": 470,
|
136 |
+
"y": 129
|
137 |
+
},
|
138 |
+
"motion_glideto_menu": {
|
139 |
+
"opcode": "motion_glideto_menu",
|
140 |
+
"next": null,
|
141 |
+
"parent": "motion_glideto",
|
142 |
+
"inputs": {},
|
143 |
+
"fields": {
|
144 |
+
"TO": [
|
145 |
+
"_random_",
|
146 |
+
null
|
147 |
+
]
|
148 |
+
},
|
149 |
+
"shadow": true,
|
150 |
+
"topLevel": false
|
151 |
+
},
|
152 |
+
"motion_glidesecstoxy": {
|
153 |
+
"opcode": "motion_glidesecstoxy",
|
154 |
+
"next": null,
|
155 |
+
"parent": null,
|
156 |
+
"inputs": {
|
157 |
+
"SECS": [
|
158 |
+
1,
|
159 |
+
[
|
160 |
+
4,
|
161 |
+
"1"
|
162 |
+
]
|
163 |
+
],
|
164 |
+
"X": [
|
165 |
+
1,
|
166 |
+
[
|
167 |
+
4,
|
168 |
+
"0"
|
169 |
+
]
|
170 |
+
],
|
171 |
+
"Y": [
|
172 |
+
1,
|
173 |
+
[
|
174 |
+
4,
|
175 |
+
"0"
|
176 |
+
]
|
177 |
+
]
|
178 |
+
},
|
179 |
+
"fields": {},
|
180 |
+
"shadow": false,
|
181 |
+
"topLevel": true,
|
182 |
+
"x": 476,
|
183 |
+
"y": 239
|
184 |
+
},
|
185 |
+
"motion_pointindirection": {
|
186 |
+
"opcode": "motion_pointindirection",
|
187 |
+
"next": null,
|
188 |
+
"parent": null,
|
189 |
+
"inputs": {
|
190 |
+
"DIRECTION": [
|
191 |
+
1,
|
192 |
+
[
|
193 |
+
8,
|
194 |
+
"90"
|
195 |
+
]
|
196 |
+
]
|
197 |
+
},
|
198 |
+
"fields": {},
|
199 |
+
"shadow": false,
|
200 |
+
"topLevel": true,
|
201 |
+
"x": 493,
|
202 |
+
"y": 361
|
203 |
+
},
|
204 |
+
"motion_pointtowards": {
|
205 |
+
"opcode": "motion_pointtowards",
|
206 |
+
"next": null,
|
207 |
+
"parent": null,
|
208 |
+
"inputs": {
|
209 |
+
"TOWARDS": [
|
210 |
+
1,
|
211 |
+
"6xQl1pPk%9E~Znhm*:ng"
|
212 |
+
]
|
213 |
+
},
|
214 |
+
"fields": {},
|
215 |
+
"shadow": false,
|
216 |
+
"topLevel": true,
|
217 |
+
"x": 492,
|
218 |
+
"y": 463
|
219 |
+
},
|
220 |
+
"motion_pointtowards_menu": {
|
221 |
+
"opcode": "motion_pointtowards_menu",
|
222 |
+
"next": null,
|
223 |
+
"parent": "Ucm$YBs*^9GFTGXCbal@",
|
224 |
+
"inputs": {},
|
225 |
+
"fields": {
|
226 |
+
"TOWARDS": [
|
227 |
+
"_mouse_",
|
228 |
+
null
|
229 |
+
]
|
230 |
+
},
|
231 |
+
"shadow": true,
|
232 |
+
"topLevel": false
|
233 |
+
},
|
234 |
+
"motion_changexby": {
|
235 |
+
"opcode": "motion_changexby",
|
236 |
+
"next": null,
|
237 |
+
"parent": null,
|
238 |
+
"inputs": {
|
239 |
+
"DX": [
|
240 |
+
1,
|
241 |
+
[
|
242 |
+
4,
|
243 |
+
"10"
|
244 |
+
]
|
245 |
+
]
|
246 |
+
},
|
247 |
+
"fields": {},
|
248 |
+
"shadow": false,
|
249 |
+
"topLevel": true,
|
250 |
+
"x": 851,
|
251 |
+
"y": -409
|
252 |
+
},
|
253 |
+
"motion_setx": {
|
254 |
+
"opcode": "motion_setx",
|
255 |
+
"next": null,
|
256 |
+
"parent": null,
|
257 |
+
"inputs": {
|
258 |
+
"X": [
|
259 |
+
1,
|
260 |
+
[
|
261 |
+
4,
|
262 |
+
"0"
|
263 |
+
]
|
264 |
+
]
|
265 |
+
},
|
266 |
+
"fields": {},
|
267 |
+
"shadow": false,
|
268 |
+
"topLevel": true,
|
269 |
+
"x": 864,
|
270 |
+
"y": -194
|
271 |
+
},
|
272 |
+
"motion_changeyby": {
|
273 |
+
"opcode": "motion_changeyby",
|
274 |
+
"next": null,
|
275 |
+
"parent": null,
|
276 |
+
"inputs": {
|
277 |
+
"DY": [
|
278 |
+
1,
|
279 |
+
[
|
280 |
+
4,
|
281 |
+
"10"
|
282 |
+
]
|
283 |
+
]
|
284 |
+
},
|
285 |
+
"fields": {},
|
286 |
+
"shadow": false,
|
287 |
+
"topLevel": true,
|
288 |
+
"x": 861,
|
289 |
+
"y": -61
|
290 |
+
},
|
291 |
+
"motion_sety": {
|
292 |
+
"opcode": "motion_sety",
|
293 |
+
"next": null,
|
294 |
+
"parent": null,
|
295 |
+
"inputs": {
|
296 |
+
"Y": [
|
297 |
+
1,
|
298 |
+
[
|
299 |
+
4,
|
300 |
+
"0"
|
301 |
+
]
|
302 |
+
]
|
303 |
+
},
|
304 |
+
"fields": {},
|
305 |
+
"shadow": false,
|
306 |
+
"topLevel": true,
|
307 |
+
"x": 864,
|
308 |
+
"y": 66
|
309 |
+
},
|
310 |
+
"motion_ifonedgebounce": {
|
311 |
+
"opcode": "motion_ifonedgebounce",
|
312 |
+
"next": null,
|
313 |
+
"parent": null,
|
314 |
+
"inputs": {},
|
315 |
+
"fields": {},
|
316 |
+
"shadow": false,
|
317 |
+
"topLevel": true,
|
318 |
+
"x": 1131,
|
319 |
+
"y": -397
|
320 |
+
},
|
321 |
+
"motion_setrotationstyle": {
|
322 |
+
"opcode": "motion_setrotationstyle",
|
323 |
+
"next": null,
|
324 |
+
"parent": null,
|
325 |
+
"inputs": {},
|
326 |
+
"fields": {
|
327 |
+
"STYLE": [
|
328 |
+
"left-right",
|
329 |
+
null
|
330 |
+
]
|
331 |
+
},
|
332 |
+
"shadow": false,
|
333 |
+
"topLevel": true,
|
334 |
+
"x": 1128,
|
335 |
+
"y": -287
|
336 |
+
},
|
337 |
+
"motion_xposition": {
|
338 |
+
"opcode": "motion_xposition",
|
339 |
+
"next": null,
|
340 |
+
"parent": null,
|
341 |
+
"inputs": {},
|
342 |
+
"fields": {},
|
343 |
+
"shadow": false,
|
344 |
+
"topLevel": true,
|
345 |
+
"x": 1193,
|
346 |
+
"y": -136
|
347 |
+
},
|
348 |
+
"motion_yposition": {
|
349 |
+
"opcode": "motion_yposition",
|
350 |
+
"next": null,
|
351 |
+
"parent": null,
|
352 |
+
"inputs": {},
|
353 |
+
"fields": {},
|
354 |
+
"shadow": false,
|
355 |
+
"topLevel": true,
|
356 |
+
"x": 1181,
|
357 |
+
"y": -64
|
358 |
+
},
|
359 |
+
"motion_direction": {
|
360 |
+
"opcode": "motion_direction",
|
361 |
+
"next": null,
|
362 |
+
"parent": null,
|
363 |
+
"inputs": {},
|
364 |
+
"fields": {},
|
365 |
+
"shadow": false,
|
366 |
+
"topLevel": true,
|
367 |
+
"x": 1188,
|
368 |
+
"y": 21
|
369 |
+
}
|
370 |
+
}
|
blocks/classwise_blocks/operator_block.json
ADDED
@@ -0,0 +1,409 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"operator_add": {
|
3 |
+
"opcode": "operator_add",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {
|
7 |
+
"NUM1": [
|
8 |
+
1,
|
9 |
+
[
|
10 |
+
4,
|
11 |
+
""
|
12 |
+
]
|
13 |
+
],
|
14 |
+
"NUM2": [
|
15 |
+
1,
|
16 |
+
[
|
17 |
+
4,
|
18 |
+
""
|
19 |
+
]
|
20 |
+
]
|
21 |
+
},
|
22 |
+
"fields": {},
|
23 |
+
"shadow": false,
|
24 |
+
"topLevel": true,
|
25 |
+
"x": 128,
|
26 |
+
"y": 153
|
27 |
+
},
|
28 |
+
"operator_subtract": {
|
29 |
+
"opcode": "operator_subtract",
|
30 |
+
"next": null,
|
31 |
+
"parent": null,
|
32 |
+
"inputs": {
|
33 |
+
"NUM1": [
|
34 |
+
1,
|
35 |
+
[
|
36 |
+
4,
|
37 |
+
""
|
38 |
+
]
|
39 |
+
],
|
40 |
+
"NUM2": [
|
41 |
+
1,
|
42 |
+
[
|
43 |
+
4,
|
44 |
+
""
|
45 |
+
]
|
46 |
+
]
|
47 |
+
},
|
48 |
+
"fields": {},
|
49 |
+
"shadow": false,
|
50 |
+
"topLevel": true,
|
51 |
+
"x": 134,
|
52 |
+
"y": 214
|
53 |
+
},
|
54 |
+
"operator_multiply": {
|
55 |
+
"opcode": "operator_multiply",
|
56 |
+
"next": null,
|
57 |
+
"parent": null,
|
58 |
+
"inputs": {
|
59 |
+
"NUM1": [
|
60 |
+
1,
|
61 |
+
[
|
62 |
+
4,
|
63 |
+
""
|
64 |
+
]
|
65 |
+
],
|
66 |
+
"NUM2": [
|
67 |
+
1,
|
68 |
+
[
|
69 |
+
4,
|
70 |
+
""
|
71 |
+
]
|
72 |
+
]
|
73 |
+
},
|
74 |
+
"fields": {},
|
75 |
+
"shadow": false,
|
76 |
+
"topLevel": true,
|
77 |
+
"x": 134,
|
78 |
+
"y": 278
|
79 |
+
},
|
80 |
+
"operator_divide": {
|
81 |
+
"opcode": "operator_divide",
|
82 |
+
"next": null,
|
83 |
+
"parent": null,
|
84 |
+
"inputs": {
|
85 |
+
"NUM1": [
|
86 |
+
1,
|
87 |
+
[
|
88 |
+
4,
|
89 |
+
""
|
90 |
+
]
|
91 |
+
],
|
92 |
+
"NUM2": [
|
93 |
+
1,
|
94 |
+
[
|
95 |
+
4,
|
96 |
+
""
|
97 |
+
]
|
98 |
+
]
|
99 |
+
},
|
100 |
+
"fields": {},
|
101 |
+
"shadow": false,
|
102 |
+
"topLevel": true,
|
103 |
+
"x": 138,
|
104 |
+
"y": 359
|
105 |
+
},
|
106 |
+
"operator_random": {
|
107 |
+
"opcode": "operator_random",
|
108 |
+
"next": null,
|
109 |
+
"parent": null,
|
110 |
+
"inputs": {
|
111 |
+
"FROM": [
|
112 |
+
1,
|
113 |
+
[
|
114 |
+
4,
|
115 |
+
"1"
|
116 |
+
]
|
117 |
+
],
|
118 |
+
"TO": [
|
119 |
+
1,
|
120 |
+
[
|
121 |
+
4,
|
122 |
+
"10"
|
123 |
+
]
|
124 |
+
]
|
125 |
+
},
|
126 |
+
"fields": {},
|
127 |
+
"shadow": false,
|
128 |
+
"topLevel": true,
|
129 |
+
"x": 311,
|
130 |
+
"y": 157
|
131 |
+
},
|
132 |
+
"operator_gt": {
|
133 |
+
"opcode": "operator_gt",
|
134 |
+
"next": null,
|
135 |
+
"parent": null,
|
136 |
+
"inputs": {
|
137 |
+
"OPERAND1": [
|
138 |
+
1,
|
139 |
+
[
|
140 |
+
10,
|
141 |
+
""
|
142 |
+
]
|
143 |
+
],
|
144 |
+
"OPERAND2": [
|
145 |
+
1,
|
146 |
+
[
|
147 |
+
10,
|
148 |
+
"50"
|
149 |
+
]
|
150 |
+
]
|
151 |
+
},
|
152 |
+
"fields": {},
|
153 |
+
"shadow": false,
|
154 |
+
"topLevel": true,
|
155 |
+
"x": 348,
|
156 |
+
"y": 217
|
157 |
+
},
|
158 |
+
"operator_lt": {
|
159 |
+
"opcode": "operator_lt",
|
160 |
+
"next": null,
|
161 |
+
"parent": null,
|
162 |
+
"inputs": {
|
163 |
+
"OPERAND1": [
|
164 |
+
1,
|
165 |
+
[
|
166 |
+
10,
|
167 |
+
""
|
168 |
+
]
|
169 |
+
],
|
170 |
+
"OPERAND2": [
|
171 |
+
1,
|
172 |
+
[
|
173 |
+
10,
|
174 |
+
"50"
|
175 |
+
]
|
176 |
+
]
|
177 |
+
},
|
178 |
+
"fields": {},
|
179 |
+
"shadow": false,
|
180 |
+
"topLevel": true,
|
181 |
+
"x": 345,
|
182 |
+
"y": 286
|
183 |
+
},
|
184 |
+
"operator_equals": {
|
185 |
+
"opcode": "operator_equals",
|
186 |
+
"next": null,
|
187 |
+
"parent": null,
|
188 |
+
"inputs": {
|
189 |
+
"OPERAND1": [
|
190 |
+
1,
|
191 |
+
[
|
192 |
+
10,
|
193 |
+
""
|
194 |
+
]
|
195 |
+
],
|
196 |
+
"OPERAND2": [
|
197 |
+
1,
|
198 |
+
[
|
199 |
+
10,
|
200 |
+
"50"
|
201 |
+
]
|
202 |
+
]
|
203 |
+
},
|
204 |
+
"fields": {},
|
205 |
+
"shadow": false,
|
206 |
+
"topLevel": true,
|
207 |
+
"x": 345,
|
208 |
+
"y": 372
|
209 |
+
},
|
210 |
+
"operator_and": {
|
211 |
+
"opcode": "operator_and",
|
212 |
+
"next": null,
|
213 |
+
"parent": null,
|
214 |
+
"inputs": {},
|
215 |
+
"fields": {},
|
216 |
+
"shadow": false,
|
217 |
+
"topLevel": true,
|
218 |
+
"x": 701,
|
219 |
+
"y": 158
|
220 |
+
},
|
221 |
+
"operator_or": {
|
222 |
+
"opcode": "operator_or",
|
223 |
+
"next": null,
|
224 |
+
"parent": null,
|
225 |
+
"inputs": {},
|
226 |
+
"fields": {},
|
227 |
+
"shadow": false,
|
228 |
+
"topLevel": true,
|
229 |
+
"x": 705,
|
230 |
+
"y": 222
|
231 |
+
},
|
232 |
+
"operator_not": {
|
233 |
+
"opcode": "operator_not",
|
234 |
+
"next": null,
|
235 |
+
"parent": null,
|
236 |
+
"inputs": {},
|
237 |
+
"fields": {},
|
238 |
+
"shadow": false,
|
239 |
+
"topLevel": true,
|
240 |
+
"x": 734,
|
241 |
+
"y": 283
|
242 |
+
},
|
243 |
+
"operator_join": {
|
244 |
+
"opcode": "operator_join",
|
245 |
+
"next": null,
|
246 |
+
"parent": null,
|
247 |
+
"inputs": {
|
248 |
+
"STRING1": [
|
249 |
+
1,
|
250 |
+
[
|
251 |
+
10,
|
252 |
+
"apple "
|
253 |
+
]
|
254 |
+
],
|
255 |
+
"STRING2": [
|
256 |
+
1,
|
257 |
+
[
|
258 |
+
10,
|
259 |
+
"banana"
|
260 |
+
]
|
261 |
+
]
|
262 |
+
},
|
263 |
+
"fields": {},
|
264 |
+
"shadow": false,
|
265 |
+
"topLevel": true,
|
266 |
+
"x": 663,
|
267 |
+
"y": 378
|
268 |
+
},
|
269 |
+
"operator_letter_of": {
|
270 |
+
"opcode": "operator_letter_of",
|
271 |
+
"next": null,
|
272 |
+
"parent": null,
|
273 |
+
"inputs": {
|
274 |
+
"LETTER": [
|
275 |
+
1,
|
276 |
+
[
|
277 |
+
6,
|
278 |
+
"1"
|
279 |
+
]
|
280 |
+
],
|
281 |
+
"STRING": [
|
282 |
+
1,
|
283 |
+
[
|
284 |
+
10,
|
285 |
+
"apple"
|
286 |
+
]
|
287 |
+
]
|
288 |
+
},
|
289 |
+
"fields": {},
|
290 |
+
"shadow": false,
|
291 |
+
"topLevel": true,
|
292 |
+
"x": 664,
|
293 |
+
"y": 445
|
294 |
+
},
|
295 |
+
"operator_length": {
|
296 |
+
"opcode": "operator_length",
|
297 |
+
"next": null,
|
298 |
+
"parent": null,
|
299 |
+
"inputs": {
|
300 |
+
"STRING": [
|
301 |
+
1,
|
302 |
+
[
|
303 |
+
10,
|
304 |
+
"apple"
|
305 |
+
]
|
306 |
+
]
|
307 |
+
},
|
308 |
+
"fields": {},
|
309 |
+
"shadow": false,
|
310 |
+
"topLevel": true,
|
311 |
+
"x": 664,
|
312 |
+
"y": 521
|
313 |
+
},
|
314 |
+
"operator_contains": {
|
315 |
+
"opcode": "operator_contains",
|
316 |
+
"next": null,
|
317 |
+
"parent": null,
|
318 |
+
"inputs": {
|
319 |
+
"STRING1": [
|
320 |
+
1,
|
321 |
+
[
|
322 |
+
10,
|
323 |
+
"apple"
|
324 |
+
]
|
325 |
+
],
|
326 |
+
"STRING2": [
|
327 |
+
1,
|
328 |
+
[
|
329 |
+
10,
|
330 |
+
"a"
|
331 |
+
]
|
332 |
+
]
|
333 |
+
},
|
334 |
+
"fields": {},
|
335 |
+
"shadow": false,
|
336 |
+
"topLevel": true,
|
337 |
+
"x": 634,
|
338 |
+
"y": 599
|
339 |
+
},
|
340 |
+
"operator_mod": {
|
341 |
+
"opcode": "operator_mod",
|
342 |
+
"next": null,
|
343 |
+
"parent": null,
|
344 |
+
"inputs": {
|
345 |
+
"NUM1": [
|
346 |
+
1,
|
347 |
+
[
|
348 |
+
4,
|
349 |
+
""
|
350 |
+
]
|
351 |
+
],
|
352 |
+
"NUM2": [
|
353 |
+
1,
|
354 |
+
[
|
355 |
+
4,
|
356 |
+
""
|
357 |
+
]
|
358 |
+
]
|
359 |
+
},
|
360 |
+
"fields": {},
|
361 |
+
"shadow": false,
|
362 |
+
"topLevel": true,
|
363 |
+
"x": 295,
|
364 |
+
"y": 594
|
365 |
+
},
|
366 |
+
"operator_round": {
|
367 |
+
"opcode": "operator_round",
|
368 |
+
"next": null,
|
369 |
+
"parent": null,
|
370 |
+
"inputs": {
|
371 |
+
"NUM": [
|
372 |
+
1,
|
373 |
+
[
|
374 |
+
4,
|
375 |
+
""
|
376 |
+
]
|
377 |
+
]
|
378 |
+
},
|
379 |
+
"fields": {},
|
380 |
+
"shadow": false,
|
381 |
+
"topLevel": true,
|
382 |
+
"x": 307,
|
383 |
+
"y": 674
|
384 |
+
},
|
385 |
+
"operator_mathop": {
|
386 |
+
"opcode": "operator_mathop",
|
387 |
+
"next": null,
|
388 |
+
"parent": null,
|
389 |
+
"inputs": {
|
390 |
+
"NUM": [
|
391 |
+
1,
|
392 |
+
[
|
393 |
+
4,
|
394 |
+
""
|
395 |
+
]
|
396 |
+
]
|
397 |
+
},
|
398 |
+
"fields": {
|
399 |
+
"OPERATOR": [
|
400 |
+
"abs",
|
401 |
+
null
|
402 |
+
]
|
403 |
+
},
|
404 |
+
"shadow": false,
|
405 |
+
"topLevel": true,
|
406 |
+
"x": 280,
|
407 |
+
"y": 754
|
408 |
+
}
|
409 |
+
}
|
blocks/classwise_blocks/sensing_block.json
ADDED
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"sensing_touchingobject": {
|
3 |
+
"opcode": "sensing_touchingobject",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {
|
7 |
+
"TOUCHINGOBJECTMENU": [
|
8 |
+
1,
|
9 |
+
"sensing_touchingobjectmenu"
|
10 |
+
]
|
11 |
+
},
|
12 |
+
"fields": {},
|
13 |
+
"shadow": false,
|
14 |
+
"topLevel": true,
|
15 |
+
"x": 359,
|
16 |
+
"y": 116
|
17 |
+
},
|
18 |
+
"sensing_touchingobjectmenu": {
|
19 |
+
"opcode": "sensing_touchingobjectmenu",
|
20 |
+
"next": null,
|
21 |
+
"parent": "sensing_touchingobject",
|
22 |
+
"inputs": {},
|
23 |
+
"fields": {
|
24 |
+
"TOUCHINGOBJECTMENU": [
|
25 |
+
"_mouse_",
|
26 |
+
null
|
27 |
+
]
|
28 |
+
},
|
29 |
+
"shadow": true,
|
30 |
+
"topLevel": false
|
31 |
+
},
|
32 |
+
"sensing_touchingcolor": {
|
33 |
+
"opcode": "sensing_touchingcolor",
|
34 |
+
"next": null,
|
35 |
+
"parent": null,
|
36 |
+
"inputs": {
|
37 |
+
"COLOR": [
|
38 |
+
1,
|
39 |
+
[
|
40 |
+
9,
|
41 |
+
"#55b888"
|
42 |
+
]
|
43 |
+
]
|
44 |
+
},
|
45 |
+
"fields": {},
|
46 |
+
"shadow": false,
|
47 |
+
"topLevel": true,
|
48 |
+
"x": 360,
|
49 |
+
"y": 188
|
50 |
+
},
|
51 |
+
"sensing_coloristouchingcolor": {
|
52 |
+
"opcode": "sensing_coloristouchingcolor",
|
53 |
+
"next": null,
|
54 |
+
"parent": null,
|
55 |
+
"inputs": {
|
56 |
+
"COLOR": [
|
57 |
+
1,
|
58 |
+
[
|
59 |
+
9,
|
60 |
+
"#d019f2"
|
61 |
+
]
|
62 |
+
],
|
63 |
+
"COLOR2": [
|
64 |
+
1,
|
65 |
+
[
|
66 |
+
9,
|
67 |
+
"#2b0de3"
|
68 |
+
]
|
69 |
+
]
|
70 |
+
},
|
71 |
+
"fields": {},
|
72 |
+
"shadow": false,
|
73 |
+
"topLevel": true,
|
74 |
+
"x": 348,
|
75 |
+
"y": 277
|
76 |
+
},
|
77 |
+
"sensing_askandwait": {
|
78 |
+
"opcode": "sensing_askandwait",
|
79 |
+
"next": null,
|
80 |
+
"parent": null,
|
81 |
+
"inputs": {
|
82 |
+
"QUESTION": [
|
83 |
+
1,
|
84 |
+
[
|
85 |
+
10,
|
86 |
+
"What's your name?"
|
87 |
+
]
|
88 |
+
]
|
89 |
+
},
|
90 |
+
"fields": {},
|
91 |
+
"shadow": false,
|
92 |
+
"topLevel": true,
|
93 |
+
"x": 338,
|
94 |
+
"y": 354
|
95 |
+
},
|
96 |
+
"sensing_answer": {
|
97 |
+
"opcode": "sensing_answer",
|
98 |
+
"next": null,
|
99 |
+
"parent": null,
|
100 |
+
"inputs": {},
|
101 |
+
"fields": {},
|
102 |
+
"shadow": false,
|
103 |
+
"topLevel": true,
|
104 |
+
"x": 782,
|
105 |
+
"y": 111
|
106 |
+
},
|
107 |
+
"sensing_keypressed": {
|
108 |
+
"opcode": "sensing_keypressed",
|
109 |
+
"next": null,
|
110 |
+
"parent": null,
|
111 |
+
"inputs": {
|
112 |
+
"KEY_OPTION": [
|
113 |
+
1,
|
114 |
+
"sensing_keyoptions"
|
115 |
+
]
|
116 |
+
},
|
117 |
+
"fields": {},
|
118 |
+
"shadow": false,
|
119 |
+
"topLevel": true,
|
120 |
+
"x": 762,
|
121 |
+
"y": 207
|
122 |
+
},
|
123 |
+
"sensing_keyoptions": {
|
124 |
+
"opcode": "sensing_keyoptions",
|
125 |
+
"next": null,
|
126 |
+
"parent": "sensing_keypressed",
|
127 |
+
"inputs": {},
|
128 |
+
"fields": {
|
129 |
+
"KEY_OPTION": [
|
130 |
+
"space",
|
131 |
+
null
|
132 |
+
]
|
133 |
+
},
|
134 |
+
"shadow": true,
|
135 |
+
"topLevel": false
|
136 |
+
},
|
137 |
+
"sensing_mousedown": {
|
138 |
+
"opcode": "sensing_mousedown",
|
139 |
+
"next": null,
|
140 |
+
"parent": null,
|
141 |
+
"inputs": {},
|
142 |
+
"fields": {},
|
143 |
+
"shadow": false,
|
144 |
+
"topLevel": true,
|
145 |
+
"x": 822,
|
146 |
+
"y": 422
|
147 |
+
},
|
148 |
+
"sensing_mousex": {
|
149 |
+
"opcode": "sensing_mousex",
|
150 |
+
"next": null,
|
151 |
+
"parent": null,
|
152 |
+
"inputs": {},
|
153 |
+
"fields": {},
|
154 |
+
"shadow": false,
|
155 |
+
"topLevel": true,
|
156 |
+
"x": 302,
|
157 |
+
"y": 528
|
158 |
+
},
|
159 |
+
"sensing_mousey": {
|
160 |
+
"opcode": "sensing_mousey",
|
161 |
+
"next": null,
|
162 |
+
"parent": null,
|
163 |
+
"inputs": {},
|
164 |
+
"fields": {},
|
165 |
+
"shadow": false,
|
166 |
+
"topLevel": true,
|
167 |
+
"x": 668,
|
168 |
+
"y": 547
|
169 |
+
},
|
170 |
+
"sensing_setdragmode": {
|
171 |
+
"opcode": "sensing_setdragmode",
|
172 |
+
"next": null,
|
173 |
+
"parent": null,
|
174 |
+
"inputs": {},
|
175 |
+
"fields": {
|
176 |
+
"DRAG_MODE": [
|
177 |
+
"draggable",
|
178 |
+
null
|
179 |
+
]
|
180 |
+
},
|
181 |
+
"shadow": false,
|
182 |
+
"topLevel": true,
|
183 |
+
"x": 950,
|
184 |
+
"y": 574
|
185 |
+
},
|
186 |
+
"sensing_loudness": {
|
187 |
+
"opcode": "sensing_loudness",
|
188 |
+
"next": null,
|
189 |
+
"parent": null,
|
190 |
+
"inputs": {},
|
191 |
+
"fields": {},
|
192 |
+
"shadow": false,
|
193 |
+
"topLevel": true,
|
194 |
+
"x": 658,
|
195 |
+
"y": 703
|
196 |
+
},
|
197 |
+
"sensing_timer": {
|
198 |
+
"opcode": "sensing_timer",
|
199 |
+
"next": null,
|
200 |
+
"parent": null,
|
201 |
+
"inputs": {},
|
202 |
+
"fields": {},
|
203 |
+
"shadow": false,
|
204 |
+
"topLevel": true,
|
205 |
+
"x": 459,
|
206 |
+
"y": 671
|
207 |
+
},
|
208 |
+
"sensing_resettimer": {
|
209 |
+
"opcode": "sensing_resettimer",
|
210 |
+
"next": null,
|
211 |
+
"parent": null,
|
212 |
+
"inputs": {},
|
213 |
+
"fields": {},
|
214 |
+
"shadow": false,
|
215 |
+
"topLevel": true,
|
216 |
+
"x": 462,
|
217 |
+
"y": 781
|
218 |
+
},
|
219 |
+
"sensing_of": {
|
220 |
+
"opcode": "sensing_of",
|
221 |
+
"next": null,
|
222 |
+
"parent": null,
|
223 |
+
"inputs": {
|
224 |
+
"OBJECT": [
|
225 |
+
1,
|
226 |
+
"sensing_of_object_menu"
|
227 |
+
]
|
228 |
+
},
|
229 |
+
"fields": {
|
230 |
+
"PROPERTY": [
|
231 |
+
"backdrop #",
|
232 |
+
null
|
233 |
+
]
|
234 |
+
},
|
235 |
+
"shadow": false,
|
236 |
+
"topLevel": true,
|
237 |
+
"x": 997,
|
238 |
+
"y": 754
|
239 |
+
},
|
240 |
+
"sensing_of_object_menu": {
|
241 |
+
"opcode": "sensing_of_object_menu",
|
242 |
+
"next": null,
|
243 |
+
"parent": "sensing_of",
|
244 |
+
"inputs": {},
|
245 |
+
"fields": {
|
246 |
+
"OBJECT": [
|
247 |
+
"_stage_",
|
248 |
+
null
|
249 |
+
]
|
250 |
+
},
|
251 |
+
"shadow": true,
|
252 |
+
"topLevel": false
|
253 |
+
},
|
254 |
+
"sensing_current": {
|
255 |
+
"opcode": "sensing_current",
|
256 |
+
"next": null,
|
257 |
+
"parent": null,
|
258 |
+
"inputs": {},
|
259 |
+
"fields": {
|
260 |
+
"CURRENTMENU": [
|
261 |
+
"YEAR",
|
262 |
+
null
|
263 |
+
]
|
264 |
+
},
|
265 |
+
"shadow": false,
|
266 |
+
"topLevel": true,
|
267 |
+
"x": 627,
|
268 |
+
"y": 884
|
269 |
+
},
|
270 |
+
"sensing_dayssince2000": {
|
271 |
+
"opcode": "sensing_dayssince2000",
|
272 |
+
"next": null,
|
273 |
+
"parent": null,
|
274 |
+
"inputs": {},
|
275 |
+
"fields": {},
|
276 |
+
"shadow": false,
|
277 |
+
"topLevel": true,
|
278 |
+
"x": 959,
|
279 |
+
"y": 903
|
280 |
+
},
|
281 |
+
"sensing_username": {
|
282 |
+
"opcode": "sensing_username",
|
283 |
+
"next": null,
|
284 |
+
"parent": null,
|
285 |
+
"inputs": {},
|
286 |
+
"fields": {},
|
287 |
+
"shadow": false,
|
288 |
+
"topLevel": true,
|
289 |
+
"x": 833,
|
290 |
+
"y": 757
|
291 |
+
}
|
292 |
+
}
|
blocks/classwise_blocks/sound_block.json
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"sound_playuntildone": {
|
3 |
+
"opcode": "sound_playuntildone",
|
4 |
+
"next": null,
|
5 |
+
"parent": null,
|
6 |
+
"inputs": {
|
7 |
+
"SOUND_MENU": [
|
8 |
+
1,
|
9 |
+
"sound_sounds_menu"
|
10 |
+
]
|
11 |
+
},
|
12 |
+
"fields": {},
|
13 |
+
"shadow": false,
|
14 |
+
"topLevel": true,
|
15 |
+
"x": 253,
|
16 |
+
"y": 17
|
17 |
+
},
|
18 |
+
"sound_sounds_menu": {
|
19 |
+
"opcode": "sound_sounds_menu",
|
20 |
+
"next": null,
|
21 |
+
"parent": "sound_playuntildone and sound_play",
|
22 |
+
"inputs": {},
|
23 |
+
"fields": {
|
24 |
+
"SOUND_MENU": [
|
25 |
+
"Meow",
|
26 |
+
null
|
27 |
+
]
|
28 |
+
},
|
29 |
+
"shadow": true,
|
30 |
+
"topLevel": false
|
31 |
+
},
|
32 |
+
"sound_play": {
|
33 |
+
"opcode": "sound_play",
|
34 |
+
"next": null,
|
35 |
+
"parent": null,
|
36 |
+
"inputs": {
|
37 |
+
"SOUND_MENU": [
|
38 |
+
1,
|
39 |
+
"sound_sounds_menu"
|
40 |
+
]
|
41 |
+
},
|
42 |
+
"fields": {},
|
43 |
+
"shadow": false,
|
44 |
+
"topLevel": true,
|
45 |
+
"x": 245,
|
46 |
+
"y": 122
|
47 |
+
},
|
48 |
+
"sound_stopallsounds": {
|
49 |
+
"opcode": "sound_stopallsounds",
|
50 |
+
"next": null,
|
51 |
+
"parent": null,
|
52 |
+
"inputs": {},
|
53 |
+
"fields": {},
|
54 |
+
"shadow": false,
|
55 |
+
"topLevel": true,
|
56 |
+
"x": 253,
|
57 |
+
"y": 245
|
58 |
+
},
|
59 |
+
"sound_changeeffectby": {
|
60 |
+
"opcode": "sound_changeeffectby",
|
61 |
+
"next": null,
|
62 |
+
"parent": null,
|
63 |
+
"inputs": {
|
64 |
+
"VALUE": [
|
65 |
+
1,
|
66 |
+
[
|
67 |
+
4,
|
68 |
+
"10"
|
69 |
+
]
|
70 |
+
]
|
71 |
+
},
|
72 |
+
"fields": {
|
73 |
+
"EFFECT": [
|
74 |
+
"PITCH",
|
75 |
+
null
|
76 |
+
]
|
77 |
+
},
|
78 |
+
"shadow": false,
|
79 |
+
"topLevel": true,
|
80 |
+
"x": 653,
|
81 |
+
"y": 14
|
82 |
+
},
|
83 |
+
"sound_seteffectto": {
|
84 |
+
"opcode": "sound_seteffectto",
|
85 |
+
"next": null,
|
86 |
+
"parent": null,
|
87 |
+
"inputs": {
|
88 |
+
"VALUE": [
|
89 |
+
1,
|
90 |
+
[
|
91 |
+
4,
|
92 |
+
"100"
|
93 |
+
]
|
94 |
+
]
|
95 |
+
},
|
96 |
+
"fields": {
|
97 |
+
"EFFECT": [
|
98 |
+
"PITCH",
|
99 |
+
null
|
100 |
+
]
|
101 |
+
},
|
102 |
+
"shadow": false,
|
103 |
+
"topLevel": true,
|
104 |
+
"x": 653,
|
105 |
+
"y": 139
|
106 |
+
},
|
107 |
+
"sound_cleareffects": {
|
108 |
+
"opcode": "sound_cleareffects",
|
109 |
+
"next": null,
|
110 |
+
"parent": null,
|
111 |
+
"inputs": {},
|
112 |
+
"fields": {},
|
113 |
+
"shadow": false,
|
114 |
+
"topLevel": true,
|
115 |
+
"x": 651,
|
116 |
+
"y": 242
|
117 |
+
},
|
118 |
+
"sound_changevolumeby": {
|
119 |
+
"opcode": "sound_changevolumeby",
|
120 |
+
"next": null,
|
121 |
+
"parent": null,
|
122 |
+
"inputs": {
|
123 |
+
"VOLUME": [
|
124 |
+
1,
|
125 |
+
[
|
126 |
+
4,
|
127 |
+
"-10"
|
128 |
+
]
|
129 |
+
]
|
130 |
+
},
|
131 |
+
"fields": {},
|
132 |
+
"shadow": false,
|
133 |
+
"topLevel": true,
|
134 |
+
"x": 645,
|
135 |
+
"y": 353
|
136 |
+
},
|
137 |
+
"sound_setvolumeto": {
|
138 |
+
"opcode": "sound_setvolumeto",
|
139 |
+
"next": null,
|
140 |
+
"parent": null,
|
141 |
+
"inputs": {
|
142 |
+
"VOLUME": [
|
143 |
+
1,
|
144 |
+
[
|
145 |
+
4,
|
146 |
+
"100"
|
147 |
+
]
|
148 |
+
]
|
149 |
+
},
|
150 |
+
"fields": {},
|
151 |
+
"shadow": false,
|
152 |
+
"topLevel": true,
|
153 |
+
"x": 1108,
|
154 |
+
"y": 5
|
155 |
+
},
|
156 |
+
"sound_volume": {
|
157 |
+
"opcode": "sound_volume",
|
158 |
+
"next": null,
|
159 |
+
"parent": null,
|
160 |
+
"inputs": {},
|
161 |
+
"fields": {},
|
162 |
+
"shadow": false,
|
163 |
+
"topLevel": true,
|
164 |
+
"x": 1136,
|
165 |
+
"y": 123
|
166 |
+
}
|
167 |
+
}
|
blocks/embeddings.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
blocks/excel_contetn/hat_block.xlsx
ADDED
Binary file (10.5 kB). View file
|
|
blocks/excel_contetn/stack_block.xlsx
ADDED
Binary file (12.5 kB). View file
|
|
blocks/hat_blocks.json
ADDED
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"block_category": "Hat Blocks",
|
3 |
+
"description": "Hat blocks are characterized by a rounded top and a bump at the bottom. They initiate scripts, meaning they are the starting point for a sequence of interconnected blocks.",
|
4 |
+
"blocks": [
|
5 |
+
{
|
6 |
+
"block_name": "when green flag pressed",
|
7 |
+
"block_type": "Events",
|
8 |
+
"op_code": "event_whenflagclicked",
|
9 |
+
"block_shape": "Hat Block",
|
10 |
+
"functionality": "This Hat block initiates the script when the green flag is clicked, serving as the common starting point for most Scratch projects.",
|
11 |
+
"inputs": null,
|
12 |
+
"example_standalone": "when green flag clicked",
|
13 |
+
"example_with_other_blocks": [
|
14 |
+
{
|
15 |
+
"script": "when green flag clicked\n go to x: (0) y: (0)\n say [Hello!] for (2) seconds\nend",
|
16 |
+
"explanation": "This script makes the sprite go to the center of the stage and then say 'Hello!' for 2 seconds when the green flag is clicked."
|
17 |
+
}
|
18 |
+
]
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"block_name": "when () key pressed",
|
22 |
+
"block_type": "Events",
|
23 |
+
"op_code": "event_whenkeypressed",
|
24 |
+
"block_shape": "Hat Block",
|
25 |
+
"functionality": "This Hat block initiates the script when a specified keyboard key is pressed.",
|
26 |
+
"inputs": [
|
27 |
+
{
|
28 |
+
"name": "key",
|
29 |
+
"type": "dropdown",
|
30 |
+
"options": [
|
31 |
+
"space",
|
32 |
+
"up arrow",
|
33 |
+
"down arrow",
|
34 |
+
"right arrow",
|
35 |
+
"left arrow",
|
36 |
+
"any",
|
37 |
+
"a",
|
38 |
+
"b",
|
39 |
+
"c",
|
40 |
+
"d",
|
41 |
+
"e",
|
42 |
+
"f",
|
43 |
+
"g",
|
44 |
+
"h",
|
45 |
+
"i",
|
46 |
+
"j",
|
47 |
+
"k",
|
48 |
+
"l",
|
49 |
+
"m",
|
50 |
+
"n",
|
51 |
+
"o",
|
52 |
+
"p",
|
53 |
+
"q",
|
54 |
+
"r",
|
55 |
+
"s",
|
56 |
+
"t",
|
57 |
+
"u",
|
58 |
+
"v",
|
59 |
+
"w",
|
60 |
+
"x",
|
61 |
+
"y",
|
62 |
+
"z",
|
63 |
+
"0",
|
64 |
+
"1",
|
65 |
+
"2",
|
66 |
+
"3",
|
67 |
+
"4",
|
68 |
+
"5",
|
69 |
+
"6",
|
70 |
+
"7",
|
71 |
+
"8",
|
72 |
+
"9"
|
73 |
+
]
|
74 |
+
}
|
75 |
+
],
|
76 |
+
"example_standalone": "when [space v] key pressed",
|
77 |
+
"example_with_other_blocks": [
|
78 |
+
{
|
79 |
+
"script": "when [space v] key pressed\n repeat (10)\n change y by (10)\n wait (0.1) seconds\n change y by (-10)\n end",
|
80 |
+
"explanation": "This script makes the sprite jump when the spacebar is pressed."
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"script": "when [right arrow v] key pressed\n point in direction (90)\n move (10) steps\nend",
|
84 |
+
"explanation": "This script moves the sprite right when the right arrow key is pressed."
|
85 |
+
}
|
86 |
+
]
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"block_name": "when this sprite clicked",
|
90 |
+
"block_type": "Events",
|
91 |
+
"op_code": "event_whenthisspriteclicked",
|
92 |
+
"block_shape": "Hat Block",
|
93 |
+
"functionality": "This Hat block starts the script when the sprite itself is clicked.",
|
94 |
+
"inputs": null,
|
95 |
+
"example_standalone": "when this sprite clicked",
|
96 |
+
"example_with_other_blocks": [
|
97 |
+
{
|
98 |
+
"script": "when this sprite clicked\n say [Ouch!] for (1) seconds\n change [score v] by (-1)\nend",
|
99 |
+
"explanation": "This script makes the sprite say 'Ouch!' and decreases the score by 1 when the sprite is clicked."
|
100 |
+
}
|
101 |
+
]
|
102 |
+
},
|
103 |
+
{
|
104 |
+
"block_name": "when backdrop switches to ()",
|
105 |
+
"block_type": "Events",
|
106 |
+
"op_code": "event_whenbackdropswitchesto",
|
107 |
+
"block_shape": "Hat Block",
|
108 |
+
"functionality": "This Hat block triggers the script when the stage backdrop changes to a specified backdrop.",
|
109 |
+
"inputs": [
|
110 |
+
{
|
111 |
+
"name": "backdrop name",
|
112 |
+
"type": "dropdown",
|
113 |
+
"options": ["backdrop1", "backdrop2", "..."]
|
114 |
+
}
|
115 |
+
],
|
116 |
+
"example_standalone": "when backdrop switches to [game over v]",
|
117 |
+
"example_with_other_blocks": [
|
118 |
+
{
|
119 |
+
"script": "when backdrop switches to [game over v]\n stop [all v]\nend",
|
120 |
+
"explanation": "This script stops all running processes when the backdrop changes to 'game over'."
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"script": "when backdrop switches to [level completed v]\n stop [all v]\nend",
|
124 |
+
"explanation": "This script stops all running processes when the backdrop changes to 'level completed'."
|
125 |
+
}
|
126 |
+
]
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"block_name": "when () > ()",
|
130 |
+
"block_type": "Events",
|
131 |
+
"op_code": "event_whengreaterthan",
|
132 |
+
"block_shape": "Hat Block",
|
133 |
+
"functionality": "This Hat block starts the script when a certain value (e.g., loudness from a microphone, or the timer) exceeds a defined threshold.",
|
134 |
+
"inputs": [
|
135 |
+
{
|
136 |
+
"name": "value type",
|
137 |
+
"type": "dropdown",
|
138 |
+
"options": [
|
139 |
+
"loudness",
|
140 |
+
"timer"
|
141 |
+
]
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"name": "threshold",
|
145 |
+
"type": "number"
|
146 |
+
}
|
147 |
+
],
|
148 |
+
"example_standalone": "when [loudness v] > (70)",
|
149 |
+
"example_with_other_blocks": [
|
150 |
+
{
|
151 |
+
"script": "when [loudness v] > (70)\n start sound [scream v]\nend",
|
152 |
+
"explanation": "This script starts a 'scream' sound when the microphone loudness exceeds 70."
|
153 |
+
}
|
154 |
+
]
|
155 |
+
},
|
156 |
+
{
|
157 |
+
"block_name": "when I receive ()",
|
158 |
+
"block_type": "Events",
|
159 |
+
"op_code": "event_whenbroadcastreceived",
|
160 |
+
"block_shape": "Hat Block",
|
161 |
+
"functionality": "This Hat block initiates the script upon the reception of a specific broadcast message. This mechanism facilitates indirect communication between sprites or the stage.",
|
162 |
+
"inputs": [
|
163 |
+
{
|
164 |
+
"name": "message name",
|
165 |
+
"type": "dropdown",
|
166 |
+
"options": ["message1", "message2", "new message..."]
|
167 |
+
}
|
168 |
+
],
|
169 |
+
"example_standalone": "when I receive [start game v]",
|
170 |
+
"example_with_other_blocks": [
|
171 |
+
{
|
172 |
+
"script": "when I receive [start game v]\n show\n go to x: (0) y: (0)\nend",
|
173 |
+
"explanation": "This script makes the sprite visible and moves it to the center of the stage when it receives the 'start game' broadcast."
|
174 |
+
},
|
175 |
+
{
|
176 |
+
"script": "when I receive [game over v]\n set score to 0\n stop [all v]\nend",
|
177 |
+
"explanation": "This script stops all and resets the score on stage when it receives the 'game over' broadcast."
|
178 |
+
}
|
179 |
+
]
|
180 |
+
},
|
181 |
+
{
|
182 |
+
"block_name": "When I Start as a Clone",
|
183 |
+
"block_type": "Control",
|
184 |
+
"op_code": "control_start_as_clone",
|
185 |
+
"block_shape": "Hat Block",
|
186 |
+
"functionality": "This Hat block initiates the script when a clone of the sprite is created. It defines the behavior of individual clones.",
|
187 |
+
"inputs": null,
|
188 |
+
"example_standalone": "When I Start as a Clone",
|
189 |
+
"example_with_other_blocks": [
|
190 |
+
{
|
191 |
+
"script": "when I start as a clone\n go to x: (pick random -240 to 240) y: (pick random -180 to 180)\n show\n forever\n move (10) steps\n if on edge, bounce\n end\nend",
|
192 |
+
"explanation": "This script makes a newly created clone appear at a random position, become visible, and then continuously move 10 steps, bouncing if it hits an edge."
|
193 |
+
}
|
194 |
+
]
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"block_name": "define [my custom block]",
|
198 |
+
"block_type": "My Blocks",
|
199 |
+
"op_code": "procedures_definition",
|
200 |
+
"block_shape": "Hat Block",
|
201 |
+
"functionality": "This Hat block serves as the definition header for a custom block's script. It allows users to define reusable sequences of code by specifying the block's name and any input parameters it will accept. This promotes modularity and abstraction in projects.",
|
202 |
+
"inputs": [
|
203 |
+
{
|
204 |
+
"name": "PROCCONTAINER",
|
205 |
+
"type": "block_prototype"
|
206 |
+
}
|
207 |
+
],
|
208 |
+
"example_standalone": "define jump (height)",
|
209 |
+
"example_with_other_blocks": [
|
210 |
+
{
|
211 |
+
"script": "define jump (height)\n change y by (height)\n wait (0.5) seconds\n change y by (0 - (height))\nend\n\nwhen green flag clicked\n jump (50)\nend",
|
212 |
+
"explanation": "This script first defines a custom block named 'jump' that takes a numerical input 'height'. The definition outlines the actions for jumping up and then down. Later, 'jump (50)' is called to make the sprite jump 50 units."
|
213 |
+
}
|
214 |
+
]
|
215 |
+
}
|
216 |
+
]
|
217 |
+
}
|
blocks/reporter_blocks.json
ADDED
@@ -0,0 +1,709 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"block_category": "Reporter Blocks",
|
3 |
+
"description": "Reporter blocks have rounded edges. Their purpose is to report values, which can be numbers or strings, and are designed to fit into input slots of other blocks.",
|
4 |
+
"blocks": [
|
5 |
+
{
|
6 |
+
"block_name": "(x position)",
|
7 |
+
"block_type": "Motion",
|
8 |
+
"op_code": "motion_xposition",
|
9 |
+
"block_shape": "Reporter Block",
|
10 |
+
"functionality": "Reports the current X-coordinate of the sprite.[NOTE: not used in stage/backdrops]",
|
11 |
+
"inputs": null,
|
12 |
+
"example_standalone": "x position",
|
13 |
+
"example_with_other_blocks": [
|
14 |
+
{
|
15 |
+
"script": "when green flag clicked\n say (x position) for (2) seconds\nend",
|
16 |
+
"explanation": "This script makes the sprite say its current X-coordinate for 2 seconds."
|
17 |
+
}
|
18 |
+
]
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"block_name": "(y position)",
|
22 |
+
"block_type": "Motion",
|
23 |
+
"op_code": "motion_yposition",
|
24 |
+
"block_shape": "Reporter Block",
|
25 |
+
"functionality": "Reports the current Y coordinate of the sprite on the stage.[NOTE: not used in stage/backdrops]",
|
26 |
+
"inputs": null,
|
27 |
+
"example_standalone": "y position",
|
28 |
+
"example_with_other_blocks": [
|
29 |
+
{
|
30 |
+
"script": "set [worms v] to (y position)",
|
31 |
+
"explanation": "This script assigns the sprite's current Y position to the 'worms' variable."
|
32 |
+
}
|
33 |
+
]
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"block_name": "(direction)",
|
37 |
+
"block_type": "Motion",
|
38 |
+
"op_code": "motion_direction",
|
39 |
+
"block_shape": "Reporter Block",
|
40 |
+
"functionality": "Reports the current direction of the sprite in degrees (0 = up, 90 = right, 180 = down, -90 = left).[NOTE: not used in stage/backdrops]",
|
41 |
+
"inputs": null,
|
42 |
+
"example_standalone": "direction",
|
43 |
+
"example_with_other_blocks": [
|
44 |
+
{
|
45 |
+
"script": "when green flag clicked\n say (direction) for (2) seconds\nend",
|
46 |
+
"explanation": "This script makes the sprite say its current direction in degrees for 2 seconds."
|
47 |
+
}
|
48 |
+
]
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"block_name": "(costume ())",
|
52 |
+
"block_type": "Looks",
|
53 |
+
"op_code": "looks_costumenumbername",
|
54 |
+
"block_shape": "Reporter Block",
|
55 |
+
"functionality": "Reports the current costume's number or name.",
|
56 |
+
"inputs": [
|
57 |
+
{
|
58 |
+
"name": "NUMBER_NAME",
|
59 |
+
"type": "dropdown",
|
60 |
+
"options": [
|
61 |
+
"number",
|
62 |
+
"name"
|
63 |
+
]
|
64 |
+
}
|
65 |
+
],
|
66 |
+
"example_standalone": "costume [number v]",
|
67 |
+
"example_with_other_blocks": [
|
68 |
+
{
|
69 |
+
"script": "say join [I am costume ] (costume [name v])",
|
70 |
+
"explanation": "This script makes the sprite display its current costume name in a speech bubble."
|
71 |
+
}
|
72 |
+
]
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"block_name": "(size)",
|
76 |
+
"block_type": "Looks",
|
77 |
+
"op_code": "looks_size",
|
78 |
+
"block_shape": "Reporter Block",
|
79 |
+
"functionality": "Reports the current size of the sprite as a percentage.",
|
80 |
+
"inputs": null,
|
81 |
+
"example_standalone": "size",
|
82 |
+
"example_with_other_blocks": [
|
83 |
+
{
|
84 |
+
"script": "set size to ( (size) + (10) )",
|
85 |
+
"explanation": "This script increases the sprite's size by 10% from its current size."
|
86 |
+
}
|
87 |
+
]
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"block_name": "(backdrop ())",
|
91 |
+
"block_type": "Looks",
|
92 |
+
"op_code": "looks_backdropnumbername",
|
93 |
+
"block_shape": "Reporter Block",
|
94 |
+
"functionality": "Reports the current backdrop's number or name.",
|
95 |
+
"inputs": [
|
96 |
+
{
|
97 |
+
"name": "NUMBER_NAME",
|
98 |
+
"type": "dropdown",
|
99 |
+
"options": [
|
100 |
+
"number",
|
101 |
+
"name"
|
102 |
+
]
|
103 |
+
}
|
104 |
+
],
|
105 |
+
"example_standalone": "(backdrop [number v])",
|
106 |
+
"example_with_other_blocks": [
|
107 |
+
{
|
108 |
+
"script": "say join [Current backdrop: ] (backdrop [name v]) for (2) seconds",
|
109 |
+
"explanation": "This script makes the sprite say the name of the current stage backdrop for 2 seconds."
|
110 |
+
}
|
111 |
+
]
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"block_name": "(volume)",
|
115 |
+
"block_type": "Sound",
|
116 |
+
"op_code": "sound_volume",
|
117 |
+
"block_shape": "Reporter Block",
|
118 |
+
"functionality": "Reports the current volume level of the sprite.",
|
119 |
+
"inputs": null,
|
120 |
+
"example_standalone": "volume",
|
121 |
+
"example_with_other_blocks": [
|
122 |
+
{
|
123 |
+
"script": "say join [Current volume: ] (volume)",
|
124 |
+
"explanation": "This script makes the sprite display its current volume level in a speech bubble."
|
125 |
+
}
|
126 |
+
]
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"block_name": "(distance to ())",
|
130 |
+
"block_type": "Sensing",
|
131 |
+
"op_code": "sensing_distanceto",
|
132 |
+
"block_shape": "Reporter Block",
|
133 |
+
"functionality": "Reports the distance from the current sprite to the mouse-pointer or another specified sprite.",
|
134 |
+
"inputs": [
|
135 |
+
{
|
136 |
+
"name": "target",
|
137 |
+
"type": "dropdown",
|
138 |
+
"options": ["mouse-pointer", "Sprite1", "Sprite2", "...", "_edge_"]
|
139 |
+
}
|
140 |
+
],
|
141 |
+
"example_standalone": "distance to [mouse-pointer v]",
|
142 |
+
"example_with_other_blocks": [
|
143 |
+
{
|
144 |
+
"script": "if <(distance to [Sprite2 v]) < (50)> then\n say [Too close!]\nend",
|
145 |
+
"explanation": "This script makes the sprite say 'Too close!' if it is less than 50 steps away from 'Sprite2'."
|
146 |
+
}
|
147 |
+
]
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"block_name": "(answer)",
|
151 |
+
"block_type": "Sensing",
|
152 |
+
"op_code": "sensing_answer",
|
153 |
+
"block_shape": "Reporter Block",
|
154 |
+
"functionality": "Holds the most recent text inputted using the 'Ask () and Wait' block.",
|
155 |
+
"inputs": null,
|
156 |
+
"example_standalone": "answer",
|
157 |
+
"example_with_other_blocks": [
|
158 |
+
{
|
159 |
+
"script": "ask [What is your name?] and wait\n say join [Hello ] (answer)",
|
160 |
+
"explanation": "This script prompts the user for their name and then uses the 'answer' block to incorporate their input into a greeting."
|
161 |
+
}
|
162 |
+
]
|
163 |
+
},
|
164 |
+
{
|
165 |
+
"block_name": "(mouse x)",
|
166 |
+
"block_type": "Sensing",
|
167 |
+
"op_code": "sensing_mousex",
|
168 |
+
"block_shape": "Reporter Block",
|
169 |
+
"functionality": "Reports the mouse-pointer’s current X position on the stage.",
|
170 |
+
"inputs": null,
|
171 |
+
"example_standalone": "mouse x",
|
172 |
+
"example_with_other_blocks": [
|
173 |
+
{
|
174 |
+
"script": "go to x: (mouse x) y: (mouse y)",
|
175 |
+
"explanation": "This script makes the sprite follow the mouse pointer's X and Y coordinates."
|
176 |
+
}
|
177 |
+
]
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"block_name": "(mouse y)",
|
181 |
+
"block_type": "Sensing",
|
182 |
+
"op_code": "sensing_mousey",
|
183 |
+
"block_shape": "Reporter Block",
|
184 |
+
"functionality": "Reports the mouse-pointer’s current Y position on the stage.",
|
185 |
+
"inputs": null,
|
186 |
+
"example_standalone": "mouse y",
|
187 |
+
"example_with_other_blocks": [
|
188 |
+
{
|
189 |
+
"script": "if <(mouse y) < (0)> then\n say [Below center]",
|
190 |
+
"explanation": "This script makes the sprite say 'Below center' if the mouse pointer is in the lower half of the stage."
|
191 |
+
}
|
192 |
+
]
|
193 |
+
},
|
194 |
+
{
|
195 |
+
"block_name": "(loudness)",
|
196 |
+
"block_type": "Sensing",
|
197 |
+
"op_code": "sensing_loudness",
|
198 |
+
"block_shape": "Reporter Block",
|
199 |
+
"functionality": "Reports the loudness of noise received by a microphone on a scale of 0 to 100.",
|
200 |
+
"inputs": null,
|
201 |
+
"example_standalone": "loudness",
|
202 |
+
"example_with_other_blocks": [
|
203 |
+
{
|
204 |
+
"script": "when green flag clicked\n forever\n if <(loudness) > (30)> then\n start sound [pop v]\nend",
|
205 |
+
"explanation": "This script continuously checks the microphone loudness and plays a 'pop' sound if it exceeds 30."
|
206 |
+
}
|
207 |
+
]
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"block_name": "(timer)",
|
211 |
+
"block_type": "Sensing",
|
212 |
+
"op_code": "sensing_timer",
|
213 |
+
"block_shape": "Reporter Block",
|
214 |
+
"functionality": "Reports the elapsed time since Scratch was launched or the timer was reset, increasing by 1 every second.",
|
215 |
+
"inputs": null,
|
216 |
+
"example_standalone": "timer",
|
217 |
+
"example_with_other_blocks": [
|
218 |
+
{
|
219 |
+
"script": "when green flag clicked\n reset timer\n wait (5) seconds\n say join [Time elapsed: ] (timer)",
|
220 |
+
"explanation": "This script resets the timer when the green flag is clicked, waits for 5 seconds, and then reports the elapsed time."
|
221 |
+
}
|
222 |
+
]
|
223 |
+
},
|
224 |
+
{
|
225 |
+
"block_name": "(() of ())",
|
226 |
+
"block_type": "Sensing",
|
227 |
+
"op_code": "sensing_of",
|
228 |
+
"block_shape": "Reporter Block",
|
229 |
+
"functionality": "Reports a specified value (e.g., x position, direction, costume number) of a specified sprite or the Stage to be accessed in current sprite or stage.",
|
230 |
+
"inputs": [
|
231 |
+
{
|
232 |
+
"name": "value to report",
|
233 |
+
"type": "dropdown",
|
234 |
+
"options": [
|
235 |
+
"x position",
|
236 |
+
"y position",
|
237 |
+
"direction",
|
238 |
+
"costume #",
|
239 |
+
"costume name",
|
240 |
+
"size",
|
241 |
+
"volume",
|
242 |
+
"backdrop #",
|
243 |
+
"backdrop name"
|
244 |
+
]
|
245 |
+
},
|
246 |
+
{
|
247 |
+
"name": "sprite/stage",
|
248 |
+
"type": "dropdown",
|
249 |
+
"options": ["Stage", "Sprite1", "Sprite2", "...", "_edge_"]
|
250 |
+
}
|
251 |
+
],
|
252 |
+
"example_standalone": "x position of [Sprite1 v]",
|
253 |
+
"example_with_other_blocks": [
|
254 |
+
{
|
255 |
+
"script": "set [other sprite X v] to ( (x position) of [Sprite2 v] )",
|
256 |
+
"explanation": "This script sets the 'other sprite X' variable to the current X-position of 'Sprite2'."
|
257 |
+
}
|
258 |
+
]
|
259 |
+
},
|
260 |
+
{
|
261 |
+
"block_name": "(current ())",
|
262 |
+
"block_type": "Sensing",
|
263 |
+
"op_code": "sensing_current",
|
264 |
+
"block_shape": "Reporter Block",
|
265 |
+
"functionality": "Reports the current local year, month, date, day of the week, hour, minutes, or seconds.",
|
266 |
+
"inputs": [
|
267 |
+
{
|
268 |
+
"name": "time unit",
|
269 |
+
"type": "dropdown",
|
270 |
+
"options": [
|
271 |
+
"year",
|
272 |
+
"month",
|
273 |
+
"date",
|
274 |
+
"day of week",
|
275 |
+
"hour",
|
276 |
+
"minute",
|
277 |
+
"second"
|
278 |
+
]
|
279 |
+
}
|
280 |
+
],
|
281 |
+
"example_standalone": "current [hour v]",
|
282 |
+
"example_with_other_blocks": [
|
283 |
+
{
|
284 |
+
"script": "say join [The current hour is ] (current [hour v])",
|
285 |
+
"explanation": "This script makes the sprite say the current hour."
|
286 |
+
}
|
287 |
+
]
|
288 |
+
},
|
289 |
+
{
|
290 |
+
"block_name": "(days since 2000)",
|
291 |
+
"block_type": "Sensing",
|
292 |
+
"op_code": "sensing_dayssince2000",
|
293 |
+
"block_shape": "Reporter Block",
|
294 |
+
"functionality": "Reports the number of days (and fractions of a day) since 00:00:00 UTC on January 1, 2000.",
|
295 |
+
"inputs": null,
|
296 |
+
"example_standalone": "days since 2000",
|
297 |
+
"example_with_other_blocks": [
|
298 |
+
{
|
299 |
+
"script": "say join [Days passed: ] (days since 2000)",
|
300 |
+
"explanation": "This script makes the sprite display the number of days that have passed since January 1, 2000."
|
301 |
+
}
|
302 |
+
]
|
303 |
+
},
|
304 |
+
{
|
305 |
+
"block_name": "(username)",
|
306 |
+
"block_type": "Sensing",
|
307 |
+
"op_code": "sensing_username",
|
308 |
+
"block_shape": "Reporter Block",
|
309 |
+
"functionality": "Reports the username of the user currently logged into Scratch. If no user is logged in, it reports nothing.",
|
310 |
+
"inputs": null,
|
311 |
+
"example_standalone": "username",
|
312 |
+
"example_with_other_blocks": [
|
313 |
+
{
|
314 |
+
"script": "say join [Hello, ] (username)",
|
315 |
+
"explanation": "This script makes the sprite greet the user by their Scratch username."
|
316 |
+
}
|
317 |
+
]
|
318 |
+
},
|
319 |
+
{
|
320 |
+
"block_name": "(() + ())",
|
321 |
+
"block_type": "operator",
|
322 |
+
"op_code": "operator_add",
|
323 |
+
"block_shape": "Reporter Block",
|
324 |
+
"functionality": "Adds two numerical values.",
|
325 |
+
"inputs": [
|
326 |
+
{
|
327 |
+
"name": "number1",
|
328 |
+
"type": "number"
|
329 |
+
},
|
330 |
+
{
|
331 |
+
"name": "number2",
|
332 |
+
"type": "number"
|
333 |
+
}
|
334 |
+
],
|
335 |
+
"example_standalone": "(5) + (3)",
|
336 |
+
"example_with_other_blocks": [
|
337 |
+
{
|
338 |
+
"script": "set [total v] to ( (number 1) + (number 2) )",
|
339 |
+
"explanation": "This script calculates the sum of 'number 1' and 'number 2' and stores the result in the 'total' variable."
|
340 |
+
}
|
341 |
+
]
|
342 |
+
},
|
343 |
+
{
|
344 |
+
"block_name": "(() - ())",
|
345 |
+
"block_type": "operator",
|
346 |
+
"op_code": "operator_subtract",
|
347 |
+
"block_shape": "Reporter Block",
|
348 |
+
"functionality": "Subtracts the second numerical value from the first.",
|
349 |
+
"inputs": [
|
350 |
+
{
|
351 |
+
"name": "number1",
|
352 |
+
"type": "number"
|
353 |
+
},
|
354 |
+
{
|
355 |
+
"name": "number2",
|
356 |
+
"type": "number"
|
357 |
+
}
|
358 |
+
],
|
359 |
+
"example_standalone": "((10) - (4))",
|
360 |
+
"example_with_other_blocks": [
|
361 |
+
{
|
362 |
+
"script": "set [difference v] to ( (number 1) - (number 2) )",
|
363 |
+
"explanation": "This script calculates the subtraction of 'number 2' from 'number 1' and stores the result in the 'difference' variable."
|
364 |
+
}
|
365 |
+
]
|
366 |
+
},
|
367 |
+
{
|
368 |
+
"block_name": "(() * ())",
|
369 |
+
"block_type": "operator",
|
370 |
+
"op_code": "operator_multiply",
|
371 |
+
"block_shape": "Reporter Block",
|
372 |
+
"functionality": "Multiplies two numerical values.",
|
373 |
+
"inputs": [
|
374 |
+
{
|
375 |
+
"name": "number1",
|
376 |
+
"type": "number"
|
377 |
+
},
|
378 |
+
{
|
379 |
+
"name": "number2",
|
380 |
+
"type": "number"
|
381 |
+
}
|
382 |
+
],
|
383 |
+
"example_standalone": "(6) * (7)",
|
384 |
+
"example_with_other_blocks": [
|
385 |
+
{
|
386 |
+
"script": "set [area v] to ( (length) * (width) )",
|
387 |
+
"explanation": "This script calculates the area by multiplying 'length' and 'width' variables and stores it in the 'area' variable."
|
388 |
+
}
|
389 |
+
]
|
390 |
+
},
|
391 |
+
{
|
392 |
+
"block_name": "(() / ())",
|
393 |
+
"block_type": "operator",
|
394 |
+
"op_code": "operator_divide",
|
395 |
+
"block_shape": "Reporter Block",
|
396 |
+
"functionality": "Divides the first numerical value by the second.",
|
397 |
+
"inputs": [
|
398 |
+
{
|
399 |
+
"name": "number1",
|
400 |
+
"type": "number"
|
401 |
+
},
|
402 |
+
{
|
403 |
+
"name": "number2",
|
404 |
+
"type": "number"
|
405 |
+
}
|
406 |
+
],
|
407 |
+
"example_standalone": "((20) / (5))",
|
408 |
+
"example_with_other_blocks": [
|
409 |
+
{
|
410 |
+
"script": "set [average v] to ( (total score) / (number of students) )",
|
411 |
+
"explanation": "This script calculates the average by dividing 'total score' by 'number of students' and stores it in the 'average' variable."
|
412 |
+
}
|
413 |
+
]
|
414 |
+
},
|
415 |
+
{
|
416 |
+
"block_name": "(pick random () to ())",
|
417 |
+
"block_type": "operator",
|
418 |
+
"op_code": "operator_random",
|
419 |
+
"block_shape": "Reporter Block",
|
420 |
+
"functionality": "Generates a random integer within a specified inclusive range.",
|
421 |
+
"inputs": [
|
422 |
+
{
|
423 |
+
"name": "min",
|
424 |
+
"type": "number"
|
425 |
+
},
|
426 |
+
{
|
427 |
+
"name": "max",
|
428 |
+
"type": "number"
|
429 |
+
}
|
430 |
+
],
|
431 |
+
"example_standalone": "(pick random (1) to (10))",
|
432 |
+
"example_with_other_blocks": [
|
433 |
+
{
|
434 |
+
"script": "go to x: (pick random -240 to 240) y: (pick random -180 to 180)",
|
435 |
+
"explanation": "This script moves the sprite to a random position on the stage."
|
436 |
+
}
|
437 |
+
]
|
438 |
+
},
|
439 |
+
{
|
440 |
+
"block_name": "(join ()())",
|
441 |
+
"block_type": "operator",
|
442 |
+
"op_code": "operator_join",
|
443 |
+
"block_shape": "Reporter Block",
|
444 |
+
"functionality": "Concatenates two strings or values into a single string.",
|
445 |
+
"inputs": [
|
446 |
+
{
|
447 |
+
"name": "string1",
|
448 |
+
"type": "string/number"
|
449 |
+
},
|
450 |
+
{
|
451 |
+
"name": "string2",
|
452 |
+
"type": "string/number"
|
453 |
+
}
|
454 |
+
],
|
455 |
+
"example_standalone": "(join [Hello ][World!])",
|
456 |
+
"example_with_other_blocks": [
|
457 |
+
{
|
458 |
+
"script": "say (join [Hello ][World!])",
|
459 |
+
"explanation": "This script makes the sprite display 'Hello World!' in a speech bubble by joining two string literals."
|
460 |
+
}
|
461 |
+
]
|
462 |
+
},
|
463 |
+
{
|
464 |
+
"block_name": "letter () of ()",
|
465 |
+
"block_type": "operator",
|
466 |
+
"op_code": "operator_letterof",
|
467 |
+
"block_shape": "Reporter Block",
|
468 |
+
"functionality": "Reports the character at a specific numerical position within a string.",
|
469 |
+
"inputs": [
|
470 |
+
{
|
471 |
+
"name": "index",
|
472 |
+
"type": "number"
|
473 |
+
},
|
474 |
+
{
|
475 |
+
"name": "text",
|
476 |
+
"type": "string"
|
477 |
+
}
|
478 |
+
],
|
479 |
+
"example_standalone": "(letter (1) of [apple])",
|
480 |
+
"example_with_other_blocks": [
|
481 |
+
{
|
482 |
+
"script": "say (letter (1) of [apple])",
|
483 |
+
"explanation": "This script makes the sprite display the first character of the string 'apple', which is 'a'."
|
484 |
+
}
|
485 |
+
]
|
486 |
+
},
|
487 |
+
{
|
488 |
+
"block_name": "(length of ())",
|
489 |
+
"block_type": "operator",
|
490 |
+
"op_code": "operator_length",
|
491 |
+
"block_shape": "Reporter Block",
|
492 |
+
"functionality": "Reports the total number of characters in a given string.",
|
493 |
+
"inputs": [
|
494 |
+
{
|
495 |
+
"name": "text",
|
496 |
+
"type": "string"
|
497 |
+
}
|
498 |
+
],
|
499 |
+
"example_standalone": "(length of [banana])",
|
500 |
+
"example_with_other_blocks": [
|
501 |
+
{
|
502 |
+
"script": "say (length of [banana])",
|
503 |
+
"explanation": "This script makes the sprite display the length of the string 'banana', which is 6."
|
504 |
+
}
|
505 |
+
]
|
506 |
+
},
|
507 |
+
{
|
508 |
+
"block_name": "(() mod ())",
|
509 |
+
"block_type": "operator",
|
510 |
+
"op_code": "operator_mod",
|
511 |
+
"block_shape": "Reporter Block",
|
512 |
+
"functionality": "Reports the remainder when the first number is divided by the second.",
|
513 |
+
"inputs": [
|
514 |
+
{
|
515 |
+
"name": "number1",
|
516 |
+
"type": "number"
|
517 |
+
},
|
518 |
+
{
|
519 |
+
"name": "number2",
|
520 |
+
"type": "number"
|
521 |
+
}
|
522 |
+
],
|
523 |
+
"example_standalone": "((10) mod (3))",
|
524 |
+
"example_with_other_blocks": [
|
525 |
+
{
|
526 |
+
"script": "if <([number v] mod (2) = (0))> then\n say [Even number]",
|
527 |
+
"explanation": "This script checks if a 'number' variable is even by checking if its remainder when divided by 2 is 0."
|
528 |
+
}
|
529 |
+
]
|
530 |
+
},
|
531 |
+
{
|
532 |
+
"block_name": "(round ())",
|
533 |
+
"block_type": "operator",
|
534 |
+
"op_code": "operator_round",
|
535 |
+
"block_shape": "Reporter Block",
|
536 |
+
"functionality": "Rounds a numerical value to the nearest integer.",
|
537 |
+
"inputs": [
|
538 |
+
{
|
539 |
+
"name": "number",
|
540 |
+
"type": "number"
|
541 |
+
}
|
542 |
+
],
|
543 |
+
"example_standalone": "(round (3.7))",
|
544 |
+
"example_with_other_blocks": [
|
545 |
+
{
|
546 |
+
"script": "set [rounded score v] to (round (score))",
|
547 |
+
"explanation": "This script rounds the 'score' variable to the nearest whole number and stores it in 'rounded score'."
|
548 |
+
}
|
549 |
+
]
|
550 |
+
},
|
551 |
+
{
|
552 |
+
"block_name": "(() of ())",
|
553 |
+
"block_type": "operator",
|
554 |
+
"op_code": "operator_mathop",
|
555 |
+
"block_shape": "Reporter Block",
|
556 |
+
"functionality": "Performs various mathematical functions (e.g., absolute value, square root, trigonometric functions).",
|
557 |
+
"inputs": [
|
558 |
+
{
|
559 |
+
"name": "function type",
|
560 |
+
"type": "dropdown",
|
561 |
+
"options": [
|
562 |
+
"abs",
|
563 |
+
"floor",
|
564 |
+
"ceiling",
|
565 |
+
"sqrt",
|
566 |
+
"sin",
|
567 |
+
"cos",
|
568 |
+
"tan",
|
569 |
+
"asin",
|
570 |
+
"acos",
|
571 |
+
"atan",
|
572 |
+
"ln",
|
573 |
+
"log",
|
574 |
+
"e ^",
|
575 |
+
"10 ^"
|
576 |
+
]
|
577 |
+
},
|
578 |
+
{
|
579 |
+
"name": "value",
|
580 |
+
"type": "number"
|
581 |
+
}
|
582 |
+
],
|
583 |
+
"example_standalone": "([sqrt v] of (25))",
|
584 |
+
"example_with_other_blocks": [
|
585 |
+
{
|
586 |
+
"script": "set [distance v] to ([sqrt v] of ( ( (x position) * (x position) ) + ( (y position) * (y position) ) ))",
|
587 |
+
"explanation": "This script calculates the distance from the origin (0,0) using the Pythagorean theorem and stores it in 'distance'."
|
588 |
+
}
|
589 |
+
]
|
590 |
+
},
|
591 |
+
{
|
592 |
+
"block_name": "[variable v]",
|
593 |
+
"block_type": "Data",
|
594 |
+
"op_code": "data_variable",
|
595 |
+
"block_shape": "Reporter Block",
|
596 |
+
"functionality": "Provides the current value stored in a variable.",
|
597 |
+
"inputs": [
|
598 |
+
{
|
599 |
+
"name": "variable name",
|
600 |
+
"type": "dropdown",
|
601 |
+
"options": ["my variable", "score", "..."]
|
602 |
+
}
|
603 |
+
],
|
604 |
+
"example_standalone": "[score v]",
|
605 |
+
"example_with_other_blocks": [
|
606 |
+
{
|
607 |
+
"script": "say ([score v]) for (2) seconds",
|
608 |
+
"explanation": "This script makes the sprite say the current value of the 'score' variable for 2 seconds."
|
609 |
+
}
|
610 |
+
]
|
611 |
+
},
|
612 |
+
{
|
613 |
+
"block_name": "[list v]",
|
614 |
+
"block_type": "Data",
|
615 |
+
"op_code": "data_list",
|
616 |
+
"block_shape": "Reporter Block",
|
617 |
+
"functionality": "Reports the entire content of a specified list. When clicked in the editor, it displays the list as a monitor.",
|
618 |
+
"inputs": [
|
619 |
+
{
|
620 |
+
"name": "list name",
|
621 |
+
"type": "dropdown",
|
622 |
+
"options": ["my list", "list2", "..."]
|
623 |
+
}
|
624 |
+
],
|
625 |
+
"example_standalone": "[my list v]",
|
626 |
+
"example_with_other_blocks": [
|
627 |
+
{
|
628 |
+
"script": "say ([my list v]) ",
|
629 |
+
"explanation": "This script makes the sprite say all the contents of 'my list'."
|
630 |
+
}
|
631 |
+
]
|
632 |
+
},
|
633 |
+
{
|
634 |
+
"block_name": "(item (2) of [myList v])",
|
635 |
+
"block_type": "Data",
|
636 |
+
"op_code": "data_itemoflist",
|
637 |
+
"block_shape": "Reporter Block",
|
638 |
+
"functionality": "Reports the item located at a specific position in a list.",
|
639 |
+
"inputs": [
|
640 |
+
{
|
641 |
+
"name": "index/option",
|
642 |
+
"type": "number or dropdown",
|
643 |
+
"options": [
|
644 |
+
"last",
|
645 |
+
"random"
|
646 |
+
]
|
647 |
+
},
|
648 |
+
{
|
649 |
+
"name": "list name",
|
650 |
+
"type": "dropdown",
|
651 |
+
"options": ["shopping list", "my list", "..."]
|
652 |
+
}
|
653 |
+
],
|
654 |
+
"example_standalone": "item (1) of [shopping list v]",
|
655 |
+
"example_with_other_blocks": [
|
656 |
+
{
|
657 |
+
"script": "say (item (2) of [myList v]) for 2 seconds ",
|
658 |
+
"explanation": "This script makes the sprite display the first item from the 'shopping list'."
|
659 |
+
}
|
660 |
+
]
|
661 |
+
},
|
662 |
+
{
|
663 |
+
"block_name": "(length of [myList v])",
|
664 |
+
"block_type": "Data",
|
665 |
+
"op_code": "data_lengthoflist",
|
666 |
+
"block_shape": "Reporter Block",
|
667 |
+
"functionality": "Provides the total number of items contained in a list.",
|
668 |
+
"inputs": [
|
669 |
+
{
|
670 |
+
"name": "list name",
|
671 |
+
"type": "dropdown",
|
672 |
+
"options": ["my list", "shopping list", "..."]
|
673 |
+
}
|
674 |
+
],
|
675 |
+
"example_standalone": "(length of [myList v])",
|
676 |
+
"example_with_other_blocks": [
|
677 |
+
{
|
678 |
+
"script": "say join (length of [shopping list v]) [ items in the list.]",
|
679 |
+
"explanation": "This script makes the sprite display the total number of items currently in the 'shopping list'."
|
680 |
+
}
|
681 |
+
]
|
682 |
+
},
|
683 |
+
{
|
684 |
+
"block_name": "(item # of [Dog] in [myList v])",
|
685 |
+
"block_type": "Data",
|
686 |
+
"op_code": "data_itemnumoflist",
|
687 |
+
"block_shape": "Reporter Block",
|
688 |
+
"functionality": "Reports the index number of the first occurrence of a specified item in a list. If the item is not found, it reports 0.",
|
689 |
+
"inputs": [
|
690 |
+
{
|
691 |
+
"name": "item",
|
692 |
+
"type": "string/number"
|
693 |
+
},
|
694 |
+
{
|
695 |
+
"name": "list name",
|
696 |
+
"type": "dropdown",
|
697 |
+
"options": ["my list", "shopping list", "..."]
|
698 |
+
}
|
699 |
+
],
|
700 |
+
"example_standalone": "(item # of [apple] in [shopping list v])",
|
701 |
+
"example_with_other_blocks": [
|
702 |
+
{
|
703 |
+
"script": "if <(item # of [Dog] in [myList v])> (0)> then\n say join [Dog found at position ] (item # of [Dog] in [my list v])",
|
704 |
+
"explanation": "This script checks if 'banana' is in 'my list' and, if so, reports its position."
|
705 |
+
}
|
706 |
+
]
|
707 |
+
}
|
708 |
+
]
|
709 |
+
}
|
blocks/sprites/Batter.sprite3/592ee9ab2aeefe65cb4fb95fcd046f33.svg
ADDED
|
blocks/sprites/Batter.sprite3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/sprites/Batter.sprite3/9d193bef6e3d6d8eba6d1470b8bf9351.svg
ADDED
|
blocks/sprites/Batter.sprite3/baseball_sprite_motion_1.png
ADDED
![]() |
blocks/sprites/Batter.sprite3/bd4fc003528acfa847e45ff82f346eee.svg
ADDED
|
blocks/sprites/Batter.sprite3/fdfde4bcbaca0f68e83fdf3f4ef0c660.svg
ADDED
|
blocks/sprites/Batter.sprite3/sprite.json
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"isStage": false,
|
3 |
+
"name": "Batter",
|
4 |
+
"variables": {},
|
5 |
+
"lists": {},
|
6 |
+
"broadcasts": {},
|
7 |
+
"blocks": {},
|
8 |
+
"comments": {},
|
9 |
+
"currentCostume": 0,
|
10 |
+
"costumes": [
|
11 |
+
{
|
12 |
+
"name": "batter-a",
|
13 |
+
"bitmapResolution": 1,
|
14 |
+
"dataFormat": "svg",
|
15 |
+
"assetId": "9d193bef6e3d6d8eba6d1470b8bf9351",
|
16 |
+
"md5ext": "9d193bef6e3d6d8eba6d1470b8bf9351.svg",
|
17 |
+
"rotationCenterX": 46,
|
18 |
+
"rotationCenterY": 80
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"name": "batter-b",
|
22 |
+
"bitmapResolution": 1,
|
23 |
+
"dataFormat": "svg",
|
24 |
+
"assetId": "fdfde4bcbaca0f68e83fdf3f4ef0c660",
|
25 |
+
"md5ext": "fdfde4bcbaca0f68e83fdf3f4ef0c660.svg",
|
26 |
+
"rotationCenterX": 16,
|
27 |
+
"rotationCenterY": 67
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"name": "batter-c",
|
31 |
+
"bitmapResolution": 1,
|
32 |
+
"dataFormat": "svg",
|
33 |
+
"assetId": "bd4fc003528acfa847e45ff82f346eee",
|
34 |
+
"md5ext": "bd4fc003528acfa847e45ff82f346eee.svg",
|
35 |
+
"rotationCenterX": 94,
|
36 |
+
"rotationCenterY": 66
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"name": "batter-d",
|
40 |
+
"bitmapResolution": 1,
|
41 |
+
"dataFormat": "svg",
|
42 |
+
"assetId": "592ee9ab2aeefe65cb4fb95fcd046f33",
|
43 |
+
"md5ext": "592ee9ab2aeefe65cb4fb95fcd046f33.svg",
|
44 |
+
"rotationCenterX": 70,
|
45 |
+
"rotationCenterY": 102
|
46 |
+
}
|
47 |
+
],
|
48 |
+
"sounds": [
|
49 |
+
{
|
50 |
+
"name": "pop",
|
51 |
+
"assetId": "83a9787d4cb6f3b7632b4ddfebf74367",
|
52 |
+
"dataFormat": "wav",
|
53 |
+
"format": "",
|
54 |
+
"rate": 48000,
|
55 |
+
"sampleCount": 1123,
|
56 |
+
"md5ext": "83a9787d4cb6f3b7632b4ddfebf74367.wav"
|
57 |
+
}
|
58 |
+
],
|
59 |
+
"volume": 100,
|
60 |
+
"visible": true,
|
61 |
+
"x": -12,
|
62 |
+
"y": 39,
|
63 |
+
"size": 100,
|
64 |
+
"direction": 90,
|
65 |
+
"draggable": false,
|
66 |
+
"rotationStyle": "all around"
|
67 |
+
}
|
blocks/sprites/Bear.sprite3/6f303e972f33fcb7ef36d0d8012d0975.svg
ADDED
|
blocks/sprites/Bear.sprite3/83a9787d4cb6f3b7632b4ddfebf74367.wav
ADDED
Binary file (560 Bytes). View file
|
|
blocks/sprites/Bear.sprite3/bear_motion_2.png
ADDED
![]() |