- 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.
19 lines
546 B
PHP
19 lines
546 B
PHP
<?php
|
|
|
|
namespace App\Support\Configuratore;
|
|
|
|
/**
|
|
* URL pubblici delle immagini del configuratore. Passano dalla rotta API `media` (e non
|
|
* da /storage) perché le texture caricate da Three.js richiedono gli header CORS.
|
|
*/
|
|
class Media
|
|
{
|
|
/** Cartelle del disco public servite dalla rotta media. */
|
|
public const CARTELLE = ['configuratore/', 'modelli/', Modelli3d::CARTELLA_DRACO.'/'];
|
|
|
|
public static function url(?string $percorso): ?string
|
|
{
|
|
return $percorso ? route('media', ['percorso' => $percorso]) : null;
|
|
}
|
|
}
|