concept-collection / hitandrun-commonview
hitandrun-commonview / src / engine / project.ts
28 lines · 1.2 KBBlameHistoryRaw
1// The MATLAB project the engine runs, bundled into the app as raw text. The
2// .m files under matlab/ are verbatim copies from the hitandrun-interactive
3// repo (see README). hitandrun_sampler.m does
4// `fileread(fullfile('app','dist','index.html'))` for the uihtml HTMLSource;
5// we never render that page (the bridge is intercepted host-side), so a
6// placeholder satisfies it.
8import demo from '../../matlab/hitandrun_demo.m?raw'
9import sampler from '../../matlab/hitandrun_sampler.m?raw'
10import makeRegion from '../../matlab/helpers/make_region.m?raw'
11import hitAndRun from '../../matlab/helpers/hit_and_run.m?raw'
12import hitAndRunGeneral from '../../matlab/helpers/hit_and_run_general.m?raw'
14export interface ProjectFile {
15 path: string
16 text: string
19export const PROJECT_FILES: ProjectFile[] = [
20 {path: 'hitandrun_demo.m', text: demo},
21 {path: 'hitandrun_sampler.m', text: sampler},
22 {path: 'helpers/make_region.m', text: makeRegion},
23 {path: 'helpers/hit_and_run.m', text: hitAndRun},
24 {path: 'helpers/hit_and_run_general.m', text: hitAndRunGeneral},
25 {path: 'app/dist/index.html', text: '<!-- headless: bridge intercepted host-side -->'}
28export const MAIN_FILE = 'hitandrun_demo.m'