blockly > Workspace > remainingCapacityOfType
Workspace.remainingCapacityOfType() method
The number of blocks of the given type that may be added to the workspace before reaching the maxInstances allowed for that type.
Signature:
remainingCapacityOfType(type: string): number;
Parameters
Parameter | Type | Description |
---|---|---|
type | string | Type of block to return capacity for. |
Returns:
number
Number of blocks of type left.