updateEntity(oEntity) {
        let dummy = oEntity.dummy;
        let oOldSector = dummy.colliderSector;
        let v = dummy.position.sub(this._origin);
        let s = dummy.dead ? null : this.sectorFromVector(v);
        if (!dummy.dead && s === null) {
            throw new Error('sector ' + (v.x / this._cellWidth | 0).toString() + ' ' + (v.y / this._cellHeight | 0).toString() + ' does not exists.');
        }
        let bSameSector = s && oOldSector && s === oOldSector;
        if (!bSameSector) {

            // it seems that dummy changed sector
            if (oOldSector) {
                oOldSector.remove(oEntity);
            }
            if (s) {
                s.add(oEntity);
            }
            dummy.colliderSector = s;
        }
    }
/**
     * Registers an object in the sector it belongs
     * Unregisters the object in all other sector
     * @param oEntity {SmashingEntity}
     */
Registers an object in the sector it belongs
Unregisters the object in all other sector
@param oEntity {SmashingEntity}
Registers an object in the sector it belongs Unregisters the object in all other sector @param oEntity { SmashingEntity }
updateEntity(oEntity) {
        let dummy = oEntity.dummy;
        let oOldSector = dummy.colliderSector;
        let v = dummy.position.sub(this._origin);
        let s = dummy.dead ? null : this.sectorFromVector(v);
        if (!dummy.dead && s === null) {
            throw new Error('sector ' + (v.x / this._cellWidth | 0).toString() + ' ' + (v.y / this._cellHeight | 0).toString() + ' does not exists.');
        }
        let bSameSector = s && oOldSector && s === oOldSector;
        if (!bSameSector) {
            if (oOldSector) {
                oOldSector.remove(oEntity);
            }
            if (s) {
                s.add(oEntity);
            }
            dummy.colliderSector = s;
        }
    }
updateEntity ( oEntity ) { let dummy = oEntity . dummy ; let oOldSector = dummy . colliderSector ; let v = dummy . position . sub ( this . _origin ) ; let s = dummy . dead ? null : this . sectorFromVector ( v ) ; if ( ! dummy . dead && s === null ) { throw new Error ( 'sector ' + ( v . x / this . _cellWidth | 0 ) . toString ( ) + ' ' + ( v . y / this . _cellHeight | 0 ) . toString ( ) + ' does not exists.' ) ; } let bSameSector = s && oOldSector && s === oOldSector ; if ( ! bSameSector ) { if ( oOldSector ) { oOldSector . remove ( oEntity ) ; } if ( s ) { s . add ( oEntity ) ; } dummy . colliderSector = s ; } }
Registers an object in the sector it belongs
 Unregisters the object in all other sector
 @param oEntity {SmashingEntity}
Registers an object in the sector it belongs Unregisters the object in all other sector @param oEntity { SmashingEntity }
// it seems that dummy changed sector