blockly > common > createBlockDefinitionsFromJsonArray
Common.createBlockDefinitionsFromJsonArray() işlevi
Blockly Geliştirici Araçları tarafından oluşturulabilecek bir JSON blok tanımları dizisinden blokları tanımlayın.
İmza:
export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
[key: string]: BlockDefinition;
};
Parametreler
Parametre |
Tür |
Açıklama |
jsonArray |
herhangi biri[] |
Bir JSON bloku tanımları dizisi. |
Şunu döndürür:
{ [key: string]: BlockDefinition; }
Oluşturulan blok tanımlarının haritası.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-08-27 UTC.
[null,null,["Son güncelleme tarihi: 2024-08-27 UTC."],[[["Defines new block types in Blockly based on an array of JSON definitions, commonly generated by the Blockly Developer Tools."],["Takes an array of JSON objects representing block configurations as input."],["Returns a dictionary/map where block type names are keys and corresponding block definitions are values, allowing access and usage of the newly defined blocks."]]],["The `createBlockDefinitionsFromJsonArray` function defines blocks from an array of JSON block definitions. It accepts a `jsonArray` parameter, which is an array of these definitions. The function then returns a map where each key corresponds to a block definition and its value is the associated `BlockDefinition`. This effectively translates a JSON array into a set of usable block definitions.\n"]]