Give startSketchAt a 3D artifact (#65)
* Give startSketchAt a 3D artifact * fix tests * refactor start geo to be in the start property * small tweak
This commit is contained in:
@ -240,6 +240,14 @@ function RenderViewerArtifact({
|
||||
if (artifact.type === 'sketchGroup') {
|
||||
return (
|
||||
<>
|
||||
{artifact.start && (
|
||||
<PathRender
|
||||
geoInfo={artifact.start}
|
||||
forceHighlight={false}
|
||||
rotation={artifact.rotation}
|
||||
position={artifact.position}
|
||||
/>
|
||||
)}
|
||||
{artifact.value.map((geoInfo, key) => (
|
||||
<PathRender
|
||||
geoInfo={geoInfo}
|
||||
@ -356,7 +364,7 @@ function PathRender({
|
||||
return (
|
||||
<>
|
||||
{geoInfo.__geoMeta.geos.map((meta, i) => {
|
||||
if (meta.type === 'line') {
|
||||
if (meta.type === 'line')
|
||||
return (
|
||||
<LineRender
|
||||
key={i}
|
||||
@ -367,8 +375,7 @@ function PathRender({
|
||||
position={position}
|
||||
/>
|
||||
)
|
||||
}
|
||||
if (meta.type === 'lineEnd') {
|
||||
if (meta.type === 'lineEnd')
|
||||
return (
|
||||
<MovingSphere
|
||||
key={i}
|
||||
@ -380,7 +387,17 @@ function PathRender({
|
||||
position={position}
|
||||
/>
|
||||
)
|
||||
}
|
||||
if (meta.type === 'sketchBase')
|
||||
return (
|
||||
<LineRender
|
||||
key={i}
|
||||
geo={meta.geo}
|
||||
sourceRange={geoInfo.__geoMeta.sourceRange}
|
||||
forceHighlight={forceHighlight || editorCursor}
|
||||
rotation={rotation}
|
||||
position={position}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</>
|
||||
)
|
||||
|
||||
@ -60,7 +60,10 @@ export const SetHorzDistance = ({
|
||||
const isAllTooltips = nodes.every(
|
||||
(node) =>
|
||||
node?.type === 'CallExpression' &&
|
||||
toolTips.includes(node.callee.name as any)
|
||||
[
|
||||
...toolTips,
|
||||
'startSketchAt', // TODO probably a better place for this to live
|
||||
].includes(node.callee.name as any)
|
||||
)
|
||||
|
||||
const theTransforms = getTransformInfos(
|
||||
|
||||
Reference in New Issue
Block a user