-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Hi all!
First of all, thanks for this awesome library! It is really really cool!
I've had a hard time figuring out how the axis orientation works. I've created a sandbox here to get some more grip on it: https://codesandbox.io/s/hardcore-fog-0eqrh?file=/src/App.js
Note that I've added the AxesHelper to help me know which axis is what.
While typing this everything started making a lot more sense... hopefully this process also helps others...
I've concluded that - when I choose flexDirection="row" - it first layouts the boxes (you pick how many boxes you want, but after 4 boxes it should wrap) on the axis of the first character of the plane. So say, for plane XY the boxes layout in the direction of the X axis, but after 3 boxes, the wrapping occurs on the Y axis. Hence, XY. When I pick flexDirection="column" it does the same thing, but now it layouts on Y first (second character) and then wraps on X.
This is consistent for all planes. The difference between XY and XZ is that the first one will wrap on the Y axis, and the second will wrap on the Z axis.
When there is no wrapping configured, there is no difference between selecting XY or XZ - when selected flexDirection="row".
I do wonder why it layouts like this:
- XY and row: on the X axis, from the origin (of the scene) TO the direction of the
AxesHelperX line - XY and column: on the Y axis, from the origin (of the scene) AWAY from the direction of the
AxesHelperY line - YZ and row: on the Y axis, from the origin (of the scene) TO the direction of the
AxesHelperY line - YZ and column: on the Z axis, from the origin (of the scene) AWAY from the direction of the
AxesHelperZ line - XZ and row: on the X axis, from the origin (of the scene) TO the direction of the
AxesHelperX line (same as 1.) - XZ and column: on the Z axis, from the origin (of the scene) AWAY from the direction of the
AxesHelperZ line (same as 4.)
So:
A) I cannot layout AWAY from the direction of the AxesHelper X line. Only TO (1. and 5.)
B) I can layout TO and AWAY to/from the direction of the AxesHelper Y line (2. and 3.)
C) I cannot layout TO the direction of the AxesHelper Z line. Only AWAY (4. and 6.)
Is this by design? If so, how can I do A or C? Should I flip something, so that it goes to the correct direction?