0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

blocklyでobjectを動かす。

Posted at

概要

blocklyでobjectを動かして見る。

ステージを作る。

今回は、テキストエリア。

<textarea rows="15" cols="50" id="out"></textarea>

フローを書く。

九九を書いてみる。

image

objectを書く。

今回は、printをオーバーライドする。

Blockly.JavaScript.text_print = function(a) {
    return "document.getElementById('out').value += " + (Blockly.JavaScript.valueToCode(a, "TEXT", Blockly.JavaScript.ORDER_NONE) || "''") + "\n"
};

結果

image

成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?