研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >ConnectionDB
ConnectionDB 类
连接数据库。连接会按其垂直分量存储。这样,就可以使用二进制搜索快速查找某个区域内的连接。
Signature:
export declare class ConnectionDB
构造函数
方法
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-16。
[null,null,["最后更新时间 (UTC):2024-10-16。"],[[["The `ConnectionDB` class manages a database of connections, organized for efficient retrieval using binary search."],["It provides methods for finding nearby and compatible connections, essential for block interactions and bumping."],["Connections are stored and accessed based on their vertical position for optimized searching."],["The `ConnectionDB` is initialized for a workspace to handle connections between blocks."]]],["The `ConnectionDB` class manages a database of connections, ordered vertically for efficient lookup. Key actions include constructing a `ConnectionDB` instance, using `getNeighbours` to find nearby connections (without type checking), initializing a set of connection databases via the static `init` method, removing a connection using `removeConnection`, and finding the nearest compatible connection with `searchForClosest`. These functions allow to efficiently manage and query connections within a blockly workspace.\n"]]