Optimize sketchfab tag suggestions, add NoAI tag

This commit is contained in:
JannisX11 2024-04-27 22:56:15 +02:00
parent ec9b085aac
commit c22ca7848a

View File

@ -4,11 +4,11 @@ BARS.defineActions(function() {
if (elements.length === 0 || !Format) {
return;
}
let tag_suggestions = ['low-poly', 'pixel-art'];
let tag_suggestions = ['low-poly', 'pixel-art', 'NoAI'];
if (Format.id !== 'free') tag_suggestions.push('minecraft');
if (Format.id === 'skin') tag_suggestions.push('skin');
if (!Mesh.all.length) tag_suggestions.push('voxel');
let clean_project_name = Project.name.toLowerCase().replace(/[_.-]+/g, '-').replace(/[^a-z0-9-]+/, '')
let clean_project_name = Project.name.toLowerCase().replace(/[_.-]+/g, '-').replace(/[^a-z0-9-]+/, '').replace(/-geo/, '');
if (Project.name) tag_suggestions.push(clean_project_name);
if (clean_project_name.includes('-')) tag_suggestions.safePush(...clean_project_name.split('-').filter(s => s.length > 2 && s != 'geo').reverse());