| 1262 | } |
| 1263 | |
| 1264 | private _cloneIndices(): DataStore['_indices'] { |
| 1265 | if (this._indices) { |
| 1266 | const Ctor = this._indices.constructor as DataArrayLikeConstructor; |
| 1267 | let indices; |
| 1268 | if (Ctor === Array) { |
| 1269 | const thisCount = this._indices.length; |
| 1270 | indices = new Ctor(thisCount); |
| 1271 | for (let i = 0; i < thisCount; i++) { |
| 1272 | indices[i] = this._indices[i]; |
| 1273 | } |
| 1274 | } |
| 1275 | else { |
| 1276 | indices = new (Ctor as DataTypedArrayConstructor)(this._indices); |
| 1277 | } |
| 1278 | return indices; |
| 1279 | } |
| 1280 | return null; |
| 1281 | } |
| 1282 | |
| 1283 | private _getRawIdxIdentity(idx: number): number { |
| 1284 | return idx; |