Skip to content

Commit

Permalink
Make points easier to select (enlarge)
Browse files Browse the repository at this point in the history
  • Loading branch information
lf94 committed Jan 14, 2025
1 parent b41df52 commit 009f654
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/clientSideScene/sceneEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ import { SegmentInputs } from 'lang/std/stdTypes'
import { Node } from 'wasm-lib/kcl/bindings/Node'
import { LabeledArg } from 'wasm-lib/kcl/bindings/LabeledArg'
import { Literal } from 'wasm-lib/kcl/bindings/Literal'
import { ArrayExpression } from 'wasm-lib/kcl/bindings/ArrayExpression'
import { radToDeg } from 'three/src/math/MathUtils'
import { getArtifactFromRange, codeRefFromRange } from 'lang/std/artifactGraph'

Expand Down Expand Up @@ -1275,7 +1274,7 @@ export class SceneEntities {
this.scene.add(groupOfDrafts)

// How large the points on the circle will render as
const DRAFT_POINT_RADIUS = 6 // px
const DRAFT_POINT_RADIUS = 10 // px

// The target of our dragging
let target: Object3D | undefined = undefined
Expand Down Expand Up @@ -1380,14 +1379,17 @@ export class SceneEntities {
)
return kclManager.ast


const arg = (x: LabeledArg): Literal[] | undefined => {
if ("arg" in x && "elements" in x.arg && x.arg.type === "ArrayExpression") {
if (x.arg.elements.every(x => x.type === "Literal")) {
return x.arg.elements
}
if (
'arg' in x &&
'elements' in x.arg &&
x.arg.type === 'ArrayExpression'
) {
if (x.arg.elements.every((x) => x.type === 'Literal')) {
return x.arg.elements
}
return undefined
}
return undefined
}

const kclCircle3PointArgs =
Expand Down

0 comments on commit 009f654

Please sign in to comment.