Type Parameters
T extends Material
Parameters
| Name | Description | Default |
|---|---|---|
type | Concrete material component constructor to look up. | — |
Returns
Remove callback for the supplied material component.
Function
dropMaterialInstance<T extends Material>(type: object): ComponentHookCreates a ComponentHook that releases a material component’s
handle when the component is removed.
The returned callback looks up the supplied component type on the entity. It
does nothing when the component is absent; otherwise it calls
Handle#drop on the component’s handle. The handle release remains
deferred according to Handle#drop.