drei icon indicating copy to clipboard operation
drei copied to clipboard

Add to method to Bounds

Open krispya opened this issue 2 years ago • 3 comments

Why

I needed to be able to send the camera to specific orientations when it was not focused on an object.

What

The to method can be used to manually orient the camera with a position and target. The target is optional and uses whatever is currently in box, so it is affected by refresh if you want to focus an object or the Bounds group.

Here is an example of how I use it: https://codesandbox.io/s/bounds-to-example-mipjh?file=/src/App.js

krispya avatar Feb 11 '22 02:02 krispya

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/drei/7BbWzCi8Ln4cL25H42hk9M4CzvQn
✅ Preview: https://drei-git-fork-krispya-bounds-update-pmndrs.vercel.app

vercel[bot] avatar Feb 11 '22 02:02 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5a5a9ed4b457f2ea7ba4146533389c2c97d18d23:

Sandbox Source
wandering-brook-cfsbql Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration
Bounds to example PR

codesandbox-ci[bot] avatar Feb 11 '22 03:02 codesandbox-ci[bot]

This looks good to me, lets fix conflicts and merge?

FarazzShaikh avatar Jul 10 '22 18:07 FarazzShaikh

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
drei ✅ Ready (Inspect) Visit Preview Nov 21, 2022 at 8:05AM (UTC)

vercel[bot] avatar Nov 21 '22 08:11 vercel[bot]

:tada: This PR is included in version 9.42.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 21 '22 08:11 github-actions[bot]