feat: integrate Draco compression for 3D models in backoffice

- Added support for uploading and compressing GLB models using Draco in the backoffice.
- Implemented commands for importing and re-compressing 3D models.
- Updated model resource to handle 3D model uploads and validations.
- Introduced a new script for compressing GLB files with Draco.
- Modified Vite configuration to remove GLB files from the build output.
- Updated package dependencies to include GLTF-transform libraries for handling 3D models.
- Added tests to ensure proper functionality of 3D model handling and compression.
This commit is contained in:
2026-11-01 10:35:50 +01:00
parent 24f9e59654
commit 1208187a17
32 changed files with 895 additions and 52 deletions
@@ -26,7 +26,7 @@ class CatalogoAdminTest extends TestCase
Storage::fake('public');
$this->seed(CatalogoSeeder::class);
$this->actingAs(User::factory()->create());
$this->actingAs(User::factory()->create(['is_superadmin' => true]));
}
public function test_le_pagine_admin_del_catalogo_si_aprono(): void
@@ -94,7 +94,7 @@ class CatalogoAdminTest extends TestCase
Livewire::test(CreateModello::class)
->fillForm(['sistema_id' => $sistema, 'codice' => 'nuovo', 'nome' => 'Nuovo', 'attivo' => true])
->call('create')
->assertHasFormErrors(['cartella' => 'required', 'file_modello' => 'required', 'categoria' => 'required']);
->assertHasFormErrors(['cartella' => 'required', 'modello_3d_upload' => 'required', 'categoria' => 'required']);
Livewire::test(CreateModello::class)
->fillForm(['sistema_id' => $sistema, 'codice' => 'finestra_1_anta', 'nome' => 'Doppione', 'attivo' => false])