mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 10:44:12 +00:00
[3d] move change background color button (#2365)
This commit is contained in:
@@ -11,7 +11,6 @@ class Load3DConfiguration {
|
||||
loadFolder: 'input' | 'output',
|
||||
modelWidget: IWidget,
|
||||
material: IWidget,
|
||||
bgColor: IWidget,
|
||||
lightIntensity: IWidget,
|
||||
upDirection: IWidget,
|
||||
fov: IWidget,
|
||||
@@ -25,7 +24,6 @@ class Load3DConfiguration {
|
||||
postModelUpdateFunc
|
||||
)
|
||||
this.setupMaterial(material)
|
||||
this.setupBackground(bgColor)
|
||||
this.setupLighting(lightIntensity)
|
||||
this.setupDirection(upDirection)
|
||||
this.setupCamera(fov)
|
||||
@@ -58,13 +56,6 @@ class Load3DConfiguration {
|
||||
)
|
||||
}
|
||||
|
||||
private setupBackground(bgColor: IWidget) {
|
||||
bgColor.callback = (value: string) => {
|
||||
this.load3d.setBackgroundColor(value)
|
||||
}
|
||||
this.load3d.setBackgroundColor(bgColor.value as string)
|
||||
}
|
||||
|
||||
private setupLighting(lightIntensity: IWidget) {
|
||||
lightIntensity.callback = (value: number) => {
|
||||
this.load3d.setLightIntensity(value)
|
||||
@@ -99,6 +90,10 @@ class Load3DConfiguration {
|
||||
|
||||
const showGrid = this.load3d.loadNodeProperty('Show Grid', true)
|
||||
this.load3d.toggleGrid(showGrid)
|
||||
|
||||
const bgColor = this.load3d.loadNodeProperty('Background Color', '#282828')
|
||||
|
||||
this.load3d.setBackgroundColor(bgColor)
|
||||
}
|
||||
|
||||
private createModelUpdateHandler(
|
||||
|
||||
Reference in New Issue
Block a user