-
Notifications
You must be signed in to change notification settings - Fork 134
First tries to recenter user model to origin #300
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
Conversation
| <input id="axes-controls" type="checkbox">Display axes<br /> | ||
| </p> | ||
| <p> | ||
| <div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing two "s":
Origin corresponds to model's center
| * ``` | ||
| */ | ||
| viewer.modelCentric = function(model_centric) { | ||
| if (model_centric === undefined) {model_centric = false;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if this is overly pedantic, but I really prefer to keep statements on separate lines:
if (model_centric === undefined) {
model_centric = false;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I will fix it, and I'm kind of agree with you.
In fact I like used return if something but it is not supported in JS.
…ainbrowser into centric_rotation
| // Caculate the offset | ||
| var offset_centroid = new THREE.Vector3(); | ||
| offset_centroid.copy(model.userData.model_center_offset); | ||
| if (model_centric === false) { offset_centroid.negate();} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed one here.
|
Looks good. Shall I merge? |
|
If it seems ok for you yes Pierre had review too, so everything seems ok, I On 27 May 2016 at 15:51, Robert D Vincent notifications@github.com wrote:
|
The idea here was to recenter the model to the origin if the original data is shifted. In this way the user data should appear at the center when it is loaded.
I tried to see all the edges case that can appear in the demo, but maybe I miss some.
Can you take a second look and let me know if you think it is ok.