-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Bug fix: applying camera up.z vector at scene init #3256
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
Changes from 3 commits
f82007b
d8ef9eb
556268b
eb72856
789cfd9
4014c35
1ae12b3
cb6dab7
67ea429
5c3742c
3ab1b1d
5b24f51
d338058
b8da9ba
899b568
724416b
c9eed54
b65fa61
d25c335
f8bf472
6af04f2
9ef8a70
f43f944
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ | |
"z": 2 | ||
}, | ||
"up": { | ||
"x": 1, | ||
"y": 0, | ||
"x": 0, | ||
"y": 1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So... But what's going on with |
||
"z": 0 | ||
} | ||
} | ||
|
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.
Would be better to do this in
supplyDefaults
Not sure where we ensure
||up||===1
but it doesn't look like that's done insupplyDefaults
, so I guess at that point we might need a more complicated test (up.x || up.y || up.z < 0
perhaps?)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.
I like the idea of having more complicated test as you mentioned. On the other hand I was wondering that it is now rather difficult for the users to compute and pass z vector components. Could we add a function to normalize user inputs for this vector before reaching there too?
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.
Only the direction of
up
matters, right? So feels to me like we shouldn't require it to be normalized at all. If the user passes in (0,0,0) we should revert to (0,0,1), otherwise seems to me we should normalize it for our own use but leave the un-normalized value inlayout
andfullLayout
.