MCPcopy Create free account
hub / github.com/galacean/engine / delete

Method delete

packages/core/src/utils/DisorderedArray.ts:48–52  ·  view source on GitHub ↗

* Delete the specified element. * @param element - The element to be deleted

(element: T)

Source from the content-addressed store, hash-verified

46 * @param element - The element to be deleted
47 */
48 delete(element: T): void {
49 // @todo: It can be optimized for custom binary search and other algorithms, currently this._elements>=this.length wastes performance.
50 const index = this._elements.indexOf(element);
51 this.deleteByIndex(index);
52 }
53
54 /**
55 * Set the element at the specified index.

Callers 15

_parseUndefMethod · 0.80
onDelRequestTrackingMethod · 0.80
_addAnchorMethod · 0.80
destroyMethod · 0.80
removeShapeMethod · 0.80
_createPXControllerMethod · 0.80
constructorMethod · 0.80
raycastMethod · 0.80
destroyMethod · 0.80
_sweepSingleMethod · 0.80
_overlapMultipleMethod · 0.80
destroyFunction · 0.80

Calls 2

deleteByIndexMethod · 0.95
indexOfMethod · 0.80

Tested by

no test coverage detected