function wrapGUI(state, options) {
const root = document.createElement("div");
const gui = GUI(
state,
Object.assign(
{
root: root,
containerCSS: "max-width:600px",
theme: Object.assign({}, (options || {}).theme, {
fontFamily: "'Helvetica', sans-serif",
fontSize: "12px",
fontColor: "black",
controlBgColor: "white",
controlBorderRadius: "0px",
controlBorderColor: "#aaa",
fieldBgColor: "white",
fieldHoverColor: "#f8f8f8",
fieldActiveColor: "#ddd",
fieldBorderColor: "#ccc",
fieldHeight: 30,
sectionHeadingColor: "white",
sectionHeadingBgColor: "#ffffff",
sectionHeadingHoverColor: "#005F87",
sectionHeadingBorderColor: "#ffffff",
sectionHeadingHeight: 30,
visibilityFontColor: "#fff",
sliderThumbColor: "#005F87",
focusBorderColor: "#888"
})
},
options || {}
)
).$field.onChanges((e) => root.dispatchEvent(new CustomEvent("input")));
root.value = state;
return root;
}