Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scope target, remove redundant code #42

Merged

Conversation

NikitaDudin
Copy link
Contributor

@NikitaDudin NikitaDudin commented Apr 3, 2024

I faced with issue of wrong camera initial position on next 3d-scene creating after using enabledPan and change positions with panning on first/previous scene creating iteration.

partialScope object uses on creating a new instance of the orbit controls. But partialScope.target value not recreates on resting partialScope object because it is object(just copy link to Vector3 instance). This can lead to conflicts when using multiple instances at the same time because they will all reference the same target object.

maybe fix it #31

@TiagoCavalcante
Copy link
Owner

Thanks @NikitaDudin!

There is just a small problem: the types are inferred from partial scope. I'll merge this and fix it in another PR, then release a new version.

@TiagoCavalcante TiagoCavalcante merged commit c40c2fb into TiagoCavalcante:main Apr 3, 2024
TiagoCavalcante added a commit that referenced this pull request Apr 3, 2024
@TiagoCavalcante TiagoCavalcante mentioned this pull request Apr 3, 2024
TiagoCavalcante added a commit that referenced this pull request Apr 3, 2024
* fix: Fix onChange type change from #42

* Change version to 1.0.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants