diff --git a/e2e/playwright/regression-tests.spec.ts b/e2e/playwright/regression-tests.spec.ts index be483dc7e..7a74087df 100644 --- a/e2e/playwright/regression-tests.spec.ts +++ b/e2e/playwright/regression-tests.spec.ts @@ -550,7 +550,7 @@ sketch001 = startSketchAt([-0, -0]) const u = await getUtils(page) // Constants and locators - const planeColor: [number, number, number] = [170, 220, 170] + const planeColor: [number, number, number] = [161, 220, 155] const bgColor: [number, number, number] = [27, 27, 27] const middlePixelIsColor = async (color: [number, number, number]) => { return u.getGreatestPixDiff({ x: 600, y: 250 }, color) diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png index 378c43abb..d283a77f4 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-win32.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-win32.png index be55c744a..1d1640822 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-win32.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-off-1-Google-Chrome-win32.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-linux.png index 0fc060736..67fae90ab 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-win32.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-win32.png index 83a3c1d39..96afeb186 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-win32.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Grid-visibility-Grid-turned-on-1-Google-Chrome-win32.png differ diff --git a/e2e/playwright/testing-perspective-toggle.spec.ts b/e2e/playwright/testing-perspective-toggle.spec.ts index 98d90875e..11face6cd 100644 --- a/e2e/playwright/testing-perspective-toggle.spec.ts +++ b/e2e/playwright/testing-perspective-toggle.spec.ts @@ -23,7 +23,7 @@ test.describe('Test toggling perspective', () => { y: screenHeight * 0.4, } const backgroundColor: [number, number, number] = [29, 29, 29] - const xzPlaneColor: [number, number, number] = [50, 50, 99] + const xzPlaneColor: [number, number, number] = [82, 55, 96] const locationToHaveColor = async (color: [number, number, number]) => { return u.getGreatestPixDiff(checkedScreenLocation, color) } diff --git a/src/wasm-lib/kcl/src/engine/mod.rs b/src/wasm-lib/kcl/src/engine/mod.rs index f985324a2..20e825dc4 100644 --- a/src/wasm-lib/kcl/src/engine/mod.rs +++ b/src/wasm-lib/kcl/src/engine/mod.rs @@ -342,92 +342,80 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static { id_generator: &mut IdGenerator, source_range: SourceRange, ) -> Result { - let plane_settings: HashMap)> = HashMap::from([ + let plane_settings: Vec<(PlaneName, Uuid, Point3d, Point3d, Option)> = vec![ ( PlaneName::Xy, - ( - id_generator.next_uuid(), - Point3d { x: 1.0, y: 0.0, z: 0.0 }, - Point3d { x: 0.0, y: 1.0, z: 0.0 }, - Some(Color { - r: 0.7, - g: 0.28, - b: 0.28, - a: 0.4, - }), - ), + id_generator.next_uuid(), + Point3d { x: 1.0, y: 0.0, z: 0.0 }, + Point3d { x: 0.0, y: 1.0, z: 0.0 }, + Some(Color { + r: 0.7, + g: 0.28, + b: 0.28, + a: 0.4, + }), ), ( PlaneName::Yz, - ( - id_generator.next_uuid(), - Point3d { x: 0.0, y: 1.0, z: 0.0 }, - Point3d { x: 0.0, y: 0.0, z: 1.0 }, - Some(Color { - r: 0.28, - g: 0.7, - b: 0.28, - a: 0.4, - }), - ), + id_generator.next_uuid(), + Point3d { x: 0.0, y: 1.0, z: 0.0 }, + Point3d { x: 0.0, y: 0.0, z: 1.0 }, + Some(Color { + r: 0.28, + g: 0.7, + b: 0.28, + a: 0.4, + }), ), ( PlaneName::Xz, - ( - id_generator.next_uuid(), - Point3d { x: 1.0, y: 0.0, z: 0.0 }, - Point3d { x: 0.0, y: 0.0, z: 1.0 }, - Some(Color { - r: 0.28, - g: 0.28, - b: 0.7, - a: 0.4, - }), - ), + id_generator.next_uuid(), + Point3d { x: 1.0, y: 0.0, z: 0.0 }, + Point3d { x: 0.0, y: 0.0, z: 1.0 }, + Some(Color { + r: 0.28, + g: 0.28, + b: 0.7, + a: 0.4, + }), ), ( PlaneName::NegXy, - ( - id_generator.next_uuid(), - Point3d { - x: -1.0, - y: 0.0, - z: 0.0, - }, - Point3d { x: 0.0, y: 1.0, z: 0.0 }, - None, - ), + id_generator.next_uuid(), + Point3d { + x: -1.0, + y: 0.0, + z: 0.0, + }, + Point3d { x: 0.0, y: 1.0, z: 0.0 }, + None, ), ( PlaneName::NegYz, - ( - id_generator.next_uuid(), - Point3d { - x: 0.0, - y: -1.0, - z: 0.0, - }, - Point3d { x: 0.0, y: 0.0, z: 1.0 }, - None, - ), + id_generator.next_uuid(), + Point3d { + x: 0.0, + y: -1.0, + z: 0.0, + }, + Point3d { x: 0.0, y: 0.0, z: 1.0 }, + None, ), ( PlaneName::NegXz, - ( - id_generator.next_uuid(), - Point3d { - x: -1.0, - y: 0.0, - z: 0.0, - }, - Point3d { x: 0.0, y: 0.0, z: 1.0 }, - None, - ), + id_generator.next_uuid(), + Point3d { + x: -1.0, + y: 0.0, + z: 0.0, + }, + Point3d { x: 0.0, y: 0.0, z: 1.0 }, + None, ), - ]); + ]; let mut planes = HashMap::new(); - for (name, (plane_id, x_axis, y_axis, color)) in plane_settings { + for (name, plane_id, x_axis, y_axis, color) in plane_settings { planes.insert( name, self.make_default_plane(plane_id, x_axis, y_axis, color, source_range)