[3d] redesign UI (#2686)

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chenlei Hu <huchenlei@proton.me>
This commit is contained in:
Terry Jia
2025-02-23 10:14:52 -05:00
committed by GitHub
parent 6f3b99209e
commit d033640927
14 changed files with 493 additions and 227 deletions

View File

@@ -138,12 +138,6 @@ app.registerExtension({
(w: IWidget) => w.name === 'model_file'
)
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const upDirection = node.widgets.find(
(w: IWidget) => w.name === 'up_direction'
)
let cameraState = node.properties['Camera Info']
const config = new Load3DConfiguration(load3d)
@@ -151,15 +145,7 @@ app.registerExtension({
const width = node.widgets.find((w: IWidget) => w.name === 'width')
const height = node.widgets.find((w: IWidget) => w.name === 'height')
config.configure(
'input',
modelWidget,
material,
upDirection,
cameraState,
width,
height
)
config.configure('input', modelWidget, cameraState, width, height)
sceneWidget.serializeValue = async () => {
node.properties['Camera Info'] = load3d.getCameraState()
@@ -309,12 +295,6 @@ app.registerExtension({
(w: IWidget) => w.name === 'model_file'
)
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const upDirection = node.widgets.find(
(w: IWidget) => w.name === 'up_direction'
)
let cameraState = node.properties['Camera Info']
const config = new Load3DConfiguration(load3d)
@@ -322,15 +302,7 @@ app.registerExtension({
const width = node.widgets.find((w: IWidget) => w.name === 'width')
const height = node.widgets.find((w: IWidget) => w.name === 'height')
config.configure(
'input',
modelWidget,
material,
upDirection,
cameraState,
width,
height
)
config.configure('input', modelWidget, cameraState, width, height)
sceneWidget.serializeValue = async () => {
node.properties['Camera Info'] = load3d.getCameraState()
@@ -435,12 +407,6 @@ app.registerExtension({
(w: IWidget) => w.name === 'model_file'
)
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const upDirection = node.widgets.find(
(w: IWidget) => w.name === 'up_direction'
)
const onExecuted = node.onExecuted
node.onExecuted = function (message: any) {
@@ -460,7 +426,7 @@ app.registerExtension({
const config = new Load3DConfiguration(load3d)
config.configure('output', modelWidget, material, upDirection)
config.configure('output', modelWidget)
}
}
})
@@ -536,12 +502,6 @@ app.registerExtension({
(w: IWidget) => w.name === 'model_file'
)
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const upDirection = node.widgets.find(
(w: IWidget) => w.name === 'up_direction'
)
const onExecuted = node.onExecuted
node.onExecuted = function (message: any) {
@@ -561,7 +521,7 @@ app.registerExtension({
const config = new Load3DConfiguration(load3d)
config.configure('output', modelWidget, material, upDirection)
config.configure('output', modelWidget)
}
}
})