make 'axis' redundant

This commit is contained in:
Kurt Hutten IrevDev
2022-12-23 07:45:47 +11:00
parent 07a40cdd11
commit 544f20852c
4 changed files with 1 additions and 12 deletions

View File

@ -27,7 +27,6 @@ export const Toolbar = () => {
mode: 'sketch',
sketchMode: 'sketchEdit',
pathToNode: guiMode.pathToNode,
axis: guiMode.axis,
quaternion: guiMode.quaternion,
})
}}

View File

@ -64,7 +64,6 @@ export const BasePlanes = () => {
setGuiMode({
mode: 'sketch',
sketchMode: 'sketchEdit',
axis,
quaternion,
pathToNode,
})

View File

@ -41,13 +41,7 @@ function useHeightlight(sourceRange: [number, number]) {
}
quaternion.setFromAxisAngle(rotateAxis, (Math.PI * rotateValue) / 180)
}
const axis =
piper.type !== 'PipeExpression'
? 'xy'
: piper?.body?.[1]?.callee?.name === 'rx'
? 'xz'
: 'yz'
setGuiMode({ mode: 'canEditSketch', pathToNode, axis, quaternion }) // TODO needs fix
setGuiMode({ mode: 'canEditSketch', pathToNode, quaternion })
setDidSetCanEdit(true)
} else if (
!shouldHighlight &&

View File

@ -17,7 +17,6 @@ type GuiModes =
| {
mode: 'sketch'
sketchMode: 'points'
axis: Plane
quaternion: Quaternion
id?: string
pathToNode: PathToNode
@ -25,7 +24,6 @@ type GuiModes =
| {
mode: 'sketch'
sketchMode: 'sketchEdit'
axis: Plane
quaternion: Quaternion
pathToNode: PathToNode
}
@ -36,7 +34,6 @@ type GuiModes =
| {
mode: 'canEditSketch'
pathToNode: PathToNode
axis: Plane
quaternion: Quaternion
}