VrInputEventPool constructor
VrInputEventPool({
- int capacity = 64,
Implementation
VrInputEventPool({int capacity = 64}) {
if (capacity <= 0) {
throw ArgumentError.value(capacity, 'capacity', 'Must be positive.');
}
_events = List<_PooledVrInputEvent>.generate(
capacity,
(slot) => _PooledVrInputEvent(this, slot),
growable: false,
);
_freeSlots = List<int>.generate(
capacity,
(index) => capacity - index - 1,
growable: true,
);
}