assetDrop beta
Function of @v12-engine/editor
ts
export declare function assetDrop(accepts: readonly AssetKind[], onValue: (value: string, path: string) => void): {
'data-asset-drop': string;
onDragOver: (event: DragEvent) => void;
onDragLeave: (event: DragEvent) => void;
onDrop: (event: DragEvent) => void;
};What makes a row of a field that takes a file a place to drop one from the Assets panel: spread on the row, it takes a file of a kind it accepts (outlined while one is over it, data-dropping) and hands on what the field keeps of it (assetFieldValue: a model by its path in models/, a sound by its name), with the whole path besides. A file of another kind is not taken: the row is no place to drop it