@webwriter/block-based-code
Version:
Write block-based code (e.g. Scratch) and run it.
70 lines (68 loc) • 1.43 kB
text/typescript
import { BlockDefinition } from "../types";
export const blocks = [
{
type: "looks:say",
message0: "%{BKY_SAY}",
args0: [
{
type: "input_value",
name: "TEXT",
check: ["String", "Number"],
},
],
nextStatement: null,
previousStatement: null,
category: "looks",
style: "look_blocks",
} as const,
{
type: "looks:say_for_seconds",
message0: "%{BKY_SAY_FOR_SECONDS}",
args0: [
{
type: "input_value",
name: "TEXT",
check: ["String", "Number"],
},
{
type: "input_value",
name: "SECONDS",
check: "Number",
},
],
nextStatement: null,
previousStatement: null,
category: "looks",
style: "look_blocks",
} as const,
{
type: "looks:set_color",
message0: "%{BKY_SET_COLOR}",
args0: [
{
type: "input_value",
name: "COLOR",
check: "Number",
},
],
nextStatement: null,
previousStatement: null,
category: "looks",
style: "look_blocks",
} as const,
{
type: "looks:set_background_color",
message0: "%{BKY_SET_BACKGROUND_COLOR}",
args0: [
{
type: "field_colour",
name: "COLOR",
value: "#ffffff",
},
],
nextStatement: null,
previousStatement: null,
category: "looks",
style: "look_blocks",
} as const,
] satisfies BlockDefinition[];