path-plan.js
// Converts from WorldPosition or RoomPortal to indexes used in A*
Converts from WorldPosition or RoomPortal to indexes used in A
Converts from WorldPosition or RoomPortal to indexes used in A
function indexFromEntity(entity) {
	let index = reverseIndexMap.get(entity);
	if (index === undefined) {
		index = ++indexSize;
		reverseIndexMap.set(entity, index);
		indexMap[index] = entity;
	}
	return index;
}
function indexFromEntity ( entity ) { let index = reverseIndexMap . get ( entity ) ; if ( index === undefined ) { index = ++ indexSize ; reverseIndexMap . set ( entity , index ) ; indexMap [ index ] = entity ; } return index ; }
Converts from WorldPosition or RoomPortal to indexes used in A
Converts from WorldPosition or RoomPortal to indexes used in A