Used to specify repeated placements along the X+ axis in a single build command. 101 = place 2 objects with a space between. Cannot exceed 64 bits.
101
Optional
Use to initialize the bits by entering a binary string like "11001". Left to right. Trailing zeros are ignored.
"11001"
SyntaxError if input string cannot be converted to a BigInt.
Amount of all the bits.
Clears a bit at an index (makes it 0).
0
RangeError if the index is out of [0,63].
A new instance with the same bits.
Checks whether this bits equals to another.
Checks whether there is only one bit and it is set to 1, which is likely just so that a shape can be specified in the encoded data.
1
Checks whether a bit at an index is set.
Checks whether no bit is set.
Sets a bit at an index (makes it 1).
Booleans representing the set and unset bits.
Toggles a bit at an index.
If specified, it works as a shortcut for set (true) and clear (false).
A string of 1's and 0's representing the set and unset bits.
Removes leading zero bits. (Note that trailing zeros don't work anyway)
const bits = new BuildBits("10100") // 101bits.del(0) // 001bits.trimLeadZeros() // 1 Copy
const bits = new BuildBits("10100") // 101bits.del(0) // 001bits.trimLeadZeros() // 1
Used to specify repeated placements along the X+ axis in a single build command.
101
= place 2 objects with a space between. Cannot exceed 64 bits.