Last active
January 3, 2019 00:57
-
-
Save onelittlenightmusic/2593196e8c71c9d13dd1459a6ccb3236 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test { | |
constructor() {} | |
getInfo() { // 拡張機能の各種情報 | |
return { | |
id: 'test', | |
name: 'Test', // 拡張機能の名前 | |
blocks: [ // 各ブロックの定義 | |
{ | |
opcode: 'hello', // このブロックが実行されると、helloという関数が呼ばれる | |
blockType: Scratch.BlockType.COMMAND, // 「10歩動かす」のような通常の命令ブロック | |
text: 'hello' // ブロックに表示されるテキスト | |
} | |
] | |
} | |
} | |
hello() { | |
console.log('hello'); // console log に hello と出力 | |
} | |
} | |
// Scratch.extensions.register(new Test()); | |
module.exports = Test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment