src/components/scene/pool.js
function () {
    var el;
    if (this.availableEls.length === 0) {
      if (this.data.dynamic === false) {
        warn('Requested entity from empty pool: ' + this.attrName);
        return;
      } else {
        warn('Requested entity from empty pool. This pool is dynamic and will resize ' +
             'automatically. You might want to increase its initial size: ' + this.attrName);
      }
      this.createEntity();
    }
    el = this.availableEls.shift();
    this.usedEls.push(el);
    el.object3D.visible = true;
    return el;
  }
function () {
    var el;
    if (this.availableEls.length === 0) {
      if (this.data.dynamic === false) {
        warn('Requested entity from empty pool: ' + this.attrName);
        return;
      } else {
        warn('Requested entity from empty pool. This pool is dynamic and will resize ' +
             'automatically. You might want to increase its initial size: ' + this.attrName);
      }
      this.createEntity();
    }
    el = this.availableEls.shift();
    this.usedEls.push(el);
    el.object3D.visible = true;
    return el;
  }
function ( ) { var el ; if ( this . availableEls . length === 0 ) { if ( this . data . dynamic === false ) { warn ( 'Requested entity from empty pool: ' + this . attrName ) ; return ; } else { warn ( 'Requested entity from empty pool. This pool is dynamic and will resize ' + 'automatically. You might want to increase its initial size: ' + this . attrName ) ; } this . createEntity ( ) ; } el = this . availableEls . shift ( ) ; this . usedEls . push ( el ) ; el . object3D . visible = true ; return el ; }
Used to request one of the available entities of the pool.
Used to request one of the available entities of the pool .