{"version":3,"file":"clearList.mjs","sources":["../../../../src/scene/container/utils/clearList.ts"],"sourcesContent":["/**\n * nulls all slots in an array from a certain index.\n * assume that when a null item is hit, the rest are also null.\n * Which will be the case for where this is used!\n * @param list - the array to clean\n * @param index - the index to start from\n * @category utils\n * @internal\n */\nexport function clearList(list: Array<unknown>, index?: number)\n{\n    index ||= 0;\n\n    for (let j = index; j < list.length; j++)\n    {\n        if (list[j])\n        {\n            list[j] = null;\n        }\n        else\n        {\n            break;\n        }\n    }\n}\n"],"names":[],"mappings":";AASO,SAAS,SAAA,CAAU,MAAsB,KAAA,EAChD;AACI,EAAA,KAAA,KAAA,KAAA,GAAU,CAAA,CAAA;AAEV,EAAA,KAAA,IAAS,CAAA,GAAI,KAAA,EAAO,CAAA,GAAI,IAAA,CAAK,QAAQ,CAAA,EAAA,EACrC;AACI,IAAA,IAAI,IAAA,CAAK,CAAC,CAAA,EACV;AACI,MAAA,IAAA,CAAK,CAAC,CAAA,GAAI,IAAA;AAAA,IACd,CAAA,MAEA;AACI,MAAA;AAAA,IACJ;AAAA,EACJ;AACJ;;;;"}