Add new setting modeling.highlightEdges (#2166)

* Add doc comment to getThemeColorForEngine

* Add a user-level setting for highlightEdges

* Add a custom settings action to update the edge line visibility

* Make the settings pane always open to user settings first

* Refactor engineConnectionMananer.start() to take a settings object

* Revert alway open user settings

* Set highlight edges on engine start up

* fmt fml

* Fix tsc error
This commit is contained in:
Frank Noirot
2024-04-19 00:58:32 -04:00
committed by GitHub
parent 21756fe513
commit ba33b0da19
8 changed files with 70 additions and 11 deletions

View File

@ -8,7 +8,13 @@ import { makeDefaultPlanes } from 'lang/wasm'
export function useSetupEngineManager(
streamRef: React.RefObject<HTMLDivElement>,
token?: string,
theme = Themes.System
settings = {
theme: Themes.System,
highlightEdges: true,
} as {
theme: Themes
highlightEdges: boolean
}
) {
const {
setMediaStream,
@ -46,7 +52,7 @@ export function useSetupEngineManager(
return kclManager.executeCode(true)
},
token,
theme,
settings,
makeDefaultPlanes: () => {
return makeDefaultPlanes(kclManager.engineCommandManager)
},