src/app/main.js is the main entry point for the Ray Optics Simulation web app. It uses Vue to build the web UI for the simulator, and uses the Ray Optics Simulation core library (see below) to do the simulation and editing of optical scenes on the canvas layers.
The app contains some mixed-paradigm code that combines Vue and vanilla JavaScript due to historical reasons. In particular, the ObjBar component uses direct DOM manipulation to create the controls.
The option-related part of the toolbar (not including the object bar) is fully implemented in Vue. An instance of the Scene class is used throughout the session. The state of the scene is stored in the Vue store and bound to the UI elements via useSceneStore. Also, the preferences are stored in the Vue store and bound to the UI elements via usePreferencesStore. The list of controls in the "settings" section of the toolbar is in the SettingsList component.
The "tools" section of the toolbar is mostly implemented in Vue. The list of tools is managed by the ToolsList component. However, the UI logic for the tools uses some direct DOM manipulation (especially the paging in the mobile interface).
- Source: