Skip to content

Commit

Permalink
fix: env bg
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Apr 9, 2024
1 parent 32ea209 commit 4a5add6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/core/Environment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,13 @@ function setEnvProps(
environmentRotation: target.environmentRotation?.clone?.() ?? [0, 0, 0],
}
if (background !== 'only') target.environment = texture
if (background) {
target.background = texture
applyProps(target as any, sceneProps)
}
if (background) target.background = texture
applyProps(target as any, sceneProps)

return () => {
if (background !== 'only') target.environment = oldenv
if (background) {
target.background = oldbg
applyProps(target as any, oldSceneProps)
}
if (background) target.background = oldbg
applyProps(target as any, oldSceneProps)
}
}

Expand Down

0 comments on commit 4a5add6

Please sign in to comment.