Skip to content

Commit

Permalink
Add plane parameterization comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Oct 18, 2023
1 parent 09976b7 commit e2e38a4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/viser/client/src/WebsocketInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ function useMessageHandler() {
sectionThickness={message.section_thickness}
sectionSize={message.section_size}
rotation={
// There's redundancy here when we set the side to
// THREE.DoubleSide, where xy and yx should be the same.
//
// But it makes sense to keep this parameterization because
// specifying planes by xy seems more natural than the normal
// direction (z, +z, or -z), and it opens the possibility of
// rendering only FrontSide or BackSide grids in the future.
//
// If we add support for FrontSide or BackSide, we should
// double-check that the normal directions from each of these
// rotations match the right-hand rule!
message.plane == "xz"
? new THREE.Euler(0.0, 0.0, 0.0)
: message.plane == "xy"
Expand Down

0 comments on commit e2e38a4

Please sign in to comment.