<?php
namespace path;


// CONFIG PATHS --------------------------------

$json_path = realpath($_SERVER['DOCUMENT_ROOT'].parse_url($json_annotations_folder_url, PHP_URL_PATH )).'/';
$models_path = realpath($_SERVER['DOCUMENT_ROOT'].parse_url($models_folder_url, PHP_URL_PATH )).'/';
$instance_name = basename($instance_folder_url);

// FOLDERS
$json_instance_path = $json_path . $instance_name .'/' ;
if ( !is_dir($json_instance_path ) ) mkdir($json_instance_path , 0755, true);

$backup_path = $json_instance_path .'backups/' ;
if ( !is_dir($backup_path) ) mkdir($backup_path , 0755, true);

$global_backup_path = $json_instance_path .'backups/global/' ;
if ( !is_dir($global_backup_path) ) mkdir($global_backup_path , 0755, true);

$partial_backup_path = $json_instance_path .'backups/partial/' ;
if ( !is_dir($partial_backup_path) ) mkdir($partial_backup_path , 0755, true);

// FILES --------------------------------

$production_file = 'production_links.json';
$preview_file = 'preview.png';
$social_preview_file = 'social_preview.jpg';
$model_data_file = 'data.json';
$mask_file = 'mask.glb';
$drawings_dir ='/user_drawings';
$images_dir ='/user_images';
$backup_file = 'backup' . time() .'.zip';

// FORMATS

$model_formats = array("glb","gltf","obj","stl",'fbx');
$image_formats = array('apng','avif','gif','jpg','jpeg','png','svg','webp');

// STYLES --------------------------------

$SCRIPT_STYLE = 'background-color:black;color:white;height: 100%;padding: 0.5rem 1rem;';



