UNPKG

the-world-engine

Version:

three.js based, unity like game engine for browser

18 lines 507 B
export class TwoDimensionalStringMapper { static map(o, n) { const r = []; for (let t = 0; t < o.length; ++t) { const e = []; const s = o[t]; for (let o = 0; o < s.length; ++o) { const r = s[o]; if (n[r] === undefined) { throw new Error(`conversion not found for '${r}'`); } e.push(n[r](o, t)); } r.push(e); } return r; } }