UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

34 lines (24 loc) 577 B
import List from "../../src/core/collection/list/List.js"; class MeshLibrary { constructor() { /** * @type {List.<string>} */ this.assets = new List(); } /** * * @param {string} url */ add(url) { const existingAsset = this.assets.find(function (_url) { return _url === url; }); if (existingAsset !== undefined) { //already exists return; } this.assets.add(url); } } export { MeshLibrary };