sb-edit-custom 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +9 -0
- package/README.md +0 -0
- package/lib/Block.d.ts +388 -0
- package/lib/Block.js +631 -0
- package/lib/BlockInput.d.ts +213 -0
- package/lib/BlockInput.js +3 -0
- package/lib/Costume.d.ts +25 -0
- package/lib/Costume.js +23 -0
- package/lib/Data.d.ts +50 -0
- package/lib/Data.js +44 -0
- package/lib/OpCode.d.ts +212 -0
- package/lib/OpCode.js +219 -0
- package/lib/Project.d.ts +29 -0
- package/lib/Project.js +66 -0
- package/lib/Script.d.ts +16 -0
- package/lib/Script.js +62 -0
- package/lib/Sound.d.ts +21 -0
- package/lib/Sound.js +21 -0
- package/lib/Target.d.ts +47 -0
- package/lib/Target.js +120 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +511 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +48 -0
- package/lib/io/leopard/toLeopard.d.ts +22 -0
- package/lib/io/leopard/toLeopard.js +2199 -0
- package/lib/io/sb2/fromSb2.d.ts +0 -0
- package/lib/io/sb2/fromSb2.js +2 -0
- package/lib/io/sb2/index.d.ts +48 -0
- package/lib/io/sb2/index.js +3 -0
- package/lib/io/sb2/toSb2.d.ts +0 -0
- package/lib/io/sb2/toSb2.js +2 -0
- package/lib/io/sb3/fromSb3.d.ts +16 -0
- package/lib/io/sb3/fromSb3.js +628 -0
- package/lib/io/sb3/interfaces.d.ts +624 -0
- package/lib/io/sb3/interfaces.js +336 -0
- package/lib/io/sb3/toSb3.d.ts +8 -0
- package/lib/io/sb3/toSb3.js +851 -0
- package/lib/io/scratchblocks/toScratchblocks.d.ts +7 -0
- package/lib/io/scratchblocks/toScratchblocks.js +606 -0
- package/lib/util/id.d.ts +1 -0
- package/lib/util/id.js +12 -0
- package/package.json +68 -0
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
import { OpCode } from "../../OpCode";
|
|
2
|
+
import { TextToSpeechLanguage } from "../../Project";
|
|
3
|
+
import * as _BlockInput from "../../BlockInput";
|
|
4
|
+
export type ScalarValue = string | number | boolean;
|
|
5
|
+
export type AssetId = string;
|
|
6
|
+
export type Variable = [string, ScalarValue] | [string, ScalarValue, true];
|
|
7
|
+
export type List = [string, ScalarValue[]];
|
|
8
|
+
export interface Costume {
|
|
9
|
+
assetId: AssetId;
|
|
10
|
+
dataFormat: "png" | "svg" | "jpeg" | "jpg" | "bmp" | "gif";
|
|
11
|
+
name: string;
|
|
12
|
+
md5ext?: string;
|
|
13
|
+
bitmapResolution?: number;
|
|
14
|
+
rotationCenterX?: number;
|
|
15
|
+
rotationCenterY?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface Sound {
|
|
18
|
+
assetId: AssetId;
|
|
19
|
+
dataFormat: "wav" | "wave" | "mp3";
|
|
20
|
+
name: string;
|
|
21
|
+
md5ext?: string;
|
|
22
|
+
rate?: number;
|
|
23
|
+
sampleCount?: number;
|
|
24
|
+
}
|
|
25
|
+
interface Mutation {
|
|
26
|
+
[attribute: string]: Mutation[] | string;
|
|
27
|
+
children: Mutation[];
|
|
28
|
+
}
|
|
29
|
+
export interface ProceduresPrototypeMutation {
|
|
30
|
+
proccode: string;
|
|
31
|
+
argumentnames: string;
|
|
32
|
+
argumentids: string;
|
|
33
|
+
argumentdefaults: string;
|
|
34
|
+
warp: "true" | "false";
|
|
35
|
+
}
|
|
36
|
+
export interface ProceduresCallMutation {
|
|
37
|
+
proccode: string;
|
|
38
|
+
argumentnames: string;
|
|
39
|
+
argumentids: string;
|
|
40
|
+
argumentdefaults: string;
|
|
41
|
+
warp: "true" | "false";
|
|
42
|
+
}
|
|
43
|
+
type MutationFor<Op extends OpCode> = Op extends OpCode.procedures_prototype ? ProceduresPrototypeMutation : Op extends OpCode.procedures_call ? ProceduresCallMutation : Mutation | undefined;
|
|
44
|
+
export interface Block<Op extends OpCode = OpCode> {
|
|
45
|
+
opcode: Op;
|
|
46
|
+
next?: string | null;
|
|
47
|
+
parent?: string | null;
|
|
48
|
+
inputs: {
|
|
49
|
+
[key: string]: BlockInput;
|
|
50
|
+
};
|
|
51
|
+
fields: {
|
|
52
|
+
[key: string]: BlockField;
|
|
53
|
+
};
|
|
54
|
+
mutation: MutationFor<Op>;
|
|
55
|
+
shadow: boolean;
|
|
56
|
+
topLevel: boolean;
|
|
57
|
+
x?: number;
|
|
58
|
+
y?: number;
|
|
59
|
+
}
|
|
60
|
+
export type BlockField = Readonly<[string, string | null] | [string]>;
|
|
61
|
+
interface Comment {
|
|
62
|
+
blockId: string;
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
minimized: boolean;
|
|
68
|
+
text: string;
|
|
69
|
+
}
|
|
70
|
+
export interface Target {
|
|
71
|
+
isStage: boolean;
|
|
72
|
+
name: string;
|
|
73
|
+
variables: {
|
|
74
|
+
[key: string]: Variable;
|
|
75
|
+
};
|
|
76
|
+
lists: {
|
|
77
|
+
[key: string]: List;
|
|
78
|
+
};
|
|
79
|
+
broadcasts: {
|
|
80
|
+
[key: string]: string;
|
|
81
|
+
};
|
|
82
|
+
blocks: {
|
|
83
|
+
[key: string]: Block<OpCode>;
|
|
84
|
+
};
|
|
85
|
+
comments: {
|
|
86
|
+
[key: string]: Comment;
|
|
87
|
+
};
|
|
88
|
+
currentCostume: number;
|
|
89
|
+
costumes: Costume[];
|
|
90
|
+
sounds: Sound[];
|
|
91
|
+
volume: number;
|
|
92
|
+
layerOrder: number;
|
|
93
|
+
}
|
|
94
|
+
export interface Stage extends Target {
|
|
95
|
+
isStage: true;
|
|
96
|
+
tempo: number;
|
|
97
|
+
videoTransparency: number;
|
|
98
|
+
videoState: "on" | "off";
|
|
99
|
+
textToSpeechLanguage: TextToSpeechLanguage | null;
|
|
100
|
+
}
|
|
101
|
+
export interface Sprite extends Target {
|
|
102
|
+
isStage: false;
|
|
103
|
+
visible: boolean;
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
size: number;
|
|
107
|
+
direction: number;
|
|
108
|
+
draggable: boolean;
|
|
109
|
+
rotationStyle: "all around" | "left-right" | "don't rotate";
|
|
110
|
+
}
|
|
111
|
+
interface MonitorBase {
|
|
112
|
+
id: string;
|
|
113
|
+
mode: "default" | "large" | "slider" | "list";
|
|
114
|
+
opcode: "data_variable" | "data_listcontents";
|
|
115
|
+
params: {
|
|
116
|
+
[key: string]: string;
|
|
117
|
+
};
|
|
118
|
+
spriteName: string;
|
|
119
|
+
width?: number | null;
|
|
120
|
+
height?: number | null;
|
|
121
|
+
x: number;
|
|
122
|
+
y: number;
|
|
123
|
+
visible: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface VariableMonitor extends MonitorBase {
|
|
126
|
+
mode: "default" | "large" | "slider";
|
|
127
|
+
opcode: "data_variable";
|
|
128
|
+
params: {
|
|
129
|
+
VARIABLE: string;
|
|
130
|
+
};
|
|
131
|
+
value: ScalarValue;
|
|
132
|
+
sliderMin: number;
|
|
133
|
+
sliderMax: number;
|
|
134
|
+
isDiscrete: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface ListMonitor extends MonitorBase {
|
|
137
|
+
mode: "list";
|
|
138
|
+
opcode: "data_listcontents";
|
|
139
|
+
params: {
|
|
140
|
+
LIST: string;
|
|
141
|
+
};
|
|
142
|
+
value: ScalarValue[];
|
|
143
|
+
}
|
|
144
|
+
export type Monitor = VariableMonitor | ListMonitor;
|
|
145
|
+
interface Meta {
|
|
146
|
+
semver: string;
|
|
147
|
+
vm?: string;
|
|
148
|
+
agent?: string;
|
|
149
|
+
}
|
|
150
|
+
export interface ProjectJSON {
|
|
151
|
+
targets: Target[];
|
|
152
|
+
monitors?: Monitor[];
|
|
153
|
+
meta: Meta;
|
|
154
|
+
}
|
|
155
|
+
export declare const fieldTypeMap: {
|
|
156
|
+
[opcode in OpCode]?: {
|
|
157
|
+
[fieldName: string]: _BlockInput.Any["type"];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export declare enum BlockInputStatus {
|
|
161
|
+
INPUT_SAME_BLOCK_SHADOW = 1,
|
|
162
|
+
INPUT_BLOCK_NO_SHADOW = 2,
|
|
163
|
+
INPUT_DIFF_BLOCK_SHADOW = 3,
|
|
164
|
+
MATH_NUM_PRIMITIVE = 4,
|
|
165
|
+
POSITIVE_NUM_PRIMITIVE = 5,
|
|
166
|
+
WHOLE_NUM_PRIMITIVE = 6,
|
|
167
|
+
INTEGER_NUM_PRIMITIVE = 7,
|
|
168
|
+
ANGLE_NUM_PRIMITIVE = 8,
|
|
169
|
+
COLOR_PICKER_PRIMITIVE = 9,
|
|
170
|
+
TEXT_PRIMITIVE = 10,
|
|
171
|
+
BROADCAST_PRIMITIVE = 11,
|
|
172
|
+
VAR_PRIMITIVE = 12,
|
|
173
|
+
LIST_PRIMITIVE = 13
|
|
174
|
+
}
|
|
175
|
+
export import BIS = BlockInputStatus;
|
|
176
|
+
export declare const BooleanOrSubstackInputStatus = BIS.INPUT_BLOCK_NO_SHADOW;
|
|
177
|
+
export type BlockInput = Readonly<[BIS.INPUT_SAME_BLOCK_SHADOW, BlockInputValue | null] | [BIS.INPUT_BLOCK_NO_SHADOW, BlockInputValue | null] | [BIS.INPUT_DIFF_BLOCK_SHADOW, BlockInputValue | null, BlockInputValue]>;
|
|
178
|
+
export type BlockInputValue = Readonly<string | [BIS.MATH_NUM_PRIMITIVE, number | string] | [BIS.POSITIVE_NUM_PRIMITIVE, number | string] | [BIS.WHOLE_NUM_PRIMITIVE, number | string] | [BIS.INTEGER_NUM_PRIMITIVE, number | string] | [BIS.ANGLE_NUM_PRIMITIVE, number | string] | [BIS.COLOR_PICKER_PRIMITIVE, string] | [BIS.TEXT_PRIMITIVE, string] | [BIS.BROADCAST_PRIMITIVE, string, string] | [BIS.VAR_PRIMITIVE, string, string] | [BIS.LIST_PRIMITIVE, string, string]>;
|
|
179
|
+
export declare const inputPrimitiveOrShadowMap: {
|
|
180
|
+
readonly motion_movesteps: {
|
|
181
|
+
readonly STEPS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
182
|
+
};
|
|
183
|
+
readonly motion_turnright: {
|
|
184
|
+
readonly DEGREES: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
185
|
+
};
|
|
186
|
+
readonly motion_turnleft: {
|
|
187
|
+
readonly DEGREES: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
188
|
+
};
|
|
189
|
+
readonly motion_pointindirection: {
|
|
190
|
+
readonly DIRECTION: BlockInputStatus.ANGLE_NUM_PRIMITIVE;
|
|
191
|
+
};
|
|
192
|
+
readonly motion_pointtowards: {
|
|
193
|
+
readonly TOWARDS: OpCode.motion_pointtowards_menu;
|
|
194
|
+
};
|
|
195
|
+
readonly motion_gotoxy: {
|
|
196
|
+
readonly X: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
197
|
+
readonly Y: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
198
|
+
};
|
|
199
|
+
readonly motion_goto: {
|
|
200
|
+
readonly TO: OpCode.motion_goto_menu;
|
|
201
|
+
};
|
|
202
|
+
readonly motion_glidesecstoxy: {
|
|
203
|
+
readonly SECS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
204
|
+
readonly X: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
205
|
+
readonly Y: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
206
|
+
};
|
|
207
|
+
readonly motion_glideto: {
|
|
208
|
+
readonly SECS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
209
|
+
readonly TO: OpCode.motion_glideto_menu;
|
|
210
|
+
};
|
|
211
|
+
readonly motion_changexby: {
|
|
212
|
+
readonly DX: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
213
|
+
};
|
|
214
|
+
readonly motion_setx: {
|
|
215
|
+
readonly X: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
216
|
+
};
|
|
217
|
+
readonly motion_changeyby: {
|
|
218
|
+
readonly DY: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
219
|
+
};
|
|
220
|
+
readonly motion_sety: {
|
|
221
|
+
readonly Y: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
222
|
+
};
|
|
223
|
+
readonly motion_ifonedgebounce: {};
|
|
224
|
+
readonly motion_setrotationstyle: {};
|
|
225
|
+
readonly motion_xposition: {};
|
|
226
|
+
readonly motion_yposition: {};
|
|
227
|
+
readonly motion_direction: {};
|
|
228
|
+
readonly motion_scroll_right: {
|
|
229
|
+
readonly DISTANCE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
230
|
+
};
|
|
231
|
+
readonly motion_scroll_up: {
|
|
232
|
+
readonly DISTANCE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
233
|
+
};
|
|
234
|
+
readonly motion_align_scene: {};
|
|
235
|
+
readonly looks_sayforsecs: {
|
|
236
|
+
readonly MESSAGE: BlockInputStatus.TEXT_PRIMITIVE;
|
|
237
|
+
readonly SECS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
238
|
+
};
|
|
239
|
+
readonly looks_say: {
|
|
240
|
+
readonly MESSAGE: BlockInputStatus.TEXT_PRIMITIVE;
|
|
241
|
+
};
|
|
242
|
+
readonly looks_thinkforsecs: {
|
|
243
|
+
readonly MESSAGE: BlockInputStatus.TEXT_PRIMITIVE;
|
|
244
|
+
readonly SECS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
245
|
+
};
|
|
246
|
+
readonly looks_think: {
|
|
247
|
+
readonly MESSAGE: BlockInputStatus.TEXT_PRIMITIVE;
|
|
248
|
+
};
|
|
249
|
+
readonly looks_show: {};
|
|
250
|
+
readonly looks_hide: {};
|
|
251
|
+
readonly looks_switchcostumeto: {
|
|
252
|
+
readonly COSTUME: OpCode.looks_costume;
|
|
253
|
+
};
|
|
254
|
+
readonly looks_nextcostume: {};
|
|
255
|
+
readonly looks_nextbackdrop: {};
|
|
256
|
+
readonly looks_switchbackdropto: {
|
|
257
|
+
readonly BACKDROP: OpCode.looks_backdrops;
|
|
258
|
+
};
|
|
259
|
+
readonly looks_switchbackdroptoandwait: {
|
|
260
|
+
readonly BACKDROP: OpCode.looks_backdrops;
|
|
261
|
+
};
|
|
262
|
+
readonly looks_changeeffectby: {
|
|
263
|
+
readonly CHANGE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
264
|
+
};
|
|
265
|
+
readonly looks_seteffectto: {
|
|
266
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
267
|
+
};
|
|
268
|
+
readonly looks_changesizeby: {
|
|
269
|
+
readonly CHANGE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
270
|
+
};
|
|
271
|
+
readonly looks_setsizeto: {
|
|
272
|
+
readonly SIZE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
273
|
+
};
|
|
274
|
+
readonly looks_cleargraphiceffects: {};
|
|
275
|
+
readonly looks_gotofrontback: {};
|
|
276
|
+
readonly looks_goforwardbackwardlayers: {
|
|
277
|
+
readonly NUM: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
278
|
+
};
|
|
279
|
+
readonly looks_costumenumbername: {};
|
|
280
|
+
readonly looks_backdropnumbername: {};
|
|
281
|
+
readonly looks_size: {};
|
|
282
|
+
readonly looks_hideallsprites: {};
|
|
283
|
+
readonly looks_changestretchby: {
|
|
284
|
+
readonly CHANGE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
285
|
+
};
|
|
286
|
+
readonly looks_setstretchto: {
|
|
287
|
+
readonly STRETCH: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
288
|
+
};
|
|
289
|
+
readonly sound_play: {
|
|
290
|
+
readonly SOUND_MENU: OpCode.sound_sounds_menu;
|
|
291
|
+
};
|
|
292
|
+
readonly sound_playuntildone: {
|
|
293
|
+
readonly SOUND_MENU: OpCode.sound_sounds_menu;
|
|
294
|
+
};
|
|
295
|
+
readonly sound_stopallsounds: {};
|
|
296
|
+
readonly sound_changeeffectby: {
|
|
297
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
298
|
+
};
|
|
299
|
+
readonly sound_seteffectto: {
|
|
300
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
301
|
+
};
|
|
302
|
+
readonly sound_cleareffects: {};
|
|
303
|
+
readonly sound_changevolumeby: {
|
|
304
|
+
readonly VOLUME: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
305
|
+
};
|
|
306
|
+
readonly sound_setvolumeto: {
|
|
307
|
+
readonly VOLUME: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
308
|
+
};
|
|
309
|
+
readonly sound_volume: {};
|
|
310
|
+
readonly event_whenflagclicked: {};
|
|
311
|
+
readonly event_whenkeypressed: {};
|
|
312
|
+
readonly event_whenstageclicked: {};
|
|
313
|
+
readonly event_whenthisspriteclicked: {};
|
|
314
|
+
readonly event_whenbackdropswitchesto: {};
|
|
315
|
+
readonly event_whengreaterthan: {
|
|
316
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
317
|
+
};
|
|
318
|
+
readonly event_whenbroadcastreceived: {};
|
|
319
|
+
readonly event_broadcast: {
|
|
320
|
+
readonly BROADCAST_INPUT: BlockInputStatus.BROADCAST_PRIMITIVE;
|
|
321
|
+
};
|
|
322
|
+
readonly event_broadcastandwait: {
|
|
323
|
+
readonly BROADCAST_INPUT: BlockInputStatus.BROADCAST_PRIMITIVE;
|
|
324
|
+
};
|
|
325
|
+
readonly control_wait: {
|
|
326
|
+
readonly DURATION: BlockInputStatus.POSITIVE_NUM_PRIMITIVE;
|
|
327
|
+
};
|
|
328
|
+
readonly control_repeat: {
|
|
329
|
+
readonly TIMES: BlockInputStatus.WHOLE_NUM_PRIMITIVE;
|
|
330
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
331
|
+
};
|
|
332
|
+
readonly control_forever: {
|
|
333
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
334
|
+
};
|
|
335
|
+
readonly control_if: {
|
|
336
|
+
readonly CONDITION: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
337
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
338
|
+
};
|
|
339
|
+
readonly control_if_else: {
|
|
340
|
+
readonly CONDITION: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
341
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
342
|
+
readonly SUBSTACK2: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
343
|
+
};
|
|
344
|
+
readonly control_wait_until: {
|
|
345
|
+
readonly CONDITION: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
346
|
+
};
|
|
347
|
+
readonly control_repeat_until: {
|
|
348
|
+
readonly CONDITION: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
349
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
350
|
+
};
|
|
351
|
+
readonly control_while: {
|
|
352
|
+
readonly CONDITION: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
353
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
354
|
+
};
|
|
355
|
+
readonly control_for_each: {
|
|
356
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
357
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
358
|
+
};
|
|
359
|
+
readonly control_all_at_once: {
|
|
360
|
+
readonly SUBSTACK: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
361
|
+
};
|
|
362
|
+
readonly control_stop: {};
|
|
363
|
+
readonly control_start_as_clone: {};
|
|
364
|
+
readonly control_create_clone_of: {
|
|
365
|
+
readonly CLONE_OPTION: OpCode.control_create_clone_of_menu;
|
|
366
|
+
};
|
|
367
|
+
readonly control_delete_this_clone: {};
|
|
368
|
+
readonly sensing_touchingobject: {
|
|
369
|
+
readonly TOUCHINGOBJECTMENU: OpCode.sensing_touchingobjectmenu;
|
|
370
|
+
};
|
|
371
|
+
readonly sensing_touchingcolor: {
|
|
372
|
+
readonly COLOR: BlockInputStatus.COLOR_PICKER_PRIMITIVE;
|
|
373
|
+
};
|
|
374
|
+
readonly sensing_coloristouchingcolor: {
|
|
375
|
+
readonly COLOR: BlockInputStatus.COLOR_PICKER_PRIMITIVE;
|
|
376
|
+
readonly COLOR2: BlockInputStatus.COLOR_PICKER_PRIMITIVE;
|
|
377
|
+
};
|
|
378
|
+
readonly sensing_distanceto: {
|
|
379
|
+
readonly DISTANCETOMENU: OpCode.sensing_distancetomenu;
|
|
380
|
+
};
|
|
381
|
+
readonly sensing_askandwait: {
|
|
382
|
+
readonly QUESTION: BlockInputStatus.TEXT_PRIMITIVE;
|
|
383
|
+
};
|
|
384
|
+
readonly sensing_answer: {};
|
|
385
|
+
readonly sensing_keypressed: {
|
|
386
|
+
readonly KEY_OPTION: OpCode.sensing_keyoptions;
|
|
387
|
+
};
|
|
388
|
+
readonly sensing_mousedown: {};
|
|
389
|
+
readonly sensing_mousex: {};
|
|
390
|
+
readonly sensing_mousey: {};
|
|
391
|
+
readonly sensing_setdragmode: {};
|
|
392
|
+
readonly sensing_loudness: {};
|
|
393
|
+
readonly sensing_timer: {};
|
|
394
|
+
readonly sensing_resettimer: {};
|
|
395
|
+
readonly sensing_of: {
|
|
396
|
+
readonly OBJECT: OpCode.sensing_of_object_menu;
|
|
397
|
+
};
|
|
398
|
+
readonly sensing_current: {};
|
|
399
|
+
readonly sensing_dayssince2000: {};
|
|
400
|
+
readonly sensing_username: {};
|
|
401
|
+
readonly sensing_userid: {};
|
|
402
|
+
readonly sensing_loud: {};
|
|
403
|
+
readonly operator_add: {
|
|
404
|
+
readonly NUM1: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
405
|
+
readonly NUM2: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
406
|
+
};
|
|
407
|
+
readonly operator_subtract: {
|
|
408
|
+
readonly NUM1: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
409
|
+
readonly NUM2: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
410
|
+
};
|
|
411
|
+
readonly operator_multiply: {
|
|
412
|
+
readonly NUM1: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
413
|
+
readonly NUM2: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
414
|
+
};
|
|
415
|
+
readonly operator_divide: {
|
|
416
|
+
readonly NUM1: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
417
|
+
readonly NUM2: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
418
|
+
};
|
|
419
|
+
readonly operator_random: {
|
|
420
|
+
readonly FROM: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
421
|
+
readonly TO: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
422
|
+
};
|
|
423
|
+
readonly operator_lt: {
|
|
424
|
+
readonly OPERAND1: BlockInputStatus.TEXT_PRIMITIVE;
|
|
425
|
+
readonly OPERAND2: BlockInputStatus.TEXT_PRIMITIVE;
|
|
426
|
+
};
|
|
427
|
+
readonly operator_equals: {
|
|
428
|
+
readonly OPERAND1: BlockInputStatus.TEXT_PRIMITIVE;
|
|
429
|
+
readonly OPERAND2: BlockInputStatus.TEXT_PRIMITIVE;
|
|
430
|
+
};
|
|
431
|
+
readonly operator_gt: {
|
|
432
|
+
readonly OPERAND1: BlockInputStatus.TEXT_PRIMITIVE;
|
|
433
|
+
readonly OPERAND2: BlockInputStatus.TEXT_PRIMITIVE;
|
|
434
|
+
};
|
|
435
|
+
readonly operator_and: {
|
|
436
|
+
readonly OPERAND1: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
437
|
+
readonly OPERAND2: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
438
|
+
};
|
|
439
|
+
readonly operator_or: {
|
|
440
|
+
readonly OPERAND1: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
441
|
+
readonly OPERAND2: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
442
|
+
};
|
|
443
|
+
readonly operator_not: {
|
|
444
|
+
readonly OPERAND: BlockInputStatus.INPUT_BLOCK_NO_SHADOW;
|
|
445
|
+
};
|
|
446
|
+
readonly operator_join: {
|
|
447
|
+
readonly STRING1: BlockInputStatus.TEXT_PRIMITIVE;
|
|
448
|
+
readonly STRING2: BlockInputStatus.TEXT_PRIMITIVE;
|
|
449
|
+
};
|
|
450
|
+
readonly operator_letter_of: {
|
|
451
|
+
readonly LETTER: BlockInputStatus.WHOLE_NUM_PRIMITIVE;
|
|
452
|
+
readonly STRING: BlockInputStatus.TEXT_PRIMITIVE;
|
|
453
|
+
};
|
|
454
|
+
readonly operator_length: {
|
|
455
|
+
readonly STRING: BlockInputStatus.TEXT_PRIMITIVE;
|
|
456
|
+
};
|
|
457
|
+
readonly operator_contains: {
|
|
458
|
+
readonly STRING1: BlockInputStatus.TEXT_PRIMITIVE;
|
|
459
|
+
readonly STRING2: BlockInputStatus.TEXT_PRIMITIVE;
|
|
460
|
+
};
|
|
461
|
+
readonly operator_mod: {
|
|
462
|
+
readonly NUM1: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
463
|
+
readonly NUM2: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
464
|
+
};
|
|
465
|
+
readonly operator_round: {
|
|
466
|
+
readonly NUM: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
467
|
+
};
|
|
468
|
+
readonly operator_mathop: {
|
|
469
|
+
readonly NUM: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
470
|
+
};
|
|
471
|
+
readonly music_playDrumForBeats: {
|
|
472
|
+
readonly DRUM: OpCode.music_menu_DRUM;
|
|
473
|
+
readonly BEATS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
474
|
+
};
|
|
475
|
+
readonly music_restForBeats: {
|
|
476
|
+
readonly BEATS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
477
|
+
};
|
|
478
|
+
readonly music_playNoteForBeats: {
|
|
479
|
+
readonly NOTE: OpCode.note;
|
|
480
|
+
readonly BEATS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
481
|
+
};
|
|
482
|
+
readonly music_setInstrument: {
|
|
483
|
+
readonly INSTRUMENT: OpCode.music_menu_INSTRUMENT;
|
|
484
|
+
};
|
|
485
|
+
readonly music_setTempo: {
|
|
486
|
+
readonly TEMPO: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
487
|
+
};
|
|
488
|
+
readonly music_changeTempo: {
|
|
489
|
+
readonly TEMPO: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
490
|
+
};
|
|
491
|
+
readonly music_getTempo: {};
|
|
492
|
+
readonly music_midiPlayDrumForBeats: {
|
|
493
|
+
readonly DRUM: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
494
|
+
readonly BEATS: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
495
|
+
};
|
|
496
|
+
readonly music_midiSetInstrument: {
|
|
497
|
+
readonly INSTRUMENT: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
498
|
+
};
|
|
499
|
+
readonly pen_clear: {};
|
|
500
|
+
readonly pen_stamp: {};
|
|
501
|
+
readonly pen_penDown: {};
|
|
502
|
+
readonly pen_penUp: {};
|
|
503
|
+
readonly pen_setPenColorToColor: {
|
|
504
|
+
readonly COLOR: BlockInputStatus.COLOR_PICKER_PRIMITIVE;
|
|
505
|
+
};
|
|
506
|
+
readonly pen_changePenColorParamBy: {
|
|
507
|
+
readonly COLOR_PARAM: OpCode.pen_menu_colorParam;
|
|
508
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
509
|
+
};
|
|
510
|
+
readonly pen_setPenColorParamTo: {
|
|
511
|
+
readonly COLOR_PARAM: OpCode.pen_menu_colorParam;
|
|
512
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
513
|
+
};
|
|
514
|
+
readonly pen_changePenSizeBy: {
|
|
515
|
+
readonly SIZE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
516
|
+
};
|
|
517
|
+
readonly pen_setPenSizeTo: {
|
|
518
|
+
readonly SIZE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
519
|
+
};
|
|
520
|
+
readonly pen_setPenShadeToNumber: {
|
|
521
|
+
readonly SHADE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
522
|
+
};
|
|
523
|
+
readonly pen_changePenShadeBy: {
|
|
524
|
+
readonly SHADE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
525
|
+
};
|
|
526
|
+
readonly pen_setPenHueToNumber: {
|
|
527
|
+
readonly HUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
528
|
+
};
|
|
529
|
+
readonly pen_changePenHueBy: {
|
|
530
|
+
readonly HUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
531
|
+
};
|
|
532
|
+
readonly videoSensing_whenMotionGreaterThan: {
|
|
533
|
+
readonly REFERENCE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
534
|
+
};
|
|
535
|
+
readonly videoSensing_videoOn: {
|
|
536
|
+
readonly ATTRIBUTE: OpCode.videoSensing_menu_ATTRIBUTE;
|
|
537
|
+
readonly SUBJECT: OpCode.videoSensing_menu_SUBJECT;
|
|
538
|
+
};
|
|
539
|
+
readonly videoSensing_videoToggle: {
|
|
540
|
+
readonly VIDEO_STATE: OpCode.videoSensing_menu_VIDEO_STATE;
|
|
541
|
+
};
|
|
542
|
+
readonly videoSensing_setVideoTransparency: {
|
|
543
|
+
readonly TRANSPARENCY: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
544
|
+
};
|
|
545
|
+
readonly wedo2_motorOnFor: {
|
|
546
|
+
readonly MOTOR_ID: OpCode.wedo2_menu_MOTOR_ID;
|
|
547
|
+
readonly DURATION: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
548
|
+
};
|
|
549
|
+
readonly wedo2_motorOn: {
|
|
550
|
+
readonly MOTOR_ID: OpCode.wedo2_menu_MOTOR_ID;
|
|
551
|
+
};
|
|
552
|
+
readonly wedo2_motorOff: {
|
|
553
|
+
readonly MOTOR_ID: OpCode.wedo2_menu_MOTOR_ID;
|
|
554
|
+
};
|
|
555
|
+
readonly wedo2_startMotorPower: {
|
|
556
|
+
readonly MOTOR_ID: OpCode.wedo2_menu_MOTOR_ID;
|
|
557
|
+
readonly POWER: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
558
|
+
};
|
|
559
|
+
readonly wedo2_setMotorDirection: {
|
|
560
|
+
readonly MOTOR_ID: OpCode.wedo2_menu_MOTOR_ID;
|
|
561
|
+
readonly MOTOR_DIRECTION: OpCode.wedo2_menu_MOTOR_DIRECTION;
|
|
562
|
+
};
|
|
563
|
+
readonly wedo2_setLightHue: {
|
|
564
|
+
readonly HUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
565
|
+
};
|
|
566
|
+
readonly wedo2_whenDistance: {
|
|
567
|
+
readonly OP: OpCode.wedo2_menu_OP;
|
|
568
|
+
readonly REFERENCE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
569
|
+
};
|
|
570
|
+
readonly wedo2_whenTilted: {
|
|
571
|
+
readonly TILT_DIRECTION_ANY: OpCode.wedo2_menu_TILT_DIRECTION_ANY;
|
|
572
|
+
};
|
|
573
|
+
readonly wedo2_getDistance: {};
|
|
574
|
+
readonly wedo2_isTilted: {
|
|
575
|
+
readonly TILT_DIRECTION_ANY: OpCode.wedo2_menu_TILT_DIRECTION_ANY;
|
|
576
|
+
};
|
|
577
|
+
readonly wedo2_getTiltAngle: {
|
|
578
|
+
readonly TILT_DIRECTION: OpCode.wedo2_menu_TILT_DIRECTION;
|
|
579
|
+
};
|
|
580
|
+
readonly wedo2_playNoteFor: {
|
|
581
|
+
readonly NOTE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
582
|
+
readonly DURATION: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
583
|
+
};
|
|
584
|
+
readonly data_variable: {};
|
|
585
|
+
readonly data_setvariableto: {
|
|
586
|
+
readonly VALUE: BlockInputStatus.TEXT_PRIMITIVE;
|
|
587
|
+
};
|
|
588
|
+
readonly data_changevariableby: {
|
|
589
|
+
readonly VALUE: BlockInputStatus.MATH_NUM_PRIMITIVE;
|
|
590
|
+
};
|
|
591
|
+
readonly data_showvariable: {};
|
|
592
|
+
readonly data_hidevariable: {};
|
|
593
|
+
readonly data_listcontents: {};
|
|
594
|
+
readonly data_addtolist: {
|
|
595
|
+
readonly ITEM: BlockInputStatus.TEXT_PRIMITIVE;
|
|
596
|
+
};
|
|
597
|
+
readonly data_deleteoflist: {
|
|
598
|
+
readonly INDEX: BlockInputStatus.INTEGER_NUM_PRIMITIVE;
|
|
599
|
+
};
|
|
600
|
+
readonly data_deletealloflist: {};
|
|
601
|
+
readonly data_insertatlist: {
|
|
602
|
+
readonly INDEX: BlockInputStatus.INTEGER_NUM_PRIMITIVE;
|
|
603
|
+
readonly ITEM: BlockInputStatus.TEXT_PRIMITIVE;
|
|
604
|
+
};
|
|
605
|
+
readonly data_replaceitemoflist: {
|
|
606
|
+
readonly INDEX: BlockInputStatus.INTEGER_NUM_PRIMITIVE;
|
|
607
|
+
readonly ITEM: BlockInputStatus.TEXT_PRIMITIVE;
|
|
608
|
+
};
|
|
609
|
+
readonly data_itemoflist: {
|
|
610
|
+
readonly INDEX: BlockInputStatus.INTEGER_NUM_PRIMITIVE;
|
|
611
|
+
};
|
|
612
|
+
readonly data_itemnumoflist: {
|
|
613
|
+
readonly ITEM: BlockInputStatus.TEXT_PRIMITIVE;
|
|
614
|
+
};
|
|
615
|
+
readonly data_lengthoflist: {};
|
|
616
|
+
readonly data_listcontainsitem: {
|
|
617
|
+
readonly ITEM: BlockInputStatus.TEXT_PRIMITIVE;
|
|
618
|
+
};
|
|
619
|
+
readonly data_showlist: {};
|
|
620
|
+
readonly data_hidelist: {};
|
|
621
|
+
readonly argument_reporter_boolean: {};
|
|
622
|
+
readonly argument_reporter_string_number: {};
|
|
623
|
+
};
|
|
624
|
+
export {};
|