load_model.rs — 3D Model Loading
Handles loading of 3D model files bundled with the application.
load_model(path) → Vec<u8> Reads a model file by filename and returns its raw bytes to the frontend. In debug builds, models are loaded from src-tauri/models/. In release builds, they are loaded from Tauri's resource directory (where they are bundled via tauri.conf.json).
debug_resource_dir() Returns the resource directory path and its contents as a string. Used during development to verify that model files are bundled correctly.
Note for future developers: Webview technically do this automatically from the frontend but it errors out so the custom function is necessary.