check cam-far when adding sketch segments (#1434)
Co-authored-by: Frank Noirot <frank@kittycad.io>
This commit is contained in:
@ -231,6 +231,15 @@ class SceneEntities {
|
|||||||
draftSegment?: DraftSegment
|
draftSegment?: DraftSegment
|
||||||
}) {
|
}) {
|
||||||
this.createIntersectionPlane()
|
this.createIntersectionPlane()
|
||||||
|
const distance = sceneInfra.controls.target.distanceTo(
|
||||||
|
sceneInfra.camera.position
|
||||||
|
)
|
||||||
|
// TODO this should probably be distance to the sketch group, more important after sketch on face
|
||||||
|
// since sketches won't always so close to the origin
|
||||||
|
// is this the best place to adjust camera far?
|
||||||
|
if (sceneInfra.camera.far < distance * 1.5) {
|
||||||
|
sceneInfra.camera.far = distance * 2
|
||||||
|
}
|
||||||
|
|
||||||
const { truncatedAst, programMemoryOverride, variableDeclarationName } =
|
const { truncatedAst, programMemoryOverride, variableDeclarationName } =
|
||||||
this.prepareTruncatedMemoryAndAst(
|
this.prepareTruncatedMemoryAndAst(
|
||||||
|
Reference in New Issue
Block a user