UNPKG

pixi.js

Version:

PixiJS — The HTML5 Creation Engine =============

1 lines 997 B
{"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 */\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":";AAOgB,SAAA,SAAA,CAAU,MAAsB,KAChD,EAAA;AACI,EAAU,KAAA,KAAA,KAAA,GAAA,CAAA,CAAA,CAAA;AAEV,EAAA,KAAA,IAAS,CAAI,GAAA,KAAA,EAAO,CAAI,GAAA,IAAA,CAAK,QAAQ,CACrC,EAAA,EAAA;AACI,IAAI,IAAA,IAAA,CAAK,CAAC,CACV,EAAA;AACI,MAAA,IAAA,CAAK,CAAC,CAAI,GAAA,IAAA,CAAA;AAAA,KAGd,MAAA;AACI,MAAA,MAAA;AAAA,KACJ;AAAA,GACJ;AACJ;;;;"}