[3d] move change background color button (#2365)

This commit is contained in:
Terry Jia
2025-01-27 20:06:01 -05:00
committed by GitHub
parent 99009a18f7
commit 55d63a8aef
4 changed files with 112 additions and 52 deletions

View File

@@ -123,8 +123,6 @@ app.registerExtension({
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const bgColor = node.widgets.find((w: IWidget) => w.name === 'bg_color')
const lightIntensity = node.widgets.find(
(w: IWidget) => w.name === 'light_intensity'
)
@@ -143,7 +141,6 @@ app.registerExtension({
'input',
modelWidget,
material,
bgColor,
lightIntensity,
upDirection,
fov,
@@ -257,14 +254,6 @@ app.registerExtension({
if (modelWidget) {
modelWidget.value = ''
}
const speedSelect = node.widgets?.find(
(w: IWidget) => w.name === 'animation_speed'
)
if (speedSelect) {
speedSelect.value = '1'
}
})
return {
@@ -297,8 +286,6 @@ app.registerExtension({
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const bgColor = node.widgets.find((w: IWidget) => w.name === 'bg_color')
const lightIntensity = node.widgets.find(
(w: IWidget) => w.name === 'light_intensity'
)
@@ -307,17 +294,6 @@ app.registerExtension({
(w: IWidget) => w.name === 'up_direction'
)
const speedSelect = node.widgets.find(
(w: IWidget) => w.name === 'animation_speed'
)
speedSelect.callback = (value: string) => {
const load3d = containerToLoad3D.get(container.id) as Load3dAnimation
if (load3d) {
load3d.setAnimationSpeed(parseFloat(value))
}
}
const fov = node.widgets.find((w: IWidget) => w.name === 'fov')
let cameraState = node.properties['Camera Info']
@@ -328,7 +304,6 @@ app.registerExtension({
'input',
modelWidget,
material,
bgColor,
lightIntensity,
upDirection,
fov,
@@ -439,8 +414,6 @@ app.registerExtension({
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const bgColor = node.widgets.find((w: IWidget) => w.name === 'bg_color')
const lightIntensity = node.widgets.find(
(w: IWidget) => w.name === 'light_intensity'
)
@@ -474,7 +447,6 @@ app.registerExtension({
'output',
modelWidget,
material,
bgColor,
lightIntensity,
upDirection,
fov
@@ -566,8 +538,6 @@ app.registerExtension({
const material = node.widgets.find((w: IWidget) => w.name === 'material')
const bgColor = node.widgets.find((w: IWidget) => w.name === 'bg_color')
const lightIntensity = node.widgets.find(
(w: IWidget) => w.name === 'light_intensity'
)
@@ -576,17 +546,6 @@ app.registerExtension({
(w: IWidget) => w.name === 'up_direction'
)
const speedSelect = node.widgets.find(
(w: IWidget) => w.name === 'animation_speed'
)
speedSelect.callback = (value: string) => {
const load3d = containerToLoad3D.get(container.id) as Load3dAnimation
if (load3d) {
load3d.setAnimationSpeed(parseFloat(value))
}
}
const fov = node.widgets.find((w: IWidget) => w.name === 'fov')
const onExecuted = node.onExecuted
@@ -612,7 +571,6 @@ app.registerExtension({
'output',
modelWidget,
material,
bgColor,
lightIntensity,
upDirection,
fov