-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
TransformControls v3 #20720
TransformControls v3 #20720
Conversation
Nit: You also have to update the |
Then let's make it a Draft PR. |
If I open the example and directly scale the mesh (by selecting one of the white helper boxes), it seems I get a mix of camera movement and scaling. This does not happens if I click on the canvas once. |
I can wait until examples/js gets deprecated. I'll need another week or two to finish this PR and get feedback. If I remember correctly, removal was scheduled for this November. Has the plan changed?
Thanks, I'll look into it. |
Yes, this plan has changed. A module-only codebase is now a thing for the future: #20568 (comment) |
That's too bad. Compiling modules from old namespace-style codebase is completely backwards. I'd prefer not to do that. Perhaps if there was a way to generate js from jsm I could live with that. |
Would you like to create a |
Oh wait, I just saw #20529. |
@arodic any idea if this will work with #webxr? |
@arpu that would be awesome. Are there any #webxr controls I can use as an example. I just ordered Oculus Quest 2 so I might as well give it a shot. |
@arodic for testing i think https://github.com/MozillaReality/WebXR-emulator-extension is good |
As alternative to #20527 and #20529 I added a simple demodularize.js prototype to this PR. It is only tested with Converted non-modules still use es6 syntax such as Also added to this PR: Updated examples and editor to use the new API. |
Due to some of the things I've mentioned in #20455 (comment) (specifically dependencies split out into multiple files) I think "demodularizing" files is a more complex task than "modularizing" in the general case. In my opinion it would be best to rely on purpose built and maintained tools to perform this transformation -- I think the first thing that needs to happen for the JSM -> JS transformation pipeline is to settle on what a desirable final file structure is. |
@gkjohnson sounds good. I agree we should use purpose-built tools. Hopefully there will be a conclusion to the jsm > js story. @arpu I started looking into WebXR support. I completed the first step by adding |
Good news @arpu! I was able to add WebXR support. Check it out here! It still needs some cleanup and testing but its looking promising. However, it does require some minor changes to |
Could you please add a "mode" where there is only the rotation fixed to the layer perpendicular to the view-axis activated? The yellow circle in the example. Thank you. |
i think it would be good to have active axis helpers back. People use it to see the relative position to other objects |
Good suggestion @obrhaberer. I added
I figured it was useful for someone @ManishJu. I'll add it back. |
Some feedback on the look&feel:
damping.mov
opacity.mov |
Thanks for the feedback @marcofugaro!
What is your OS/Browser and pointer device? I noticed similar behavior on Macbooks when using touchpad with three-finger-drag (enabled as accessibility feature). It appears to be a bug in the OS but I think there is a way to mitigate.
Agreed! Both issues should be fixed now. Thanks! |
Chrome on a Macbook pro, I am using the touchpad. Also I have enabled the three finger swipe as you say (I think). PS the preview link is now broken: |
@ManishJu I added back translate offset and rotation axis visualization. For scale offset I have initial design but it has some issues. This feature can be disabled by setting @marcofugaro the issue with residual inertia on macbook touchpad should be fixed now. Fade in/out speed is somewhat faster but still above 100ms. My issue with faster transition is that it can cause strobing-like effect which I dont like. But if you still like it to be faster, this feature can be adjusted with |
- Deprecated `mode` property in favor of `showTranslate`, `showRotate` and `showScale`. - Added support for combined transfomration gizmos. - Added support for inertia via `enableDamping` and `dampingFactor` properties. - Improved grazing angle interactions. - Added support for WebXR (requires #20790) - Improved code quality.
@arodic there is one test continuously failing. |
This should be solved now 👍 |
I re-implemented WebXR support with "move" event from a63ff05 but there are still few small issues to iron out. Next, I will look into jsm > js conversion. @obrhaberer thanks for pointing out the failing test. I'll need to update some of the screenshots since the visual appearance of the gizmo has changed. |
@arodic again some hiccups. |
I'm gonna close this pull request because:
I'll be keeping track of progress with TransformControls but I'll give up ownership of the code @mrdoob @Mugen87 @marcofugaro @tschw. In the future, I hope to make a new suite of three.js controls in a separate repository. |
That's definitely P0! 😍 |
Here is a full rewrite of
TransformControls
with a bunch of improvements. Most notably:showTranslate
,showRotate
andshowScale
properties.mode
property still works with a deprecation warning.TransformControls
if you setenableDamping
anddampingFactor
property.This PR should be labeled as DRAFT.
Any feedback and testing support is welcome!
LIVE DEMO
TODO: