Implemented types.stringLiteral(.., {as})

This commit is contained in:
Aria Minaei 2021-07-06 21:58:38 +02:00
parent 97ce94d52a
commit a4f83e0f84
8 changed files with 180 additions and 34 deletions

View file

@ -293,21 +293,33 @@ const editorSheetObjectConfig = types.compound({
showAxes: types.boolean(true),
showGrid: types.boolean(true),
showOverlayIcons: types.boolean(false),
transformControlsMode: types.stringLiteral('translate', {
translate: 'Translate',
rotate: 'Rotate',
scale: 'Scale',
}),
transformControlsSpace: types.stringLiteral('world', {
local: 'Local',
world: 'World',
}),
viewportShading: types.stringLiteral('rendered', {
flat: 'Flat',
rendered: 'Rendered',
solid: 'Solid',
wireframe: 'Wireframe',
}),
transformControlsMode: types.stringLiteral(
'translate',
{
translate: 'Translate',
rotate: 'Rotate',
scale: 'Scale',
},
{as: 'switch'},
),
transformControlsSpace: types.stringLiteral(
'world',
{
local: 'Local',
world: 'World',
},
{as: 'switch'},
),
viewportShading: types.stringLiteral(
'rendered',
{
flat: 'Flat',
rendered: 'Rendered',
solid: 'Solid',
wireframe: 'Wireframe',
},
{as: 'menu'},
),
})
export const bindToCanvas: BindFunction = ({