Skip to content

Commit c30746e

Browse files
committed
bug fix
1 parent 75fd36d commit c30746e

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/composables/useLoad3d.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,21 +232,12 @@ export const useLoad3d = (nodeOrRef: LGraphNode | Ref<LGraphNode | null>) => {
232232

233233
watch(
234234
sceneConfig,
235-
(newValue, oldValue) => {
235+
(newValue) => {
236236
if (load3d && nodeRef.value) {
237237
nodeRef.value.properties['Scene Config'] = newValue
238-
239-
if (newValue.showGrid !== oldValue?.showGrid) {
240-
load3d.toggleGrid(newValue.showGrid)
241-
}
242-
243-
if (newValue.backgroundColor !== oldValue?.backgroundColor) {
244-
load3d.setBackgroundColor(newValue.backgroundColor)
245-
}
246-
247-
if (newValue.backgroundImage !== oldValue?.backgroundImage) {
248-
void load3d.setBackgroundImage(newValue.backgroundImage || '')
249-
}
238+
load3d.toggleGrid(newValue.showGrid)
239+
load3d.setBackgroundColor(newValue.backgroundColor)
240+
void load3d.setBackgroundImage(newValue.backgroundImage || '')
250241
}
251242
},
252243
{ deep: true }

0 commit comments

Comments
 (0)