-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from floryst/faster_layouts
Faster layouts, configurable layout grid, and persistent views
- Loading branch information
Showing
10 changed files
with
303 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import Layout2D from '../layouts/Layout2D'; | ||
import Layout3D from '../layouts/Layout3D'; | ||
|
||
export default { | ||
layouts: { | ||
'2D': { | ||
grid: [1, 1], | ||
views: { | ||
// stacked | ||
sliceX: { cell: [1, 1] }, | ||
sliceY: { cell: [1, 1], defaultVisible: true, defaultActive: true }, | ||
sliceZ: { cell: [1, 1] }, | ||
}, | ||
}, | ||
'3D': { | ||
grid: [1, 1], | ||
views: { | ||
volume: { cell: [1, 1], defaultActive: true }, | ||
}, | ||
}, | ||
Split: { | ||
grid: [1, 2], | ||
views: { | ||
// stacked | ||
sliceX: { cell: [1, 1] }, | ||
sliceY: { cell: [1, 1], defaultVisible: true }, | ||
sliceZ: { cell: [1, 1] }, | ||
|
||
volume: { cell: [1, 2], defaultActive: true }, | ||
}, | ||
}, | ||
Quad: { | ||
grid: [2, 2], | ||
views: { | ||
sliceX: { | ||
cell: [2, 1], | ||
propOverrides: { | ||
viewType: 'View2D_X', | ||
title: '-Z+Y', | ||
orientations: [], | ||
}, | ||
}, | ||
sliceY: { | ||
cell: [1, 1], | ||
propOverrides: { | ||
viewType: 'View2D_Y', | ||
title: '-Z+X', | ||
orientations: [], | ||
}, | ||
}, | ||
sliceZ: { | ||
cell: [2, 2], | ||
propOverrides: { | ||
viewType: 'View2D_Z', | ||
title: '+X+Y', | ||
orientations: [], | ||
}, | ||
}, | ||
volume: { cell: [1, 2], defaultActive: true }, | ||
}, | ||
}, | ||
}, | ||
views: { | ||
sliceX: { | ||
component: Layout2D, | ||
props: { | ||
axis: 0, | ||
orientation: 1, | ||
viewUp: [0, 0, 1], | ||
onAxisChange: (axis) => ['sliceX', 'sliceY', 'sliceZ'][axis], | ||
}, | ||
stackChangeFunc: 'onAxisChange', | ||
}, | ||
sliceY: { | ||
component: Layout2D, | ||
props: { | ||
axis: 1, | ||
orientation: 1, | ||
viewUp: [0, -1, 0], | ||
onAxisChange: (axis) => ['sliceX', 'sliceY', 'sliceZ'][axis], | ||
}, | ||
stackChangeFunc: 'onAxisChange', | ||
}, | ||
sliceZ: { | ||
component: Layout2D, | ||
props: { | ||
axis: 2, | ||
orientation: 1, | ||
viewUp: [0, -1, 0], | ||
onAxisChange: (axis) => ['sliceX', 'sliceY', 'sliceZ'][axis], | ||
}, | ||
stackChangeFunc: 'onAxisChange', | ||
}, | ||
volume: { | ||
component: Layout3D, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.