Ensure Model 3D updates when attributes change (#6255)

* trigger scene update when params change

* add changeset

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Hannah 2023-11-03 11:57:27 +00:00 committed by GitHub
parent 3ccf1d1f8b
commit e3ede2ff7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/model3d": minor
"gradio": minor
---
feat:Ensure Model 3D updates when attributes change

View File

@ -79,6 +79,9 @@
function handle_undo(): void {
reset_camera_position(scene, camera_position, zoom_speed, pan_speed);
}
$: if (scene)
reset_camera_position(scene, camera_position, zoom_speed, pan_speed);
</script>
<BlockLabel