functional sketch working (#26)
* functional sketch working With old sketch block still there * get all version of lines working with add line and update line * remove old ui state types * some clean up * rename some things * add todo for multi cursor * shorten useStore repitition * small type improvement * big overhaul to group sketch function and they ast modifying helpers together * unneeded tweak * ruthlessly rip out sketch logic * clean up path keyword * getting sketch on face working again with all the new sketch line types * add a bunch of tests and re-arrage file structure
This commit is contained in:
@ -10,14 +10,41 @@ import { recast } from './lang/recast'
|
||||
import { lexer } from './lang/tokeniser'
|
||||
|
||||
export type Range = [number, number]
|
||||
export type TooTip =
|
||||
| 'lineTo'
|
||||
| 'line'
|
||||
| 'angledLine'
|
||||
| 'angledLineOfXLength'
|
||||
| 'angledLineOfYLength'
|
||||
| 'angledLineToX'
|
||||
| 'angledLineToY'
|
||||
| 'xLine'
|
||||
| 'yLine'
|
||||
| 'xLineTo'
|
||||
| 'yLineTo'
|
||||
|
||||
type GuiModes =
|
||||
export const toolTips: TooTip[] = [
|
||||
'lineTo',
|
||||
'line',
|
||||
'angledLine',
|
||||
'angledLineOfXLength',
|
||||
'angledLineOfYLength',
|
||||
'angledLineToX',
|
||||
'angledLineToY',
|
||||
'xLine',
|
||||
'yLine',
|
||||
'xLineTo',
|
||||
'yLineTo',
|
||||
]
|
||||
|
||||
export type GuiModes =
|
||||
| {
|
||||
mode: 'default'
|
||||
}
|
||||
| {
|
||||
mode: 'sketch'
|
||||
sketchMode: 'points'
|
||||
sketchMode: TooTip
|
||||
isTooltip: true
|
||||
rotation: Rotation
|
||||
position: Position
|
||||
id?: string
|
||||
@ -26,6 +53,7 @@ type GuiModes =
|
||||
| {
|
||||
mode: 'sketch'
|
||||
sketchMode: 'sketchEdit'
|
||||
isTooltip: true
|
||||
rotation: Rotation
|
||||
position: Position
|
||||
pathToNode: PathToNode
|
||||
|
Reference in New Issue
Block a user