dropModel static method
Makes an entity showing the model drop carries, where it landed.
Implementation
static Entity? dropModel(AssetDrop drop) {
final slash = drop.path.lastIndexOf('/');
final dot = drop.path.lastIndexOf('.');
final stem = drop.path.substring(
slash + 1,
dot > slash ? dot : drop.path.length,
);
return drop.place([ModelComponent(model: drop.path)], name: stem);
}