"use strict"; const RoomGeometryDebug = (function(){ const RoomGeometryDebug = function(hollow_bond){ const cache = {}; /** * Obtiene o crea una geometría de caja ortoédrica pura. * @param {number} width * @param {number} height * @param {number} depth * @returns {THREE.BoxGeometry} */ this.get = (width, height, depth) => { const key = `${width}_${height}_${depth}`; if(!cache[key]){ cache[key] = new THREE.BoxGeometry(width, height, depth); } return cache[key]; }; this.reset = () => { for(const key in cache){ if(cache[key]){ cache[key].dispose(); delete cache[key]; } } }; }; return RoomGeometryDebug; })();