国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
Custom Blocks  |  Blockly  |  Google Developers

Custom Blocks

This document is aimed at developers who wish to create new blocks withinBlockly. It is assumed that one has a local copy of Blockly which one can edit,one is generally familiar with Blockly's usage, and one has a basicunderstanding of JavaScript.

Blockly comes with a large number of pre-defined blocks. Everything frommathematical functions to looping structures. However, in order to interfacewith an external application, one must create custom blocks to form an API. Forexample, when creating a drawing program, one might need to create a "drawcircle of radius R" block.

In most cases the easiest approach is to just find a really similar block whichalready exists, copy it, and modify it as needed. The following documentation isfor those who need more help.

Define a Block

The first step is to create a block; specifying its shape, fields, andconnection points. Using Blockly Developer Tools is the easiest way to writethis code.

→ More info on the Blockly Developer Tools...

Alternatively, one can write this code by hand after studying the API.

→ More info on Defining Blocks...

Advanced blocks may dynamically change their shape in response to the user orother factors.

→ More info on Mutators...

Code Generation

The second step is to create the generator code to export the new block to aprogramming language (such as JavaScript, Python, PHP, Lua, or Dart).

→ More info on Generating Code...

To generate code that is both clean and correct, one must be mindful of theorder of operations list for the given language.

→ More info on Operator Precedence...

Creating more complicated blocks requires the use of temporary variables and/orutility functions. This is particularly true when an input is used twice andneeds to be cached.

→ More info on Caching Arguments...

Use the new Block

After creating your block don't forget to add it to your toolbox or use it in aworkspace.

→ More info on the Toolbox...

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
DBAzine.com - Interested Transaction List (ITL) Waits Demystified
ABB AC900F學(xué)習(xí)筆記30:freelance 2019 自定義功能塊參數(shù)存儲(chǔ)類(lèi)型
Lineland: HBase File Locality in HDFS
[Laskey99] Section 11.2. Oracle Tablespaces
gc buffer busy waits ? Oracle database intern...
Designing a Real-Time Robot Controller using ...
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服