@@ -13,6 +13,7 @@ import { useSettingsStore } from '/src/stores/settings'
1313import { useStateStore } from '/src/stores/state'
1414import { useStyleStore } from '/src/stores/style'
1515import { useFairRiteStyleStore } from '/src/stores/fairRiteStyle'
16+ import { useModelSettingsStore } from '/MagneticBuilder/src/stores/modelSettings'
1617import { VueWindowSizePlugin } from 'vue-window-size/plugin' ;
1718import { initWorker } from '/WebSharedComponents/assets/js/mkfRuntime'
1819import VueLatex from 'vatex'
@@ -75,6 +76,12 @@ function preloadMKF() {
7576 mkf . load_wires ( "" ) . then ( ( ) => console . log ( "Preload: Wires loaded" ) )
7677 ] ) ;
7778
79+ // Initialize model settings from WASM during preload
80+ console . warn ( "Preload: Initializing model settings..." ) ;
81+ const modelSettingsStore = useModelSettingsStore ( ) ;
82+ await modelSettingsStore . loadFromWASM ( ) ;
83+ console . warn ( "Preload: Model settings initialized" ) ;
84+
7885 console . warn ( "MKF preload complete - All data ready" ) ;
7986 return mkf ;
8087 } catch ( error ) {
@@ -204,6 +211,12 @@ router.beforeEach((to, from, next) => {
204211 await Promise . all ( loadPromises ) ;
205212 }
206213 console . warn ( "All data loaded" ) ;
214+
215+ // Initialize model settings from WASM
216+ console . warn ( "Initializing model settings..." ) ;
217+ const modelSettingsStore = useModelSettingsStore ( ) ;
218+ await modelSettingsStore . loadFromWASM ( ) ;
219+ console . warn ( "Model settings initialized" ) ;
207220
208221 // Ensure minimum loader display time before navigating
209222 const newPath = app . config . globalProperties . $userStore . loadingPath ;
0 commit comments