Skip to content

Commit

Permalink
true-fantom/couplers: add more couplers (#757)
Browse files Browse the repository at this point in the history
Added COLOR, ANGLE, MATRIX, and NOTE reporters from LMS Utils.
  • Loading branch information
BlueDome77 authored Aug 22, 2023
1 parent cd8e456 commit 317186a
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions extensions/true-fantom/couplers.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,53 @@
blockType: Scratch.BlockType.BOOLEAN,
text: 'false',
hideFromPalette: true
},

'---',

{
opcode: 'color_block',
blockType: Scratch.BlockType.REPORTER,
text: 'color [COLOUR]',
arguments: {
COLOUR: {
type: Scratch.ArgumentType.COLOR,
defaultValue: '#ff0000'
}
}
},
{
opcode: 'angle_block',
blockType: Scratch.BlockType.REPORTER,
text: 'angle [ANGLE]',
arguments: {
ANGLE: {
type: Scratch.ArgumentType.ANGLE,
defaultValue: '90'
}
}
},
{
opcode: 'matrix_block',
blockType: Scratch.BlockType.REPORTER,
text: 'matrix [MATRIX]',
arguments: {
MATRIX: {
type: Scratch.ArgumentType.MATRIX,
defaultValue: '0101001010000001000101110'
}
}
},
{
opcode: 'note_block',
blockType: Scratch.BlockType.REPORTER,
text: 'note [NOTE]',
arguments: {
NOTE: {
type: Scratch.ArgumentType.NOTE,
defaultValue: ''
}
}
}
],
menus: {
Expand Down Expand Up @@ -119,6 +166,18 @@
false_block() {
return false;
}
color_block(args) {
return args.COLOUR;
}
angle_block(args) {
return args.ANGLE;
}
matrix_block(args) {
return args.MATRIX;
}
note_block(args) {
return args.NOTE;
}
}

Scratch.extensions.register(new Couplers());
Expand Down

0 comments on commit 317186a

Please sign in to comment.