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

ViewHelper: Remove dependency to EditorControls. #25202

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Dec 28, 2022

Related issue: -

Description

ViewHelper has a dependency to EditorControls right now by relying on the control's center property. That makes it a bit inconvenient to us the helper with other controls like OrbitControls. You essentially have to do this:

const helper = new ViewHelper( camera, renderer.domElement );
helper.controls = controls;
helper.controls.center = controls.target; // hack

The PR removes the dependency and introduces a new center property instead. ViewHelper.center can be directly modified by app level code or the center/target property of a control class can be assigned to it (like in editor/js/Viewport.js).

@Mugen87 Mugen87 added this to the r149 milestone Dec 28, 2022
@Mugen87 Mugen87 merged commit 0133b89 into mrdoob:dev Dec 28, 2022
@0b5vr 0b5vr mentioned this pull request Jan 12, 2023
14 tasks
0b5vr added a commit to 0b5vr/three-ts-types that referenced this pull request Jan 24, 2023
This commit refers to the ViewHelper as of mrdoob/three.js#25202
0b5vr added a commit to 0b5vr/three-ts-types that referenced this pull request Jan 24, 2023
This commit refers to the ViewHelper as of mrdoob/three.js#25202
0b5vr added a commit to 0b5vr/three-ts-types that referenced this pull request Jan 26, 2023
This commit refers to the ViewHelper as of mrdoob/three.js#25202
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.

1 participant