5623b11Recorder simulator: MATLAB jet-drive model and interactive web appJeremy Magland 1// The MATLAB implementation, loaded from ../matlab at build time. The app
2// keeps an editable in-memory copy of these sources (see App.tsx); edits feed
3// straight into the render worker and are deliberately not persisted, so a
4// reload restores the shipped code.
6export type { MFile } from './mfilesCore';
7export { hashMFiles } from './mfilesCore';
8import type { MFile } from './mfilesCore';
10const modules = import.meta.glob('../../matlab/*.m', {
11 eager: true,
12 query: '?raw',
13 import: 'default',
14}) as Record<string, string>;
16export const DEFAULT_MFILES: MFile[] = Object.entries(modules)
17 .map(([path, source]) => ({ name: path.split('/').pop()!, source }))
18 .sort((a, b) => a.name.localeCompare(b.name));
20// Files the app itself executes. The others are entry points for running the
21// model from the numbl CLI, and editing them changes nothing in the browser.
22export const EXECUTED_BY_APP = new Set([
23 'recorder_geometry.m',
24 'recorder_bore.m',
25 'recorder_basis.m',
26 'recorder_notes.m',
27 'recorder_jet.m',
28 'recorder_rng.m',
29 'recorder_radiate.m',
30 'recorder_output.m',
31]);