Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sixty-shrimps-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@playcanvas/blocks": patch
---

Updated camera api (removed resetZoom)
4 changes: 2 additions & 2 deletions packages/blocks/src/splat-viewer/smart-camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function CameraController({ focus = [0, 0, 0], distance = 0, animate = false, ..
// @ts-expect-error CameraControls is not defined in the script
const controls = (entity.script?.cameraControls || entity.script?._CameraControls) as CameraControls;
if (controls) {
controls.focus(new Vec3().fromArray(focus), null, animate);
controls.resetZoom(distance, animate);
controls.focus(new Vec3().fromArray(focus), false);

}
}, [focus, distance, animate]);

Expand Down
Loading